1

Is it possible to have some kind of regex match and replace, like it is possible for outgoing mails for incoming, too? I am already able to replace the from field for outgoings, by using the smtp_generic_maps option. Now I'd like to apply the same to incoming mail's to field. But if possible in a richer sense. If mail comes from my own domain I do not want to rewrite the to field. Is it coming from another domain, rewrite it. And thus e.g. redirect it to another address within my domain.

Example: Assuming my domain is company.com

Now we can separate incoming mail into two categories: Mail from within my domain and mail from outside my domain.

For the first category, postfix should process as usual and no rewriting should take place. But mail for the second category, i.e. mails from [email protected] should be directed to the central mail account [email protected] even if the original recipient was [email protected].

By doing this, I still allow email communication among the addresses of my employees but hide them from the outer world.

3

1 Answer 1

1

If I understood your question correctly, Postfix virtual maps should help you. Google those -- your question was a bit short, so is my reply. :-)

1
  • Hm, I don't think that virtual maps are the correct starting point. I'll add a better example.
    – Coxer
    May 5, 2014 at 14:19

You must log in to answer this question.

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