[Mimedefang] strip invalid IMG tag

Marco Supino marco at sd.com
Mon Nov 29 03:42:52 EST 2004


Hi,

I am setting up MimeDefang to replace an eSafe antivirus i use on my 
gateway,

I am tring to make Mimedefang work just like eSafe does, and it works 
great for attachments, except that the eSafe will strip invalid IMG 
tages in text/html mime parts,

any html IMG tag which is NOT JPG, JPEG, JPE,GIF, BMP, PNG or SWF will 
be replaced with ------ , for example , the following IMG tag :

<IMG SRC="http://www.12345.com/123/6813978.41.2394">

was replaced with

<!------------------------------------------------------------------->

I can understand why to do this, but have problem implementing it, i was 
looking at the function to remove the iframe|script|object objects from 
an entity, and want to duplicate the function to remove the bad IMG tags,

Now, i am new to Mimedefang, will this be correct ? i am i dont it in 
the right place ? has anyone implemented such a check on emails ?

Thans.

Marco.




More information about the MIMEDefang mailing list