Linux Postfix - status=bounced(未知用户“myuser”)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18377813/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Postfix - status=bounced (unknown user "myuser")
提问by Radim Burget
I am configuring Postfix and when validating by telnet and SMTP I got the status bounced error, unknown user:
我正在配置 Postfix,当通过 telnet 和 SMTP 验证时,我收到状态退回错误,未知用户:
Error log:
错误日志:
postfix/local[18718]: 4590D7DC0A51: to=, relay=local, delay=9.8, delays=9.8/0.01/0/0.04, dsn=5.1.1, status=bounced (unknown user: "myuser")
postfix/local[18718]:4590D7DC0A51:to=,relay=local,delay=9.8,delays=9.8/0.01/0/0.04,dsn=5.1.1,status=bounced(未知用户:“myuser”)
The "myuser" already exists, but with full domain name: [email protected].
“myuser”已经存在,但具有完整的域名:[email protected]。
User Validation:
用户验证:
postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
Output is: "1" - so I guess it is OK.
输出是:“1” - 所以我想这没问题。
My postfix Configuration:
我的后缀配置:
root# postconf -n:
append_at_myorigin = yes
biff = no
config_directory = /etc/postfix
default_destination_concurrency_limit = 1
delay_warning_time = 8h
disable_vrfy_command = yes
dovecot_destination_concurrency_limit = 1
dovecot_destination_recipient_limit = 1
enable_original_recipient = yes
local_destination_concurrency_limit = 1
maximal_queue_lifetime = 6d
mydestination = mydomain.com
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_delay_reject = no
smtpd_hard_error_limit = 10
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname
smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unlisted_recipient, reject_unauth_destination, reject_unauth_pipelining
smtpd_sender_restrictions = permit_mynetworks, reject_unknown_sender_domain
smtpd_soft_error_limit = 5
strict_rfc821_envelopes = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot
Thank you for any help.
感谢您的任何帮助。
采纳答案by clement
you have added mydestination = mydomain.com
and so the valid users for mydomain.com
will be searched in local_recipient_maps
. It is very clear from the logline that local
delivery agent is selected to deliver the mail, as local domain class matched. See postfix address classesfor more help
您已添加 mydestination = mydomain.com
,因此mydomain.com
将在local_recipient_maps
. 从日志中可以清楚地看出local
,由于本地域类匹配,因此选择了投递代理来投递邮件。有关更多帮助,请参阅后缀地址类
Modify your main.cf like below
像下面这样修改你的 main.cf
#/etc/postfix/main.cf
mydestination =
# set to localhost localhost.$mydomain or remove mydomain.com for now
# Ensure that postmap -q mydomain.com mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf is returning mydomain.com and
# postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf succeeds
回答by tuananh
For someone else, when I set mydestination=mydomain.com. Postfix show warning do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains. So I set it relayhost = mydomain.com
对于其他人,当我设置 mydestination=mydomain.com 时。Postfix 显示警告不要在 mydestination 和 virtual_mailbox_domains 中列出域 mydomain.com。所以我设置了relayhost = mydomain.com
My postfix version: 3.1.0 (postconf -d | grep mail_version)
我的 postfix 版本:3.1.0 (postconf -d | grep mail_version)
回答by aphoe
Open /etc/postfix/main.cf
, look for the mydestination
field and change it's value to the below
打开/etc/postfix/main.cf
,查找该mydestination
字段并将其值更改为以下
mydestination = localhost, localhost.localdomain
Don't forget to run sudo postfix reload
afterwards
sudo postfix reload
之后别忘了跑
回答by Janib Soomro
Use following settings in /var/postfix/main.cf
在 /var/postfix/main.cf 中使用以下设置
myorigin = localhost
myhostname = <your_host_name>
mydestination = localhost.$mydomain, localhost, localhost.localdomain
followed by:
其次是:
sudo postmap /etc/postfix/virtual
sudo service postfix restart