[Dovecot] Another hint from the clue box 8-) imapc/imap proxy user mailbox server location

Terry Carmen terry at cnysupport.com
Mon Mar 12 20:57:24 EET 2012


On 03/04/2012 09:58 AM, Timo Sirainen wrote:
> On 4.3.2012, at 16.48, Terry Carmen wrote:
>
>>>  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.
>>
>>
>> If by prefix, you mean the  
>> "/O=example/OU=INT/cn=Configuration/cn=Servers/" part, then, yes,  
>> they're different.
>
> OK, so if the prefix or suffix isn't always the same length you  
> can't do the above.
>
>> I could export the data to a text file as  
>> username:homeexchangeserver (or whatever other format is needed).
>>
>> homeservers.txt:
>> user1:exch1.example.com
>> user2:exch1.example.com
>> user3:exch1.example.com
>> user4:exch2.example.com
>>
>> Is it possible to do a lookup in a text file to get this?
>
>
> If you can use userdb passwd-file and export the data to that file,  
> it'll work. http://wiki2.dovecot.org/AuthDatabase/PasswdFile
>
> Example line:
>
> user1::1000:1000::/home/user::userdb_imapc_host=exch1.example.com
>
> Note that you can't then return any userdb fields from passdb ldap lookup.

That doesn't seem to work because I can't create the passdb file  
containing the user's password, since they're only known to the remote  
IMAP server that I want imapproxy to connect to.

What would be perfect is if I could do something like this:

////////////////////////////

http://wiki.dovecot.org/HowTo/ImapProxy#IMAP_and_POP3_session_proxying
Proxy only server

. . .

In this document I assume that Dovecot is installed under  
/opt/dovecot, by default it is installed under /usr/local when  
compiling from source. Examples in this document are for MySQL but  
configs do not differ much with PostgreSQL.

SQL table structure

Create SQL table like

CREATE TABLE proxy (
   user varchar(255) NOT NULL,
   host varchar(16) default NULL,
   destuser varchar(255) default NULL,
   PRIMARY KEY  (user)
);

//////////////////////////////////////

All I really need is a way to lookup the user's home IMAP server when  
given the username, as above.

Does imapproxy still support this 1.x feature?

Thanks!

Terry











More information about the dovecot mailing list