And it came to pass that Derek asked,
| I'm sure this has been asked many times previously, but I don't see
| anything in the FAQ addressing this. I'd like to extract the sender's
| email address only and compare it to a blacklist. I can extract the
| From: header using formail, of course, but I want to eliminate everything
| but the email address.
The bigger stumbling block is that the address in the From: header is not
necessarily the author of the message. Sometimes, though, it's all we have
to go by.
The -r and -rt options to formail will strip an address of comments and get
down to the email address when they prepare the To: header of a reply. -r,
though, prefers From_ to From: and -rt prefers Reply-To: to From:, so we
have to get around that:
:0h
er_whoever=| formail -IReply-To: -rtzxTo:
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail