[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

spamassassin



I know, I know... every 2 months someone (like me) comes to the list 
asking how to integrate spamassassin with zmailer...

I also know what Eugene will say: "spamassassin is waaaaay too slow to 
handle any real traffic" :-)

However, I'm being asked to do AntiSpam tagging (not deleting) for a 
relatively high volume ISP, and the only open tool I know is 
spamassassin...

Situation is, I'm on a border smtp gateway with no users in it, just 
accept, tag, and deliver.

I don't like the procmail approach... Eugene once said he did it in 
cf/process.cf ( http://www.zmailer.org/mhalist/2003/msg00166.html ).

How would that be done?

I don't know how to zmsh, but I could write a small C filter that reads a 
queue file from stdin, calls spamd using libspamc passing the original 
message (sāns envelope) and, based on what spamd answers, adds a couple 
of headers before writing it (with envelope) to standard output...

That should be invoked (if I understand correctly) just before calling 
the rfc822 function... but can this be done without an intermediate file?

Otherwise, could it look like this (on cf/process.cf)?
========================<CUT>=============================
        case "$file" in
#       [0-9]*.x400)    x400 "$file" ;;
#       [0-9]*.uucp)    uucpfilter "$file" > /tmp/X.$$
#                       cat /tmp/X.$$ > "$file"
#                       rfc822 "$file" ;;
        [0-9]*)         /usr/local/bin/CheckSpam "$file" > chkspm."$file"
                        /bin/rm -f "$file"
                        rfc822 chkspm."$file" ;;
        core*)          /bin/mv "$file" ../$file.router.$$
                        return
                        ;;
        *)              /bin/mv "$file" ../postman/rtr."$file".$$
                        return
                        ;;
        esac
========================<CUT>=============================

or maybe:
========================<CUT>=============================
        case "$file" in
#       [0-9]*.x400)    x400 "$file" ;;
#       [0-9]*.uucp)    uucpfilter "$file" > /tmp/X.$$
#                       cat /tmp/X.$$ > "$file"
#                       rfc822 "$file" ;;
        [0-9]*)         /usr/local/bin/CheckSpam "$file" > chkspm."$file"
                        /bin/mv chkspm."$file" "$file"
                        rfc822 "$file" ;;
        core*)          /bin/mv "$file" ../$file.router.$$
                        return
                        ;;
        *)              /bin/mv "$file" ../postman/rtr."$file".$$
                        return
                        ;;
        esac
========================<CUT>=============================

is this correct?
is it less unefficient than other methods?

TIA.

--
Mariano Absatz
El Baby
----------------------------------------------------------
There's too much blood in my caffeine system.


-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi