the rift conspiracy


Checksubj for qmail
Summary: Checksubj is an email scanner for qmail
Platform: Linux, qmail
License: Freeware
Files: In files section.

I wrote checksubj.py after installing qmail and not feeling happy with either qtrap or checksubj. I needed something more powerful and easier to maintain. I also wanted to have a look at Python.

Hence checksubj.py was born.

You install checksubj.py the same way you'd install qtrap or checksubj. It does a lot more than just check the subject, it can check any header, any mime-header (handy for attached files or HTML) and any text in the body. Per rule you also get to chose whether to reject or bounce the mail. Additionally it uses perl regular expression.

checksubj.py stores its configuration in XML for easy maintainance.

The checks tag is used to group all the rules together. It also points to an optional logfile using the logfile attribute.

The header tag defines a header rule. This example checks the subject header for the pattern specified. For instance if the subject contains "virus found", the mail is silently deleted. If we wanted to bounce it back to the sender (which is a very bad idea in this case, we would add the attribute bounce="true".

There are many useful examples and a full description of the possible rules in the package. I hope you find this useful.