Postfix

我怎樣才能讓收到的郵件再次正常工作?

  • July 2, 2019

我們正在使用 webmin 和 virtualmin 電子郵件在過去幾週使用 virtualmin 一直執行良好,但今天突然它們停止了。我在我的郵件日誌中得到這個:

Jul 1 13:15:03 server1 postfix/pickup[18805]: 4A7276E093D: uid=0 from=
Jul 1 13:15:03 server1 postfix/cleanup[19038]: 4A7276E093D: message-id=20190701131503.4A7276E093D@server1.domain.uk 
Jul 1 13:15:03 server1 postfix/qmgr[18806]: 4A7276E093D: from=<root@server1>, size=2851, nrcpt=1 (queue active) 
Jul 1 13:15:03 server1 postfix/smtp[19040]: 4A7276E093D: to=<root@server1>, orig_to=, relay=none, delay=0.13, delays=0.08/0.05/0.01/0, dsn=5.4.6, status=bounced (mail for server1 loops back to myself) 
Jul 1 13:15:03 server1 postfix/cleanup[19038]: 6B56D6E0945: message-id=20190701131503.6B56D6E0945@server1.domain.uk Jul 1 13:15:03 server1 postfix/bounce[19041]: 4A7276E093D: sender non-delivery notification: 6B56D6E0945 
Jul 1 13:15:03 server1 postfix/qmgr[18806]: 6B56D6E0945: from=<>, size=4774, nrcpt=1 (queue active) 
Jul 1 13:15:03 server1 postfix/qmgr[18806]: 4A7276E093D: removed Jul 1 13:15:03 server1 postfix/smtp[19040]: 6B56D6E0945: to=<root@server1>, relay=none, delay=0.02, delays=0.01/0.01/0.01/0, dsn=5.4.6, status=bounced (mail for server1 loops back to myself) 
Jul 1 13:15:03 server1 postfix/qmgr[18806]: 6B56D6E0945: removed

main.cf 如下:

# 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 (Ubuntu)
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 = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = server1.domain.uk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, server1.domain.uk, localhost.domain.uk, monster-it.uk , localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = dane
allow_percent_hack = no
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_tls_security_level = may
milter_default_action = accept
milter_protocol = 2

如果有人能對此有所了解,那就太好了。當我探勘 mx 記錄時,我確實得到了正確的響應。

問題是您有一個或多個程序試圖僅使用裸主機名發送電子郵件,而沒有域名 - root@server1.

裸主機名不包含在配置中。要解決此問題,請添加server1到該mydestination行。

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