Re: UPDATE: mail/postfwd

2019-04-03 Thread Giovanni Bechis
On Fri, Mar 22, 2019 at 05:45:07PM +0100, Giovanni Bechis wrote:
> Hi,
> update to latest version of postfwd2 (and new postfwd3).
> I enabled both rcscripts because postfwd3 is still beta software.
> Comments ? Ok ?
>  Cheers
>   Giovanni
2.01 is out, updated diff below.
 Cheers
  Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/mail/postfwd/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile8 Feb 2019 13:15:13 -   1.9
+++ Makefile3 Apr 2019 06:31:21 -
@@ -2,7 +2,7 @@
 
 COMMENT =  Postfix policy server
 
-DISTNAME = postfwd-1.39
+DISTNAME = postfwd-2.01
 WRKDIST =  ${WRKDIR}/postfwd
 
 CATEGORIES =   mail
@@ -18,6 +18,7 @@ MASTER_SITES =${HOMEPAGE}
 
 RUN_DEPENDS =  devel/p5-Net-Server \
devel/p5-IO-Multiplex \
+   net/p5-Net-CIDR-Lite \
net/p5-Net-DNS
 
 PKG_ARCH = *
@@ -26,6 +27,7 @@ NO_TEST = Yes
 
 do-install:
${INSTALL_SCRIPT} ${WRKSRC}/sbin/postfwd2 ${PREFIX}/sbin/postfwd2
+   ${INSTALL_SCRIPT} ${WRKSRC}/sbin/postfwd3 ${PREFIX}/sbin/postfwd3
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/postfwd/
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/postfwd/plugins/
${INSTALL_DATA} ${WRKSRC}/etc/postfwd.cf.sample 
${PREFIX}/share/examples/postfwd/postfwd.cf.sample
@@ -34,9 +36,10 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/tools/postfwd-client.pl 
${PREFIX}/bin/postfwd-client.pl
${INSTALL_SCRIPT} ${WRKSRC}/tools/rblcheck.pl ${PREFIX}/bin/rblcheck.pl
${INSTALL_SCRIPT} ${WRKSRC}/tools/hapolicy/hapolicy 
${PREFIX}/sbin/hapolicy
-   ${INSTALL_DATA} ${WRKSRC}/doc/postfwd2* ${PREFIX}/share/doc/postfwd/
+   ${INSTALL_DATA} ${WRKSRC}/doc/postfwd3* ${PREFIX}/share/doc/postfwd/
${INSTALL_DATA} ${WRKSRC}/tools/hapolicy/hapolicy.* 
${PREFIX}/share/doc/postfwd/
${INSTALL_DATA} ${WRKSRC}/tools/request.sample 
${PREFIX}/share/doc/postfwd/request.sample
${INSTALL_MAN} ${WRKSRC}/man/man8/postfwd2.8 
${PREFIX}/man/man8/postfwd2.8
+   ${INSTALL_MAN} ${WRKSRC}/man/man8/postfwd3.8 
${PREFIX}/man/man8/postfwd3.8
 
 .include 
Index: distinfo
===
RCS file: /var/cvs/ports/mail/postfwd/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo8 Feb 2019 13:15:13 -   1.3
+++ distinfo3 Apr 2019 06:31:30 -
@@ -1,2 +1,2 @@
-SHA256 (postfwd-1.39.tar.gz) = Vv0pJwHRlOC0CFdTnBi/Cu+pE+dpVzOOzeaR77aRuyU=
-SIZE (postfwd-1.39.tar.gz) = 408145
+SHA256 (postfwd-2.01.tar.gz) = AqQbiwCQKcAAHAkIMZeLJQLc0gIlt28g0AtcxpCLkF0=
+SIZE (postfwd-2.01.tar.gz) = 265710
Index: patches/patch-sbin_postfwd3
===
RCS file: patches/patch-sbin_postfwd3
diff -N patches/patch-sbin_postfwd3
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-sbin_postfwd3 20 Mar 2019 08:01:39 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: sbin/postfwd3
+--- sbin/postfwd3.orig
 sbin/postfwd3
+@@ -71,7 +71,7 @@ our %postfwd_settings = (
+   no_client_stdout => 1,
+   },
+   master => {
+-  pid_file => "/var/tmp/$NAME-master.pid",
++  pid_file => "/var/run/$NAME-master.pid",
+   watchdog => 60,
+   failures => 7,
+   respawn  => 4,
Index: pkg/PLIST
===
RCS file: /var/cvs/ports/mail/postfwd/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST   8 Feb 2019 13:15:13 -   1.4
+++ pkg/PLIST   20 Mar 2019 08:08:17 -
@@ -2,19 +2,20 @@
 @newgroup _postfwd:715
 @newuser _postfwd:715:715:daemon:Postfwd Daemon:/var/empty:/sbin/nologin
 @rcscript ${RCDIR}/postfwd2
+@rcscript ${RCDIR}/postfwd3
 bin/postfwd-client.pl
 bin/rblcheck.pl
 @man man/man8/postfwd2.8
+@man man/man8/postfwd3.8
 sbin/hapolicy
 sbin/postfwd2
+sbin/postfwd3
 share/doc/postfwd/
 share/doc/postfwd/hapolicy.html
 share/doc/postfwd/hapolicy.txt
-share/doc/postfwd/postfwd2-chroot.html
-share/doc/postfwd/postfwd2-chroot.txt
-share/doc/postfwd/postfwd2.CHANGELOG
-share/doc/postfwd/postfwd2.html
-share/doc/postfwd/postfwd2.txt
+share/doc/postfwd/postfwd3.CHANGELOG
+share/doc/postfwd/postfwd3.html
+share/doc/postfwd/postfwd3.txt
 share/doc/postfwd/request.sample
 share/examples/postfwd/
 @sample ${SYSCONFDIR}/postfix/
Index: pkg/postfwd3.rc
===
RCS file: pkg/postfwd3.rc
diff -N pkg/postfwd3.rc
--- /dev/null   1 Jan 1970 00:00:00 -
+++ pkg/postfwd3.rc 20 Mar 2019 08:03:22 -
@@ -0,0 +1,20 @@
+#!/bin/ksh
+#
+# $OpenBSD: postfwd3.rc,v 1.6 2018/01/11 19:27:03 rpe Exp $
+
+daemon="${TRUEPREFIX}/sbin/postfwd3"
+daemon_flags="-u _postfwd -g _postfwd -f ${SYSCONFDIR}/postfix/postfwd3.cf"
+
+. /etc/rc.d/rc.subr
+

UPDATE: mail/postfwd

2019-03-22 Thread Giovanni Bechis
Hi,
update to latest version of postfwd2 (and new postfwd3).
I enabled both rcscripts because postfwd3 is still beta software.
Comments ? Ok ?
 Cheers
  Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/mail/postfwd/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile	8 Feb 2019 13:15:13 -	1.9
+++ Makefile	20 Mar 2019 08:08:10 -
@@ -2,7 +2,7 @@
 
 COMMENT =	Postfix policy server
 
-DISTNAME =	postfwd-1.39
+DISTNAME =	postfwd-2.00
 WRKDIST =	${WRKDIR}/postfwd
 
 CATEGORIES =	mail
@@ -18,6 +18,7 @@ MASTER_SITES =	${HOMEPAGE}
 
 RUN_DEPENDS =	devel/p5-Net-Server \
 		devel/p5-IO-Multiplex \
+		net/p5-Net-CIDR-Lite \
 		net/p5-Net-DNS
 
 PKG_ARCH =	*
@@ -26,6 +27,7 @@ NO_TEST =	Yes
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/sbin/postfwd2 ${PREFIX}/sbin/postfwd2
+	${INSTALL_SCRIPT} ${WRKSRC}/sbin/postfwd3 ${PREFIX}/sbin/postfwd3
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/postfwd/
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/postfwd/plugins/
 	${INSTALL_DATA} ${WRKSRC}/etc/postfwd.cf.sample ${PREFIX}/share/examples/postfwd/postfwd.cf.sample
@@ -34,9 +36,10 @@ do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/tools/postfwd-client.pl ${PREFIX}/bin/postfwd-client.pl
 	${INSTALL_SCRIPT} ${WRKSRC}/tools/rblcheck.pl ${PREFIX}/bin/rblcheck.pl
 	${INSTALL_SCRIPT} ${WRKSRC}/tools/hapolicy/hapolicy ${PREFIX}/sbin/hapolicy
-	${INSTALL_DATA} ${WRKSRC}/doc/postfwd2* ${PREFIX}/share/doc/postfwd/
+	${INSTALL_DATA} ${WRKSRC}/doc/postfwd3* ${PREFIX}/share/doc/postfwd/
 	${INSTALL_DATA} ${WRKSRC}/tools/hapolicy/hapolicy.* ${PREFIX}/share/doc/postfwd/
 	${INSTALL_DATA} ${WRKSRC}/tools/request.sample ${PREFIX}/share/doc/postfwd/request.sample
 	${INSTALL_MAN} ${WRKSRC}/man/man8/postfwd2.8 ${PREFIX}/man/man8/postfwd2.8
+	${INSTALL_MAN} ${WRKSRC}/man/man8/postfwd3.8 ${PREFIX}/man/man8/postfwd3.8
 
 .include 
Index: distinfo
===
RCS file: /var/cvs/ports/mail/postfwd/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo	8 Feb 2019 13:15:13 -	1.3
+++ distinfo	20 Mar 2019 07:57:53 -
@@ -1,2 +1,2 @@
-SHA256 (postfwd-1.39.tar.gz) = Vv0pJwHRlOC0CFdTnBi/Cu+pE+dpVzOOzeaR77aRuyU=
-SIZE (postfwd-1.39.tar.gz) = 408145
+SHA256 (postfwd-2.00.tar.gz) = RsRimDR7ZJ6LOHtxs1fBTei7DMcxHFVSvRRbqXUCn5A=
+SIZE (postfwd-2.00.tar.gz) = 265346
Index: patches/patch-sbin_postfwd3
===
RCS file: patches/patch-sbin_postfwd3
diff -N patches/patch-sbin_postfwd3
--- /dev/null	1 Jan 1970 00:00:00 -
+++ patches/patch-sbin_postfwd3	20 Mar 2019 08:01:39 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: sbin/postfwd3
+--- sbin/postfwd3.orig
 sbin/postfwd3
+@@ -71,7 +71,7 @@ our %postfwd_settings = (
+ 		no_client_stdout => 1,
+ 	},
+ 	master => {
+-		pid_file => "/var/tmp/$NAME-master.pid",
++		pid_file => "/var/run/$NAME-master.pid",
+ 		watchdog	 => 60,
+ 		failures	 => 7,
+ 		respawn		 => 4,
Index: pkg/PLIST
===
RCS file: /var/cvs/ports/mail/postfwd/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST	8 Feb 2019 13:15:13 -	1.4
+++ pkg/PLIST	20 Mar 2019 08:08:17 -
@@ -2,19 +2,20 @@
 @newgroup _postfwd:715
 @newuser _postfwd:715:715:daemon:Postfwd Daemon:/var/empty:/sbin/nologin
 @rcscript ${RCDIR}/postfwd2
+@rcscript ${RCDIR}/postfwd3
 bin/postfwd-client.pl
 bin/rblcheck.pl
 @man man/man8/postfwd2.8
+@man man/man8/postfwd3.8
 sbin/hapolicy
 sbin/postfwd2
+sbin/postfwd3
 share/doc/postfwd/
 share/doc/postfwd/hapolicy.html
 share/doc/postfwd/hapolicy.txt
-share/doc/postfwd/postfwd2-chroot.html
-share/doc/postfwd/postfwd2-chroot.txt
-share/doc/postfwd/postfwd2.CHANGELOG
-share/doc/postfwd/postfwd2.html
-share/doc/postfwd/postfwd2.txt
+share/doc/postfwd/postfwd3.CHANGELOG
+share/doc/postfwd/postfwd3.html
+share/doc/postfwd/postfwd3.txt
 share/doc/postfwd/request.sample
 share/examples/postfwd/
 @sample ${SYSCONFDIR}/postfix/
Index: pkg/postfwd3.rc
===
RCS file: pkg/postfwd3.rc
diff -N pkg/postfwd3.rc
--- /dev/null	1 Jan 1970 00:00:00 -
+++ pkg/postfwd3.rc	20 Mar 2019 08:03:22 -
@@ -0,0 +1,20 @@
+#!/bin/ksh
+#
+# $OpenBSD: postfwd3.rc,v 1.6 2018/01/11 19:27:03 rpe Exp $
+
+daemon="${TRUEPREFIX}/sbin/postfwd3"
+daemon_flags="-u _postfwd -g _postfwd -f ${SYSCONFDIR}/postfix/postfwd3.cf"
+
+. /etc/rc.d/rc.subr
+
+pexp="perl: ${daemon}${daemon_flags:+ ${daemon_flags}}"
+
+rc_stop() {
+	${daemon} --stop
+}
+
+rc_reload() {
+	${daemon} --hup
+}
+
+rc_cmd $1