[Exim] system filter

Góra strony
Delete this message
Reply to this message
Autor: Ryan Tracey
Data:  
Dla: exim-users@exim.org
Temat: [Exim] system filter
Hi

I am filtering out spam using a system filter which culminates in something like:

if($n9 is above 99)
    then
    save /var/log/exim/increment.spool 0644
    logfile /var/log/exim/increment.log 0644
    logwrite "[$tod_log] (score=$n9) ${lc:$sender_address} ($sender_host_name[$sender_h
ost_address]) -> recipients=$recipients (recipients=$recipients_count) subject=$header_
subject"
    seen finish
endif


Unfortunately, I do get some false positives and usually use mutt to bounce the falsely
caught email. However, it is fairly time consuming to find the real email in amongst all
the spam in /var/log/exim/increment.spool. I'd like to try and save the caught emails to a
file based on the recipient of the email. Something like:

    save /var/spool/mail/spam.${local_part}


Now, I know that ${local_part} is not available in the system filter. What is the
alternative? I guess that what I really need to do is something like this:

    for address in $recipients
        save /var/spool/mail/spam.${local_part:$address}


I'm reading through filter.txt for an answer (and have probably not noticed something I
should have noticed) but if anyone can offer any advice I'd appreciate it.

TIA

Cheers,
Ryan

--
Ryan Tracey          | +27 21 917 8909
Thawte Certification | https://www.thawte.com