Introduction to CRM114CRM114 is a system to examine incoming e-mail, system log streams, data files orother data streams, and to sort, filter, or alter the incoming files or data streamsaccording to the user's wildest desires. Criteria for categorization of data can be bysatisfaction of regexes, by sparse binary polynomial matching with a Bayesian ChainRule evaluator, or by other means. Accuracy of the SBPH/BCR classifier has beenseen in excess of 99 per cent, for 1/4 megabyte of learning text. In other words,CRM114 learns, and it learns fast . 1Lets start with obtaining CRMYou can pull off the latest version from http://crm114.sourceforge.net/. Since thesoftware is always in development and numerous bug fixes come out often check thesite at least monthly. Alternatively sign up for their mailing list at:http://lists.sourceforge.net/lists/listinfo/crm114-generalNow let’s compile and install CRMYou can build CRM with gnu regex libraries or the TRE regex libraries. The TRElibraries are recommended and come with the source.Build your TRE:#cd tre-<ver >#./configure#make#make intallYou now should have libtre installed in /usr/local/lib:/usr/local/lib/libtre.so.3/usr/local/lib/libtre.so.3.0.1/usr/local/lib/libtre.so/usr/local/lib/libtre.la/usr/local/lib/libtre.aNow you are ready to compile CRM. By default the binaries will go to /usr/bin. If youwould like a different location edit the Makefile and edit INSTALL_DIR direcective#gunzip crm114-<ver>.tar.gz#tar xvf crm114-<ver>.tar#cd crm114-<ver>#make clean#make install*Please note if compiling on Solaris use GNUmake otherwise compilation will fail. http://www.macroscape.com*Also part of the Makefile is a strip command, which will not work on Soalris either unless you can obtainthe GNU version. You can just comment out all the refernces to “strip” in the Makefile and it will work justfine.“Make install” will install the following files into /usr/bin: crm - the CRM114 "compute engine". cssutil - the .css file check/verify/edit program cssdiff - the .css file diff program cssmerge - the .css file merging programPick a directory where you will store all the .crm, .css and .mfp files and copy all ofthem to the destination#cp *.css /path/to/crm#cp *.mfp /path/to/crm#cp *.crm /path/to/crmObtaining or recreating .css filesWhile the .css files that you can download fromhttp://crm114.sourceforge.net/crm114-2003-09-20-Beta.css.tar.gz are prettysubstantial in size and have been trained well, They will not work on Sparcarchitecture, furthermore it is best to train your spam according to what spam youget.The first thing to do is create the new spam and nonspam css files:cssutil -b -r /path/to/spam.csscssutil -b -r /path/to/nonspam.cssEditing mailfilterconfig.crm fileFirst thing to do is you need to change your password:# ------------define the secret password ---------- YOU NEED TO CHANGE THIS!#isolate (:spw:)alter (:spw:) /your_password_here/The rest of the options are very well documented within the file itself so we will notspend much more time on this.One option for mime encoding needs to be changed from the default:alter (:mime_decoder:) /mimencode -u/ http://www.macroscape.comYou will need to download mimencode for Solaris and install the package.Configuring postfix and procmailWe are assuming you already have postfix running and procmail installed, if not referto their respected documentation. There is not much to do within postfix to enableprocmail.Method A – Global procmailrc file(not recommended since that will only use one mailfilter.crm file for all users)1.Pick a directory where you will store all the .crm, .css and .mfp files ((for ex./etc/opt/crm) and copy all of them to the destination#cp *.css /path/to/crm#cp *.mfp /path/to/crm#cp *.crm /path/to/crm2.Create a global procmailrc file in /etc/Change permissions on the file to:#chmod 644 /etc/procmailrc3.Edit your main.cfmailbox_command = /usr/bin/procmail -pm /etc/procmailrcCRM use to come with a procmail recipe to use in its distribution, however wechanged it a bit to reflect our environment:------------------------------------------------------------------------------SHELL=/usr/bin/sh #Use the Bourne shell (check your path!)MAILDIR=$HOME #LOGFILE=$MAILDIR/procmail.logDEFAULT=$HOME/MailboxLOG="--- Logging ${LOGFILE} for ${LOGNAME}, ":0fw: .msgid.lock| /usr/bin/crm –u /etc/opt/crm mailfilter.crm:0:* ^X-CRM-Rejected:.*mail/crm-spam# Accept all the rest to your default mailbox:0:${DEFAULT}------------------------------------------------------------------------------ http://www.macroscape.comThe logging can be disabled, however it’s a good idea to have it on at first to performany troubleshooting. Your procmail.log will give you pretty good indication on wherethe issue is regarding CRM configuration4.Reload postfix#postfix reloadAfter reloading you will see similar messages in your mail log file:Sep 28 03:13:32 host.example.com postfix/local[19273]: [ID 197553 mail.info]92B4A26E57: to=<
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
>, relay=local, delay=1, status=sent ("|/usr/bin/procmail -pm /etc/procmailrc")Method B – Per User Spam filteringFor this method no changes to Postifx configuration is needed. Postfix supports.forward files out of the box.1.Once the binaries are installed, each user will have to have all the above .css, .crmand .mfp files which you can preload for them in their home directories:For ex. /export/home/user/crmRemember to chown –R:#chown –R user:group /export/home/user/crm#chmod –R 700 /export/home/user/crm2. I would suggest generating new .css files for each user and instructing them onhow to train CRM (see the HOWTO fromhttp://crm114.sourceforge.net/CRM114_Mailfilter_HOWTO.txt)3. Each user will need a .forward and .procmailrc filesthe .forward file will need to contain the following:"|exec /usr/bin/procmail -pm /export/home/user/.procmailrc"the .procmailrc file can be used from above with a minor change of invoking crm:| /usr/bin/crm -u /export/home/user/crm/ mailfilter.crm http://www.macroscape.comReferences1.Bill Yerazunis, Mailfilter HOWTO,http://crm114.sourceforge.net/CRM114_Mailfilter_HOWTO.txt domain zengin loan ihracat
|