[Mimedefang] Re: set_reply returned MI_FAILURE

Tim Boyer tim at denmantire.com
Thu Jan 5 07:09:58 EST 2006


On Wed, 04 Jan 2006 21:17:04 -0500, "David F. Skoll" <dfs at roaringpenguin.com>
wrote:

>Tim Boyer wrote:
>
>>         return action_drop_with_warning("....\n.....\n....\n");
>
>[...]
>
>> I've changed action_drop_with_warning to action_bounce.
>
>> Instead of bouncing, however, I'm getting the set_reply returned
>> MI_FAILURE in logs, and the message is not being rejected.
>
>You can't have newlines ("\n") in the text part of a bounce message.
>That's probably the problem.

David, I'll give that a try - thanks much!  But just FYI, that's what's in the
stock mimedefang-filter in 2.54:

    if (filter_bad_filename($entity)) {
        md_graphdefang_log('bad_filename', $fname, $type);
        action_notify_administrator("A MULTIPART attachment of type $type,
named $fname was dropped.\n");
        return action_drop_with_warning("An attachment of type $type, named
$fname was removed from this document as it\nconstituted a security hazard.  If
yourequire this document, please contact\nthe sender and arrange an alternate
means of receiving it.\n");
    }
 
    # eml is bad if it's not message/rfc822
    if (re_match($entity, '\.eml') and ($type ne "message/rfc822")) {
        md_graphdefang_log('non_rfc822',$fname);
        return action_drop_with_warning("A non-message/rfc822 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");
    }

-- 
tim boyer
tim at denmantire.com




More information about the MIMEDefang mailing list