Archiving Mail

Jameel Akari mailscanner at
Mon Jan 10 22:49:04 GMT 2005

While we're on the subject of the Archive function and the fact that it
can dump to an mbox file, is there a way to tell MailScanner to use a new
mbox file while it is running?

This would be handy so that an external script could rotate to a new mbox
file for each day/week.. otherwise you end up with a huge file that
becomes unwieldy after a few days.  If you just cron something to
copy/move files around, you can end up with race conditions and mail
output following old filehandles and general ugliness.  To be safe, it
seems like you'd have to stop and restart MailScanner while you move the
file(s) around.

Or perhaps you can have some sort of rule or macro define that filename so
that it automatically switches to a new file each day, something like:
archive_$DATE.mbox -> archive_20040110.mbox for today,
archve_20040111.mbox for tomorrow, etc.  Then you only work on the
rotated-out file.

And is it generally considered "ok" to just cat mbox files together?  So
if I had two MailScanner servers that generated their own Archive mbox
files, and I want one consolidated file, can they just be cat'ed together?
Or is order important?

And at risk of being burnt at the stake for heresy, how well might it
handle a single mbox between two machines over NFS?

sleep 4800;
make clean && make breakfast

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ ( and
the archives (

Support MailScanner development - buy the book off the website!

More information about the MailScanner mailing list