Re: [Dovecot] How to run Dovecot as IMAP Proxy?
Hi Timo,
Thanks for the response. Apologize, but my responses are going to be a bit lengthy.
I have migrated from uw-imap to Dovecot for POP3 & IMAP service. I run webmail using squirrelmail. When running uw-imap I used to run up.imapproxyd on the webmail server for faster responses. After migrating to Dovecot, I find that up.imapproxyd does not work well with dovecot.
Why not?
Here are my observations. I have around 6000+ mailboxes and roughly the same number of users. Earlier the mail server (running sendmail + uw-imap for POP3 & IMAP) would have around 80 pop3 connections (peak) and around 300 IMAP connections, concurrent. (ps -aef | grep imap | wc -l or ps -aef | grep pop3 | wc -l). There have been cases where I have observed upto 500 concurrent IMAP sessions.
The IMAP connections are from a webmail server running Apache with Squirrelmail. The observation was that response was slow & so based on the suggestion on Squirrelmail for performance improvement we have installed up-imapproxyd on the squirrelmail machine. There was a significant improvement in the response times for the users, because of caching.
After that I encountered some strange problems of POP3 timing out for users (earlier I did post that problem in this forum). I opened a ticket with Redhat and naturally they refused to support me with uw-imap running. So switched to Dovecot 0.99.x (I run the server on RHEL 4.0 and that is the max version supported by Redhat for that version). Ever since I did that POP3 works fine but now webmail is almost not available to the users. People usually get "connection dropped by IMAP server". However the IMAP server seems to work fine. Checked through manual "telnet
I noticed that while the number of established connections for the webmail to mail server was shown as around 40 to 50 on the mail server, the same is shown as around 700 on webmail server. { netstat -an | grep :143 | grep ESTABLISHED | wc -l }.
imapproxyd is configured to listen on port 9143 on the localhost and communicates to the mail server on std port 143. What was really bizzare is that when I check for the number of connections on port 9143 it shows around 8000!
netstat -an | grep :9143 | grep ESTABLISHED | wc -l
So I disabled the imapproxyd on the webmail & now at least the 50 connections are consistent. However the response is extremely slow and so was contemplating on the idea of trying out using another IMAP Proxy server and hence the question.
I don't understand Databases and don't want to install mysql etc for a simple thing like IMAP PRoxy.
Do you just want it to proxy everyone to a single destination or to different servers based on username? If you want everyone to the same destination, why do you even want to use a proxy?
I want to proxy all user to the same server. The idea being as explained above benefit from caching.
My question is can Dovecot be run as a IMAP PRoxy without the hassle of setting up mysql etc? I use /etc/passwd for auth on the actual dovecot server running IMAP & POP3.
Using checkpassword or SQLite would probably be the easiest solution. Or generation of a passwd-file, but you'd have to keep it updated if users change.
If I used a passwd file on the webmail machine, running dovecot as a Proxy how would I configure dovecot on the webmail server? It has to accept connections from the squirrelmail and talk to the mailserver. I can do a rsync of the passwd file from the mail server to the webmail server using a small script whenever the file changes on the mail server.
Of course the fundamental question from your response, I guess is, without a proxy why is the webmail slow? If proxy is not my problem, can you pls throw some light on why I am facing performance issues on my webmail alone?
Thanks and Regards V S Rao
On Thu, 2009-05-21 at 11:10 -0700, V S Rao wrote:
So switched to Dovecot 0.99.x (I run the server on RHEL 4.0 and that is the max version supported by Redhat for that version).
Oh, no.. I had had hoped people would have stopped running v0.99 by now :) That's probably the cause of all your problems. Also did you plan on using it for proxying? I don't think 0.99 supports proxying.
With v1.0+ your webmail would probably work just fine without even proxying.
V S Rao wrote:
Hi Timo,
Thanks for the response. Apologize, but my responses are going to be a bit lengthy.
I have migrated from uw-imap to Dovecot for POP3 & IMAP service. I run webmail using squirrelmail. When running uw-imap I used to run up.imapproxyd on the webmail server for faster responses. After migrating to Dovecot, I find that up.imapproxyd does not work well with dovecot.
Why not?
Here are my observations. I have around 6000+ mailboxes and roughly the same number of users. Earlier the mail server (running sendmail + uw-imap for POP3 & IMAP) would have around 80 pop3 connections (peak) and around 300 IMAP connections, concurrent. (ps -aef | grep imap | wc -l or ps -aef | grep pop3 | wc -l). There have been cases where I have observed upto 500 concurrent IMAP sessions.
The IMAP connections are from a webmail server running Apache with Squirrelmail. The observation was that response was slow & so based on the suggestion on Squirrelmail for performance improvement we have installed up-imapproxyd on the squirrelmail machine. There was a significant improvement in the response times for the users, because of caching.
After that I encountered some strange problems of POP3 timing out for users (earlier I did post that problem in this forum). I opened a ticket with Redhat and naturally they refused to support me with uw-imap running. So switched to Dovecot 0.99.x (I run the server on RHEL 4.0 and that is the max version supported by Redhat for that version). Ever since I did that POP3 works fine but now webmail is almost not available to the users. People usually get "connection dropped by IMAP server". However the IMAP server seems to work fine. Checked through manual "telnet
143 & also through other client such as outlook & Thunderbird.
I realize you're using 0.99 because it's "supported" by RedHat, but in reality it's absolutely ancient history. There have been far too many performance enhancements/fixes between then and now to even begin to list.
~Seth
on 5-21-2009 11:33 AM Seth Mattinen spake the following:
V S Rao wrote:
Hi Timo,
Thanks for the response. Apologize, but my responses are going to be a bit lengthy.
I have migrated from uw-imap to Dovecot for POP3 & IMAP service. I run webmail using squirrelmail. When running uw-imap I used to run up.imapproxyd on the webmail server for faster responses. After migrating to Dovecot, I find that up.imapproxyd does not work well with dovecot. Why not? Here are my observations. I have around 6000+ mailboxes and roughly the same number of users. Earlier the mail server (running sendmail + uw-imap for POP3 & IMAP) would have around 80 pop3 connections (peak) and around 300 IMAP connections, concurrent. (ps -aef | grep imap | wc -l or ps -aef | grep pop3 | wc -l). There have been cases where I have observed upto 500 concurrent IMAP sessions.
The IMAP connections are from a webmail server running Apache with Squirrelmail. The observation was that response was slow & so based on the suggestion on Squirrelmail for performance improvement we have installed up-imapproxyd on the squirrelmail machine. There was a significant improvement in the response times for the users, because of caching.
After that I encountered some strange problems of POP3 timing out for users (earlier I did post that problem in this forum). I opened a ticket with Redhat and naturally they refused to support me with uw-imap running. So switched to Dovecot 0.99.x (I run the server on RHEL 4.0 and that is the max version supported by Redhat for that version). Ever since I did that POP3 works fine but now webmail is almost not available to the users. People usually get "connection dropped by IMAP server". However the IMAP server seems to work fine. Checked through manual "telnet
143 & also through other client such as outlook & Thunderbird. I realize you're using 0.99 because it's "supported" by RedHat, but in reality it's absolutely ancient history. There have been far too many performance enhancements/fixes between then and now to even begin to list.
~Seth
Besides, he didn't go to RedHat for support anyway. He came here. And here says start with at least the latest 1.0 version, or maybe even 1.1. You can get it from atrpms.net if you want an rpm.
Scott Silva wrote:
on 5-21-2009 11:33 AM Seth Mattinen spake the following:
V S Rao wrote:
Hi Timo,
Thanks for the response. Apologize, but my responses are going to be a bit lengthy.
I have migrated from uw-imap to Dovecot for POP3 & IMAP service. I run webmail using squirrelmail. When running uw-imap I used to run up.imapproxyd on the webmail server for faster responses. After migrating to Dovecot, I find that up.imapproxyd does not work well with dovecot. Why not? Here are my observations. I have around 6000+ mailboxes and roughly the same number of users. Earlier the mail server (running sendmail + uw-imap for POP3 & IMAP) would have around 80 pop3 connections (peak) and around 300 IMAP connections, concurrent. (ps -aef | grep imap | wc -l or ps -aef | grep pop3 | wc -l). There have been cases where I have observed upto 500 concurrent IMAP sessions.
The IMAP connections are from a webmail server running Apache with Squirrelmail. The observation was that response was slow & so based on the suggestion on Squirrelmail for performance improvement we have installed up-imapproxyd on the squirrelmail machine. There was a significant improvement in the response times for the users, because of caching.
After that I encountered some strange problems of POP3 timing out for users (earlier I did post that problem in this forum). I opened a ticket with Redhat and naturally they refused to support me with uw-imap running. So switched to Dovecot 0.99.x (I run the server on RHEL 4.0 and that is the max version supported by Redhat for that version). Ever since I did that POP3 works fine but now webmail is almost not available to the users. People usually get "connection dropped by IMAP server". However the IMAP server seems to work fine. Checked through manual "telnet
143 & also through other client such as outlook & Thunderbird. I realize you're using 0.99 because it's "supported" by RedHat, but in reality it's absolutely ancient history. There have been far too many performance enhancements/fixes between then and now to even begin to list.
~Seth
Besides, he didn't go to RedHat for support anyway. He came here. And here says start with at least the latest 1.0 version, or maybe even 1.1. You can get it from atrpms.net if you want an rpm.
Yes, that too. My point was not to judge Dovecot's performance based on a 0.99 version. ;) I've successfully used several versions of dovecot 1.1.x with imapproxyd and IMAP-only webmail clients.
~Seth
On Thu, 2009-05-21 at 11:47 -0700, Seth Mattinen wrote:
Yes, that too. My point was not to judge Dovecot's performance based on a 0.99 version. ;) I've successfully used several versions of dovecot 1.1.x with imapproxyd and IMAP-only webmail clients.
Do you have any numbers about how much faster it works with imapproxyd vs. without?
Timo Sirainen wrote:
On Thu, 2009-05-21 at 11:47 -0700, Seth Mattinen wrote:
Yes, that too. My point was not to judge Dovecot's performance based on a 0.99 version. ;) I've successfully used several versions of dovecot 1.1.x with imapproxyd and IMAP-only webmail clients.
Do you have any numbers about how much faster it works with imapproxyd vs. without?
I've never run it without. I just did it because I'd rather collapse the 10 distinct logins a typical webmail client will make for every click into a single login.
~Seth
participants (4)
-
Scott Silva
-
Seth Mattinen
-
Timo Sirainen
-
V S Rao