How to get e-mail messages from Mail Scanner?
Glenn Steen
glenn.steen at gmail.com
Mon Jul 16 23:30:39 IST 2007
On 17/07/07, Steve Freegard <steve.freegard at fsl.com> wrote:
> Hi Glenn/Jason,
>
> Glenn Steen wrote:
> > On 16/07/07, Jason Gottschalk <Jason at syo.com> wrote:
> > "Archive of quarantine"? Sounds a bit like you are using MailWatch and
> > have store set on the non-spam action... In whiich case this beconmes
> > a problem of:
> > a) Finding the relevant messages, and
> > b) sending them to the recipient.
> >
> > If you indeed use MailWatch, then a) is fixed by a simple SQL query...
> > All you really need is to construct a file containing all the message
> > IDs and possibly all the dates... Heck, why not let the SQL scriptlet
> > construct a file of filenames (one/line) with the absolute path to the
> > message file (which is in RFC822 format), then simply loop over that
> > and use yourMTAs sendmail command (for i in $(cat filenames); do
> > sendmail recipient at add.ress<$i; done) ... Simple as that:-).
> > I'm on vacation, so will not be writing that scriptlet for you anytime
> > this week... perhaps when I'm back to the grindstone...:-)
>
> I wrote something similar for a customer with a similar problem which is
> attached.
>
> You will need to edit it and change 'mysql -N mailscanner' to 'mysql
> -u<username> -p -N mailscanner' where <username> is your MailWatch MySQL
> user. It will prompt you for the password when you run it.
>
> It is run like:
>
> resend.sh 2007-06-01 2007-06-16 fsl.com
>
> The first argument is the date from, second is the date to and third is
> used to match all or part of a destination address (e.g. domain or full
> e-mail address), it will then find all messages for matching those
> criteria and resend them from the quarantine.
>
> Hope it helps.
>
> Kind regards,
> Steve.
>
Thanks a bundle Steve.... I thought someone would've written something
like that already:-).
Cheers
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
More information about the MailScanner
mailing list