# The S-nail Git repository is password protected, see the homepage for username and
# password, or view a mirror of it here:
# https://github.com/sdaoden/s-mailx
# This mailx HOWTO will most likely no longer get any updates
# If you want to try mailx 12.5, try the read-only CVS repository while
# it's still there, or get a tarball from one of these places:
# Slackware 14.2 source (HTTP)
# Slackware 14.2 source (FTP)
# Debian
# ===
# If you ever want to remove mailx, or clean up an old version before
# installing a new one, skip down to the bottom for instructions
# Get it
cd
test -f installed/mailx-12.4.tar.bz2 && mv installed/mailx-12.4.tar.bz2 .
test ! -f mailx-12.4.tar.bz2 &&
wget https://downloads.sf.net/heirloom/mailx-12.4.tar.bz2
# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "nail-*" -exec rm -r {} \;
tar xjvf ~/mailx-12.4.tar.bz2
cd mailx-12.4
test $UID = 0 && chown -R root:root .
# If you have OpenSSL 1.x.x installed, this patch may be required to get
# it to build:
wget -nc http://www.linuxfromscratch.org/patches/blfs/7.5/\
mailx-12.4-openssl_1.0.0_build_fix-1.patch
patch -p1 < mailx-12.4-openssl_1.0.0_build_fix-1.patch
## Compile it
# If your OpenSSL is from a Slackware package, or if you installed
# it under the /usr prefix instead of the usual source-installed
# /usr/local/ssl prefix, the CPPFLAGS and LDFLAGS parts below are
# not necessary
make PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail \
CPPFLAGS=-I/usr/local/ssl/include LDFLAGS=-L/usr/local/ssl/lib
# Become root to install it
su
# Back up your existing nail.rc file, if you have one
test -f /etc/nail.rc &&
( mkdir -p -m 0700 ~/backup
cp -a /etc/nail.rc ~/backup/nail.rc-$(date +%Y%m%d) )
# Remove the Slackware package(s), commonly used symlinks
test -x /sbin/removepkg && /sbin/removepkg mailx nail
( cd /bin ; rm -f Mail mail mailx nail )
( cd /usr/bin ; rm -f Mail mail mailx nail )
# Make sure /usr/lib/sendmail (usually a symlink) exists
test ! -L /usr/lib/sendmail &&
( test -x /usr/sbin/sendmail &&
ln -sf /usr/sbin/sendmail /usr/lib/sendmail )
# Install mailx
make install PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail \
UCBINSTALL=/usr/bin/install
# If you upgraded from an older version of nail, you may want to view (and
# merge) the differences between your old /etc/nail.rc and the one that
# comes with nail:
# diff -u /etc/nail.rc nail.rc | less
#
# and if you didn't customize your /etc/nail.rc, you might as well just copy
# the sample over your old one:
# diff -q /etc/nail.rc nail.rc || cp nail.rc /etc/
# If you ever want to uninstall mailx, though I can't imagine why
# you'd want to, this should do it:
su
rm -f /etc/nail.rc /usr/local/etc/nail.rc
for bindir in /bin /usr/bin /usr/local/bin;
do
( cd $bindir
rm -f mailx nail
test -L Mail && rm -f Mail
test -L mail && rm -f mail )
done
for mandir in /usr/man/man1 /usr/share/man/man1;
do
( cd $mandir
rm -f mailx.1 nail.1
test -L Mail.1 && rm Mail.1 )
test -L mail.1 && rm mail.1 )
done
exit
find ~/src -maxdepth 1 -type d -name "mailx-*" -exec rm -r {} \;
find ~/src -maxdepth 1 -type d -name "nail-*" -exec rm -r {} \;
rm -f ~/installed/mailx-*.tar.* ~/installed/nail-*.tar.*