diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-11-29 20:18:39 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-11-29 20:18:39 +0000 |
commit | 6d67fab7e94e3fa2f2f633208f5768c233336ca6 (patch) | |
tree | 2224dc89ded7b66b45a1cf33d3a95ae437461906 /mail/py-ppolicy | |
parent | 5ae5e727dbe39dd1e69c566d5b8f3bd9d9cae481 (diff) | |
download | ports-6d67fab7e94e3fa2f2f633208f5768c233336ca6.tar.gz ports-6d67fab7e94e3fa2f2f633208f5768c233336ca6.zip |
Notes
Diffstat (limited to 'mail/py-ppolicy')
-rw-r--r-- | mail/py-ppolicy/Makefile | 59 | ||||
-rw-r--r-- | mail/py-ppolicy/distinfo | 3 | ||||
-rw-r--r-- | mail/py-ppolicy/files/patch-ppolicy.tap | 11 | ||||
-rw-r--r-- | mail/py-ppolicy/files/pkg-message.in | 8 | ||||
-rw-r--r-- | mail/py-ppolicy/files/ppolicyd.sh.in | 35 | ||||
-rw-r--r-- | mail/py-ppolicy/pkg-descr | 11 | ||||
-rw-r--r-- | mail/py-ppolicy/pkg-plist | 113 |
7 files changed, 240 insertions, 0 deletions
diff --git a/mail/py-ppolicy/Makefile b/mail/py-ppolicy/Makefile new file mode 100644 index 000000000000..b61ab592a617 --- /dev/null +++ b/mail/py-ppolicy/Makefile @@ -0,0 +1,59 @@ +# New ports collection makefile for: py-ppolicy +# Date created: 27 November 2008 +# Whom: Chifeng QU <chifeng@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= ppolicy +PORTVERSION= 2.6.6 +CATEGORIES= mail python +MASTER_SITES= http://kmlinux.fjfi.cvut.cz/~vokac/activities/ppolicy/download/%SUBDIR%/ \ + http://www.chifeng.name/dist/ppolicy/%SUBDIR%/ + +MAINTAINER?= chifeng@gmail.com +COMMENT= PPolicy is tool for extending Postfix checking capabilities + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/dns/__init__.py:${PORTSDIR}/dns/py-dnspython + +USE_PYTHON= 2.3+ +USE_PYDISTUTILS=yes +USE_TWISTED= yes +NO_BUILD= yes +USE_RC_SUBR= ppolicyd.sh +DOCSDIR?= ${PREFIX}/share/doc/py-${PORTNAME} + +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} +SUB_FILES= pkg-message + +OPTIONS= GeoIP "Use GeoIP support" On \ + LDAP "Use LDAP support" On \ + MYSQL "Use MySQL support" Off + +.include <bsd.port.pre.mk> + +.if defined(WITH_GeoIP) +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/GeoIP.so:${PORTSDIR}/net/py-GeoIP +.endif +.if defined(WITH_MYSQL) +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/MySQLdb/__init__.py:${PORTSDIR}/databases/py-MySQLdb +.endif +.if defined(WITH_LDAP) +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}ldap2>=2.3.1:${PORTSDIR}/net/py-ldap2 +.endif + +post-install: +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/MODULES ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/NEWS ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/TESTS ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/ppolicy.sql ${DOCSDIR} +.endif + ${INSTALL_DATA} -m 0644 ${WRKSRC}/ppolicy.conf ${PREFIX}/etc + ${INSTALL_DATA} ${WRKSRC}/ppolicy.tap ${PREFIX}/sbin + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/mail/py-ppolicy/distinfo b/mail/py-ppolicy/distinfo new file mode 100644 index 000000000000..06c1a6083e2c --- /dev/null +++ b/mail/py-ppolicy/distinfo @@ -0,0 +1,3 @@ +MD5 (ppolicy-2.6.6.tar.gz) = 33f9a130158108cfb5587c23d51f2004 +SHA256 (ppolicy-2.6.6.tar.gz) = 18762547ac0bddcf98bbc6b597a4cdcc8a7499221912c3ceeb4f1fc5008cf669 +SIZE (ppolicy-2.6.6.tar.gz) = 113549 diff --git a/mail/py-ppolicy/files/patch-ppolicy.tap b/mail/py-ppolicy/files/patch-ppolicy.tap new file mode 100644 index 000000000000..3cbff039174b --- /dev/null +++ b/mail/py-ppolicy/files/patch-ppolicy.tap @@ -0,0 +1,11 @@ +--- ppolicy.tap.orig 2008-11-27 09:31:42.000000000 +0000 ++++ ppolicy.tap 2008-11-27 09:32:20.000000000 +0000 +@@ -20,7 +20,7 @@ + + # default config + config = { +- 'configFile' : '/etc/postfix/ppolicy.conf', ++ 'configFile' : '/usr/local/etc/ppolicy.conf', + 'logLevel' : logging.WARN, + 'admin' : 'postmaster', + 'domain' : socket.gethostname(), diff --git a/mail/py-ppolicy/files/pkg-message.in b/mail/py-ppolicy/files/pkg-message.in new file mode 100644 index 000000000000..f79d3e94efd2 --- /dev/null +++ b/mail/py-ppolicy/files/pkg-message.in @@ -0,0 +1,8 @@ +To use this from Postfix SMTPD, use in %%PREFIX%%/etc/postfix/main.cf: + +smtpd_recipient_restrictions = + ... + reject_unauth_destination + check_policy_service inet:127.0.0.1:10030 + ... +127.0.0.1:10030_time_limit = 3600 diff --git a/mail/py-ppolicy/files/ppolicyd.sh.in b/mail/py-ppolicy/files/ppolicyd.sh.in new file mode 100644 index 000000000000..d234961fb03d --- /dev/null +++ b/mail/py-ppolicy/files/ppolicyd.sh.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# Start or stop ppolicyd +# $FreeBSD$ + +# PROVIDE: ppolicyd +# REQUIRE: TWISTD +# KEYWORD: shutdown +# +prefix=%%PREFIX%% + +# Define these ppolicyd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# + +. %%RC_SUBR%% + +name="ppolicyd" +rcvar=`set_rcvar` + +command="%%LOCALBASE%%/bin/twistd" +pidfile="/var/run/ppolicyd.pid" +logfile="/var/log/ppolicyd.log" + +load_rc_config $name + +: ${ppolicyd_enable="NO"} + +command_args="--pidfile=${pidfile} --file=%%PREFIX%%/sbin/ppolilcy.tap --python=%%PREFIX%%/sbin/ppolicy.tap --logfile=${logfile} 2>&1 >/dev/null" +procname="%%PYTHON_CMD%%" + +run_rc_command "$1" diff --git a/mail/py-ppolicy/pkg-descr b/mail/py-ppolicy/pkg-descr new file mode 100644 index 000000000000..578b598591c3 --- /dev/null +++ b/mail/py-ppolicy/pkg-descr @@ -0,0 +1,11 @@ +Modular Python Postfix Policy Server + +Modular Python Postfix Policy Server is tool for extending Postfix +checking capabilities. It uses Postfix access policy delegation +(http://www.postfix.org/SMTPD_POLICY_README.html) to check incoming +SMTP request and accept or reject it according provided data. It can +reduce mailserver load with rejecting incorrect mail during SMTP +connection. It was made with stress to height reliability and performance +by providing caching of required data and results. + +WWW: http://bimbo.fjfi.cvut.cz/ppolicy diff --git a/mail/py-ppolicy/pkg-plist b/mail/py-ppolicy/pkg-plist new file mode 100644 index 000000000000..7d250cf448e2 --- /dev/null +++ b/mail/py-ppolicy/pkg-plist @@ -0,0 +1,113 @@ +%%PYTHON_SITELIBDIR%%/ppolicy/Base.py +%%PYTHON_SITELIBDIR%%/ppolicy/Base.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Base.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Country.py +%%PYTHON_SITELIBDIR%%/ppolicy/Country.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Country.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/DOS.py +%%PYTHON_SITELIBDIR%%/ppolicy/DOS.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/DOS.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Dnsbl.py +%%PYTHON_SITELIBDIR%%/ppolicy/Dnsbl.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Dnsbl.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/DnsblDynamic.py +%%PYTHON_SITELIBDIR%%/ppolicy/DnsblDynamic.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/DnsblDynamic.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/DnsblScore.py +%%PYTHON_SITELIBDIR%%/ppolicy/DnsblScore.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/DnsblScore.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Dummy.py +%%PYTHON_SITELIBDIR%%/ppolicy/Dummy.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Dummy.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/DumpDataDB.py +%%PYTHON_SITELIBDIR%%/ppolicy/DumpDataDB.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/DumpDataDB.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/DumpDataFile.py +%%PYTHON_SITELIBDIR%%/ppolicy/DumpDataFile.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/DumpDataFile.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Greylist.py +%%PYTHON_SITELIBDIR%%/ppolicy/Greylist.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Greylist.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/List.py +%%PYTHON_SITELIBDIR%%/ppolicy/List.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/List.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/ListBW.py +%%PYTHON_SITELIBDIR%%/ppolicy/ListBW.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/ListBW.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/ListDyn.py +%%PYTHON_SITELIBDIR%%/ppolicy/ListDyn.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/ListDyn.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/ListMailDomain.py +%%PYTHON_SITELIBDIR%%/ppolicy/ListMailDomain.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/ListMailDomain.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/LookupLDAP.py +%%PYTHON_SITELIBDIR%%/ppolicy/LookupLDAP.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/LookupLDAP.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/P0f.py +%%PYTHON_SITELIBDIR%%/ppolicy/P0f.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/P0f.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Resolve.py +%%PYTHON_SITELIBDIR%%/ppolicy/Resolve.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Resolve.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/SPF.py +%%PYTHON_SITELIBDIR%%/ppolicy/SPF.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/SPF.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Sleep.py +%%PYTHON_SITELIBDIR%%/ppolicy/Sleep.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Sleep.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Trap.py +%%PYTHON_SITELIBDIR%%/ppolicy/Trap.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Trap.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Verification.py +%%PYTHON_SITELIBDIR%%/ppolicy/Verification.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Verification.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/Whois.py +%%PYTHON_SITELIBDIR%%/ppolicy/Whois.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/Whois.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/__init__.py +%%PYTHON_SITELIBDIR%%/ppolicy/__init__.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/__init__.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/log.py +%%PYTHON_SITELIBDIR%%/ppolicy/log.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/log.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/protocol.py +%%PYTHON_SITELIBDIR%%/ppolicy/protocol.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/protocol.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/test.py +%%PYTHON_SITELIBDIR%%/ppolicy/test.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/test.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/DnsThread.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/DnsThread.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/DnsThread.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/__init__.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/__init__.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/__init__.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/dnsbl.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/dnsbl.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/dnsbl.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/dnscache.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/dnscache.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/dnscache.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/param.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/param.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/param.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/smtplib.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/smtplib.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/smtplib.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/spf.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/spf.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/spf.pyo +%%PYTHON_SITELIBDIR%%/ppolicy/tools/utils.py +%%PYTHON_SITELIBDIR%%/ppolicy/tools/utils.pyc +%%PYTHON_SITELIBDIR%%/ppolicy/tools/utils.pyo +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/MODULES +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/ppolicy.sql +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%%%DOCSDIR%%/TESTS +%%PORTDOCS%%@dirrm %%DOCSDIR%% +sbin/ppolicy.tap +etc/ppolicy.conf +@dirrm %%PYTHON_SITELIBDIR%%/ppolicy/tools +@dirrm %%PYTHON_SITELIBDIR%%/ppolicy |