The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

crm114-milter - CRM114 Sendmail Milter

SYNOPSIS

crm114-milter [ --verbose ] [ --fileprefix='path' ] [ --traininguser='user' ] [ --miltername='milter' ] [ --help ]

DESCRIPTION

This is an example Sendmail::PMilter for the CRM114 program. This milter performs 2 basic functions. The classifying of spam by CRM114, and the training of CRM114 for spam and non spam emails. The crm114-milter currently only adds the header X-CRM114-Status to the email. The status will be either "SPAM" or "Good".

CRM114 comes with a CRM script called mailfilter.crm. This script is used to classify emails and train the CRM114 css files. To learn how to setup CRM114 follow steps 1, 2, 3, 4, & (optionally) 7. Perform these tasks in a directory of your choosing. For this example, we use /etc/mail/crm114:

        mkdir /etc/mail/crm114
        cp mailfilter.cf /etc/mail/crm114
        cp mailfilter.crm /etc/mail/crm114
        cp *.mfp /etc/mail/crm114
        cssutil -b -r spam.css
        cssutil -b -r nonspam.css
        cp spam.css /etc/mail/crm114
        cp nonspam.css /etc/mail/crm114

SENDMAIL CONFIGURATION

Configuration is simple, add this line to your sendmail.mc file. The default behaviour of crm114-milter will like this.

 INPUT_MAIL_FILTER(`crm114', `S=local:/var/run/spammilter/crm114.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl

A user to send training emails is helpful in this type of environment. Set it up for a group of admins to train the CRM114 css files. The default user is "toe", as reminder to "train on errors". Setting up an alias in /etc/aliases, isn't a bad idea either...

 toe:   root

Don't forget to run newaliases.

TRAINING

In order to train, you will need to modify the crm114-milter file and change the secret to something appropriate for your site.

For spam or nonspam, forward the incorrectly identified email to the training user. crm114-milter will key off of that user being sent email and train accordingly. If the email was classified as SPAM, and was not, forward incorrectly classified email to the training user, with the Subject: nonspam <your secret here>. If the email was SPAM, and was classified as Good, again forward the email to the training user, but with the Subject: <your secret here>.

SPAMASSASSIN

If you wish to integrate the crm114-milter with spamassassin, make sure you put the crm114-milter before spamassassin in the InputFilter order. Then you can create simple rules such as:

 header CRM114_SPAM      X-CRM114-Status =~ /SPAM/
 describe CRM114_SPAM    CRM114 Spam: CRM114 classifies this as spam
 score CRM114_SPAM       2.0

 header CRM114_GOOD      X-CRM114-Status =~ /Good/
 describe CRM114_GOOD    CRM114 Good: CRM114 classifies this as good
 score CRM114_GOOD       -2.0

BUGS

Yeah, probably. Send me what you find.

SEE ALSO

perl(1), Sendmail::PMilter

AUTHORS

Bob Tribit <btribit@newportal.com>