[Mimedefang] define equivolency please david

David F. Skoll dfs at roaringpenguin.com
Thu Mar 20 08:38:00 EST 2003


On Thu, 20 Mar 2003, Douglas J Hunley wrote:

> the latest release of MD has the new function to delete html parts that are
> represented by an equivolent text part. how is the equivolency determined?
> how exact is it? is there *any* indication that the html part was stripped?
> could you indicate such?

If you have a part of type:     multipart/alternative
   That has a sub-part of type: text/plain
   AND a sub-part of type:      text/html

THEN delete the sub-part of type text/html.  "Equivalency" is determined
by the fact that both the plain-text and HTML part are sub-parts of the
same multipart/alternative type.  No actual content scanning is done.
See http://deesse.univ-lemans.fr:8003/Connected/RFC/1521/18.html

If the part is stripped, remove_redundant_html_parts returns true,
so you could put this in filter_end:

sub filter_end {
    my($entity) = @_;
    if (remove_redundant_html_parts($entity)) {
        md_syslog('info', "$MsgID: Removed redundant HTML stupidity.");
    }
}

--
David.



More information about the MIMEDefang mailing list