resent/requene archived messages in mbox format

Harondel J. Sibble mailscanner at pdscc.com
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 archived.to an mbox formatted 
file

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

company-archive.2010-04-21-2300-01.txt

due to this script

    #!/bin/sh
    ###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

http://lists.mailscanner.info/pipermail/mailscanner/2004-June/036054.html

and this info

http://lists.mailscanner.info/pipermail/mailscanner/2005-October/054143.html

Also this thread

http://lists.mailscanner.info/pipermail/mailscanner/2006-May/060934.html

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 pdscc.com (use pgp keyid 0x3AD5C11D) http://www.pdscc.com
(604) 739-3709 (voice)



More information about the MailScanner mailing list