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 receiver@gmail.com
.
Oct 17 09:21:40 debian postfix/smtpd[1643]: NOQUEUE: reject: RCPT from
unknown[x.x.x.x]: 553 5.7.1 <sender@example.com>: Sender address rejected:
not owned by user sender@example.com; from=<sender@example.com>
to=<receiver@gmail.com> 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
Best Answer
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.:
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.