Postfix:virtual_alias_maps 尽管有新域名,但仍将所有内容传递给一个用户

Postfix:virtual_alias_maps 尽管有新域名,但仍将所有内容传递给一个用户

我有一个postfix安装处理几个域的邮件,所有邮件都发送给一个真实的本地用户( ),我想为第二个用户cmb添加一个新域(我们称之为),但所有内容都被传递到。这里是:example.orgcmb/etc/postfix/virtual

[email protected] cmb
@chris.boyle.name cmb
@cmb.is-a-geek.org cmb
@example.org newperson

这是大部分内容/etc/postfix/main.cf,完整文件应要求提供。我还没有设置luser_relay

myhostname = nova.chris.boyle.name
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = chris.boyle.name
mydestination = chris.boyle.name, nova.chris.boyle.name, nova, localhost.localdomain, localhost
mynetworks_style = host
mailbox_command = procmail -a "$EXTENSION"
virtual_alias_domains   = cmb.is-a-geek.org example.org
virtual_alias_maps      = hash:/etc/postfix/virtual
smtpd_sender_login_maps = hash:/etc/postfix/virtual

这是/etc/aliases

# See man 5 aliases for format
postmaster: cmb
root: cmb

请注意,aliases.dbvirtual.db都比纯文本版本更新,并且postfix已重新启动但无效。一封测试邮件到[email protected]执行了此操作mail.log(我已编辑此日志摘录以使域 成为example.org)。

Aug 30 12:48:59 nova postfix/smtpd[32520]: 795B53D558: client=goggins.uwcs.co.uk[89.16.166.19]
Aug 30 12:48:59 nova postfix/cleanup[32530]: 795B53D558: message-id=<[email protected]>
Aug 30 12:48:59 nova dkim-filter[2074]: 795B53D558 external host goggins.uwcs.co.uk attempted to send as uwcs.co.uk
Aug 30 12:48:59 nova dkim-filter[2074]: 795B53D558 ASP query: missing parameter(s) in policy data
Aug 30 12:48:59 nova spamd[2385]: spamd: connection from localhost [127.0.0.1] at port 38371 
Aug 30 12:49:00 nova spamd[2385]: spamd: using default config for [email protected]: /srv/chris.boyle.name/spamassassin/user_prefs 
Aug 30 12:49:00 nova spamd[2385]: spamd: processing message <[email protected]> for [email protected]:1000 
Aug 30 12:49:05 nova spamd[2385]: spamd: clean message (-5.2/5.0) for [email protected]:1000 in 5.3 seconds, 1002 bytes. 
Aug 30 12:49:05 nova spamd[2385]: spamd: result: . -5 - AWL,BAYES_00,LOCALPART_IN_SUBJECT,RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY scantime=5.3,size=1002,[email protected],uid=1000,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=38371,mid=<[email protected]>,bayes=0.000000,autolearn=ham 
Aug 30 12:49:05 nova postfix/qmgr[32518]: 795B53D558: from=<[email protected]>, size=966, nrcpt=1 (queue active)
Aug 30 12:49:05 nova postfix/smtpd[32520]: disconnect from goggins.uwcs.co.uk[89.16.166.19]
Aug 30 12:49:05 nova postfix/local[32533]: 795B53D558: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=6.1, delays=6.1/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Aug 30 12:49:05 nova postfix/qmgr[32518]: 795B53D558: removed

cmb注意它最后被传递到:我真的很想知道为什么。

答案1

机器人101帮我解决了这个问题。诀窍是virtual_alias_maps会有效地递归,直到地址不变,并且地图右侧未限定的本地部分将使用 进行限定myorigin,因此会发生这种情况:

[email protected]  -> [email protected] -> [email protected]

因此,我可以通过更改myoriginnova.chris.boyle.name(并修复我的地址规范化(使用canonical_maps)以在发件人地址中使用@chris.boyle.name)来解决这个问题。这样,映射到[email protected],映射将不会进一步改变,并且仍然以这台机器作为其最终目的地。或者,我可以使用 完全限定映射@nova.chris.boyle.name

相关内容