Sunday, January 16, 2011

How do I forward outbound mail for a specific user in postfix?

I want to create a rule that forwards all mail with a specific sender to another email address.

From what I can tell, this might be possible with sender_bcc_maps but I can't find any examples using a specific address, only domain matches.. additionally, the user does not exist in postfix, this is simply an outbound relay server (on a static IP, in a datacenter) for another Exchange server (on a dynamic ip, in an office).

  • Ended up adding to main.cf:

    sender_bcc_maps = hash:/etc/postfix/outcopy
    

    and then /etc/postfix/outcopy:

    from@domain.com copyuser@anotherdomain.com
    

    then ran:

    postmap /etc/postfix/outcopy
    /etc/init.d/postfix reload
    

    and it is working.

    From gregmac

0 comments:

Post a Comment