Tony L. Svanstrom writes:
Hi friendly helping people with lots of solutions... =)
I'm usings lots of incoming mboxes, applying all kinds of filtering and SPAM-
eating solutions depending on what incoming e-mails look like/contains; and
now
I'm going to add a whitelist-only incoming address.
The problem is that I want to extract the From:-address (as in "the user
expects a reply") as simply as possible, and nothing but the e-mailaddress;
normally I'd just use perl, but I want to keep this solution leaner... Any
suggestions?
But what exactly is the address the user expects a reply under? It may not
be the address in From:, but in the Reply-To: header. I.e. if the Reply-To:
header is present, it should be prefered over the From: header.
FROM=`formail -rt -x "To:"`
formail -r generates an auto-reply header, -t makes it use Reply-To: (if
present in the original message) or From: instead of the envelope sender,
and -x "To:" extracts the To: header, which formail has determined according
the above.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail