On Thu, 15 Aug 2002, Randy Kramer wrote:

> I'm getting close on my email server (using fetchmail, postfix,
> procmail, ipopd (and maybe later imapd) -- in fact, if you see this it
> came from my Windows box via the Linux email server. ;-)
> 
> But, I have some bugs to work out yet, and some questions:
> 
> Questions:
> 
> 1.  Anybody know a good way to detect that a network link is active?  
> Background:
> 
> My connection to the Internet is via a dial up on another box (Dos, as a
> matter of fact.)  I would like to set up a cron job (and script) to do
> something like the following:
>    * Confirm the connection to my ISP is up (ping him, check for
> success?)
>    * If no: wake it up (ping it), and after so many tries, quit and give
> a message somewhere (and if it wakes up, proceed to the if yes)
>    * If yes:
>       * Run fetchmail to get mail
>       * Run sendmail -q to kick the queue and send any outgoing mail
> (I've set defer_transports=SMTP)
> 
> The reason I want to make sure the link is up before I kick the queue is
> so that the "exponential backoff" doesn't go into effect and result in
> outgoing messages sitting in the server for long periods of time (or
> even getting "failure to deliver" "bounces" from my own server).
> 
> Is that an unrealistic concern?  Is there a better way to deal with it?
> 
> Randy Kramer
> 
> Aside: For a while, every time someone mentioned "ifup" it sounded like
> just what I needed.  I now realize that it is a command (bring the
> interface up) rather than a test (if the interface is up, do ...)
 
Hi Randy,

What if you just did something like this.

        1) ping ISP...
         a) if icmp echo request == 'yes'
                then
                do the mail thing
                else
                run "ifup" command kick mailque
           fi

what-cha think? 

-- 
daRmaTTeR

Reg. Linux User #186492
"Stupidity has no moral high ground...it can't see that high!"


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to