Ubuntu by default comes with a neutered, useless version of the mail notifier. Luckily, Glyphobet posted the following script.
I found that the script would not run on my Ubuntu machine, so I went through it step by step manually (by entering line by line). This taught me that this script will only work if you have previously installed the package devscripts.
#!/bin/bash
# This script rebuilds the mail-notification package with
# –disable-ssl REMOVED so that mail-notification is ACTUALLY USEFUL.
if ls mail-notification* > /dev/null ; then
echo “This script will execute \`rm mail-notification*\` when it completes,”
echo “but there are mail-notification files in this directory already.”
echo “Please remove stale mail-notification package files and re-run this script.”
exit
fi
# Remember uninstalled build dependencies
BUILDDEPS=`apt-get build-dep mail-notification -s | grep “^ “`
# Get build dependencies
sudo apt-get -y build-dep mail-notification
# Get packages required to compile with SSL support
sudo aptitude install libssl-dev fakeroot
# Get package source
apt-get source mail-notification
# Get into the directory
cd mail-notification*/
# Remove STUPIDNESS
perl -i.bak -pe “s/ssl=no//” debian/rules
# Update the version so that the package manager doesn’t get its knickers in a twist
DEBEMAIL=”foo@bar.com” dch -i “removing line noise which prevented SSL support from being enabled.”
# Build package
dpkg-buildpackage -uc -us -rfakeroot
# Remove previously uninstalled build dependencies
sudo aptitude remove $BUILDDEPS
# Checking…
if ! ldd src/mail-notification | grep libssl ; then
echo “******** SOMETHING WENT WRONG! libssl support NOT ENABLED ********”
exit
fi
# Get out!
cd ..
# Install the living daylights out of the package
sudo dpkg -i mail-notification*.deb
# Clean up package rebuilding debris
rm -fr mail-notification*
Actually, after successfully compiling and installing it as outlined above, I found this: https://launchpad.net/~mail-notification-ssl/+archive/ppa
Maybe that way it would be even easier.