Postfix - Redirect all outgoing traffic EXCEPT...

Discussion in 'Server Operation' started by seventy-7, May 8, 2008.

  1. seventy-7

    seventy-7 New Member

    Hi all.

    I am currently redirecting all outgoing traffic via a BCC method. I have the RELAYHOST IP set to a false IP so all outgoing goes nowhere except for the BCC address which I have added to the transport file.

    This method is working perfectly.

    I want to however except 2 email address from being redirected.

    [email protected]
    [email protected]


    Any thoughts on how this can be acheived?
    I am running postfix 2.2.9 so I dont think the sender_dependent_relayhost_maps option can be used.
    My config's are below.


    /etc/postfix/main.cf
    relayhost = fake.ip.adress.here
    bounce_queue_lifetime = 0
    maximal_queue_lifetime = 0
    always_bcc =
    recipient_bcc_maps = regexp:/etc/postfix/bcc_regexp
    sender_bcc_maps = regexp:/etc/postfix/bcc_regexp

    /etc/postfix/bcc_regexp
    /.*/ [email protected]

    /etc/postfix/transport
    bccdomain.com smtp:[192.168.0.51]
     
    Last edited: May 8, 2008

Share This Page