Postfix-未找到主机或域

Postfix-未找到主机或域

我在我的 centos 上安装了 postfix。这是postconf -n输出:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 52428800
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = [smtp.gmail.com]:587
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
smtpd_tls_dh1024_param_file = /etc/postfix/dhparams.pem
unknown_local_recipient_reject_code = 550

当我尝试使用日志发送邮件时显示:mail [email protected]

Dec 23 10:47:16 server_name postfix/smtp[20604]: *: to=<[email protected]>, relay=none, delay=10, delays=0.02/0.03/10/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=smtp.gmail.com type=A: Host not found, try again)

有什么问题?

答案1

Name service error for name=smtp.gmail.com type=A: Host not found, try again

该服务器上的 DNS 解析出现问题。修复 DNS 解析,解决问题!

要检查的一些事项:

  • 运行dig smtp.gmail.com并看看会发生什么。
  • 运行dig @8.8.8.8 smtp.gmail.com并看看会发生什么。
  • 查看名称服务器是否存在resolv.conf

相关内容