我有一个运行我的 Apache 网站和 Postfix 的 CentOS 机器,但每当我尝试使用 PHP 的 mail() 函数发送到我的 @aevidi 电子邮件时,它都会发送到 ~/mail 中的本地邮箱,但在 Zoho 的网络邮件中不可见。当我从 Gmail 帐户向我的 @aevidi 电子邮件发送电子邮件时,我在 Zoho 中看到它,但在我的本地邮箱中看不到(预期结果)。这是我的设置:
- Zoho 作为我的自定义域的电子邮件主机
- 带有我的网站和邮件服务器的 CentOS 盒子(postfix)
我按照本教程进行了 Zoho/SES/Postfix 高级设置(老实说不确定 SES 在哪里发挥作用)
我按照本教程设置 Postfix(在我意识到 Dovecot 的作用之前,我已经将它删除了)。
/var/log/maillog after executing mail()
Aug 3 20:05:37 aevidi postfix/pickup[7702]: 31ADD40BDD: uid=48 from=<[email protected]>
Aug 3 20:05:37 aevidi postfix/cleanup[7707]: 31ADD40BDD: message-id=<20140804000537.31ADD40BDD@aevidi>
Aug 3 20:05:37 aevidi postfix/qmgr[7703]: 31ADD40BDD: from=<[email protected]>, size=344, nrcpt=1 (queue active)
Aug 3 20:05:37 aevidi postfix/local[7709]: 31ADD40BDD: to=<[email protected]>, relay=local, delay=0.03, delays=0.02/0.0
1/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Aug 3 20:05:37 aevidi postfix/qmgr[7703]: 31ADD40BDD: removed
/etc/postfix/main.cf
myhostname = aevidi #This is my FQDN when I type 'hostname -f'
mydomain = aevidi.com
myorigin = $mydomain
home_mailbox = mail/
mynetworks = 127.0.0.0/8
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = cyrus
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
relayhost = email-smtp.us-east-1.amazonaws.com:25
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
DNS configuration
任何帮助表示赞赏!
答案1
如果您想通过查找(在您的情况下为 Zoho 邮件服务器)来postfix
递送邮件,那么您应该从 中删除ie 。aevidi.com
MX
i.e
$domain
aevidi.com
mydestination