Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
470 views
in Technique[技术] by (71.8m points)

imap - Email UID_VALIDITY - moving emails from spam/archive to main inbox

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...