resent/requene archived messages in mbox format

Harondel J. Sibble mailscanner at
Fri Apr 23 06:20:14 IST 2010

Hmm, client just advised that the exchange server behind mailscanner had it's 
transport database crash loosing a bunch of mail from 1630 yesterday until 
noon today so he needs me to resend all the messages that were archived by 
mailscanner during the period in question. Specifically inbound messages to 
users, but not outbound emails

System is CentOS 4.7 with MS 4.76.25 with postfix in single queue 
configuration.  All emails in and outbound are an mbox formatted 

incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
Quarantine Whole Message = yes
Quarantine Whole Messages As Queue Files = no
Archive Mail = /var/spool/MailScanner/archive/company-archive
Missing Mail Archive Is = directory

This results in 1 file per day


due to this script

    ###DATE=/bin/date "+%Y-%m-%d-%H:%M:%S"
    DATE=`/bin/date "+%Y-%m-%d-%H%M-%S.txt"`
    cd /var/spool/MailScanner/archive
    /etc/init.d/MailScanner stop
    /bin/sleep 15
    /bin/cp company-archive company-archive.$DATE
    /bin/mv company-archive company-archive.old
    /bin/touch company-archive
    /bin/chown postfix company-archive
    /bin/chgrp postfix company-archive
    /etc/init.d/MailScanner start

what's the best way to extract the mbox into 1 email per file and then dump 
that back into postfix for resending to all the recipients?

I came across this script when googling

and this info

Also this thread

But none are quite what I need

Any suggestions?  Is this even easily doable based on settings above?

Harondel J. Sibble 
Sibble Computer Consulting
Creating Solutions for the small and medium business computer user.
help at (use pgp keyid 0x3AD5C11D)
(604) 739-3709 (voice)

More information about the MailScanner mailing list