Update on installing qpsmtpd

Blog Topics:

[2008-11: New installation on 10.3/8.6.0]
[2007-04: Implementing SMTP Authorization with qpsmtpd running under SuSE 10.0 and Plesk 8.0
[2014-01: Here's an update to these instructions.]
[2018-09: Update #2 on Installing qpsmtpd on Xenial]

This is an update to my original instructions for installing qpsmtpd on a Linux system running under Plesk.

Just in case you don't have cc yet:

apt-get install build-essential

qpsmtpd is now on GitHub

qpsmtpd's README mentions installing the following "required Perl modules"

perl -MCPAN -e 'install Net::DNS'
perl -MCPAN -e 'install MIME::Base64'
perl -MCPAN -e 'install Mail::Header'

In addition the default plugins now also require

Read on first!!!


perl -MCPAN -e 'install Mail::SPF'

which won't install without the patch in https://rt.cpan.org/Public/Bug/Display.html?id=95901, and


apt-get install libcrypt-openssl-random-perl libcrypt-openssl-rsa-perl
apt-get install libssl-dev
perl -MCPAN -e 'install Crypt::OpenSSL::Random' # This will install CPAN if you haven't done that already!
perl -MCPAN -e 'install Crypt::OpenSSL::RSA'
perl -MCPAN -e 'install Geo::IP'
perl -MCPAN -e 'install Mail::DKIM'
apt-get install libxml2-dev
perl -MCPAN -e 'install XML::LibXML'
perl -MCPAN -e 'install Mail::DMARC' # This seems to install half of the world...
.

Then get GeoLiteCity.dat and GeoIPASNum.dat from http://dev.maxmind.com/geoip/legacy/install/city/ into usr/local/share/GeoIP/ and install

perl -MCPAN -e 'install Math::Complex'
.

The auth_imap plugin also requires Net::IMAP::Simple. Unfortunately, this was not straight-forward:

  1. http://ftp.nluug.nl/languages/perl/CPAN/ proved to be unreachable — I've added http://mirror.switch.ch/mirror/CPAN/ in front of it in .cpan/CPAN/MyConfig.pm.
  2. Do not take the version by CWEST — it's much older, even though it may have a higher version number!
  3. The installation is broken, probably due to a supposedly optional dependency which is not handled correctly. This means you have to go through the

    perl Makefile.PL
    make
    make test
    make install

    cycle for each of the Parse::RecDescent, Net::IMAP::Simple, and Net::IMAP::Simple::SSL components.

Running the watch and summarize utilities recommended in the FAQ requires yet another dependency:

perl -MCPAN -e 'install File::Tail'
.