Git Product home page Git Product logo

Comments (10)

jonhoo avatar jonhoo commented on July 4, 2024

Hmm, that's odd indeed. Buzz should notify you about emails that are in the IMAP NEW status, which means (from the spec):

Messages that have the \Recent flag set but not the \Seen flag.

If you look at the emails in another IMAP client, can you check the flags on the messages in your inbox and see if that matches? What output do you get in the logs?

from buzz.

maltalef101 avatar maltalef101 commented on July 4, 2024

Even with a freshly recieved email Dovecot doesn't set the \Recent flag, only the \Seenone, at least that's what I can tell from the output of a doveadm fetch command. I'll look into that first.

I don't get any errors in stdout when its running, only some (I'm guessing) GTK errors about I don't even know what.

image

from buzz.

jonhoo avatar jonhoo commented on July 4, 2024

That's really weird, and sounds like a Dovecot bug if it's indeed the case ๐Ÿค”

from buzz.

maltalef101 avatar maltalef101 commented on July 4, 2024

It does seem like a Dovecot bug, but the flag actually exists, and isn't stored like all the other regular flags? I'm really not sure about what's going on. I'm now trying with only my Gmail account in the buzz.toml config file to see if it actually works, but I'm pretty sure that it doesn't either.

Nonetheless, thank you very much for responding to an issue on a project that is not that actively developed. :]

from buzz.

maltalef101 avatar maltalef101 commented on July 4, 2024

I have the means to modify and rebuild the code, how would I go about debugging this? I am really not sure about how to check email flags on Gmail because I've spent so much time in Dovecot and roundcube that I don't use Gmail that much :P

from buzz.

jonhoo avatar jonhoo commented on July 4, 2024

@maltalef101 Sorry for the late reply! Best way to go is to set the debug flag in imap to true, which will show you all the client-server interactions. Then you could use something like wireshark to inspect what happens when a "regular" email client connects to your Dovecot server, and compare the two. Hopefully it should be visible what the difference in the queries is!

from buzz.

maltalef101 avatar maltalef101 commented on July 4, 2024

I recently started investigating about this again and found out something interesting. The \Recent flag does not exist anymore, it's been deprecated since the release of RFC9051 in August of last year.

Take a look at Appendix E, item 12: (link)

RECENT response on SELECT/EXAMINE, \Recent flag, RECENT STATUS, and SEARCH NEW items are now deprecated.

This, obviously, was a surprise. I manually connected to my Dovecot instance and ran SEARCH NEW just seconds after receiving a message and the search came out empty. I have no idea how this type of functionality could be re-implemented not using the NEW status, now that it basically doesn't exist.

from buzz.

jonhoo avatar jonhoo commented on July 4, 2024

That's bizarre! Does the RFC outline why, and what the appropriate replacement is? Maybe we can look at what something like Thunderbird or K9 mail does?

from buzz.

maltalef101 avatar maltalef101 commented on July 4, 2024

Hey. Looking into this again.

I haven't checked Thunderbird's or K9's implementation of push notifications, but I suspect it's implemented with IMAP's NOTIFY extension.

For the new messages delivered to or appended to the selected mailbox, the NOTIFY command can be used to request that a set of attributes be sent to the client in an unsolicited FETCH response. This allows a client to be a passive recipient of events and new mail and to be able to maintain full synchronisation without having to issue any subsequent commands except to modify the state of the mailbox on the server.

Having a connection that constantly listens for unsolicited FETCH responses with a given SEARCH pattern could be a good idea.

If the new/appended message is in the selected mailbox, the server notifies the client by sending an unsolicited EXISTS response, followed by an unsolicited FETCH response containing the information requested by the client. A FETCH response SHOULD NOT be generated for a new message created by the client on this particular connection, for instance, as the result of an APPEND or COPY command to the selected mailbox performed by the client itself. The server MAY also send a RECENT response, if the server marks the message as \Recent.
Section 5.2

This looks really nice! Much of the hard work is already done by the server's IMAP implementation. I see that this project uses your Rust IMAP crate, ยฟdoes it implement this extension?

from buzz.

jonhoo avatar jonhoo commented on July 4, 2024

It doesn't unfortunately. jonhoo/rust-imap#63 would be the thing to keep an eye out for!

from buzz.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.