summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2013-12-11 11:29:49 +0100
committerErik Hanson <erik@slackbuilds.org>2013-12-14 10:52:36 -0600
commitd91474d6154bbaf8222f3dc0b0eac93dc3b470ff (patch)
treeff58c192a93b77f3e258dc4407713ee5c7241620
parent1cf316049a3b52caa0b90d2732d0cae168513b90 (diff)
downloadslackbuilds-d91474d6154bbaf8222f3dc0b0eac93dc3b470ff.tar.gz
network/opensmtpd: Updated for version 5.4.1p1.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--network/opensmtpd/README24
-rw-r--r--network/opensmtpd/opensmtpd.SlackBuild42
-rw-r--r--network/opensmtpd/opensmtpd.info6
-rw-r--r--network/opensmtpd/rc.opensmtpd2
-rw-r--r--network/opensmtpd/slack-desc2
5 files changed, 36 insertions, 40 deletions
diff --git a/network/opensmtpd/README b/network/opensmtpd/README
index da5475c9b1..2931722d49 100644
--- a/network/opensmtpd/README
+++ b/network/opensmtpd/README
@@ -1,19 +1,19 @@
-OpenSMTPD is a FREE implementation of the server-side SMTP protocol
-as defined by RFC 5321, with some additional standard extensions.
-It allows ordinary machines to exchange e-mails with other systems
+OpenSMTPD is a FREE implementation of the server-side SMTP protocol
+as defined by RFC 5321, with some additional standard extensions.
+It allows ordinary machines to exchange e-mails with other systems
speaking the SMTP protocol.
-You must have smtpd, smtpf, smtpl, and smtpq users on the system
-for privilege separation - something like this should suffice:
-useradd -u 270 -g 0 -r -s /bin/false -d /var/empty smtpd
-useradd -u 271 -g 0 -r -s /bin/false -d /var/empty smtpf
-useradd -u 272 -g 0 -r -s /bin/false -d /var/empty smtpl
-useradd -u 273 -g 0 -r -s /bin/false -d /var/empty smtpq
+You must have smtpd and smtpq users and groups on the system for
+privilege separation - something like this should suffice:
+ groupadd -g 270 smtpd
+ useradd -u 270 -g 270 -r -s /bin/false -d /var/empty smtpd
+ groupadd -g 271 smtpq
+ useradd -u 271 -g 271 -r -s /bin/false -d /var/empty smtpq
-You will want to add /etc/rc.d/rc.opensmtpd to rc.local so that it
+You will want to add /etc/rc.d/rc.opensmtpd to rc.local so that it
will start on boot (or perhaps consider symlinking rc.sendmail to
rc.opensmtpd).
This package conflicts with the stock sendmail package included in
-Slackware and overwrites some of its files if you do not remove it
-before.
+Slackware and overwrites some of its files, so remove the sendmail
+package before installing opensmtpd.
diff --git a/network/opensmtpd/opensmtpd.SlackBuild b/network/opensmtpd/opensmtpd.SlackBuild
index 06446a1cc0..7ee368268a 100644
--- a/network/opensmtpd/opensmtpd.SlackBuild
+++ b/network/opensmtpd/opensmtpd.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=opensmtpd
-VERSION=${VERSION:-5.3.3p1}
+VERSION=${VERSION:-5.4.1p1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -55,23 +55,23 @@ else
fi
bailout() {
- printf "\nYou must have smtpd, smtpf, smtpl, and smtpq users on the system \n"
+ printf "\nYou must have smtpd and smtpq users and groups on the system \n"
printf "for privilege separation - something like this should suffice: \n"
- printf "\tuseradd -u 270 -g 0 -r -s /bin/false -d /var/empty smtpd \n"
- printf "\tuseradd -u 271 -g 0 -r -s /bin/false -d /var/empty smtpf \n"
- printf "\tuseradd -u 272 -g 0 -r -s /bin/false -d /var/empty smtpl \n"
- printf "\tuseradd -u 273 -g 0 -r -s /bin/false -d /var/empty smtpq \n\n"
+ printf "\tgroupadd -g 270 smtpd \n"
+ printf "\tuseradd -u 270 -g 270 -r -s /bin/false -d /var/empty smtpd \n"
+ printf "\tgroupadd -g 271 smtpq \n"
+ printf "\tuseradd -u 271 -g 271 -r -s /bin/false -d /var/empty smtpq \n\n"
exit 1
}
-if ! getent passwd smtpd 1>/dev/null 2>/dev/null ; then
+if ! getent group smtpd 1>/dev/null 2>/dev/null ; then
bailout
-elif ! getent passwd smtpf 1>/dev/null 2>/dev/null ; then
- bailout
-elif ! getent passwd smtpl 1>/dev/null 2>/dev/null ; then
+elif ! getent passwd smtpd 1>/dev/null 2>/dev/null ; then
bailout
elif ! getent passwd smtpq 1>/dev/null 2>/dev/null ; then
bailout
+elif ! getent group smtpq 1>/dev/null 2>/dev/null ; then
+ bailout
fi
set -e
@@ -89,8 +89,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-./bootstrap
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -102,36 +100,34 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--with-mantype=doc \
--docdir=/usr/doc/$PRGNAM-$VERSION \
+ --without-rpath \
--with-maildir=/var/spool/mail \
--with-privsep-user=smtpd \
- --with-filter-user=smtpf \
--with-queue-user=smtpq \
- --with-lookup-user=smtpl \
--build=$ARCH-slackware-linux
-# the "smtpl" user won't actually be used until 5.4, but it's harmless
-# to go ahead and have it present - I'm less likely to forget later :)
-
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Create a nice compat symlink for sendmail
+# Create nice compat symlinks for sendmail
+rm -f $PKG/usr/bin/sendmail $PKG/usr/sbin/sendmail
ln -s smtpctl $PKG/usr/sbin/sendmail
+ln -s ../sbin/sendmail $PKG/usr/bin/sendmail
-# Replace some hardlinks with symlinks
-rm -f $PKG/usr/bin/{newaliases,mailq} $PKG/usr/libexec/opensmtpd/makemap
-ln -s ../sbin/makemap $PKG/usr/bin/newaliases
-ln -s ../sbin/smtpctl $PKG/usr/bin/mailq
-ln -s ../../sbin/makemap $PKG/usr/libexec/opensmtpd/makemap
+rm -f $PKG/usr/sbin/mailq $PKG/usr/sbin/newaliases
+ln -s makemap $PKG/usr/sbin/newaliases
+ln -s smtpctl $PKG/usr/sbin/mailq
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.opensmtpd > $PKG/etc/rc.d/rc.opensmtpd.new
# Don't clobber the config file
mv $PKG/etc/opensmtpd/smtpd.conf $PKG/etc/opensmtpd/smtpd.conf.new
+# and reflect the correct path to aliases file
+sed -i "s,/etc/mail/,/etc/opensmtpd/,g" $PKG/etc/opensmtpd/smtpd.conf.new
# Create (but don't clobber) the aliases file
cat $CWD/aliases > $PKG/etc/opensmtpd/aliases.new
diff --git a/network/opensmtpd/opensmtpd.info b/network/opensmtpd/opensmtpd.info
index e7e5c9d1d4..44b837ae7f 100644
--- a/network/opensmtpd/opensmtpd.info
+++ b/network/opensmtpd/opensmtpd.info
@@ -1,8 +1,8 @@
PRGNAM="opensmtpd"
-VERSION="5.3.3p1"
+VERSION="5.4.1p1"
HOMEPAGE="http://www.opensmtpd.org/"
-DOWNLOAD="http://www.opensmtpd.org/archives/opensmtpd-5.3.3p1.tar.gz"
-MD5SUM="795982f9b0b45c7645f897ba2ead0024"
+DOWNLOAD="http://www.opensmtpd.org/archives/opensmtpd-5.4.1p1.tar.gz"
+MD5SUM="74551342985b78eb687995f7953d1790"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="%README%"
diff --git a/network/opensmtpd/rc.opensmtpd b/network/opensmtpd/rc.opensmtpd
index fd4f9956f3..cd0039fda2 100644
--- a/network/opensmtpd/rc.opensmtpd
+++ b/network/opensmtpd/rc.opensmtpd
@@ -4,7 +4,7 @@
smtpd_start() {
if [ -x /usr/sbin/smtpd ]; then
echo "Starting OpenSMTPD: /usr/sbin/smtpd"
- smtpd # not using full path to work around a logging bug for now
+ /usr/sbin/smtpd
fi
}
diff --git a/network/opensmtpd/slack-desc b/network/opensmtpd/slack-desc
index 437929ac5d..97fbfc526f 100644
--- a/network/opensmtpd/slack-desc
+++ b/network/opensmtpd/slack-desc
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-opensmtpd: opensmtpd (Open SMTPd)
+opensmtpd: opensmtpd (OpenSMTPd from the OpenBSD project)
opensmtpd:
opensmtpd: OpenSMTPD is a FREE implementation of the server-side SMTP protocol
opensmtpd: as defined by RFC 5321, with some additional standard extensions.