Sender address rejected: not owned by user

Let's see how to easily resolve the event Sender address rejected: not owned by user

This is an error that you might find in your Postfix logs. If you are seeing this error, you are probably using your Postfix server as a relay server, or you might be using a remote SMTP server where your server’s domain is not allowed to send emails.

To resolve this issue, simply add the authorized sender to the Postfix configuration by defining the ‘sender_canonical‘ option.

ostricht@myserver:~# cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
.
.
.
### ADD TO YOUR CONFIGURATION
sender_canonical_maps = hash:/etc/postfix/sender_canonical

Now add autorized sender to /etc/postfix/sender_canonical add them to postfix database and restart postfix (in this example we suppose that ostrich@localhostrich.com is a valid user for smtp server)

ostricht@myserver:~# vim /etc/postfix/sender_canonical
@newdomain1.com ostrich@localhostrich.com  
@newdomain2.com ostrich@localhostrich.com 
ostricht@myserver:~# postmap /etc/postfix/sender_canonical
ostricht@myserver:~# systemctl restart postfix

From now on, any email sent from users with the ‘@newdomain1.com’ or ‘@newdomain2.com’ domain will be relayed via the SMTP server as ‘ostrich@locahostrich.com.’ However, the recipient will see the sender as ‘user@newdomain1.com’ rather than ‘ostrich@locahostrich.com.’