在我的 pflogsumm 报告中,我突然注意到很多延迟的邮件,所以我去检查我们为某些域中继邮件的服务器,发现服务器的正常运行时间是两天,这意味着它在 2 天前重新启动。我们购买此 VPS 的公司不会向我们提供任何其他信息来说明发生这种情况的原因。我检查了 postfix 服务(也重新启动了),但我得到了正常的服务工作状态:
# service postfix status
master (pid 12151) is running...
我试图远程登录到服务器并收到此错误:
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
我在谷歌上搜索了“服务不可用”错误,但找不到任何合适的解决方案。你有什么想法可能是错误的吗?
我的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
#
451 4.7.1 Service unavailable - try again later
连接后表明队列有问题 - 很可能 postfix 无法写入队列文件,因此被迫临时拒绝您的消息。正如丹尼斯所说,检查您的 /var/ 分区上的可用性和可用空间 - 这包含后缀队列和日志文件。
另一种可能性是
smtpd_milters = inet:localhost:12768
没有运行 - 但这不能解释没有日志的原因。只需检查
/var/log/syslog
就我而言,这是安全问题:
它在编辑后工作
/etc/groups
。