diff options
author | itetcu <itetcu@FreeBSD.org> | 2010-04-03 17:43:50 +0800 |
---|---|---|
committer | itetcu <itetcu@FreeBSD.org> | 2010-04-03 17:43:50 +0800 |
commit | 226010a9d18fdcc428e89b81efd4255a354cb686 (patch) | |
tree | 2868e71c20e69b948bc8f6a65dd26b8d950bf3ae /mail/postpals | |
parent | e80997187f80bd49549a3ca6a4108ad2fb3d1c05 (diff) | |
download | freebsd-ports-gnome-226010a9d18fdcc428e89b81efd4255a354cb686.tar.gz freebsd-ports-gnome-226010a9d18fdcc428e89b81efd4255a354cb686.tar.zst freebsd-ports-gnome-226010a9d18fdcc428e89b81efd4255a354cb686.zip |
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/
PR: ports/144540
Submitted by: Sahil Tandon <sahil at tandon.net>
Diffstat (limited to 'mail/postpals')
-rw-r--r-- | mail/postpals/Makefile | 38 | ||||
-rw-r--r-- | mail/postpals/distinfo | 6 | ||||
-rw-r--r-- | mail/postpals/files/pkg-message.in | 20 | ||||
-rw-r--r-- | mail/postpals/files/postpals-taillog.in | 37 | ||||
-rw-r--r-- | mail/postpals/files/postpals.in | 45 | ||||
-rw-r--r-- | mail/postpals/pkg-descr | 7 | ||||
-rw-r--r-- | mail/postpals/pkg-plist | 4 |
7 files changed, 157 insertions, 0 deletions
diff --git a/mail/postpals/Makefile b/mail/postpals/Makefile new file mode 100644 index 000000000000..c18bf923bfc0 --- /dev/null +++ b/mail/postpals/Makefile @@ -0,0 +1,38 @@ +# New ports collection makefile for: postpals +# Date created: 7 March 2010 +# Whom: Sahil Tandon <sahil@tandon.net> +# +# $FreeBSD$ +# + +PORTNAME= postpals +PORTVERSION= 0.01 +CATEGORIES= mail +MASTER_SITES= http://mailfud.org/${PORTNAME}/ +DISTFILES= ${PORTNAME} ${PORTNAME}-taillog +EXTRACT_ONLY= # none + +MAINTAINER= sahil@tandon.net +COMMENT= Postpals is a simple policy daemon for Postfix + +RUN_DEPENDS= p5-IO-Multiplex>=0:${PORTSDIR}/devel/p5-IO-Multiplex \ + p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \ + p5-File-Tail>=0:${PORTSDIR}/devel/p5-File-Tail + +SUB_FILES= pkg-message + +USE_RC_SUBR= ${PORTNAME} ${PORTNAME}-taillog +USE_PERL5_RUN= yes +NO_BUILD= yes + +USERS= postpals +GROUPS= postpals + +do-install: + @${INSTALL_SCRIPT} ${DISTFILES:S|^|${DISTDIR}/|} ${PREFIX}/sbin/ + @${INSTALL} -o ${PORTNAME} -g ${PORTNAME} -m 700 -d /var/db/postpals + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/mail/postpals/distinfo b/mail/postpals/distinfo new file mode 100644 index 000000000000..70db3ed76545 --- /dev/null +++ b/mail/postpals/distinfo @@ -0,0 +1,6 @@ +MD5 (postpals) = 8a30f4aab2b0c7f62c9fe147c1a10a73 +SHA256 (postpals) = 2f962d361044cf00cd2161f953caf2623aebde38473e05e088d67f0158b2703a +SIZE (postpals) = 18099 +MD5 (postpals-taillog) = 8a01508315185076c6ad5c7bf8e02fea +SHA256 (postpals-taillog) = d4974d3d4bd9dc7077d487a419a1571a9ff579fcc0e93200a9ea3201b9b97374 +SIZE (postpals-taillog) = 10028 diff --git a/mail/postpals/files/pkg-message.in b/mail/postpals/files/pkg-message.in new file mode 100644 index 000000000000..6fe4fed69d05 --- /dev/null +++ b/mail/postpals/files/pkg-message.in @@ -0,0 +1,20 @@ +************* +Configure postfix main.cf to check policy service before +other checks. They will be skipped on postpals matching. + +Remember to put all relay checks first, so you don't +create an open relay! + +In %%LOCALBASE%%/etc/postfix/main.cf, integrate thusly: + +smtpd_recipient_restrictions = + ... + reject_unauth_destination + ... + check_policy_service inet:127.0.0.1:10040 + ... + (RBL, helo, PTR checks..) + +For more help, see: http://mailfud.org/postpals/ + +************* diff --git a/mail/postpals/files/postpals-taillog.in b/mail/postpals/files/postpals-taillog.in new file mode 100644 index 000000000000..3c97991b03dd --- /dev/null +++ b/mail/postpals/files/postpals-taillog.in @@ -0,0 +1,37 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: postpals-taillog +# REQUIRE: LOGIN cleanvar +# BEFORE: mail +# KEYWORD: shutdown +# +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# postpals_taillog_enable="YES" +# + +. %%RC_SUBR%% + +name=postpals_taillog +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/postpals-taillog +pidfile=/var/run/${name}.pid +procname="/usr/bin/perl" + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +postpals_taillog_enable=${postpals_taillog_enable="NO"} +postpals_taillog_flags=${postpals_taillog_flags="-p ${pidfile} 10040 /var/log/maillog"} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/postpals/files/postpals.in b/mail/postpals/files/postpals.in new file mode 100644 index 000000000000..287083c9251a --- /dev/null +++ b/mail/postpals/files/postpals.in @@ -0,0 +1,45 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: postpals +# REQUIRE: LOGIN cleanvar +# BEFORE: postpals-taillog +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# postpals_enable="YES" +# + +. %%RC_SUBR%% + +name=postpals +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/${name} +pidfile="/var/run/${name}.pid" +procname="/usr/bin/perl" + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +load_rc_config $name + +case "$postpals_enable" in + [Yy][Ee][Ss] | 1 | [Oo][Nn] | [Tt][Rr][Uu][Ee]) ;; + *) echo "To make use of $name you must first set $rcvar=\"YES\" in /etc/rc.conf" ;; +esac + +: ${postpals_enable="NO"} +: ${postpals_tests="relay24,rcpt"} +: ${postpals_port="10040"} + +command_args="-p ${pidfile} -u ${name} -g ${name} -d /var/db/${name}/${name}.db -T ${postpals_tests} ${postpals_port}" + +run_rc_command "$1" diff --git a/mail/postpals/pkg-descr b/mail/postpals/pkg-descr new file mode 100644 index 000000000000..0243cb28e891 --- /dev/null +++ b/mail/postpals/pkg-descr @@ -0,0 +1,7 @@ +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/ diff --git a/mail/postpals/pkg-plist b/mail/postpals/pkg-plist new file mode 100644 index 000000000000..f2c146ef3963 --- /dev/null +++ b/mail/postpals/pkg-plist @@ -0,0 +1,4 @@ +@exec mkdir -p /var/db/postpals +sbin/postpals +sbin/postpals-taillog +dirrmtry /var/db/postpals |