svn commit: r466364 - in head/mail: . ratelimit-policyd ratelimit-policyd/files

Matthias Andree mandree at FreeBSD.org
Tue Apr 3 16:52:58 UTC 2018


Author: mandree
Date: Tue Apr  3 16:52:56 2018
New Revision: 466364
URL: https://svnweb.freebsd.org/changeset/ports/466364

Log:
  Add new port mail/ratelimit-policyd.
  
  This rearranges a few things in the Makefile, such as reordering
  of USES= and USE... options, and uses PORTDOCS for README.md.
  
  I have also revised pkg-message.in and pkg-descr for grammar
  and consistency (trailing colons) and added a "postfix reload" line.
  
  PR:		226795
  Submitted by:	Miroslav Lachman

Added:
  head/mail/ratelimit-policyd/
  head/mail/ratelimit-policyd/Makefile   (contents, props changed)
  head/mail/ratelimit-policyd/distinfo   (contents, props changed)
  head/mail/ratelimit-policyd/files/
  head/mail/ratelimit-policyd/files/pkg-message.in   (contents, props changed)
  head/mail/ratelimit-policyd/pkg-descr   (contents, props changed)
Modified:
  head/mail/Makefile

Modified: head/mail/Makefile
==============================================================================
--- head/mail/Makefile	Tue Apr  3 16:19:16 2018	(r466363)
+++ head/mail/Makefile	Tue Apr  3 16:52:56 2018	(r466364)
@@ -584,6 +584,7 @@
     SUBDIR += queue-repair
     SUBDIR += rainloop
     SUBDIR += rainloop-community
+    SUBDIR += ratelimit-policyd
     SUBDIR += raysfilter
     SUBDIR += razor-agents
     SUBDIR += rbl-milter

Added: head/mail/ratelimit-policyd/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/ratelimit-policyd/Makefile	Tue Apr  3 16:52:56 2018	(r466364)
@@ -0,0 +1,63 @@
+# Created by: Miroslav Lachman
+# $FreeBSD$
+
+PORTNAME=	ratelimit-policyd
+PORTVERSION=	1.0.1
+CATEGORIES=	mail
+MASTER_SITES=	GH
+
+MAINTAINER=	000.fbsd at quip.cz
+COMMENT=	Sender rate limit policy daemon for Postfix
+
+LICENSE=	NONE
+
+USES+=		perl5 shebangfix
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	MirLach
+GH_PROJECT=	ratelimit-policyd
+#GH_TAGNAME=	65154a2
+
+RUN_DEPENDS+=	p5-DBD-mysql>=0:databases/p5-DBD-mysql
+
+SHEBANG_FILES=	ratelimit-policyd.pl
+
+NO_BUILD=	yes
+
+SUB_FILES=	pkg-message
+
+PERIODIC_DAILY=	etc/periodic/daily
+
+PLIST_FILES=	bin/ratelimit-policyd.pl \
+	etc/rc.d/ratelimit-policyd \
+	etc/ratelimit-policyd.cfg.sample \
+	${PERIODIC_DAILY}/535.ratelimit-policyd
+
+PORTDATA=	mysql-schema.sql
+PORTDOCS=	README.md
+
+post-patch:
+	${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" ${WRKSRC}/rc.d/ratelimit-policyd
+	${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" ${WRKSRC}/ratelimit-policyd.pl
+	${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" \
+		${WRKSRC}/periodic/daily/535.ratelimit-policyd
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/ratelimit-policyd.pl ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/rc.d/ratelimit-policyd ${STAGEDIR}${PREFIX}/etc/rc.d
+	${INSTALL_DATA} ${WRKSRC}/ratelimit-policyd.cfg \
+		${STAGEDIR}${PREFIX}/etc/ratelimit-policyd.cfg.sample
+
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/mysql-schema.sql ${STAGEDIR}${DATADIR}
+
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for i in ${PORTDOCS}
+	${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
+.endfor
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/${PERIODIC_DAILY}
+	${INSTALL_SCRIPT} ${WRKSRC}/periodic/daily/535.ratelimit-policyd \
+		${STAGEDIR}${PREFIX}/${PERIODIC_DAILY}
+
+.include <bsd.port.mk>

Added: head/mail/ratelimit-policyd/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/ratelimit-policyd/distinfo	Tue Apr  3 16:52:56 2018	(r466364)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1522007262
+SHA256 (MirLach-ratelimit-policyd-1.0.1_GH0.tar.gz) = 14a3785dff86b0cf58e57220f79551ba159ee184bbb21f462c019675675d775b
+SIZE (MirLach-ratelimit-policyd-1.0.1_GH0.tar.gz) = 11218

Added: head/mail/ratelimit-policyd/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/ratelimit-policyd/files/pkg-message.in	Tue Apr  3 16:52:56 2018	(r466364)
@@ -0,0 +1,37 @@
+This package must be integrated with Postfix to be effective:
+
+ * Add a new MySQL user account for ratelimit-policyd with the
+   following permissions:
+
+    GRANT USAGE ON *.* TO 'policyd'@'localhost' IDENTIFIED BY '<YourPassword>';
+    GRANT SELECT, INSERT, UPDATE, DELETE ON `policyd`.* TO 'policyd'@'localhost';
+
+ * Create a database 'policyd' and a table 'ratelimit':
+
+    mysql -u root -p < %%LOCALBASE%%/share/ratelimit-policyd/mysql-schema.sql
+
+ * Edit the configuration in %%LOCALBASE%%/etc/ratelimit-policyd.cfg
+
+ * Enable the ratelimit-policyd service in rc.conf:
+
+    sysrc ratelimit_policyd_enable="YES"
+
+ * Start the service:
+
+    service ratelimit-policyd start
+
+ * Add or modify the postfix data restriction class
+   'smtpd_sender_restrictions' in main.cf:
+
+    smtpd_sender_restrictions =
+        check_sender_access mysql:%%LOCALBASE%%/etc/postfix/clients.cf,
+        check_policy_service inet:127.0.0.1:10032
+
+    check_policy_service must be after check_sender_access (if you are using it)
+
+ * Reload Postfix:
+
+    postfix reload
+
+ * See the documentation in %%LOCALBASE%%/share/ratelimit-policyd/README.md
+   or visit https://github.com/MirLach/ratelimit-policyd

Added: head/mail/ratelimit-policyd/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/ratelimit-policyd/pkg-descr	Tue Apr  3 16:52:56 2018	(r466364)
@@ -0,0 +1,4 @@
+A sender rate limit policy daemon for Postfix written in Perl.
+Customised to work with a modern Perl version on FreeBSD.
+
+WWW: https://github.com/MirLach/ratelimit-policyd


More information about the svn-ports-head mailing list