[Dovecot] During FTS reindexing, search commands unceremoniously exit

Timo Sirainen tss at iki.fi
Tue Dec 18 21:26:14 EET 2012


On Thu, 2012-12-06 at 12:31 -0500, Dave Abrahams wrote:
> Is this intentional?  Closing the connection without warning doesn't
> seem like the best response...
> 
> --8<---------------cut here---------------start------------->8---
> % printf "1 select \"INBOX\"\n2 search body quack\n3 logout\n" | /opt/local/libexec/dovecot/imap
> * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE SEARCH=FUZZY] Logged in as dave
> * FLAGS (\Answered \Flagged \Deleted \Seen \Draft gnus-forward gnus-expire)
> * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft gnus-forward gnus-expire \*)] Flags permitted.
> * 31 EXISTS
> * 0 RECENT
> * OK [UIDVALIDITY 1349969399] UIDs valid
> * OK [UIDNEXT 1376] Predicted next UID
> * OK [HIGHESTMODSEQ 2908] Highest
> 1 OK [READ-WRITE] Select completed.
> imap(dave): Info: Connection closed in=45 out=2027404
> % 

I think the problem is that SEARCH command returns to the main loop
while it waits for the indexing to finish. The main loop then notices
that the client has already disconnected.

So that kind of piping of commands isn't very reliable. This probably
works:

(printf "1 select \"INBOX\"\n2 search body quack\n3 logout\n"; read) | /opt/local/libexec/dovecot/imap



More information about the dovecot mailing list