The message clearly says Sender address rejected. So not a recipient was actually refused, but a sender. The (arguably confusing) SMTPRecipientsRefused
exception fired probably because the server has smtpd_delay_reject
enabled, so it will proceed with the protocol and only report rejection after RCPT TO
command, even if it decided to reject the transaction as early as after the MAIL FROM
command.
The not owned by user ...
is produced by the reject_sender_login_mismatch
(or reject_authenticated_sender_login_mismatch
) item somewhere in your Postfix configuration, probably in smtpd_sender_restrictions
where it normally goes, but also possible in smtpd_recipient_restrictions
or smtpd_relay_restrictions
. It is a good thing as it considerably enhances the server security against spamming.
So, your server seems to have SMTP authentication set up and also it has some mapping from envelope sender addresses to SMTP logins. Certain sender email addresses may only be used by certain users. Your application seems to be authenticating as the user [email protected]
, and that user is not allowed to use [email protected]
as a sender address.
You have to be careful here, because there are different things in the email technology which you can refer to as a "sender address". In this case we are talking about "envelope sender address" which is reported to the server during SMTP session in the MAIL FROM
command. Don't confuse it with the "from" address that appears within the message data, in the From
MIME header.
Your options are:
- ask the mail server administrator to allow
[email protected]
to use [email protected]
as the envelope sender address;
- ask administrator which address this user is allowed to use and then reconfigure your application to use allowed address during the SMTP session.
Probably, the address [email protected]
is already allowed for the user [email protected]
. Configure it to be used in the SMTP session. If you want to receive replies to some other address, add that address into the message as Reply-To
MIME header. Also you may want to use other address in the message's From
MIME header. Again, don't confuse "envelope sender address" and From
MIME header. You may set up MIME headers relatively freely, but envelope sender address must be set in accordance with the server configuration. How and where to set this up depends on your SMTP framework; we can't help you with that.