Linux Mail Server: Exim4
Revision as of 20:07, 31 March 2017 by Rafahsolis (talk | contribs)
Whispers Mail Server
Stack
- Web server (Apache)
- Database server (MySQL)
- Email server (MTA) (Exim4)
- IMAP server (Dovecot)
- Webmail server (Roundcube)
Install
- apt-get install apache2-mpm-prefork
- (Some of these email servers require PHP; PHP is crappy and requires mpm-prefork (the ‘slow’ version of Apache))
- apt-get install mysql-client
- (should auto-install something like: mysql-common + mysql-client-5.5)
- apt-get install mysql-server
- (should auto-install something like: mysql-server-5.5 + mysql-server-core-5.5)
- apt-get install exim4
- apt-get install exim4-base
- apt-get install exim4-config
- apt-get install exim4-daemon-heavy
- (there’s an “exim4-mysql” that might be sufficient to replace this, but I gave up: there are way too many exim4 packages, and no help for installing the “correct” set, so … just pick this and get the lot!)
- apt-get install dovecot-core
- apt-get install dovecot-imapd
- apt-get install dovecot-mysql
- apt-get install roundcube
- apt-get install roundcube-core
- apt-get install roundcube-mysql
Setup
DNS
You should know about this already: you need an “MX” record on your DNS server, and it needs to point to your main server where you’ll run your email, web, etc.
Apache
/etc/apache2/sites-available/webmail.conf
<VirtualHost *:80>
ServerAdmin rafael@herrerosolis.com
Redirect permanent / https://webmail.herrerosolis.com/
# DocumentRoot /var/www/rafael
ServerName webmail.herrerosolis.com
ServerAlias webmail.herrerosolis.com
ErrorLog /var/log/apache2/webmail/error.log
# Posible values include: debug, info, notice, warn, error, crit.
# alert, emerg.
CustomLog /var/log/apache2/webmail/access.log combined
</virtualHost>
<VirtualHost *:443>
ServerAdmin rafael@herrerosolis.com
DocumentRoot /var/lib/roundcube
ServerName webmail.herrerosolis.com
ServerAlias webmail.herrerosolis.com
ErrorLog /var/log/apache2/webmail/error.log
# Posible values include: debug, info, notice, warn, error, crit.
# alert, emerg.
CustomLog /var/log/apache2/webmail/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/herrerosolis.crt
SSLCertificateKeyFile /etc/ssl/private/herrerosolis.key
</virtualHost>
http://bradthemad.org/tech/notes/exim_cheatsheet.php
STARTTLS
Troubleshooting
exim4 -bP | grep tls_
test with:
sudo apt-get install swaks swaks -a -tls -q HELO -s gollum.redactate.com -au test -ap '<>'
- Choose internet site
- Choose domain
Resources
http://t-machine.org/index.php/2014/06/27/webmail-on-your-debian-server-exim4-dovecot-roundcube/