[Mimedefang] inquiry

Mark Suter suter at zwitterion.humbug.org.au
Thu Aug 21 00:52:14 EDT 2003

Sathes Nair <jovi_2 at yahoo.com> wrote:

> I have installed sendmail 8.12.9 together with mimedefang and
> spammassin.  Is there any way that i could configure mimedefang
> to block all jpeg and movie files entering my mailserver.  If
> posible can you guide me on how to configure it.

A normal install will have created /etc/mail/mimedefang-filter
that you now should carefully edit.  In that file, there is a
line similar to the following.

    $bad_exts = '(ade|adp|app|asd|asf|asx| ... |wms|wmz|wsc|wsf|wsh|\{)';

A simple first approximation for "block all images and movies" is
to add extensions to this list.  For example, to catch some very
common formats, add the following (keeping "|"s between each).


Here are the actual commands you might use:

    # cd /etc/mail
    # cp mimedefang-filter mimedefang-filter.new
    # vi mimedefang-filter.new
    # mimedefang.pl -f mimedefang-filter.new -test
    Filter mimedefang-filter.new seems syntactically correct.
    # mv mimedefang-filter.new mimedefang-filter
    # /etc/init.d/mimedefang reload

Mimedefang will start using the new filter when it creates new
slaves; however, you should reload or restart mimedefang to make
this happen immediately so any errors become apparent.

More complex solutions, such as looking at the mime-types or even
the "magic" of the actual attachments should be considered after
evaluating the simple first approximation above.

Yours sincerely,

-- Mark Suter - www.zwitterion.org | I have often regretted my
<mark.suter at member.sage-au.org.au> | speech, never my silence.
mobile 0411 262 316 - gpg 2C71D63D | Xenocrates (396-314 B.C.)

More information about the MIMEDefang mailing list