Postfix 无意中使用虚拟域重写电子邮件地址

Postfix 无意中使用虚拟域重写电子邮件地址

我已经运行了一段时间的 Postfix 邮件服务器,主要用来接收几个个人域名的邮件。最近有人问我是否可以为家人发送电子邮件,我在设置过程中遇到了一些麻烦。

如果我发送测试电子邮件至[电子邮件保护],它被重写为[电子邮件保护]。dave->david 转换是在虚拟映射中完成的。但是域名也会发生变化。

然后,这个更改后的第二个域名被我的 domainone 捕获,导致电子邮件发送到错误的地方。

我确信这与我设置虚拟域的方式简单相关,但我认为我已经尝试了所有可能的组合,但无法使其正常工作!

非常感谢您的帮助。

错误:

postfix/local[2512]: 66BD219F511: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.46, delays=0.42/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")

/etc/postfix/main.cf:

mydomain = domainone.tld

smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
delay_warning_time = 1h
readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/mail.domainone.tld/cert.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mail.domainone.tld/privkey.pem
smtpd_tls_CAfile=/etc/letsencrypt/live/mail.domainone.tld/chain.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
smtp_tls_security_level = may
smtpd_tls_mandatory_ciphers = high

myhostname = mail.domainone.tld
myorigin = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, domainone.tld, domaintwo.tld, domainthree.tld, domainfour.tld
#virtual_alias_domains = 
virtual_alias_maps = hash:/etc/postfix/virtual
#relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
mailbox_command = procmail -a "$EXTENSION"
message_size_limit = 51200000

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions =  check_recipient_access hash:/etc/postfix/blacklist_recipients,
                                check_sender_access hash:/etc/postfix/blacklist_senders,
                                permit_sasl_authenticated,
                                permit_mynetworks,
                                reject_unauth_destination,
                                reject_rbl_client zen.spamhaus.org,
                                reject_rbl_client bl.spamcop.net,
                                reject_rbl_client cbl.abuseat.org,
                                reject_rbl_client virbl.dnsbl.bit.nl

relay_domains = $mydestination, anotherserver.tld
relay_recipient_maps =

在/etc/postfix/虚拟:

[email protected]       george
[email protected]         george
@domainone.tld             george

[email protected]         david
@domaintwo.tld             david
[email protected]    george

[email protected]      alice
@domainthree.tld           alice
[email protected]  george

[email protected]       aaron
@domainfour.tld            aaron
[email protected]   george

我认为会发生以下情况:

这发生在除以下地址之外的任何地址[电子邮件保护]

服务器详细信息:

  • postfix:mail_version = 3.1.15
  • procmail:procmail v3.23pre

相关内容