Postfix: change sender in sending messages

Postfix: how to change change sender address in sending messages?

Here is the answer, it will rewrite old-address to new-address automatically. You can define file to maps old-address to new-address.

/etc/postfix/main.cf:
    smtp_generic_maps = hash:/etc/postfix/generic

/etc/postfix/generic:
    [email protected]       [email protected]

Don’t forget to postmap /etc/postfix/generic and run postfix reload

  • Upside: You doesn’t need to requeue the message
  • Downside: Postfix will rewriting sender and recipient address that matching [email protected].

 

Revisions

No comments yet.

Leave a Reply