Deletemail is a non-interactive tool for removing mail from one or more IMAP4 mailboxes. It removes mail older than a configurable number of days, and by default does not remove mail that is not marked as seen on the server.
By default, mail which is not marked as seen on the server will not be deleted. If, for example, fetchmail is used for receiving mail from an IMAP server, deletemail might be useful, since fetchmail deletes mail either immediately or not at all.
Thus, you could use fetchmails keep option (so that fetchmail never deletes anything) and let deletemail handle the removal of mail. Currently, the IMAP4 and IMAP4rev1 protocols are supported, optionally using SSL/TLS for secure IMAP connections.
What's New in This Release:
· The handling of unexpected IMAP server behavior and connection problems was improved, and a few minor bugs have been fixed.