Qmail + SpamAssassin + selectivity

Posted by m6w6 on 18th November 2008 in Mike's sudden inspirations: SYS

Here’s how my qmail-queue script looks like to selectively check messages with SpamAssassin for non-relay clients only:

#!/bin/sh  
(if [ -n "${RELAYCLIENT+1}" -o `id -u` != 64011 ];   
    then cat -;   
    else /usr/bin/spamc -x -U /var/run/spamd/spamd.sock;   
fi) | /usr/sbin/qmail-queue.orig

For the records.