Postfix 邮件转发对某些电子邮件地址有效,但对其他电子邮件地址无效

Postfix 邮件转发对某些电子邮件地址有效,但对其他电子邮件地址无效

我无法获取域名'[电子邮件保护]' 才能正常工作。当我向它发送邮件时(从 Outlook 和 Yahoo),我收到错误“收件人地址被拒绝:本地收件人表中的用户未知”(我在 Google 上搜索过这个问题,并找到了一些 Stackoverflow 帖子,但似乎没有什么帮助……)

以下所有邮件均可用,除了“[电子邮件保护]“......?”

在/etc/postfix/虚拟:

[email protected] gvanto
[email protected] gvanto
[email protected] gvanto
[email protected] gvanto

我碰到这个帖子这表明设置:( local_recipient_maps =空)应该可以阻止此错误的发生,但它对我来说不起作用。

我已经检查过,没有“网站管理员”或“支持”的用户或别名,那么为什么这些可以工作而“测试”却不行?

我也尝试过将test: gvanto和添加test: root到 /etc/aliases ...每次都重新启动 postfix,但没有成功...

非常感谢您的帮助,谢谢

完整配置(/etc/postfix/main.cf):

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/mail_example_com.pem
smtpd_tls_CAfile=/etc/ssl/certs/mail_example_com.ca-bundle
smtpd_tls_key_file=/etc/ssl/private/mail_example_com.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.example.com
#alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual
alias_database = hash:/etc/aliases
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
local_recipient_maps =

mydestination = localdomain, localhost, localhost.localdomain, localhost, mail.example.com, example.com
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
#mailbox_command = procmail -a "$EXTENSION"
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
myorigin = /etc/mailname
inet_protocols = all

# all below krizna mod
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes

在 /etc/别名中:

# See man 5 aliases for format
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root

test: root

root: gvanto

答案1

因为你有

virtual_alias_maps = hash:/etc/postfix/virtual
alias_database = hash:/etc/aliases

这两个文件都被视为hash:伯克利数据库

使用这些命令来更新数据库:

sudo postmap /etc/postfix/virtual
sudo postalias /etc/aliases

相关内容