Re: [exim] Exim filter

Top Pagina
Delete this message
Reply to this message
Auteur: Kirill Miazine
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] Exim filter
* Tomasz Piotrowski via Exim-users [2018-06-29 15:29]:
> 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?


$home is never set in system filter.

> 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}" \
>                                                  }}
>
>
>
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/


-- 
    -- Kirill Miazine <km@???>