我在我的 Ubuntu 16.04 服务器 ( DigitalOcean ) 上安装了 Postfix,用于我的网站:example.com 我添加了一个 A 记录 mail.example.com 和一个由 mail.example.com 处理的 example.com 的 MX 记录
它正在运行,但是当我检查我的 mail.example.com wu-ith MXToolBox 时,我收到 1 个警告
Result
SMTP Banner Check Reverse DNS does not match SMTP Banner
这是 /etc/postfix/main.cf
/etc/postfix/main.cf
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 = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, example.com, example, 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
inet_protocols = all
home_mailbox = Maildir/
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_rbl_client zen.spamhaus.org reject_rbl_client bl.spamcop.net reject_rbl_client cbl.abuseat.org reject_unknown_client permit
policyd-spf_time_limit = 3600
smtpd_recipient_restrictions =
reject_unauth_destination,
check_policy_service unix:private/policyd-spf
# Milter configuration
# OpenDKIM
milter_default_action = accept
# Postfix ≥ 2.6 milter_protocol = 6, Postfix ≤ 2.5 milter_protocol = 2
milter_protocol = 6
smtpd_milters = local:/opendkim/opendkim.sock
non_smtpd_milters = local:/opendkim/opendkim.sock
错误消息非常简单。横幅与反向 DNS 记录不匹配。您要么必须与您的托管服务提供商更新您的反向记录,要么更新您的横幅以匹配适当的反向记录。
横幅是客户端连接时邮件服务器发送的第一行:
它由配置行给出
$myhostname
替换为为主机配置的主机名,并$mail_name
替换为正在使用的 MTA。但是,您不必使用变量:将工作。
要实际更改反向 DNS,您必须咨询您的提供商服务台。对于 DO,此帮助文章可能会有所帮助。