Recently, in a freelance project I had to parse incoming mails wherever they are in the mail account and, preferably, avoid re-parsing the whole mail account only for a couple of new mails. Fortunately, there is the low level imaplib module in Python’s toolbox. But, curiously enough, while the solution is quite simple, I have not been able to find any good solution on the net… By default, when you perform a SEARCH on an IMAP folder, it will provide you will relative identifiers in the fol...