Use SEARCH command instead of STATUS for UNSEEN query as it's more efficient and correct according to RFC-3501
patch ff24551724e04c3827a8d24ee5495dd643bc65ee
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Mon May 30 20:53:02 CEST 2016
* Use SEARCH command instead of STATUS for UNSEEN query as it's more efficient and correct according to RFC-3501
hunk ./idlebiff 303
- variable ::shared::conf
-
- imap_command_tagged $con "STATUS $conf(mailbox) (UNSEEN)"
+ imap_command_tagged $con "SEARCH UNSEEN"
hunk ./idlebiff 329
- if $check \
- { [_$_]
- exit_mailbox $con
- ask_unseen $con
- enter_mailbox $con
- }
+ if $check { ask_unseen $con }
hunk ./idlebiff 340
+ enter_mailbox $con
hunk ./idlebiff 342
- enter_mailbox $con
hunk ./idlebiff 414
- append statusexp {^\*\s+status\s+} {"*} $conf(mailbox) {"*} {\s+\(unseen\s+(\d+)\).*$}
- if [ regexp -lineanchor -nocase $statusexp $linea -> new_messages ] \
+ if [ regexp -lineanchor -nocase {^\*\s+search\s+(.*)$} $linea -> msg_list ] \
hunk ./idlebiff 416
+ set new_messages [ llength $msg_list ]