Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
virtualmailboxeswitheximanddovecot [2016/08/11 20:30] – [Set up virtual mailbox space and configuration] jim | virtualmailboxeswitheximanddovecot [2016/08/15 08:43] (current) – Give Exim read permission on vmail passwd jim |
---|
===== Set up virtual mailbox space and configuration ===== | ===== Set up virtual mailbox space and configuration ===== |
| |
First I created a system user and group ''vmail'' to own all virtual mailboxes. | First I created a user and group ''vmail'' to own all virtual mailboxes. I make the user a normal user because Dovecot will try to access all virtual mailboxes as that ''vmail'' user, and in Dovecot 2.x on Debian the config ''first_valid_uid'' is set to 500 to prevent attempts to access daemon mailboxes. |
| |
# adduser -system --home /var/local/vmail --group vmail | # adduser --home /var/local/vmail --group vmail |
| |
and a configuration directory. | and a configuration directory. |
</code> | </code> |
| |
The second, ''passwd'' contains the account information for the domain. There are two items on a line, username and password hash, separated by a colon. Generate the password has using the ''dovecotadm pw'' utility. Just to be on the safe side, we'll ensure the password file isn't world readable and is readable by Dovecot. | The second, ''passwd'' contains the account information for the domain. There are two items on a line, username and password hash, separated by a colon. Generate the password has using the ''dovecotadm pw'' utility. Just to be on the safe side, we'll ensure the password file isn't world readable and is readable by Dovecot and Exim. |
| |
<code> | <code> |
^D | ^D |
# chown dovecot:vmail /etc/vmail/example.mod/passwd | # chown dovecot:vmail /etc/vmail/example.mod/passwd |
| # adduser Debian-exim vmail |
# chmod 0660 /etc/vmail/example.mod/passwd | # chmod 0660 /etc/vmail/example.mod/passwd |
</code> | </code> |