[exim] Exim filter

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Tomasz Piotrowski
Fecha:  
A: Exim-Users
Asunto: [exim] Exim filter
Hi,


I want to enable exim filter and move spam to spam directory, but my
config isn't work. Can you look what is wrong?


In exim.conf i have"

system_filter           = /etc/exim4/exim.filter
system_filter_directory_transport = mysql_delivery


In exim.filter

# Exim filter
if $h_X-Spam-Score: contains "+++++" and
$h_to: contains "szpital.wloclawek.pl"
then

    logfile /var/log/exim4/mainlog
    logwrite "$tod_log $message_id Mail tagged as *** SPAM ***"
    headers add "Old-Subject: $h_subject"
    headers remove "Subject"
    headers add "Subject: *** SPAM *** $h_old-subject"
    headers remove "Old-Subject"
    save /${home}/.Spam
    finish

endif


In transport.conf:

#****************************
mysql_delivery:
#****************************
        driver                  = appendfile
        directory               = ${lookup mysql { \
                                                SELECT
CONCAT("/var/mail/virtual/",  s.maildir, "Maildir") AS directory \
                                                FROM mailbox AS s \
                                                WHERE
s.local_part="${quote_mysql:$local_part}" \
                                                }}
        create_directory
        maildir_tag             = ,S=$message_size
        maildir_format
        maildir_use_size_file
        group                   = EXIM_GROUP
        delivery_date_add
        envelope_to_add
        return_path_add
        mode                    = 0660
        quota                   = ${lookup mysql { \
                                                SELECT quota FROM mailbox \
                                                WHERE
username="${quote_mysql:$local_part@$domain}" \
                                                 }}