I have a script that walks a quite deep tree of mail messages to find and archive old messages. I'm trying to convert it from mbox to maildir (as I now store my mail in maildir format).
So I need to test whether a point I have reached in the hierarchy is a maildir mailbox or not. Using mbox format it's easy because 'folders' are directories and mailboxes are files. However with maildir the 'folders' have directories within them so the simple tree walking goes down a level too far and finds 'folders' which aren't mailboxes called 'cur', 'new' and 'tmp'. Is there any 'ready made' way in python to tell whether a directory is a maildir mailbox? If not I suppose I'll simply have to check if there are 'cur', 'new' and 'tmp' directories within the directory which may or may not be a maildir. -- Chris Green ยท -- https://mail.python.org/mailman/listinfo/python-list