[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Killfiling people with procmail or exim (Was: Re: Gnome problems in unstable)

ScruLoose(scruloose+debuser@eastlink.ca) is reported to have said:
> On Sun, Apr 20, 2003 at 08:53:28PM -0400, Wayne Topa wrote:
> > Jamie Lawrence(jal@jal.org) is reported to have said:
> > > On Sat, 19 Apr 2003, ScruLoose wrote:
> > > 
> > > > In the meantime, I think I'll look into how to plonk somebody via my
> > > > exim filter .forward file.  Shouldn't be too hard.
> > > 
> > > Can't help you with exim, don't use it. But if should you start employing
> > > procmail, it is easy:
> <SNIP>
> > 
> > This works for me in exim.
> > 
> > if  $h_From:  contains  "Hell.Surfers@"
> > then
> >     seen
> >     finish
> > endif
> Short, sweet, to-the-point.  I like it.
> I think I'm a little confused about the logic of the exim filter
> process, though...
> What I've been using to sort my mail (list-specific inboxes, etc) runs
> something like this:
> if (condition)
> then (seen save some-place)
> endif
> if not delivered
> then
>    if (other-condition)
>    then (seen save some-other-place)
>    endif
> endif

I 'only' use seen in rules that discard mail.  Normal rules never use seen here.
#Debian Mailing Lists
if $h_X-Mailing-List: contains "debian-user"
        save $home/mail/Lists/debian-user

I have this as the last rule in the .forward file
   not delivered
   save $home/mail/admin

> etc.
> Now, your usage of "seen finish" inside an if-then statement seems to
> imply that if I slap "finish" (or "seen finish") on the end of each
> delivery action, I won't need to do the "if not delivered" test at the
> beginning of each condition...
>From spec.txt:
When a message is discarded as a result of the command 'seen finish' being
obeyed in a filter file which generates no deliveries, a log entry of the form

  1998-12-10 00:50:49 0znuJc-0001UB-00 => discarded
    <low.club@trick4.bridge> D=userforward

and from my /var/log/exim/mainlog:
<= Hell.Surfers@cwctv.net H=localhost [] P=esmtp S=5259 id=0ccf23952011543DTVMAIL9@smtp.cwctv.net
<= Hell.Surfers@cwctv.net U=mail P=spam-scanned S=5553 id=0ccf23952011543DTVMAIL9@smtp.cwctv.net
=> discarded <wtopa@localhost> D=userforward
> ie, as soon as it finds a rule that matches, it'll do the delivery, and
> then "finish" will tell exim to NOT look for any further matches, just
> forget this message and start processing the next one...
> Is that correct?
> (Sorry if this is in the docs... exim's docs are plenty comprehensive,
> but I have a helluvatime finding answers in there.)
> > :-) HTH, YMMV, HAND :-)
> 'HAND'?  I don't know that one.

HTH=Hope This Helps, YMMV=Your Mileage May Vary, HAND=Have A Nice Day


Computers are not intelligent. They only think they are.

Reply to: