[Mimedefang] newbie question: are all the rules hardcoded?

Eric Wood eric at interplas.com
Mon Mar 10 10:14:00 EST 2003


I haven't install MD yet because I'm trying to get some homework questions
answered first.

I have a fully patched RH 7.3 server.  I've noticed the rather exhaustive
installation howto for MD - mainly all the perl.  My RH7.3 runs sendmail
8.11.x and MD requires 8.12.

1. Does anyone have the sendmail and perl .rpms for all this that would load
over top the old 7.3 rpms nicely?  Are is building from source the only
option.

Reading through the HOWTO yields more questions:

2. ".....For each incoming message, mimedefang creates a temporary
directory, makes it the current directory, and splits the message into parts
and saves the parts in various files in the directory......"

Can I make MD create these directories in /dev/shm instead of the hard disk
except for large emails?  I can only imagine how much thrashing my server
will go through if all these directories happen on disk rather than ram.

3. In time, I'm sure I can learn perl and all these "action_" functions to
tweak the "mimedefang-filter" config file to suit my needs.  But, I want to
make sure that MD somehow supports virtual domains.   For example, one
vdomain may reject "message/partial" while another vdomain allows it.  One
vdomain may want to scan for viruses and another does not.   One may want to
reject foreign charsets (big5, euc-kr + aliases) while another only allows
some charsets (utf-7, utf-8, us-ascii, windows-1258, iso-8859-1 + aliases).
Is that capability there?

4. Now the *big* question.  I'd love to avoid modifying code if possible.
So does someone have a "mimedefang-filter" config file that will read a
preferences file by vdomain?  I envision a hypothetical file like this:

# cat /etc/mimedefang-filter.conf
[interplas.com]
$AdminAddress = 'defang-admin at interplas.com';
$AdminName = "Eric Wood";
$DaemonAddress = 'postmaster at interplas.com';
$DaemonName    = 'IP';
$EnableFiltering = '1';  # 0 ignores all filter rules below
$MIME_BlockMessageParital = '1'; # Block message/partial parts
$MIME_BlockInvalidEml = '1'; # eml is bad if it's not multipart
$MIME_AcceptAllCharsets = '0';
$MIME_AcceptTheseCharsets = 'utf-7 csUnicode11UTF7
unicode-1-1-utf-7x-unicode-2-0-utf-7';
$MIME_AcceptTheseCharsets = 'utf-8 unicode-1-1-utf-8 unicode-2-0-utf-8
x-unicode-2-0-utf-8';
$MIME_AcceptTheseCharsets = 'us-ascii ANSI_X3.4-1968 ANSI_X3.4-1986 ascii
cp367 csASCII IBM367 ISO_646.irv:1991 ISO646-US iso-ir-6us';
$MIME_AcceptTheseCharsets = 'windows-1258';
$MIME_AcceptTheseCharsets = 'iso-8859-1cp819 csISO Latin1 ibm819 iso_8859-1
iso_8859-1:1987 iso8859-1 iso-ir-100 l1 latin1';
$MIME_AcceptTheseCharsets = 'Windows-1252 ANSI_X3.4-1968 ANSI_X3.4-1986
ascii cp367 cp819 csASCII IBM367 ibm819 ISO_646.irv:1991 iso_8859-1
iso_8859-1:1987 ISO646-US iso8859-1 iso-8859-1 iso-ir-100 iso-ir-6 latin1 us
us-ascii x-ansi';
$MIME_RejectTheseCharesets = '';
$Files_QuarintineUnsafeFiles = '1';
$Files_QuarintineDirectory = '/var/spool/vmail/files/interplas.com/';
$Files_UnsafeFiles = 'EXE LNK HLP HTA SCR VB REG PIF COM CMD BAT (more
extensions....)';
$Files_ReplaceExt = '~'; # Files quarintined will now have name a file:
PROGRAM.~EXE extension so that windows can't directly launch.
$Files_VirusScanAllFiles = '0';
$Files_VirusScanUnsafeFiles = '1';
$Files_DeleteFileIfVirus = '1'; # No since in putting it in the quarintine
directory
$Files_NotifySender = '1'; # Tell the sender they had a virus
$Files_NotifyReceipient = '0'; # Tell the receipient(s) they almost got a
virus / look in the quarintine directory.
$SPAM_UseSpamAssassin = '1';
$SPAM_UseCustomFunction = '1';
etc....
[nextdomain.com]
....
....
[thirddomain.com]
....
....

Long email I know.  It seems like MD can do the job if it can be modularized
into reading a concise preference file that will make everyone happy.  The
benefit would be that other GUI programs can configure MD (write their own
file) more easily.

Thoughts?
-Eric Wood




More information about the MIMEDefang mailing list