Postfix 从 sender_restrictions 本地重定向的邮件似乎无法正确通过虚拟别名

Postfix 从 sender_restrictions 本地重定向的邮件似乎无法正确通过虚拟别名

我在 Debian Squeeze 上运行 Postfix 2.1.7。

我已经使用发件人限制设置了基于发件人的重定向。

在/etc/postfix/sender_access中:

domaintoredirect.com            REDIRECT [email protected]

/etc/postfix/main.cf:

smtpd_recipient_restrictions = 
    reject_non_fqdn_recipient, check_recipient_access hash:/etc/postfix/access, check_recipient_access hash:/etc/postfix/access_lindalane
    permit_mynetworks, reject_unauth_destination,
    reject_non_fqdn_sender, check_sender_access hash:/etc/postfix/sender_access,
    reject_non_fqdn_hostname, reject_invalid_helo_hostname, check_helo_access hash:/etc/postfix/helo_access,
    reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, permit

virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/regexp_virtual

[电子邮件保护]是本服务器上的虚拟用户,在 /etc/postfix/virtual 中定义:

[email protected]          user

因此,我从[电子邮件保护](到[电子邮件保护]),无法送达的报告被退回至[电子邮件保护]

<[email protected]> (expanded from <[email protected]>): User unknown in virtual alias table

直接发送至[电子邮件保护]完美运行。

如果我将重定向目的地更改为不在此服务器上托管的电子邮件地址,它也可以正常工作。

如果目标位于同一主机上,那么在重定向过程中是否会发生某些事情,导致无法根据虚拟别名检查目标地址?

如果需要的话,这里是完整的 postconf -n:

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
disable_vrfy_command = yes
inet_interfaces = all
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
message_size_limit = 20480000
mydestination = internet.example.com, localhost.example.com, , localhost
myhostname = internet.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = 
relayhost = 
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_data_restrictions = reject_unauth_pipelining, permit
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_recipient, check_recipient_access hash:/etc/postfix/access, permit_mynetworks, reject_unauth_destination,    reject_non_fqdn_sender, check_sender_access hash:/etc/postfix/sender_access,    reject_non_fqdn_hostname, reject_invalid_helo_hostname, check_helo_access hash:/etc/postfix/helo_access,    reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, permit
smtpd_sasl_auth_enable = no
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/example.com.2014.chain
smtpd_tls_key_file = /etc/ssl/private/example.com.key.insecure.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/regexp_virtual

答案1

在您之前smtpd_recipient_restrictions列出的限制中,返回的短路会阻止其他检查,这意味着重定向永远不会为您的内部客户端进行评估。permit_mynetworkscheck_sender_accessOK

相关内容