我有 Windows 7 本地机器和 virtualbox Ubuntu 虚拟机。我已经在其上安装了 Postfix 并对其进行了配置,但是当我尝试发送测试邮件时出现以下错误(在 var/log/mail.log 文件中):
警告:中继主机配置问题
6027284D93:[电子邮件受保护],relay=none,delay=54797,delays=54797/0.22/0.06/0,dsn=4.3.5,status=deferred(未找到主机或域名。名称=testubu.com类型=AAAA的名称服务错误:主机未找到)
我的 postfix main.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 = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# 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 = mail.testubu.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydomain=testubu.com
myorigin = $mydomain
mydestination = $myhostname, testubu.com, smtp-VirtualBox, 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 = ipv4
mail_spool_directory = /var/spool/mail
#proxy_interfaces =
testubu.com 不是真实域名
后缀检查
后缀状态没有错误
我评论了relayhost并且“警告:relayhost配置问题”已解决,但我无法发送邮件。现在在我的 /var/log/myl.log 文件中:
> connect to rilf-cz.mail.protection.outlook.com[213.199.154.202]:25:
> Connection timed out
当我在终端尝试这个时:
跟踪路由 -p 25 rilf-cz.mail.protection.outlook.com
我得到以下信息:
traceroute to rilf-cz.mail.protection.outlook.com (213.199.154.202), 64 hops max
1 10.0.2.2 0,206ms 0,149ms 0,149ms
2 10.0.2.2 4,566ms 4,498ms 2,496ms
看起来,虚拟机中什么也没发生。我禁用了所有防火墙,更改了网桥的 NAT。现在traceroute看起来好多了,但问题仍然存在。
connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection timed out
我该如何解决这个问题?