procmail
[Top] [All Lists]

Re: Formail issue with weird headers

2001-11-25 08:35:09
On 25 Nov, CaT wrote:
| On Sat, Nov 24, 2001 at 11:07:46PM -0500, Don Hammond wrote:
| > On 24 Nov, CaT wrote:
| > | I have a message that begins like this:
| > | 
| > | From linux-kernel-owner(_at_)vger(_dot_)kernel(_dot_)org  Sat Nov 24 
11:27:02 2001
| > | >From hogarth  Sat Nov 24 11:27:02 2001
| > | Return-Path: <linux-kernel-owner(_at_)vger(_dot_)kernel(_dot_)org>
| > | Received: from localhost (root(_at_)localhost [127.0.0.1])
| > |         by theirongiant.weebeastie.net (8.12.1/8.12.1/Debian -2) with 
ESMTP id fAO0R0UL006328
| > |         for <hogarth(_at_)localhost>; Sat, 24 Nov 2001 11:27:02 +1100
| > | ...
| > | 
| > | And I'm trying to use formail to rename/get rid of the >From line but
| > 
| > If you have lines beginning ">From ", then I'd think they're probably in
| > the body of the message and not in the headers. If so formail won't work
| 
| No. It's in the header section. Just below the real From_ line just as
| shown above. I need it gone because it's causing sendmail to barf all
| these messages when I bounce them to an alternate address. There's only
| ever one and it's always in that position.
| 
| I'd use sed as you suggest but I don't want to touch any occurances in
| the body of the message.
| 

Then simply changing the flags on the first recipe offered to make it a
header rather than body filter, and adjusting the condition accordingly
should work:

:0fhw
* ^>From +
| sed s/>From/X-Escaped-From:/

That doesn't explain why your formail invocation isn't working and
whether it could be made to work, but it should get the job done. It
also doesn't address whether something else is broken. I don't think
these should be escaped in the headers. I think they should be removed.
But that's another issue, probably for another forum, and definitely
for someone who knows more than I do.

-- 
Reply to list please, or append "6" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.


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