> Date: Fri, 21 Dec 2001 13:07:04 +0100
> From: giorgian <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: filters
>
> sorry if i reply only now, but i had some troubles with my mail... :(
>
> many thanks, now i use procmail and i'm almost happy.
> i still have a problem: there are some MLs which use a strange return
> path:
>
> focus-linux:
>
> Return-path: <[EMAIL PROTECTED]>
> where 1081 changes every time...
>
> a worse example is yahoogroops, which uses:
> Return-path:
><[EMAIL PROTECTED]>
>
> where 192652 is the mailing list (and i have to match it exactly,
> since i've subscribed many yahoo groups; the other numbers change
> evewry time.
>
> which regexp shall i use to do this?
A regexp that will match the header, of course. Is the Return-Path
header the only one by which you can identify the mailing list? I'm
subscribed to a few mailing lists myself, and I have to identify a
header by which I could tell traffic from the list every time I
subscribe to a new one. Couple of examples:
if (/^list-post: <mailto:dev@subversion\.tigris\.org>/)
{
to "$LISTDIR/svn-dev"
}
if (/^list-id: <freebsd-questions\.FreeBSD\.ORG>/)
{
to "$LISTDIR/freebsd-questions"
}
if (/^List-Unsubscribe: <.*@lists\.ispi\.net>/)
{
to "$LISTDIR/smarty"
}
if (/^List-Post: <.*@lists\.horde\.org>/)
{
to "$LISTDIR/horde"
}
if (/^Delivered-To: mailing list vim@vim\.org/)
{
to "$LISTDIR/vim"
}
etc. If the lists you mention can only be told by the Return-Path
headers (which I doubt), you could use something like this
(untested, and for maildrop. you'll have to edit it for procmailrc):
if (/^Return-path: <focus-linux-return/)
{
to "$LISTDIR/focus-linux"
}
if (/^Return-path: <sentto-192652/)
{
to "$LISTDIR/yahoo-list"
}
--
FreeBSD 4.4-STABLE
2:08PM up 4 days, 1:03, 18 users, load averages: 0.13, 0.23, 0.16