Saturday, July 13, 2019

Postfix : SMTP; Client does not have permissions to send as this sender

If you are trying to send mails through Postfix using SMTP credentials and you are getting above error, here is the solution for you.

Check the 'from address' in the log file, this is not the same email address what's your login email id. To make the 'from address' same as login email id add following lines in the file /etc/postfix/main.cf
canonical_maps = regexp:/etc/postfix/canonical
canonical_classes = envelope_sender
canonical_maps = regexp:/etc/postfix/canonical

Now create a file /etc/postfix/canonical and add your smtp login email address in the file
// username@domainname.com
(user both back slashes in the file)

Now it will send mails by this 'from address'.

No comments:

Post a Comment