Guide updated on 29th of February 2016

Debian packages install


Install Daemontools and ucspi-tcp

aptitude install ucspi-tcp daemontools daemontools-run

Install Courier packages

aptitude install courier-base courier-authdaemon courier-authlib courier-authlib-mysql courier-imap courier-imap-ssl courier-pop-ssl courier-pop courierpassd courier-maildrop gamin libgamin0

You should accept all the default answers

Install needed compiler, tools and library

aptitude install cpp g++ gcc make automake wget telnet libtool patch patchutils logrotate dh-make-perl libltdl7 libcdb1 sudo equivs expect openssl libssl-dev libgmp3-dev libgdbm-dev libpcre++-dev libpcre-ocaml libpcre-ocaml-dev makepasswd

For security reason, it's a good idea to remove the compilers (cpp, g++, gcc and make) after your complete this guide

Install MySQL database and libraries

aptitude install mysql-common mysql-server-5.5 mysql-client-5.5 mysql-server-core-5.5 libmysqlclient18 libmysqlclient-dev

Remember your root MySQL password (described as MySQL_root_password later in this guide)

Install Apache & PHP

aptitude install apache2 apache2-mpm-prefork php5 php5-common libapache2-mod-php5 php5-mysql php5-mcrypt php5-intl

Install antispam and antivirus

aptitude install spamassassin spamc pyzor razor clamav clamav-freshclam clamav-daemon clamav-docs

Install un-archiver tools

aptitude install arj unrar lhasa unzip bzip2 tar tnef

Install perl modules

aptitude install spf-tools-perl libmailtools-perl libnet-cidr-lite-perl libnet-daemon-perl libtest-distribution-perl libmail-spf-perl libperl-dev

aptitude install libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl perl-doc libgeo-ip-perl libdate-manip-perl libio-string-perl libio-socket-ssl-perl libnet-ident-perl libsys-syslog-perl libencode-detect-perl

aptitude install libnet-dns-perl libtimedate-perl libio-compress-perl libdigest-hmac-perl libdigest-sha-perl libparse-syslog-perl libmail-dkim-perl libcrypt-openssl-bignum-perl

Install debug / manipulation tools

Those last ones are not mandatory but are useful if you need to debug

aptitude install dnsutils whois findutils pciutils less net-tools tcpdump iptraf lsof dstat iotop htop mc locate

Download all the needed items for the Qmail installation


Users comments


Error connecting to Database!



Color Coded Qmail Installation Key
  Regular Black Text     Qmail installation notes and summaries by the author.
  Bold Black Text     Commands to be run by you, the installer.
  Bold/Regular Red Text    Vital and/or critical information.
  Regular Blue text     Denotes helpful tips and hints or hyperlinks.
  Regular Orange Text     Command line output.
  Bold/Regular green text     Denotes the contents of a file or script.