summaryrefslogtreecommitdiffstats
path: root/network/opensmtpd/opensmtpd.SlackBuild
diff options
context:
space:
mode:
author Robby Workman <rworkman@slackbuilds.org>2013-12-11 11:29:49 +0100
committer Erik Hanson <erik@slackbuilds.org>2013-12-14 10:52:36 -0600
commitd91474d6154bbaf8222f3dc0b0eac93dc3b470ff (patch)
treeff58c192a93b77f3e258dc4407713ee5c7241620 /network/opensmtpd/opensmtpd.SlackBuild
parent1cf316049a3b52caa0b90d2732d0cae168513b90 (diff)
downloadslackbuilds-d91474d6154bbaf8222f3dc0b0eac93dc3b470ff.tar.gz
slackbuilds-d91474d6154bbaf8222f3dc0b0eac93dc3b470ff.tar.xz
network/opensmtpd: Updated for version 5.4.1p1.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/opensmtpd/opensmtpd.SlackBuild')
-rw-r--r--network/opensmtpd/opensmtpd.SlackBuild42
1 files changed, 19 insertions, 23 deletions
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