Opened 15 years ago

Closed 15 years ago

#170 closed defect (fixed)

imap_open is slow to authenticate

Reported by: dmorton Owned by: rjl
Priority: normal Milestone: 1.0.0 RC6
Component: PHP scripts Version: 1.0.0 RC5
Severity: major Keywords:


php's imap_open, which is used for both imap and pop3 auth, lists the contents of the mailbox, which can be quite slow for users that receive a lot of email. Perhaps we should consider using PEAR modules for this.

Change History (6)

comment:1 Changed 15 years ago by jwgreene@…

Net_IMAPProtocol looks like the way to go.. Using the cmdAuthenticate method, very the account can log on and the continue on the way. Should we also use the PEAR modules to get the actual mail, or are we already doing this?

comment:2 Changed 15 years ago by dmorton

No, we don't touch the actual mail, as it is stored in an SQL cache. So all we need to do is auth and run. :)

comment:3 Changed 15 years ago by dmorton

I currently have issues with Net_IMAP... It seems there is a bug with it and courier imap. I get:

2730,/usr/share/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:must be a ' ' but is a ')' !!!! 1

This has been reported to the pear folks at

This is with Net_IMAP 1.0.3

comment:4 Changed 15 years ago by dmorton

Ah ha! Calling login like this works around the bug.

$mbox->login($user, $pass, false, false);  

comment:5 Changed 15 years ago by dmorton

Probable fix: [586]

comment:6 Changed 15 years ago by dmorton

  • Resolution set to fixed
  • Status changed from new to closed

I think the new procedure is working.

Note: See TracTickets for help on using tickets.