Would it handle
From: "Geoff T. Mulligan" <geoff(_at_)hz(_dot_)com>
Just curious
-----Original Message-----
From: Geoff Mulligan [mailto:geoff(_at_)mulligan(_dot_)com]
Sent: Wednesday, March 14, 2001 11:42 AM
To: Timothy J. Luoma; Donal Patrick Conway;
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: RE: Space at start of name
Here is my solution for grabbing the real name. If the only text is the
email address it grabs that. It does it with two processes rather than
four.
It handles:
From: Geoff Mulligan <geoff(_at_)hz(_dot_)com>
From: geoff(_at_)hz(_dot_)com (Geoff Mulligan)
From: geoff(_at_)hz(_dot_)com
FROM=`formail -z -xFrom: | \
nawk '{a=$0; sub(/[^ ]*(_at_)[^ ]*/,"",a);if(a=="") print $0; else {gsub(/
*[()<>]/, "",a);print a}}'`
If you don't want to capture email addresses you can use this
FROM=`formail -z -xFrom: | \
nawk '{sub(/[^ ]*(_at_)[^ ]*/,""); gsub(/ *[()<>]/, "");print $0}}'`
geoff
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail