Re: [Exim] user filters

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Peter Bowyer
Υ/ο: Exim-Users (E-mail)
Αντικείμενο: Re: [Exim] user filters
On Wed, 7 Apr 2004, Peter Bowyer wrote:

> Ron McKeating wrote:
> > The link "Exim's interfaces to mail filtering" in the only docs in
> > section 3.3 user filters gives an error. Is this now not available?
> >
> > I am trying to filter off email from a particular user and it just
> > does not work. I have file called .username in the users home dir. It

                                      ^^^^^^^^^
                                      ^^^^^^^^^
Does you Exim configuration look for that file? The normal default is to
use .forward.


> > contains the following filter
> >
> > # Exim filter
> >
> > if $sender_address matches "madeupuser@???"
> > then
> >         save "$home/Maildir/.Allumni/"
> >         seen finish
> > endif

> >
> > but when I get mail from madeupuser it does not save it in that
> > folder. The folder does exist, and I can drag and drop email into it
> > with a client (evolution) so the permissions should be ok. Any
> > thoughts appreciated. Exim 4.3 by the way.
>
> Not sure if $sender_address is available in a user filter - we use $h_from:
> for exactly this task which does the job.


$sender_address should be available. Using $h_from: can be tricky,
because it can contain "comments" as well as one or more addresses. Yes,
it is perfectly legal to have multiple addresses in a From: header line.

Try running debugging tests for that user. You should be able to run a
routing test with -bt, using -f to set the sender address. Does it find
and execute the filter? Have you used -bf to test the filter? Again, you
can use -f to set a sender address.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book