我在使用php mail()函数向谷歌商业应用程序(Gmail)发送电子邮件时遇到问题。其他电子邮件工作正常。我在Debian上安装了nginx和postfix。
我添加了SPF记录
TXT“v = spf1包括:_spf.google.com~all”
/var/log/mail.log looks like this:
Jan 13 16:58:12 pluto postfix/pickup[26804]: 42FD82169E: uid=33 from=<www-data>
Jan 13 16:58:12 pluto postfix/cleanup[26826]: 42FD82169E: message-id=<20150113145812.42FD82169E@mydomain.com>
Jan 13 16:58:12 pluto postfix/qmgr[26805]: 42FD82169E: from=<www-data@info@mydomain.com>, size=594, nrcpt=1 (queue active)
Jan 13 16:58:12 pluto postfix/smtp[26828]: 42FD82169E: to=<recepient@mydomain.com>, relay=aspmx.l.google.com[173.194.78.26]:25, delay=0.23, delays=0.06/0.01/0.06/0.11, dsn=5.7.1, status=bounced (host aspmx.l.google.com[173.194.78.26] said: 550-5.7.1 [83.136.252.16 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. ey11si9440622wid.49 - gsmtp (in reply to end of DATA command))
Jan 13 16:58:12 pluto postfix/cleanup[26826]: 768962179F: message-id=<20150113145812.768962179F@mydomain.com>
Jan 13 16:58:12 pluto postfix/qmgr[26805]: 768962179F: from=, size=3127, nrcpt=1 (queue active)
Jan 13 16:58:12 pluto postfix/bounce[26829]: 42FD82169E: sender non-delivery notification: 768962179F
Jan 13 16:58:12 pluto postfix/qmgr[26805]: 42FD82169E: removed
Jan 13 16:58:12 pluto postfix/smtp[26828]: 768962179F: to=<www-data@info@mydomain.com>, relay=aspmx.l.google.com[173.194.78.26]:25, delay=0.09, delays=0.01/0/0.04/0.04, dsn=5.1.1, status=bounced (host aspmx.l.google.com[173.194.78.26] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 l10si41320730wjz.98 - gsmtp (in reply to RCPT TO command))
Jan 13 16:58:12 pluto postfix/qmgr[26805]: 768962179F: removed
/etc/postfix/main.cf looks like this:
myhostname = mydomain.com
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
myorigin = /etc/mailname
mydestination =
relayhost =
mynetworks = 127.0.0.0/8 83.136.252.0/22 10.2.0.0/22 [::1]/128 [fe80::]/64
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
milter_protocol = 2
milter_default_action = accept
答案 0 :(得分:2)
通过编辑
中的/ etc / mailname解决了问题info@mydomain.com
到
mydomain.com
答案 1 :(得分:0)
你试过this吗? 我明白你不是想转发邮件,但仍然......