[Exim] Bitbucket Filtering?

Etusivu
Poista viesti
Vastaa
Lähettäjä: JM Turner
Päiväys:  
Vastaanottaja: exim-users
Aihe: [Exim] Bitbucket Filtering?
Hello all,

I have a nice exim 3.35 and SpamAssassin 2.43 setup going with a system
filter which adds some special headers and a custom subject line to
outgoing spam. Management has made the decision to start bit-bucketing
high spam. Evidently some users are tired of seeing the spam
altogether.

I have a system filter which checks for the X-Spam-Flag: header, and
parses for the SA value, which drops into some if statements. There is
one if statement for 'yellow spam', which we classify as 'possibly'
spam, and one if statement for 'red spam' which we classify as
'probably' spam (think: the US terrorism alert color coding system). I
output the spam values to a log file, and then I'd like to toss the red
spam into the bit bucket. Adding a 'save /dev/null' didn't seem to
work. I tailed the mainlog file and got an 'original recipients ignored
(message_filter), but nothing after that. The message just seemed stuck
in the queue. The paniclog said that the process died with a signal 11
error.

I think I'm doing everything right. Anyone have any suggestions?

Jeremy

===== BEGIN exim.system.filter =====
# Exim filter
if $h_X-Spam-Flag: contains "YES" then
    if $h_X-OC-Spam: does not contain "e" then
        if $h_X-Spam-Status: matches "s\=([0-9]+)\.([0-9]+)" then
            if $1 is above "5" and $1 is below "10" then
                headers add "X-OC-Spam: Yellow"
                headers add "Subject: Yellow Spam -- $h_Subject"
                logfile /var/log/spam/spamlog
                logwrite "$1.$2"
#               pipe "/etc/exim/yellowspamcount 1.1"
            endif
            if $1 is above "9" then
                headers add "X-OC-Spam: Red"
                headers add "X-OC-Spam: Yellow"
                headers add "Subject: Red Spam -- $h_Subject"
#               pipe "/etc/exim/redspamcount 1.1"
#               save /dev/null
                logfile /var/log/spam/spamlog
                logwrite "$1.$2"
                unseen finish
            endif
        endif
    endif
endif
finish
===== END exim.system.filter =======


===== BEGIN exim.conf ==============
....
message_filter = /etc/exim/system.exim
message_filter_file_transport = black_hole
....
black_hole:
driver = appendfile
file = /dev/null
....
===== END exim.conf ===============



--
Jeremy Turner, Oklahoma Christian Univ     Phone: 405.425.5555
Email: Jeremy.Turner@???                Phone: 405.425.1820