<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Timo,<br></div><div><br></div><div>On Wed, Mar 13, 2019, at 12:39 AM, Timo Sirainen wrote:<br></div><blockquote id="fastmail-quoted" type="cite"><div>On 12 Mar 2019, at 10.21, Kostya Vasilyev via dovecot <<a href="mailto:dovecot@dovecot.org" class="fastmail-quoted-">dovecot@dovecot.org</a>> wrote:<br></div><div><blockquote type="cite" class="fastmail-quoted-"><div><br></div><div class="fastmail-quoted-"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:initial;text-decoration-color:initial;" class="fastmail-quoted-">It makes no difference if the IDLE connection does SELECT or SELECT (CONDSTORE) prior to going IDLE.<br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:initial;text-decoration-color:initial;" class="fastmail-quoted-"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:initial;text-decoration-color:initial;" class="fastmail-quoted-">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></blockquote></div><div>So are you saying that you can reproduce if you do for a completely new user:<br></div><div><br></div><div>doveadm exec imap -u testuser1<br></div><div>a select inbox<br></div><div>b idle<br></div><div><br></div><div>And then run:<br></div><div>echo foo | doveadm save -u testuser1<br></div><div>doveadm flags add -u testuser1 '\Seen' mailbox inbox 1<br></div><div><br></div><div>And the EXISTS shows up immediately after saving, but the flag change won't show up? It works fine with me.<br></div><div><br></div><div>Do you see any errors in "doveadm log errors"? Can you reproduce this if you try with some other mailbox format than mbox?<br></div><div><br></div></blockquote><div><br></div><div>1 - Yes I was able to reproduce with a completely new user.<br></div><div><br></div><div>I didn't use your doveadm commands above, but created a new Linux user in group mail, set a password in /etc/dovecot/users, and sent a few emails to that user from another mail account / web mail. My SMTP server is Postfix.<br></div><div><br></div><div>Then I used my IDLE client code (which does SELECT CONDSTORE) and a separate netcat connection to make flags changes.<br></div><div><br></div><div>Same thing as before: 1) no flags changes flushed to IDLE 2) until the other connection (which changed flags) does a SELECT.<br></div><div><br></div><div>The only difference from before - it was enough for netcat to do plain SELECT (i.e. SELECT CONDSTORE was not necessary).<br></div><div><br></div><div>I also tried a netcat connection instead of "my IDLE client" and did plain SELECT before going IDLE (i.e. SELECT without CONDSTORE). Same thing: 1) delay 2) flags changes are flushed after the other connection does SELECT.<br></div><div><br></div><div>2 - I switched to Maildir last night - and the problem stopped for same old existing user.<br></div><div><br></div><div>So it looks triggered by a combination of mbox + SELECT (CONDSTORE)?<br></div><div><br></div><div>3 - No errors in doveadm log errors<br></div><div><br></div><div>4 - /var/log/mail.err has this<br></div><div><br></div><div>Mar 13 09:21:17 kman dovecot: auth: Error: Master requested auth for nonexistent client 29548 (created 0 msecs ago, handshake 0 msecs ago)<br></div><div>Mar 13 09:21:18 kman dovecot: imap-login: Error: net_connect_unix(/var/run/dovecot/stats-writer) failed: No such file or directory<br></div><div><br></div><div>Probably means nothing - I tried to log in with IMAP before remembering to add my new user to /etc/dovecot/users<br></div><div><br></div><div>-- K<br></div><div><br></div></body></html>