邮件服务需要每隔几天重启一次

邮件服务需要每隔几天重启一次

我对 Postfix 还不太熟悉,所以希望有人能告诉我一些显而易见的事情。我有一个 Postfix 作为 SMTP 服务器,几天内一切都正常。然后没有任何警告或明显原因,我就无法再发送邮件了。

检查 mail.log 文件看到:

warning: xxx-xxx-xxx-xxx.isp.domain.my[xxx.xxx.xxx.xxx]: SASL login authentication failed: authentication failure
NOQUEUE: reject: RCPT from xxx-xxx-xxx-xxx.isp.domain.my[xxx.xxx.xxx.xxx]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<MyComputerName>

我尝试重新启动 postfix,但没有成功。所以我重新启动了电脑,然后就成功了。读了些资料后,我意识到 SASL 身份验证守护进程可能是问题所在 - 但每隔几天就必须启动该服务似乎没有什么用。

有人知道我应该从哪里开始寻找问题/永久解决方案吗?

编辑!根据要求,这是我的 main.cf 文件内容。请注意 EHCP 放置的一些内容,这是我的控制面板解决方案,postfix 会忽略它并发出未使用的参数警告:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name powered by Easy Hosting Control Panel (ehcp) on Ubuntu, www.ehcp.net
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = m21-traducoes.com.pt
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, 89.152.248.139
relayhost = 
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = 
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains = 
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtp_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
debug_peer_list = 
sender_canonical_maps = 
debug_peer_level = 1
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $mynetworks $virtual_mailbox_limit_maps $transport_maps
inet_protocols = all
mynetworks = 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/16, 10.0.0.0/8,  89.152.248.0/24

#smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated,check_client_access hash:/var/lib/pop-before-smtp/hosts,reject_unauth_destinations
smtpd_destination_concurrency_limit = 2
smtpd_destination_rate_delay = 1s
smtpd_extra_recipient_limit = 10
disable_vrfy_command = yes
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20
#smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_authenticated

至于我正在使用的 SASL 解决方案,我甚至不知道如何检查,抱歉。

编辑2:重新启动 saslauthd 服务而不是完全重启也是可行的 - 我还没弄清楚是什么导致该服务在仍然加载时停止工作(PS 在内存中显示它)

有想法吗?

答案1

最终我放弃了saslauthd并开始使用courier-authdaemon

相关内容