Linux HOWTOs

About | Home | Search


HOWTO: nail
Description: Replacement for BSD mailx
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# nail 11.25
# ==========
# As of March 2006, nail has been integrated into the Heirloom project as
# mailx.  I have a separate howto for it.

# Slackware 9.0's 'nail' package includes version 10.4, 9.1's includes 10.5,
# 10.0's includes 10.7, 10.1's includes 11.20, and 10.2's includes 11.24

# Prerequisites:
# csh (optional; Slackware includes a 'tcsh' package)
# util-linux's pg and more
# vi: vim or elvis
# sendmail
# libiconv

cd
test -f installed/nail-11.25.tar.bz2 && mv installed/nail-11.25.tar.bz2 .
test ! -f nail-11.25.tar.bz2 &&
 wget http://download.sf.net/nail/nail-11.25.tar.bz2
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 .
make PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail \
 UCBINSTALL=/usr/bin/install

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg mailx nail
test -f /etc/nail.rc &&
 ( mkdir -p -m 0700 ~/backup ; cp /etc/nail.rc ~/backup/ )
test ! -x /usr/lib/sendmail && test -x /usr/sbin/sendmail &&
 ln -sf /usr/sbin/sendmail /usr/lib/sendmail
make install PREFIX=/usr MANDIR=/usr/man MAILSPOOL=/var/spool/mail \
 UCBINSTALL=/usr/bin/install
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

cd
mkdir -p -m 0700 installed
rm -f installed/nail-*.tar.*
mv nail-11.25.tar.bz2 installed/

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>