[Dovecot] Change mail_location for one user?

/dev/rob0 rob0 at gmx.co.uk
Fri Sep 13 20:32:39 EEST 2013


Top-posting fixed.
On Fri, Sep 13, 2013 at 03:15:15AM -0400, Scott Galambos wrote:
> On 9/13/2013 2:40 AM, Steffen Kaiser wrote:
> >On Thu, 12 Sep 2013, Scott Galambos wrote:
> >>What would I have to do to make only sarah's mail_location
> >>~/Maildir now?  My userdb is:
> >>$: doveconf -n userdb
> >>userdb {
> >> driver = passwd
> >>}
> >
> >you need to pass "Extra Fields" to Dovecot, see last example in:
> >http://wiki2.dovecot.org/UserDatabase/ExtraFields
> >
> >"passwd-file" is similiar to "passwd", but I don't know, if you break
> >something (outside Dovecot), if you add the last field to /etc/passwd.
> >
> >Because Dovecot supports multiple userdb's, you could add a 

Reread that: _multiple_ means "more than one."

> >passwd-file userdb _before_ passwd userdb, copy the line of sarah 
> >from /etc/passwd into that new file and add the extra fields 
> >there. See http://wiki2.dovecot.org/AuthDatabase/PasswdFile
> >
> >userdb {
> >     driver = passwd-file
> >     args = username_format=%n /etc/dovecot/imap.passwd
> >}
> >userdb {
> >     driver = passwd
> >}
> >
> I tried something similar already.

Close, but not the same. Look back at Steffen's post. There are TWO 
userdb definitions. Do it that way and all is well. He answered you 
completely.

> passdb {
>   driver = shadow
> }
> 
> userdb {
>   driver = passwd-file
>   args = username_format=%n /path/to/passwd
> }
> 
> With only the one sarah user defined in /path/to/passwd. But then all
> other users cannot log in anymore.

Only one user had a userdb entry. If you specify a userdb, the 
built-in defaults do not apply.

>  Thunderbird says "Sending of
> password did not succeed".  Does anyone know if specifying a userdb
> stops passdb/shadow from being used?  Do I need to copy all users
> from the passdb/shadow system to /path/to/passwd?  Was hoping to just
> specify single users I wanted to override in /path/to/passwd.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:


More information about the dovecot mailing list