OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Creating header/body_checks rules for UCE

From: Adam D (emlistsgmail.com)
Date: Wed Oct 18 2006 - 21:47:32 CDT


I have been searching and searching for help/answers on learning to create rules for header_checks beyond the simple /^Subject:.*test/ REJECT test. I have fund a lot of samples around on the net and from trial on error I have been able to figure somethings out but I still have a lot yet to learn. Is there a place I can go to learn how to created more than the simple rules for header and body checks? Are all the rules based on Perl and do I need to learn pearl for creating rules?

I have been able to figure out how to create a list of words in a rule (example1|example2|example3) and use it in a rule but as for phrases, postfix just whizzes by without an iota. (This is an example1|This is an example2|This is an example3) does not work the same. Here is my sample

/^Subject:.*\(This is an example1|This is an example2|This is an example3)\"$/
                                        DISCARD sample test

When I use that, Postfix still delivers it without dropping the mail. I am guessing it is because I am missing the proper format to include spaces. I have used "" and '\' but each one did not work.

This is my first time on the postfix list and I have yet a lot of learning on advanced header/body checks. I have been working hard on extensive rules for controlling UCE. I have compiled rules from many other people while including my own rules for UCE.

Another question I have regards the ifthen. I want all mail from a particular address xyzgmail.com with .gif as an attachment to DISCARD while all other address are delivered

such as:

if address=xyzgmail.com and attachment=*.gif then DISCARD

Thanks for the help.

-Adam