Skip to content
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

Simplify POP3 message indexing #10

Closed
mwpowellhtx opened this issue Feb 11, 2014 · 1 comment
Closed

Simplify POP3 message indexing #10

mwpowellhtx opened this issue Feb 11, 2014 · 1 comment

Comments

@mwpowellhtx
Copy link

Per the POP3 specification, UID is an optional feature. Indexing, on the other hand, is considered fundamental; there is no other way to really and truly "index" messages than this. Even the UID depends on the underlying index, but risks falling out of sync with the index in all the client/server roundtrips. Short of providing a best-effort type of strategy pattern resolving index-UID issues, how hard would it be to put a simple IMessageSpool interface in; one in which it was simply index-based and not UID-based. I've got logic in my service that depends on indexing as well; that will save me having to rip that out and replace with UID-based approach (for previously mentioned risks).

@jstedfast
Copy link
Owner

Even the UID depends on the underlying index, but risks falling out of sync with the index in all the client/server roundtrips.

No.... it really doesn't. The mailbox is locked and messages are not actually deleted until the connection is closed, thus the UIDs and the indexes they map to stay identical for the entire session. More messages may arrive, I suppose, but the messages that exist at the start of the session will not go away until it is closed.

how hard would it be to put a simple IMessageSpool interface in; one in which it was simply index-based and not UID-based.

You mean like all of the index-based APIs that already exist in IMessageSpool? No time at all, because they are already there. Every method has 2 forms: one takes a uid and one takes an index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants