forked from Lainports/freebsd-ports
Sendmail milter to interface with bogofilter
PR: ports/77472 Submitted by: Victor Balada Diaz <victor@alf.dyndns.ws>
This commit is contained in:
parent
3b0a2d3385
commit
a6e967fe32
6 changed files with 112 additions and 0 deletions
|
|
@ -195,6 +195,7 @@
|
|||
SUBDIR += mew3
|
||||
SUBDIR += mew3-emacs20
|
||||
SUBDIR += mew3-xemacs21-mule
|
||||
SUBDIR += milter-bogom
|
||||
SUBDIR += milter-greylist
|
||||
SUBDIR += milter-greylist-devel
|
||||
SUBDIR += milter-regex
|
||||
|
|
|
|||
47
mail/milter-bogom/Makefile
Normal file
47
mail/milter-bogom/Makefile
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# New ports collection makefile for: milter-bogom
|
||||
# Date created: 12 Feb 2005
|
||||
# Whom: Victor Balada Diaz <victor@alf.dyndns.ws>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= milter-bogom
|
||||
PORTVERSION= 1.5.1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.usebox.net/jjm/bogom/
|
||||
DISTNAME= bogom-${PORTVERSION}
|
||||
|
||||
MAINTAINER= victor@alf.dyndns.ws
|
||||
COMMENT= Simple sendmail milter to interface bogofilter
|
||||
|
||||
RUN_DEPENDS= bogofilter:${PORTSDIR}/mail/bogofilter
|
||||
|
||||
MAN8= bogom.8
|
||||
|
||||
PLIST_FILES= sbin/bogom \
|
||||
etc/bogom.conf-example \
|
||||
etc/rc.d/milter-bogom.sh
|
||||
PORTDOCS= README CHANGELOG
|
||||
|
||||
post-extract:
|
||||
@${SED} -e 's/LIBS+=-lmilter -lpthread/LIBS+=-lmilter ${PTHREAD_LIBS}/'\
|
||||
-i .bak ${WRKSRC}/Makefile
|
||||
@${SED} -e 's|/etc/bogom.conf|${PREFIX}/etc/bogom.conf|' -i .bak \
|
||||
${WRKSRC}/milter.c
|
||||
|
||||
do-install:
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/bogom ${PREFIX}/sbin
|
||||
@${INSTALL_MAN} ${WRKSRC}/bogom.8 ${PREFIX}/man/man8
|
||||
@${INSTALL_DATA} ${WRKSRC}/bogom.conf-example ${PREFIX}/etc
|
||||
@${INSTALL_SCRIPT} ${FILESDIR}/milter-bogom.sh ${PREFIX}/etc/rc.d
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${SED} -e 's|LOCALBASE|${PREFIX}|g' -i "" \
|
||||
${PREFIX}/etc/rc.d/milter-bogom.sh
|
||||
|
||||
.include <bsd.port.mk>
|
||||
2
mail/milter-bogom/distinfo
Normal file
2
mail/milter-bogom/distinfo
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
MD5 (bogom-1.5.1.tar.gz) = 9dc9fc890819e22df3408b8a39837606
|
||||
SIZE (bogom-1.5.1.tar.gz) = 16868
|
||||
22
mail/milter-bogom/files/milter-bogom.sh
Normal file
22
mail/milter-bogom/files/milter-bogom.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f LOCALBASE/sbin/bogom ]
|
||||
then
|
||||
LOCALBASE/sbin/bogom -u root & > /dev/null
|
||||
echo -n ' milter-bogom'
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
killall bogom
|
||||
sleep 3 # wait for bogom to exit
|
||||
;;
|
||||
|
||||
*)
|
||||
echo ""
|
||||
echo "Usage: `basename $0` { start | stop }"
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
exit 0;
|
||||
5
mail/milter-bogom/pkg-descr
Normal file
5
mail/milter-bogom/pkg-descr
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
The bogom plugin can be used with the milter API of sendmail to filter
|
||||
mails using bogofilter bayesian filter. It is intended to be used with
|
||||
only one words database for the whole system.
|
||||
|
||||
WWW: http://www.usebox.net/jjm/bogom/
|
||||
35
mail/milter-bogom/pkg-req
Normal file
35
mail/milter-bogom/pkg-req
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
need_milter() {
|
||||
|
||||
echo "****************************************************************"
|
||||
echo "* You need at least the version 8.13 of sendmail compiled with *"
|
||||
echo "* milter support enabled. *"
|
||||
echo "****************************************************************"
|
||||
exit 1;
|
||||
|
||||
}
|
||||
|
||||
# check if we are not installing
|
||||
if [ "$2" != "INSTALL" ];
|
||||
then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# check if sendmail have the MILTER API
|
||||
sendmail -d0.1 -bv root 2>&1 | grep MILTER > /dev/null
|
||||
|
||||
if [ $? != 0 ];
|
||||
then
|
||||
need_milter;
|
||||
fi
|
||||
|
||||
# Check if sendmail is at least 8.13
|
||||
sendmail -d0.1 -bv root 2>& 1 | grep Version | awk '{ if ( $2 > "8.13" )\
|
||||
exit 0; else exit 1;}'
|
||||
|
||||
if [ $? != 0 ];
|
||||
then
|
||||
need_milter;
|
||||
fi
|
||||
exit 0
|
||||
Loading…
Add table
Reference in a new issue