in reply to Check for MTA or DNS troubles

@full does not seem to get assigned anything. I am guessing you meant

print MAIL "$#full messages have been deferred in the past $ttime mi +nutes\n";

to say

print MAIL "$#log messages have been deferred in the past $ttime minut +es\n";

I would also change

  print MAIL "@log";

to

foreach ( @log ) { print MAIL "$_\n\n"; }

to make your output easier to read. I would add a couple other newlines and a rundate just to make things easier to read on the mail.

Finally, the die statement if you get deffered within a certain time.

if ($ttime == 0) {die ("deferred messages ocurred withing 1 minute o +f each other\n")};

if you run this from a cron job, how would people know if there was a problem? Do you just keep this around and run it if the network seems slow?

Replies are listed 'Best First'.
Re: Whoops.
by neilwatson (Priest) on May 14, 2002 at 18:42 UTC
    <quote>if you run this from a cron job, how would people know if there was a problem?</quote>

    I do run from a cron job. The results don't always mean there is a problem. Much of our DNS problems have been fixed since I rewrote all the db files. These days if the script goes off, it usually indicates that marketing is sending their newsletters again.

    Still I like to know what is going on.

    Neil Watson
    watson-wilson.ca