我运行的是 Debian 7.1、Postfix 版本 2.9.6、Dovecot 版本 2.1.7。
设置时我主要遵循这
(没有 spamass-clamav-greylist 位)
我还通过 gmail 设置了智能主机中继
postconf -n
揭示了:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
milter_default_action = accept
mydestination = MyDomain, localhost.net, localhost
myhostname = MyDomain.net
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = mysql:/etc/postfix/mysql_relay_domains.cf
relayhost = [smtp.gmail.com]:587
smtp_connect_timeout = 120s
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:3000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = lmtp:unix:private/lmtp
virtual_uid_maps = static:3000
我可以向外界发送电子邮件,但发送给我的所有电子邮件都被卡住了。
mailq
显示多行:
A69C2414C4 2621 Fri Dec 27 14:57:03 [email protected]
(conversation with MyDomain.net[private/lmtp] timed out while receiving the initial server greeting)
[email protected]
AB78B414BE 3796 Fri Dec 27 14:56:50 [email protected]
(delivery temporarily suspended: conversation with MyDomain.net[private/lmtp] timed out while receiving the initial server greeting)
[email protected]
/var/log/mail.log
显示:
Dec 28 09:50:09 hostname postfix/lmtp[10828]: E947C414CD: to=<[email protected]>, relay=localhost[private/lmtp], delay=64012, delays=63712/0.25/300/0, dsn=4.4.2, status=deferred (conversation with localhost[private/lmtp] timed out while receiving the initial server greeting)</code>
任何帮助都将不胜感激。谢谢
答案1
好的。我找到了解决问题的方法 - 我在 postfix cofig 中更改了此行:
virtual_transport = lmtp:unix:private/dovecot-lmtp