procmail
[Top] [All Lists]

parsing email addresses

2002-11-16 09:14:03
Has anyone written a procmailish approach to extracting each email-address / 
comment
pair in a header?

And yes as Era points out these may not even come in pairs - 
<quote>

        From: era eriksson <era(_at_)iki(_dot_)fi>
        From: era(_at_)iki(_dot_)fi
        From: era(_at_)iki(_dot_)fi (era eriksson)

    and the following are entirely possible:

        From: era(_at_)iki(_dot_)fi (this is a comment with no useful content)
        From: "'era(_at_)iki(_dot_)fi'" <era(_at_)iki(_dot_)fi>    ; Microsoft 
braindeath
        From: era (thass me!) eriksson <era(_at_)iki(_dot_)fi> (fer sure)
</quote>

Anyway, I want to process each actual email in (say) a To: headers and
after possibly changing the actual email address, I want to place the orginal
comment part in the new header.

So any offers for a reasonably native and RFC compliant parsing routine?

thanx
-- 
Eric Smith

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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