Debian – Postfix + Dovecot,发送但不接收邮件

我遵循本教程中的说明。 我可以成功发送电子邮件,但我无法收到。 这里正是发生了什么事情:

当我发送电子邮件从我的Hotmail帐户,如果我这样做

# ls /home/vmail/example.com/info/mail/new/ 1386353921.V918aI67830c7M607456.myvps 

我看到邮件,但如果我login到squirrelmail我不。

这里是我的/etc/postfix/main.cf

 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) 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 = myvps alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = myvps, localhost.localdomain, , localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all home_mailbox = Maildir/ virtual_mailbox_domains = /etc/postfix/vhosts virtual_mailbox_base = /home/vmail virtual_mailbox_maps = hash:/etc/postfix/vmaps virtual_minimum_uid = 999 virtual_uid_maps = static:999 virtual_gid_maps = static:999 

这里是挖掘输出:

 # dig example.com MX +short 0 mail.example.com. 

编辑这里是我的/var/log/mail.log当我发送电子邮件到我的VPS电子邮件帐户:

 Dec 6 13:46:01 myvps postfix/smtpd[23920]: connect from dub0-omc3-s2.dub0.hotmail.com[157.55.2.11] Dec 6 13:46:01 myvps postfix/smtpd[23920]: F0DB267E137F: client=dub0-omc3-s2.dub0.hotmail.com[157.55.2.11] Dec 6 13:46:02 myvps postfix/cleanup[23925]: F0DB267E137F: message-id=<[email protected]> Dec 6 13:46:02 myvps postfix/qmgr[23905]: F0DB267E137F: from=<[email protected]>, size=1650, nrcpt=1 (queue active) Dec 6 13:46:02 myvps postfix/smtpd[23920]: disconnect from dub0-omc3-s2.dub0.hotmail.com[157.55.2.11] Dec 6 13:46:02 myvps postfix/virtual[23926]: F0DB267E137F: to=<[email protected]>, relay=virtual, delay=0.08, delays=0.06/0.02/0/0, dsn=2.0.0, status=sent (delivered to maildir) Dec 6 13:46:02 myvps postfix/qmgr[23905]: F0DB267E137F: removed 

问题是与mailbox_command。 当我刚刚注释掉包含mailbox_command的行时,它就起作用了。

所以如果有人面临同样的问题,只需运行:

 sed -i "/mailbox_command/ s/^/# /" /etc/postfix/main.cf 

main.cf这一行

 mydestination = myvps, localhost.localdomain, , localhost 

添加domain.com

 mydestination = myvps, localhost.localdomain, domain.com, localhost