Modifying Content-Type header, when SARewriteBody==0

Adam Tilghman <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
I recently installed sa-exim, and noticed that Mailman crashed
when receiving certain sa-exim processed spam messages.

It turns out that the problem messages had been given MIME
multipart/mixed Content-Types even though the body wasn't rewritten
into MIME multipart format.  

Is there any reason to modify (or create) the Content-Type: and
Content-Transfer-Encoding: headers when the message body is unchanged?

The following (small) changes fixed my problems with Mailman.

-- Adam


--- ORIG/sa-exim-cvs/sa-exim.c  2004-08-23 08:39:49.000000000 -0700
+++ sa-exim.c   2004-11-03 11:22:38.000000000 -0800
@@ -1037,8 +1037,8 @@
            beginning of the loop without reading a new line since we already
           did that */
        if (parsemlheader(buffer, (FILE *)readfh, "Subject", NULL)) goto restart;
-       if (parsemlheader(buffer, (FILE *)readfh, "Content-Type", NULL)) goto restart;
-       if (parsemlheader(buffer, (FILE *)readfh, "Content-Transfer-Encoding", NULL)) goto restart;
+       if ((SARewriteBody == 1) && (parsemlheader(buffer, (FILE *)readfh, "Content-Type", NULL))) goto restart;
+       if ((SARewriteBody == 1) && (parsemlheader(buffer, (FILE *)readfh, "Content-Transfer-Encoding", NULL))) goto restart;
  
        if (parsemlheader(buffer, (FILE *)readfh, "X-Spam-Flag", &xspamflag))
        {



-- 
Adam Tilghman  http://eldred.cc      \ The Fourth Conjecture: SF Action/Adv.
  [email protected]  Save the Public Domain \ Oct. 7-9th, 2005 - www.conjecture.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.