Discussion:
wrong unread count on imap server synced with offlineimap
Julien Cubizolles
2018-02-10 15:19:12 UTC
Permalink
First of all I'd like to know what the status is regarding the of the
unread messages count for the nnimap backup. A few years ago, I'd been
told that Gnus couldn't provide an accurate number since it didn't
directly queried the IMAP server but computed it from some message ID
number. Is that still the case ?

Second, I'm experiencing a strange behaviour. I'm syncing my ISP imap
folders on two different computers with offlineimap. I'm also syncing the
.newsrc.eld file between the computers. I'd expect Gnus to display the
same unread counts on both computers but while it's correct on one, it's
off by several thousands on the other one. Is offlineimap to blame ?

Julien.
Dan Christensen
2018-02-10 16:43:52 UTC
Permalink
I don't know the answer to your first question, but regarding your
Post by Julien Cubizolles
Second, I'm experiencing a strange behaviour. I'm syncing my ISP imap
folders on two different computers with offlineimap. I'm also syncing the
.newsrc.eld file between the computers. I'd expect Gnus to display the
same unread counts on both computers but while it's correct on one, it's
off by several thousands on the other one. Is offlineimap to blame ?
I don't think your set-up makes sense. I don't think it is possible
for offlineimap to ensure that the two IMAP servers use the same
internal message numbers when it copies messages. And Gnus uses
these numbers to track things like unread status, so you shouldn't
use the same .newsrc.eld for the two servers. If you don't
synchronize the .newsrc.eld, things should work fine.

Dan
Bob Newell
2018-02-11 02:34:06 UTC
Permalink
Aloha,

I use and sync the same .newsrc.eld file across several computers and
two IMAP servers, but I let Gnus pull from the servers directly and
don't use offlineimap. There is never a discrepancy this way.

FWIW you can check the unread count directly by capturing (and
parsing, if you wish) the output of this command:

curl -s --insecure --url "imaps://whatever.imap.server" --user
"myuserid:mypassword" --request "STATUS INBOX (UNSEEN)"

Bob Newell
Honolulu, Hawai`i
Julien Cubizolles
2018-02-11 12:32:32 UTC
Permalink
Post by Dan Christensen
I don't think your set-up makes sense. I don't think it is possible
for offlineimap to ensure that the two IMAP servers use the same
internal message numbers when it copies messages. And Gnus uses
these numbers to track things like unread status, so you shouldn't
use the same .newsrc.eld for the two servers. If you don't
synchronize the .newsrc.eld, things should work fine.
But only if I synchronize the .newsrc.eld file can I get the
tick/dormant and so one flags consistent between the two machines, not
to mention the nnml groups I also use. I guess I should also synchronize
the whole offline imap directories then, but I'd like to avoid this as
it seems an unnecessary when there is already a remote imap server in
the picture.

Julien.
Dan Christensen
2018-02-13 19:31:44 UTC
Permalink
Post by Julien Cubizolles
Post by Dan Christensen
I don't think your set-up makes sense. I don't think it is possible
for offlineimap to ensure that the two IMAP servers use the same
internal message numbers when it copies messages. And Gnus uses
these numbers to track things like unread status, so you shouldn't
use the same .newsrc.eld for the two servers. If you don't
synchronize the .newsrc.eld, things should work fine.
But only if I synchronize the .newsrc.eld file can I get the
tick/dormant and so one flags consistent between the two machines
The following explains how to make offlineimap sync the custom
gnus flags:

https://github.com/OfflineIMAP/offlineimap/wiki/Syncing-custom-tags
Post by Julien Cubizolles
not to mention the nnml groups I also use.
That's a harder problem. But if you use different server names for
the IMAP servers on the two machines, then maybe synchronizing the
.newsrc.eld won't cause a problem with IMAP.

Dan

Loading...