ubuntu:email:install_a_full_mail_server
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ubuntu:email:install_a_full_mail_server [2019/11/27 21:53] – created peter | ubuntu:email:install_a_full_mail_server [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Email - Install a full mail server ====== | + | ====== |
===== Requirements ===== | ===== Requirements ===== | ||
Line 8: | Line 8: | ||
* 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 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. | * DO NOT do mail-relaying. | ||
+ | |||
+ | ---- | ||
===== What is needed ===== | ===== What is needed ===== | ||
Line 20: | Line 22: | ||
The database server will be used to manage ALL logins and usernames/ | The database server will be used to manage ALL logins and usernames/ | ||
+ | ---- | ||
===== Installation ===== | ===== Installation ===== | ||
Line 39: | Line 42: | ||
* apt-get install roundcube-mysql | * apt-get install roundcube-mysql | ||
+ | |||
+ | ---- | ||
===== Setup: DNS ===== | ===== Setup: DNS ===== | ||
Line 44: | Line 49: | ||
You need an " | You need an " | ||
+ | ---- | ||
===== Setup: Web server ===== | ===== Setup: Web server ===== | ||
Line 51: | Line 57: | ||
Following the idea of http:// | Following the idea of http:// | ||
+ | |||
+ | ---- | ||
==== Create a web address for your webmail ==== | ==== Create a web address for your webmail ==== | ||
Line 72: | Line 80: | ||
Note: replace “[the domain name]” with the domain name, e.g. " | Note: replace “[the domain name]” with the domain name, e.g. " | ||
+ | ---- | ||
===== Setup: create databases ===== | ===== Setup: create databases ===== | ||
Line 82: | Line 91: | ||
…or use your preferred softare (e.g. phpMyAdmin). | …or use your preferred softare (e.g. phpMyAdmin). | ||
+ | |||
+ | ---- | ||
==== Create the database ==== | ==== Create the database ==== | ||
Line 135: | Line 146: | ||
); | ); | ||
</ | </ | ||
+ | |||
+ | ---- | ||
==== Create a database-account to access the database ==== | ==== Create a database-account to access the database ==== | ||
Line 146: | Line 159: | ||
Note: this account will ONLY be accessible by our software running on the server; you cannot access this account remotely (over the internet). | Note: this account will ONLY be accessible by our software running on the server; you cannot access this account remotely (over the internet). | ||
+ | ---- | ||
==== Create your first email account and domain ==== | ==== Create your first email account and domain ==== | ||
Line 156: | Line 170: | ||
Note: this password is used over the internet when you login to webmail – so pick a good one! This has to be secure! | Note: this password is used over the internet when you login to webmail – so pick a good one! This has to be secure! | ||
+ | |||
+ | ---- | ||
==== Create a redirector for an email address ==== | ==== Create a redirector for an email address ==== | ||
Line 165: | Line 181: | ||
Note: only set this up if you actually want a redirect. | Note: only set this up if you actually want a redirect. | ||
+ | ---- | ||
===== Setup: Configure Exim4 ===== | ===== Setup: Configure Exim4 ===== | ||
Line 174: | Line 191: | ||
</ | </ | ||
+ | ---- | ||
==== Debian: set the global / initial Exim config ==== | ==== Debian: set the global / initial Exim config ==== | ||
Line 218: | Line 236: | ||
Note: replace “[PUT YOUR SERVER’s IP ADDRESS HERE]” with e.g. “10.0.0.1” (whatever your public internet address is) | Note: replace “[PUT YOUR SERVER’s IP ADDRESS HERE]” with e.g. “10.0.0.1” (whatever your public internet address is) | ||
+ | ---- | ||
==== Setup Exim: Macros ==== | ==== Setup Exim: Macros ==== | ||
Line 245: | Line 264: | ||
Note: “hide mysql_servers” isn’t “hiding” anything – it’s an ESSENTIAL step! It actually means “use this database server”. Terrible config name :(. | Note: “hide mysql_servers” isn’t “hiding” anything – it’s an ESSENTIAL step! It actually means “use this database server”. Terrible config name :(. | ||
+ | ---- | ||
==== Setup Exim: Routers ==== | ==== Setup Exim: Routers ==== | ||
Line 332: | Line 352: | ||
| | ||
</ | </ | ||
- | + | ||
+ | ---- | ||
==== Setup exim: Transports ==== | ==== Setup exim: Transports ==== | ||
Line 361: | Line 382: | ||
</ | </ | ||
+ | ---- | ||
==== Setup exim: Auth ==== | ==== Setup exim: Auth ==== | ||
Line 396: | Line 418: | ||
</ | </ | ||
+ | ---- | ||
===== Setup: Configure Dovecot ===== | ===== Setup: Configure Dovecot ===== | ||
Line 406: | Line 429: | ||
Note: Dovecot installs with almost everything " | Note: Dovecot installs with almost everything " | ||
+ | |||
+ | ---- | ||
==== Dovecot: find your " | ==== Dovecot: find your " | ||
Line 425: | Line 450: | ||
the first 8 is your uid, the second 8 is your gid (could be different numbers on your server) | the first 8 is your uid, the second 8 is your gid (could be different numbers on your server) | ||
+ | ---- | ||
==== Dovecot: all config files ==== | ==== Dovecot: all config files ==== | ||
Line 462: | Line 487: | ||
Note: replace [YOUR UID] and [YOUR GID] with correct numbers (that you found out using cat / | Note: replace [YOUR UID] and [YOUR GID] with correct numbers (that you found out using cat / | ||
+ | ---- | ||
===== Setup: Configure Roundcube ===== | ===== Setup: Configure Roundcube ===== | ||
Line 476: | Line 501: | ||
In that file, there are instructions on how to make it automatically calculate the address using %n, %d, etc. If your MX records for your different domains follow the same pattern (e.g. they are all “mail.my-domain.com”), | In that file, there are instructions on how to make it automatically calculate the address using %n, %d, etc. If your MX records for your different domains follow the same pattern (e.g. they are all “mail.my-domain.com”), | ||
+ | ---- | ||
===== Restart EVERYTHING ===== | ===== Restart EVERYTHING ===== | ||
Line 492: | Line 518: | ||
Exim may output a " | Exim may output a " | ||
+ | ---- | ||
===== Debugging – making it work! ===== | ===== Debugging – making it work! ===== | ||
Line 571: | Line 598: | ||
After doing that, I found webmail go from “takes 5 seconds per click” to “most clicks have immediate effect” (on my fast broadband). | After doing that, I found webmail go from “takes 5 seconds per click” to “most clicks have immediate effect” (on my fast broadband). | ||
+ | ---- | ||
===== What you should do next… ===== | ===== What you should do next… ===== | ||
Line 584: | Line 612: | ||
…those should be easy to find separate guides for. Good luck. | …those should be easy to find separate guides for. Good luck. | ||
+ | ---- | ||
===== 2016 Update ===== | ===== 2016 Update ===== | ||
Line 593: | Line 622: | ||
- In the file / | - In the file / | ||
- / | - / | ||
+ | |||
+ | ---- | ||
===== Comments ===== | ===== Comments ===== | ||
Line 601: | Line 632: | ||
Option “CONCAT” unknown. Usually due to incorrect version of exim4. | Option “CONCAT” unknown. Usually due to incorrect version of exim4. | ||
+ | ---- | ||
===== References ===== | ===== References ===== | ||
Line 613: | Line 644: | ||
http:// | http:// | ||
+ |
ubuntu/email/install_a_full_mail_server.1574891591.txt.gz · Last modified: 2020/07/15 09:30 (external edit)