Postfix 已停止所有转发

Postfix 已停止所有转发

由于,呃,未知的热情,我们的 postfix 配置可能被破坏了某处,不知道到底发生了什么(这本身就是一个问题。。):所有电子邮件转发都已停止(不virtual_alias_maps,甚至.forward文件也停止工作)。postmap似乎表明检索不是问题:

postmap -q "[email protected]" proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf
[email protected]

启用通用查询日志后,我甚至可以看到(正确的)查询正在实时服务器上寻找转发目的地。现在,我们有几个域,配置了virtual_mailbox_domains& virtual_mailbox_maps(正在运行)。但是,我们用过的使用virtual_alias_maps来转发邮件,例如[email protected][email protected][email protected]现在已损坏。这些帐户始终具有“本地”配置,但现在仅使用“”到达其本地邮件目录,并且根据日志,postfix 甚至不会尝试/知道转发它们。

sendmail -bv [email protected]只是给出:

<[email protected]>: delivery via virtual: delivers to maildir

postconf -n,所有 mysql 映射都经过单独测试并可工作,正确的 sql 查询显示在我们的日志中:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no 
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_time_limit = 100s
config_directory = /etc/postfix
daemon_timeout = 180s
default_process_limit = 200
forward_path = /home/vmail/${domain}/${user}/.forward${recipient_delimiter}${extension},/home/vmail/${domain}/${user}/.forward,${home}/.forward${recipient_delimit
er}${extension},${home}/.forward
helpful_warnings = yes
html_directory = /usr/share/doc/postfix/html
initial_destination_concurrency = 2
ipc_idle = 30s
ipc_timeout = 60s
local_destination_concurrency_limit = 2000
mailbox_command = procmail -a $EXTENSION
mailbox_size_limit = 0
message_size_limit = 33554432
minimal_backoff_time = 60s
mydestination = examplemx.example.com, localhost, localhost.localdomain, m1.example.com, m2.example.com, mainmx.example.com
myhostname = examplemx.example.com
mynetworks = 127.0.0.0/8 192.168.20.0/24 10.20.0.0/16
myorigin = /etc/mailname
propagate_unmatched_extensions = canonical, virtual, alias, forward
queue_run_delay = 180s
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
smtp_data_done_timeout = 60s
smtp_data_init_timeout = 12s
smtp_data_xfer_timeout = 18s
smtp_helo_timeout = 30s
smtp_mail_timeout = 30s
smtp_quit_timeout = 30s
smtp_rcpt_timeout = 30s
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/examplemx-cert.pem
smtp_tls_key_file = /etc/postfix/examplemx-key.pem
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_error_sleep_time = 0
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/blacklist, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/examplemx-cert.pem
smtpd_tls_key_file = /etc/postfix/examplemx-key.pem
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = mysql:/etc/postfix/mysql-virtual_transports.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains = 
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000

值得注意的是是virtual_alias_domains空的(这些已经在了virtual_mailbox_domains,而且据我们糟糕的备份告诉我们……一直都是这样)。

为了解决这个问题,我创建了一个平面的 /etc/postfix/virtual 文件并使用了postmap,它显示了相同的症状(没有错误,但没有转发),然后我甚至尝试.forward 在 maildirs 中使用那些好用的文件,但即使这些文件似乎也不起作用。如果所有转发都不存在,或者在给定的 postconf 中有什么突出的地方,那么进一步的常见嫌疑是什么?

答案1

噗,找到了,我们正在使用amavisclamav扫描邮件,由于中的错误clamavamavis在发送时遇到了问题,修复了其中的错误,重新启动了clamav-daemon& amavis,一切又恢复正常了。这个故事的寓意是:确保使用哪种传输方式将邮件发送到邮件目录。

相关内容