The solution was to install postfix (the default MTA in Ubuntu), e.g. sudo apt-get install postfix. The installer gives you various options: choose satellite installation and then give your ISP's smtp server as the relayhost.
If, like me, your chosen smtp server requires authentication (i.e. you have to log in) then there are a few additional steps:
- Add the following lines to /etc/postifix/main.cf:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/smtp-passwd
# The following line should be blank after "=" to allow plaintext passwords
smtp_sasl_security_options = - Check, in the same file, that the relayhost line is now pointing to your isp mail server:
relayhost = myserver.isp.com - Create a file (e.g. /etc/postfix/sasl/smtp-passwd) containing the user and password like the following:
myserver.isp.com username:passwd - Turn this text file into a binary db file with:
sudo postmap hash:/etc/postfix/sasl/smtp-passwd
Then restart postfix with:/etc/init.d/postfix restart
See this page by David Grant for another view on similar set-up, and reasons why he doesn't like sSMTP.