5

I want postfix to rewrite the from address of all this server's outgoing e-mail. Anyone know how could I accomplish this?

3

1 Answer 1

6

This is described in http://www.postfix.org/ADDRESS_REWRITING_README.html#generic

It states to use the smtp_generic_maps to rewrite the outgoing addresses (in header and envelope!). The example given there uses the hash lookup table for rewriting. But you are - as usual in Postfix - able to use the regex or pcre lookup table for rewriting. Which could rewrite like

/.*/    [email protected]

This approach even enables you to rewrite addresses only under some special conditions that you can write as regular expressions.

1
  • The example is not that good: in my test it can modify the recipient address too! Something like /.*@LocalDomain/ should work better.
    – Yongwei Wu
    Feb 4, 2017 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .