mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
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
This commit is contained in:
parent
8ed5c7ffc2
commit
479b7f33fb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=466364
@ -584,6 +584,7 @@
|
||||
SUBDIR += queue-repair
|
||||
SUBDIR += rainloop
|
||||
SUBDIR += rainloop-community
|
||||
SUBDIR += ratelimit-policyd
|
||||
SUBDIR += raysfilter
|
||||
SUBDIR += razor-agents
|
||||
SUBDIR += rbl-milter
|
||||
|
63
mail/ratelimit-policyd/Makefile
Normal file
63
mail/ratelimit-policyd/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# Created by: Miroslav Lachman
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= ratelimit-policyd
|
||||
PORTVERSION= 1.0.1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= GH
|
||||
|
||||
MAINTAINER= 000.fbsd@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>
|
3
mail/ratelimit-policyd/distinfo
Normal file
3
mail/ratelimit-policyd/distinfo
Normal file
@ -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
|
37
mail/ratelimit-policyd/files/pkg-message.in
Normal file
37
mail/ratelimit-policyd/files/pkg-message.in
Normal file
@ -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
|
4
mail/ratelimit-policyd/pkg-descr
Normal file
4
mail/ratelimit-policyd/pkg-descr
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user