procmail
[Top] [All Lists]

Re: Recipe to exclude various lists

1999-07-03 12:26:04
At 12:09 PM 7/3/99 -0400, William McQueen wrote:
I am very much a beginner, but I use the following to save a copy of
all incoming mail to a directory called _backup. It is the first item
in my recipe. 

:0 c
_backup

However, there are some SIGs I don't want an extra copy of each
incoming mail. 

How may I alter or change the above to save *most* incoming mail, but
exclude, for example, digvid-l(_at_)ucdavis(_dot_)edu

The hard part is... where does the list identify itself?  This varies
from list to list; you'll have to look at the mail headers.
If it's in the SMTP MAIL FROM ("From_") then:

:0 c
* !^From (_dot_)*digvid-l(_at_)ucdavis\(_dot_)edu
_backup

This might be found in "Return-Path:" depending on your site.  But if
it's a LISTSERV(tm) list (the -L in the name makes me think it might be)
set up for occasional probes, note the probe mails have different MAIL FROMs;
your own address is encoded in there so they can track bounces.
I have found that:

:0 c
* !^From +owner-digvid-l(_dot_)*(_at_)ucdavis\(_dot_)edu
_backup

to be the type of pattern to exclude LISTSERV(tm) with or without probes.

On the other hand, some lists set Sender: or Resent-Sender: (the procmail
list, this one, uses the latter), so you'll just have to look.  RFC2369 (which
will eventually give you some standardized headers) isn't widely used yet.

The "!" there is a "not", and the condition lines are "and"ed... to exclude
multiple lists, you might have (for example):

:0 c
* !^From +owner-digvid-l(_dot_)*(_at_)ucdavis\(_dot_)edu
* !^Resent-Sender:(_dot_)*some-other-list(_at_)somewhere-else\(_dot_)com
_backup

Season to taste.

HTH,
Stan

<Prev in Thread] Current Thread [Next in Thread>