procmail
[Top] [All Lists]

Re: Problems with Qmail + SpamBouncer

1999-12-09 02:27:33
Philip Guenther wrote:
To back up a step or two, where is that bogus "From " line being
generated?  Is it in the message as fetched by fetchmail?
My ISP sends me only one "From "  line,  as expected.  Qmail  adds these lines
*before* the original "From ", making it incorrect:

 From XXXXXX(_at_)mclink(_dot_)it Tue Nov 02 16:35:59 1999
 Return-Path: <XXXXXX(_at_)mclink(_dot_)it>
 Delivered-To: paolo(_at_)freddy(_dot_)casamia(_dot_)it
 Received: (qmail 313 invoked from network); 2 Nov 1999 16:35:58 -0000
 Received: from localhost (HELO freddy.casamia.it) 
(paolo(_at_)127(_dot_)0(_dot_)0(_dot_)1)
   by localhost with SMTP; 2 Nov 1999 16:35:58 -0000

Procmail escapes all the bogus "From "  lines before it saves the message in a
mbox folder,  so filtering ">From "  lines in the header doesn't work, because
procmail  adds  the  quote character ">"  only one moment before it writes  to
disk.

I decided to use sed, and to settle the question:

 :0 fhw
 | sed -e "1! {;s/^From .*$//;/^$/d;}"

This recipe deletes all the "From " lines in the header, except the first!

Thank you for your advice, :-)


                          Paolo

P.S. I hope that my bad English doesn't make you cry :-)


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