Integrate Spamassassin with Qmail

Install the following package in order to integrate spamassassin with qmail.
1. mess822 package (
2. Spamassassin (

Installing mess822 package
#cd /usr/local/src
#tar -xzf mess822-0.58.tar.gz
#cd mess822
#make setup check

Integrating spamassassin with qmail
Download ifspamh script and copy it to /usr/local/bin.

#cp ifspamh.1.5 /usr/local/bin/ifspamh
#chmod +x /usr/local/bin/ifspamh

Check if location of spamc is mentioned correctly within ifspamh script.

Suppose you have a mail user with his Maildir at /home/ and the dot qmail file /home/ Then .qmail-test must looks like:


Now add a file /home/ with the following contents


If you want to discard spam mails, just put a # at the first line of /home/

If you get the following error, check out for the fix below;

mess822-0.58]# make
./load iftocc mess822.a getln.a strerr.a substdio.a \
stralloc.a alloc.a error.a env.a str.a case.a fs.a open.a
/usr/bin/ld: errno: TLS definition in /lib/ section .tbss mismatches non-TLS reference in strerr.a(strerr_sys.o)
/lib/ could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [iftocc] Error 1

make check install

This is the most often reported installation error. This is caused because the program does not contain the errno.h file.

you get the above errors while installing mess822 package.

You can fix this problem by modifying two configurations files. (Changes to any one of the conf file may work, but sometimes you may have to edit both confs).

Move present conf-cc to conf-cc.back and create a new conf-cc to read:
gcc -O2 -include /usr/include/errno.h

Do the following modifications In the error.h file.

remove the line:
extern int errno;

add the line:
#include <errno.h>

Now, the compilation should work fine.

Originally posted on :


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s