[ale] Re: vonage outage?

Christopher Fowler cfowler at outpostsentinel.com
Mon Nov 29 14:23:52 EST 2004


Here is how I do it.

1.  Send test email:

#!/usr/bin/perl

open(O, ">> /home/cfowler/send_test.out");
open(STDOUT,">&O");
open(STDERR,">&O");


use Net::SMTP;
my $smtp = Net::SMTP->new("192.168.2.254") or die "$!\n";
$smtp->mail("cfowler\@opsup.com");
$smtp->to("cfowler\@opsup.com");
$smtp->data();
$smtp->datasend("Subject: [STEST]\r\n\r\n");
$smtp->datasend("Time: ".time()."\r\n");
$smtp->dataend();
$smtp->quit();

$l = localtime(time);

print "Sending mail out at $l\n";


2.  Receive it in.
:0:
* ^Subject.*\[STEST\]*
| /home/cfowler/stest.pl

3.  Stest.pl#!/usr/bin/perl

use Net::SMTP;
use IO::Handle;

my $from = "root\@opsup.com";
my @emailaddrs = ();
push @emailaddrs, "ppickerign\@opsup.com";
push @emailaddrs, "cfowler\@opsup.com";
my $THRESH = 3600;
my $SMTPSERVER="192.168.2.254";

sub report {
        my ($s, $r) = @_;
        foreach my $ref (@emailaddrs) {
                print "Sending email to $ref\n";
                my $smtp = Net::SMTP->new($SMTPSERVER) or die "SMTP
ERR:$!\n";
                $smtp->mail($from);
                $smtp->to($ref);
                $smtp->data();
                $smtp->datasend("To: $ref\r\n");
                $smtp->datasend("From: $from\r\n");
                $smtp->datasend("Subject: Mail error!\r\n");
                $smtp->datasend("\r\n");
                my $data = <<EOF;
Mail timeout has occured.  Test email sent on $s. Received on
$r.  The difference is greater than the threshhold of $THRESH.

EOF
                $smtp->datasend($data);
                $smtp->dataend();
                $smtp->quit();
                print "Email set\n";
        }
}


open (LOG, ">> /home/cfowler/stest.log");
print LOG
"-------------------------------------------------------------------------------\r\n";

close(STDOUT);
close(STDERR);
open(STDOUT, ">&LOG");
open(STDERR, ">&LOG");
while(<STDIN>) {
        next unless m/^Time:/;
        my $now = time();
        m/^Time: (\d+)/;
        next unless $1;
        my $diff = ($now - $1);
        print LOG time().":$1:$diff:$THRESH\n";
        report($1, $now) if $diff >= $THRESH;
}

\*LOG->flush();
print LOG
"-------------------------------------------------------------------------------\r\n";
close(LOG);


Here is the story.

A partner of mine was complaining that he was not getting emails.  Then
he complained that he was getting emails late.  After I experienced this
problem I then started this program.  If a server is down should it be
down for more than 1 hour?  I've been notified by this program many
times since I created it.  Sure it uses the same path to get to me but I
do not care about getting them smtp server at Earthlink back up.  I just
want to know when it happens.  



On Mon, 2004-11-29 at 14:10, Jerald Sheets wrote:
> Why don't you post a message to our Earthlink employees here on the network.
> You may:
> 
> A) inadvertently help a fellow ale'er
> B) get your problems resolved.
> 
> 
> ....just an idea... 
> 
> -----Original Message-----
> From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
> Christopher Fowler
> Sent: Monday, November 29, 2004 2:01 PM
> To: Atlanta Linux Enthusiasts
> Subject: Re: [ale] Re: vonage outage?
> 
> On Mon, 2004-11-29 at 13:53, Eric Anderson wrote:
> > Geoffrey wrote:
> > > Any of you folks using vonage experiencing an outage?  No dialtone 
> > > here and the 1-866 # for vonage is busy. :(
> > 
> > No problem here. Sometimes I think the Vonage box gets confused. Have 
> > you tried resetting your Vonage box? Just unplug it, wait a min or 
> > two, then plug it back in. Also of course make sure your ISP is up.
> > 
> 
> You know what is sad?  Earthlink.  Earhlink's mail service is so bad that
> I've written a program that emails me a time stamped email and then when it
> comes back it validates via the time stamp that it took the email less than
> 1 hour to go through.  If it is greater than one hour I'm notified.
> 
> So in effect I'm doing network monitoring on Earthlink's crappy stuff. 
> But what do you expect for $8/mon?  You should expect horrible service and
> downtime.
>  
> 
> > Eric
> > 
> > ______________________________________________________________________
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
>  



More information about the Ale mailing list