<!DOCTYPE html><html><head><title></title><style type="text/css">#fastmail-quoted p.fastmail-quoted-MsoNormal,#fastmail-quoted  p.fastmail-quoted-MsoNoSpacing{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>One more data point Timo:</div><div><br></div><div>On Tue, Mar 12, 2019, at 9:58 AM, Kostya Vasilyev via dovecot wrote:<br></div><blockquote type="cite" id="fastmail-quoted"><div>Timo,<br></div><div><br></div><div>On Tue, Mar 12, 2019, at 3:56 AM, Timo Sirainen via dovecot wrote:<br></div><blockquote id="fastmail-quoted-fastmail-quoted" type="cite"><div>On 10 Mar 2019, at 10.14, Kostya Vasilyev via dovecot <<a href="mailto:dovecot@dovecot.org" class="fastmail-quoted-fastmail-quoted-">dovecot@dovecot.org</a>> wrote:<br></div><div><blockquote type="cite" class="fastmail-quoted-fastmail-quoted-"><div><br></div><div class="fastmail-quoted-fastmail-quoted-"><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">My mail is stored under ~/mail/.imap (not sure what this format is called), I mean not "single file mbox".</span></span><br></div><div><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">I have not changed any IDLE related config settings:</span></span><br></div><div><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">doveconf  | grep -i idle</span></span><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">default_idle_kill = 1 mins</span></span><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">director_ping_idle_timeout = 30 secs</span></span><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">imap_idle_notify_interval = 2 mins</span></span><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">imapc_max_idle_time = 29 mins</span></span><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">mailbox_idle_check_interval = 30 secs</span></span><br></div><div><br></div><div><span style="font-family:Helvetica" class="font"><span style="font-size:12px" class="size">What can I do to make Dovecot notify IDLE clients about flags changes - more quickly? Preferably near-instant?</span></span><br></div></div></blockquote></div><div><br></div><div class="fastmail-quoted-fastmail-quoted-">It should simply just work, assuming there aren't any weird inotify limits, but you should get errors logged about reaching those. You could see if it makes any difference to set mailbox_idle_check_interval=1s<br></div><div class="fastmail-quoted-fastmail-quoted-"><br></div></blockquote><div><br></div><div>mailbox_idle_check_interval = 1 secs<br></div><div><br></div><div>did not help<br></div><div><br></div><div>Here is an interesting case<br></div><div><br></div><div>- Let's say I have my IDLE connection.<br></div><div><br></div><div>- Connection "A" - an email app where I set or clear \Flagged on two messages.<br></div><div><br></div><div>The IDLE connection is silent (no unsolicited notifications about these flags).<br></div><div><br></div><div>- Connection "B" - an email app where I do a refresh - it does a SELECT (CONDSTORE) followed by FETCH UID FLAGS CHANGEDSINCE (because it sees that there are only flags changes).<br></div><div><br></div><div>---> the IDLE connection is notified about flags changes immediately right as Connection "B" is pulling its changes.<br></div><div><br></div><div>I tried a direct network connection (netcat) instead of Connection "B" and the actual trigger is SELECT (CONDSTORE).<br></div><div><br></div><div>- Start up IDLE connection<br></div><div><br></div><div>- Use Connection "A" to make flags changes<br></div><div> <br></div><div>( IDLE connection is silent )<br></div><div><br></div><div>- Use a netcat connection to SELECT (CONDSTORE)<br></div><div><br></div><div>Dovecot flushes flags to the IDLE connection immediately<br></div><div><br></div><div>- Doing SELECT (without CONDSTORE) does not<br></div><div><br></div><div>Looks like some sort of bug in Dovecot related to CONDSTORE?<br></div><div><br></div><div>This can probably be reproduced with several direct network connections using netcat / openssl s_client - and CONDSTORE seems to be an important part of the scenario.<br></div><div><br></div><div>Ideas?<br></div><div><br></div><div>-- K<br></div></blockquote><div><br></div><div>It makes no difference if the IDLE connection does SELECT or SELECT (CONDSTORE) prior to going IDLE.<br></div><div><br></div><div>But then as far as I know (?) - in Dovecot, once any connection uses CONDSTORE ever, even once, Dovecot creates data structures to track MODSEQ values, and those data structures are forever.<br></div><div><br></div><div>-- K<br></div><div><br></div></body></html>