diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-11-29 21:02:39 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-11-29 21:02:39 +0000 |
commit | c5cf5fc4902fb8a6e7bb86a9e58bf3393106c6b5 (patch) | |
tree | a6b967045a2c4a3120835d127540ce54d7cd21f9 | |
parent | 1efa109fa97ddeb35ec6fe03d77832ff4a6bdfeb (diff) | |
download | ports-c5cf5fc4902fb8a6e7bb86a9e58bf3393106c6b5.tar.gz ports-c5cf5fc4902fb8a6e7bb86a9e58bf3393106c6b5.zip |
Notes
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/py-apolicy/Makefile | 35 | ||||
-rw-r--r-- | mail/py-apolicy/distinfo | 3 | ||||
-rw-r--r-- | mail/py-apolicy/files/apolicyd.in | 35 | ||||
-rw-r--r-- | mail/py-apolicy/files/patch-setup.py | 8 | ||||
-rw-r--r-- | mail/py-apolicy/files/patch-z | 20 | ||||
-rw-r--r-- | mail/py-apolicy/files/pkg-message.in | 8 | ||||
-rw-r--r-- | mail/py-apolicy/pkg-descr | 6 | ||||
-rw-r--r-- | mail/py-apolicy/pkg-plist | 19 |
9 files changed, 135 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index b612a473af2b..69dbe767d65a 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -494,6 +494,7 @@ SUBDIR += prom-wl SUBDIR += pronto SUBDIR += proxsmtp + SUBDIR += py-apolicy SUBDIR += py-cyruslib SUBDIR += py-email SUBDIR += py-libgmail diff --git a/mail/py-apolicy/Makefile b/mail/py-apolicy/Makefile new file mode 100644 index 000000000000..cb0dc5d5b7c9 --- /dev/null +++ b/mail/py-apolicy/Makefile @@ -0,0 +1,35 @@ +# New ports collection makefile for: py-apolicy +# Date created: 24 November 2008 +# Whom: Chifeng QU <chifeng@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= apolicy +PORTVERSION= 0.73 +CATEGORIES= mail python +MASTER_SITES= http://download.gna.org/apolicy/%SUBDIR%/ \ + http://www.chifeng.name/dist/apolicy/%SUBDIR%/ \ + +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER?= chifeng@gmail.com +COMMENT= An ACL system for Postfix, as a policy daemon + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/spf.py:${PORTSDIR}/mail/py-spf \ + ${PYTHON_SITELIBDIR}/IPy.py:${PORTSDIR}/net-mgmt/py-ipy + +USE_PYTHON= 2.3+ +USE_PYDISTUTILS=yes +USE_TWISTED= yes +NO_BUILD= yes +USE_RC_SUBR= apolicyd + +SUB_LIST= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR} \ + PYTHON_CMD=${PYTHON_CMD} +SUB_FILES= pkg-message + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/mail/py-apolicy/distinfo b/mail/py-apolicy/distinfo new file mode 100644 index 000000000000..9f9dbfaecf4f --- /dev/null +++ b/mail/py-apolicy/distinfo @@ -0,0 +1,3 @@ +MD5 (apolicy-0.73.tar.gz) = 40712afda421e65dccd371bf8dcc3229 +SHA256 (apolicy-0.73.tar.gz) = b186464f9dda14ea9cf638c622a75bb2b7d5d8281ebc64ef334fe4dee883d2f7 +SIZE (apolicy-0.73.tar.gz) = 32773 diff --git a/mail/py-apolicy/files/apolicyd.in b/mail/py-apolicy/files/apolicyd.in new file mode 100644 index 000000000000..07cf41bc9648 --- /dev/null +++ b/mail/py-apolicy/files/apolicyd.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# Start or stop apolicyd +# $FreeBSD$ + +# PROVIDE: apolicyd +# REQUIRE: TWISTD +# KEYWORD: shutdown +# +prefix=%%PREFIX%% + +# Define these apolicyd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# + +. %%RC_SUBR%% + +name="apolicyd" +rcvar=`set_rcvar` + +command="%%LOCALBASE%%/bin/twistd" +pidfile="/var/run/apolicyd.pid" +logfile="/var/log/apolicyd.log" + +load_rc_config $name + +: ${apolicyd_enable="NO"} + +command_args="--pidfile=${pidfile} -y %%PYTHON_SITELIBDIR%%/apolicy/server.py -q --logfile=${logfile} 2>&1 >/dev/null" +procname="%%PYTHON_CMD%%" + +run_rc_command "$1" diff --git a/mail/py-apolicy/files/patch-setup.py b/mail/py-apolicy/files/patch-setup.py new file mode 100644 index 000000000000..0fa976f3dbe5 --- /dev/null +++ b/mail/py-apolicy/files/patch-setup.py @@ -0,0 +1,8 @@ +--- setup.py.orig 2008-11-24 06:35:54.000000000 +0000 ++++ setup.py 2008-11-24 06:36:11.000000000 +0000 +@@ -28,4 +28,4 @@ + author_email="miguel.filho@gmail.com", packages=["apolicy"], + package_dir={"apolicy": "src/apolicy"}, + url="http://www.apolicy.org", +- data_files=[("/etc/apolicy", data_files)]) ++ data_files=[("/usr/local/etc/apolicy", data_files)]) diff --git a/mail/py-apolicy/files/patch-z b/mail/py-apolicy/files/patch-z new file mode 100644 index 000000000000..c602065d8945 --- /dev/null +++ b/mail/py-apolicy/files/patch-z @@ -0,0 +1,20 @@ +--- src/apolicy/config.py.orig 2008-11-24 07:53:32.000000000 +0000 ++++ src/apolicy/config.py 2008-11-24 07:53:53.000000000 +0000 +@@ -22,7 +22,7 @@ + import pwd + from ConfigParser import ConfigParser + +-config_path = "/etc/apolicy/main.conf" ++config_path = "/usr/local/etc/apolicy/main.conf" + + if "APOLICY_CONFIG_PATH" in os.environ: + config_path = os.environ["APOLICY_CONFIG_PATH"] +@@ -42,7 +42,7 @@ + config.set("main", "timeout", "5") + + if not config.has_option("main", "policy_path"): +- config.set("main", "policy_path", "/etc/apolicy/policy.conf") ++ config.set("main", "policy_path", "/usr/local/etc/apolicy/policy.conf") + + user = pwd.getpwnam(config.get("main", "user")) + config.set("main", "uid", str(user[2])) diff --git a/mail/py-apolicy/files/pkg-message.in b/mail/py-apolicy/files/pkg-message.in new file mode 100644 index 000000000000..21c1337e9ae9 --- /dev/null +++ b/mail/py-apolicy/files/pkg-message.in @@ -0,0 +1,8 @@ +To use this from Postfix SMTPD, use in %%PREFIX%%/etc/postfix/main.cf: + +smtpd_recipient_restrictions = ... + check_policy_service inet:127.0.0.1:10001 + ... + +NOTE: specify check_policy_service AFTER reject_unauth_destination +or else your system can become an open relay. diff --git a/mail/py-apolicy/pkg-descr b/mail/py-apolicy/pkg-descr new file mode 100644 index 000000000000..d243a5bc052f --- /dev/null +++ b/mail/py-apolicy/pkg-descr @@ -0,0 +1,6 @@ +ACL Policy Daemon is a program that communicates with the Postfix MTA using the +Policy Delegation Protocol implementing an ACL (Access Control List) system, +making very easy to improve and create nice controls on your e-mail traffic. +You can use it to verify SPF records too. + +WWW: http://www.apolicy.org diff --git a/mail/py-apolicy/pkg-plist b/mail/py-apolicy/pkg-plist new file mode 100644 index 000000000000..c39f9ffc3758 --- /dev/null +++ b/mail/py-apolicy/pkg-plist @@ -0,0 +1,19 @@ +%%PYTHON_SITELIBDIR%%/apolicy/__init__.py +%%PYTHON_SITELIBDIR%%/apolicy/__init__.pyc +%%PYTHON_SITELIBDIR%%/apolicy/__init__.pyo +%%PYTHON_SITELIBDIR%%/apolicy/base.py +%%PYTHON_SITELIBDIR%%/apolicy/base.pyc +%%PYTHON_SITELIBDIR%%/apolicy/base.pyo +%%PYTHON_SITELIBDIR%%/apolicy/config.py +%%PYTHON_SITELIBDIR%%/apolicy/config.pyc +%%PYTHON_SITELIBDIR%%/apolicy/config.pyo +%%PYTHON_SITELIBDIR%%/apolicy/parser.py +%%PYTHON_SITELIBDIR%%/apolicy/parser.pyc +%%PYTHON_SITELIBDIR%%/apolicy/parser.pyo +%%PYTHON_SITELIBDIR%%/apolicy/server.py +%%PYTHON_SITELIBDIR%%/apolicy/server.pyc +%%PYTHON_SITELIBDIR%%/apolicy/server.pyo +@dirrm %%PYTHON_SITELIBDIR%%/apolicy +etc/apolicy/main.conf +etc/apolicy/policy.conf +@dirrmtry etc/apolicy |