From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Mar 8 01:00:17 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A18F106566B for ; Mon, 8 Mar 2010 01:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3D18FC18 for ; Mon, 8 Mar 2010 01:00:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o28102li006860 for ; Mon, 8 Mar 2010 01:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o28102Zv006859; Mon, 8 Mar 2010 01:00:02 GMT (envelope-from gnats) Resent-Date: Mon, 8 Mar 2010 01:00:02 GMT Resent-Message-Id: <201003080100.o28102Zv006859@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sahil Tandon Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7D741065677; Mon, 8 Mar 2010 00:54:17 +0000 (UTC) (envelope-from sahil@spartan.hamla.org) Received: from spartan.hamla.org (spartan.hamla.org [206.251.255.30]) by mx1.freebsd.org (Postfix) with ESMTP id D31048FC22; Mon, 8 Mar 2010 00:54:17 +0000 (UTC) Received: by spartan.hamla.org (Postfix, from userid 1001) id 6A9041713F; Sun, 7 Mar 2010 19:54:17 -0500 (EST) Message-Id: <20100308005417.6A9041713F@spartan.hamla.org> Date: Sun, 7 Mar 2010 19:54:17 -0500 (EST) From: Sahil Tandon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: itetcu@FreeBSD.org, miwi@FreeBSD.org Subject: ports/144540: [NEW PORT] mail/postpals: a simple "penpals" policy daemon for Postfix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sahil Tandon List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 01:00:17 -0000 >Number: 144540 >Category: ports >Synopsis: [NEW PORT] mail/postpals: a simple "penpals" policy daemon 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 08 01:00:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Sahil Tandon >Release: FreeBSD 9.0-RELEASE i386 >Organization: >Environment: >Description: Postpals is a simple policy daemon for Postfix. It keeps a database of outgoing mail, specifically recipients and relays associated to them. The main goal is to whitelist mail coming back from those senders and relays early in the postfix restriction chain, so it doesn't get hit with any client UCE checks you are using (RBL, helo, PTR, greylisting etc). WWW: http://mailfud.org/postpals/ * NOTE * This port requires an update to ports/UIDs and ports/GIDs; I will submit another PR for that and submit a follow-up here accordingly. >How-To-Repeat: >Fix: --- postpals.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: # # postpals # postpals/files # postpals/files/postpals.in # postpals/files/pkg-message.in # postpals/files/postpals-taillog.in # postpals/Makefile # postpals/pkg-plist # postpals/pkg-descr # postpals/distinfo # echo c - postpals mkdir -p postpals > /dev/null 2>&1 echo c - postpals/files mkdir -p postpals/files > /dev/null 2>&1 echo x - postpals/files/postpals.in sed 's/^X//' >postpals/files/postpals.in << '93321b4fb5912e960c16f08d26ac4435' X#!/bin/sh X X# $FreeBSD$ X# X# PROVIDE: postpals X# REQUIRE: LOGIN cleanvar X# BEFORE: postpals-taillog X# KEYWORD: shutdown X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# postpals_enable="YES" X# X X. %%RC_SUBR%% X Xname=postpals Xrcvar=`set_rcvar` X Xcommand=%%PREFIX%%/sbin/${name} Xpidfile="/var/run/${name}.pid" Xprocname="/usr/bin/perl" X Xstop_postcmd=stop_postcmd X Xstop_postcmd() X{ X rm -f $pidfile X} X Xload_rc_config $name X Xcase "$postpals_enable" in X [Yy][Ee][Ss] | 1 | [Oo][Nn] | [Tt][Rr][Uu][Ee]) ;; X *) echo "To make use of $name you must first set $rcvar=\"YES\" in /etc/rc.conf" ;; Xesac X X: ${postpals_enable="NO"} X: ${postpals_tests="relay24,rcpt"} X: ${postpals_port="10040"} X Xcommand_args="-p ${pidfile} -u ${name} -g ${name} -d /var/db/${name}/${name}.db -T ${postpals_tests} ${postpals_port}" X Xrun_rc_command "$1" 93321b4fb5912e960c16f08d26ac4435 echo x - postpals/files/pkg-message.in sed 's/^X//' >postpals/files/pkg-message.in << '273412281091cff5cc79634545647982' X************* XConfigure postfix main.cf to check policy service before Xother checks. They will be skipped on postpals matching. X XRemember to put all relay checks first, so you don't Xcreate an open relay! X XIn %%LOCALBASE%%/etc/postfix/main.cf, integrate thusly: X Xsmtpd_recipient_restrictions = X ... X reject_unauth_destination X ... X check_policy_service inet:127.0.0.1:10040 X ... X (RBL, helo, PTR checks..) X XFor more help, see: http://mailfud.org/postpals/ X X************* 273412281091cff5cc79634545647982 echo x - postpals/files/postpals-taillog.in sed 's/^X//' >postpals/files/postpals-taillog.in << '1b4003cb7e924bedcf667a9e45b2eb0c' X#!/bin/sh X X# $FreeBSD$ X# X# PROVIDE: postpals-taillog X# REQUIRE: LOGIN cleanvar X# BEFORE: mail X# KEYWORD: shutdown X# X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# postpals_taillog_enable="YES" X# X X. %%RC_SUBR%% X Xname=postpals_taillog Xrcvar=`set_rcvar` X Xcommand=%%PREFIX%%/sbin/postpals-taillog Xpidfile=/var/run/${name}.pid Xprocname="/usr/bin/perl" X Xstop_postcmd=stop_postcmd X Xstop_postcmd() X{ X rm -f $pidfile X} X Xpostpals_taillog_enable=${postpals_taillog_enable="NO"} Xpostpals_taillog_flags=${postpals_taillog_flags="-p ${pidfile} 10040 /var/log/maillog"} X Xload_rc_config $name Xrun_rc_command "$1" 1b4003cb7e924bedcf667a9e45b2eb0c echo x - postpals/Makefile sed 's/^X//' >postpals/Makefile << 'a443977b4d84ed9a9e1fa983335c80c8' X# New ports collection makefile for: postpals X# Date created: 7 March 2010 X# Whom: Sahil Tandon X# X# $FreeBSD$ X# X XPORTNAME= postpals XPORTVERSION= 0.01 XCATEGORIES= mail XMASTER_SITES= http://mailfud.org/${PORTNAME}/ XDISTFILES= ${PORTNAME} ${PORTNAME}-taillog XEXTRACT_ONLY= # none X XMAINTAINER= sahil@tandon.net XCOMMENT= Postpals is a simple policy daemon for Postfix X XRUN_DEPENDS= p5-IO-Multiplex>=0:${PORTSDIR}/devel/p5-IO-Multiplex \ X p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \ X p5-File-Tail>=0:${PORTSDIR}/devel/p5-File-Tail X XSUB_FILES= pkg-message X XUSE_RC_SUBR= ${PORTNAME} ${PORTNAME}-taillog XUSE_PERL5_RUN= yes XNO_BUILD= yes X XUSERS= postpals XGROUPS= postpals X Xdo-install: X @${INSTALL_SCRIPT} ${DISTFILES:S|^|${DISTDIR}/|} ${PREFIX}/sbin/ X @${INSTALL} -o ${PORTNAME} -g ${PORTNAME} -m 700 -d /var/db/postpals X Xpost-install: X @${CAT} ${PKGMESSAGE} X X.include a443977b4d84ed9a9e1fa983335c80c8 echo x - postpals/pkg-plist sed 's/^X//' >postpals/pkg-plist << '3ef5a2e34df2241bd2ad364b5f1ec1be' X@exec mkdir -p /var/db/postpals Xsbin/postpals Xsbin/postpals-taillog X@unexec rmdir /var/db/postpals 2>/dev/null || true 3ef5a2e34df2241bd2ad364b5f1ec1be echo x - postpals/pkg-descr sed 's/^X//' >postpals/pkg-descr << '06580de918ec94a37383a27ccfa6214a' XPostpals is a simple policy daemon for Postfix. It keeps a database of Xoutgoing mail, specifically recipients and relays associated to them. XThe main goal is to whitelist mail coming back from those senders and Xrelays early in the postfix restriction chain, so it doesn't get hit Xwith any client UCE checks you are using (RBL, helo, PTR, greylisting etc). X XWWW: http://mailfud.org/postpals/ 06580de918ec94a37383a27ccfa6214a echo x - postpals/distinfo sed 's/^X//' >postpals/distinfo << 'f1e4f22dd24ebd4bc8abd4e7c191e096' XMD5 (postpals) = 8a30f4aab2b0c7f62c9fe147c1a10a73 XSHA256 (postpals) = 2f962d361044cf00cd2161f953caf2623aebde38473e05e088d67f0158b2703a XSIZE (postpals) = 18099 XMD5 (postpals-taillog) = 8a01508315185076c6ad5c7bf8e02fea XSHA256 (postpals-taillog) = d4974d3d4bd9dc7077d487a419a1571a9ff579fcc0e93200a9ea3201b9b97374 XSIZE (postpals-taillog) = 10028 f1e4f22dd24ebd4bc8abd4e7c191e096 exit --- postpals.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: