[Dovecot] imapc Proxy to IMAPS Exchangeserver?
I'm trying to adapt http://wiki2.dovecot.org/HowTo/ImapcProxy to our Exchange Server, which has LOGINDISABLED on Port 143, and I offering LOGIN on Port 993.
How do I go about this?
Simply changing imapc_port to: imapc_port = 993 doesnt work:
Connected to localhost. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready. . LOGIN hildeb password . NO [UNAVAILABLE] Temporary authentication failure. [mproxy:2014-05-16 09:33:23] . LOGOUT
- BYE Logging out . OK Logout completed. Connection closed by foreign host.
Logs:
May 16 11:33:04 mproxy dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled) May 16 11:33:21 mproxy dovecot: auth: Error: imapc(exchange-imap.charite.de:143): Command '2 LOGIN "hildeb" "password"' failed with BAD: 2 Command received in Invalid state. May 16 11:33:21 mproxy dovecot: auth: Error: imap(hildeb,::1,<bjeUGoH53AAAAAAAAAAAAAAAAAAAAAAB>): Disconnected from server May 16 11:33:21 mproxy dovecot: auth: Error: imapc(exchange-imap.charite.de:143): Authentication failed: Command received in Invalid state. May 16 11:33:26 mproxy dovecot: imap-login: Aborted login (auth failed, 1 attempts in 8 secs): user=<hildeb>, method=PLAIN, rip=::1, lip=::1, secured, session=<bjeUGoH53AAAAAAAAAAAAAAAAAAAAAAB>
But why is it still using port 143?
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
- Ralf Hildebrandt <Ralf.Hildebrandt@charite.de>:
I'm trying to adapt http://wiki2.dovecot.org/HowTo/ImapcProxy to our Exchange Server, which has LOGINDISABLED on Port 143, and I offering LOGIN on Port 993.
How do I go about this?
Simply changing imapc_port to: imapc_port = 993 doesnt work:
I got a bit further by usingthe info found in http://dovecot.org/list/dovecot/2012-September/138334.html
Now I'm getting:
telnet localhost 143
Trying ::1... Connected to localhost. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready. . LOGIN hildeb WRONGPASSWORD . NO [AUTHENTICATIONFAILED] Authentication failed. . LOGIN hildeb CORRECTPASSWORD
- BYE Internal error occurred. Refer to server log for more information. Connection closed by foreign host.
The log says:
May 16 12:07:05 mproxy dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled) May 16 12:07:29 mproxy dovecot: imap-login: Login: user=<hildeb>, method=PLAIN, rip=::1, lip=::1, mpid=23662, secured, session=<tqLKk4H5/QAAAAAAAAAAAAAAAAAAAAAB> May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: user hildeb: Initialization failed: Namespace '': Mailbox list driver imapc: missing imapc_password May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: Invalid user settings. Refer to server log for more information.
Mailbox list driver imapc: missing imapc_password ???
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
Am 16.05.2014 12:09, schrieb Ralf Hildebrandt:
May 16 12:07:05 mproxy dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled) May 16 12:07:29 mproxy dovecot: imap-login: Login: user=<hildeb>, method=PLAIN, rip=::1, lip=::1, mpid=23662, secured, session=<tqLKk4H5/QAAAAAAAAAAAAAAAAAAAAAB> May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: user hildeb: Initialization failed: Namespace '': Mailbox list driver imapc: missing imapc_password May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: Invalid user settings. Refer to server log for more information.
Mailbox list driver imapc: missing imapc_password ???
The IMAP Client (imapc) needs a username, hostname, port and password to login.
According to http://wiki2.dovecot.org/Variables you can just pass through the plaintext password %w to the imapc backend by setting imapc_password=%w
Regards Daniel
Dipl.-Inf. Daniel Parthey System Engineer Metaways Infosystems GmbH Pickhuben 2, D-20457 Hamburg
E-Mail: d.parthey@metaways.de Web: http://www.metaways.de
Metaways Infosystems GmbH - Sitz: D-22967 Tremsbüttel Handelsregister: Amtsgericht Lübeck HRB 4508 AH Geschäftsführung: Hermann Thaele, Lüder-H.Thaele
- Daniel Parthey <dovecot@dovecot.org>:
Am 16.05.2014 12:09, schrieb Ralf Hildebrandt:
May 16 12:07:05 mproxy dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled) May 16 12:07:29 mproxy dovecot: imap-login: Login: user=<hildeb>, method=PLAIN, rip=::1, lip=::1, mpid=23662, secured, session=<tqLKk4H5/QAAAAAAAAAAAAAAAAAAAAAB> May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: user hildeb: Initialization failed: Namespace '': Mailbox list driver imapc: missing imapc_password May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: Invalid user settings. Refer to server log for more information.
Mailbox list driver imapc: missing imapc_password ???
The IMAP Client (imapc) needs a username, hostname, port and password to login.
According to http://wiki2.dovecot.org/Variables you can just pass through the plaintext password %w to the imapc backend by setting imapc_password=%w
That's what I did! (prefixed with userdb_, since I'm using driver = prefetch)
passdb { driver = imap # Change the line below to reflect the IP address of your Exchange Server. args = host=exchange-imap.charite.de port=993 ssl=imaps default_fields = userdb_imapc_user=%u userdb_imapc_password=%w userdb_imapc_host=exchange-imap.charite.de userdb_imapc_ssl=imaps userdb_imapc_port=993 }
userdb { driver = prefetch }
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
Am 19.05.2014 14:53, schrieb Ralf Hildebrandt:
- Daniel Parthey <dovecot@dovecot.org>:
Am 16.05.2014 12:09, schrieb Ralf Hildebrandt:
May 16 12:07:05 mproxy dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled) May 16 12:07:29 mproxy dovecot: imap-login: Login: user=<hildeb>, method=PLAIN, rip=::1, lip=::1, mpid=23662, secured, session=<tqLKk4H5/QAAAAAAAAAAAAAAAAAAAAAB> May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: user hildeb: Initialization failed: Namespace '': Mailbox list driver imapc: missing imapc_password May 16 12:07:29 mproxy dovecot: imap(hildeb): Error: Invalid user settings. Refer to server log for more information.
Mailbox list driver imapc: missing imapc_password ???
The IMAP Client (imapc) needs a username, hostname, port and password to login.
According to http://wiki2.dovecot.org/Variables you can just pass through the plaintext password %w to the imapc backend by setting imapc_password=%w
That's what I did! (prefixed with userdb_, since I'm using driver = prefetch)
You're trying to enable SSL in imapc, right?
Maybe some of the options from http://wiki2.dovecot.org/Migration/Dsync will be useful:
for SSL:
#imapc_port = 993 #imapc_ssl = imaps #imapc_ssl_ca_dir = /etc/ssl #imapc_ssl_verify = yes
Regards Daniel
-- Dipl.-Inf. Daniel Parthey System Engineer Metaways Infosystems GmbH Pickhuben 2, D-20457 Hamburg
E-Mail: d.parthey@metaways.de Web: http://www.metaways.de
Metaways Infosystems GmbH - Sitz: D-22967 Tremsbüttel Handelsregister: Amtsgericht Lübeck HRB 4508 AH Geschäftsführung: Hermann Thaele, Lüder-H.Thaele
- Daniel Parthey <dovecot@dovecot.org>:
The IMAP Client (imapc) needs a username, hostname, port and password to login.
According to http://wiki2.dovecot.org/Variables you can just pass through the plaintext password %w to the imapc backend by setting imapc_password=%w
That's what I did! (prefixed with userdb_, since I'm using driver = prefetch)
You're trying to enable SSL in imapc, right?
Only in order to reach the Exchangeserver
Maybe some of the options from http://wiki2.dovecot.org/Migration/Dsync will be useful:
for SSL:
#imapc_port = 993 #imapc_ssl = imaps #imapc_ssl_ca_dir = /etc/ssl #imapc_ssl_verify = yes
Got these. I found the error. It was a leftover config someplace.
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
participants (3)
-
Daniel Parthey
-
Ralf Hildebrandt
-
Ralf Hildebrandt