[Dovecot] Custom Mail Directory for some users
Timo Sirainen
tss at iki.fi
Mon Mar 26 22:01:52 EEST 2007
On Mon, 2007-03-26 at 20:44 +0200, Patrick Kranz wrote:
> Hi list,
>
> I'm new on this mailing list and I'm kind of stucked at the moment.
>
> I managed to get Postfix and Dovecot working together with Amavis,
> OpenLDAP und SASL on Ubuntu Linux Release "Dapper Drake". The Dovecot
> version shipped with Dapper is 1.0-beta3 (at least, that's what the
> package database tells me), I also tried this with a Debian Backport of
> version 1.0-rc15.
I'd of course recommend the latest RC :)
> userdb ldap {
> args = /etc/dovecot/dovecot-ldap.com
> }
>
> userdb static {
> args = uid=vmail gid=vmail
If the users exist in the ldap, the static userdb is useless here.
userdb static i
> user_attrs = mailDirectory=mail
Looks OK for rc15. I don't remember if beta3 supported this format.
> mailDirectory: maildir:/var/spool/dovecot/mail/ekits.de/blubb
Still ok.
> As far as I can interpret the log of slapd, dovecot doesn't even ask for
> the attribute "mailDirectory".
Set auth_debug=yes and show the logs.
> I also tried this with userdb prefetch.
> With this it did actually ask for the attribute but it still had no
> effect. With this configuration dovecot creates the directory
> /var/spool/spool/dovecot/mail/patrick if I login with the uid patrick
> but I wanted access to /var/spool/dovecot/mail/ekits.de/blubb
>
> If anybody has any clue what I did wrong or if I have a conceptional
> misunderstanding, I would appreciate every help.
All the settings you showed above looked correct, so there's something
else that's wrong. Could you show "dovecot -n" output instead of the
copy&pasted dovecot.conf? That shows what Dovecot is really seeing in
the configuration. For example if the static userdb is actually before
ldap userdb, the ldap is never used at all.
Also a better way to implement aliases is to change the username instead
of the mail directory. You can do this with something like:
pass_filter = (&(objectClass=ekitsMailAccount)(|(uid=%u)(userAlias=%u)))
Because pass_attrs contains uid=user, the username is always changed to
uid's contents no matter how the filter lookup matched.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070326/b18ea951/attachment.pgp
More information about the dovecot
mailing list