I'v changed the 'auth_user' to 'dovecot' and it have a uid/gid lower then 100. Does the the virtualmail user need to have a shell account ? Do I have to change the last_valid_uid/gid to the dovecot user or leave them on the virtualmail user ? Are there some settings in the dovecot.conf file that I need to check that they will not be there ?
The plan is to use Dovecot with pam&mysql. (Expect quextions soon).
On Tue, 28 Dec 2004 12:38:16 -0500, Peter Lacey placey@wanderingbarque.com wrote:
OK, I'v set all the directory tree from the main maildir (/var/local/virtualdir/) to the virtualmail user using chmod -R virtualmail.virtualmail /var/local/virtualdir
And correct me if I'm wrong, The auth_user is still "auth_user = root" and I need to have the "default_mail_env" set as default_mail_env = maildir:/var/local/virtualdir/%d/%n . But I also need to set: first_valid_uid = 100 last_valid_uid = 100 first_valid_gid = 101 last_valid_gid = 101 which are the uid and gid for the user virtualmail
The auth_user should _not_ be root. It should be set to a less privileged user, such as "dovecot." This user should not have a shell account. The dovecot user should have been created for you by the post-compilation install script (make install) or by the package installation. If it's not there, something like this should work on RedHat like systems:
/usr/sbin/groupadd -g [some unused group id less than 100] -r dovecot /usr/sbin/useradd -d /var/run/dovecot -s /bin/false -g dovecot -M -r -u [some user id less that 100] dovecot
The rest of your settings look good.
If you are looking for information on how to set up Dovecot with LDAP and virtual users, I'll point you at my own HOWTO on the subject: http://www.wanderingbarque.com/mailserver.html
- Pete