aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix-policyd-weight
diff options
context:
space:
mode:
authorCheng-Lung Sung <clsung@FreeBSD.org>2006-11-06 07:17:11 +0000
committerCheng-Lung Sung <clsung@FreeBSD.org>2006-11-06 07:17:11 +0000
commit5eaddab9f3d0dede3429c2bf1a89d0d6481b7845 (patch)
treef710bcab80205d5a153bfc6af63e69a0f628b2fe /mail/postfix-policyd-weight
parent3d361f39b155a8fb96282e30acbedbb9bbbf4589 (diff)
downloadports-5eaddab9f3d0dede3429c2bf1a89d0d6481b7845.tar.gz
ports-5eaddab9f3d0dede3429c2bf1a89d0d6481b7845.zip
Notes
Diffstat (limited to 'mail/postfix-policyd-weight')
-rw-r--r--mail/postfix-policyd-weight/Makefile21
-rw-r--r--mail/postfix-policyd-weight/distinfo6
-rw-r--r--mail/postfix-policyd-weight/files/pkg-message.in11
-rw-r--r--mail/postfix-policyd-weight/files/policyd-weight.in40
4 files changed, 65 insertions, 13 deletions
diff --git a/mail/postfix-policyd-weight/Makefile b/mail/postfix-policyd-weight/Makefile
index 8d8d7ecd696d..96f3dd37c364 100644
--- a/mail/postfix-policyd-weight/Makefile
+++ b/mail/postfix-policyd-weight/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= policyd-weight
-PORTVERSION= 0.1.12
+PORTVERSION= 0.1.14
CATEGORIES= mail
MASTER_SITES= http://www.policyd-weight.org/releases/
PKGNAMEPREFIX= postfix-
@@ -20,9 +20,22 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS \
SUB_FILES= pkg-message
PLIST_FILES= libexec/postfix/${PORTNAME} etc/${PORTNAME}.conf.sample
+USE_RC_SUBR+= policyd-weight
+
+MAN8+= policyd-weight.8
+MAN5+= policyd-weight.conf.5
+
+.include <bsd.port.pre.mk>
+
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/libexec/postfix
- ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/libexec/postfix/
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc/
+.for i in 5 8
+ @${MKDIR} ${PREFIX}/man/man$i
+. for j in ${MAN${i}}
+ ${INSTALL_MAN} ${WRKSRC}/man/man${i}/$j ${PREFIX}/man/man${i}/
+. endfor
+.endfor
pre-install:
@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@@ -30,4 +43,4 @@ pre-install:
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/postfix-policyd-weight/distinfo b/mail/postfix-policyd-weight/distinfo
index 5f5b93bb911b..0de221554bd0 100644
--- a/mail/postfix-policyd-weight/distinfo
+++ b/mail/postfix-policyd-weight/distinfo
@@ -1,3 +1,3 @@
-MD5 (policyd-weight-0.1.12.tar.gz) = d2cdbc239ca278c4da412289ee42d12b
-SHA256 (policyd-weight-0.1.12.tar.gz) = 017bdaf5d60cc48841a73c21a8a6e3dfd28395116e345ffd5ab6fab3d709f19c
-SIZE (policyd-weight-0.1.12.tar.gz) = 26530
+MD5 (policyd-weight-0.1.14.tar.gz) = fb4829a57c8b805fe981ee949a145042
+SHA256 (policyd-weight-0.1.14.tar.gz) = f613986516538575570177af7b3525b6db55301e728ce1b31ad35933148c3a6b
+SIZE (policyd-weight-0.1.14.tar.gz) = 45179
diff --git a/mail/postfix-policyd-weight/files/pkg-message.in b/mail/postfix-policyd-weight/files/pkg-message.in
index 57a77418b72e..d0af1084c9e1 100644
--- a/mail/postfix-policyd-weight/files/pkg-message.in
+++ b/mail/postfix-policyd-weight/files/pkg-message.in
@@ -1,8 +1,7 @@
**********
-* To run this from %%PREFIX%%/etc/postfix/master.cf:
+* Start with:
-policy unix - n n - - spawn
- user=polw argv=%%PREFIX%%/libexec/postfix/policyd-weight
+# %%PREFIX%%/libexec/postfix/policyd-weight start
* To use this from Postfix SMTPD, use in %%PREFIX%%/etc/postfix/main.cf
@@ -12,7 +11,7 @@ smtpd_recipient_restrictions =
...
reject_unauth_destination
reject_unauth_pipelining
- check_policy_service unix:private/policy
+ check_policy_service inet:127.0.0.1:12525
...
* NOTE: specify check_policy_service AFTER reject_unauth_destination
@@ -26,8 +25,8 @@ smtpd_recipient_restrictions =
*
* ATTENTION !!! ATTENTION
*
-* if you are already using policyd-weight you MUST update your master.cf and
-* change the user=nobody argument to user=polw
+* Since version 0.1.14 beta the master.cf mode is deprecated. Use the daemon
+* mode instead. More info in man 8 policyd-weight.
*
* ATTENTION !!! ATTENTION
*************
diff --git a/mail/postfix-policyd-weight/files/policyd-weight.in b/mail/postfix-policyd-weight/files/policyd-weight.in
new file mode 100644
index 000000000000..1880fd2f670f
--- /dev/null
+++ b/mail/postfix-policyd-weight/files/policyd-weight.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+#
+# PROVIDE: policyd-weight
+# REQUIRE: LOGIN cleanvar
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable policyd-weight:
+# policyd_weight_enable (bool):
+# Set it to "YES" to enable policyd-weight.
+# Default is "NO".
+
+
+. /etc/rc.subr
+
+name="policyd-weight"
+rcvar=policyd_weight_enable
+
+stop_cmd=policyd_weight_stop
+
+# defaults
+policyd_weight_enable=${policyd_weight_enable:-"NO"}
+
+load_rc_config "policyd_weight"
+
+case "$policyd_weight_enable" in
+ [Yy][Ee][Ss] | 1 | [Oo][Nn] | [Tt][Rr][Uu][Ee]) ;;
+ *) echo "To make use of $name set $rcvar=\"YES\" in /etc/rc.conf" ;;
+esac
+
+policyd_weight_progname="/usr/local/libexec/postfix/policyd-weight"
+command=/usr/local/libexec/postfix/policyd-weight
+pidfile=/var/run/policyd-weight.pid
+
+policyd_weight_stop() {
+ echo "Stopping $name"
+ $policyd_weight_progname stop
+}
+
+run_rc_command "$1"