# If you ever want to uninstall Fetchmail, or clean up files from an old
# version before installing a new one, skip down to the bottom for
# instructions.
# If you have a Fetchmail that was installed into /usr/local, cd into it's
# source and run 'make uninstall' (as root) before proceeding here. If you
# don't have the source, this should clear out the old one:
su
rm -f /usr/local/bin/fetchmail /usr/local/bin/fetchmailconf \
/usr/local/man/man1/fetchmail.1 /usr/local/man/man1/fetchmailconf.1
find /usr/share/locale -type f -name "fetchmail.mo" -exec rm -r {} \;
exit
# Get the tarball
cd
test -f installed/fetchmail-6.4.37.tar.xz &&
mv installed/fetchmail-6.4.37.tar.xz .
test ! -f fetchmail-6.4.37.tar.xz &&
wget http://downloads.sf.net/fetchmail/fetchmail-6.4.37.tar.xz
# Verify tarball w/ sha256sum:
# (this came from the e-mail announcement and my gpg-verified tarball)
echo "4a182e5d893e9abe6ac37ae71e542651fce6d606234fc735c2aaae18657e69\
ea fetchmail-6.4.37.tar.xz" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "fetchmail-*" -exec rm -r {} \;
tar xJvf ~/fetchmail-6.4.37.tar.xz
cd fetchmail-6.4.37
test $UID = 0 && chown -R root:root .
# If upgrading read NEWS
# Either way, read README and INSTALL
# I only read/write English (well), if that is not the case for you, leave
# off --disable-nls
# I don't use ETRN or ODMR with Fetchmail, if you do, leave off those
# disable configuration options. See './configure --help' for others.
# If you use 64-bit OpenSSL from source that is entirely installed under
# /usr/local/ssl (no longer the default), you will probably need to use
# LDFLAGS=-L/usr/local/ssl/lib64
# at the beginning of your configure line
# If you're currently running the fetchmail daemon, shut it down here
# or restart it below
test -x /usr/bin/fetchmail && /usr/bin/fetchmail -q
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg fetchmail
# If you already have fetchmail installed and have this old man page, zap it
# Run 'whereis fetchmail' or even 'locate fetchmail' to see if any others than
# /usr/man/man1/fetchmail.1 appear
rm -f /var/man/cat1/fetchmail.1.xz
# Install it
# (you can 'make install-strip' too)
make install
# If you you have a previously installed from source Fetchmail daemon
# running, restart it
test -n $(pidof -s fetchmail) &&
( /usr/bin/fetchmail -q ; sleep 1 ; /usr/bin/fetchmail )
# If you have 'sslproto tls1' in your config file with OpenSSL >= 3.0
# change that to tls1.2 or tls1.3
# Install docs under /usr/doc, after removing old ones
find /usr/doc -maxdepth 1 -type d -name "fetchmail-*" -exec rm -r {} \;
mkdir -p /usr/doc/fetchmail-6.4.37
cp -pr ./contrib/ ./ABOUT-NLS COPYING Doxyfile FAQ FEATURES INSTALL NEWS \
NOTES OLDNEWS README* TODO *.html /usr/doc/fetchmail-6.4.37/
chown -R root:root /usr/doc/fetchmail-6.4.37
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/fetchmail-*.tar.*
mv fetchmail-6.4.37.tar.xz installed/
# If you ever want to uninstall Fetchmail, this should do it:
cd
su
test -d src/fetchmail-* && ( cd src/fetchmail-* ; make uninstall )
for pfx in /usr /usr/local;
do
( cd ${pfx}/bin ; rm -f fetchmail fetchmailconf )
( cd ${pfx}/man/man1 ; rm -f fetchmail.1 fetchmailconf.1 )
( cd ${pfx}/share/man/man1 ; rm -f fetchmail.1 fetchmailconf.1 )
rm -f ${pfx}/lib/python*/site-packages/fetchmailconf.*
test -d ${pfx}/lib64 &&
rm -f ${pfx}/lib64/python*/site-packages/fetchmailconf.*
find ${pfx}/doc -maxdepth 1 -type d -name "fetchmail-*" -exec rm -r {} \;
find ${pfx}/share/locale -type f -name "fetchmail.mo" -exec rm {} \;
done
exit
find ~/src -maxdepth 1 -type d -name "fetchmail-*" -exec rm -r {} \;
rm -f ~/installed/fetchmail-*.tar.*