On Mon, 11 Apr 2011 07:42:21 +0100, Andre Rodier wrote:
On Mon, 11 Apr 2011 06:11:08 +0100, Andre Rodier wrote:
On Mon, 11 Apr 2011 00:35:33 +0300, Timo Sirainen wrote:
On 11.4.2011, at 0.19, Andre Rodier wrote:

What surprise me is this line during the authentication:
===> auth(arodier@red2team,10.10.2.19): username changed arodier@red2team -> arodier

That means that the username gets changed from %n = arodier and %d = redteam2 to %n = arorier and %d = empty. So I don't understand why %d
would ever be anything else than empty.

Anyway, http://wiki2.dovecot.org/DomainLost

Thanks Timo,

it was what I thought. However, even if I know know the cause, it
doesn't help me too much to do what I want.

In the link provided, none of the reason is applied in my settings.

- My auth_username_format is set to the full username+domain, event
empty, it's dropped.
- I use LDAP, not SQL, so I don't know how to return the domain from
my query.

The question is now, how can I return both the username and the
domain from LDAP, please ? Once I have the answer, I can add the
information to the wiki page.

However, it seems I can use this method, specified on this page:
http://wiki.dovecot.org/AuthDatabase/LDAP/Userdb:

You can add static fields that aren't looked up from LDAP (v1.1.rc5+).
For example create a "mail" field with value "/var/vmail/%d/%n":
user_attrs = \
  quotaBytes=quota_rule=*:bytes=%$, \
  =mail=/var/vmail/%d/%n


It is exactly what I want to do. But once I have created a "mail"
field, how can I access this field from the main dovecot configuration
file, please ?

Thanks for your answer and your patience.

Once I have finished to setup my environment, I'll publish a document
to help others.

Kind regards,

Hello again, Timo, I am nearly there.

I finally got it working, using the ldap prefetch option. I don't
know why, but it is only in this way that the '%d' domain is kept
after the authentication:

Now, this line is normally resolved in my private namespace (mail location)
  => location = maildir:/home/emails/%d/%%n/Maildir:

In my dovecot ldap configuration:


-8<--------------------------------------------------------------------------------------------------------------------
hosts = callisto.red2.srv thebe.red2.srv
auth_bind = yes
ldap_version = 3
base = dc=red2,dc=srv
scope = subtree
user_attrs =

gosaMailQuota=quota_rule=*:storage=%$M,=home=/home/emails/%d/%n,=mail=/home/emails/%d/%n,
mail_plugins
user_filter = (&(objectClass=posixAccount)(uid=%n))
pass_attrs = uid=uid,userPassword=password,\


=userdb_home=/home/emails/%d/%n,gosaMailQuota=userdb_quotarule=*:storage=%$M
pass_filter = (&(objectClass=posixAccount)(uid=%n)(ou=%d))
default_pass_scheme = PLAIN-MD5

-8<--------------------------------------------------------------------------------------------------------------------

Obviously, I now need to cleanup and remove all options that are not needed.

Kind regards,
André

Hi everybody,

It is me again, a typo error that I want to inform people.
The resolved line I gave in example is my shared namespace. But the private namespace works as well.

The private namespace location:
-8<--------------------------------------------------------------------------------------------------------------------
location = maildir:~/Maildir:INDEX=/var/mail/indexes/private/%n:CONTROL=/var/mail/indexes/private/%n
-8<--------------------------------------------------------------------------------------------------------------------

The shared namespace location:
-8<--------------------------------------------------------------------------------------------------------------------
location = maildir:/home/emails/%d/%%n/Maildir:
-8<--------------------------------------------------------------------------------------------------------------------

The only strange thing, is that the quota seems to have been cached. After changing the value on my LDAP server, the value is read, but both roundcube and thunderbird are displaying the same percentage.

It will be another thread, now.

Kind regards,
André.

Reply via email to