procmail
[Top] [All Lists]

parsing "To:" and "Cc:" fields (need help)

1997-02-12 17:57:36
hi gang

i've been happily plugging away with procmail for several years, and up
until now it has been a 1-user environment, but now i have several users
that i "distribute" e-mail for, and my simplistic (but working) recipes
don't work in this new case.

basically, i have a domain name (towel.com) managed by an ISP (best.com),
and e-mail for <anyuser>@towel.com goes to my single user account at the
ISP (dano(_at_)best(_dot_)com).  so i potentially have mail for 
"tom(_at_)towel(_dot_)com,"
"dick(_at_)towel(_dot_)com," and "harry(_at_)towel(_dot_)com" all ending up at 
"dano(_at_)best(_dot_)com(_dot_)"
so, i need a recipe that parses the "To:" field and figures out which
"towel.com" recipients need to get delivery.  the simple case is if there
is only one "towel.com" recipient (which, for awhile, i was erroneously
assuming), and the more complicated case is a mixture of "towel.com"
recipients (which i care about) and non-"towel.com" recipients (which i
don't care about).

a quick parsing class or an actual example would be great!!!

thanks in advance

-dan

<Prev in Thread] Current Thread [Next in Thread>