Re: [Dovecot] multiple attribute templates?

2009-12-29 Thread Timo Sirainen
On Thu, 2009-12-24 at 19:45 -0300, Mariano Absatz wrote:
> pass_attrs =
> uid=user,userPassword=password,maildropPath=userdb_mail=maildir:/home/vmail/%$,maildropPath=userdb_home=/home/vmail/%$
> 
> Alas... this didn't work... that is, apparently, the "home" attribute
> works OK (I got my scripts on the /home/vmail/example.org/mabsatz/sieve
> directory), but the "mail" attribute got lost and mail is being
> delivered to /home/vmail/mabsatz.
> 
> Is there a way to use more than one attribute template AND that both use
> the same LDAP attribute?

No. It would be a good feature, but too much trouble to add the code for
now. Maybe when I redesign the whole LDAP configuration.

> Otherwise, can someone think of a better way to do what I'm trying to do?

Yes. Just have it return userdb_home and then set:

mail_location = maildir:~/

Although note that having home and maildir be the same directory isn't a
great idea. http://wiki.dovecot.org/VirtualUsers/Home



signature.asc
Description: This is a digitally signed message part


[Dovecot] multiple attribute templates?

2009-12-24 Thread Mariano Absatz
Hi,

I've been using an attribute template for some time without any problems.

My accounts are on an LDAP server and I have an attribute maildropPath
which is the maildir path for the user relative to /home/vmail

That is, user "mabs...@example.org" has, in attribute maildropPath the
string "example.org/mabsatz", meaning that the maildir is in
/home/vmail/example.org/mabsatz

This is configured like this (taken from
http://wiki.dovecot.org/AuthDatabase/LDAP/Userdb):

user_attrs = maildropPath=mail=maildir:/home/vmail/%$
pass_attrs =
uid=user,userPassword=password,maildropPath=userdb_mail=maildir:/home/vmail/%$


and it works OK.

Now I want to start using sieve and, since all accounts are virtual, I
want to use a subdirectory "sieve" within the maildir to hold the
scripts, so I need (I think) a userdb home to point to the same path...
being a monkey I tried to imitate (or rather, extend) the previous
configuration like this:

user_attrs =
maildropPath=mail=maildir:/home/vmail/%$,maildropPath=home=/home/vmail/%$
pass_attrs =
uid=user,userPassword=password,maildropPath=userdb_mail=maildir:/home/vmail/%$,maildropPath=userdb_home=/home/vmail/%$

Alas... this didn't work... that is, apparently, the "home" attribute
works OK (I got my scripts on the /home/vmail/example.org/mabsatz/sieve
directory), but the "mail" attribute got lost and mail is being
delivered to /home/vmail/mabsatz.

Is there a way to use more than one attribute template AND that both use
the same LDAP attribute?

Otherwise, can someone think of a better way to do what I'm trying to do?

I'm using dovecot 1.1.11 from the standard ubuntu 9.04 package
(dovecot-imapd_1.1.11-0ubuntu4.1).

-- 
Mariano Absatz - "El Baby"
el.b...@gmail.com
www.clueless.com.ar


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Real programmers use: cat > a.out
http://xkcd.com/378/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
* TagZilla 0.066 * http://tagzilla.mozdev.org