Linux

郵件服務需要每隔幾天重新啟動一次

  • October 16, 2018

我是 postfix 的新手,所以希望有人能指出我這裡的明顯之處,我有一個作為 SMTP 伺服器工作的 Postfix,幾天內一切都很好。然後在沒有警告或明顯原因的情況下,我不能再發送郵件了。

檢查 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 <someone@outside.mail>: Relay access denied; from=<me@domain.url> to=<someone@outside.mail> proto=ESMTP helo=<MyComputerName>

我嘗試重新啟動後綴,但它沒有工作。所以我重新啟動了電腦,並且工作正常。環顧四周,我了解到 SASL 身份驗證守護程序可能是問題所在 - 但仍然必須每隔幾天啟動該服務似乎並不高效。

有沒有人知道我應該從哪裡開始尋找問題/永久解決方案?

**編輯!**根據要求,這是我的 main.cf 文件內容。請注意 EHCP 放置的一些東西,我的控制面板解決方案後綴忽略了未使用的參數警告:

# 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 解決方案,我什至不知道如何檢查,抱歉。

**EDIT2:**重新啟動 saslauthd 服務而不是完全重新啟動也可以 - 我還沒有弄清楚是什麼讓該服務在仍然載入時停止工作(PS在記憶體中顯示它)

想法?

最終我離開saslauthd並開始courier-authdaemon使用

引用自:https://serverfault.com/questions/560966