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

Re: [SLUG] Procmail woes



On Mon, May 01, 2000 at 12:25:20PM +1000, John Clarke wrote:
> On Sun, Apr 30, 2000 at 09:02:59PM -0400, nicko@nospam.acay.com.au wrote:
> 
> > Seeing as the Slug list is expanding, I thought it's about time I set up
> > procmail to sort the mail into neat piles.
> 
> Check out Terry Collins's info on sorting mail at:
> 
>   http://www.woa.com.au/linux/how-tos/sortingmail.html
> 
> There's a section on procmail which includes an example.  I can assure you
> it works, the example is my .procmailrc :-)
> 
> This is the rule I use to catch all messages from this list and put them
> into ~/Mail/slug:
> 
> # Sydney Linux Users Group list
> :0:
> * ^Sender: owner-slug@nospam.newtreno.spectrum.com.au
> Mail/slug

If you are going to filter you should try to do so on the "official" address
as much as possible. Sender address often change, official one rarely do. 
I'd also recommend:

:0:
^TOslug@nospam.slug.org.au
Mail/List/slug

Which catches To:, CC:, Resent-* and a few other fields. Though it isn't
at useful as List-Id.

Even nicer, if the list owner includes it, is filtering on List-Id (or
other non-standard varient) like this:

:0
* ^((List-Id|X-(Mailing-)?List):(.*[<]\/[^>]*))
{
	LISTID=$MATCH

	:0:
	* LISTID ?? debian-\/[^@nospam..]*
	Mail/Debian/$MATCH

	:0:
	* LISTID ?? .*\/[^@nospam..]*
	Mail/List/$MATCH
}

What this does is search for a List-Id, strip its contents and deliver to
mailbox of the same name. If it is a debian-* list it puts it somewhere
else.

This is especially cool because lists that use List-Id are automatically
sorted into their own folder without you having to do anything special.

Combine this with Mutt and its ability to automagically pick up new
mailboxes and you rarely have to touch a .procmail file again.

Anand

PS: For our list owner RFC2369 is a good reference. List-Id is on the
standards track but has not yet been allocated an RFC number (see
<URL: http://www.rfc-editor.org/queue.html>


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text