Larry Nguyen wrote:
On 3:39:36 am 05/16/05 -= Tran Vu Hung =- <[EMAIL PROTECTED]> wrote:
hi all,
Ca'i mail Server cu?a em cha.y Fetchmail, cu+' mo^~i 15p no' cha.y 1 la^`n, ba^y gio+` em muo^'n thay do^?i tho+`i gian cha.y cu?a no' nhu+ng ke\.t mo^.t lo^~i la` kho^ng bie^'t ca'ch de^? su+?a nhu+ the^' na`o, kho^ng the^? ti`m ddu+o+c file fetchmailconf, em ti`m trong crontab cu~ng kho^ng tha^'y ca'i gi` ca?, ai dda~ du`ng con na`y ro^`i thi` la`m o+n giu'p ddo+~ em 1 chu't du+o+.c kho^ng a\.
Xem /var/log/messages coi coi ca'i na`o go.i fetchmail
-Larry
em ddi.nh la`m the^' na`y kho^ng bie^'t ca'c ba'c tha^'y sao
~/.bash_profile
# Start Fetchmail up when I Login.
TDEV=`tty | sed -n -e "s#/dev/##p"` if [ ! -s ~/.fetchmail.pid ]; then
echo -n "Starting fetchmail daemon..."
fetchmail -d 900 // 15 phut
echo $TDEV > ~/.fetchmail.owner
echo "done."
fi
# END of Fetchmail startup~/.bash_logout
# Below is for Fetchmail clean up
TDEV=`tty | sed -n -e "s#/dev/##p"`
if [ -s ~/.fetchmail.pid ]; then
if [ -s ~/.fetchmail.owner ]; then
OWNER=`cat ~/.fetchmail.owner` if [ $TDEV = $OWNER ]; then
rm -rf ~/.fetchmail.owner
fetchmail -q >/dev/null 2>&1
fi
fi
fi
# END of Fetchmail clean uphoac cach nay, ca'c ba'c xem giu'p em chu't co`n thie^'u xo't cho^~ na`o kho^ng a.
ca'i nay em co' tham kha?o
----- Begin fetchmail.sh ----- #! /bin/bash LOGCOUNT=w -hsf|grep hung|wc -l MAXCOUNT=1
case "$1" in
start-daemon)
if [ -e ~hung/.fetchmail.pid ]
then
exit
fi
fetchmail -d 900 // khoang 15 phut no chay 1 lan
;; start)
if [ -e ~hung/.fetchmail.pid ]
then
exit
fi
fetchmail
;; stop-daemon)
if [ ! -e ~hung/.fetchmail.pid ]
then
exit
fi
if [ $LOGCOUNT -eq $MAXCOUNT ]
then
fetchmail --quit
fi
;;esac exit 0
------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ VietLUG-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vietlug-users
