谁能告诉我 Postfix 发出这个错误的原因是什么?
Feb 9 13:08:59 hostname postfix/postfix-script[23077]: starting the Postfix mail system
Feb 9 13:08:59 hostname postfix/master[23079]: daemon started -- version 2.10.1, configuration /etc/postfix
Feb 9 13:11:32 hostname postfix/smtpd[23180]: warning: connect #1 to subsystem private/proxymap: Connection refused
Feb 9 13:11:42 hostname postfix/smtpd[23180]: warning: connect #2 to subsystem private/proxymap: Connection refused
Feb 9 13:11:52 hostname postfix/smtpd[23180]: warning: connect #3 to subsystem private/proxymap: Connection refused
Feb 9 13:12:02 hostname postfix/smtpd[23180]: warning: connect #4 to subsystem private/proxymap: Connection refused
Feb 9 13:12:12 hostname postfix/smtpd[23180]: warning: connect #5 to subsystem private/proxymap: Connection refused
Feb 9 13:12:22 hostname postfix/smtpd[23180]: warning: connect #6 to subsystem private/proxymap: Connection refused
Feb 9 13:12:25 hostname clamd[1636]: SelfCheck: Database status OK.
Feb 9 13:12:32 hostname postfix/smtpd[23180]: warning: connect #7 to subsystem private/proxymap: Connection refused
Feb 9 13:12:42 hostname postfix/smtpd[23180]: warning: connect #8 to subsystem private/proxymap: Connection refused
Feb 9 13:12:52 hostname postfix/smtpd[23180]: warning: connect #9 to subsystem private/proxymap: Connection refused
Feb 9 13:13:02 hostname postfix/smtpd[23180]: warning: connect #10 to subsystem private/proxymap: Connection refused
Feb 9 13:13:12 hostname postfix/smtpd[23180]: fatal: connect #11 to subsystem private/proxymap: Connection refused
Feb 9 13:13:13 hostname postfix/master[23079]: warning: process /usr/libexec/postfix/smtpd pid 23180 exit status 1
Feb 9 13:13:13 hostname postfix/master[23079]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
当我使用 postfixadmin 创建新虚拟用户时,就会发生这种情况。创建成功,但 postfixadmin 一直在加载而没有响应,直到我取消,然后才意识到用户已创建。postfix check 没有给我任何输出和 postconf -n :
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
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
home_mailbox = Maildir/
html_directory = no
inet_interfaces = localhost
inet_protocols = all
local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/private/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_loglevel = 1
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_mailbox_domains.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000
这是 postconf -M
dovecot unix - n n - - pipe flags=DROhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter= -o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes= -o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
smtp inet n - n - - smtpd
submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
proxymap unix - - n - - proxymap
relay unix - - n - - smtp
flush unix - - n 1000? 0 flush
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
我是否应该假设它是与这里相同的问题? postfix/dovecot/mysql 无法发送/接收电子邮件
我也收到这个 dovecot 错误:auth-worker(1560): 错误: mysql(localhost): 连接数据库失败(postfix_db): 拒绝用户“postfix”@“localhost”访问(使用密码:是),我刚才用 telnet 测试 imap 时意识到了这一点,并尝试使用已经创建的用户(有或没有域)登录,这可能有关系吗?
答案1
的输出postconf -M
将告诉您 的有效条目master.cf
。据此,您似乎缺少代理映射条目。将此行放在master.cf
proxymap unix - - n - - proxymap
代理映射服务因为您已在 main.cf 中设置了启用代理选项,所以 postfix 需要这些配置。这些配置是virtual_alias_maps
、virtual_mailbox_domains
和virtual_mailbox_maps
。
答案2
由于一个奇怪的原因,@masegaloeh 的答案对我不起作用,而当我使用这个答案试图解决另一个错误时,它就解决了。所以我不会说这是正确的答案,但我还是把它留下来,以防万一有人解决类似的问题。
我只需在我的 /etc/postfix/master.cf 文件中添加此行,因为我遇到了这样的 smtpd 错误:“subsystem public/cleanup:连接被拒绝”,然后两个错误都消失了。
cleanup unix n - n - 0 cleanup
答案3
我遇到了同样的subsystem public/cleanup: Connection refused
问题,但当我查看文件时/etc/postfix/master.cf
,提到的行已经存在。所以对我来说,解决方案是简单地重新启动 postfix:
service postfix restart
之后,我收到了所有之前没有发送的电子邮件......而且很多。