Re: [Dovecot] automounting home dirs

2008-12-28 Thread Darren Pilgrim

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.


Re: [Dovecot] automounting home dirs

2008-12-28 Thread Roger Hale

> > I'm running dovecot-1.0.10 on a Solaris 10 server with home dirs
> > automounted over NFS. I have set the mail_location configuration
> > option so that nothing should be written to a user's home dir over
> > NFS but, as far as I can tell, dovecot still by default tries to
> > chdir to a user's home dir when reading mail, although this is not
> > required. This creates additional unnecessary load on a
> > heavily-loaded fileserver and generally slows everything down and
> > creates an unnecessary dependency.
> > 
> > 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
}
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.

 
> Posting `dovecot -n` output would help.

# 1.0.10: /usr/local/etc/dovecot.conf
protocols: imap imaps pop3s
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
mail_extra_groups: mail
mail_location: 
mbox:/var/mail/.mboxes/%u:INBOX=/var/mail/%u:INDEX=/var/mail/.indexes/%u
mail_debug: yes
mmap_disable: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
pop3_reuse_xuidl(default): no
pop3_reuse_xuidl(imap): no
pop3_reuse_xuidl(pop3): yes
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xv%08Xu
auth default:
  mechanisms: plain login
  passdb:
driver: pam
  userdb:
driver: passwd


_
Get a bird’s eye view of the world with Multimap
http://clk.atdmt.com/GBL/go/115454059/direct/01/

Re: [Dovecot] automounting home dirs

2008-12-28 Thread Darren Pilgrim

Roger Hale wrote:

I'm running dovecot-1.0.10 on a Solaris 10 server with home dirs
automounted over NFS. I have set the mail_location configuration
option so that nothing should be written to a user's home dir over
NFS but, as far as I can tell, dovecot still by default tries to
chdir to a user's home dir when reading mail, although this is not
required. This creates additional unnecessary load on a
heavily-loaded fileserver and generally slows everything down and
creates an unnecessary dependency.

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.


Posting `dovecot -n` output would help.

1: http://wiki.dovecot.org/UserDatabase


[Dovecot] automounting home dirs

2008-12-28 Thread Roger Hale

Hi,

I'm running dovecot-1.0.10 on a Solaris 10 server with home dirs automounted 
over NFS. I have set the mail_location configuration option so that nothing 
should be written to a user's home dir over NFS but, as far as I can tell, 
dovecot still by default tries to chdir to a user's home dir when reading mail, 
although this is not required. This creates additional unnecessary load on a 
heavily-loaded fileserver and generally slows everything down and creates an 
unnecessary dependency. 

Is there a way to prevent dovecot from causing the home dirs to be mounted?

I found this thread: 
http://markmail.org/message/umywuppl3vvzfe4p#query:dovecot%20mount%20home%20directory+page:3+mid:fgr4g6pup5y6qbcr+state:results
which discusses the same problem, but it's quite old and there doesn't seem to 
be a definitive answer other than hacking the passwd file or the code. 

Is there a more elegant solution?

TIA.

_
Get a bird’s eye view of the world with Multimap
http://clk.atdmt.com/GBL/go/115454059/direct/01/