Postfix:收件人地址被拒绝:本地收件人表中的用户未知,即使它存在

我已经search了很长一段时间,找不到一个好的解释以下问题。

发送邮件到[email protected]时收到以下错误消息

Jul 23 15:24:30 vslpam10 postfix/smtpd[7970]: connect from relay.subdomain.example.de[<IP>] Jul 23 15:24:30 vslpam10 postfix/smtpd[7970]: B08A1C4B0: client=relay.subdomain.example.de[<IP>] Jul 23 15:24:30 vslpam10 postfix/cleanup[7973]: B08A1C4B0: message-id=<[email protected]> Jul 23 15:24:30 vslpam10 postfix/smtpd[7970]: disconnect from relay.subdomain.example.de[<IP>] Jul 23 15:24:30 vslpam10 postfix/qmgr[7943]: B08A1C4B0: from=<[email protected]>, size=14053, nrcpt=1 (queue active) Jul 23 15:24:30 vslpam10 postfix/smtp[7974]: B08A1C4B0: to=<[email protected]>, relay=relay.subdomain.example.de[<IP>]:25, delay=0.06, delays=0.03/0.01/0/0.02, dsn=5.1.1, status=bounced (host relay.subdomain.example.de[<IP>] said: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table (in reply to RCPT TO command)) Jul 23 15:24:30 vslpam10 postfix/cleanup[7973]: BE364C55B: message-id=<[email protected]> Jul 23 15:24:30 vslpam10 postfix/bounce[7976]: B08A1C4B0: sender non-delivery notification: BE364C55B Jul 23 15:24:30 vslpam10 postfix/qmgr[7943]: BE364C55B: from=<>, size=16447, nrcpt=1 (queue active) Jul 23 15:24:30 vslpam10 postfix/qmgr[7943]: B08A1C4B0: removed Jul 23 15:24:30 vslpam10 postfix/smtp[7974]: BE364C55B: to=<[email protected]>, relay=relay.subdomain.example.de[<IP>]:25, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C124512C5D4) Jul 23 15:24:30 vslpam10 postfix/qmgr[7943]: BE364C55B: removed 

但用户确实存在:

 finger user Login: user Name: technical User 

Postconf显示如下

 (postconf -d; postconf -d; postconf -n; ) | sort | uniq -u alias_maps = hash:/etc/aliases allow_mail_to_commands = alias,forward,include allow_mail_to_files = alias,forward,include biff = no canonical_maps = hash:/etc/postfix/canonical daemon_directory = /usr/lib/postfix html_directory = /usr/share/doc/packages/postfix/html inet_protocols = all local_recipient_maps = unix:passwd.byname $alias_maps mailbox_size_limit = 0 manpage_directory = /usr/share/man masquerade_exceptions = root myhostname = server.example.de mynetworks = <IPs> readme_directory = /usr/share/doc/packages/postfix/README_FILES relocated_maps = hash:/etc/postfix/relocated sample_directory = /usr/share/doc/packages/postfix/samples sender_canonical_maps = hash:/etc/postfix/sender_canonical setgid_group = maildrop smtpd_sender_restrictions = hash:/etc/postfix/access transport_maps = hash:/etc/postfix/transport virtual_alias_domains = hash:/etc/postfix/virtual virtual_alias_maps = hash:/etc/postfix/virtual 

有没有人得到这个行为的解释?

最好的祝福

如果postfixconfiguration为接受某个特定目的地的邮件(如在mydestination中设置的那样),那么还必须为该用户存在有效的别名或邮箱条目。

相反,你希望把这个邮件转发到另一个系统 – 所以用户不存在。

有两个解决scheme,一个坏的,一个好的。

糟糕的解决scheme很容易实现:将relay.example.com切换到relay_domains,并确保relay_recipient_maps设置为空:

 relay_domains = relay.example.com relay_recipient_maps = 

这意味着relay.example.com的所有收件人都将被接受,所以您将收到大量垃圾邮件。

正确的做法是将relay_recipient_maps设置为中继域中的有效地址列表。

编辑:drat,我忘了你说的用户确实存在。

在这种情况下,会发生什么情况:您没有添加中继。 子域到mydestination,并mydestination(和只有mydestination)不服从parent_domain_matches_subdomains, 具体而言

所以你可以通过添加继电器来解决它。 子域到明确的地方,假设中继。 域在被本地交付之前被运输(5)。