Postfix Force sender=SMTP authenticate username?

You probably need to add entries into your generic file to automatically replace your outbound email address. Edit /etc/postfix/generic and add at the end:

Asterisk-3-######@hostname.tld [email protected]

Where the first part is the email address that the mail is coming from as seen in /var/log/maillog and the second part is the email address that you wish the email to come from, and authorized on your SMTP server.

Then you need to add the generic map to your main.cf - so at the end of the file:
smtp_generic_maps = hash:/etc/postfix/generic
Then run
postmap /etc/postfix/generic
systemctl restart postfix

4 Likes