[Dovecot] Re: New mail sometimes fails to appear

Tom Alsberg alsbergt at cs.huji.ac.il
Sun Feb 5 12:06:47 EET 2006


Hi there...

I am still awaiting replies to my last (rather long) message on this
subject.  Some assistance in debugging would be appreciated.

In the meanwhile, getting deeper into the sequence of calls when new
mail arrives, I have traced the issue to be related the following in
imap_sync_deinit(...):

	if (status.messages != ctx->messages_count) {
		client_send_line(ctx->client,
			t_strdup_printf("* %u EXISTS", status.messages));
	}

As I understand, at this point, status.messages should be the number
of messages in the mailbox, and ctx->message_count the number of
messages last reported to the client.

Putting some debugging prints in there, it appears that sometimes when
new mail arrives to the mbox, while Dovecot did detect that the mtime
of the mailbox has changed, at this point, status.messages does not
reflect that (for some reason - although there is new mail in the
mailbox), and therefore no EXISTS message is sent to the client.

Any insights on that?

On another note, shouldn't the EXISTS message be on IDLE sent whenever
there is a change in the mailbox?  After all, a message can be
replaced or changed, in which case the number of messages will not be
updated, but one would want the client informed on the change...

  Thanks, help appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page:	http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


More information about the dovecot mailing list