Analogue to fetchmail that can delete mail older than X


Fetchmail only has the option to delete mail from the server or not. Is there something that exists that does basically exactly what fetchmail does, except which also supports the option to only delete mail older than some time period?

Best Answer

What you want is getmail.

You want the delete_after (integer) attribute:

if set, getmail will delete messages this number of days after first seeing them, if they have been retrieved and delivered.