Re: Filtering mail w/ procmail
On Sat, May 12, 2001 at 11:07:25AM -0500, will trillich wrote:
> ah, yes. you wish to be inducted into the cult... step this
> way-- (door creaks open into darkness)
>
> the DN part is just a plain ol' variable:
> DB=`echo $MATCH | tr '[A-Z]' '[a-z]'`
> heck, that's just like in most any command shell.
>
> now, about that $MATCH gizmo.
>
> well, there's a much longer story, but here's the part you're
> interested in:
>
> after a pattern-match string such as
>
> * ^X-Loop: debian-\/[^@]+
>
> whatever string MATCHES AFTER "\/" is dumped into $MATCH.
> and \/ doesn't actually affect the pattern to be matched.
> here, since the following pattern is
>
> [^@]+
>
> and since what precedes is
>
> debian-
>
> then $MATCH will be "user" for debian-user@lists.debian.org,
> and "www" for debian-www, and so forth.
>
> and since the target for such matches is
>
> $DEBIAN-$DN
>
> any debian-user mail goes into my $MAILDIR/debian-user mbox.
>
> there's some cool stuff, procmailrc-wise in the form of hints
> and recipes and intros, at various websites. search for
> "procmail quick start"...
>
> don't forget to pay your dues to the executioner on your way out
> of the dungeon. when you do he'll give you a pointer to
> http://www.ii.com/internet/robots/procmail/qs/ which has a high
> "i wish i'd known about that last month" rating.
I think I will have to set up a procmail recipe for your emails and
save them in ~/mail/linux-tips. Thanks for the explanation. Your
emails are very educational.
Cheers
Mark.
Reply to: