# This nail HOWTO is not expected to have any further updates
# nail will not compile with OpenSSL 3.0.x, use S-nail/S-mailx instead
# Prerequisites:
# csh (optional; Slackware includes a 'tcsh' package)
# util-linux's pg and more
# vi: vim or elvis
# sendmail
# libiconv
# Get the tarball
cd
test -f installed/nail-11.25.tar.bz2 && mv installed/nail-11.25.tar.bz2 .
test ! -f nail-11.25.tar.bz2 &&
wget https://download.sf.net/nail/nail-11.25.tar.bz2
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "nail-*" -exec rm -r {} \;
tar xjvf ~/nail-11.25.tar.bz2
cd nail-11.25
test $UID = 0 && chown -R root:root .
# Build it
make PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail \
UCBINSTALL=/usr/bin/install
# Become root to install it
su
# Remove the mailx and nail packages, if there are any
test -x /sbin/removepkg && /sbin/removepkg mailx nail
# Back up your nailrc
test -f /etc/nail.rc &&
( mkdir -p -m 0700 ~/backup ; cp /etc/nail.rc ~/backup/ )
# If you don't already have a symlink /usr/lib/sendmail, create one
test ! -x /usr/lib/sendmail && test -x /usr/sbin/sendmail &&
ln -sf /usr/sbin/sendmail /usr/lib/sendmail
# Install nail
make install PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail \
UCBINSTALL=/usr/bin/install
# Create typical symbolic links to historical names and the man page
ln -sf /usr/bin/nail /bin/Mail
ln -sf /usr/bin/nail /bin/mail
ln -sf /usr/bin/nail /bin/mailx
ln -sf /usr/man/man1/nail.1 /usr/man/man1/mail.1
# 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:
# cp nail.rc /etc/
# Become yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/nail-*.tar.*
mv nail-11.25.tar.bz2 installed/
# If you ever want to uninstall nail, this should do it:
cd
su
rm -f /etc/nail.rc /usr/bin/nail /usr/man/man1/nail.1
# Look for broken symlinks in /usr/bin and /bin
exit
find ~/src -maxdepth 1 -type d -name "nail-*" -exec rm -r {} \;
rm -f ~/installed/nail-*.tar.*