Created
January 30, 2024 09:34
-
-
Save cyyself/678348cbeca098c4d9557e876a7b1be7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import mailbox | |
import sys | |
mbox = mailbox.mbox(sys.argv[1]) | |
mbox.update(enumerate(sorted(mbox, key=lambda x: x.get("Subject")))) | |
mbox.flush() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment