delete emails older than 7 days

Hi

i want to delete emails from inbox, spam and trash automatically that are older than 7 days.
whats the easiest way or if not automatically is there a commend from ssh
thanks

From all domains on your server? Is this customer mail? You might want to think about the number of unhappy people you’ll have to deal with if so.

You could use a find cron job that execs “rm” on files based on their ctime or mtime - that would be pretty close to automatic.

just one account/mailbox
thanks for your reply

Older than 30 days

I want to do the same thing but I want to know how to configure the settings to where it will automatically delete emails over 30 days

We need this too. It is very important. In our case, on Nodeworx be nice to have an option to automatically delete messages older than X days in all mail accounts on the server.