Peter Stuifzand

Archivemail

Once every few months I have to take a look in my received spam folder. I don’t like that, because it gets big and it takens a lot of time to load the headers. So almost every time when I look into this I remove all messages that are in there. It’s not that much work, but it takes some time, that I could spend doing something else.

A few years ago I used a program that would look through all the messages in a specified folder and then deleted all messages that were older than some number of days. The program is called archivemail and does exactly what I want. From today archivemail will delete all messages in my spam folder that are older than 30 days. I use the following command:

0 0 1 * * archivemail --delete -d30 ~/Maildir/spam/

Of course I put it in my crontab. It will be run on every first day of the month.

© 2023 Peter Stuifzand