[Techtalk] Help with procmail and $MATCH.

Mary Gardiner linuxchix at puzzling.org
Sun Jan 13 12:20:01 EST 2002


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?


Mary Gardiner
<mary at puzzling.org>

More information about the Techtalk mailing list