邮件服务器将发送出去的邮件,但不会收到

我刚刚用Postfix和Dovecot设置了我的第一个邮件服务器。 我可以发送邮件(通过松鼠邮件)罚款,但不能收回。 Pingability告诉我, ConnectException: Connection refused但是我的防火墙没有阻塞端口25。 我怀疑它与我的Postfixconfiguration文件有关:

  smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix myhostname = mail.myserver(i've blanked this out).com mydomain = myserver(i've blanked this out).com myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, $mydomain, unknown_local_recipient_reject_code = 550 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop html_directory = no manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.3.3/samples readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES 

连接拒绝错误意味着该端口closures(没有监听服务)。 您应该确保您的后缀进程正在运行并侦听端口25。

您可以使用:

 sudo netstat -lnp | grep 25 

您应该看到输出中列出的后缀进程。 另外,如果可以访问服务器,则可以查看mail.log文件以获得更好的诊断。

编辑:

后缀进程不应该仅监听本地地址127.0.0.1。 否则,将不能从networking访问。 要检查这个,看看postfixconfiguration为线如:

 inet_interfaces = localhost inet_interfaces = 127.0.0.1