Postfix:如何解决无效域名

Postfix:如何解决无效域名

在 ubuntu 14.04 中我安装了 postfix 并且我希望它作为“仅发送电子邮件”。

我有以下 postfix 配置文件(main.cf)(为了保护隐私,我将真实域更改为 mydomainname):

# See /usr/share/postfix/main.cf.dist for a commented, more complete version 
#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

# 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 = mydomainname.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = ubuntu, localhost.localdomain, , localhost

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = localhost
inet_protocols = ipv4

现在,如果我尝试向 Gmail 帐户发送一封测试电子邮件(从命令行),则该电子邮件会被正确接收。

相反,如果我尝试将电子邮件发送到另一个电子邮件帐户,我会收到以下错误:

mydomainname postfix/qmgr[1338]: 0F4462BD2A: removed
mydomainname postfix/pickup[1337]: 35F632BD2A: uid=1000 from= <[email protected]>
mydomainname postfix/cleanup[3275]: 35F632BD2A: message-id=<[email protected]>
mydomainname postfix/qmgr[1338]: 35F632BD2A: from=<[email protected]>, size=350, nrcpt=1 (queue active)
mydomainname postfix/smtp[3277]: 35F632BD2A: to=<[email protected]>, relay=mx.alpha-si.com[62.149.128.166]:25, delay=0.54, delays=0.01/0/0.12/0.4, dsn=5.1.0, status=bounced (host mx.alpha-si.com[62.149.128.166] said: 550 5.1.0 lNst1t01g3nh0tZ01NstKv dominio non valido / invalid domain (in reply to MAIL FROM command))
mydomainname postfix/cleanup[3275]: B90BC2BD48: message-id=<[email protected]>
mydomainname postfix/qmgr[1338]: B90BC2BD48: from=<>, size=2271, nrcpt=1 (queue active)
mydomainname postfix/bounce[3278]: 35F632BD2A: sender non-delivery notification: B90BC2BD48

有什么问题?我怎样才能向所有域发送电子邮件?

相关内容