当我向服务器上的单个用户发送电子邮件时,该用户会毫无问题地收到该电子邮件。但是,当向多个用户发送电子邮件时,电子邮件会消失在黑洞中,任何用户都不会收到。日志不包含任何错误,并表明电子邮件已发送:
Apr 5 13:10:29 email postfix/pipe[31703]: F3A912027D: to=<[email protected]>, relay=spamassassin, delay=1.6, delays=0.12/0/0/1.5, dsn=2.0.0, status=sent (delivered via spamassassin service (X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on email.example.org X-Spam-Level: X-Spam-Stat))
Apr 5 13:10:29 email postfix/pipe[31703]: F3A912027D: to=<[email protected]>, relay=spamassassin, delay=1.6, delays=0.12/0/0/1.5, dsn=2.0.0, status=sent (delivered via spamassassin service (X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on email.example.org X-Spam-Level: X-Spam-Stat))`
但是,当我检查收件人的收件箱时,却找不到该电子邮件。我尝试解除接收/并发限制,但毫无效果。我还有其他服务器,它们的配置与此非常相似,但我没有遇到问题。lmtp 是本地传递代理。
我的postconf:
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 5
home_mailbox = Maildir/
inet_interfaces = all
lmtp_destination_concurrency_limit = 5
lmtp_destination_recipient_limit = 5
local_destination_concurrency_limit = 5
local_destination_recipient_limit = 5
mail_owner = postfix
mailbox_size_limit = 3145728000
mailbox_transport = lmtp:unix:private/dovecot-lmtp
mailq_path = /usr/bin/mailq
message_size_limit = 26214400
milter_default_action = accept
milter_protocol = 6
mydestination = $myhostname localhost.$mydomain localhost $mydomain
mydomain = example.org
myhostname = email.example.org
mynetworks_style = subnet
myorigin = example.org
non_smtpd_milters = $smtpd_milters
policyd-spf_time_limit = 3600
recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc
recipient_delimiter = +
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP
smtpd_milters = unix:/opendkim/opendkim.sock
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_policy_service unix:private/policyd-spf
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = pcre:/etc/postfix/login_maps.pcre
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
smtpd_tls_cert_file = /etc/letsencrypt/live/email.example.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/email.example.org/privkey.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_limit = 26214400
virtual_transport = lmtp:unix:private/dovecot-lmtp
和 doveconf:
# 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 ()
# OS: Linux 4.19.0-14-cloud-amd64 x86_64 Debian 10.9
# Hostname: email.example.org
auth_mechanisms = plain login
auth_username_format = %Ln
disable_plaintext_auth = no
mail_debug = yes
mail_location = maildir:~/Maildir
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/aliases
driver = passwd-file
}
passdb {
driver = pam
}
plugin {
recipient_delimiter = +
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_default = /var/lib/dovecot/sieve/default.sieve
sieve_default_name = Defaults
sieve_global = /var/lib/dovecot/sieve
}
pop3_client_workarounds = outlook-no-nuls
protocols = " imap lmtp sieve pop3 sieve"
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
mode = 0666
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service imap {
client_limit = 1
}
service lmtp {
client_limit = 1
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service pop3-login {
inet_listener pop3s {
port = 995
ssl = yes
}
}
service submission-login {
inet_listener submission {
port = 587
}
}
ssl_cert = </etc/letsencrypt/live/email.example.org/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
protocol lmtp {
mail_plugins = " sieve"
}
答案1
将它添加到 main.cf 对我来说很有帮助:
spamassassin_destination_recipient_limit = 1
请注意,我的 master.cf 中有以下内容:
spamassassin unix - n n - - pipe
user=debian-spamd argv=/usr/bin/spamc -u ${user} -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
该-u ${user}
位可能会使我的配置成为极端情况,因此我的解决方案可能不适合您。