Import mimedefang 2.57

MIMEDefang is a framework for filtering e-mail. It uses Sendmail's
"Milter" API, some C glue code, and some Perl code to let you write
high-performance mail filters in Perl.

Joint work with dlg@
This commit is contained in:
alek 2006-10-19 01:06:22 +00:00
parent d38987df61
commit d0692f9c2e
7 changed files with 137 additions and 0 deletions

38
mail/mimedefang/Makefile Normal file
View File

@ -0,0 +1,38 @@
# $OpenBSD: Makefile,v 1.1.1.1 2006/10/19 01:06:22 alek Exp $
COMMENT= "mailfilter to identify and mark spam"
DISTNAME= mimedefang-2.57
CATEGORIES= mail perl5
HOMEPAGE= http://www.mimedefang.org/
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c
MASTER_SITES= ${HOMEPAGE}static/
RUN_DEPENDS= :p5-MIME-tools-*:mail/p5-MIME-tools \
:p5-Digest-SHA1-*:security/p5-Digest-SHA1
BUILD_DEPENDS= ${RUN_DEPENDS}
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --with-user=_mdefang \
--disable-anti-virus
NO_REGRESS= Yes
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mimedefang
${INSTALL_DATA} ${WRKSRC}/examples/suggested-minimum-filter-for-windows-clients \
${PREFIX}/share/examples/mimedefang/mimedefang-filter
${INSTALL_DATA} ${WRKSRC}/SpamAssassin/spamassassin.cf \
${PREFIX}/share/examples/mimedefang/sa-mimedefang.cf
${INSTALL_SCRIPT} ${FILESDIR}/rc.mimedefang \
${PREFIX}/share/examples/mimedefang/
.include <bsd.port.mk>

4
mail/mimedefang/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (mimedefang-2.57.tar.gz) = e55b22dda54c4a3b52e1fbeb9135b0cf
RMD160 (mimedefang-2.57.tar.gz) = 0816cc397c2d6552007609e6d5bc9728421debbd
SHA1 (mimedefang-2.57.tar.gz) = 85207097008a06a5cde1c0e6c76270ef719a5769
SIZE (mimedefang-2.57.tar.gz) = 316909

View File

@ -0,0 +1,30 @@
# $OpenBSD: rc.mimedefang,v 1.1.1.1 2006/10/19 01:06:22 alek Exp $
mimedefang=/usr/local/bin/mimedefang
multiplexor=/usr/local/bin/mimedefang-multiplexor
if [ -x $mimedefang -a -x $multiplexor ]; then
MAX_SLAVES=16
MIN_SLAVES=2
BUSY_TIMEOUT=720
IDLE_TIMEOUT=300
WAIT_START=10
MX_QUEUE_SIZE=10
MX_QUEUE_TIMEOUT=30
echo -n " mimedefang-multiplexor"
$multiplexor -U _mdefang -l \
-x $MAX_SLAVES -m $MIN_SLAVES -b $BUSY_TIMEOUT -i $IDLE_TIMEOUT \
-w $WAIT_START -q $MX_QUEUE_SIZE -Q $MX_QUEUE_TIMEOUT \
-p /var/run/mdefang/multiplexor.pid \
-s /var/run/mdefang/multiplexor.socket
echo -n " mimedefang"
$mimedefang -U _mdefang -r -s -t \
-p /var/run/mdefang/mimedefang.socket \
-m /var/run/mdefang/multiplexor.socket
sleep 3 # for socket creation
fi

15
mail/mimedefang/pkg/DESCR Normal file
View File

@ -0,0 +1,15 @@
MIMEDefang is a framework for filtering e-mail. It uses Sendmail's
"Milter" API, some C glue code, and some Perl code to let you write
high-performance mail filters in Perl.
People use MIMEDefang to:
- Block viruses
- Block or tag spam
- Remove HTML mail parts
- Add boilerplate disclaimers to outgoing mail
- Remove or alter attachments
- Replace attachments with URL's
- Implement sophisticated access controls.
You're limited only by your imagination. If you can think of it and code
it in Perl, you can do it with MIMEDefang.

View File

@ -0,0 +1,13 @@
To finish installation you should add following line to
your .mc files:
INPUT_MAIL_FILTER(`mimedefang', \
`S=unix:/var/run/mdefang/mimedefang.socket, \
F=T, T=S:360s;R:360s;E:15m')dnl
If you wish to start up mimedefang automatically during system
startup, add following lines to /etc/rc.local:
if [ -f ${SYSCONFDIR}/rc.mimedefang ]; then
. ${SYSCONFDIR}/rc.mimedefang
fi

36
mail/mimedefang/pkg/PLIST Normal file
View File

@ -0,0 +1,36 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/10/19 01:06:22 alek Exp $
@newgroup _mdefang:570
@newuser _mdefang:570:_mdefang:daemon:MIMEDefang:/nonexistent:/sbin/nologin
bin/md-mx-ctrl
bin/mimedefang
bin/mimedefang-multiplexor
bin/mimedefang.pl
bin/watch-mimedefang
@man man/man5/mimedefang-filter.5
@man man/man7/mimedefang-notify.7
@man man/man7/mimedefang-protocol.7
@man man/man8/md-mx-ctrl.8
@man man/man8/mimedefang-multiplexor.8
@man man/man8/mimedefang.8
@man man/man8/mimedefang.pl.8
@man man/man8/watch-mimedefang.8
share/examples/mimedefang/
@sample ${SYSCONFDIR}/mail/
share/examples/mimedefang/mimedefang-filter
@sample ${SYSCONFDIR}/mail/mimedefang-filter
share/examples/mimedefang/rc.mimedefang
@mode 755
@sample ${SYSCONFDIR}/rc.mimedefang
@mode
share/examples/mimedefang/sa-mimedefang.cf
@sample ${SYSCONFDIR}/mail/sa-mimedefang.cf
@mode 0750
@owner _mdefang
@group _mdefang
@sample /var/spool/MIMEDefang/
@sample /var/spool/MD-Quarantine/
@mode 0755
@sample /var/run/mdefang/
@unexec rm -rf /var/run/mdefang/*
@extraunexec rm -rf /var/spool/MIMEDefang/*
@extraunexec rm -rf /var/spool/MD-Quarantine/*

View File

@ -0,0 +1 @@
Do not forget to revert changes made to /etc/rc.local..