On Thu, Mar 12, 2009 at 01:34:59PM -0000, Ted Harding wrote:
On 12-Mar-09 13:15:52, Chris G wrote:
Can anyone suggest a neat/easy way to keep only (say) the last seven days of messages in an incoming mail spool?
I have a couple of mail spools where I want to be able to do this, possibly with different 'number of days' expiry.
-- Chris Green
Possibly some MUAs may have a configuration option to "Do [X] to messages in Folder [Y] which are more than [Z] days old", but probably most do not.
In my case, all my Mail folders are in MH format, i.e. each message is a separate file (whose name is a number) in the folder. Therefore I could run a cron job on selected folders, checking the age of each message from its timestamp, and then do with it what I will.
So, for flexibility, maybe think about using MH mail folders?
It is simple with maildir too but the problem is I mean a real Linux/Unix mail spool as in what you find in:-
/var/mail/<name of user>
I don't think these can be maildir can they?