[Mimedefang] Minor tweak to the baseline mimedefang-filter
Philip Prindeville
philipp_subx at redfish-solutions.com
Wed Apr 5 21:54:55 EDT 2006
I'm looking at the code:
if (filter_bad_filename($entity)) {
md_graphdefang_log('bad_filename', $fname, $type);
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");
}
Can we make this:
$SilentlyDiscardSuspectAttachments = 1;
...
if (filter_bad_filename($entity)) {
md_graphdefang_log('bad_filename', $fname, $type);
if ($SilentlyDropSuspectAttachments) {
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");
} else {
return action_bounce("Message rejected; an attachment named
$fname of\ndubious nature was found in this message.\nContact the
postmaster if this was a legitimate transfer.\n");
}
}
Instead? This will make a common policy change easier for people to
implement as a configuration issue rather than as code modification.
Thanks,
-Philip
More information about the MIMEDefang
mailing list