RaspberryPi – Email

Email Server

I have always used Citadel as my email server on the Raspberry Pi, and one of the great aspects is that is has just integrated with WordPress and the PHP mail function. (Sucurri Security could just email me all the alerts).

Unfortunately there is an issue that prevents Citadel from working on Debian Buster. The issue appears to be related to the Buster build, but I cannot confirm this, nor do I know whether it is a Debian build issue or Citadel issue, or a combination of both. However, as of October 2019, Citadel will not work on Debian Buster installations, and as I installed Buster on my Pi 4, I am unable to use Citadel on this server.

The simplest solution for me was to keep the Pi 3 running as my email server. This retained all the quintic.co.uk mail accounts, including, crucially support@quintic.co.uk.

However, this left the Pi4 without a MTA (Mail Transfer Agent), and so the PHP mail function no longer functioned. i.e. No e-mails from WordPress.


There are two pure MTAs that appear to have traction for the Raspberry Pi, Exin and SSMTP. I do not know which is considered the better MTA, but at the time of writing there was no package set for Buster on the Pi4 for Exim. So, for me, the choice was easy – SSMTP.

apt-get install ssmtp mailutils mpack
cd /etc/ssmtp
nano ssmtp.conf - include the following lines.
     mailhub=pi3  - My server running citadel
     AuthUser=<user for Citadel>
cd /etc/php/7.x/apache2
nano php.ini
     sendmailpath=/usr/sbin/ssmtp -t  -- Look for the line ;sendmail and replace.

The above worked nicely for me.