Hi all.

Some local users (Unix accounts) on a machine are allowed to send emails externally, but I want some other users (mainly administrativa accounts like root and others) to use a notificat...@example.com account.

I can make that by passing "-f notificat...@example.com" to sendmail, but I can't always do that because some programs have hardcoded sendmail binary path and don't allow passing the -f flag, so I tried to setting sender_canonical_maps, which didn't work.

My current setup is:

main.cf:

   local_header_rewrite_clients = static:all
   sender_canonical_maps = regexp:/etc/postfix/sender_canonical

/etc/postfix/sender_canonical:

   /^root$/          notificat...@example.com

Some more information:

I'm relaying these emails to another Postfix SMTP server at example.com using SASL. When a local user tries to send email with sendmail (without -f flag), the server appends the domain name and tries to relay using SASL. Since the user account (e.g. r...@example.com) doesn't exist in remote server, the connection fails with the following error: "Client host rejected: Access denied (in reply to RCPT TO command))". It doesn't seem right to create an account on the remote side for every local account I have in the local machine.

Any clue?

Reply via email to