我使用下面的教程来设置数字海洋服务器上的postfix和dovecot。 但是,当postfix / smtp尝试将邮件发送到远程主机,如Gmail或雅虎时,我得到“连接超时”。
https://www.digitalocean.com/community/articles/how-to-set-up-a-postfix-e-mail-server-with-dovecot
接收一个新的消息/var/log/mail.log
2月2日22:33:38 localhost dovecot:auth-worker:debugging:从目录加载模块:/ usr / lib / dovecot / modules / auth
Feb 2 22:33:38 localhost dovecot:auth-worker:Debug:pam(app,189.63.49.XXX):lookup service = dovecot
Feb 2 22:33:38 localhost dovecot:auth-worker:Debug:pam(app,189.63.49.XXX):#1/1 style = 1 msg = Password:
Feb 2 22:33:38 localhost dovecot:auth:Debug:client out:OK#0111#011user = app
Feb 2 22:33:40 localhost postfix / submission / smtpd [1045]:E9AA724264:client = unknown [189.63.49.XXX],sasl_method = PLAIN,sasl_username = app
Feb 2 22:33:43 localhost postfix / cleanup [1052]:E9AA724264:message-id =
Feb 2 22:33:43 localhost postfix / qmgr [32661]:E9AA724264:from =,size = 485,nrcpt = 1(队列激活)
Feb 2 22:33:45 localhost postfix / submission / smtpd [1045]:disconnect from unknown [189.63.49.XXX]
Feb 2 22:34:14 localhost postfix / smtp [1053]:连接到mta5.am0.yahoodns.net [98.136.216.25]:25:连接超时
Feb 2 22:24:21 localhost postfix / smtp [1013]:连接到mta6.am0.yahoodns.net [98.136.217.202]:25:连接超时
Feb 2 22:24:21 localhost postfix / smtp [1014]:连接到gmail-smtp-in.l.google.com [173.194.76.27]:25:连接超时
Feb 2 22:24:21 localhost postfix / smtp [1015]:连接到gmail-smtp-in.l.google.com [173.194.76.27]:25:连接超时
Feb 2 22:24:21 localhost postfix / smtp [1012]:连接到aspmx.l.google.com [173.194.68.27]:25:连接超时
这里是/etc/postfix/main.cf http://pastebin.com/nHQhh8Bp
/etc/postfix/master.cf http://pastebin.com/nnJBP9mh
来自#> netstat -nlptu http://pastebin.com/PKJX6xC1的结果
所有数字海洋用户默认阻止端口25上的发送SMTP。 如果您想解除封锁,您需要联系他们。
在/etc/resolv.conf检查你的域名服务器,试试Google的8.8.8.8:
sudo vi /etc/resolv.conf
更改名称服务器IP:
nameserver 8.8.8.8
然后重新启动后缀:
sudo /etc/init.d/postfix restart