Postfix 发送邮件但不接收邮件

Postfix 发送邮件但不接收邮件

我有一个发送但不接收邮件的 Postfix 服务器,这是配置:

# 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

# 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.

myhostname = cheesecakebb.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = cheese-ubuntu, localhost.localdomain, localhost cheesecakebb.org
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 100000
recipient_delimiter = +
inet_interfaces = all
default_transport = smtp
relay_transport = smtp
inet_protocols = all
myorigin = /etc/mailname
relayhost = 

错误日志:

May  4 08:00:34 cheese-ubuntu postfix/pickup[18114]: 80C2660649: uid=0 from=<root>
May  4 08:00:34 cheese-ubuntu postfix/cleanup[19043]: 80C2660649: message-id=<20140504120034.80C2660649@cheese-ubuntu>
May  4 08:00:34 cheese-ubuntu postfix/qmgr[1418]: 80C2660649: from=<root@cheese-ubuntu>, size=462, nrcpt=1 (queue active)
May  4 08:00:34 cheese-ubuntu postfix/local[19045]: 80C2660649: to=<root@cheese-ubuntu>, orig_to=<root>, relay=local, delay=0.11, delays=0.09/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
May  4 08:00:34 cheese-ubuntu postfix/qmgr[1418]: 80C2660649: removed
May  8 17:30:15 cheese-ubuntu postfix/master[1205]: daemon started -- version 2.9.6, configuration /etc/postfix
May  8 17:33:40 cheese-ubuntu postfix/master[1205]: reload -- version 2.9.6, configuration /etc/postfix
May  8 17:33:40 cheese-ubuntu postfix/master[1205]: reload -- version 2.9.6, configuration /etc/postfix
May  8 17:35:12 cheese-ubuntu postfix/master[1205]: reload -- version 2.9.6, configuration /etc/postfix
May  8 17:35:45 cheese-ubuntu postfix/master[1205]: reload -- version 2.9.6, configuration /etc/postfix
May  9 02:38:41 cheese-ubuntu postfix/master[1205]: reload -- version 2.9.6, configuration /etc/postfix
May  9 02:38:41 cheese-ubuntu postfix/master[1205]: reload -- version 2.9.6, configuration /etc/postfix
May  9 10:24:39 cheese-ubuntu postfix/master[1228]: daemon started -- version 2.9.6, configuration /etc/postfix
May  9 10:28:06 cheese-ubuntu postfix/master[1228]: reload -- version 2.9.6, configuration /etc/postfix
May  9 10:28:06 cheese-ubuntu postfix/master[1228]: reload -- version 2.9.6, configuration /etc/postfix
May 10 01:54:52 cheese-ubuntu postfix/pickup[21395]: 55DA260665: uid=0 from=<gage@cheese-ubuntu>
May 10 01:54:52 cheese-ubuntu postfix/cleanup[25864]: 55DA260665: message-id=<1399701292.25794@cheese-ubuntu>
May 10 01:54:52 cheese-ubuntu postfix/qmgr[2582]: 55DA260665: from=<gage@cheese-ubuntu>, size=576, nrcpt=1 (queue active)
May 10 01:54:52 cheese-ubuntu postfix/error[25870]: 55DA260665: to=<[email protected]>, relay=none, delay=0.13, delays=0.1/0/0/0.03, dsn=5.0.0, status=bounced (gmaiil.com)
May 10 01:54:52 cheese-ubuntu postfix/cleanup[25864]: 71F3B60694: message-id=<20140510055452.71F3B60694@cheese-ubuntu>
May 10 01:54:52 cheese-ubuntu postfix/bounce[25871]: 55DA260665: sender non-delivery notification: 71F3B60694
May 10 01:54:52 cheese-ubuntu postfix/qmgr[2582]: 71F3B60694: from=<>, size=2243, nrcpt=1 (queue active)
May 10 01:54:52 cheese-ubuntu postfix/local[25872]: 71F3B60694: to=<gage@cheese-ubuntu>, relay=local, delay=0.11, delays=0.05/0.05/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 10 01:54:52 cheese-ubuntu postfix/qmgr[2582]: 55DA260665: removed
May 10 01:54:52 cheese-ubuntu postfix/qmgr[2582]: 71F3B60694: removed
May 10 01:55:48 cheese-ubuntu postfix/pickup[21395]: 3278E60665: uid=0 from=<gage@cheese-ubuntu>
May 10 01:55:48 cheese-ubuntu postfix/cleanup[25864]: 3278E60665: message-id=<1399701348.26042@cheese-ubuntu>
May 10 01:55:48 cheese-ubuntu postfix/qmgr[2582]: 3278E60665: from=<gage@cheese-ubuntu>, size=576, nrcpt=1 (queue active)
May 10 01:55:48 cheese-ubuntu postfix/error[25870]: 3278E60665: to=<[email protected]>, relay=none, delay=0.09, delays=0.07/0/0/0.02, dsn=5.0.0, status=bounced (gmail.com)
May 10 01:55:48 cheese-ubuntu postfix/cleanup[25864]: 45C826070D: message-id=<20140510055548.45C826070D@cheese-ubuntu>
May 10 01:55:48 cheese-ubuntu postfix/bounce[25871]: 3278E60665: sender non-delivery notification: 45C826070D
May 10 01:55:48 cheese-ubuntu postfix/qmgr[2582]: 45C826070D: from=<>, size=2239, nrcpt=1 (queue active)
May 10 01:55:48 cheese-ubuntu postfix/local[25872]: 45C826070D: to=<gage@cheese-ubuntu>, relay=local, delay=0.07, delays=0.05/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
May 10 01:55:48 cheese-ubuntu postfix/qmgr[2582]: 3278E60665: removed
May 10 01:55:48 cheese-ubuntu postfix/qmgr[2582]: 45C826070D: removed
May 10 01:56:32 cheese-ubuntu postfix/pickup[21395]: 0934560665: uid=0 from=<gage@cheese-ubuntu>
May 10 01:56:32 cheese-ubuntu postfix/cleanup[25864]: 0934560665: message-id=<1399701391.26183@cheese-ubuntu>
May 10 01:56:32 cheese-ubuntu postfix/qmgr[2582]: 0934560665: from=<gage@cheese-ubuntu>, size=579, nrcpt=1 (queue active)

以上是错误日志,但是,由于我对 Linux 的 Postfix 部分还不熟悉,所以它对我来说没有多大意义

答案1

您需要查看日志文件以找到此错误的确切原因。这里有一个简单的清单。

  1. 电子邮件主机名的 DNS 解析应该提供服务器的正确 IP 地址。
  2. 服务器应该监听正确的端口。使用另一台机器上的 telnet 检查防火墙问题。非 SSL 的 143 和 SSL 的 993 应该打开。
  3. 检查 Postfix 日志文件,大多数情况下可以在以下位置找到:/var/log/mail.log

发送一封新电子邮件并检查日志文件的最后部分,看看服务器对您的电子邮件做了什​​么。

相关内容