Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Mar 2005 12:41:27 +0800 (CST)
From:      Rong-En Fan <rafan@infor.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/79070: [NEW PORT] mail/policyd: Greylisting/sender based throttling/spamtrap policy server for Postfix
Message-ID:  <200503210441.j2L4fQRB021246@svm.csie.ntu.edu.tw>
Resent-Message-ID: <200503210450.j2L4o2YT019697@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         79070
>Category:       ports
>Synopsis:       [NEW PORT] mail/policyd: Greylisting/sender based throttling/spamtrap policy server for Postfix
>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 Mar 21 04:50:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Rong-En Fan
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
NTU CSIE
>Environment:
System: FreeBSD svm.csie.ntu.edu.tw 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Jan  8 21:21:15 CST
>Description:
Policyd is an anti-spam plugin for Postfix (written in C) that does
greylisting, sender (envelope or SASL) based throttling (on messages
and/or volume per defined time unit) and Spamtrap monitoring /
blacklisting.

Author:	cami@mweb.co.za
WWW:	http://policyd.sourceforge.net/

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

Note that policyd does not generate a pidfile, so I have to do
this in rc script which utilize ps and grep, if there is a 
better method please let me know :-)

--- policyd-1.44.shar 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:
#
#	policyd
#	policyd/pkg-descr
#	policyd/Makefile
#	policyd/pkg-plist
#	policyd/distinfo
#	policyd/files
#	policyd/files/patch-Makefile
#	policyd/files/policyd.sh
#
echo c - policyd
mkdir -p policyd > /dev/null 2>&1
echo x - policyd/pkg-descr
sed 's/^X//' >policyd/pkg-descr << 'END-of-policyd/pkg-descr'
XPolicyd is an anti-spam plugin for Postfix (written in C) that does
Xgreylisting, sender (envelope or SASL) based throttling (on messages
Xand/or volume per defined time unit) and Spamtrap monitoring /
Xblacklisting.
X
XAuthor:	cami@mweb.co.za
XWWW:	http://policyd.sourceforge.net/
END-of-policyd/pkg-descr
echo x - policyd/Makefile
sed 's/^X//' >policyd/Makefile << 'END-of-policyd/Makefile'
X# New ports collection makefile for:	policyd
X# Date created:				2005-03-20
X# Whom:					Rong-En Fan <rafan@infor.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	policyd
XPORTVERSION=	1.44
XCATEGORIES=	mail
XMASTER_SITES=	http://policyd.sourceforge.net/
XDISTNAME=	${PORTNAME}-v${PORTVERSION}
X
XMAINTAINER=	rafan@infor.org
XCOMMENT=	Greylisting/sender based throttling/spamtrap policy server for Postfix
X
XUSE_MYSQL=	yes
XUSE_GMAKE=	yes
XUSE_REINPLACE=	yes
XUSE_RC_SUBR=	yes
X
XALL_TARGET=	linux
X
X.if !defined(NOPORTDOCS)
XPORTDOCS=	Changelog.txt README.txt License.txt WHITELIST.sql
X.endif
X
Xpost-patch:
X	${SED} -e 's#%%PREFIX%%#${PREFIX}#g' -e 's#%%RC_SUBR%%#${RC_SUBR}#g' \
X		${FILESDIR}/policyd.sh > ${WRKDIR}/policyd.sh
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKDIR}/policyd.sh ${PREFIX}/etc/rc.d
X	${INSTALL_PROGRAM} ${WRKSRC}/cleanup ${PREFIX}/sbin
X	${INSTALL_PROGRAM} ${WRKSRC}/policyd ${PREFIX}/sbin
X	${INSTALL_DATA} ${WRKSRC}/policyd.conf ${PREFIX}/etc/policyd.conf.sample
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	for f in ${PORTDOCS}; do \
X	  ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
X	done
X.endif
X
X.include <bsd.port.mk>
END-of-policyd/Makefile
echo x - policyd/pkg-plist
sed 's/^X//' >policyd/pkg-plist << 'END-of-policyd/pkg-plist'
X@comment $FreeBSD$
Xsbin/cleanup
Xsbin/policyd
Xetc/policyd.conf.sample
Xetc/rc.d/policyd.sh
END-of-policyd/pkg-plist
echo x - policyd/distinfo
sed 's/^X//' >policyd/distinfo << 'END-of-policyd/distinfo'
XMD5 (policyd-v1.44.tar.gz) = 23c1662e016c56395ec14066bf3a99a3
XSIZE (policyd-v1.44.tar.gz) = 30041
END-of-policyd/distinfo
echo c - policyd/files
mkdir -p policyd/files > /dev/null 2>&1
echo x - policyd/files/patch-Makefile
sed 's/^X//' >policyd/files/patch-Makefile << 'END-of-policyd/files/patch-Makefile'
X--- Makefile.orig	Sun Mar 20 19:35:49 2005
X+++ Makefile	Sun Mar 20 19:37:50 2005
X@@ -22,10 +22,10 @@
X #  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
X #
X #                            
X-inc      := /usr/include/mysql -I/usr/local/mysql/include -I/usr/local/mysql/include/mysql
X-lib      := /usr/lib/mysql -L/usr/local/mysql/lib
X-CC       := gcc
X-CPPFLAGS := -O3 -I$(inc)
X+inc      := $(PREFIX)/include/mysql
X+lib      := $(PREFIX)/lib/mysql
X+CC       ?= gcc
X+CPPFLAGS ?= -I$(inc)
X #CFLAGS   := -g -W -Wall
X LLDLIBS  = -L$(lib) -lmysqlclient -lz
X SLDLIBS  = -L$(lib) -lmysqlclient -lz -lsocket -lnsl -lm
END-of-policyd/files/patch-Makefile
echo x - policyd/files/policyd.sh
sed 's/^X//' >policyd/files/policyd.sh << 'END-of-policyd/files/policyd.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: policyd
X# REQUIRE: LOGIN
X# BEFORE: mail
X# KEYWORD: FreeBSD shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable policyd:
X#
X# policyd_enable="YES"
X#
X
X. %%RC_SUBR%%
X
Xname=policyd
Xrcvar=`set_rcvar`
X
Xcommand=%%PREFIX%%/sbin/policyd
X
Xstart_postcmd=start_postcmd
Xstop_postcmd=stop_postcmd
X
Xstart_postcmd()
X{
X  ps awx | grep [p]olicyd | cut -c 1-6 > $pidfile
X}
X
Xstop_postcmd()
X{
X  rm -f $pidfile
X}
X
X# set defaults
X
Xpolicyd_enable=${policyd_enable:-"NO"}
Xpolicyd_pidfile=${policyd_pidfile:-"/var/run/policyd.pid"}
Xpolicyd_flags=${policyd_flags:-"-c %%PREFIX%%/etc/policyd.conf"}
X
Xpidfile="${policyd_pidfile}"
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-policyd/files/policyd.sh
exit
--- policyd-1.44.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503210441.j2L4fQRB021246>