summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-06-11 09:20:20 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-06-11 09:20:20 +0000
commitef425063696e3c1ced0d6fe1c19b30ce4e771e2d (patch)
tree02014df05fb00580018fbba7fb2e068efaef2a46 /mail
parentVarious fixes: (diff)
Sandbox Exim.
Since BSD UNIX still doesn't offer a user for running an MTA in a sandbox the way many Linux distributions do, the Exim port uses the traditional sandbox user for sendmail, called 'sendmail'. Bump PORTREVISION accordingly.
Notes
Notes: svn path=/head/; revision=43828
Diffstat (limited to 'mail')
-rw-r--r--mail/exim-devel/Makefile5
-rw-r--r--mail/exim-devel/files/configure.default5
-rw-r--r--mail/exim-devel/pkg-install34
-rw-r--r--mail/exim-old/Makefile5
-rw-r--r--mail/exim-old/files/configure.default5
-rw-r--r--mail/exim-old/pkg-install34
-rw-r--r--mail/exim/Makefile5
-rw-r--r--mail/exim/files/configure.default5
-rw-r--r--mail/exim/pkg-install34
9 files changed, 123 insertions, 9 deletions
diff --git a/mail/exim-devel/Makefile b/mail/exim-devel/Makefile
index 7d9717308cd6..968fcc3ee190 100644
--- a/mail/exim-devel/Makefile
+++ b/mail/exim-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= exim
PORTVERSION= 3.22
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/ \
http://www.exim.org/ftp/ \
@@ -164,4 +164,7 @@ post-build:
${TOUCH} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/eximon.bin
${TOUCH} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/eximon
+pre-install:
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
.include <bsd.port.mk>
diff --git a/mail/exim-devel/files/configure.default b/mail/exim-devel/files/configure.default
index 727293840055..8063ef63ead1 100644
--- a/mail/exim-devel/files/configure.default
+++ b/mail/exim-devel/files/configure.default
@@ -76,9 +76,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 = XX_BINOWN_XX
+exim_user = sendmail
exim_group = mail
-never_users = root : XX_BINOWN_XX
+never_users = root
# The use of your host as a mail relay by any host, including the local host
@@ -161,6 +161,7 @@ host_lookup = 0.0.0.0/0
# percent_hack_domains = *
pid_file_path = /var/run/exim%s.pid
+log_file_path = /var/run/exim/%s.pid
end
diff --git a/mail/exim-devel/pkg-install b/mail/exim-devel/pkg-install
new file mode 100644
index 000000000000..7f20505f46ef
--- /dev/null
+++ b/mail/exim-devel/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Since FreeBSD does not supply a user for running an MTA in a sandbox
+# by default, use the traditional sendmail sandbox user, sendmail,
+# adding it if it does not exist.
+#
+# Modern FreeBSD systems already have a group mail.
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=sendmail
+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."
+ fi
+fi
+
+# This is naughty, since the directory we create won't be removed along
+# with Exim. However, logfiles should probably stick around after Exim
+# is removed, until the administrator is sure he doesn't want them
+# any more.
+#
+mkdir -p /var/log/exim
+chown ${user}:${group} /var/log/exim
diff --git a/mail/exim-old/Makefile b/mail/exim-old/Makefile
index 7d9717308cd6..968fcc3ee190 100644
--- a/mail/exim-old/Makefile
+++ b/mail/exim-old/Makefile
@@ -7,7 +7,7 @@
PORTNAME= exim
PORTVERSION= 3.22
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/ \
http://www.exim.org/ftp/ \
@@ -164,4 +164,7 @@ post-build:
${TOUCH} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/eximon.bin
${TOUCH} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/eximon
+pre-install:
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
.include <bsd.port.mk>
diff --git a/mail/exim-old/files/configure.default b/mail/exim-old/files/configure.default
index 727293840055..8063ef63ead1 100644
--- a/mail/exim-old/files/configure.default
+++ b/mail/exim-old/files/configure.default
@@ -76,9 +76,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 = XX_BINOWN_XX
+exim_user = sendmail
exim_group = mail
-never_users = root : XX_BINOWN_XX
+never_users = root
# The use of your host as a mail relay by any host, including the local host
@@ -161,6 +161,7 @@ host_lookup = 0.0.0.0/0
# percent_hack_domains = *
pid_file_path = /var/run/exim%s.pid
+log_file_path = /var/run/exim/%s.pid
end
diff --git a/mail/exim-old/pkg-install b/mail/exim-old/pkg-install
new file mode 100644
index 000000000000..7f20505f46ef
--- /dev/null
+++ b/mail/exim-old/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Since FreeBSD does not supply a user for running an MTA in a sandbox
+# by default, use the traditional sendmail sandbox user, sendmail,
+# adding it if it does not exist.
+#
+# Modern FreeBSD systems already have a group mail.
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=sendmail
+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."
+ fi
+fi
+
+# This is naughty, since the directory we create won't be removed along
+# with Exim. However, logfiles should probably stick around after Exim
+# is removed, until the administrator is sure he doesn't want them
+# any more.
+#
+mkdir -p /var/log/exim
+chown ${user}:${group} /var/log/exim
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 7d9717308cd6..968fcc3ee190 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -7,7 +7,7 @@
PORTNAME= exim
PORTVERSION= 3.22
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/ \
http://www.exim.org/ftp/ \
@@ -164,4 +164,7 @@ post-build:
${TOUCH} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/eximon.bin
${TOUCH} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/eximon
+pre-install:
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
.include <bsd.port.mk>
diff --git a/mail/exim/files/configure.default b/mail/exim/files/configure.default
index 727293840055..8063ef63ead1 100644
--- a/mail/exim/files/configure.default
+++ b/mail/exim/files/configure.default
@@ -76,9 +76,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 = XX_BINOWN_XX
+exim_user = sendmail
exim_group = mail
-never_users = root : XX_BINOWN_XX
+never_users = root
# The use of your host as a mail relay by any host, including the local host
@@ -161,6 +161,7 @@ host_lookup = 0.0.0.0/0
# percent_hack_domains = *
pid_file_path = /var/run/exim%s.pid
+log_file_path = /var/run/exim/%s.pid
end
diff --git a/mail/exim/pkg-install b/mail/exim/pkg-install
new file mode 100644
index 000000000000..7f20505f46ef
--- /dev/null
+++ b/mail/exim/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Since FreeBSD does not supply a user for running an MTA in a sandbox
+# by default, use the traditional sendmail sandbox user, sendmail,
+# adding it if it does not exist.
+#
+# Modern FreeBSD systems already have a group mail.
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=sendmail
+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."
+ fi
+fi
+
+# This is naughty, since the directory we create won't be removed along
+# with Exim. However, logfiles should probably stick around after Exim
+# is removed, until the administrator is sure he doesn't want them
+# any more.
+#
+mkdir -p /var/log/exim
+chown ${user}:${group} /var/log/exim