diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2002-05-23 19:20:58 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2002-05-23 19:20:58 +0000 |
commit | 4df11be408c38b864a3ae0ceda174dbaf28ceee7 (patch) | |
tree | 7738ea1d2045812a3b3e478e84419ffb5a96f152 /mail | |
parent | b7280bf91d76ef501ccdfec21c94523d6c0eaf93 (diff) | |
download | ports-4df11be408c38b864a3ae0ceda174dbaf28ceee7.tar.gz ports-4df11be408c38b864a3ae0ceda174dbaf28ceee7.zip |
Notes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/mimedefang/Makefile | 47 | ||||
-rw-r--r-- | mail/mimedefang/distinfo | 1 | ||||
-rw-r--r-- | mail/mimedefang/files/mimedefang.sh | 80 | ||||
-rw-r--r-- | mail/mimedefang/pkg-comment | 1 | ||||
-rw-r--r-- | mail/mimedefang/pkg-descr | 23 | ||||
-rw-r--r-- | mail/mimedefang/pkg-install | 29 | ||||
-rw-r--r-- | mail/mimedefang/pkg-message | 5 | ||||
-rw-r--r-- | mail/mimedefang/pkg-plist | 20 |
9 files changed, 207 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index 5dca842c5ac4..2d335bd160ca 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -110,6 +110,7 @@ SUBDIR += mew2-xemacs21 SUBDIR += mew2-xemacs21-mule SUBDIR += mh + SUBDIR += mimedefang SUBDIR += minimalist SUBDIR += ml SUBDIR += mmc diff --git a/mail/mimedefang/Makefile b/mail/mimedefang/Makefile new file mode 100644 index 000000000000..dff8002f72be --- /dev/null +++ b/mail/mimedefang/Makefile @@ -0,0 +1,47 @@ +# New ports collection makefile for: mimedefang +# Date created: 13 May 2002 +# Whom: Andrey V. Pevnev <andrey@mgul.ac.ru> +# +# $FreeBSD$ +# + +PORTNAME= mimedefang +PORTVERSION= 2.11 +CATEGORIES= mail +MASTER_SITES= http://www.roaringpenguin.com/mimedefang/ + +MAINTAINER= andrey@mgul.ac.ru + +BUILD_DEPENDS= \ + ${PERL_SITELIBDIR}/IO/Stringy.pm:${PORTSDIR}/devel/p5-IO-stringy \ + ${PERL_SITELIBDIR}/MIME/Tools.pm:${PORTSDIR}/mail/p5-MIME-Tools \ + ${PERL_SITELIBDIR}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \ + ${PERL_SITELIBDIR}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools \ + ${PERL_SITELIBDIR}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 \ + ${PERL_SITELIBDIR}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin + +USE_PERL5= yes +PERL_SITELIBDIR= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} +GNU_CONFIGURE= yes + +MAN5= mimedefang-filter.5 +MAN7= mimedefang-protocol.7 +MAN8= mimedefang.8 mimedefang.pl.8 mimedefang-multiplexor.8 + +.if !exists( /usr/include/libmilter/mfapi.h ) +IGNORE= "requires libmilter installed in the base system, upgrade your FreeBSD" +.endif + +post-install: + ${INSTALL} -m 755 ${FILESDIR}/mimedefang.sh ${PREFIX}/etc/rc.d/mimedefang.sh +.if !defined(NOPORTDOCS) + ${MKDIR} ${EXAMPLESDIR} + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR} +.endif + ${CHOWN} mailnull:mailnull /var/spool/MIMEDefang + ${CHMOD} 700 /var/spool/MIMEDefang + ${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/mail/mimedefang/distinfo b/mail/mimedefang/distinfo new file mode 100644 index 000000000000..af6bd1b44c9f --- /dev/null +++ b/mail/mimedefang/distinfo @@ -0,0 +1 @@ +MD5 (mimedefang-2.11.tar.gz) = 1b4b37bcf536336ef6cbebd2f631f327 diff --git a/mail/mimedefang/files/mimedefang.sh b/mail/mimedefang/files/mimedefang.sh new file mode 100644 index 000000000000..103883e992bf --- /dev/null +++ b/mail/mimedefang/files/mimedefang.sh @@ -0,0 +1,80 @@ +#!/bin/sh - +# +# initialization/shutdown script for DrWeb daemon and DrWeb mail filter + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +# Sool directory +SPOOLDIR=/var/spool/MIMEDefang + +# Limit number of concurrent filters to 10 +MAX_SLAVES=10 +MIN_SLAVES=2 +BUSY_TIMEOUT=240 +IDLE_TIMEOUT=3600 + +# Uncomment next line to log statistics +# STATS_LOG="-t ${SPOOLDIR}/md-stats" + +# Uncomment next line to flush stats file after each write +# FLUSH_STATS=-u +# Comment next line out if you do not want multiplexor to log messages. +# DO_LOGGING=-l + +RETVAL=0 + +MIMEDEFANG=${PREFIX}/bin/mimedefang +MULTIPLEX=${PREFIX}/bin/mimedefang-multiplexor + +# MIMEDefang socket +SOCK=${SPOOLDIR}/mimedefang.sock + +# MIMEDefang-multiplexor socket +MXSOCK=${SPOOLDIR}/mdefang-mx.sock + +# PID file location +PIDFILE=${SPOOLDIR}/mimedefang.pid + +# MIMEDefang owner +USER=mailnull + +[ -x $MIMEDEFANG ] || exit 1 +[ -x $MULTIPLEX ] || exit 1 + +# See how we were called. +case "$1" in + start) + # Clean spool directory + su -m ${USER} -c "rm -f ${PIDFILE} ${SOCK} ${MXSOCK}" + # Start daemons. + # Start multiplexor + su -m ${USER} -c "$MULTIPLEX -x $MAX_SLAVES -m $MIN_SLAVES -b $BUSY_TIMEOUT -i $IDLE_TIMEOUT $DO_LOGGING $STATS_LOG $FLUSH_STATS -s ${MXSOCK}" + RETVAL=$? + [ $RETVAL -ne 0 ] && exit 1 + echo -n " mimedefang-multiplexor" + + su -m ${USER} -c "$MIMEDEFANG -m ${MXSOCK} -p ${SOCK} -P ${PIDFILE}" + RETVAL=$? + [ $RETVAL -ne 0 ] && exit 1 + echo -n " mimedefang" + ;; + stop) + # Stop daemons. + kill `cat ${PIDFILE}` + echo -n " mimedefang" + kill `ps ax | grep mimedefang-multiplexor | grep -v grep | grep -v sh | awk '{print $1}'` + su -m ${USER} -c "rm -f ${PIDFILE} ${SOCK} ${MXSOCK}" + echo -n " mimedefang-multiplexor" + ;; + restart) + $0 stop + sleep 5 + $0 start + ;; + *) + echo "usage: `basename $0` {start|stop|restart}" >&2 + ;; +esac diff --git a/mail/mimedefang/pkg-comment b/mail/mimedefang/pkg-comment new file mode 100644 index 000000000000..eb3506ba273f --- /dev/null +++ b/mail/mimedefang/pkg-comment @@ -0,0 +1 @@ +Milter based anti-spam and anti-virus filtering program diff --git a/mail/mimedefang/pkg-descr b/mail/mimedefang/pkg-descr new file mode 100644 index 000000000000..9b8407605f6e --- /dev/null +++ b/mail/mimedefang/pkg-descr @@ -0,0 +1,23 @@ +MIMEDefang is a program for inspecting and modifying e-mail messages as +they pass through your mail relay. MIMEDefang is written in Perl, and its +filter actions are expressed in Perl, so it's highly flexible. Here are some +things that you can do very easily with MIMEDefang: + + Delete or alter attachments based on file name, contents, results of a + virus scan, attachment size, etc. + + Replace large attachments with links to a centrally-stored copy to ease + the burden on POP3 users with slow modem links. + + Add boilerplate text to e-mail messages. + + Customize filter rules based on domain, user-name, relay machine, etc. + + Reject unacceptable messages, where you define what "unacceptable" means. + + Add or delete recipients for a message. + +WWW: http://www.roaringpenguin.com/mimedefang/ + +- Andrey V. Pevnev +andrey@mgul.ac.ru diff --git a/mail/mimedefang/pkg-install b/mail/mimedefang/pkg-install new file mode 100644 index 000000000000..80d3b95a908e --- /dev/null +++ b/mail/mimedefang/pkg-install @@ -0,0 +1,29 @@ +#!/bin/sh + +[ $# != 2 ] && exit 1 +[ -z "${PKG_PREFIX}" ] && exit 1 +[ -n "${BATCH}" ] && exit 0 + +PKG_NAME=$1 +PKG_ACTION=$2 +SPOOLDIR=/var/spool/MIMEDefang + +case "$PKG_ACTION" in +POST-INSTALL) + if [ ! -d ${SPOOLDIR} ]; then + mkdir -p ${SPOOLDIR} + chown mailnull:mailnull ${SPOOLDIR} + chmod 700 ${SPOOLDIR} + fi + ;; + +PRE-INSTALL|POST-DEINSTALL|DEINSTALL) + ;; + +*) +echo "usage: $0 <PKG_NAME> {PRE-INSTALL|POST-INSTALL|DEINSTALL|POST-DEINSTALL}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/mail/mimedefang/pkg-message b/mail/mimedefang/pkg-message new file mode 100644 index 000000000000..993054a25884 --- /dev/null +++ b/mail/mimedefang/pkg-message @@ -0,0 +1,5 @@ +To finish installation please reconfigure sendmail to use + MIMEDefang filter, for example add this lines to your sendmail.mc + + MAIL_FILTER(`mimedefang', `S=local:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=C:15m;S:4m;R:4m;E:10m')dnl + define(`confINPUT_MAIL_FILTERS', `mimedefang')dnl diff --git a/mail/mimedefang/pkg-plist b/mail/mimedefang/pkg-plist new file mode 100644 index 000000000000..19a1d0b10e5c --- /dev/null +++ b/mail/mimedefang/pkg-plist @@ -0,0 +1,20 @@ +bin/mimedefang-multiplexor +bin/mimedefang +bin/mimedefang.pl +etc/rc.d/mimedefang.sh +%%PORTDOCS%%share/doc/mimedefang/README +%%PORTDOCS%%share/doc/mimedefang/README.ANOMY +%%PORTDOCS%%share/doc/mimedefang/README.SPAMASSASSIN +%%PORTDOCS%%share/examples/mimedefang/suggested-minimum-filter-for-windows-clients +%%PORTDOCS%%share/examples/mimedefang/README +%%PORTDOCS%%share/examples/mimedefang/redhat-logrotate-file +%%PORTDOCS%%share/examples/mimedefang/redhat-sendmail-init-script +%%PORTDOCS%%share/examples/mimedefang/redhat-sendmail-init-script-with-multiplexor +%%PORTDOCS%%share/examples/mimedefang/stream-by-domain-filter +%%PORTDOCS%%@dirrm share/doc/mimedefang +%%PORTDOCS%%@dirrm share/examples/mimedefang +@cwd /var/spool +@dirrm MIMEDefang +@cwd /etc +mail/mimedefang-filter.example +mail/spamassassin/sa-mimedefang.cf.example |