大网数据广告活动
服务器运维问答

`Sender address rejected: not owned by user` in Postfix

· 52CE 我爱测

I am getting the following error when I try to send an email from a client on my home computer through my authenticated SMTP server, to [email omitted] . Oct 17 09:21:40 debian postfix/smtpd[1643]: NOQUEUE: reject: RCPT from unkn…

问题原文

原帖链接 · Vortico · CC BY-SA 3.0

I am getting the following error when I try to send an email from a client on my home computer through my authenticated SMTP server, to [email omitted].

Oct 17 09:21:40 debian postfix/smtpd[1643]: NOQUEUE: reject: RCPT from
unknown[x.x.x.x]: 553 5.7.1 <[email omitted]>: Sender address rejected:
not owned by user [email omitted]; from=<[email omitted]>
to=<[email omitted]> proto=ESMTP helo=<[192.168.1.5]>

I'm ultimately looking for a fix for the error, but I'm currently wondering what configuration parameters in main.cf are able to fix it. For example, should I fiddle with smtpd_sender_restrictions, smtpd_relay_restrictions, or smtpd_recipient_restrictions? I am unable to remove the error by making any of the previous parameters as permissive as possible.

Edit: Here is the relevant part of my current configuration, although I am mainly looking for a couple possible Postfix parameters that could be causing the address to be rejected.

relay_domains = *

smtpd_sender_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated

smtpd_relay_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination

smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    reject_rbl_client zen.spamhaus.org,
    reject_rhsbl_reverse_client dbl.spamhaus.org,
    reject_rhsbl_helo dbl.spamhaus.org,
    reject_rhsbl_sender dbl.spamhaus.org,

smtpd_data_restrictions = reject_unauth_pipelining

And in master.cf:

submission inet n       -       -       -       -       smtpd
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_security_options=noanonymous
    -o smtpd_client_restrictions=permit_sasl_authenticated
    -o smtpd_sender_restrictions=reject_sender_login_mismatch

社区高分解答

原帖链接 · Ondra Simek · CC BY-SA 3.0

According to the manual smtpd_sender_login_maps need to be set. Setting it to the same value as virtual_mailbox_maps worked for me. E.g.:

virtual_mailbox_maps    = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

Also, if your maps live in a database, keep in mind you need to actually select a field, not just "1" like some howtos are suggesting.

# good
query = SELECT email FROM postfix_mailbox_maps where email = '%s';

# bad
query = SELECT 1 FROM postfix_mailbox_maps where email = '%s';

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-10-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。