I have this rule that I created (thanks again to everyone who helped me
with it over the past few weeks) that allows me to filter mail into
folders based on the email address:
:0
* ^TO_ \/(_dot_)*(_at_)subdomain\(_dot_)domain\(_dot_)com
* MATCH ?? ()\/[^(_at_)]+
{
snr_String = $MATCH
snr_Search = "."
snr_Replace = "-"
INCLUDERC = inc/snr_fast.inc
:0
.$snr_Return/
}
Basically, if I get mail to amazon(_dot_)com(_at_)subdomain(_dot_)domain(_dot_)com, it gets put
into a folder called "amazon-com".
I now discovered a problem. If the email address contains a name in it,
the calculated folder name is screwed up. For instance, I recently got
an email with this To: line:
To: Timur Tabi <amazon(_dot_)com(_at_)subdomain(_dot_)domain(_dot_)com>
With the above rule, procmail tried to create a folder called "Timur
Tabi <amazon.com", which obviously didn't work.
I guess what I need is a way to strip out everything to left of and
including the < if found. Can anyone tell me how to do that?
--
Timur Tabi
This email is digitally signed with my public key (S/MIME).
Please use this key to encrypt all email sent to me.
Looking for a low-cost, full-featured web host?
Try DreamHost: http://www.dreamhost.com/rewards.cgi?thetabis
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail