[Mimedefang] Dropping Files

Fox, Randy Randy_Fox at csgsystems.com
Mon Oct 27 13:51:47 EST 2003


schmaus wrote:

> $drop_exts = '(pif|scr|bat)';
> if (re_match($entity, $drop_exts)) {
>      md_graphdefang_log("VIRUS: dropping file $fname from $RelayAddr");
>      return action_discard();
> }

Per the mimedeang-filter man page, action_discard is used to discard the entire message.  What you want is action_drop_with_warning ("An attachment named $fname was removed from this document blah blah blah.").  Study the example filter, it's very close to the same thing you're trying to do.

Randy



More information about the MIMEDefang mailing list