HOWTO: Use re2c and compiled SpamAssassin rules

Alex Broens ms-list at alexb.ch
Sun May 6 13:47:49 IST 2007


On 5/6/2007 12:51 PM, Julian Field wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This is intended as a brief guide to using the program "re2c" to 
> generate compiled rules which speeds up SpamAssassin quite a bit.
> 
> Please can someone (who understands the wiki's text formatting system) 
> upload this to the wiki for me!
> 
> 1) Download the program "re2c" from 
> "http://sourceforge.net/projects/re2c". If you are running an RPM-based 
> system then download the .src.rpm file, else download the .tar.gz file.
> 2) Build "re2c".
> 2a) If you downloaded the .src.rpm file, then
>        rpmbuild --rebuild re2c*.src.rpm
>        cd /usr/src/redhat/RPMS/i386 (swap "redhat" for "packages" if 
> that dir doesn't exist)
>        rpm -Uvh re2c-0.12.0-1.i386.rpm (i.e. not the "debuginfo" version 
> of the file)
> 2b) If you downloaded the .tar.gz file, then
>        tar xzf re2c*tar*gz
>        cd re2c*
>        ./configure
>        make
>        make test
>        make install
> 3) Compile the current set of SpamAssassin rules
>        sa-compile
> 4) Tell SpamAssassin to use the compiled rules. Edit 
> /etc/mail/spamassassin/v320.pre and uncomment the line
>        loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
>     by removing the "# " from the start of the line.
> 5) If you are using Rules-Du-Jour then tell it to recompile the rules 
> after it downloads them. Edit the file /usr/bin/rules_du_jour and look 
> for the line that contains
>        SA_RESTART="
>     Change this line to say
>        SA_RESTART="sa-compile && /etc/init.d/spamassassin restart";
> 6) Restart MailScanner.
> 
> If you have any problems, let the mailing list know.

Jules

I'd say that if you use MS and RDJ the restart command should be

  SA_RESTART="sa-compile && /etc/init.d/MailScanner reload";

Alex



More information about the MailScanner mailing list