[SA-exim] Modifying Content-Type header, when SARewriteBody==0
Adam Tilghman
agt-nogreylist at mib.org
Wed Nov 3 15:05:49 PST 2004
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.
agt at mib.org Save the Public Domain \ Oct. 7-9th, 2005 - www.conjecture.org
More information about the SA-Exim
mailing list