[Dovecot] Change mail_location for one user?

Steffen skdovecot at smail.inf.fh-brs.de
Mon Sep 16 11:04:08 EEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scott Galambos wrote:
> On 9/13/2013 2:40 AM, Steffen Kaiser wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- "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
>> 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 }
> 
> 
> This works.  But I noticed when I do use it to override
> mail_location dovecot doesn't report system_groups_user anymore.
> Not sure if that matters....
> 
> $: dovecot user sarah field   value uid     1403 gid     101 home
> /home/sarah mail    mbox:~/mail:INBOX=/var/mail/sarah 
> system_groups_user      sarah
> 
> Now I add to imap.passwd: 
> sarah::1403:101::/home/sarah::userdb_mail=maildir:~/Maildir
> 
> $: dovecot user sarah field   value uid     1403 gid     101 home
> /home/sarah mail    maildir:~/Maildir $:

see http://wiki2.dovecot.org/UserDatabase/ExtraFields first section "A
user database lookup typically returns uid, gid, home and mail fields.
Other possibilities are:"

/etc/groups won't be queried now, because of the different driver.

- -- 
Steffen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEVAwUBUja7eF3r2wJMiz2NAQIU6Af7BIyZauXNgdFTO0lr899d+8AftQF4pEi8
J11k3Zw2Bn74IPYymbD//ORcboRqUxBK6BJjtcJoGf67KarOd+1Bi5CsOtbLZe/2
a4+f0jRjbsdTahkCBeVIpdEQhb92YMQHfq8XGbfpYaSfWN/Nq3fIyvrmB66OohRg
yt2QSm2uwP4YormgGQ/0Yi/T4opP2dLrV86HN92gvb3NRhEEfWpSKoWScw0HRMMR
uS3WIPoWC930YNeL6TB5sSTO6jJmPS7W2V/T1XbicCSO+gAlosm0y+WNuaz3EPx6
g2Ih3tmzayCWtlCobLVf8wAkdqrEEUoYeclbTvyeDK90sUwuqdTvxA==
=COLU
-----END PGP SIGNATURE-----


More information about the dovecot mailing list