[Dovecot] Dovecot and Active Directory separate domain data stores.

Andrew Bruce spamtrap at hope-st.ath.cx
Tue Jul 27 07:35:06 EEST 2010


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 at auckland, user2 at wellington, user3 at 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



More information about the dovecot mailing list