Dave Abrahams
2012-Dec-06 17:31 UTC
[Dovecot] During FTS reindexing, search commands unceremoniously exit
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 % --8<---------------cut here---------------end--------------->8--- -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
Timo Sirainen
2012-Dec-18 19:26 UTC
[Dovecot] During FTS reindexing, search commands unceremoniously exit
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