This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| virtualmailboxeswitheximanddovecot [2013/01/28 12:15] – Update to latest configuration in production. jim | virtualmailboxeswitheximanddovecot [2016/08/15 08:43] (current) – Give Exim read permission on vmail passwd jim | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| ===== Set up virtual mailbox space and configuration ===== | ===== Set up virtual mailbox space and configuration ===== | ||
| - | First I created a system  | + | First I created a user and group '' | 
| - |   # adduser  | + |   # adduser --home / | 
|    |    | ||
| and a configuration directory. | and a configuration directory. | ||
| Line 44: | Line 44: | ||
| </ | </ | ||
| - | The second, '' | + | The second, '' | 
| < | < | ||
| - | # / | + | # doveadm pw -s SHA256-CRYPT  | 
| - | {CRAM-MD5}9186d855e11eba527a7a52ca82b313e180d62234f0acc9051b527243d41e2740 | + | {SHA256-CRYPT}$5$TQGxffy9XCxe53vu$L2NWgKJ47w3PoAIj3/ | 
| # cat > / | # cat > / | ||
| - | tommy.atkins: | + | tommy.atkins: | 
| ^D | ^D | ||
| - | # chown vmail:Debian-exim  | + | # chown dovecot:vmail / | 
| - | # chmod 0640 / | + | # adduser Debian-exim vmail | 
| + | # chmod 0660 / | ||
| </ | </ | ||
| Line 163: | Line 164: | ||
| Now we need to modify the Dovecot setup to allow our user to read mail. | Now we need to modify the Dovecot setup to allow our user to read mail. | ||
| + | |||
| + | ==== Dovecot 1.x ==== | ||
| I'm assuming your '' | I'm assuming your '' | ||
| Line 207: | Line 210: | ||
|    |    | ||
| to your '' | to your '' | ||
| + | |||
| + | ==== Dovecot 2.x with Debian conf.d configuration ==== | ||
| + | |||
| + | Again, I'm assuming that '' | ||
| + | |||
| + |   mail_location = maildir: | ||
| + | |||
| + | in it, telling Dovecot to find your regular users mail in '' | ||
| + | |||
| + | I first added a new auth configuration file, '' | ||
| + | |||
| + | # Virtual mailbox passwords. | ||
| + | passdb { | ||
| + | driver = passwd-file | ||
| + |     args = username_format=%n / | ||
| + | } | ||
| + |    | ||
| + | # VMail static settings. | ||
| + | userdb { | ||
| + | driver = static | ||
| + |     args = uid=vmail gid=vmail home=/ | ||
| + | } | ||
| + | |||
| + | This gives Dovecot the essential password and user info settings. | ||
| + | |||
| + | I then modified '' | ||
| + | |||
| + | !include auth-vmail.conf.ext | ||
| + | |||
| + | To debug authentication problems, enable '' | ||
| ===== Letting your virtual users send mail ===== | ===== Letting your virtual users send mail ===== | ||
| Line 213: | Line 246: | ||
| There' | There' | ||
| + | |||
| + | ==== Dovecot 1.x ==== | ||
| I needed to create the Dovecot authenticator socket by adding | I needed to create the Dovecot authenticator socket by adding | ||
| Line 230: | Line 265: | ||
| section in '' | section in '' | ||
| - | Then, in the Exim configuration,  | + | Then, in the Exim configuration,  | 
| < | < | ||
| Line 248: | Line 283: | ||
| server_mail_auth_condition = false | server_mail_auth_condition = false | ||
| </ | </ | ||
| + | |||
| + | ==== Dovecot 2.x ==== | ||
| + | |||
| + | In '' | ||
| + | |||
| + | < | ||
| + | unix_listener auth-client { | ||
| + | mode = 0660 | ||
| + | group = Debian-exim | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Then add '' | ||