Reprocessing quarantined messages [Solved, sort of]
Kevin Miller
Kevin_Miller at ci.juneau.ak.us
Fri Nov 30 23:29:39 GMT 2012
Back in 2007 someone was having a similar problem. Steve Freegard posted a note and script which I’m reposting. I haven’t had need to try it but assume it works fine (Steve’s a sharp guy). Hopefully it’ll help you as well.
===========================================================
Hi Glenn/Jason,
Glenn Steen wrote:
> On 16/07/07, Jason Gottschalk <Jason at syo.com<mailto: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<mailto:recipient at add.ress%3c$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.
--
Steve Freegard
Development Director
Fort Systems Ltd.
===========================================================
...Kevin
--
Kevin Miller
Network/email Administrator, CBJ MIS Dept.
155 South Seward Street
Juneau, Alaska 99801
Phone: (907) 586-0242, Fax: (907) 586-4500
Registered Linux User No: 307357
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Michael Sauvola
Sent: Friday, November 30, 2012 2:02 PM
To: MailScanner discussion
Subject: Re: Reprocessing quarantined messages [Solved, sort of]
I think I found the cause, and unfortunately no solution.
MailScanner.conf
Quarantine Whole Message=no
Quarantine Whole Message as Queue File=no
Mike
From: Michael Sauvola<mailto:msauvola at nwls.lib.wi.us>
Sent: Friday, November 30, 2012 12:48 PM
To: MailScanner discussion<mailto:mailscanner at lists.mailscanner.info>
Subject: Re: Reprocessing quarantined messages
Or does this explain it ( at the top of one message)
This is a multi-part message in MIME format.
--------=_NextPart_000_0077_01CDCCA4.A62F4130
Content-Type: text/plain;
charset=”iso-8859-1”
Content-Transfer-Encoding: quoted-printable
Mike
From: Michael Sauvola<mailto:msauvola at nwls.lib.wi.us>
Sent: Friday, November 30, 2012 12:01 PM
To: MailScanner discussion<mailto:mailscanner at lists.mailscanner.info>
Subject: Re: Reprocessing quarantined messages
OK,
I took the “each” out of the statement, and it seems to go through each directory.
But now as it processes, I get this message:
“No recipient addressess found in header”
If I look inside some of the message files, they seem to be broken up ‘pieces’ of messages.
So, “Quarantine Whole Messages As Queue Files=no” breaks them into pieces rather than storing the whole message plain text? Or at least that’s what seems to have happened.
I appreciate the help you folks are giving me. I am somewhat swamped with 400+ PCs to support in 30 locations 130 miles apart, plus 7 servers here in the main office.
With the help of 1 other staff member, we know enough to keep things going most of the time, but haven’t become expert in anything, so need a bit of direction now and then.
Any other suggestions? Or are we screwed?
Thanks again,
Mike
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
________________________________
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
________________________________
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20121130/e4ca42d2/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resend.sh
Type: application/octet-stream
Size: 603 bytes
Desc: resend.sh
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20121130/e4ca42d2/attachment-0001.obj
More information about the MailScanner
mailing list