Terry Carmen
2012-Mar-01 22:35 UTC
[Dovecot] Another hint from the clue box 8-) imapc/imap proxy user mailbox server location
I'm running imapproxy as shown at http://wiki2.dovecot.org/HowTo/ImapcProxy. In fact, that's my config in the wiki. 8-) It's been working, but has performance issues when the Exchange server that's hard-coded as imapc_host=xxx.xxx.xxx.xxx doesn't happen to be the user's home exchange server. I'd like to point dovecot at the correct Exchange server based on an LDAP query, and in fact, have an LDAP search that works: DC=example,DC=com (&(objectCategory=person)(objectClass=user)(!(userAccountcontrol:1.2.840.113556.1.4.803:=2))(sAMAccountName=username)) With the exchange server being returned in the msExchHomeServerName property as: /O=example/OU=INT/cn=Configuration/cn=Servers/cn=exchangeservername I believe this should somehow end up in the userdb section, which currently contains "driver = prefetch", but can't seem to figure out specifically what should be there. The only important part is "cn=exchangeservername", which is the machine name and would need to be prepended to example.com to get the fqdn. Can anybody toss me a clue? Once I get it working, I'll update the wiki. Thanks! Terry
Timo Sirainen
2012-Mar-04 12:45 UTC
[Dovecot] Another hint from the clue box 8-) imapc/imap proxy user mailbox server location
On 2.3.2012, at 0.35, Terry Carmen wrote:> With the exchange server being returned in the msExchHomeServerName property as: > > /O=example/OU=INT/cn=Configuration/cn=Servers/cn=exchangeservername > > I believe this should somehow end up in the userdb section, which currently contains "driver = prefetch", but can't seem to figure out specifically what should be there...> The only important part is "cn=exchangeservername", which is the machine name and would need to be prepended to example.com to get the fqdn.Do all of the values have the same prefix? Then I guess you can do: pass_attrs = ..., \ msExchHomeServerName=userdb_imapc_host=%49.100$.example.com If the prefix differs, but all of the exchange server names have the same length, for example 10, you can also do: pass_attrs = ..., \ msExchHomeServerName=userdb_imapc_host=%-10$.example.com There's no otherwise nice way to parse this string.
Maybe Matching Threads
- dovecot proxying with imapc
- imapc Proxy to IMAPS Exchangeserver?
- 2.1: imapc LIST problem / usage question
- dovecot: imap-login: Aborted login (auth failed, 1 attempts in 2 secs): user=<xxx>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS, session=<1pBG/03XogB/AAAB>
- imapc_port not working