我在一台服务器上设置了 plesk,该服务器上已有多个正在运行的域,包括电子邮件,所有域都运行正常。我的问题出在我添加的一个新域上,该域使用 Exchange 而不是本地后缀来发送电子邮件。因此,我在 plesk 中停用了此“gencom.us”的后缀,但每当网站尝试发送电子邮件(PHP 联系表单)时,我都从未收到测试电子邮件(尽管表单报告成功)。
以下是我遇到的错误邮件日志:
Jul 30 08:00:19 pacobob postfix/pickup[22664]: 15F972500E30: uid=10000 from=<[email protected]>
Jul 30 08:00:19 pacobob postfix/cleanup[22750]: 15F972500E30: message-id=<[email protected]>
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 15F972500E30: from=<[email protected]>, size=836, nrcpt=1 (queue active)
Jul 30 08:00:19 pacobob postfix/smtp[22852]: 15F972500E30: to=<[email protected]>, relay=none, delay=0.09, delays=0.08/0.01/0/0, dsn=5.4.6, status=bounced (mail for 206.225.87.101 loops back to myself)
Jul 30 08:00:19 pacobob postfix/cleanup[22750]: 2EB332500EEF: message-id=<[email protected]>
Jul 30 08:00:19 pacobob postfix/bounce[22853]: 15F972500E30: sender non-delivery notification: 2EB332500EEF
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 2EB332500EEF: from=<>, size=2630, nrcpt=1 (queue active)
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 15F972500E30: removed
Jul 30 08:00:19 pacobob postfix/smtp[22852]: 2EB332500EEF: to=<[email protected]>, relay=none, delay=0.03, delays=0.03/0/0/0, dsn=5.4.6, status=bounced (mail for 206.225.87.101 loops back to myself)
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 2EB332500EEF: removed
Jul 30 08:00:19 pacobob plesk_saslauthd[22790]: activity on 0 channel(s)
Jul 30 08:00:19 pacobob plesk_saslauthd[22790]: select timeout, exiting
这是我的主配置文件
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = all
inet_protocols = all
mydestination = localhost.$mydomain, localhost, localhost.localdomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
mail.$mydomain, www.$mydomain, ftp.$mydomain
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.8.17/samples
readme_directory = /usr/share/doc/postfix-2.8.17/README_FILES
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual, hash:/etc/postfix/virtual_mailbox_maps
virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox
transport_maps = hash:/etc/postfix/transport, hash:/var/spool/postfix/plesk/transport
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
smtp_tls_security_level = may
smtp_use_tls = no
smtpd_timeout = 3600s
smtpd_proxy_timeout = 3600s
disable_vrfy_command = yes
mynetworks =
relayhost =
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, permit
smtpd_client_restrictions =
smtp_send_xforward_command = yes
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
virtual_mailbox_base = /var/qmail/mailnames
virtual_uid_maps = static:30
virtual_gid_maps = static:31
smtpd_milters = , inet:127.0.0.1:12768
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
virtual_transport = plesk_virtual
plesk_virtual_destination_recipient_limit = 1
mailman_destination_recipient_limit = 1
mailbox_size_limit = 0
virtual_mailbox_limit = 0
mydestination = pacobob.com
message_size_limit = 31457280
任何帮助都将不胜感激,这是在 CentOS 6.6 上运行的默认 plesk 设置(12.0.18 更新 #57)。并且所有其他电子邮件、Webmail、smtp 设置似乎都适用于所有其他服务器,只有这台服务器有 Exchange。我确实确保我的所有 DNS 设置在 plesk 以及通过 codero 托管的服务器门户中都是正确的。我知道 Exchange 设置正在运行,因为每个人都收到了他们的电子邮件,我只是无法将电子邮件从域发送到 Exchange 服务器。
以下是“dig gencom.us mx”的结果
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1 <<>> gencom.us mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50128
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;gencom.us. IN MX
;; ANSWER SECTION:
gencom.us. 3600 IN MX 10 gencom- us.mail.protection.outlook.com.
;; Query time: 61 msec
;; SERVER: 69.64.66.11#53(69.64.66.11)
;; WHEN: Sat Aug 1 07:01:30 2015
;; MSG SIZE rcvd: 80
我的 /etc/postfix/transport 和 /var/spool/postfix/plesk/transport 的内容
gencom.us smtp:206.225.87.101
更新日志
Aug 3 07:24:55 pacobob plesk sendmail[21126]: handlers_stderr: SKIP
Aug 3 07:24:55 pacobob plesk sendmail[21126]: SKIP during call 'check-quota' handler
Aug 3 07:24:55 pacobob postfix/pickup[21037]: 41AAC2500EFA: uid=10000 from=<[email protected]>
Aug 3 07:24:55 pacobob postfix/cleanup[21132]: 41AAC2500EFA: message-id=<[email protected]>
Aug 3 07:24:55 pacobob postfix/qmgr[21036]: 41AAC2500EFA: from=<[email protected]>, size=864, nrcpt=1 (queue active)
Aug 3 07:25:00 pacobob postfix/smtp[21134]: certificate verification failed for gencom-us.mail.protection.outlook.com[207.46.163.138]:25: untrusted issuer /C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Root
Aug 3 07:25:02 pacobob postfix/smtp[21134]: 41AAC2500EFA: to=<[email protected]>, relay=gencom-us.mail.protection.outlook.com[207.46.163.138]:25, delay=7.2, delays=0.11/0.02/5.7/1.4, dsn=2.6.0, status=sent (250 2.6.0 <[email protected]> [InternalId=17721035066256, Hostname=DM2PR12MB0187.namprd12.prod.outlook.com] Queued mail for delivery)
Aug 3 07:25:02 pacobob postfix/qmgr[21036]: 41AAC2500EFA: removed
谢谢!
答案1
让我引用另一句话很好的答案经过詹姆斯·斯尼林格来自另一个问题:邮件循环回到我自己 | postfix
当 domain.com 具有指向您的 Postfix 服务器的 MX 记录(或者,在没有 MX 的情况下,具有 A 记录)但您的 Postfix 服务器未配置为接受该域的邮件时,就会发生这种情况。
从上面的引文来看,基本上有两种情况可能导致此错误发生
- Postfix 接收电子邮件,其收件人地址未列为本地域,因此 Postfix 应该转发这些电子邮件
- Postfix 路由引擎决定将电子邮件转发到同一个 Postfix 实例
要修复此错误,我们必须修复上述可能原因之一。
- 如果您在通过 MX 记录指向域后忘记将域引入到 Postfix,则可能会发生第一个问题。我们需要将域作为本地域插入,这样 Postfix 就不会中继电子邮件。域可以列在
mydestination
、virtual_mailbox_domains
或中virtual_alias_domains
。 - 如果您已从 Postfix 本地域中删除域,但忘记更改 MX 记录(如果 MX 不可用,则更改 A 记录),则可能会发生第二个问题。在这种情况下,Postfix 会将电子邮件转发到自身并抱怨上述错误。解决方案是更改 A 或 MX 记录。或者也许 Postfix 已配置为使用
/etc/hosts
,那么您也应该检查此文件。 - 如果您使用 Postfix 内部路由通过 DNS 机制覆盖邮件路由,也会出现第二个问题。配置邮件静态路由的常用参数是
transport_maps
。检查您是否将地址放在这些映射上,如果存在,则删除。
从问题描述来看,问题似乎出在 postfixtransport_maps
参数上。您的 DNS 记录没有问题,并且您声明该域名应该在 postfix 之外的某个地方处理。删除此条目
gencom.us smtp:206.225.87.101
运行postmap the_problematic_file
应该可以解决你的问题。