Discussion:
[RCU] RoundCube , ImapProxy and Dovecot - some questions?
Simon Loewenthal
2013-04-06 11:01:22 UTC
Permalink
Hi there and a special hi to those who read this on the weekend,

I have had a working RoundCube installation for years - RC rocks!

I decided to add SquirrelMail's IMAPPROXY into the mix to speed it all
up, but cannot get RC to work with it. Everything runs on localhost,
ImapProxy 1.2.7-1, RC 0.8.6 and with Debian 6.0.7

I've modified the RC configuration as follows:
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 1993;


# telnet localhost 1993
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed


However, using the RC webmail logins failed.
ImapProxy did not log any thing to LOG_MAIL, but this is expected
because a failed log in should not be an imapproxy problem.

I'd be grateful if someone would let me know if this problem has cropped
up before, and where should I look.

Cheers, Simon

-- fight apathy or don't simon at klunky / .co.uk / .org pgp 4BA78604
Stan Hoeppner
2013-04-06 21:25:45 UTC
Permalink
Post by Simon Loewenthal
Hi there and a special hi to those who read this on the weekend,
I have had a working RoundCube installation for years - RC rocks!
I decided to add SquirrelMail's IMAPPROXY into the mix to speed it all
up, but cannot get RC to work with it. Everything runs on localhost,
ImapProxy 1.2.7-1, RC 0.8.6 and with Debian 6.0.7
With RC and Dovecot running on the same box, an IMAP proxy isn't going
to significantly increase performance, if any. The purpose of the proxy
is to establish an IMAP login and keep it open like a desktop MUA (TB)
does, so that each client command doesn't require a login/logoff cycle
as is the RC connectionless default. With everything running on the
same box, the normal RC logon/off cycle is instantaneous. So by using a
proxy in this scenario, you simply increase daemon complexity for
little/no gain.
Post by Simon Loewenthal
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 1993;
# telnet localhost 1993
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed
However, using the RC webmail logins failed.
ImapProxy did not log any thing to LOG_MAIL, but this is expected
because a failed log in should not be an imapproxy problem.
If you're still determined to try this proxy, check these RC settings.

Specify localhost.

// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = array("localhost");

Your use of TCP 1993 suggests you're trying to use SSL. This must match
from RC to proxy to Dovecot. SSL is completely useless when all daemons
run on the same box, so use plain auth on TCP 143.

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

Again, it's silly to encrypt via SSL when all the traffic is inside the
RAM of the box, nothing over the wire. The over the wire security from
your browser to RC is provided by HTTPS.

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check"
to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = plain;

Again use plain authentication. Simply using plain auth and
non-encrypted IMAP connections will speed things up slightly over using
SSL as it eliminates the cycles required for encryption.
--
Stan
Simon Loewenthal
2013-04-06 22:10:07 UTC
Permalink
Hi Stan,
Thanks for the suggestions. I am testing anything since the box has
a mere 496Mb of RAM and not too quick discs. It mayn't speed things up,
but is worth a try.

It is not using SSL, just a port that looks like it is. PLAIN auth is used.

These were already set.
$rcmail_config['default_host'] = 'localhost';
$rcmail_config['imap_auth_type'] = PLAIN;
Post by Stan Hoeppner
Post by Simon Loewenthal
Hi there and a special hi to those who read this on the weekend,
I have had a working RoundCube installation for years - RC rocks!
I decided to add SquirrelMail's IMAPPROXY into the mix to speed it all
up, but cannot get RC to work with it. Everything runs on localhost,
ImapProxy 1.2.7-1, RC 0.8.6 and with Debian 6.0.7
With RC and Dovecot running on the same box, an IMAP proxy isn't going
to significantly increase performance, if any. The purpose of the proxy
is to establish an IMAP login and keep it open like a desktop MUA (TB)
does, so that each client command doesn't require a login/logoff cycle
as is the RC connectionless default. With everything running on the
same box, the normal RC logon/off cycle is instantaneous. So by using a
proxy in this scenario, you simply increase daemon complexity for
little/no gain.
Post by Simon Loewenthal
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 1993;
# telnet localhost 1993
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed
However, using the RC webmail logins failed.
ImapProxy did not log any thing to LOG_MAIL, but this is expected
because a failed log in should not be an imapproxy problem.
If you're still determined to try this proxy, check these RC settings.
Specify localhost.
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = array("localhost");
Your use of TCP 1993 suggests you're trying to use SSL. This must match
from RC to proxy to Dovecot. SSL is completely useless when all daemons
run on the same box, so use plain auth on TCP 143.
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;
Again, it's silly to encrypt via SSL when all the traffic is inside the
RAM of the box, nothing over the wire. The over the wire security from
your browser to RC is provided by HTTPS.
// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check"
to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = plain;
Again use plain authentication. Simply using plain auth and
non-encrypted IMAP connections will speed things up slightly over using
SSL as it eliminates the cycles required for encryption.
Simon Loewenthal
2013-04-06 22:14:13 UTC
Permalink
Just a thought : There is a difference between what options dovecot
presents and what imapproxy present. Wonder if RC requires some other
options presented from ImapProxy that it had got directly from Dovecot.

# telnet localhost 3993
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a1 logout
* BYE Logging out
a1 OK Logout completed.
Connection closed by foreign host.

# telnet localhost 1993
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed
Post by Simon Loewenthal
Hi Stan,
Thanks for the suggestions. I am testing anything since the box has
a mere 496Mb of RAM and not too quick discs. It mayn't speed things up,
but is worth a try.
It is not using SSL, just a port that looks like it is. PLAIN auth is used.
These were already set.
$rcmail_config['default_host'] = 'localhost';
$rcmail_config['imap_auth_type'] = PLAIN;
Post by Stan Hoeppner
Post by Simon Loewenthal
Hi there and a special hi to those who read this on the weekend,
I have had a working RoundCube installation for years - RC rocks!
I decided to add SquirrelMail's IMAPPROXY into the mix to speed it all
up, but cannot get RC to work with it. Everything runs on localhost,
ImapProxy 1.2.7-1, RC 0.8.6 and with Debian 6.0.7
With RC and Dovecot running on the same box, an IMAP proxy isn't going
to significantly increase performance, if any. The purpose of the proxy
is to establish an IMAP login and keep it open like a desktop MUA (TB)
does, so that each client command doesn't require a login/logoff cycle
as is the RC connectionless default. With everything running on the
same box, the normal RC logon/off cycle is instantaneous. So by using a
proxy in this scenario, you simply increase daemon complexity for
little/no gain.
Post by Simon Loewenthal
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 1993;
# telnet localhost 1993
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed
However, using the RC webmail logins failed.
ImapProxy did not log any thing to LOG_MAIL, but this is expected
because a failed log in should not be an imapproxy problem.
If you're still determined to try this proxy, check these RC settings.
Specify localhost.
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = array("localhost");
Your use of TCP 1993 suggests you're trying to use SSL. This must match
from RC to proxy to Dovecot. SSL is completely useless when all daemons
run on the same box, so use plain auth on TCP 143.
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;
Again, it's silly to encrypt via SSL when all the traffic is inside the
RAM of the box, nothing over the wire. The over the wire security from
your browser to RC is provided by HTTPS.
// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check"
to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = plain;
Again use plain authentication. Simply using plain auth and
non-encrypted IMAP connections will speed things up slightly over using
SSL as it eliminates the cycles required for encryption.
_______________________________________________
Roundcube Users mailing list
users at lists.roundcube.net
http://lists.roundcube.net/mailman/listinfo/users
Simon Loewenthal
2013-04-06 22:24:32 UTC
Permalink
I solved the problem.

AUTH=LOGIN not AUTH=PLAIN :D

$rcmail_config['imap_auth_type'] = LOGIN;

Proxying would not support AUTH=PLAIN.

Cheers for making me think.

Simon.
Post by Simon Loewenthal
Just a thought : There is a difference between what options dovecot
presents and what imapproxy present. Wonder if RC requires some other
options presented from ImapProxy that it had got directly from Dovecot.
# telnet localhost 3993
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a1 logout
* BYE Logging out
a1 OK Logout completed.
Connection closed by foreign host.
# telnet localhost 1993
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed
Post by Simon Loewenthal
Hi Stan,
Thanks for the suggestions. I am testing anything since the box has
a mere 496Mb of RAM and not too quick discs. It mayn't speed things up,
but is worth a try.
It is not using SSL, just a port that looks like it is. PLAIN auth is used.
These were already set.
$rcmail_config['default_host'] = 'localhost';
$rcmail_config['imap_auth_type'] = PLAIN;
Post by Stan Hoeppner
Post by Simon Loewenthal
Hi there and a special hi to those who read this on the weekend,
I have had a working RoundCube installation for years - RC rocks!
I decided to add SquirrelMail's IMAPPROXY into the mix to speed it all
up, but cannot get RC to work with it. Everything runs on localhost,
ImapProxy 1.2.7-1, RC 0.8.6 and with Debian 6.0.7
With RC and Dovecot running on the same box, an IMAP proxy isn't going
to significantly increase performance, if any. The purpose of the proxy
is to establish an IMAP login and keep it open like a desktop MUA (TB)
does, so that each client command doesn't require a login/logoff cycle
as is the RC connectionless default. With everything running on the
same box, the normal RC logon/off cycle is instantaneous. So by using a
proxy in this scenario, you simply increase daemon complexity for
little/no gain.
Post by Simon Loewenthal
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 1993;
# telnet localhost 1993
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready.
a1 logout
* BYE LOGOUT received
a1 OK Completed
However, using the RC webmail logins failed.
ImapProxy did not log any thing to LOG_MAIL, but this is expected
because a failed log in should not be an imapproxy problem.
If you're still determined to try this proxy, check these RC settings.
Specify localhost.
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = array("localhost");
Your use of TCP 1993 suggests you're trying to use SSL. This must match
from RC to proxy to Dovecot. SSL is completely useless when all daemons
run on the same box, so use plain auth on TCP 143.
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;
Again, it's silly to encrypt via SSL when all the traffic is inside the
RAM of the box, nothing over the wire. The over the wire security from
your browser to RC is provided by HTTPS.
// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check"
to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = plain;
Again use plain authentication. Simply using plain auth and
non-encrypted IMAP connections will speed things up slightly over using
SSL as it eliminates the cycles required for encryption.
_______________________________________________
Roundcube Users mailing list
users at lists.roundcube.net
http://lists.roundcube.net/mailman/listinfo/users
_______________________________________________
Roundcube Users mailing list
users at lists.roundcube.net
http://lists.roundcube.net/mailman/listinfo/users
Ed W
2013-04-07 11:46:14 UTC
Permalink
Post by Simon Loewenthal
Hi Stan,
Thanks for the suggestions. I am testing anything since the box has
a mere 496Mb of RAM and not too quick discs. It mayn't speed things up,
but is worth a try.
There are some previous measurements on the dovecot lost (some by me)
showing that imapproxy will generally slow things down very slightly (in
the one box case). Dovecot is very fast at handling logins

However, *I* use imapproxy on a single box in order to cleanup my
logfiles such that I can do some analytics along the lines of "logged in
at xx:xx and logged out at yy:yy"

I speculate that imapproxy might offer a performance advantage with the
RTT to the imap server is longer, something of the order several times
the RTT time *might* be eliminated...

Good luck

Ed W
Reindl Harald
2013-04-07 14:55:02 UTC
Permalink
I speculate that imapproxy might offer a performance advantage with the RTT to the imap server is longer, something
of the order several times the RTT time *might* be eliminated...
at a high number of users while the IMAP server is a different host than
the webserver you save a lot of network connections and latency

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.roundcube.net/pipermail/users/attachments/20130407/c1823997/attachment.sig>
Loading...