[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:network_services:postfix_dovecot_mysql:dovecot [2015/02/16 06:05 (UTC)] – intermediate save astrogeek | howtos:network_services:postfix_dovecot_mysql:dovecot [2015/04/01 21:22 (UTC)] (current) – Fix Dovecot connection string. denydias | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Installing The Dovecot MDA ====== | ||
- | ===== Installing The Dovecot MDA ===== | + | This page is supplemental to main article: [[howtos: |
- | <note important> | + | |
Dovecot is a popular and secure mail delivery agent, or MDA, which can be configured to work alongside the postfix MTA. | Dovecot is a popular and secure mail delivery agent, or MDA, which can be configured to work alongside the postfix MTA. | ||
Line 38: | Line 38: | ||
< | < | ||
- | ===== Configuring The Dovecot MDA ===== | + | ====== Configuring The Dovecot MDA ====== |
You should become familiar with the [[http:// | You should become familiar with the [[http:// | ||
Line 65: | Line 65: | ||
We will work from top to bottom of the copied file list to perform configuration. | We will work from top to bottom of the copied file list to perform configuration. | ||
- | Open the file, / | + | Open the file, / |
< | < | ||
vi / | vi / | ||
Line 78: | Line 78: | ||
</ | </ | ||
- | Next, configure the database access and password query parameters | + | Next, configure the database access |
< | < | ||
vi / | vi / | ||
- | ... uncomment | + | # Uncomment |
driver = mysql | driver = mysql | ||
- | connect = host=localhost dbname=mailserver user=mailuser | + | connect = "host=localhost dbname=mailserver user=mailuser |
default_pass_scheme = SHA512-CRYPT | default_pass_scheme = SHA512-CRYPT | ||
password_query = SELECT email as user, password FROM virtual_users WHERE email=' | password_query = SELECT email as user, password FROM virtual_users WHERE email=' | ||
</ | </ | ||
- | Next, configure dovecot authentication methods: | + | Next, we configure |
< | < | ||
vi / | vi / | ||
- | ... uncomment | + | # Uncomment |
disable_plaintext_auth = yes | disable_plaintext_auth = yes | ||
- | ... add " | + | |
+ | # Plain is inside SSL, add " | ||
auth_mechanisms = plain login | auth_mechanisms = plain login | ||
- | ... comment | + | |
+ | # Comment | ||
#!include auth-system.conf.ext | #!include auth-system.conf.ext | ||
- | ... uncomment | + | |
+ | # Uncomment | ||
!include auth-sql.conf.ext | !include auth-sql.conf.ext | ||
</ | </ | ||
- | Next, set the filesystem | + | Set the filesystem |
< | < | ||
- | vi / | + | vi / |
- | ... uncomment | + | |
- | mail_location =maildir:/ | + | # Uncomment |
- | ... uncomment and set the mail_priviledged_group ... | + | mail_location = maildir:/ |
- | mail_privileged_group = mail | + | |
</ | </ | ||
- | Now we set the configuration for the dovecot master process: | + | Set the configuration for the dovecot master process: |
< | < | ||
vi / | vi / | ||
- | ... find the " | + | |
+ | # Find the " | ||
service imap-login { | service imap-login { | ||
| | ||
- | #port = 143 | ||
port = 0 | port = 0 | ||
} | } | ||
... | ... | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
service pop3-login { | service pop3-login { | ||
inet_listener pop3 { | inet_listener pop3 { | ||
- | #port = 110 | ||
port = 0 | port = 0 | ||
} | } | ||
... | ... | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
service lmtp { | service lmtp { | ||
unix_listener / | unix_listener / | ||
Line 141: | Line 144: | ||
... | ... | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
service auth { | service auth { | ||
unix_listener / | unix_listener / | ||
Line 154: | Line 158: | ||
user = dovecot | user = dovecot | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
service auth-worker { | service auth-worker { | ||
user = vmail | user = vmail | ||
Line 160: | Line 165: | ||
</ | </ | ||
- | Next we set up the SSL configuration | + | Next we set up the SSL configuration |
< | < | ||
vi / | vi / | ||
- | ... uncomment | + | |
+ | # Uncomment | ||
ssl = required | ssl = required | ||
ssl_cert = </ | ssl_cert = </ | ||
Line 174: | Line 180: | ||
< | < | ||
vi / | vi / | ||
- | ... find the " | + | |
+ | # Find the " | ||
passdb { | passdb { | ||
driver = sql | driver = sql | ||
args = / | args = / | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
userdb { | userdb { | ||
driver = static | driver = static | ||
Line 186: | Line 194: | ||
</ | </ | ||
- | Now we want to further secure the installation by making all dovecot configutation files owned by vmail and accessible by the dovecot group, | + | Now we want to further secure the installation by making all dovecot configutation files owned by the non--privledged |
< | < | ||
Line 192: | Line 200: | ||
chmod -R o-rwx / | chmod -R o-rwx / | ||
</ | </ | ||
+ | |||
[[howtos: | [[howtos: | ||
+ | ====== Sources ====== | ||
+ | * Based primarily on [[http:// | ||
+ | * Originally written by [[wiki: | ||
{{tag> | {{tag> |