Is it possible to read e-mail flags Seen, Unseen and restore them as the were before reading e-mail using imaplib in Python?
I couldn't find yet any information regarding reading these flags but there is plenty of examples setting Seen, Unseen etc. flags. I would appreciate if somebody would guide me to the right direction.
A big thanks goes to @stovfl and @Max in comments. I  successfully made my program work using imap_conn.fetch(uid, '(BODY.PEEK[HEADER])'). On the other side if somebody needs read-only access they can use imap_conn.select('Inbox', readonly=True)
Reading \Seen, \Unseen flags using imaplib in Python