我正在使用带有 Postfix 和虚拟用户/邮箱的 Dovecot。
一切正常,可以接收来自外部的邮件(其他域名被命名为邮件服务器)
我可以: - 从我的邮件客户端发送邮件[电子邮件保护]到[电子邮件保护]反之亦然。 - 从我的邮件客户端发送邮件[电子邮件保护]到[电子邮件保护]。
但我无法收到来自'[电子邮件保护]“”。
我的 /etc/postfix/main.cf 配置
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps
inet_interfaces = all
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $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.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = *
virtual_alias_maps=hash:/etc/postfix/vmail_aliases
virtual_mailbox_domains=hash:/etc/postfix/vmail_domains
virtual_mailbox_maps=hash:/etc/postfix/vmail_mailbox
virtual_mailbox_base = /var/vmail
virtual_minimum_uid = 2222
virtual_transport = virtual
virtual_uid_maps = static:2222
virtual_gid_maps = static:2222
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_local_domain = $mydomain
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
Postmaster delivery failure:
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
[email protected]
Reporting-MTA: dns;cpsmtpb-ews02.kpnxchange.com
Received-From-MTA: dns;cpsps-ews25.kpnxchange.com
Arrival-Date: Tue, 11 Feb 2014 13:51:27 +0100
Final-Recipient: rfc822;[email protected]
Action: failed
Status: 5.5.0
Diagnostic-Code: smtp;550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 x7si31977190eef.177 - gsmtp
对于另外两个邮件地址,我甚至没有收到失败通知。
提前致谢!
答案1
您可能应该reject_unauth_destination
从中删除smtpd_recipient_restrictions
,因为您已经在下对其进行了配置smtpd_relay_restrictions
,并且正如 postfix 手册所述:
# reject_unauth_destination is not needed here if the mail
# relay policy is specified under smtpd_relay_restrictions
# (available with Postfix 2.10 and later)
也就是说,您可能想要将其放入permit_auth_destination
它的位置,但我会先注释掉该relay_domains = *
行。我不确定这是否是有效的语法,但它会说它收到的任何邮件都将被转发到您设置为relay_transport(似乎是谷歌服务器)的任何地方。