[Mimedefang] external filter and binary parts

Jeroen Beerstra jb at scorpion77.cjb.net
Wed Nov 13 04:47:01 EST 2002


> Hello,
> I'm currently attempting to track down a problem I'm having when calling
> the action_external_filter on parts (in filter()). My call to the
> external filter is actually tar-ing up the part (hence completely
> replacing it), but unfortunately it
> seems that mimedefang (I suppose through mime-tools) isn't properly
> encoding the tar (binary). Am I correct in thinking this isn't the right
> thing, or is it my/the responsibility of my filter code to encode it as
> part of the filter "call"? That is, does mimedefang assume the part is
> in text/encoded format?
>
> Any information about this would be appreciated.
> Thanx
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

The external filter produces a single file FILTEROUTPUT which replaces the
original attachement. It's up to you to tell MIMEDefang which mime type it
is. For example I convert MS Word files to html+png images and place the
results in a zipfile like this:

if ($type eq "application/msword" or $ext eq ".doc") {
    action_external_filter($entity, "/usr/local/bin/word-to-html");
    return action_defang ($entity, "" , "word_attachement.zip" ,
"application/zip");
    }

BTW are you sure your external filter is working? I had a problem with my
external_filter not replacing the original file attachemen at all.

Jeroen Beerstra





More information about the MIMEDefang mailing list