Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

3 Answers 3

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 master.cf, 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 master.cf.

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:

@domain.com: "|/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 domain.com –  tapioco123 Jul 7 '10 at 18:29

Your Answer

 
discard

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.