-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail check fires with 1 unread email even if required count > 1 #147
Comments
Hi, What kind of IMAP server are you connecting to? (Gmail, Fastmail, etc) That is, is it a service I could sign up for and try out? It may be the server is not returning numeric values to the It could be instructive to open up the Developer Tools by going to the menu option Blink1Control2 -> Toggle Developer Tools, then clicking on the "Console" tab in the developer window and look for the lines You may need to shut down Blink1Control2 and add this section to your
|
It's hosted on a private service but if needed I can set you up with an account for debugging. However, I think I've found a few things. Playing around with Wireshark then manually simulating what I think B1C2 is doing. Here's what I sent and what the responses were:
(Hopefully it's obvious that I typed the lines starting with A15 and A15). It looks like the response was saying that 29 was a new message. I then told it to idle and got this:
Here's what I found in the debug console: 1600135173505: ImapSearcher.on-mail: unread 1 If it helps, I know that the backend is running what should be a reasonably recent version of Dovecot. Let me know if you want me to set you up with an account to test. |
Thank you for the detailed debug sleuthing, it's incredibly helpful. Let me do some tests on my end first before I ask for a test account. There was a least one previous issue (#55) about looking only at new messages vs all messages. The current behavior is to look at only new messages but perhaps that is not the correct approach for unread count. (I assume this is what the above is representing too, if not let me know) |
I've been looking to tinker with the code a little but I'm not that familiar with JS. In imapSearcher.js is this what actually does the search
Is "imap" like a library function? |
Hi @dkozinn, yes |
No worries at all, I was just trying to understand the flow a bit better. I don't know if I'd ever get around to it, but I was thinking about a few other ways of dealing with email, most around being able to use a regex. But I haven't thought this through and don't know if it's worth the effort, I just wanted to get a basic idea of how the pattern matching worked. As far as the number thing, I did see the comments and some of the code that got changed as a result of #55. I think I might have sent you an email about this, but I realize that both "total unread" vs. "unread since last checked" have value. My personal preference would be "total number of unseen") which you can get from |
Yes, this is going to take a bit of thought. :) But if you're wondering about searching, check out the IMAP SEARCH command, which is what |
I'm running Blink1Control2 2.2.4 under Windows 10 20H2 (build 19042.508). I have an event source configured against my IMAP email server to trigger if I have 4 or more unread emails. Even though it shows "Play pattern when Unread email count >=4" the pattern plays even with a single unread email.
Here's the section of the configuration file (redacted) showing how it's configured:
It does turn off when the number of unread goes to zero.
The text was updated successfully, but these errors were encountered: