[Mimedefang] external filter and binary parts

David F. Skoll dfs at roaringpenguin.com
Wed Nov 13 10:35:01 EST 2002


On Wed, 13 Nov 2002, Rudolph Pereira wrote:

> 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"?

You have to set the encoding.  The simplest way is to use the MIME::Entity
and MIME::Head functions, like this:


	action_external_filter($entity, "my_amazing_filter");
	my $head = $entity->head;
	$head->mime_attr("content-type" => "application/x-tar");
	$head->mime_attr("content-name" => "foo.tar.gz");
	$head->mime_attr("content-transfer-encoding" => "base64");

--
David.




More information about the MIMEDefang mailing list