Tuesday, December 19, 2006

maildir housekeeping


Takatsugu had problems with his maildir and lost a bunch of mail. This reminded me of my little script that keeps my maildirs at a reasonable small size. I let run over my maildirs every night. It removes duplicate mails first and then moves all mails that are older then 30
days and not part of an active thread into a $maildirname.attic maildir.

I invoke it like this on my mail server in my user's crontab

@daily ~/src/pack_maildir.pl --maildir=~/Maildir --dir=. $(find ~/Maildir -maxdepth 1 -mindepth 1 -type d -not -name '*.attic' -not -name 'tmp' -not -name 'new' -not -name 'cur' -not -regex '.*Trash.*' -not -regex '.*Trash.*' -not -name '.SENT' -not -name '.Sent' -not -name '.DRAFTS' -not -name '.Drafts' -not -name '.virus' -not -name '.merkwurdiges' -name '.*' -printf "--dir=\%f ")

and duplicate the maildirs from there to my working machines with offlineimap.

This setup is orthogonal to spam protection, however. Apropos spam: According to my munin spamstats i get a magnitude more spam then ham nowerdays.

2 Comments:

At 12:06 PM, Blogger STEFERD said...

GOOD

 
At 11:11 AM, Blogger varisu said...

Maildir housekeeping typically involves organizing and managing email files and directories. It does not directly relate to upholstery hydro cleaning, which focuses on cleaning upholstered furniture using water-based methods.

 

Post a Comment

<< Home