next up previous contents
Next: Further Discussion Up: Acting (Filtering/Rejecting) Previous: Acting (Filtering/Rejecting)   Contents

exim filter

Here is an example of a portion of an exim filter. It takes any message tagged as spam and stores it in a mail folder. This is a good approach because no mail is lost, and no innocent person receives bounce messages as a result of their address being forged.

(exim 4) For details on what a filter file is and where it goes see section 21.10 of spec.txt[1] (specifically the 'allow_filter' option) and section 5 of filter.txt[2].

(exim 3) For details on what a filter file is and where it goes see sections 24.7 (specifically the 'filter' option) and 50.3 of spec.txt[3] and section 5 of filter.txt[4].

if
    $h_X-Spam-Status: contains "Yes"
        or
    "${if def:h_X-Spam-Flag {def}{undef}}" is "def" 
then
    logwrite "    => junk : SPAM"
    save $home/Mail/junk/spam/
    finish
endif



Derrick 'dman' Hudson 2003-11-06