spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: duplicate headers -- subject/content-type - Update!


From: Cowles, Steve
Subject: RE: duplicate headers -- subject/content-type - Update!
Date: Wed, 18 Sep 2002 14:18:35 -0500

> -----Original Message-----
> From: Cowles, Steve 
> Sent: Wednesday, September 18, 2002 1:04 PM
> To: 'Dan Nelson'
> Cc: 'address@hidden'
> Subject: RE: duplicate headers -- subject/content-type
> 
>
> Dan,
> 
> Thanks for your quick reply. I'll give this patch a try at 
> this end and post my results as well. If all else fails, I
> can wait for CVS. At least our MS Exchange server is not
> barfing on these duplicate headers.
> 

Just to post an update...

The patch against the 0.1.2 tree (not CVS) failed, but I brute forced in the
changes manually. I have included the .rej at the bottom of this post.

Anyway, I'm happy to report that this patch seems to have fixed the problem
with the duplicate headers. Within 5 minutes of restarting spamass-milter, I
received a spam e-mail. The headers -and- maillog entries looked correct.
Whew!!

Thanks again Dan
Steve Cowles

--------- Patch History -------------

address@hidden spamass-milter-0.1.2]# patch -p0 <milter.patch
patching file spamass-milter.cpp
Hunk #1 succeeded at 314 (offset -2 lines).
Hunk #2 FAILED at 333.
1 out of 2 hunks FAILED -- saving rejects to file spamass-milter.cpp.rej

address@hidden spamass-milter-0.1.2]# cat spamass-milter.cpp.rej
***************
*** 330,342 ****

        old = assassin->set_content_type(oldstring);

        // change if old one was present, append if non-null
-       if (old > 0 && newstring != oldstring)
        smfi_chgheader(ctx,"Content-Type",1,newstring.size() > 0 ?
                       const_cast<char*>(newstring.c_str()) : NULL );
        else if (newstring.size()>0)
        smfi_addheader(ctx, "Content-Type",
                       const_cast<char*>(newstring.c_str()));


        // Replace body with the one SpamAssassin provided //
--- 333,348 ----

        old = assassin->set_content_type(oldstring);

+       if (newstring != oldstring)
+       {
        // change if old one was present, append if non-null
+       if (old > 0)
        smfi_chgheader(ctx,"Content-Type",1,newstring.size() > 0 ?
                       const_cast<char*>(newstring.c_str()) : NULL );
        else if (newstring.size()>0)
        smfi_addheader(ctx, "Content-Type",
                       const_cast<char*>(newstring.c_str()));
+       }


        // Replace body with the one SpamAssassin provided //




reply via email to

[Prev in Thread] Current Thread [Next in Thread]