Re: [exim] .forward (filtering) everyting matches first filt…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: relic
Date:  
À: exim-users
Sujet: Re: [exim] .forward (filtering) everyting matches first filter
On Sat, 2004-09-11 at 15:03, Andreas Metzler wrote:
> On 2004-09-11 relic <relic@???> wrote:
> > I try to filter mailinglists, local mail, work-related etc.
> > and move this to corrosponding maildir directories.
> > But everything that matches the first filter.
>
> > What am I doing wrong?


> At first glance you are obviously missing some "finish". A mail with
> "Subject: Cron Daemon is ok." will match all three rules and will be
> delivered in an all three listed mailboxes. You also seem not to be
> aware of the fact that "matches" is a regex-match, i.e. "vanilla"
> matches "[exim]". (The "i" in vanilla matches the "i" in the set gven
> in square brackets).
>


Aha. didn't know matches worked like that.
Taught that "contains" wanted a complete string and "matches"
just part of a string (in my logic).

I have found a document that disribes things and ended up with this:
This also doesn't work as wanted.


if $header_to: contains "ck@???" or
   $header_cc: contains "ck@???"
then
    save $home/.maildir/.ck-sources-ml/
    finish
endif


if $header_to: contains "exim-users@???" or
   $header_cc: contains "exim-users@???"
then
    save $home/.maildir/.exim-users-ml/
    finish
endif


if $header_to: contains "gnome-list@???" or
   $header_cc: contains "gnome-list@???"
then
    save $home/.maildir/.gnome-users-ml/
    finish
endif


if $header_From: contains "Cron Daemon <root@localhost>"
then
    save $home/.maildir/.cron-jobs/
    finish
endif


Why is the header field "List-Id:" not recognized?
Like this:

if $header_List_Id: contains "A user list for the exim MTA
<exim-users.exim.org>"
then
....

kr, relic.