[Mimedefang] action_replace_with_warning

David F. Skoll dfs at roaringpenguin.com
Thu Jun 6 16:49:25 EDT 2002


Hi,

> Can someone clue me in on the behavior of "action_replace_with_warning"
> in mimedefang.pl? I would like for the warning to be displayed inline,
> but I cannot get that to happen reliably. Netscape 4.7x just shows an
> unnamed attachment that will open in a separate window if clicked.

I think I have it fixed.  It will be in the next full release.  In the
mean time, if you're brave, edit mimedefang.pl.in and delete
the entire "sub action_replace_with_warning" and replace with this:

sub action_replace_with_warning ($) {
    my($msg) = @_;
    $Actions{'replace_with_warning'}++;
    $Action = "replace";
    $ReplacementEntity = MIME::Entity->build(Type => "text/plain",
					     Encoding => "-suggest",
					     Data => [ "$msg\n" ]);
    $ReplacementEntity->head->mime_attr("Content-Type.name" => "warning.txt");
    $ReplacementEntity->head->mime_attr("Content-Disposition" => "inline");
    $ReplacementEntity->head->mime_attr("Content-Disposition.filename" => "warning.txt");
    return 1;
}

Also, lines 231 and 261 of mimedefang.pl.in read:

	$ReplacementEntity->head->mime_attr("Content-Disposition" => $disposition);

Delete both of those lines.

Then do the old ./configure && make && make install routine.

Regards,

David.




More information about the MIMEDefang mailing list