![Postfix 将每封邮件发送两次](https://linux22.com/image/600417/Postfix%20%E5%B0%86%E6%AF%8F%E5%B0%81%E9%82%AE%E4%BB%B6%E5%8F%91%E9%80%81%E4%B8%A4%E6%AC%A1.png)
有人能告诉我为什么 Postfix 会将每条消息发送两次吗?
我注意到一条消息已正确发送,而另一条消息可能(或可能没有)存在编码问题。
说实话,我对虚拟域、用户等做了一些调整,但我不知道为什么这些配置不起作用。
我有点感觉它与虚拟用户有关,但我也可能错了!
编辑添加了 postconf -n 结果
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = reco-server.mydomain, localhost.mydomain, localhost
myhostname = reco-server.mydomain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
non_smtpd_milters = inet:localhost:8891
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, \ reject_invalid_hostname, reject_unknown_client, \ reject_rbl_client sbl-xbl.spamhaus.org , \ smtpd_sender_restrictions = permit_mynetworks, reject_unknown_address, \ reject_unknown_sender_domain, reject_non_fqdn_sender
smtpd_milters = inet:localhost:8891
smtpd_recipient_limit = 250
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,\ reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_transport = dovecot
virtual_uid_maps = static:5000
还:来自日志:
Nov 12 12:18:16 reco-server postfix/pickup[8660]: 1B404C35A7: uid=33 from=<www-data>
Nov 12 12:18:16 reco-server postfix/cleanup[9388]: 1B404C35A7: message-id=<b3a040c51775e77d08642080424ae61e@localhost>
Nov 12 12:18:16 reco-server postfix/qmgr[7727]: 1B404C35A7: from=<[email protected]>, size=7659, nrcpt=1 (queue active)
Nov 12 12:18:16 reco-server postfix/pickup[8660]: 2978EC35A6: uid=33 from=<www-data>
Nov 12 12:18:16 reco-server postfix/cleanup[9388]: 2978EC35A6: message-id=<125112410529d73e1c2484cf9c991064@localhost>
Nov 12 12:18:16 reco-server postfix/qmgr[7727]: 2978EC35A6: from=<[email protected]>, size=1064, nrcpt=1 (queue active)
Nov 12 12:18:16 reco-server postfix/smtp[9396]: 2978EC35A6: lost connection with mta6.am0.yahoodns.net[98.139.54.60] while receiving the initial server greeting
Nov 12 12:18:20 reco-server postfix/smtp[9396]: 2978EC35A6: to=<[email protected]>, relay=mta6.am0.yahoodns.net[98.136.217.202]:25, delay=4, delays=0.09/0.01/0.92/3, dsn=2.0.0, status=sent (250 ok dirdel)
Nov 12 12:18:20 reco-server postfix/qmgr[7727]: 2978EC35A6: removed
Nov 12 12:18:20 reco-server postfix/smtp[9394]: 1B404C35A7: to=<[email protected]>, relay=mta5.am0.yahoodns.net[98.139.54.60]:25, delay=4.2, delays=0.19/0.01/0.55/3.5, dsn=2.0.0, status=sent (250 ok dirdel)
Nov 12 12:18:20 reco-server postfix/qmgr[7727]: 1B404C35A7: removed
答案1
Nov 12 12:18:16 reco-server postfix/pickup[8660]: 1B404C35A7: uid=33 from=<www-data>
Nov 12 12:18:16 reco-server postfix/pickup[8660]: 2978EC35A6: uid=33 from=<www-data>
两个不同的 Queue-ID 表示向 postfix 提交了两条不同的消息;这是由您的 Web 服务器进程而不是 postfix 引起的。