[Mimedefang] Ooops... action_external_filter() is broken; here's a fix

Paul freebsd at pksnet.com
Thu Jan 3 10:47:53 EST 2002


>Ooops... mea culpa...
>There's a bug in action_external_filter().

Nah, that's an undocumented feature. And you mean lil ole me found it on the first try? *grin* 

>Near line 478 of mimedefang.pl.in (I'm working on a development
>version, so line numbers may be off), there is a line which reads:
>
>	    $Actions{'external_filter'}++;
>
>You need to add this line right before that line:
>
>	    $Changed = 1;
>
>Then do the usual ./configure; make; make install.

Ok, I did that and yoru other suggestion to put it in a shell script. It fixed the problem, but there is a weird thing happening. The HTML is now replaced by text, but the Content-Type for that part has not changed and is still stated as text/html. Causing the mailreader to think that it is HTML. How do I change the Content-Type? or better, have MIMEDefang do it?

Logentries:

Jan  3 10:37:05 dax mimedefang.pl[79850]: filter: <No-Message-Id>:  external_filter=1
Jan  3 10:37:05 dax sendmail[79849]: g03Fax5J079849: Milter message: body replaced
Jan  3 10:37:05 dax sendmail[79849]: g03Fax5J079849: Milter change: header  Content-Type: from multipart/alternative;\n      boundary="=====002_Dragon468874660451_=====" to multipart/mixed; boundary="=====002_Dragon468874660451_====="
Jan  3 10:37:05 dax sendmail[79849]: g03Fax5J079849: Milter add: header: X-Scanned-By: MIMEDefang 2.2 (www dot roaringpenguin dot com slash mimedefang)
Jan  3 10:37:05 dax sendmail[79849]: g03Fax5J079849: Milter message: body replaced


This is the testmail I've been using. What I wanted was the 2nd part in just plain text as well instead of HTML. Firstly to cut down on the overhead and secondly for security and to save us from having to use www enabled mailreaders. :-) 

Original version:
+++
Content-Type: multipart/alternative; boundary="=====002_Dragon226445115646_====="
                                  
This is a multi-part message in MIME format.

--=====002_Dragon226445115646_=====
Content-Type: text/plain;
      charset="us-ascii"
Content-Transfer-Encoding: base64

SFRNTCBmb3JtYXR0aW5nIHRlc3QNCg==

--=====002_Dragon226445115646_=====
Content-Type: text/html;
      charset="us-ascii"
Content-Transfer-Encoding: base64

PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PXdp
bmRvd3MtMTI1MiIgaHR0cC1lcXVpdj1Db250ZW50LVR5cGU+DQo8TUVUQSBjb250ZW50PSJNU0hU
TUwgNS4wMC4zMzE0LjIxMDAiIG5hbWU9R0VORVJBVE9SPjwvSEVBRD4NCjxCT0RZPg0KPERJVj5I
VE1MIGZvcm1hdHRpbmcgdGVzdDwvRElWPjwvQk9EWT48L0hUTUw+DQo=

--=====002_Dragon226445115646_=====--

+++


MIMEDEfanged version:
+++
Content-Type: multipart/mixed; boundary="=====002_Dragon468874660451_====="
X-Scanned-By: MIMEDefang 2.2 (www dot roaringpenguin dot com slash mimedefang)

This is a multi-part message in MIME format...

------------=_1010072225-79850-0
Content-Type: text/plain;
      charset="us-ascii"
Content-Transfer-Encoding: base64
Content-Disposition: inline

SFRNTCBmb3JtYXR0aW5nIHRlc3QNCg==

------------=_1010072225-79850-0
Content-Type: text/html;
      charset="us-ascii"
Content-Transfer-Encoding: base64
Content-Disposition: inline

CkhUTUwgZm9ybWF0dGluZyB0ZXN0Cg==

------------=_1010072225-79850-0--

--=====002_Dragon468874660451_=====--
+++

Thanks in advance for any suggestions



More information about the MIMEDefang mailing list