mqueue.in cleanup

shuttlebox shuttlebox at gmail.com
Thu Jan 15 15:36:01 GMT 2009


On Thu, Jan 15, 2009 at 4:22 PM, Jan Agermose <ja at conviator.com> wrote:
> hi
>
> I have a problem on my server in that mqueue.in fills with old files that
> are never removed - files back one year - I think its safe to say they will
> not get delivered.
>
> Is there som "find" command that can remove all files older than 14 dayes if
> its safe to do so or should I clean up in some other way?

Put this in root's crontab:

0 4 * * * find /var/spool/mqueue.in -mtime +14 | xargs rm -f

Typically a mail server only tries to deliver something for 5 days so
you could lower 14 if you want.

-- 
/peter


More information about the MailScanner mailing list