[Techtalk] Help with procmail and $MATCH.
david at lupercalia.net
Sun Jan 13 01:24:20 EST 2002
On Sun, Jan 13, 2002 at 11:20:01AM +1100, Mary Gardiner wrote:
> procmail is a powerful but complex mail sorting agent, useful for people
> who receive a large volume of mail. Some mail agents (Evolution, Outlook
> and variants) have their own mail sorting that has similar functionality
> to procmail. More information at http://www.procmail.org/
> My procmail problem:
> I have all my Linuxchix mail in one folder, using this procmail rule:
> :0: # match everything To: or Cc: an address
> * ^TOlinuxchix # containing "linuxchix" and place it in
> Tech/Linux/Linuxchix/ # Tech/Linux/Linuxchix/ (/ on the end means use
> # the Maildir format).
> I've decided to sort all my Linuxchix lists into different folders, but
> I'm lazy and don't want to write a rule for each list. I'm trying:
> * ^TOlinuxchix
> * ^TO\/[A-Za-z]*
> What I *think* this says is "for anything that has 'linuxchix' in the To:
> or Cc: field, first try and match a string of alphanumerics (hopefully
> the list name) and place it in a subfolder using the name of that match,
> otherwise use the default folder."
> But everything is ending up in the default folder.
> Procmail's neutered regexps in which the group must be specified at the
> end of the regular expression aren't helping :(
> Anyone got any ideas?
I just do it like this:
David C. Merrill http://www.lupercalia.net
Linux Documentation Project david at lupercalia.net
Collection Editor & Coordinator http://www.linuxdoc.org
Microsoft is - and will be - important, but it's hard to predict this stuff.
Say you'd been around in 1980, trying to predict the PC revolution. You
never would've come and seen me.
--Bill Gates in Wired 2.12
More information about the Techtalk