./MailFilter/StripUselessHTML.pm
package MailFilter::StripUselessHTML;
# strip useless HTML parts
#
# based on:
# $Id: suggested-minimum-filter-for-windows-clients,v 1.81 2004/10/26 18:34:33 dfs Exp $
use strict;
use warnings;
use Mimedefang qw(message_rejected remove_redundant_html_parts);
sub filter_end ($) {
my($entity) = @_;
# No sense doing any extra work
return if message_rejected();
# I HATE HTML MAIL! If there's a multipart/alternative with both
# text/plain and text/html parts, nuke the text/html. Thanks for
# wasting our disk space and bandwidth...
remove_redundant_html_parts($entity);
}
# DO NOT delete the next line, or Perl will complain.
1;