我是邮件服务器管理新手,所以当邮件服务器可以向某些电子邮件(如 gmail、telus 和 shaw)发送邮件,但不能向其他电子邮件地址发送邮件时,我会感到困惑。我猜只是特定的电子邮件地址。以下是邮件日志中的一个例子:
<[email protected]>, relay=mx.dockyardsliving.ca[65.254.254.50]:25, delay=67513, delays=67512/0.01/0.35/0, dsn=4.4.2, status=deferred (lost connection with mx.dockyardsliving.ca[65.254.254.50] while performing the HELO handshake)
这也是我的 main.cf 文件的样子:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file = /etc/ssl/certs/mailserver.pem
smtpd_tls_key_file = /etc/ssl/private/mailserver.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
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, localhost.localdomain, , 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
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_tls_security_level = may
smtpd_tls_auth_only = yes
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
知道为什么我可以向某些邮箱发送邮件,但不能向其他邮箱发送邮件吗?是不是哪里出了问题?
更新
好的,我改变了
myhostname = mail.website.com
并重新启动了 postfix 服务,但我现在无法接收电子邮件,所以我尝试了myhostname = website.com
,但结果还是一样。所以我现在只能回到 localhost。
更新
所以现在它起作用了。检查了日志,电子邮件正在被该位置接受。必须将下面的行添加到 main.cf 中
smtp_helo_name = mail.website.com
谢谢
答案1
一些邮件服务器对于您如何问候他们有非常严格的要求,例如他们可以:
Reject connections where the domain provided at HELO and EHLO has neither an 'A' nor an 'MX' record in DNS
或者
Reject the request when the HELO or EHLO hostname is not in fully-qualified domain or address literal form, as required by the RFC
smtp_helo_名称默认为$我的主机名(在您的 main.cf 中设置为 localhost)因此您可以尝试将其设置为正确的 host.example.com
答案2
远程服务器发出 5?? 问候并关闭连接。
我的电脑进行“telnet 测试”的结果(IP 地址已屏蔽):
telnet mx.dockyardsliving.ca smtp
Trying 65.254.254.51...
Connected to mx.dockyardsliving.ca.
Escape character is '^]'.
554 impinc04.yourhostingaccount.com NO UCE error: R6.1: aaa.bbb.ccc.ddd is on the Spamhaus blacklist. Please visit: http://www.spamhaus.org
Connection closed by foreign host.
亲自在主机上 Telnet smtp 端口以获取主机的原因。