procmail
[Top] [All Lists]

Re: Extract senders address

2008-06-05 08:12:53
At 10:02 2008-06-05 +0100, Eduardo Luís wrote:

[snippety]

Variable REPLYTO_ is allways foo(_at_)bar

Q: is there a Reply-To: HEADER in these messages to begin with?

Both of the recipes you show, which are rather antiquated, rely upon the Reply-To: header actually being present. Save a message to a file and do the following:

egrep "^Reply-To:" testmessage

and

formail -cXReply-To: < testmessage

in both cases, unless there IS a Reply-To header present, the output will be empty. Which means, right off the bat, the REST of pipelines above will be operating based on an empty input. formail uses foo(_at_)bar to represent "what the hell, I need to return an address token, and this one should raise some eyebrows".


Try:

        # Here we have to call shell.... -rt will parse return address
        # according to RFC rules.  Note we only process HEADER.
        :0 h
        SENDER=|formail -b -rtzxTo:

Note how much simpler that is?

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
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>