pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/postfix Make the postfix user/group names variables.
details: https://anonhg.NetBSD.org/pkgsrc/rev/5082bbbcea5d
branches: trunk
changeset: 354399:5082bbbcea5d
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Fri Oct 28 16:10:51 2016 +0000
description:
Make the postfix user/group names variables.
diffstat:
mail/postfix/Makefile | 17 +++++++++--------
mail/postfix/Makefile.common | 14 +++++++++++---
2 files changed, 20 insertions(+), 11 deletions(-)
diffs (82 lines):
diff -r 020a942eb461 -r 5082bbbcea5d mail/postfix/Makefile
--- a/mail/postfix/Makefile Fri Oct 28 15:55:50 2016 +0000
+++ b/mail/postfix/Makefile Fri Oct 28 16:10:51 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.292 2016/09/18 17:10:28 taca Exp $
+# $NetBSD: Makefile,v 1.293 2016/10/28 16:10:51 jperkin Exp $
.include "../../mail/postfix/Makefile.common"
@@ -9,8 +9,8 @@
USE_TOOLS+= perl
-SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555
-SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555
+SPECIAL_PERMS+= sbin/postdrop ${POSTFIX_USER} ${MAILDROP_GROUP} 2555
+SPECIAL_PERMS+= sbin/postqueue ${POSTFIX_USER} ${MAILDROP_GROUP} 2555
REPLACE_PERL+= auxiliary/qshape/qshape.pl
@@ -31,13 +31,14 @@
RCD_SCRIPTS= postfix
OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
-OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700
+OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} ${POSTFIX_USER} ${POSTFIX_GROUP} 0700
MAKE_DIRS+= ${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d
-PKG_GROUPS?= postfix maildrop
-PKG_USERS?= postfix:postfix
-PKG_GECOS.postfix= Postfix User
-PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR}
+PKG_GROUPS?= ${POSTFIX_GROUP} ${MAILDROP_GROUP}
+PKG_USERS?= ${POSTFIX_USER}:${POSTFIX_GROUP}
+
+PKG_GECOS.${POSTFIX_USER}= Postfix User
+PKG_HOME.${POSTFIX_USER}= ${POSTFIX_QUEUE_DIR}
CONF_FILES= # empty
.for i in main.cf master.cf
diff -r 020a942eb461 -r 5082bbbcea5d mail/postfix/Makefile.common
--- a/mail/postfix/Makefile.common Fri Oct 28 15:55:50 2016 +0000
+++ b/mail/postfix/Makefile.common Fri Oct 28 16:10:51 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2016/10/09 12:28:19 taca Exp $
+# $NetBSD: Makefile.common,v 1.5 2016/10/28 16:10:51 jperkin Exp $
# used by mail/postfix/Makefile
# used by mail/postfix/Makefile.module
@@ -22,6 +22,10 @@
.include "../../mk/bsd.prefs.mk"
+POSTFIX_USER?= postfix
+POSTFIX_GROUP?= postfix
+MAILDROP_GROUP?= maildrop
+
# POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is
# merely a default, and may be changed by setting "queue_directory" in
# ${PKG_SYSCONFDIR}/main.cf.
@@ -84,7 +88,9 @@
SUBST_SED.postfix+= \
-e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|'
SUBST_SED.postfix+= \
- -e 's|^\(setgid_group\) =.*|\1 = maildrop|'
+ -e 's|^\(mail_owner\) =.*|\1 = ${POSTFIX_USER}|'
+SUBST_SED.postfix+= \
+ -e 's|^\(setgid_group\) =.*|\1 = ${MAILDROP_GROUP}|'
SUBST_SED.postfix+= \
-e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|'
SUBST_SED.postfix+= \
@@ -92,7 +98,9 @@
SUBST_SED.postfix+= \
-e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|'
SUBST_SED.postfix+= \
- -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g'
+ -e '/^\#define DEF_MAIL_OWNER[ ]/s,postfix,${POSTFIX_USER},g'
+SUBST_SED.postfix+= \
+ -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,${MAILDROP_GROUP},g'
PKG_SYSCONFSUBDIR= postfix
LIBEXECDIR= ${PREFIX}/libexec/postfix
Home |
Main Index |
Thread Index |
Old Index