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

How to configure postfix as open relay (i want to accept all mail) but use my script foo as tranport and not really relay.

share|improve this question

Transport maps can be regular expression based, and also support wildcards, so you can use a *. From the documentation on transport maps

   * transport:nexthop
         The  special pattern * represents any address (i.e.
         it functions  as  the  wild-card  pattern,  and  is
         unique to Postfix transport tables).

With that combined with your own mail delivery service, defined in, you can call your script for the emails. That being said, you don't have to mess with the transport maps, you can simply change the default_transport to be your newly defined mail handler in

share|improve this answer

You want to look at the transport table which defines what transport to use for what domains.

share|improve this answer
I looked here before, but i am unable to get it working for all domains.. – tapioco123 Jul 7 '10 at 18:31

You could also create an alias like so: "|/path/to/my/script"

This is what Mailman does.

share|improve this answer
Yes but i want it to work for all domains non only for – tapioco123 Jul 7 '10 at 18:29

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.