aboutsummaryrefslogtreecommitdiffstats
path: root/mail/postfix-policyd-spf-python
diff options
context:
space:
mode:
authornemoliu <nemoliu@FreeBSD.org>2010-01-12 01:31:25 +0800
committernemoliu <nemoliu@FreeBSD.org>2010-01-12 01:31:25 +0800
commita0000efe2945bc12194668c2cd70fd698949ad9e (patch)
tree58d042f9538b4147a05b7d775d3c05e6ccdbfcce /mail/postfix-policyd-spf-python
parent20dc8ddb655f3efa229698cb960f591e9efff76b (diff)
downloadfreebsd-ports-gnome-a0000efe2945bc12194668c2cd70fd698949ad9e.tar.gz
freebsd-ports-gnome-a0000efe2945bc12194668c2cd70fd698949ad9e.tar.zst
freebsd-ports-gnome-a0000efe2945bc12194668c2cd70fd698949ad9e.zip
python-policyd-spf is a Postfix SMTPd policy engine for SPF checking. It is
implemented in pure Python and uses the python-spf module. WWW: http://www.openspf.org/Software Giel van Schijndel <me@mortis.eu> PR: ports/142508 Submitted by: Giel van Schijndel <me at mortis.eu>
Diffstat (limited to 'mail/postfix-policyd-spf-python')
-rw-r--r--mail/postfix-policyd-spf-python/Makefile61
-rw-r--r--mail/postfix-policyd-spf-python/distinfo3
-rw-r--r--mail/postfix-policyd-spf-python/files/pkg-message.in31
-rw-r--r--mail/postfix-policyd-spf-python/pkg-descr6
-rw-r--r--mail/postfix-policyd-spf-python/pkg-plist7
5 files changed, 108 insertions, 0 deletions
diff --git a/mail/postfix-policyd-spf-python/Makefile b/mail/postfix-policyd-spf-python/Makefile
new file mode 100644
index 000000000000..a16c5319ecd1
--- /dev/null
+++ b/mail/postfix-policyd-spf-python/Makefile
@@ -0,0 +1,61 @@
+# New ports collection makefile for: postfix-policyd-spf-python
+# Date created: 8 Jan 2010
+# Whom: Giel van Schijndel <me@mortis.eu>
+#
+# $FreeBSD$
+#
+
+PORTNAME= postfix-policyd-spf-python
+PORTVERSION= 0.7.3
+CATEGORIES= mail python
+MASTER_SITES= http://launchpad.net/pypolicyd-spf/0.7/${PORTVERSION}/+download/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= pypolicyd-spf-${PORTVERSION}
+
+MAINTAINER= me@mortis.eu
+COMMENT= Pure Python Postfix policy daemon for SPF checking
+
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/spf.py:${PORTSDIR}/mail/py-spf
+
+USE_PYTHON= yes
+USE_PYDISTUTILS= yes
+PYDISTUTILS_PKGNAME= python-policyd-spf
+
+# Apparently launchpad seems to depend on redirects for their downloads. So
+# ditch the fetch -A flag.
+FETCH_ARGS= -pRr
+
+MAN1=policyd-spf.1
+MAN5=policyd-spf.conf.5
+
+PORTDOCS= CHANGES \
+ LICENSE \
+ README \
+ README.per_user_whitelisting \
+ TODO \
+ policyd-spf.conf.commented
+
+PKGMESSAGE= ${WRKSRC}/pkg-message
+
+SUB_FILES= pkg-message
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD}
+
+do-install:
+ # Install data to an unused directory to ensure it doesn't pollute the system
+ @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS} --install-data ${WRKDIR}/tmp-datadump-dir)
+ ${INSTALL_MAN} ${WRKSRC}/policyd-spf.1 ${MANPREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/policyd-spf.conf.5 ${MANPREFIX}/man/man5
+ @${INSTALL} -d ${ETCDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/policyd-spf.conf ${ETCDIR}/policyd-spf.conf.sample
+.if !defined(NOPORTDOCS)
+ @${INSTALL} -d ${DOCSDIR}/
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
+.endif
+
+post-install:
+.if !exists(${ETCDIR}/policyd-spf.conf)
+ ${CP} -p ${ETCDIR}/policyd-spf.conf.sample ${ETCDIR}/policyd-spf.conf
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/mail/postfix-policyd-spf-python/distinfo b/mail/postfix-policyd-spf-python/distinfo
new file mode 100644
index 000000000000..b303a5febc53
--- /dev/null
+++ b/mail/postfix-policyd-spf-python/distinfo
@@ -0,0 +1,3 @@
+MD5 (pypolicyd-spf-0.7.3.tar.gz) = 082462de920abf965841636fa8cff4cd
+SHA256 (pypolicyd-spf-0.7.3.tar.gz) = 0104c24d0cde02eb69f496370d326234615439fd1a649e3ddb02f90b52d7749b
+SIZE (pypolicyd-spf-0.7.3.tar.gz) = 29845
diff --git a/mail/postfix-policyd-spf-python/files/pkg-message.in b/mail/postfix-policyd-spf-python/files/pkg-message.in
new file mode 100644
index 000000000000..b302b9d2ee75
--- /dev/null
+++ b/mail/postfix-policyd-spf-python/files/pkg-message.in
@@ -0,0 +1,31 @@
+#
+# To configure Postfix
+#
+
+This package must be integrated with Postfix to be effective:
+
+ 1. Add to your postfix master.cf:
+
+ policyd-spf unix - n n - 0 spawn
+ user=nobody argv=%%PYTHON_CMD%% %%PREFIX%%/bin/policyd-spf %%ETCDIR%%/policyd-spf.conf
+
+ 2. Configure the Postfix policy service in your main.cf so that the
+ "smtpd_recipient_restrictions" includes a call to the policyd-spf policy
+ filter. If you already have a "smtpd_recipient_restrictions" line, you can
+ add the "check_policy_service" command anywhere *after* the line which
+ reads "reject_unauth_destination" (otherwise you're system can become an
+ open relay).
+
+ smtpd_recipient_restrictions =
+ ...
+ reject_unauth_destination
+ check_policy_service unix:private/policyd-spf
+ ...
+
+ policyd-spf_time_limit = 3600
+
+ 3. Please consult the postfix documentation for more information on these and
+ other settings you may wish to have in the "smtpd_recipient_restrictions"
+ configuration.
+
+ 4. Reload postfix.
diff --git a/mail/postfix-policyd-spf-python/pkg-descr b/mail/postfix-policyd-spf-python/pkg-descr
new file mode 100644
index 000000000000..50451d84de51
--- /dev/null
+++ b/mail/postfix-policyd-spf-python/pkg-descr
@@ -0,0 +1,6 @@
+python-policyd-spf is a Postfix SMTPd policy engine for SPF checking. It is
+implemented in pure Python and uses the python-spf module.
+
+WWW: http://www.openspf.org/Software
+
+Giel van Schijndel <me@mortis.eu>
diff --git a/mail/postfix-policyd-spf-python/pkg-plist b/mail/postfix-policyd-spf-python/pkg-plist
new file mode 100644
index 000000000000..b23ef218c963
--- /dev/null
+++ b/mail/postfix-policyd-spf-python/pkg-plist
@@ -0,0 +1,7 @@
+@exec mkdir -p %D/%%ETCDIR%%
+@unexec if cmp -s %D/%%ETCDIR%%/policyd-spf.conf.sample %D/%%ETCDIR%%/policyd-spf.conf; then rm -f %D/%%ETCDIR%%/policyd-spf.conf; fi
+%%ETCDIR%%/policyd-spf.conf.sample
+@exec if [ ! -f %D/%%ETCDIR%%/policyd-spf.conf ] ; then cp -p %D/%F %B/policyd-spf.conf; fi
+bin/policyd-spf
+%%PYTHON_SITELIBDIR%%/policydspfsupp.py
+@dirrmtry %%ETCDIR%%