summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuan Van <langthang@gentoo.org>2006-07-26 05:43:20 +0000
committerTuan Van <langthang@gentoo.org>2006-07-26 05:43:20 +0000
commitd856917fdfc1d2fe440cb078e9060ae96e61cce0 (patch)
treee90c8903714b6bb7504de464e12edbed73d21e08 /mail-filter
parentadd mimedefang (diff)
downloadhistorical-d856917fdfc1d2fe440cb078e9060ae96e61cce0.tar.gz
historical-d856917fdfc1d2fe440cb078e9060ae96e61cce0.tar.bz2
historical-d856917fdfc1d2fe440cb078e9060ae96e61cce0.zip
inital commit. Thanks to everyone contributed in bug #27861
Package-Manager: portage-2.1.1_pre3-r1
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/mimedefang/ChangeLog10
-rw-r--r--mail-filter/mimedefang/Manifest24
-rw-r--r--mail-filter/mimedefang/files/digest-mimedefang-2.573
-rw-r--r--mail-filter/mimedefang/files/mimedefang.conf131
-rw-r--r--mail-filter/mimedefang/files/mimedefang.init98
-rw-r--r--mail-filter/mimedefang/metadata.xml6
-rw-r--r--mail-filter/mimedefang/mimedefang-2.57.ebuild54
7 files changed, 326 insertions, 0 deletions
diff --git a/mail-filter/mimedefang/ChangeLog b/mail-filter/mimedefang/ChangeLog
new file mode 100644
index 000000000000..e7207f8679ef
--- /dev/null
+++ b/mail-filter/mimedefang/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for mail-filter/mimedefang
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/mimedefang/ChangeLog,v 1.1 2006/07/26 05:43:20 langthang Exp $
+
+*mimedefang-2.57 (26 Jul 2006)
+
+ 26 Jul 2006; Tuấn Văn <langthang@gentoo.org> +files/mimedefang.conf,
+ +files/mimedefang.init, +metadata.xml, +mimedefang-2.57.ebuild:
+ Inital commit. Thanks to everyone contributed in bug #27861.
+
diff --git a/mail-filter/mimedefang/Manifest b/mail-filter/mimedefang/Manifest
new file mode 100644
index 000000000000..c4bb067d5d84
--- /dev/null
+++ b/mail-filter/mimedefang/Manifest
@@ -0,0 +1,24 @@
+AUX mimedefang.conf 4347 RMD160 e0d56afec0d589472ac3cfc11681b539941c0a26 SHA1 6dd92c6f49f3d708c9a1b91a0438909848bf6a73 SHA256 77b0221f1ea81a14095bfe59d43cde61084de486815446734eb14fbf8b9690c0
+MD5 716ec5e5332e4f2413035e8a94bf2e98 files/mimedefang.conf 4347
+RMD160 e0d56afec0d589472ac3cfc11681b539941c0a26 files/mimedefang.conf 4347
+SHA256 77b0221f1ea81a14095bfe59d43cde61084de486815446734eb14fbf8b9690c0 files/mimedefang.conf 4347
+AUX mimedefang.init 3429 RMD160 e861a831de5223d3c9287dbbedd65c8d20b89dfa SHA1 8cd92483a38b153211ade21908ab888a27ed3384 SHA256 2c37b36759da7ecea5e943128f7878dadb0bbf5a057fc343b218c7b0861dc7b5
+MD5 6d0e87f3046d0920c2fe197fb7a20885 files/mimedefang.init 3429
+RMD160 e861a831de5223d3c9287dbbedd65c8d20b89dfa files/mimedefang.init 3429
+SHA256 2c37b36759da7ecea5e943128f7878dadb0bbf5a057fc343b218c7b0861dc7b5 files/mimedefang.init 3429
+DIST mimedefang-2.57.tar.gz 316909 RMD160 0816cc397c2d6552007609e6d5bc9728421debbd SHA1 85207097008a06a5cde1c0e6c76270ef719a5769 SHA256 dc69580a0f59c745bc440a9d1f09446e9495b81a681cab25c817712566853435
+EBUILD mimedefang-2.57.ebuild 1372 RMD160 0275186ba7ed48d332ca96b9ff2fda7d3d85ae8b SHA1 824e6f9c16fe3b190932a3ef625d7d0e6341bd27 SHA256 0d22885e46df8775bc339f034f3832b2097b4e007733ee9938de07c7f3d9f7f1
+MD5 edada161d3983006d894babb04c105e4 mimedefang-2.57.ebuild 1372
+RMD160 0275186ba7ed48d332ca96b9ff2fda7d3d85ae8b mimedefang-2.57.ebuild 1372
+SHA256 0d22885e46df8775bc339f034f3832b2097b4e007733ee9938de07c7f3d9f7f1 mimedefang-2.57.ebuild 1372
+MISC ChangeLog 359 RMD160 7c894b1f6c75d4e8c51abbeb4afe1ad95bd6c801 SHA1 0972b0c755c048103b10abfdd7865194dbeb9fa8 SHA256 52f7d36651cb72310b594cd7c256af96f72a966166d99a449b5e1375608f2056
+MD5 0a8b9e2b651ca6f69f06c6f6f6fa0d53 ChangeLog 359
+RMD160 7c894b1f6c75d4e8c51abbeb4afe1ad95bd6c801 ChangeLog 359
+SHA256 52f7d36651cb72310b594cd7c256af96f72a966166d99a449b5e1375608f2056 ChangeLog 359
+MISC metadata.xml 221 RMD160 3f13d342b35e471ab3bc6d5b6a491918688ea452 SHA1 1e4ce4ec962e1bae402fdce6f17a1729e1efb4e2 SHA256 9d7907404731a8635f1fb42c8901da3d996aa936fd23e67159a38cf48bb90e0f
+MD5 f1c604a8eaa7929364a593541a1d0efe metadata.xml 221
+RMD160 3f13d342b35e471ab3bc6d5b6a491918688ea452 metadata.xml 221
+SHA256 9d7907404731a8635f1fb42c8901da3d996aa936fd23e67159a38cf48bb90e0f metadata.xml 221
+MD5 5f323a264758b1c94ae902e0c2e24385 files/digest-mimedefang-2.57 247
+RMD160 41b0590e0bd1ca8743fe26a1bb5020d665cdb606 files/digest-mimedefang-2.57 247
+SHA256 8ff28a162109884e5d91f95c50d78793171f63796d30497bbfde275fa619ef2f files/digest-mimedefang-2.57 247
diff --git a/mail-filter/mimedefang/files/digest-mimedefang-2.57 b/mail-filter/mimedefang/files/digest-mimedefang-2.57
new file mode 100644
index 000000000000..e53d1a303ed5
--- /dev/null
+++ b/mail-filter/mimedefang/files/digest-mimedefang-2.57
@@ -0,0 +1,3 @@
+MD5 e55b22dda54c4a3b52e1fbeb9135b0cf mimedefang-2.57.tar.gz 316909
+RMD160 0816cc397c2d6552007609e6d5bc9728421debbd mimedefang-2.57.tar.gz 316909
+SHA256 dc69580a0f59c745bc440a9d1f09446e9495b81a681cab25c817712566853435 mimedefang-2.57.tar.gz 316909
diff --git a/mail-filter/mimedefang/files/mimedefang.conf b/mail-filter/mimedefang/files/mimedefang.conf
new file mode 100644
index 000000000000..49ccef7be077
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang.conf
@@ -0,0 +1,131 @@
+# Additional options for MIMEDefang.
+# read man pages mimedefang(8) for additional informations.
+
+# Locale should be set to "C" for generating valid date headers
+LC_ALL=C
+export LC_ALL
+
+# The settings which follow are defaults. You can override them by
+# placing assignments in /etc/mail/mimedefang.conf
+
+# 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=defang
+
+# 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=2
+
+# 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=600
+
+# 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
diff --git a/mail-filter/mimedefang/files/mimedefang.init b/mail-filter/mimedefang/files/mimedefang.init
new file mode 100644
index 000000000000..0c30a060e6b5
--- /dev/null
+++ b/mail-filter/mimedefang/files/mimedefang.init
@@ -0,0 +1,98 @@
+#!/sbin/runscript
+#
+# Generic start/stop script for MIMEDefang. Should work on most
+# flavors of UNIX.
+
+RETVAL=0
+prog='mimedefang'
+PROGDIR=/usr/bin
+SPOOLDIR='/var/spool/MIMEDefang'
+PID="$SPOOLDIR/$prog.pid"
+MXPID="$SPOOLDIR/$prog-multiplexor.pid"
+
+# Make sure required vars are set
+SOCKET=${SOCKET:=$SPOOLDIR/$prog.sock}
+MX_SOCKET=${MX_SOCKET:=$SPOOLDIR/$prog-multiplexor.sock}
+
+start() {
+ if test -r $PID ; then
+ if kill -0 `cat $PID` > /dev/null 2>&1 ; then
+ echo "mimedefang (`cat $PID`) seems to be running."
+ return 1
+ fi
+ fi
+ if test -r $MXPID ; then
+ if kill -0 `cat $MXPID` > /dev/null 2>&1 ; then
+ echo "mimedefang-multiplexor (`cat $MXPID`) seems to be running."
+ return 1
+ fi
+ fi
+
+ rm -f $MX_SOCKET > /dev/null 2>&1
+ if [ "$MX_EMBED_PERL" = "yes" ] ; then
+ EMBEDFLAG=-E
+ else
+ EMBEDFLAG=""
+ fi
+
+ ebegin "Starting mimedefang-multiplexor"
+ start-stop-daemon --start --quiet \
+ --exec $PROGDIR/$prog-multiplexor -- -p $MXPID \
+ $EMBEDFLAG \
+ `[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \
+ `[ -n "$FILTER" ] && echo "-f $FILTER"` \
+ `[ -n "$SYSLOG_FACILITY" ] && echo "-S $SYSLOG_FACILITY"` \
+ `[ -n "$SUBFILTER" ] && echo "-F $SUBFILTER"` \
+ `[ -n "$MX_MINIMUM" ] && echo "-m $MX_MINIMUM"` \
+ `[ -n "$MX_MAXIMUM" ] && echo "-x $MX_MAXIMUM"` \
+ `[ -n "$MX_MAP_SOCKET" ] && echo "-N $MX_MAP_SOCKET"` \
+ `[ -n "$MX_LOG_SLAVE_STATUS_INTERVAL" ] && echo "-L $MX_LOG_SLAVE_STATUS_INTERVAL"` \
+ `[ -n "$MX_USER" ] && echo "-U $MX_USER"` \
+ `[ -n "$MX_IDLE" ] && echo "-i $MX_IDLE"` \
+ `[ -n "$MX_BUSY" ] && echo "-b $MX_BUSY"` \
+ `[ -n "$MX_REQUESTS" ] && echo "-r $MX_REQUESTS"` \
+ `[ -n "$MX_SLAVE_DELAY" ] && echo "-w $MX_SLAVE_DELAY"` \
+ `[ -n "$MX_MIN_SLAVE_DELAY" ] && echo "-W $MX_MIN_SLAVE_DELAY"` \
+ `[ -n "$MX_MAX_RSS" ] && echo "-R $MX_MAX_RSS"` \
+ `[ -n "$MX_MAX_AS" ] && echo "-M $MX_MAX_AS"` \
+ `[ "$MX_LOG" = "yes" ] && echo "-l"` \
+ `[ "$MX_STATS" = "yes" ] && echo "-t /var/log/mimedefang/stats"` \
+ `[ "$MX_STATS" = "yes" -a "$MX_FLUSH_STATS" = "yes" ] && echo "-u"` \
+ `[ "$MX_STATS_SYSLOG" = "yes" ] && echo "-T"` \
+ `[ "$MX_STATUS_UPDATES" = "yes" ] && echo "-Z"` \
+ `[ -n "$MX_QUEUE_SIZE" ] && echo "-q $MX_QUEUE_SIZE"` \
+ `[ -n "$MX_QUEUE_TIMEOUT" ] && echo "-Q $MX_QUEUE_TIMEOUT"` \
+ `[ -n "$MX_NOTIFIER" ] && echo "-O $MX_NOTIFIER"` \
+ -s $MX_SOCKET
+ eend $? "Failed to start mimedefang-multiplexor"
+
+ # Start mimedefang
+ rm -f $SOCKET > /dev/null 2>&1
+ ebegin "Starting mimedefang"
+ start-stop-daemon --start --quiet \
+ --exec $PROGDIR/$prog -- -P $PID \
+ -R $LOOPBACK_RESERVED_CONNECTIONS \
+ -m $MX_SOCKET \
+ `[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \
+ `[ -n "$MX_USER" ] && echo "-U $MX_USER"` \
+ `[ -n "$SYSLOG_FACILITY" ] && echo "-S $SYSLOG_FACILITY"` \
+ `[ "$MX_RELAY_CHECK" = "yes" ] && echo "-r"` \
+ `[ "$MX_HELO_CHECK" = "yes" ] && echo "-H"` \
+ `[ "$MX_SENDER_CHECK" = "yes" ] && echo "-s"` \
+ `[ "$MX_RECIPIENT_CHECK" = "yes" ] && echo "-t"` \
+ `[ "$KEEP_FAILED_DIRECTORIES" = "yes" ] && echo "-k"` \
+ `[ "$MD_EXTRA" != "" ] && echo $MD_EXTRA` \
+ `[ "$ALLOW_NEW_CONNECTIONS_TO_QUEUE" = "yes" ] && echo "-q"` \
+ -p $SOCKET
+ eend $? "Failed to start mimedefang"
+}
+
+stop() {
+ ebegin "Stopping mimedefang"
+ start-stop-daemon --stop --quiet --pidfile $PID
+ eend $? "Failed to stop mimedefang"
+
+ ebegin "Stopping mimedefang-multiplexor"
+ start-stop-daemon --stop --quiet --pidfile $MXPID
+ eend $? "Failed to stop mimedefang-multiplexor"
+}
diff --git a/mail-filter/mimedefang/metadata.xml b/mail-filter/mimedefang/metadata.xml
new file mode 100644
index 000000000000..dda87916e233
--- /dev/null
+++ b/mail-filter/mimedefang/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+<maintainer><email>net-mail@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/mail-filter/mimedefang/mimedefang-2.57.ebuild b/mail-filter/mimedefang/mimedefang-2.57.ebuild
new file mode 100644
index 000000000000..6ad8f97edde5
--- /dev/null
+++ b/mail-filter/mimedefang/mimedefang-2.57.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/mimedefang/mimedefang-2.57.ebuild,v 1.1 2006/07/26 05:43:20 langthang Exp $
+
+inherit eutils
+
+DESCRIPTION="A program for Milter supported mail servers that implements antispam, antivirus, and other customizable filtering on email messages"
+HOMEPAGE="http://www.mimedefang.org/"
+SRC_URI="http://www.mimedefang.org/static/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="|| ( mail-filter/libmilter >=mail-mta/sendmail-8.13 )
+ >=dev-perl/MIME-tools-5.413
+ >=perl-core/MIME-Base64-3.03
+ dev-perl/Digest-SHA"
+
+S=${WORKDIR}/${P}
+
+pkg_setup() {
+ enewgroup defang
+ enewuser defang -1 -1 -1 defang
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ fowners defang:defang /etc/mail/mimedefang-filter
+ fperms 400 /etc/mail/mimedefang-filter
+ insinto /etc/mail/
+ insopts -m 644
+ newins "${S}"/SpamAssassin/spamassassin.cf sa-mimedefang.cf
+
+ keepdir /var/spool/{MD-Quarantine,MIMEDefang}
+ fowners defang:defang /var/spool/{MD-Quarantine,MIMEDefang}
+ fperms 700 /var/spool/{MD-Quarantine,MIMEDefang}
+
+ dodir /var/log/mimedefang
+ keepdir /var/log/mimedefang
+
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ dodir /usr/share/doc/${PF}/
+ mv "${S}/examples" "${D}/usr/share/doc/${PF}/"
+}
+
+pkg_preinst() {
+ enewgroup defang
+ enewuser defang -1 -1 -1 defang
+}