对于不存在的用户,全部捕获不起作用(Postfix)

对于不存在的用户,全部捕获不起作用(Postfix)

全部捕获功能对现有邮箱有效,但对随机邮箱无效。哪里出了问题?

发送到不存在的邮箱将得到(/etc/log/maillog):

Dec 27 23:09:42 vps40198 postfix/smtpd[18623]: NOQUEUE: reject: RCPT from mail-oa0-f47.google.com[209.85.219.47]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-oa0-f47.google.com>

我的邮件服务器位于fake.tld并且random是不存在的用户。

这些是相关/etc/postfix/*.cf文件:

#mysql-domains.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT 1 FROM domain WHERE domain = '%s'

#mysql-email2email.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT username FROM user WHERE username = '%s'

#mysql-forwards.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT dst FROM forward WHERE src = '%s'

#mysql-mailboxes.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT CONCAT(SUBSTRING_INDEX(username,'@',-1),'/mail/',username,'/') FROM user WHERE username = '%s'

用户的域存在于数据库中。

怎么了?

编辑:

我认为它需要一个目录来保存邮件,我该如何重定向邮件但不将其保存到磁盘?

答案1

看来我使用了 virtual_mailbox_alias_maps 而不是 virtual_alias_maps。前者不存在,但 Postfix 没有抱怨。不知道这是怎么回事,也许是某些错误的指南或我自己的输入错误。

相关内容