[Dovecot] extra fields with "passwd" userdb
Patrick McLean
patrick at cim.mcgill.ca
Mon Dec 13 19:30:38 EET 2010
Hi,
On 13/12/10 08:05 AM, Timo Sirainen wrote:
> On Fri, 2010-12-10 at 15:07 -0700, Willie Gillespie wrote:
>>> Thanks for the reply, although I am not sure you understand the
>>> question. I know what I need to do, I just don't know how (syntax to use
>>> in the dovecot configuration file) to change the mail_location on a
>>> per-user basis with the "passwd" userdb backend.
>>
>> I am no Dovecot expert, but maybe you could add a passwd-file userdb
>> alongside your regular userdb.
>
> Yeah, something like that has to be done.
>
I just did that, and things seem to be _mostly_ working. It seems that
deliver/dovecot-lda is ignoring the extra fields parameter (I am using
the user's .forward file to invoke the lda). It keeps trying to deliver
to the Maildir rather than the mdbox.
I managed to override it by creating a new config file with
mail_location set to mdbox, and specifying the config file on the lda
command line. This is obviously not ideal, I would imagine that the lda
should respect the extra fields as the rest of dovecot does.
I set the userdb sock to 0666 and tested that "doveadm user" gets the
right info when run as the user, so it really does appear that deliver
has the information available to it, it's just being ignored.
>> Then for the users you want to test with:
>> user:password-ignored--will-use-passdb-instead:1000:1000::/home/user::userdb_mail=mdbox:~/Maildir
>
> Yep. Either only the non-default users or just clone the
> entire /etc/passwd there. You could write a small script that updates
> it, preserving the extra fields.
>
>> The thing I'm not sure about is which order you should list your userdb
>> sections in the config file such that "passwd-file" takes precedence
>> over "passwd".
>
> userdb passwd-file {} just needs to be above userdb passwd {} in config
> file. If user isn't found from passwd-file then it's looked up from
> passwd next.
>
More information about the dovecot
mailing list