[Mimedefang] (more) external filter issues

David F. Skoll dfs at roaringpenguin.com
Tue Feb 12 20:00:25 EST 2002


Hi, Ashley.

> I was wondering why you told me in an earlier messages to specify
> a filename, while the docs say something else.  Ok, so how would I
> specify a filename then for the Content-Disposition.filename?  Or do
> I just feed it the variable $FILTEROUTPUT ?

Sorry, I guess I was not being clear.

The "action_external_filter()" routine works like this:

1) Copy the part to be filtered to FILTERINPUT
2) Run the command (whatever command you supply)
3) If the file FILTEROUTPUT exists, then replace the part with the
   contents of FILTEROUTPUT.  If FILTEROUTPUT does not exist, do nothing.

Now, action_external_filter() cannot possibly know to change the MIME type.
You have to do it yourself with the $entity->head->replace() method.
You can supply any file name you like for the replaced entity, as long
as it "matches" (in the Windows sense) the MIME type.  For text/plain,
you'd use .txt, etc.

Regards,

David.




More information about the MIMEDefang mailing list