postfix+dovecot and usernames different to e-mail addresses

Benjamin dovecot at benjaminhubert.at
Fri Jun 10 09:56:05 UTC 2016


To me it seems that dovecot-lda is just ignoring all my LDAP 
configuration. I now added

   =mail=maildir:%{ldap:mailMessageStore}/Maildir

to user_attrs, but dovecot still logs

   Home directory not set for user. Can't expand ~/ for mail root
   dir in: ~/Maildir

Do I have to include the configuration somewhere else? It's only 
referenced in auth-ldap.conf.ext twice (passdb, userdb):

   root at mailtest:/etc/dovecot# grep ldap /etc/dovecot/conf.d/*
   conf.d/10-auth.conf:!include auth-ldap.conf.ext
   conf.d/auth-ldap.conf.ext:  driver = ldap
   conf.d/auth-ldap.conf.ext:  args = /etc/dovecot/dovecot-ldap.conf.ext
   conf.d/auth-ldap.conf.ext:  driver = ldap
   conf.d/auth-ldap.conf.ext:  args = /etc/dovecot/dovecot-ldap.conf.ext

Benjamin


On 06/09/2016 06:26 PM, Wolfgang Rosenauer wrote:
> Hi,
>
>
> On Thu, Jun 9, 2016 at 5:13 PM, Benjamin <dovecot at benjaminhubert.at> wrote:
>
>> Ok. The problem seems to be something different. I found out that even if
>> I pass the real username (foo-example.com) to dovecot-lda, dovecot tells
>> me
>>
>>   Error: User initialization failed: Namespace 'INBOX.': Home directory
>> not set for user. Can't expand ~/ for mail root dir in: ~/Maildir
>>
>> Why does dovecot find the home when accessed via IMAP, but not when
>> accessed via dovecot-lda?
>>
>>
> actually good question. I have to admit I only use LMTP and for that it
> works for me.
> I left out some more settings which might be important for you:
> pass_attrs = uid=user
> user_attrs =
> uid=user,=uid=600,=gid=600,=home=/srv/dovecot/%n,suseImapQuota=quota_rule=*:storage=%{ldap:suseImapQuota}M
>
> since obviously the search itself it not sufficient. You need to make sure
> that the right mailbox is addressed in the end via the uid=user
> In your configuration you do not return a user at all so this can be a
> problem IMHO.
>


More information about the dovecot mailing list