Thanks for the precise replay.

1) Copy all emails containing specific pattern in body to another
email id, but all recipients in that will get the mails as usual.

2) Redirect all emails containing specific pattern in body to
another mail relay.
Postfix header_checks and/or body_checks can probably do what you
what.  See the BCC, FILTER, and REDIRECT actions to decide what you
need.
http://www.postfix.org/header_checks.5.html

Be aware that header_checks and body_checks only sees the "raw"
email; there is no decoding of HTML or quoted-printable or base64
text.  For more complete control, use a milter.

Sorry, my question missed that it was the filtering primarily for outgoing 
mails (i.e. smtp_body_check).
and as per the man page for BCC,FILTER and REDIRECT action "This feature is not 
supported with smtp header/body checks".
Addition to this, with body_check I can not add more that one email id in BCC/REDIRECT. 
And I can not redirect the "matching pattern mail" to another server for 
further analysis.

This is why i was thinking of external mail filters. apologies, if I am wrong 
here in reading.

With Regards,
Soumitri

Reply via email to