Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Have a look at alterMIME – Frands Hansen Dec 26 '11 at 1:24
Have a look at this page:… – Khaled Dec 26 '11 at 8:11
Thank you Khaled that worked! Can you post an answer so I could mark it as answered? More so for others who might have the same question. – Belmin Fernandez Dec 26 '11 at 17:06
up vote 2 down vote accepted

This is described in

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


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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.