Postfix 服务不可用错误

Postfix 服务不可用错误

在我的 pflogsumm 报告中,我突然发现有很多邮件被延迟,所以我去检查了我们为某些域转发邮件的服务器,发现服务器的正常运行时间为两天,这意味着它在 2 天前重新启动了。我们购买此 VPS 的公司不会向我们提供任何其他信息来解释为什么会发生这种情况。我检查了 postfix 服务(也重新启动了),但我得到了正常的服务工作状态:

# service postfix status
master (pid 12151) is running...

我尝试通过 telnet 连接到服务器并收到以下错误:

telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 vps244231-1.lcnservers.com ESMTP Postfix
HELO vps244231-1.lcnservers.com
250 vps244231-1.lcnservers.com
MAIL FROM:<[email protected]> <- here i used the real existing email
451 4.7.1 Service unavailable - try again later

我在 Google 上搜索了“服务不可用”错误,但找不到任何合适的解决方案。您知道可能出了什么问题吗?

我的 postconf 如下(我浏览了其他类似的问题,看到有人发布了这个设置,所以我也这样做了):

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 10240000
mydestination = localhost.$mydomain, localhost, localhost.localdomain
myhostname = vps244231-1.lcnservers.com
mynetworks = 127.0.0.0/8 [::1]/128 178.18.125.195/32 178.18.125.238/32 31.222.191.39/32
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:12768
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.8.4/README_FILES
sample_directory = /usr/share/doc/postfix-2.8.4/samples
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_send_xforward_command = yes
smtp_tls_security_level = none
smtp_use_tls = no
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_client_restrictions = permit_mynetworks
smtpd_milters = inet:localhost:12768
smtpd_proxy_timeout = 3600s
smtpd_recipient_restrictions = permit_mynetworks, check_client_access pcre:/var/spool/postfix/plesk/no_relay.re, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, check_client_access pcre:/var/spool/postfix/plesk/non_auth.re
smtpd_timeout = 3600s
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
transport_maps = hash:/var/spool/postfix/plesk/transport, hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_gid_maps = static:31
virtual_mailbox_base = /var/qmail/mailnames
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual
virtual_uid_maps = static:110

如果我可以添加更多信息来帮助您帮助我,请告诉我(显然我不擅长服务器部分,所以如果我犯了一些错误,请原谅我)。我必须强调,这个邮件服务器运行良好,我想至少 6 个月了。

编辑:我再次重启了服务器,现在邮件可以正常发送了,这当然是好事,但我不知道为什么会发生这种情况。不过,奇怪的是,尽管我的syslog守护进程正在运行,并且空间未被占用,但我仍然看不到任何日志/var/log/maillog

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              50G  2.4G   48G   5% /
none                  1.0G  4.0K  1.0G   1% /dev
/dev/vzfs              50G  2.4G   48G   5% /var/named/run-root/var/run/dbus

# service syslog status
syslogd (pid  4085) is running...
# cat /var/log/maillog
#

答案1

451 4.7.1 Service unavailable - try again later 连接后表明队列存在问题 - 很可能是 Postfix 无法写入队列文件,因此被迫暂时拒绝您的消息。

正如丹尼斯所说,检查 /var/ 分区上的可用性和可用空间 - 这包含 postfix 队列和日志文件。

另一种可能性是它smtpd_milters = inet:localhost:12768没有运行 - 但这并不能解释为什么没有日志。

答案2

只需检查/var/log/syslog

就我而言,这是安全问题:

Jan 11 17:57:34 konkib opendkim[2375]: mail._domainkey.mydomain.com: key data is not secure: /etc/postfix/dkim/mail.private is in group 110 which has multiple users (e.g., "remotebkp")
Jan 11 17:57:34 konkib opendkim[2375]: 24B2112081D: error loading key 'mail._domainkey.mydomain.com' Jan 11 17:57:34 konkib postfix/cleanup[17011]: 24B2112081D: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<[email protected]> to=<[email protected]>

编辑后就可以工作了/etc/groups

相关内容