User Tools

Site Tools


email:install_a_full_mail_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
email:install_a_full_mail_server [2016/11/11 16:33] peteremail:install_a_full_mail_server [2019/11/27 21:53] (current) – removed peter
Line 1: Line 1:
-====== Email - Install a full mail server ====== 
  
-===== Requirements ===== 
- 
-  * Multiple domains using this for email (e.g. @company.com, @othercompany.com, @company-other-spelling.org). 
-  * Webmail on your server (for anyone in the org to access email). 
-  * Aliases / redirects for some email addresses (e.g. so you can redirect "support@" to a particular person). 
-  * DO NOT create "linux users" for every email user – it’s a huge security hole, and a massive pain in the ass for the sysadmin. 
-  * DO NOT do mail-relaying. 
- 
-===== What is needed ===== 
- 
-  * Web server [Nginx] 
-  * Database server (MySQL) 
-  * Email server (MTA) (Exim4) 
-  * IMAP server (Dovecot) 
-  * Webmail server (Roundcube) 
- 
- 
-The database server will be used to manage ALL logins and usernames/passwords. 
- 
- 
-===== Installation ===== 
- 
-You need to install ALL of: 
- 
-  * 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 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. 
- 
- 
-===== Setup: Web server ===== 
- 
-Roundcube sets up an over-the-top config: it creates an email server on every single website hosted on your server, and makes them all available at once. 
- 
-Following the idea of http://www.cpierce.org/2012/04/roundcube-for-your-debian-squeeze-mail-server/, I used a much simpler, easier-to-maintain, and easier-to-secure setup. This is documented in the Debian package docs too. 
- 
- 
-==== Create a web address for your webmail ==== 
- 
-If you have multiple websites hosted on your server, you SHOULD have a separate file for each inside /etc/apache2/sites-available. e.g.: 
- 
-  * /etc/apache2/sites-available/domain1.com 
-  * /etc/apache2/sites-available/other-domain.com 
-  * /etc/apache2/sites-available/my-friends-domain.org 
- 
-For each domain that you want to give webmail to, edit the file and ADD the following: 
- 
- 
-<file apache> 
-<VirtualHost *:80> 
-  ServerName webmail.[the domain name] 
-  DocumentRoot /var/lib/roundcube 
-</VirtualHost> 
-</file> 
- 
-Note: replace “[the domain name]” with the domain name, e.g. "domain1.com" 
- 
- 
- 
-===== References ===== 
- 
- 
-http://t-machine.org/index.php/2014/06/27/webmail-on-your-debian-server-exim4-dovecot-roundcube/ 
- 
-https://weijl.org/virtual-domains-with-exim4-dovecot-dspam-and-mysql/ 
- 
-http://www1.alx.pl/w/linux/exim-sql.conf 
- 
-http://alex.mamchenkov.net/2010/06/24/exim-dovecot-and-mysql/ 
email/install_a_full_mail_server.1478882024.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki