At 10:34 AM 5/20/97 -0400, Lars Kellogg-Stedman wrote:
[snip suggestion to use mh]
(2) Now that you've got each message saved in a seperate file in an
mh-style mailbox, you've got two options.
(a) Use 'find' to delete older messages:
find $HOME/Mail/saved-messages -mtime -30 -exec rm {} \;
That will delete messages older than 30 days.
Uhh, I think that will delete messages *newer* than 30 days.
I believe you want +30, not -30. (Check by using ls instead of rm).
You can stick
the above command in a cron job and run it every once in a
while to automatically clean out your folders.
If you are allowed to use cron, of course. Few ISP's permit it.
I won't use mh on my ISP due to the disk space overhead; with
a 5MB total limit (unchangeable, can't even buy/rent more), and every
message rounded up to the next full K in terms of what's charged,
it would be tough to stay within the limit given that I also have
other uses for the space.
I also wouldn't actually auto-delete the old mail (for the same reason
I don't actually auto-delete spam: might get something deleted by
mistake, such as instructions your boss sent you 32 days ago). Instead,
I'd move it into a "probably-expired" folder and manually delete from
that.
Cheers,
Stan