List:Eventum General Discussion« Previous MessageNext Message »
From:Harri Porten Date:July 7 2006 6:43pm
Subject:Re: Messages left on server
View as plain text  
On Thu, 6 Jul 2006, Bryan Alsdorf wrote:

>> We are using the POP3 protocol with Eventum 1.6.1 to fetch messages from 
>> the server. Works fine except that fetched messages remain on the server 
>> causing the message box to grow and the fetching to get slower and slower.
>> 
>> The "Leave Copy of Messages On Server" option is *not* checked.
>
> Is the script ending cleanly?

Yes. The lock file is removed for example.

> Or are there errors being generated?

Not unless there is a real error with the POP3 server.

> You might 
> want to open up include/class.support.php, and go to about line 707. It 
> should look like this:
>
>            if ($res > 0) {
>                // need to delete the message from the server?
>                if (!$info['ema_leave_copy']) {
>                    @imap_delete($mbox, $num);
>                } else {
>                    // mark the message as already read
>                    @imap_setflag_full($mbox, $num, "\\Seen");
>                }
>            }
>
> I would add some debug information here to see if imap_delete is being 
> called.

It is.

> I would also try adding imap_expunge($mbox); directly after the call 
> to imap_delete.

Doesn't the pose the risk of wrecking the list of indices? That's what I 
got from some posting on the Net regarding imap_expunge() problems.

Anyway, from the debug output I added the control flow seems okay. It's 
just that expunging does not work. No matter whether I use imap_expunge() 
or the expunge flag for the (missing) imap_close() call.

Starts to look like an incompatiblity between my version of PHP and the 
POP server. Will have to reproduce this with a standalone script.

Harri.
Thread
Messages left on serverHarri Porten5 Jul
  • Re: Messages left on serverBryan Alsdorf7 Jul
    • Re: Messages left on serverHarri Porten7 Jul