cleanup-maildir - cleaning up the maildir
Translation of the original in Catalan. Read it in: CatalàCastellano
Today I found this article Cleanup Maildir folders (archive/delete old mails) | MDLog:/sysadmin and I didn't hesitate for a second to download the script: cleanup-maildir (local) written in python. In fact, its name already says a lot about what it does. Basically I use it to clean up the Junk directory. That is, the place where I receive the alerts about emails considered spam, virus, phishing or other malware. That is, I have put the script in cron and told it that the contents of the Junk folder of the maildir that are more than 15 days old should be deleted. That way I don't have to worry about periodically deleting all the malicious email that I will never look at again because nobody has said that famous thing to me: "I sent you an email, haven't you seen it?" and then you start searching through the folder where all the rubbish is to see if you can find it. Well, now there will only be 15 days of rubbish.
It really is a very silly script but I find it very useful, since it has quite a few options such as not deleting emails marked as read, or as important, or automatically creating subfolders where emails of a certain age are stored. I am probably still forgetting some function but I would say the idea is more than clear.