OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
header_checks/body_checks - is there a way to stop the check at an ACCEPT point?

From: Glen Lee Edwards (glenholiness.ch)
Date: Tue Dec 02 2003 - 00:47:17 CST


In trying to set up a reasonable spam filter using header_checks and
body_checks, I'm also filtering out some mail I need because some of the
services I use include words that body_checks searches for and then
blocks. Is there a way to have Postfix, during the body_checks search,
stop the search and accept the mail if it finds a key word?

For example: a letter from PromotionINeedThisService.com has a link in
the body. I need this letter, but Postfix is rejecting it because the
word "FREE" is in it. How do I do something like:

/INeedThisService.com/ accept
/FREE/i reject 550 text...

so that when Postfix finds "INeedThisService.com" in the body it stops
looking and lets the letter through?

Also, I have numerous email users on my system who have varying needs as
to how much spam they want filtered by Postfix before the mail gets to
them. Hypothetically speaking, let's use 3:

Alan wants nothing filtered.
Jerry wants some filtering.
Zeke has children and wants nothing with images coming in.

Is there a way to configure Postfix to do this? - ie, set up body_checks
to check who the mail is going to, and then decide how much to check for
before allowing the mail through?:

/\A/ FILTER [:file with users who want no filtering]
/FREE/ reject
/\A/ FILTER [:file with users who want some filtering]
/src=/ reject 550 "mail with graphics is rejected"

In the above scenario, the search through body_checks would end at the
point a match was found in the FILTER email check line.

Is this possible?

Glen