Postfixconfiguration

我试图在我的Ubuntu服务器上设置一个简单的邮件服务,但是我正在最困难的时间正确设置它。

我已经按照Ubuntu的Postfix指南中的步骤,但我仍然遇到麻烦。

这是我的testing用例。

看到这个,我自动认为我的MXlogging设置不正确。 但我并不认为是这样,因为我曾谘询过其他人士和例子,似乎是正确的。 是的,我已经等了至less24小时之间的冲洗DNSlogging的变化。

我不知道该怎么做,任何指导或疑难解答指南,将不胜感激。

谢谢,

– 编辑5/5/2013 8:34 PM

在命令打开SMTP之前,我已经删除了所有其他端口。 我不知道iptable命令的顺序很重要

Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:http-alt DROP all -- anywhere anywhere *ACCEPT tcp -- anywhere anywhere tcp dpt:smtp* Chain FORWARD (policy DROP) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination 

以下是我会尝试的故障排除步骤:

  1. 检查提示的日志。
  2. 在邮件服务器上以root身份执行“netstat -lvtn”,查看后缀进程是否连接到端口25。
  3. 从本地服务器:“telnet localhost 25”validation几秒钟后得到250回复。
  4. 从Internet上其他地方的远程服务器和/或同一networking上的远程服务器:“telnet myserver.com 25”查找相同的结果
  5. 如果任何一个步骤失败的东西阻塞端口,或后缀失败。

很可能是您的本地防火墙阻止了端口25,或者您的Internet提供商正在这样做。

/etc/postfix/main.cf ,检查mydestination ,它应该如下所示

 mydestination = myServer.com, localhost.localdomain, localhost 

myServer.com (你的真实域)必须在那里。 如果没有,编辑该行并重新启动后缀。

如果不是这样,请在您的问题中发布/etc/postfix/main.cf/etc/postfix/master.cf

你有多less个MXlogging?他们的优先级是多less? 你可以在这里发表。

如果您收到“收件人服务器不接受我们的请求连接”,这意味着谷歌邮件无法连接到您的邮件服务器或它连接到错误的邮件服务器,它没有连接到您的后缀服务器。

你有没有尝试“telnet xxxx 25”其中xxxx是postfix服务器的公共IP?

在/etc/postfix/manin.cf中,检查smtpd_client_restrictions也许你只接受本地连接。

默认是允许所有的连接请求。