performance of imap_open: is 5-15 secs normal?

Rob Siemborski rjs3 at
Tue Apr 22 21:41:16 EDT 2003

How is entropy on your system?  It seems likely that it is blocking on

strace/truss the imapd to see where the time is being taken.


On Tue, 22 Apr 2003, Bill McCoy wrote:

> Hello,
> I am hoping to migrate from Exchange to "real" IMAP for an application that
> combines normal mail client use with a custom PHP presentation of certain
> mailboxes. On a vanilla RedHat 8.0 install on a half-decent machine (dual
> PIII 800Mhz, 1gig RAM)  I have removed UW imapd and installed Cyrus from
> Simon Matter's RPMs. However, I noted that imap_open is very very slow
> against this system, taking close to 5 secs from IIS+PHP running on a
> Windows machine on the same local network and a whopping 15 secs from
> Apache/PHP running on the same machine (localhost). Whereas it's only .06
> secs to imap_open from the same Windows machine against a local (but not
> same machine) Exchange server. Other imap calls (imap_getmailboxes,
> imap_fetchoverview) are a bit slower against Cyrus than against Exchange but
> are certainly in the same ballpark and are sub-second not multi-second: e.g.
> a series of imap_fetchoverview's totals.49 secs against Exchange and .58
> secs against Cyrus, which is no biggie.
> I have ensured (I believe) that plaintext authentication is being used. My
> /etc/imapd.conf looks like:
> ...
> allowplaintext: yes
> cleartextloginpause: 0
> sasl_pwcheck_method: saslauthd
> sasl_mech_list: PLAIN
> tls_cert_file: /usr/share/ssl/certs/cyrus-imapd.pem
> tls_key_file: /usr/share/ssl/certs/cyrus-imapd.pem
> and when I login from my PHP code "/var/log/messages" logs lines like
> "Apr 23 05:23:47 login: (domain)[] (user) plaintext"'
> my call to imap_open doesn't even select a mailbox, it looks like:
> imap_open("{localhost/imap/notls}", $imap_user, $imap_password,OP_HALFOPEN)
> I don't think it's a basic DNS issue; pings to the server name or localhost
> are all sub-ms response.
> So I'm a bit puzzled and my questions include:
> 1) is 5-15 secs. for imap_open normal for Cyrus? It sure doesn't seem
> reasonable to me, esp. since this is a fresh DB with only 2 users and a
> handful of mailboxes. I removed UW imapd in favor of Cyrus for several
> reasons (e.g. ACLs) but one was that I thought Cyrus was supposed to
> outperform UW.
> 2) if not, can someone diagnose suspected problem(s) from the above?
> 3) what would cause imap_open from a remote host to take 5 secs while from
> the same machine it takes 15 secs?
> Thanks in advance,
> --Bill McCoy
> bill.mccoy at <mailto:bill.mccoy at>

Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper

More information about the Info-cyrus mailing list