Re: [exim] Automatic /var/spool/mail cleaning

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Chris Lightfoot
Dátum:  
Címzett: Cédric MARCOUX (sprimont)
CC: exim-users
Tárgy: Re: [exim] Automatic /var/spool/mail cleaning
On Thu, Jul 20, 2006 at 10:31:55AM +0200, "Cédric MARCOUX (sprimont)" wrote:
> Hi!
> I have set a new router to deliver a copy of my mails to an exchange
> server using this settings:
>
> exchange2003:
>       driver = manualroute
>       domains = +local_domains
>       transport = remote_smtp
>       route_list = * 192.168.123.254
>       unseen = true

>
> With this settings, I keep the mail on my Linux server, this is a good
> thing since I have a little backup on my linux.
>
> But I would like to know if there is a procedure to cleanup
> /var/spool/mail/%users% by deleting mail older then 3 month for exemple
>
> Hope someone got a solution,


if you're delivering to maildirs, then Craig Whitmore's
solution is about right. If you're delivering to
mailspools, then this tool:
    http://www.mythic-beasts.com/downloads/trimfolder-20041010.tar.gz
will do sort of what you want (but it trims to constant
size, rather than constant age of oldest message). Another
possibility would be to deliver mail to mailspools whose
name changes daily (e.g. /var/spool/mail/chris/20060720)
and then use a find command to nuke the old ones.


--
``Sure, we humans pulled the levers and poked the chads, but in the
end the machines did the counting and elected one of their own.''
(Scott Adams, on Dick Cheney)