当前位置: 首页 > 图文教程 > 服务器 > Web服务器 > QMAIL+MH设计方案(8)

Web服务器
让Web服务器远离脚本攻击
IIS常见问题及解答以及故障分析
在 IIS 中配置 SQL XML 支持
分页实现方法的性能比较
虚拟主机如何解决电信网通间互联互通
服务器平台磁盘整理软件(Windows)
保障Web数据库安全运行
看上去很美:国产服务器变革初显锋芒
用Web UI远程管理Win2003
防护Web站点恶意链接的方法
Web 服务器日志工具点评
Apache连接数设置
Web服务器安全指南
Apache虚拟主机的配置
Insert和Rs.Addnew的比较
IIS 错误代码大汇总
根据Web服务器记录来追击黑客入侵
一个IP建多个Web站点:TCP端口法
Apache vs Lighttpd谁更好?
虚拟主机IIS防范入侵常见问答

Web服务器 中的 QMAIL+MH设计方案(8)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-02   浏览: 25 ::
收藏到网摘: n/a

我用以下技巧拨号,它被称为简洁的isdn on|off

#!/bin/bash
# This is based on an old script from Bernhard Hailer

IP_ADDRESS="195.112.123.11"

case "$1" in
on)

echo "Calling ippp0"
/sbin/isdnctrl dial ippp0
# the sleep is important as it gives the PPP time to settle down
echo "Sleep for 8s for PPP handshake"
sleep 8s
/sbin/route add default ippp0
echo "line open - checking...."

# check whether PPP negotiation was successful:
set `ping -qc3 -i1 $IP_ADDRESS 2>/dev/null | grep transmitted`
if [ $4 -gt 0 ];
then
echo "succeeded."
echo "Starting fetchmail daemon"
/usr/bin/fetchmail -d 600 -k -v -a -L /var/log/fetchmail
echo "Flushing mail queue...."
/usr/local/bin/serialmail/maildir2smtp
~alias/pppdir alias-ppp- mail.server.ip.no `hostname`
else
echo "failed!"
/sbin/isdnctrl hangup ippp0
fi

;;

off)
echo -n "Shutting down fetchmail daemon"
/usr/bin/fetchmail --quit

/sbin/isdnctrl hangup ippp0
/sbin/route del default # and delete route
echo "You e off line"
;;

*)
echo -e "aUsage:"
echo "isdn on"
echo "isdn off"
;;

esac