aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-12-11 20:34:54 +0800
committersheldonh <sheldonh@FreeBSD.org>2001-12-11 20:34:54 +0800
commit7f3af41f944bd814e978b64564e90c7c2e7debeb (patch)
tree1d3247bc8e33cc2ad9b94e56e6a187206df33488 /mail
parent38c488e57d4f4b7ab40a64f99485c300566b6406 (diff)
downloadfreebsd-ports-graphics-7f3af41f944bd814e978b64564e90c7c2e7debeb.tar.gz
freebsd-ports-graphics-7f3af41f944bd814e978b64564e90c7c2e7debeb.tar.zst
freebsd-ports-graphics-7f3af41f944bd814e978b64564e90c7c2e7debeb.zip
Build Exim with compile-time defaults for exim_user and exim_group.
Use the newly added mailnull user, and the now well-established group mail. The use of compile-time defaults for these values is not required for many sites, but are important for more exotic applications. This ensures that the packages are useful to the widest audience possible.
Diffstat (limited to 'mail')
-rw-r--r--mail/exim-devel/files/patch-src::EDITME11
-rw-r--r--mail/exim-devel/files/patch-src::configure.default14
-rw-r--r--mail/exim-devel/pkg-install19
-rw-r--r--mail/exim-old/files/patch-src::EDITME11
-rw-r--r--mail/exim-old/files/patch-src::configure.default14
-rw-r--r--mail/exim-old/pkg-install19
-rw-r--r--mail/exim/files/patch-src::EDITME11
-rw-r--r--mail/exim/files/patch-src::configure.default14
-rw-r--r--mail/exim/pkg-install19
9 files changed, 90 insertions, 42 deletions
diff --git a/mail/exim-devel/files/patch-src::EDITME b/mail/exim-devel/files/patch-src::EDITME
index 6a314acc6ec..2e25772f252 100644
--- a/mail/exim-devel/files/patch-src::EDITME
+++ b/mail/exim-devel/files/patch-src::EDITME
@@ -43,6 +43,17 @@
# In some installations there may be multiple machines sharing file systems,
+@@ -231,8 +231,8 @@
+ # "security" setting, which controls how privilege is released (setuid vs
+ # seteuid).
+
+-# EXIM_UID=
+-# EXIM_GID=
++EXIM_UID=26
++EXIM_GID=6
+
+
+ # Compiling the Exim monitor: If you want to compile the Exim monitor,
@@ -243,7 +243,7 @@
# are defaulted in the OS/Makefile-Default file, and can be overridden
# in local OS-specific make files.
diff --git a/mail/exim-devel/files/patch-src::configure.default b/mail/exim-devel/files/patch-src::configure.default
index a5876067d75..9b24cf34868 100644
--- a/mail/exim-devel/files/patch-src::configure.default
+++ b/mail/exim-devel/files/patch-src::configure.default
@@ -1,14 +1,16 @@
--- src/configure.default.orig Thu Jun 14 19:39:54 2001
+++ src/configure.default Thu Jun 14 20:10:52 2001
-@@ -99,6 +99,8 @@
+@@ -99,7 +99,9 @@
# normal user. This isn't usually a problem, as most sites have an alias for
# root that redirects such mail to a human administrator.
-+exim_user = exim
+-never_users = root
++exim_user = mailnull
+exim_group = mail
- never_users = root
++never_users = root : mailnull
+ # The use of your host as a mail relay by any host, including the local host
@@ -122,6 +124,8 @@
# See the section of the manual entitled "Control of relaying" for more
# information.
@@ -29,17 +31,17 @@
# This transport is used for handling pipe deliveries generated by alias
-@@ -294,7 +298,8 @@
+@@ -300,7 +304,8 @@
driver = aliasfile
file = /etc/aliases
search_type = lsearch
-# user = exim
-+ user = exim
++ user = mailnull
+ group = mail
file_transport = address_file
pipe_transport = address_pipe
-@@ -328,6 +333,7 @@
+@@ -334,6 +339,7 @@
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
diff --git a/mail/exim-devel/pkg-install b/mail/exim-devel/pkg-install
index 85811906091..3a1673907c5 100644
--- a/mail/exim-devel/pkg-install
+++ b/mail/exim-devel/pkg-install
@@ -13,17 +13,20 @@
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-user=exim
+uid=26
+gid=6
+user=mailnull
group=mail
if [ "$2" = "PRE-INSTALL" ]; then
- if /usr/bin/id ${user} 2>/dev/null; then
- echo "You already have a user '${user}', so Exim will use it."
- else
- echo "You need a user '${user}'..."
- /usr/sbin/pw useradd ${user} -c "Mail Transfer Agent" \
- -g ${group} -d /nonexistent -s /sbin/nologin || exit 1
- echo "Added user '${user}', Exim will use it."
+ # uid=26(mailnull) gid=26(mailnull) groups=26(mailnull)
+ if ! /usr/bin/id ${uid} | /usr/bin/grep "uid=${uid}(${user})"; then
+ echo "Exim requires user ${user} (UID ${uid}). Please update your system." 1>&2
+ exit 1
+ fi
+ if ! /usr/bin/grep "^${group}:[^:]*:${gid}:" < /etc/group; then
+ echo "Exim requires group ${group} (GID ${gid}). Please update your system." 1>&2
+ exit 1
fi
fi
diff --git a/mail/exim-old/files/patch-src::EDITME b/mail/exim-old/files/patch-src::EDITME
index 6a314acc6ec..2e25772f252 100644
--- a/mail/exim-old/files/patch-src::EDITME
+++ b/mail/exim-old/files/patch-src::EDITME
@@ -43,6 +43,17 @@
# In some installations there may be multiple machines sharing file systems,
+@@ -231,8 +231,8 @@
+ # "security" setting, which controls how privilege is released (setuid vs
+ # seteuid).
+
+-# EXIM_UID=
+-# EXIM_GID=
++EXIM_UID=26
++EXIM_GID=6
+
+
+ # Compiling the Exim monitor: If you want to compile the Exim monitor,
@@ -243,7 +243,7 @@
# are defaulted in the OS/Makefile-Default file, and can be overridden
# in local OS-specific make files.
diff --git a/mail/exim-old/files/patch-src::configure.default b/mail/exim-old/files/patch-src::configure.default
index a5876067d75..9b24cf34868 100644
--- a/mail/exim-old/files/patch-src::configure.default
+++ b/mail/exim-old/files/patch-src::configure.default
@@ -1,14 +1,16 @@
--- src/configure.default.orig Thu Jun 14 19:39:54 2001
+++ src/configure.default Thu Jun 14 20:10:52 2001
-@@ -99,6 +99,8 @@
+@@ -99,7 +99,9 @@
# normal user. This isn't usually a problem, as most sites have an alias for
# root that redirects such mail to a human administrator.
-+exim_user = exim
+-never_users = root
++exim_user = mailnull
+exim_group = mail
- never_users = root
++never_users = root : mailnull
+ # The use of your host as a mail relay by any host, including the local host
@@ -122,6 +124,8 @@
# See the section of the manual entitled "Control of relaying" for more
# information.
@@ -29,17 +31,17 @@
# This transport is used for handling pipe deliveries generated by alias
-@@ -294,7 +298,8 @@
+@@ -300,7 +304,8 @@
driver = aliasfile
file = /etc/aliases
search_type = lsearch
-# user = exim
-+ user = exim
++ user = mailnull
+ group = mail
file_transport = address_file
pipe_transport = address_pipe
-@@ -328,6 +333,7 @@
+@@ -334,6 +339,7 @@
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
diff --git a/mail/exim-old/pkg-install b/mail/exim-old/pkg-install
index 85811906091..3a1673907c5 100644
--- a/mail/exim-old/pkg-install
+++ b/mail/exim-old/pkg-install
@@ -13,17 +13,20 @@
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-user=exim
+uid=26
+gid=6
+user=mailnull
group=mail
if [ "$2" = "PRE-INSTALL" ]; then
- if /usr/bin/id ${user} 2>/dev/null; then
- echo "You already have a user '${user}', so Exim will use it."
- else
- echo "You need a user '${user}'..."
- /usr/sbin/pw useradd ${user} -c "Mail Transfer Agent" \
- -g ${group} -d /nonexistent -s /sbin/nologin || exit 1
- echo "Added user '${user}', Exim will use it."
+ # uid=26(mailnull) gid=26(mailnull) groups=26(mailnull)
+ if ! /usr/bin/id ${uid} | /usr/bin/grep "uid=${uid}(${user})"; then
+ echo "Exim requires user ${user} (UID ${uid}). Please update your system." 1>&2
+ exit 1
+ fi
+ if ! /usr/bin/grep "^${group}:[^:]*:${gid}:" < /etc/group; then
+ echo "Exim requires group ${group} (GID ${gid}). Please update your system." 1>&2
+ exit 1
fi
fi
diff --git a/mail/exim/files/patch-src::EDITME b/mail/exim/files/patch-src::EDITME
index 6a314acc6ec..2e25772f252 100644
--- a/mail/exim/files/patch-src::EDITME
+++ b/mail/exim/files/patch-src::EDITME
@@ -43,6 +43,17 @@
# In some installations there may be multiple machines sharing file systems,
+@@ -231,8 +231,8 @@
+ # "security" setting, which controls how privilege is released (setuid vs
+ # seteuid).
+
+-# EXIM_UID=
+-# EXIM_GID=
++EXIM_UID=26
++EXIM_GID=6
+
+
+ # Compiling the Exim monitor: If you want to compile the Exim monitor,
@@ -243,7 +243,7 @@
# are defaulted in the OS/Makefile-Default file, and can be overridden
# in local OS-specific make files.
diff --git a/mail/exim/files/patch-src::configure.default b/mail/exim/files/patch-src::configure.default
index a5876067d75..9b24cf34868 100644
--- a/mail/exim/files/patch-src::configure.default
+++ b/mail/exim/files/patch-src::configure.default
@@ -1,14 +1,16 @@
--- src/configure.default.orig Thu Jun 14 19:39:54 2001
+++ src/configure.default Thu Jun 14 20:10:52 2001
-@@ -99,6 +99,8 @@
+@@ -99,7 +99,9 @@
# normal user. This isn't usually a problem, as most sites have an alias for
# root that redirects such mail to a human administrator.
-+exim_user = exim
+-never_users = root
++exim_user = mailnull
+exim_group = mail
- never_users = root
++never_users = root : mailnull
+ # The use of your host as a mail relay by any host, including the local host
@@ -122,6 +124,8 @@
# See the section of the manual entitled "Control of relaying" for more
# information.
@@ -29,17 +31,17 @@
# This transport is used for handling pipe deliveries generated by alias
-@@ -294,7 +298,8 @@
+@@ -300,7 +304,8 @@
driver = aliasfile
file = /etc/aliases
search_type = lsearch
-# user = exim
-+ user = exim
++ user = mailnull
+ group = mail
file_transport = address_file
pipe_transport = address_pipe
-@@ -328,6 +333,7 @@
+@@ -334,6 +339,7 @@
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
diff --git a/mail/exim/pkg-install b/mail/exim/pkg-install
index 85811906091..3a1673907c5 100644
--- a/mail/exim/pkg-install
+++ b/mail/exim/pkg-install
@@ -13,17 +13,20 @@
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-user=exim
+uid=26
+gid=6
+user=mailnull
group=mail
if [ "$2" = "PRE-INSTALL" ]; then
- if /usr/bin/id ${user} 2>/dev/null; then
- echo "You already have a user '${user}', so Exim will use it."
- else
- echo "You need a user '${user}'..."
- /usr/sbin/pw useradd ${user} -c "Mail Transfer Agent" \
- -g ${group} -d /nonexistent -s /sbin/nologin || exit 1
- echo "Added user '${user}', Exim will use it."
+ # uid=26(mailnull) gid=26(mailnull) groups=26(mailnull)
+ if ! /usr/bin/id ${uid} | /usr/bin/grep "uid=${uid}(${user})"; then
+ echo "Exim requires user ${user} (UID ${uid}). Please update your system." 1>&2
+ exit 1
+ fi
+ if ! /usr/bin/grep "^${group}:[^:]*:${gid}:" < /etc/group; then
+ echo "Exim requires group ${group} (GID ${gid}). Please update your system." 1>&2
+ exit 1
fi
fi