[Mimedefang] defang_mime = 1 in spamassassin.cf with MIMEdefang

David F. Skoll dfs at roaringpenguin.com
Thu Apr 4 22:11:04 EST 2002


On Thu, 4 Apr 2002, Mike Batchelor wrote:

> Never mind that.  I was confused about where the code originates.  Here is
> my mimedefang-filter in total.  Why are text/html spams not changed to
> text/plain, a la Spamassassin, but using MIMEdefang code to do it?


>     # If Spamassassin found spam, convert text/html to text/plain
>     if ($foundSpam eq "yes") {
>       if ($type eq "text/html") {
>         $entity->head->mime_attr("content-type" => "text/plain");

I believe you have to force MIMEDefang to rebuild the message, so at
this point you need:

	  action_rebuild();

The philosophy behind MIMEDefang is *not* to rebuild the message unless
it was altered.  This improves efficiency and minimizes the chance
of silly mistakes.  If you make a change and want to force a rebuild,
you have to explicitly ask for it.

Regards,

David.




More information about the MIMEDefang mailing list