[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/15 08:37 (UTC)] – 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 | + | ====== Installing The Dovecot MDA ====== |
- | <note important> | + | This page is supplemental to main article: [[howtos: |
+ | |||
+ | Dovecot | ||
+ | |||
+ | As with postfix, we will build and install our dovecot package using the current build script from [[http:// | ||
+ | |||
+ | We will assume that you are familiar with SlackBuilds and will provide only the essential steps for building dovecot here. For more detailed information please visit the [[http:// | ||
+ | |||
+ | Our dovecot build requires no special parameters. The essential steps for building dovecot are (as root): | ||
+ | < | ||
+ | cd /tmp | ||
+ | wget http:// | ||
+ | tar -xvzf dovecot.tar.gz | ||
+ | cd dovecot | ||
+ | cat dovecot.info | ||
+ | ... | ||
+ | DOWNLOAD=" | ||
+ | MD5SUM=" | ||
+ | ... | ||
+ | |||
+ | # Fetch archive from URL in DOWNLOAD line # | ||
+ | wget http:// | ||
+ | |||
+ | # Verify integrity of archive - compare to MD5SUM line # | ||
+ | md5sum dovecot-2.2.13.tar.gz | ||
+ | a3eb1c0b1822c4f2b0fe9247776baa71 | ||
+ | |||
+ | # Build package # | ||
+ | chmod +x dovecot.SlackBuild | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | The resulting package will be found in / | ||
+ | |||
+ | Copy the package file to the target platform if necessary and install: | ||
+ | < | ||
+ | |||
+ | ====== Configuring The Dovecot MDA ====== | ||
+ | |||
+ | You should become familiar with the [[http:// | ||
+ | |||
+ | <note important> | ||
The dovecot package will create a mostly empty configuration directory at / | The dovecot package will create a mostly empty configuration directory at / | ||
Line 9: | Line 50: | ||
/ | / | ||
- | So we will create the necessary structure and copy the necessary example config files to the working location. | + | So we will create the necessary |
< | < | ||
Line 24: | 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 / | ||
- | ... uncomment | + | # Uncomment |
protocols = imap pop3 lmtp | protocols = imap pop3 lmtp | ||
- | ... set postmaster_address to your admin address | + | |
+ | # Set postmaster_address to your admin address | ||
postmaster_address = me@my-domain.com | postmaster_address = me@my-domain.com | ||
- | ... Add following line commented, uncomment to see SSL errors | + | |
+ | # Add following line commented, uncomment to troubleshoot | ||
# | # | ||
</ | </ | ||
- | 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 98: | Line 144: | ||
... | ... | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
service auth { | service auth { | ||
unix_listener / | unix_listener / | ||
Line 111: | Line 158: | ||
user = dovecot | user = dovecot | ||
} | } | ||
- | ... find the " | + | |
+ | # Find the " | ||
service auth-worker { | service auth-worker { | ||
user = vmail | user = vmail | ||
Line 117: | 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 131: | 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 143: | 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 149: | Line 200: | ||
chmod -R o-rwx / | chmod -R o-rwx / | ||
</ | </ | ||
+ | |||
[[howtos: | [[howtos: | ||
+ | ====== Sources ====== | ||
+ | * Based primarily on [[http:// | ||
+ | * Originally written by [[wiki: | ||
{{tag> | {{tag> |