IMP connects twice to POP server
Carlton Thomas
carlton@gifford.co.uk
Tue, 26 Mar 2002 18:23:30 +0000 (GMT/BST)
Hi again,
Sorry, I seem to be talking to myself and replying to my own posts,
but I am just getting more and more desperate to find a solution to
this problem. The weird thing is that I seem to be the only one using
POP that is having this problem!!!
I have been trawling through the code (my first time looking at PHP)
and have come to the conclusion that IMP is not waiting for the reply
from the POP server which indicates that the connection has been
closed, before attempting to make another connection. I have modified
"imp/lib/IMP.php" by inserting "sleep (2)" just before each call to
"imap_open" and that seems to have cured the problem. Obviously, the
wait should depend on what the POP server needs to do before closing
the mailbox, however, 2 seconds seems to be sufficient for the size of
mailbox i described in my previous post and, more importantly, it
fixes the problem.
The downside of this mod, is that IMP is less responsive, since it has
to delay for 2 seconds before every access to the POP server. Talking
of access to the POP server, wow!!!, why does IMP need to talk to the
server so often? It seems like everything I ask IMP to do results in
a connection to the POP server. If i select compose, options, change
user preferences, use the back button to go back to previous page, all
result in a POP access. Is this just a problem with IMP accessing the
mailboxes via POP3? Ultimately, i would like to replace our current
DMailWeb system with IMP, but with a lot of clients using webmail,
DMailWeb is a lot kinder to the POP server. Any thoughts?
Again, any replies and/or pointers would be greatly appreciated.
Regards !
--
Carlton
=============================
GIFFORD INTERNET SERVICES
Bristol, United Kingdom
Tel: 0845 111 0032
Tel: 0117 939 7722
Fax: 0845 111 0033
Email: admin@gifford.co.uk
Web: http://www.gifford.co.uk
=============================
On Mon, 25 Mar 2002, Carlton Thomas wrote:
>
> Hi,
>
> I recently posted the message below to get some help with sorting
> out a problem we have using IMP to retrieve email from POP3 mailboxes.
> I am still struggling with this one and am no nearer to finding a
> solution.
>
> As a test, I used the demo version on the Horde site to access one of
> the mailboxes containing approx. 20 messages with a total size of about
> 20 megabytes. The demo version worked ok and i could see the contents
> of te mailbox. However, looking at the POP server logs, i could see
> that the demo version did exactly the same as the version I installed,
> ie. it made 2 accesses to the POP server, but, there was a 20 seconds
> gap between the two accesses.
>
> Is this something that is built into the demo version, and if it is,
> is there a configuration option that I could use to insert a delay
> between the first and second access.
>
> Any help or pointers in the right direction would be greatly appreciated.
>