在 Ubuntu(natty narwhal)Amazon Ec2 实例上为 php mail() 配置 postfix

在 Ubuntu(natty narwhal)Amazon Ec2 实例上为 php mail() 配置 postfix

我第一次设置 sendmail 和 postfix。我相信它安装正确,但我需要配置方面的帮助。当我调用 mail() 时,我在 /var/log/mail.log 中收到以下内容

Aug 30 06:13:52 ip-10-202-193-59 postfix/pickup[28117]: 866186010F: uid=33 from=<www-data>
Aug 30 06:13:52 ip-10-202-193-59 postfix/cleanup[28125]: 866186010F: message-id=<[email protected]> 
Aug 30 06:13:52 ip-10-202-193-59 postfix/qmgr[28118]: 866186010F: from=<[email protected]>, size=392, nrcpt=1 (queue active)
Aug 30 06:13:52 ip-10-202-193-59 postfix/smtp[28127]: 866186010F: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.113.27]:25, delay=0.$
Aug 30 06:13:52 ip-10-202-193-59 postfix/qmgr[28118]: 866186010F: removed

消息从未被传递。

我的postfix配置如下:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = bellcreativestudio.com, ip-10-202-193-59.ec2.internal, localhost.ec2.internal, localhost
myhostname = bellcreativestudio.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

答案1

Postfix 事务日志看起来不错。您可以检查 gmail 上的“垃圾邮件”文件夹,以防它被错误地归类为垃圾邮件(可能是由于您的配置)并被放在那里。

相关内容