I'm looking to know how servers mark emails as read and unread with IMAP or POP.
I've logged into my server (using cPanel) and navigated to my mail
directory and downloaded the same email file, both read and unread, and used a file comparator on them, only to find both email files were identical.
If I move all my mail
directory to a different server, how does it know which emails have been already read?
Update
One thing I notice from this two files is that the content is identical but there was a subtil change in the file name, the letter S was added at the end.
Unread: 1507345332.M378557P5...,S=78315,W=80152-2,c
Read: 1507345332.M378557P5...,S=78315,W=80152-2,Sc
Following the link provided by @rAlen I was able to see that the S stands for Seen and is added as soon as the email is read.