The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Mail Server"
(How to set up a simple, secure, lightweight email server using Postfix and Dovecot) |
|||
Line 1: | Line 1: | ||
Running one's own email server doesn't have to be mystical and impenetrable | Running one's own email server doesn't have to be mystical and impenetrable; using a simple MTA like Postfix along with an LDA like Dovecot makes the task relatively easy. Regrettably, good information on how to do this is hard to come by. What this guide will help you do is install a mail server which uses a database backend to manage domains and users, and features mail delivery via POP3 and/or IMAP. | ||
== Prerequisites == | |||
If you intend to run your own email server, you will need to have DNS with at least one MX record on a DNS server that can be seen by the Internet at large. Setting such a thing up is beyond the scope of this document. | |||
== Preparation == | |||
The following packages need to be installed first, before we can do anything: <code>mail-mta/postfix</code>, <code>net-mail/dovecot</code>, and <code>dev-db/mariadb</code>. Before we emerge these, however, we must ensure some USE flags are properly set first: | |||
{{file|name=/etc/portage/package.use/mail-server|desc=USE flags|body=mail-mta/postfix dovecot-sasl pam ssl | |||
net-mail/dovecot bzip2 maildir pam ssl zlib}} | |||
With USE flags properly set, we can emerge our packages: | |||
<console>###i## emerge -avq postfix mariadb</console> | |||
Setting the <code>dovecot-sasl</code> USE flag should pull in <code>net-mail/dovecot</code>. If it does not, emerge this way: | |||
<console>###i## emerge -avq postfix dovecot mariadb</console> | |||
== Configuration == | |||
Now we come to the meat of the project. First we will have to set up the mail user/domain database, then we will have to configure Postfix, then finally, configure Dovecot. At the end of this procedure, we should have a fully functioning mail server. | |||
=== Setting up the Database === | |||
=== Configuring Postfix === | |||
=== Configuring Dovecot === | |||
== Success! == |
Revision as of 22:17, December 13, 2016
Running one's own email server doesn't have to be mystical and impenetrable; using a simple MTA like Postfix along with an LDA like Dovecot makes the task relatively easy. Regrettably, good information on how to do this is hard to come by. What this guide will help you do is install a mail server which uses a database backend to manage domains and users, and features mail delivery via POP3 and/or IMAP.
Prerequisites
If you intend to run your own email server, you will need to have DNS with at least one MX record on a DNS server that can be seen by the Internet at large. Setting such a thing up is beyond the scope of this document.
Preparation
The following packages need to be installed first, before we can do anything: mail-mta/postfix
, net-mail/dovecot
, and dev-db/mariadb
. Before we emerge these, however, we must ensure some USE flags are properly set first:
/etc/portage/package.use/mail-server
- USE flagsmail-mta/postfix dovecot-sasl pam ssl
net-mail/dovecot bzip2 maildir pam ssl zlib
With USE flags properly set, we can emerge our packages:
root # emerge -avq postfix mariadb
Setting the dovecot-sasl
USE flag should pull in net-mail/dovecot
. If it does not, emerge this way:
root # emerge -avq postfix dovecot mariadb
Configuration
Now we come to the meat of the project. First we will have to set up the mail user/domain database, then we will have to configure Postfix, then finally, configure Dovecot. At the end of this procedure, we should have a fully functioning mail server.