How to monitor the health of the MailScanner architecture
Glenn Steen
glenn.steen at gmail.com
Tue Jul 10 17:17:44 IST 2007
On 10/07/07, Alistair Carmichael <Alistair.Carmichael at ntltravel.com> wrote:
(snip)
>
> One method I thought of by using a shell script in conjunction with mailwatch is to run a shell script to generate a message every minute to output "$$`date +%s`" to a temp file, then run the mail command using the output (cat) of this file as the subject and send the message to a generic postmaster address. Then sleep for half a min or so and then run a mysql query on your mailwatch database's maillog table like "select Count(*) from maillog where subject = 'cat /tmp/myfile'"
> If the result of count(*) is 1 then the message has been collected and scanned by mailscanner, if the answer is zero then it has not.
> It probably wouldn't take too long to throw together into a shell script.
> The only downside I think would be if you have one mailwatch database used by 3 mailscanners like we do this query can take a while to execute due to the sheer size of the database but might work ok for a single server setup.
> My 2 more cents ;)
>
Certainly worth exploring since that would reduce the
dependecies/ickiness of the checking part (expecting ones way through
even the simplest textbased MUA can be ... frustrating:-). And as you
say, it would be easy to script and would probably scale rather OK
(scriptwise... One message per MS server... Not the query bit:) with
several MS servers...
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