[Dovecot] Dovecot and Active Directory separate domain data stores.
Hi,
I've got Dovecot setup to auth my AD users fine via Winbind and I've also tried it using LDAP and can get this working also.
The problem lies in the way we store our email for our virtual users in this setup.
We run a flat domain for AD (lets call it newzealand.local), and then under each users account that gets email, in the E-mail field in AD, they have an email address like user1@auckland, user2@wellington, user3@chch and so on.
With Postfix, I've set it up so that each email domain ends up being stored in a different path - /mail/auckland/user1, /mail/wellington/user2, /mail/chch/user3. This was done using a query filter that returned a person's email address from AD, chopped it into separate user/domain parts around the '@' symbol and using these to determine where the mail should be stored.
This seems to work well for our purposes.
But now I need to get Dovecot to be able to do the same thing in order to present the email to the user.
I'm fairly certain this isn't going to work with Winbind, so I implemented the LDAP passdb and got that working, but I can't seem to quite work out how to get it to work with the domain part from the email address.
Could someone give me a pointer in the right direction if this is possible. I'm thinking it has to do with the user_attrs variable, but can't quite workout how I would split this.
Or is there a better way to do this?
Thanks,
Andrew
On Tue, 2010-07-27 at 16:35 +1200, Andrew Bruce wrote:
We run a flat domain for AD (lets call it newzealand.local), and then under each users account that gets email, in the E-mail field in AD, they have an email address like user1@auckland, user2@wellington, user3@chch and so on.
So I guess this is all you need..
This was done using a query filter that returned a person's email address from AD, chopped it into separate user/domain parts around the '@' symbol and using these to determine where the mail should be stored.
But now I need to get Dovecot to be able to do the same thing in order to present the email to the user.
Dovecot can do that easily internally already. I guess what you want is:
pass_attrs = email=user, .. user_attrs = email=user, ..
mail_location = maildir:/mail/%d/%n/Maildir
or something.
On Tue, 2010-07-27 at 16:35 +1200, Andrew Bruce wrote:
We run a flat domain for AD (lets call it newzealand.local), and then under each users account that gets email, in the E-mail field in AD,
On Wed, 04 Aug 2010 17:31:09 +0100, Timo Sirainen tss@iki.fi wrote: they
have an email address like user1@auckland, user2@wellington, user3@chch and so on.
So I guess this is all you need..
This was done using a query filter that returned a person's email address from AD, chopped it into separate user/domain parts around the '@' symbol and using these to determine where the mail should be stored.
But now I need to get Dovecot to be able to do the same thing in order to present the email to the user.
Dovecot can do that easily internally already. I guess what you want is:
pass_attrs = email=user, .. user_attrs = email=user, ..
mail_location = maildir:/mail/%d/%n/Maildir
or something.
I've tried this, but it doesn't seem to work. I've set in /etc/dovecot/dovecot-ldap.conf: pass_attrs = mail=user user_attrs = mail=user
and in dovecot.conf mail_location = maildir:/mirror/mail/%d/%Ln:INDEX=/var/spool/indexes/%u
and when I login as the user I get a user folder created at: /mirror/mail/user
It's like the user part is getting cut off at the '@' and then the domain part is just being dropped, rather than passed back for use in the mail_location.
Any other ideas?
On Mon, 2010-08-09 at 11:24 +1200, Andrew Bruce wrote:
I've tried this, but it doesn't seem to work. I've set in /etc/dovecot/dovecot-ldap.conf: pass_attrs = mail=user user_attrs = mail=user
It's like the user part is getting cut off at the '@' and then the domain part is just being dropped, rather than passed back for use in the mail_location.
Any other ideas?
Set auth_debug=yes and show what it logs. Also show your dovecot -n output.
participants (2)
-
Andrew Bruce
-
Timo Sirainen