HOWTO: Use re2c and compiled SpamAssassin rules
Julian Field
MailScanner at ecs.soton.ac.uk
Sun May 6 11:51:26 IST 2007
-----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
- --
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.6.1 (Build 1012)
Charset: ISO-8859-1
wj8DBQFGPbQxEfZZRxQVtlQRAiIDAJ96MwjVldiCLcqhPghe+iHdKdq+4wCdE94p
J5dKYLH+ldoVOIqTR74s8Mo=
=Z068
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk
More information about the MailScanner
mailing list