aboutsummaryrefslogtreecommitdiffstats
path: root/RELEASEVERSIONS
blob: 3ab02ca2d852e5bab8f209efb290ff8a2d04b9db (plain)
1
2
3
4
5
6
SVN release - fetchmail release
================================
r4760       - 6.3.3 (2006-03-31)
r4678       - 6.3.2 (2006-01-22)
r4579       - 6.3.1 (2005-12-19)
r4499       - 6.3.0 (2005-11-30)
bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh
#
# maildaemon, fetchmail driver intended to be invoked hourly by cron.
#
# Script by Larry Fahnoe <fahnoe@kegworks.mn.org>, who writes:
#
# This is intended to support a standalone system (NeXTSTEP in this case) 
# which makes manual, on-demand PPP connections to the outside world.  The
# script is run as the target user from cron on an hourly basis.  If it
# finds a PPP link is up (it sees routes on a PPP interface), fetchmail is
# invoked.  If the link is not up, and the hour is in the list of hours that
# connections should be made, the link is brought up and fetchmail is
# invoked.  The program or script used to bring up the link should return an
# exit status which reflects whether the link actually came up. 
# 
# I wrote this because I wanted to be able to have control over the amount
# of time spent connected to an ISP and yet still be able to poll for mail
# at intervals that made sense to me.  One limitation of this script is that
# it does not take into account that an existing PPP link might be going to
# a different ISP or network.
#

# You'll have to configure these
USER=fahnoe			# your name
HOME=/Users/fahnoe		# home directory (for the logfile)
FORCEHOURS="05 09 13 17"	# when to bring the link up if it's not already
SERVER=mailserver.isp.com	# mailserver host name

# Link initialization and wrapup scripts (you may have to configure these)
PPPUP="/usr/local/bin/pppup $SERVER"
PPPDOWN=/usr/local/bin/pppdown

PATH=/usr/local/bin:/bin:/usr/ucb:/usr/bin:/usr/etc
export PATH USER HOME

LOG=$HOME/log/maildaemon.log

# get the mail, depends on $HOME/.fetchmailrc and $USER
FETCHMAIL( ) {
    ( echo "`date` $SERVER"
      fetchmail $SERVER
      if [ $? -gt 1 ]
      then
          echo "`date` $SERVER (evil things happened in fetchmail)"
      fi
    ) >> $LOG 2>&1
}

# if the link is already up, check for mail.
# if the hour is in FORCEHOURS, force the link up and check for mail.
(netstat -rn | awk '{ print $6 }' | grep ppp[0-9] > /dev/null)
if [ $? -eq 0 ]
then
    FETCHMAIL
else
    hour=`date | sed -e 's/:/ /g' | awk '{ print $4 }'`
    for x in $FORCEHOURS
    do
        if [ $hour = $x ]
        then
            $PPPUP
            if [ $? -eq 0 ]
            then
                FETCHMAIL
                $PPPDOWN
            else
                echo "`date` $SERVER (link establishment failure)" >> $LOG
                exit 1
            fi
        fi
    done
fi

exit