in reply to Sending info through dialup

This is not really a perl question, it is a system configuration question. You need to:

  1. Dial your ISP and create an internet interface through that connection.
  2. Adjust the configuration of your email routing to use the new dialup interface.
  3. Send an email as normal.

The first two steps can be solved by reading your system documentation. Once they are done, the last step will be easy.

The problem with this approach, is that once your dial-up connection is created, the alert that tests if you can ping an external IP will not fail any more, so either your dial-up connection will hangup, and you will get a whole series of alert email as the alert fails and succeeds in a cycle with the dial-up connection, or the dial-up connection does not hang up, in which case the whole alert will become useless, as it will just end up testing the backup dial-up connection instead of your main one.

Instead, can I suggest that you investigate sending some alerts via SMS text message as well as by email. Create a class of most serous problems that go via text as well, and include the 'no external connectivity' problem in that class. That way you are not confusing the alerting with your backup connection.

Replies are listed 'Best First'.
Re^2: Sending info through dialup
by moritz (Cardinal) on Jan 05, 2011 at 13:20 UTC
    The problem with this approach, is that once your dial-up connection is created, the alert that tests if you can ping an external IP will not fail any more, so either your dial-up connection will hangup, and you will get a whole series of alert email as the alert fails and succeeds in a cycle with the dial-up connection, or the dial-up connection does not hang up, in which case the whole alert will become useless, as it will just end up testing the backup dial-up connection instead of your main one.

    There are monitoring systems like nagios that can be configured to only send emails if the ping status changes.

    Now if the link goes down, it'll send an email, which the local mail server will hopefully keep in its spool until the second link is up again, and then send it. When the link goes up, the monitoring system will issue a second mail. If you're familiar with the setup, you know what that means (ie that the backup link works). So I don't really see a problem here, at least if the system is configured properly

Re^2: Sending info through dialup
by dirtdart (Beadle) on Jan 05, 2011 at 13:24 UTC

    Thank you. I don't think that the loop is going to be a problem as my coding logic was more along the lines of:

    Test if good then sleep if not good then dial, send message, hangup loop

    However, the system configuration is where I'm having the trouble. I was hoping some adventurous monk had written a module that would do something similar to this, but alas it appears my hopes are in vain.

    As for SMS, my boss is too cheap and paranoid to pay for text messaging on our phones, so I'm stuck with Google Voice which does not have an email-to-text gateway.