[Dovecot] automounting home dirs

Darren Pilgrim list_dovecot at bluerosetech.com
Mon Dec 29 03:07:34 EET 2008


Roger Hale wrote:
>>> Is there a way to prevent dovecot from causing the home dirs to be
>>> mounted?
 >>
>> You can override the home dir returned by your userdb with a 
>> variable-expanded, "static" value by adding home to args[1].  You need 
>> to be careful and make sure that Dovecot doesn't use anything in the 
>> users' home dirs.  You may need to set mail_location and/or mail and 
>> create a virtual home-dir tree local to the Dovecot server.
> 
> Thanks. Are you suggesting I add something like the following?
> userdb static {
>   args = home=/some/random/dir
> }

passwd instead of static in your case, but yes.  Overriding home is only 
supported in v1.1 or later when the userdb is passwd.  You'll need to 
either update Dovecot or change your userdb driver.  If your users only 
access their mailboxes through POP3/IMAP, you could switch to a 
single-UID/GID setup with the static driver (which does support setting 
home in v1.0).

> Incidentally, what I really wanted was for the user's home dir only
> to be mounted for imap connections (when it could be usefully used),
> not POP3. I thought by moving the indexes dir this would just happen.> 

Dovecot runs the imap/pop3 sessions as the logged-in user, so it chdir's 
regardless of the mailbox location.


More information about the dovecot mailing list