[nos-bbs] JNOS error tracking new messages

Maiko Langelaar maiko at pcs.mb.ca
Sun Oct 14 19:40:41 EDT 2018


> Then, the last time n6mef logged in, the message in foo.txt with ID AA12345
> was the last message listed by the user.

The basis for that ID comes from get_msgid() function, you'll see it 
assigned in the smtp code, and the forwarding code, the 5 digi 'limit'
you apparently see is in sendmsg() in forward.c (uses last 5 digits)
of the message id which is technically stored as a 'long integer'.

> Since this ID number doesn't grow without bound, it must "roll over" when it
> reaches it's maximum value.  Since the ID numbers never seem to grow larger
> than 5 digits, I'm assuming that they are 16 bit numbers.  So when the
> number gets up to 65535, it must role over to 0.

Using the last 5 digits of the 'master sequence number' will make it
appear a 'roll over' every so often but it's not related at all to the
number of messages and new messages. The get_msgid() is read/updated
using the 'sequence.lck' file under the spool maildir area.

> We have seen many cases where a user switches to a mailbox and sees "X
> messages - Y new", where Y is not correct.  For example, maybe it says "...
> 0 new" when, in fact, there are messages in that mailbox that have arrived
> since the last time the user logged in.

Since the user last logged in or WHILE the user has been logged in ?

If user is logged in, their index is probably locked, so maybe something
is going on there, I'll have to check.

Anyone else want to chime in with real world observations ?

Maiko



More information about the nos-bbs mailing list