Edit: Looks like I was confused about what triggers the UID_VALIDITY to be re-assigned. I thought that moving/deleting emails might cause other email UIDs to change and thus change the UID_VALIDITY link. Probably a better question is whether moving emails from one folder to another will cause the UID_VALIDITY of the destination folder to be re-assigned.
Original question:
I've read that moving an email from one inbox/folder to another will trigger the email server to re-assign all email UIDs and change the UID_VALIDITY value. Is this also true for moving emails between folders that Outlook creates? I am using Outlook with Python imaplib library and I have some emails that I accidentally archived and some emails in spam that I would like to move back to the main inbox while keeping the UID_VALIDITY the same. Are the spam/archive folders real folders or does Outlook use some sort of filter/flag to create the spam/archive folders? If simply moving the emails from spam/archive will trigger the UID to change, is there some other way of copying/moving these emails while keeping the UID_VALIDITY value the same?
Due to company restrictions, I cannot easily test this with a test account so any ideas would be welcomed.
Related but pretty general: link1, link2, link3, link4
question from:
https://stackoverflow.com/questions/65926941/email-uid-validity-moving-emails-from-spam-archive-to-main-inbox 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…