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

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

我已经在 Google 上搜索了很长时间,但找不到以下问题的好的解释。

尝试发送邮件至时收到以下错误[电子邮件保护]

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

有人可以解释这种行为吗?

此致

答案1

如果将 postfix 配置为接受特定目的地的邮件(如 mydestination 中设置),则还必须存在该用户的有效别名或邮箱条目。

相反,您希望将此邮件转发到另一个系统 - 因此该用户不存在。

对此问题有两个解决方案,一个坏的解决方案和一个好的解决方案。

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

relay_domains = relay.example.com
relay_recipient_maps = 

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

正确的实现此目的的方法是将 Relay_recipient_maps 设置为中继域中的有效地址列表。

编辑:该死,我忘了你说的是用户存在。

在这种情况下,会发生以下情况:您没有将中继子域添加到 mydestination,并且 mydestination(且只有 mydestination)不遵循 parent_domain_matches_subdomains,具体来说

因此,您可以通过将relay.子域明确添加到mydestination来解决这个问题,假设relay.域在本地传送之前被传输(5)。

相关内容