Ask Python3 for libraries with search messages, such as imaplib and imapclient. Do you know if there are any?

1. (requirements) can be deleted by searching for matching messages based on time or sender.

2. (background) I have used the two libraries imaplib and imapclient, one official and one third party, and Poplib does not have the search function. Although the above two imap libraries can search for emails, all the matching results of the mailbox (exmail.qq.com) I tested are incomplete. For example, there is a colleague whose e-mail has been in a mailbox for several years, and his mailbox is full now, but because a mailbox is a free version, it can not be upgraded in terms of capacity, so when there are too many emails, it can only be deleted manually. But now after testing that the imapclinet library can only match more than 4K emails, suppose the colleague uses the imap library to log in, then his total of more than 8K emails is now only 4K in the mail server of this library, then the query results are seriously inconsistent.

3. (results) I hope I can have a library for me to write a gadget to help my colleagues delete emails. I hope you can help me a lot. Thank you.

Feb.28,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9fda7-2f4ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9fda7-2f4ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?