[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: deleting old mail via at/cron-script



>>>>> "Thomas" == Thomas Guettler <guettli@gurkensalat.interface-business.de> writes:

    Thomas> Hi debianers, I want to delete old mail via at/cron, so
    Thomas> that my mboxes of mailinglist contain only the last 200
    Thomas> messages. With which debian-package could I do that?

<plug>
Something likes Gnus (mail reader for emacs) might be better. Gnus
supports automatic expiry of all read mail. 
</plug>

Otherwise, I would use Maildir format, and say something like:

cd backup/new && rm -f dummy `ls -t * | sed -e 1,32d`

(stolen from mangled procmail example, deletes everything except the
last 32 messages, regardless of if the messages have been read or
not). You would need to somehow put the above into a crontab entry.
-- 
Brian May <bam@debian.org>



Reply to: