From bf034823af4109a30c59fffb019c3c9be21b1fb0 Mon Sep 17 00:00:00 2001 From: Mikhail Kolesnik Date: Tue, 14 Nov 2006 09:36:11 +0200 Subject: [PATCH] mimedefang: initial import --- mimedefang/.footprint | 30 +++++++++ mimedefang/.md5sum | 2 + mimedefang/Pkgfile | 27 ++++++++ mimedefang/README | 20 ++++++ mimedefang/mimedefang.conf | 123 +++++++++++++++++++++++++++++++++++++ 5 files changed, 202 insertions(+) create mode 100644 mimedefang/.footprint create mode 100644 mimedefang/.md5sum create mode 100644 mimedefang/Pkgfile create mode 100644 mimedefang/README create mode 100644 mimedefang/mimedefang.conf diff --git a/mimedefang/.footprint b/mimedefang/.footprint new file mode 100644 index 000000000..3b65b65b8 --- /dev/null +++ b/mimedefang/.footprint @@ -0,0 +1,30 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/mail/ +-rw-r--r-- root/root etc/mail/mimedefang-filter +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/mimedefang +drwxr-xr-x root/root mail/ +-rw-r--r-- root/root mail/mimedefang.conf +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/md-mx-ctrl +-rwxr-xr-x root/root usr/bin/mimedefang +-rwxr-xr-x root/root usr/bin/mimedefang-multiplexor +-rwxr-xr-x root/root usr/bin/mimedefang.pl +-rwxr-xr-x root/root usr/bin/watch-mimedefang +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man5/ +-rw-r--r-- root/root usr/man/man5/mimedefang-filter.5.gz +drwxr-xr-x root/root usr/man/man7/ +-rw-r--r-- root/root usr/man/man7/mimedefang-notify.7.gz +-rw-r--r-- root/root usr/man/man7/mimedefang-protocol.7.gz +drwxr-xr-x root/root usr/man/man8/ +-rw-r--r-- root/root usr/man/man8/md-mx-ctrl.8.gz +-rw-r--r-- root/root usr/man/man8/mimedefang-multiplexor.8.gz +-rw-r--r-- root/root usr/man/man8/mimedefang.8.gz +-rw-r--r-- root/root usr/man/man8/mimedefang.pl.8.gz +-rw-r--r-- root/root usr/man/man8/watch-mimedefang.8.gz +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/spool/ +drwxr-x--- clamav/clamav var/spool/MD-Quarantine/ +drwxr-x--- clamav/clamav var/spool/MIMEDefang/ diff --git a/mimedefang/.md5sum b/mimedefang/.md5sum new file mode 100644 index 000000000..6d5962a27 --- /dev/null +++ b/mimedefang/.md5sum @@ -0,0 +1,2 @@ +6424dd840f1a8251181bffb042e01961 mimedefang-2.58.tar.gz +67965579efa6d5328359cea13c720f3c mimedefang.conf diff --git a/mimedefang/Pkgfile b/mimedefang/Pkgfile new file mode 100644 index 000000000..ebb6852c8 --- /dev/null +++ b/mimedefang/Pkgfile @@ -0,0 +1,27 @@ +# Description: A mail filtering framework +# URL: http://www.mimedefang.org +# Maintainer: Mikhail Kolesnik, mike at openbunker dot org +# Depends on: clamav p5-mime-tools p5-io-stringy p5-mailtools p5-digest-sha1 p5-unix-syslog + +name=mimedefang +version=2.58 +release=1 +source=(http://www.mimedefang.org/static/$name-$version.tar.gz + mimedefang.conf) + +build () { + cd $name-$version + ./configure --prefix=/usr \ + --with-user=clamav \ + --sysconfdir=/etc + make + make DESTDIR=$PKG install + sed -i \s/"\/var\/spool\/MIMEDefang\/clamd\.sock"/"\/var\/run\/clamav\/clamd\.sock"/ $PKG/usr/bin/mimedefang.pl + install -D -m 755 examples/init-script $PKG/etc/rc.d/mimedefang + install -D -m 644 $SRC/mimedefang.conf $PKG/etc/mail/mimedefang.conf + mkdir -p $PKG/var/spool/MIMEDefang $PKG/var/spool/MD-Quarantine + chown clamav:clamav $PKG/var/spool/MIMEDefang + chown clamav:clamav $PKG/var/spool/MD-Quarantine + chmod 750 $PKG/var/spool/MIMEDefang + chmod 750 $PKG/var/spool/MD-Quarantine +} diff --git a/mimedefang/README b/mimedefang/README new file mode 100644 index 000000000..60398764a --- /dev/null +++ b/mimedefang/README @@ -0,0 +1,20 @@ +README for mimedefang + +REQUIREMENTS +You'll need clamav with "--enable-milter", milter capable mail transport agent (only +sendmail is assumed in this port, for others - you should edit/move +configuration files). + +PRE-INSTALL + +POST-INSTALL +Edit sendmail.mc to add something like this: + + INPUT_MAIL_FILTER(`mimedefang', `S=local:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=C:20s;S:25s;R:25s;E:1m')dnl + define(`confINPUT_MAIL_FILTERS', `mimedefang')dnl + +RESOURCES +HOWTO http://www.mickeyhill.com/mimedefang-howto/ +FAQ http://www.mimedefang.org/node.php?id=6 + +PRECAUTION diff --git a/mimedefang/mimedefang.conf b/mimedefang/mimedefang.conf new file mode 100644 index 000000000..43daa36ee --- /dev/null +++ b/mimedefang/mimedefang.conf @@ -0,0 +1,123 @@ +SPOOLDIR='/var/spool/MIMEDefang' + +# The socket used by mimedefang to communicate with sendmail +SOCKET=$SPOOLDIR/mimedefang.sock + +# Run the multiplexor and filters as this user, not root. RECOMMENDED +MX_USER=clamav + +# Syslog facility +SYSLOG_FACILITY=mail + +# If you want to keep spool directories around if the filter fails, +# set the next one to yes +# KEEP_FAILED_DIRECTORIES=no + +# "yes" turns on the multiplexor relay checking function +# MX_RELAY_CHECK=no + +# "yes" turns on the multiplexor HELO checking function +# MX_HELO_CHECK=no + +# "yes" turns on the multiplexor sender checking function +# MX_SENDER_CHECK=no + +# "yes" turns on the multiplexor recipient checking function +# MX_RECIPIENT_CHECK=no + +# Set to yes if you want the multiplexor to log events to syslog +MX_LOG=yes + +# Set to yes if you want to use an embedded Perl interpreter +# MX_EMBED_PERL=yes + +# Set to full path of socket for Sendmail's SOCKETMAP map, if you +# want to use it with MIMEDefang +# MX_MAP_SOCKET=$SPOOLDIR/map.sock + +# The multiplexor does not start all slaves at the same time. Instead, +# it starts one slave every MX_SLAVE_DELAY seconds when the system is idle. +# (If the system is busy, the multiplexor starts slaves as incoming mail +# requires attention.) +# MX_SLAVE_DELAY=3 + +# The next setting is an absolute limit on slave activation. The multiplexor +# will NEVER activate a slave within MX_MIN_SLAVE_DELAY seconds of another. +# The default of zero means that the multiplexor will activate slaves as +# quickly as necessary to keep up with incoming mail. +# MX_MIN_SLAVE_DELAY=0 + +# Set to yes if you want the multiplexor to log stats in +# /var/log/mimedefang/stats The /var/log/mimedefang directory must +# exist and be writable by the user you're running MIMEDefang as. +# MX_STATS=no + +# Number of slaves reserved for connections from loopback. Use -1 +# for default behaviour, 0 to allow loopback connections to queue, +# or >0 to reserve slaves for loopback connections +LOOPBACK_RESERVED_CONNECTIONS=-1 + +# Set to yes if you want the stats file flushed after each entry +# MX_FLUSH_STATS=no + +# Set to yes if you want the multiplexor to log stats to syslog +# MX_STATS_SYSLOG=no + +# The socket used by the multiplexor +MX_SOCKET=$SPOOLDIR/mimedefang-multiplexor.sock + +# Maximum # of requests a process handles +# MX_REQUESTS=200 + +# Minimum number of processes to keep. The default of 0 is probably +# too low; we suggest 2 instead. +MX_MINIMUM=4 + +# Maximum number of processes to run (mail received while this many +# processes are running is rejected with a temporary failure, so be +# wary of how many emails you receive at a time). This applies only +# if you DO use the multiplexor. The default value of 2 is probably +# too low; we suggest 10 instead +MX_MAXIMUM=10 + +# Uncomment to log slave status; it will be logged every +# MX_LOG_SLAVE_STATUS_INTERVAL seconds +# MX_LOG_SLAVE_STATUS_INTERVAL=30 + +# Uncomment next line to have busy slaves send status updates to the +# multiplexor. NOTE: Consumes one extra file descriptor per slave, plus +# a bit of CPU time. +# MX_STATUS_UPDATES=yes + +# Limit slave processes' resident-set size to this many kilobytes. Default +# is unlimited. +# MX_MAX_RSS=10000 + +# Limit total size of slave processes' memory space to this many kilobytes. +# Default is unlimited. +# MX_MAX_AS=30000 + +# If you want to use the "notification" facility, set the appropriate port. +# See the mimedefang-notify man page for details. +# MX_NOTIFIER=inet:4567 + +# Number of seconds a process should be idle before checking for +# minimum number and killed +# MX_IDLE=300 + +# Number of seconds a process is allowed to scan an email before it is +# considered dead. The default is 30 seconds; we suggest 600. +MX_BUSY=20 + +# Extra sendmail macros to pass. Actually, you can add any extra +# mimedefang options here... +# MD_EXTRA="-a auth_author" + +# Multiplexor queue size -- default is 0 (no queueing) +# MX_QUEUE_SIZE=10 + +# Multiplexor queue timeout -- default is 30 seconds +# MX_QUEUE_TIMEOUT=30 + +# SUBFILTER specifies which filter rules file to use +SUBFILTER=/etc/mail/mimedefang-filter