[Dovecot] mail accounts for users without home dirs

Alex Howansky alex at wankwood.com
Thu Aug 28 03:34:26 EEST 2003


> > I use dovecot on a machine where users without an existing home directory (Not
> > my idea...) need to access their mailboxes. Unfortunately dovecot tries to
> > chdir to the users home directory before allowing IMAP access - is there
> > anything I can do about that besides creating a dummy-homedirectory for these
> > users?
>
> I have a similar set up; none of the mail accounts correspond to an
> account in my passwd file. I have a postoffice account in the passwd file
> that owns the /var/mail directories where mail is stored. I use LDAP to
> assign each user the UID number for the postoffice account so that
> Dovecot's imap process can work with their mail. The postoffice home
> directory receives the raw log entries, and the account runs some
> related cron jobs that help manage the mail. So basically, I have one
> Unix account and home directory to handle all mail users. If you don't
> want to deal with LDAP, you should be able to do something similar with
> PgSQL, or perhaps one of the other supported user databases. The key is
> always passing the postoffice UID number to Dovecot, regardless of the
> user.

You can accomplish this with the static userdb:

auth_userdb = static uid=210 gid=210 home=/var/mail/%d/%n

...or something to that effect.

-- 
Alex Howansky
Wankwood Associates
http://www.wankwood.com/



More information about the dovecot mailing list