First up under /etc/postfix ensure that you have a file called header_checks. If not create it.
Next we want to ensure Postfix is configured to use this file so you do this from a command line by entering the following:
postconf -e "header_checks = regexp:/etc/postfix/header_checks"
The syntax in the header_checks file is:
/regex_pattern/ ACTION
Example :
#/etc/postfix/header_checks
/^From: "spam/ REJECT
/^To: example@example.com/ REDIRECT @esxe.com
/^Subject:.*viagra/ DISCARD
More Detail Link 1 Link 2
Thanks for the very clear article, but with the case redirect:
ReplyDelete/^To: example@example.com/ REDIRECT @esxe.com
How can I redirect (or bcc) to more than 1 mailbox?