iRedMail configures Postfix to
reject the request when sender specifies an owner for the MAIL FROM address
From: header), but the client is not (SASL) logged in as that MAIL FROM
address owner; or when the client is (SASL) logged in, but the client login
name doesn't own the MAIL FROM address.
Sometimes we do need to send email as another user, this tutorial describes
how to allow certain users to do this with iRedAPD plugin
reject_sender_login_mismatch restriction rule in Postfix
/etc/postfix/main.cf). Out iRedAPD
plugin will do the same restriction for you.
reject_sender_login_mismatch, Postfix setting looks like
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
reject_sender_login_mismatchin iRedAPD config file
plugins = ['reject_sender_login_mismatch', ...]
/opt/iredapd/settings.py, in parameter
ALLOWED_LOGIN_MISMATCH_SENDERS. For example:
ALLOWED_LOGIN_MISMATCH_SENDERS = ['firstname.lastname@example.org', 'email@example.com']
NOTE: this parameter does not present by default, please add it manually.
Restart iRedAPD service. That's all.