[Mimedefang] stop warning email

Matthew Thomas mthomas at biocontrolsys.com
Thu Apr 8 13:13:38 EDT 2004


> -----Original Message-----
> On Behalf Of Steve Lee

> I have question on where i can disable the warning emails.
> When someone sends me a email that has a extension that
> is not allowed by the list of $bad_exts in mimedefang-filter,
> i still get a message like the message below.  How can i tell 
> mimedefang not to send me a message about a warning that 
> someone tried to send a file that was not allowed by the system.


In sub Filter there is a bit of code which says something like:
return action_drop_with_warning("An attachment named $fname was removed from
this document as it\nconstituted a security hazard.  If you require this
document, please contact\nthe sender and arrange an alternate means of
receiving it.\n")

This is what sends the message you are talking about.  Now, what do you want
to do instead of receiving the warning?

If you wanted to just drop the entire message, replace the action above
with:
return action_discard();
Do you really want to discard every bad_exts email?

If you really only want to discard some of them, you could add something
like:
    if (filter_bad_filename($entity)) {
      if ($ext =~ /pif|scr/) {
        md_log('PIFoSCR_attachment',$fname,$type);
        #return action_bounce("PIF attachment not accepted");  # if you
wanted to bounce
        return action_discard();
      }

Does that help?  Or do you want to receive the message, with the attachment
stripped, but no warning telling you that you aren't receiving the entire
message that was sent?

-Matt




More information about the MIMEDefang mailing list