Date: Mon, 14 Feb 2005 01:51:09 +0100 (CET) From: Victor Balada Diaz <victor@alf.dyndns.ws> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/77472: [NEW PORT] mail/milter-bogom Sendmail milter to interface with bogofilter Message-ID: <200502140051.j1E0p9iF016921@pato.euesrg02.net> Resent-Message-ID: <200502140100.j1E10cqe093025@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 77472 >Category: ports >Synopsis: [NEW PORT] mail/milter-bogom Sendmail milter to interface with bogofilter >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Feb 14 01:00:37 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Victor Balada Diaz >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: System: FreeBSD pato.euesrg02.net 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Feb 8 18:06:26 CET 2005 victor@pato.euesrg02.net:/usr/obj/usr/src/sys/DPATOKERNEL i386 >Description: Sendmail milter to interface with bogofilter >How-To-Repeat: >Fix: --- milter-bogom.sh begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # milter-bogom # milter-bogom/distinfo # milter-bogom/pkg-req # milter-bogom/Makefile # milter-bogom/pkg-descr # milter-bogom/files # milter-bogom/files/milter-bogom.sh # echo c - milter-bogom mkdir -p milter-bogom > /dev/null 2>&1 echo x - milter-bogom/distinfo sed 's/^X//' >milter-bogom/distinfo << 'END-of-milter-bogom/distinfo' XMD5 (bogom-1.5.1.tar.gz) = 9dc9fc890819e22df3408b8a39837606 XSIZE (bogom-1.5.1.tar.gz) = 16868 END-of-milter-bogom/distinfo echo x - milter-bogom/pkg-req sed 's/^X//' >milter-bogom/pkg-req << 'END-of-milter-bogom/pkg-req' X#!/bin/sh X Xneed_milter() { X Xecho "****************************************************************" Xecho "* You need at least the version 8.13 of sendmail compiled with *" Xecho "* milter support enabled. *" Xecho "****************************************************************" Xexit 1; X X} X X# check if we are not installing Xif [ "$2" != "INSTALL" ]; Xthen X exit 0; Xfi X X# check if sendmail have the MILTER API Xsendmail -d0.1 -bv root 2>&1 | grep MILTER > /dev/null X Xif [ $? != 0 ]; Xthen X need_milter; Xfi X X# Check if sendmail is at least 8.13 Xsendmail -d0.1 -bv root 2>& 1 | grep Version | awk '{ if ( $2 > "8.13" )\ Xexit 0; else exit 1;}' X Xif [ $? != 0 ]; Xthen X need_milter; Xfi Xexit 0 END-of-milter-bogom/pkg-req echo x - milter-bogom/Makefile sed 's/^X//' >milter-bogom/Makefile << 'END-of-milter-bogom/Makefile' X# New ports collection makefile for: milter-bogom X# Date created: 12 Feb 2005 X# Whom: Victor Balada Diaz <victor@alf.dyndns.ws> X# X# $FreeBSD$ X# X XPORTNAME= milter-bogom XPORTVERSION= 1.5.1 XCATEGORIES= mail XMASTER_SITES= http://www.usebox.net/jjm/bogom/ XDISTNAME= bogom-${PORTVERSION} X XMAINTAINER= victor@alf.dyndns.ws XCOMMENT= Simple sendmail milter to interface bogofilter X XRUN_DEPENDS= bogofilter:${PORTSDIR}/mail/bogofilter X XMAN8= bogom.8 X XPLIST_FILES= sbin/bogom \ X etc/bogom.conf-example \ X etc/rc.d/milter-bogom.sh \ X %%PORTDOCS%%%%DOCSDIR%%/README \ X %%PORTDOCS%%%%DOCSDIR%%/CHANGELOG \ X %%PORTDOCS%%%%DOCSDIR%%/COPYING X XPLIST_DIRS= %%PORTDOCS%%%%DOCSDIR%% X Xpost-extract: X @${SED} -e 's/LIBS+=-lmilter -lpthread/LIBS+=-lmilter ${PTHREAD_LIBS}/'\ X -i .bak ${WRKSRC}/Makefile X @${SED} -e 's|/etc/bogom.conf|${PREFIX}/etc/bogom.conf|' -i .bak \ X ${WRKSRC}/milter.c X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/bogom ${PREFIX}/sbin X @${INSTALL_MAN} ${WRKSRC}/bogom.8 ${PREFIX}/man/man8 X @${INSTALL_DATA} ${WRKSRC}/bogom.conf-example ${PREFIX}/etc X @${INSTALL_SCRIPT} ${FILESDIR}/milter-bogom.sh ${PREFIX}/etc/rc.d X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} X @${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR} X @${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR} X.endif X Xpost-install: X @${SED} -e 's|LOCALBASE|${PREFIX}|g' -i "" \ X ${PREFIX}/etc/rc.d/milter-bogom.sh X X.include <bsd.port.mk> END-of-milter-bogom/Makefile echo x - milter-bogom/pkg-descr sed 's/^X//' >milter-bogom/pkg-descr << 'END-of-milter-bogom/pkg-descr' XThe bogom plugin can be used with the milter API of sendmail to filter Xmails using bogofilter bayesian filter. It is intended to be used with Xonly one words database for the whole system. X XWWW: http://www.usebox.net/jjm/bogom/ END-of-milter-bogom/pkg-descr echo c - milter-bogom/files mkdir -p milter-bogom/files > /dev/null 2>&1 echo x - milter-bogom/files/milter-bogom.sh sed 's/^X//' >milter-bogom/files/milter-bogom.sh << 'END-of-milter-bogom/files/milter-bogom.sh' X#!/bin/sh X Xcase "$1" in X start) X if [ -f LOCALBASE/sbin/bogom ] X then X LOCALBASE/sbin/bogom -u root & > /dev/null X echo -n ' milter-bogom' X fi X ;; X stop) X killall bogom X sleep 3 # wait for bogom to exit X ;; X X *) X echo "" X echo "Usage: `basename $0` { start | stop }" X echo "" X ;; Xesac Xexit 0; END-of-milter-bogom/files/milter-bogom.sh exit --- milter-bogom.sh ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502140051.j1E0p9iF016921>