procmail
[Top] [All Lists]

Re: case insensitive $MATCH

2005-04-10 04:19:38
Am 2005-04-10 17:49:50, schrieb Troy Piggins:
Hi.  I use the following (modified) recipe to filter list mail:

:0:
* ^TO_\/(announce|general)@lists\.example\.com
* MATCH ?? ()\/[^(_at_)]+
lists-$MATCH

To date it has been working fine.  This morning someone sent a mail
to General(_at_)lists(_dot_)example(_dot_)com (capital G), so a new mbox was 
created
lists-General right alongside the already created lists-general
(which is where I want those mails).

Since this is the first time it has happened, I don't know if it is
a rare enough occurrence to not worry about it.  But I just have to
know how to handle it in future.

So the question is - is there a way to extract the match out of the
first condition, then make lower case if not already, to deliver to
the intended mbox?

I have seen the procmail example here on the list, but do not know
where and so I use curently:

TMATCH=`echo $MATCH |sed 
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/`

This transliterater all Capitals to lower case.

Do not know the syntax of 'tr' but it is much shorter  :-)

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>