This should work similarly under freebsd. The only real difference would be the 
dbmail startup script. Instead of /etc/init.d/dbmail, it'll be 
/usr/local/etc/rc.d/dbmail.sh

<snip>
I use a simple keep-alive script triggered from cron :-(...

like thiz:
--------------------------------
#!/bin/sh
send_alert() {
        hour=`date +%H`
        mailto=$MAILTO_HI
        if [ "$hour" -gt "20" -o "$hour" -lt "8" ]; then
                mailto=$MAILTO_LO
        fi
        mail -s "[${WHEREAMI}:$1]" $MAILTO </dev/null
}


restart_dbmail() {
#       send_alert "DeferredDbmailRestartAlert"
        /etc/init.d/dbmail restart
}

check_dbmail() {
        timeout -1 2 nc -w 5 localhost imap 2>/dev/null |\
                head -1|grep -E '\* OK' || return 1
        return 0
}

dolog() {
        msg="$@"
        echo "$0: $msg"
        logger -t "$0" "$msg"
}

check_dbmail || restart_dbmail

</snip>

Regards,

S
________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Abdullah Ibn 
Hamad
Sent: 12 September 2005 12:56
To: DBMail MailingList
Subject: [Dbmail] FreeBSD keep-alive script ?

Hello,
 
Regarding Paul post 
http://mailman.fastxs.net/pipermail/dbmail/2005-August/007099.html Is there a 
way to do that in FreeBSD?
 
Timout is package for linux and not for FreeBSD.
 
Regards,
 
-Abdullah
________________________________________
Find your next car at Yahoo! Canada Autos

Reply via email to