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.

I know about body_checks directive in postfix and i tried to do the following in my pcre:/etc/postfix/body_check

/some string/ BCC foo@bar.com

But it is not working. Action BCC cannot probably be here. Is there any solution to this? Send blind copy of email if it contains specific string.

Thank you.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can solve this by reversing your logic: set up always_bcc to deliver to a specified filtering recipient, and then check for the string in the body.

Of course, the amount of extra traffic you will generate is significant (you're going to double the number of messages sent), but you can't use always_bcc with internally-generated mail; postfix will refuse to copy them to prevent routing loops.

share|improve this answer
add comment

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.