I'm not sure what the best way to expunge Courier + Maildrop might be, or if leaving both installed will cause problems while installing Dovecot + Sieve, but this is my personal recipe for mail on Debian (including Ubuntu):
# apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d
and ensure that the services section of the file has the same lines as below un-commented; this enables email users to send and receive email over SSL:
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
smtp inet n - - - - smtpd
submission inet n - - - - smtpd
# -o smtpd_tls_security_level=encrypt
smtps inet n - - - - smtpd
Clients who wish to use STARTTLS should use the standard ports for POP3 (110), IMAP (143), and SMTP (25). Clients who wish to use SSL/TLS should use port 995 for POP3, port 993 for IMAP, and port 465 for SMTP.
# /etc/init.d/postfix restart
: The postfix config file can be found at /etc/postfix/main.cf
and the master postfix config file can be found at /etc/postfix/master.cf
. Note also that postfix may be reconfigured at any time with
# dpkg-reconfigure postfix
: Ensure that /etc/mailname
contains the correct hostname whenever postfix is reconfigured.)
Install Amavisd-new, SpamAssassin, and Clamav:
# apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
The following messages of interest may be included in the output:
Setting up clamav-daemon (0.96.3+dfsg-2ubuntu1.0.10.04.1) ...
* Clamav signatures not found in /var/lib/clamav
* Please retrieve them using freshclam or install the clamav-data package
* Then run '/etc/init.d/clamav-daemon start'
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
Despite the SpamAssasin message, the configuration file at /etc/default/spamassassin
may contain ENABLED=1; ensure that this is the case. Note also that the amavis configuration file may be found at /etc/amavis/conf.d/50-user
and the amavis log file may be found at /var/log/amavis.log
ISPConfig should be reconfigured at this point
. Accept all of the defaults during installation. The reconfiguration process may undo some of the above changes, so it is important to double-check the above steps after reconfiguring ISPConfig. To reconfigure:
Don't forget to log into ISPConfig and change the Mail service settings to Dovecot + Sieve.
Those are the basics!