How to get e-mail messages from Mail Scanner?

Jason Gottschalk Jason at SYO.Com
Tue Jul 17 01:54:04 IST 2007


Hello Steve,

okay, very nice, and thank you!

Will this scan all the sub directories? The files are in directories
like this:

        quarantine/20070715/nonspam/1IA1h7-0000Yt-H3

I looked at the code, will it send only the non spam mail and will it
send messages if there is a match on the TO: as well as the CC: ?


Monday, July 16, 2007, 6:04:54 PM, you wrote:
Steve> Hi Glenn/Jason,

Steve> 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...:-)

Steve> I wrote something similar for a customer with a similar problem which is
Steve> attached.

Steve> You will need to edit it and change 'mysql -N mailscanner' to 'mysql
Steve> -u<username> -p -N mailscanner' where <username> is your MailWatch MySQL
Steve> user.  It will prompt you for the password when you run it.

Steve> It is run like:

Steve> resend.sh 2007-06-01 2007-06-16 fsl.com

Steve> The first argument is the date from, second is the date to and third is
Steve> used to match all or part of a destination address (e.g. domain or full
Steve> e-mail address), it will then find all messages for matching those
Steve> criteria and resend them from the quarantine.

Steve> Hope it helps.

Steve> Kind regards,
Steve> Steve.

Steve> --
Steve> Steve Freegard
Steve> Development Director
Steve> Fort Systems Ltd.


-- 
Best regards,
 Jason Gottschalk                         mailto:Jason at SYO.Com
 SYO Computer Engineering Services, Inc.
 586-286-2557



More information about the MailScanner mailing list