From fb8ef8d5e49ece5c065aeeb6662f69548e9c84bc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 18 Nov 2015 00:58:15 +0000 Subject: [PATCH] - Update to 1.6.6 - Create a separate plist file - Add @sample option to the sample file - Rename rc script without .sh suffix - Switch from postfix user to _rmilter dedicated user - Add _rmilter:_rmilter to UIDs/GIDs - Add UPDATING entry --- GIDs | 1 + UIDs | 1 + UPDATING | 8 ++++++++ mail/rmilter/Makefile | 15 ++++++++++----- mail/rmilter/distinfo | 4 ++-- mail/rmilter/pkg-plist | 9 +++++++++ 6 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 mail/rmilter/pkg-plist diff --git a/GIDs b/GIDs index 0d24f25d854c..67c25af7ab45 100644 --- a/GIDs +++ b/GIDs @@ -330,6 +330,7 @@ rcynic:*:994: rpkirtr:*:995: tarantool:*:996: bareos:*:997: +_rmilter:*:998: ebnetd:*:999: nogroup:*:65533: nobody:*:65534: diff --git a/UIDs b/UIDs index a28297f508a9..a7dd1a95bf84 100644 --- a/UIDs +++ b/UIDs @@ -342,5 +342,6 @@ rcynic:*:994:994::0:0:RPKI validation system:/nonexistent:/usr/sbin/nologin rpkirtr:*:995:995::0:0:RPKI router server:/nonexistent:/usr/sbin/nologin tarantool:*:996:996::0:0:Tarantool Daemon:/nonexistent:/usr/sbin/nologin bareos:*:997:997::0:0:Bareos Daemon:/var/db/bareos:/usr/sbin/nologin +_rmilter:*:998:998::0:0:Rmilter daemon:/nonexistent:/usr/sbin/nologin ebnetd:*:999:999::0:0:EBNETD:/nonexistent:/usr/sbin/nologin nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin diff --git a/UPDATING b/UPDATING index f91eed81db17..ebd3b87afbae 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,14 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20151118: + AFFECTS: users of mail/rmilter + AUTHOR: vsevolod@FreeBSD.org + + Rmilter now has switched from user postfix to user _rmilter for security + and sanity purposes. You might want to fix the ownership of + /var/run/rmilter to user _rmilter and group mail. + 20151105: AFFECTS: users of deskutils/egroupware AUTHOR: danilo@FreeBSD.org diff --git a/mail/rmilter/Makefile b/mail/rmilter/Makefile index 0c61cea8c4ce..53b365b3a0d8 100644 --- a/mail/rmilter/Makefile +++ b/mail/rmilter/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= rmilter -PORTVERSION= 1.6.5 +PORTVERSION= 1.6.6 CATEGORIES= mail MAINTAINER= vsevolod@FreeBSD.org @@ -20,9 +20,8 @@ USE_RC_SUBR= yes USES= cmake:outsource bison USE_OPENSSL= yes -PLIST_FILES= sbin/rmilter etc/rc.d/rmilter.sh \ - etc/rmilter.conf.sample \ - man/man8/rmilter.8.gz +USERS= _rmilter +GROUPS= _rmilter CMAKE_ARGS+= -DENABLE_SPF=ON \ -DENABLE_DKIM=ON @@ -35,10 +34,16 @@ WITH_SENDMAIL_BASE= yes WITHOUT_MILTER_LDFLAGS= yes .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" +post-patch: + ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${WRKSRC}/freebsd/rmilter > ${WRKDIR}/rmilter + do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/rmilter.sh ${STAGEDIR}${PREFIX}/etc/rc.d/ + ${INSTALL_SCRIPT} ${WRKDIR}/rmilter ${STAGEDIR}${PREFIX}/etc/rc.d/ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/rmilter ${STAGEDIR}${PREFIX}/sbin ${INSTALL_DATA} ${WRKSRC}/rmilter.conf.sample ${STAGEDIR}${PREFIX}/etc/ ${INSTALL_MAN} ${WRKSRC}/doc/rmilter.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/ +post-stage: + ${INSTALL} -d ${STAGEDIR}/var/run/rmilter .include diff --git a/mail/rmilter/distinfo b/mail/rmilter/distinfo index b5b3303e2a6f..31c276066a1e 100644 --- a/mail/rmilter/distinfo +++ b/mail/rmilter/distinfo @@ -1,2 +1,2 @@ -SHA256 (vstakhov-rmilter-1.6.5_GH0.tar.gz) = f5486a090e245fe1b35b96535a26145df0274603b849f0c1ee771970173d5e00 -SIZE (vstakhov-rmilter-1.6.5_GH0.tar.gz) = 117661 +SHA256 (vstakhov-rmilter-1.6.6_GH0.tar.gz) = 4e8c3374d0345ae99a3cd8f5965a0c49e1d1dc6bb0aa694c8f1fa2c4b5baf470 +SIZE (vstakhov-rmilter-1.6.6_GH0.tar.gz) = 117565 diff --git a/mail/rmilter/pkg-plist b/mail/rmilter/pkg-plist new file mode 100644 index 000000000000..1cb80706a3a8 --- /dev/null +++ b/mail/rmilter/pkg-plist @@ -0,0 +1,9 @@ +etc/rc.d/rmilter +@sample etc/rmilter.conf.sample +man/man8/rmilter.8.gz +sbin/rmilter +@owner _rmilter +@group mail +@dir /var/run/rmilter +@owner +@group