Blue Flower

Qmail 2.0 will give you the best possible installation for a secure Mail Transfer Agent. This guide will provide the following services

POP3D-SSL (Port 995)
SMTP-SSL (Port 465)
SMTP-TLS (Port 587)
SMTP (Incoming only Port 25)
Secure Webmail running on Apache 2.4 and Roundcube for Webmail

There are two requirements for this guide:

At 23:59 UTC, December 31, 2016, FreeBSD 9.3, 10.1 and 10.2 will reach
end-of-life and will no longer be supported by the FreeBSD Security Officers
Team.  Users of FreeBSD 9.3, 10.1 and 10.2 are strongly encouraged to
upgrade to a newer release as soon as possible.

The guide supports 10.3 and 11.0

You will need to make sure your ports system is up-to-date.

If you are using IPv4 and not IPv6 you can disable the IPv6 checkmark from any port by running the following command:

# echo 'OPTIONS_UNSET=IPV6' >> /etc/make.conf

The following ports will need to be installed:

Curl - /usr/ports/ftp/curl
Perl 5.24 - /usr/ports/lang/perl5.24
Bash Shell - /usr/ports/shells/bash
Gmake – /usr/ports/devel/gmake
Unzip - /usr/ports/archivers/unzip
Wget - /usr/ports/ftp/wget
Bind Tools - /usr/ports/dns/bind-tools/

The following ports will need to be installed if you want to enable webmail on your server:

Apache 2.4 or better with SSL (SSL is HIGHLY recommended)
Mysql Server 5.6 or Higher

If you would like to create a queuing server please check out the following link:

A few of John Simpson's scripts use a link to perl which doesn't exist on FreeBSD so we need to create a symlink to it as follows:

# cd /usr/bin
# mv perl bak_perl
# ln -s /usr/local/bin/perl perl