![Postfix 默默忽略收件人](https://linux22.com/image/650183/Postfix%20%E9%BB%98%E9%BB%98%E5%BF%BD%E7%95%A5%E6%94%B6%E4%BB%B6%E4%BA%BA.png)
我遇到了一个奇怪的问题,其中运行 Postfix 的邮件服务器收到一封电子邮件,该邮件有同一域中的多个收件人,但只有其中一个收件人会收到该消息。
已发送邮件的邮件标题示例(地址已更改以保护无辜者):
From: Ryan Hood <[email protected]>
To: Jeff Bridges <[email protected]>
CC: 'Rhonda White' <[email protected]>, 'Joe'
<[email protected]>
在这种情况下,Rhonda 收到了电子邮件,但其他收件人都没有收到。在我的边缘服务器(从互联网接受邮件的服务器)的日志中,我看到了以下内容:
Jan 9 14:31:58 edge postfix/smtpd[1470]: 60C31CF435: client=smtp629.remoteserver.net[x.x.x.x]
Jan 9 14:31:58 edge postfix/cleanup[6125]: 60C31CF435: message-id=<BLUPR08MB0085EF631200B8DBC8951C7A5440@BLUPR08MB008.namprd08.prod.outlook.com>
Jan 9 14:31:58 edge postfix/qmgr[3170]: 60C31CF435: from=<[email protected]>, size=279996, nrcpt=2 (queue active)
Jan 9 14:31:58 edge postfix/smtp[7186]: 60C31CF435: to=<[email protected]>, relay=mail-store01.domain.int[10.101.2.6]:25, delay=0.51, delays=0.45/0/0.04/0.02, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BFE4D7F9F6)
Jan 9 14:31:58 edge postfix/smtp[7186]: 60C31CF435: to=<[email protected]>, relay=mail-store01.domain.int[10.101.2.6]:25, delay=0.51, delays=0.45/0/0.04/0.02, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BFE4D7F9F6)
Jan 9 14:31:58 edge postfix/qmgr[3170]: 60C31CF435: removed
邮件被发送到我们的邮件存储库(也运行 postfix),但只能发送给两个收件人([电子邮件保护]和[电子邮件保护],用于存档电子邮件)。未列出其他收件人。
我们的邮件存储库的日志也没有显示它们。
Jan 9 14:40:48 mail-store01 postfix/smtpd[24566]: BFE4D7F9F6: client=edge.domain.int[10.101.2.2]
Jan 9 14:40:48 mail-store01 postfix/cleanup[24551]: BFE4D7F9F6: message-id=<BLUPR08MB0085EF631200B8DBC8951C7A5440@BLUPR08MB008.namprd08.prod.outlook.com>
Jan 9 14:40:48 mail-store01 postfix/smtpd[24566]: disconnect from edge.domain.int[10.101.2.2]
Jan 9 14:40:48 mail-store01 postfix/qmgr[1441]: BFE4D7F9F6: from=<[email protected]>, size=280277, nrcpt=2 (queue active)
Jan 9 14:40:48 mail-store01 dovecot: lda([email protected]): sieve: msgid=<BLUPR08MB0085EF631200B8DBC8951C7A5440@BLUPR08MB008.namprd08.prod.outlook.com>: stored mail into mailbox 'INBOX'
Jan 9 14:40:48 mail-store01 postfix/pipe[24365]: BFE4D7F9F6: to=<[email protected]>, relay=dovecot, delay=0.07, delays=0.02/0/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
Jan 9 14:40:48 mail-store01 dovecot: lda([email protected]): sieve: msgid=<BLUPR08MB0085EF631200B8DBC8951C7A5440@BLUPR08MB008.namprd08.prod.outlook.com>: stored mail into mailbox 'INBOX.2015.01.09'
Jan 9 14:40:48 mail-store01 postfix/pipe[24371]: BFE4D7F9F6: to=<[email protected]>, relay=dovecot, delay=0.13, delays=0.02/0/0/0.11, dsn=2.0.0, status=sent (delivered via dovecot service)
Jan 9 14:40:48 mail-store01 postfix/qmgr[1441]: BFE4D7F9F6: removed
奇怪的是这种情况极少发生。我有很多邮件从这个外部电子邮件地址以及其他地址正确发送给这些收件人。我不知道为什么有时会发生这种情况。
服务器详细信息:
- Ubuntu 12.04
- 后缀 2.9.6-1~12.04.1
如果有帮助的话,这是我的边缘服务器上的 main.cf。
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# enable soft bounces for now
#soft_bounce = yes
# TLS parameters
#smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
#smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_cert_file = /etc/ssl/certs/mail.example.com.crt
smtpd_tls_key_file = /etc/ssl/private/mail.example.com.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = edge.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = edge.example.com, edge, localhost.localdomain, localhost
relay_domains = /etc/postfix/domains,
/etc/postfix/configs/mail-store01/domains
relayhost = mail-gateway01.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_path = smtpd
broken_sasl_auth_clients = yes
#smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031
smtpd_recipient_restrictions = permit_sasl_authenticated
check_recipient_access hash:/etc/postfix/clients,
hash:/etc/postfix/configs/mail-store01/clients
permit_mynetworks
reject_unauth_destination
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
smtpd_end_of_data_restrictions =
如果有额外的信息可能对解决这个问题有帮助,请告诉我。
答案1
这里我给大家讲一个事实:标题部分的收件人与电子邮件传递系统无关。
Postfix 和其他 MTA 使用信封收件人通过互联网路由电子邮件。当然,您可以伪造标题,这样看起来就像您发送给一个收件人,但实际上在信封中您发送给了数千个收件人(就像垃圾邮件发送者所做的那样 :))。
但为什么会发生这样的事呢?嗯,问题不在于你的服务器。Postfix 从来不会在没有在日志中告知你的情况下默默地丢弃消息。即使你丢弃了消息,maillog 也会记录下所有相关信息,例如
1 月 22 日 07:24:34 mailx postfix-2nd/smtpd[15167]: NOQUEUE: discard: RCPT from unknown[192.168.235.100]: : 收件人地址触发 DISCARD 操作;from= to= proto=ESMTP helo=
要进行进一步的故障排除,您需要与电子邮件来源服务器的管理员沟通。如果发件人服务器没有发送邮件,那么您的服务器也不会收到邮件。