Re: [exim] Exim filter

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Kirill Miazine
Date:  
À: exim-users
Sujet: Re: [exim] Exim filter
* Kirill Miazine via Exim-users [2018-06-29 16:04]:
> * 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.


and besides, your transport sets directory explicetly....

> > 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@???>

>
> --
> ## 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@???>