Chris G cl@isbd.net wrote:
Can anyone suggest a neat/easy way to keep only (say) the last seven days of messages in an incoming mail spool?
Install Heirloom mailx, then date -d '7 days ago' '+d (before %d-%b-%Y)' | mailx -f path/to/mbox
Replace mailx with nail for older versions of debian and ubuntu, but I'm not sure in which version the () style of selection appeared.
Hope that helps,