从 posftix 发送测试电子邮件失败

从 posftix 发送测试电子邮件失败

我正在尝试设置 posftix 通过内部交换服务器发送电子邮件。

我的主.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 = yes

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

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = myserver.mydomain.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, axpenet.local, ubuntu, localhost.localdomain, localhost
relayhost = [smtp.mydomain.com]
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  172.26.2.0/16  172.26.0.0/16
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
#transport_maps = hash:/etc/postfix/
default_transport = smtp

smtp_generic_maps = hash:/etc/postfix/generic
# enable SASL authentication
smtp_sasl_auth_enable = no
# disallow methods that allow anonymous authentication.
smtp_sasl_security_options = noanonymous
# where to find sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
# Enable STARTTLS encryption
smtp_use_tls = yes
# where to find CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

    disable_dns_lookups = yes


    You have new mail in /var/mail/root
    root@ubuntu:/etc/postfix#

我的 var/log/mail.log..

Nov 12 16:58:34 ubuntu postfix/qmgr[4135]: 942FE46F: removed
Nov 12 17:02:44 ubuntu postfix[17390]: Postfix is running with backwards-compatible default settings
Nov 12 17:02:44 ubuntu postfix[17390]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Nov 12 17:02:44 ubuntu postfix[17390]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Nov 12 17:02:44 ubuntu postfix/master[4133]: terminating on signal 15
Nov 12 17:02:44 ubuntu postfix[17482]: Postfix is running with backwards-compatible default settings
Nov 12 17:02:44 ubuntu postfix[17482]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Nov 12 17:02:44 ubuntu postfix[17482]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Nov 12 17:02:44 ubuntu postfix/master[17519]: daemon started -- version 3.1.0, configuration /etc/postfix
Nov 12 17:02:50 ubuntu postfix/pickup[17520]: 6862246E: uid=0 from=<root@ubuntu>
Nov 12 17:02:50 ubuntu postfix/cleanup[17528]: 6862246E: message-id=<[email protected]>
Nov 12 17:02:50 ubuntu postfix/qmgr[17521]: 6862246E: from=<[email protected]>, size=370, nrcpt=1 (queue active)
Nov 12 17:02:56 ubuntu postfix/smtp[17530]: 6862246E: to=<[email protected]>, relay=smtp.mydomain.com[172.26.0.77]:25, delay=5.6, delays=0.02/0.03/0.15/5.4, dsn=5.7.1, status=bounced (host smtp.mydomain.com[172.26.0.77] said: 550 5.7.1 Sender ID (PRA) Domain Does Not Exist (in reply to end of DATA command))
Nov 12 17:02:56 ubuntu postfix/cleanup[17528]: 0736746F: message-id=<[email protected]>
Nov 12 17:02:56 ubuntu postfix/qmgr[17521]: 0736746F: from=<>, size=2368, nrcpt=1 (queue active)
Nov 12 17:02:56 ubuntu postfix/bounce[17533]: 6862246E: sender non-delivery notification: 0736746F
Nov 12 17:02:56 ubuntu postfix/qmgr[17521]: 6862246E: removed
Nov 12 17:02:56 ubuntu postfix/local[17534]: 0736746F: to=<[email protected]>, relay=local, delay=0.03, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Nov 12 17:02:56 ubuntu postfix/qmgr[17521]: 0736746F: removed
Nov 12 17:08:05 ubuntu postfix/pickup[17520]: 9979546E: uid=0 from=<root@ubuntu>
Nov 12 17:08:05 ubuntu postfix/cleanup[17756]: 9979546E: message-id=<[email protected]>
Nov 12 17:08:05 ubuntu postfix/qmgr[17521]: 9979546E: from=<[email protected]>, size=370, nrcpt=1 (queue active)
Nov 12 17:08:10 ubuntu postfix/smtp[17758]: 9979546E: to=<[email protected]>, relay=smtp.mydomain.com[172.26.0.77]:25, delay=5.4, delays=0.03/0.03/0.14/5.2, dsn=5.7.1, status=bounced (host smtp.mydomain.com[172.26.0.77] said: 550 5.7.1 Sender ID (PRA) Domain Does Not Exist (in reply to end of DATA command))
Nov 12 17:08:11 ubuntu postfix/cleanup[17756]: F3C7C46F: message-id=<[email protected]>
Nov 12 17:08:11 ubuntu postfix/qmgr[17521]: F3C7C46F: from=<>, size=2368, nrcpt=1 (queue active)
Nov 12 17:08:11 ubuntu postfix/bounce[17760]: 9979546E: sender non-delivery notification: F3C7C46F
Nov 12 17:08:11 ubuntu postfix/qmgr[17521]: 9979546E: removed
Nov 12 17:08:11 ubuntu postfix/local[17761]: F3C7C46F: to=<[email protected]>, relay=local, delay=0.03, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Nov 12 17:08:11 ubuntu postfix/qmgr[17521]: F3C7C46F: removed
root@ubuntu:/etc/postfix#

does anyone know where to look..

答案1

您是否希望使用内部交换作为发送电子邮件的中继?如果是,这里有一个类似的案件供您参考。在这种情况下,他们在 mydestination 行中列出了他们的域名,并对其进行了修复。

相关内容