How to get e-mail messages from Mail Scanner?

Glenn Steen glenn.steen at gmail.com
Mon Jul 16 21:58:42 IST 2007


On 16/07/07, Jason Gottschalk <Jason at syo.com> wrote:
> Hello Jim,
>
> But I think it it is the archive, I used the Store command. There
> are not any pop accounts for this domain on this server, we are just
> passing them through here to be scanned.
>
> So how do I get hundreds of messages in the archive or the quarantine
> sent out to an address? Or, saved in a format I can copy to the
> workstation and import?
>
> Jason.
>
"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...:-)

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