** NG, this executable is not signed: .../src/delegated
解决方法
% src/delegated -Fesign -w /usr/local/bin/delegated
or
% cp /usr/local/bin/delegated /tmp/delegated
% /tmp/delegated -Fesign -w /usr/local/bin/delegated
wget ftp://ftp.delegate.org/pub/DeleGate/delegate9.7.7.tar.gz tar zxvf delegate9.7.7.tar.gz cd delegate9.7.7 make
编译后只要一个文件,复制到你想放的路径即可
cp src/delegated /usr/sbin
log目录、配置文件目录
mkdir -p /var/log/delegate/ chown -R nobody:nobody /var/log/delegate mkdir /etc/delegate
POP3代理设置,因为我只用POP3,下面也给出了其他的配置,注意大小写
-P110 SERVER=pop://192.168.1.2 #你自己的服务器IP #REACHABLE=192.168.1.0/24 #允许访问的网络,因为我是放在公网上的,所以取消了 RELIABLE="*" LOGFILE=/var/log/delegate/pop.log PROTOLOG=''
-P21 SERVER=ftp RELIABLE=192.168.1.0/24 LOGFILE=/var/log/delegate/ftp.log PROTOLOG='' MOUNT="/* ftp://192.168.1.2/*"
-P25 SERVER=smtp://192.168.1.2 REACHABLE=192.168.1.0/24 RELIABLE="*" LOGFILE=/var/log/delegate/smtp.log PROTOLOG=''
因为上面的内容都差不多,所以不多解释了
这脚本放在那看个人习惯
vi /etc/rc.d/init.d/delegated chmod 700 delegated
#!/bin/sh
#
# chkconfig: 35 90 10
# description: delegated ftp proxy
# processname: delegated
# config: /etc/delegate/*.conf
DELEGATE=/usr/sbin/delegated
CONFDIR=/etc/delegate
DGROOT=/var/delegate
if [ ! -x $DELEGATE ]; then
echo -n $"$DELEGATE does not exist."; warning; echo
exit 0
fi
if [ ! -r $CONFDIR ]; then
echo -n $"$CONFDIR does not exist."; warning; echo
exit 0
fi
RETVAL=0
start() {
echo -n $"Starting up Http DeleGate daemon: "
for CONFIG in $CONFDIR/*.conf ; do
$DELEGATE DGROOT=$DGROOT +=$CONFIG
echo
done
return 0
}
stop() {
echo -n $"Shutting down Http DeleGate daemon: "
for CONFIG in $CONFDIR/*.conf ; do
$DELEGATE DGROOT=$DGROOT +=$CONFIG -Fkill
echo
done
return 0
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0#chkconfig --add delegate
生成个新的配置文件
vi /etc/logrotate.d/delegate
内容如下
/var/log/delegate/pop.log {
missingok
weekly
rotate 4
compress
delaycompress
notifempty
copytruncate
create 0600 root root
}