REM QB2C TCP routines (c) 2003 by Mike Ramos of US Internet Technologies, Inc. REM REM calling format from UNIX shell account REM REM tail -f -n0 /var/log/messages | ./messtail REM REM to run in the background REM REM tail -f -n0 /var/log/messages | ./messtail & REM REM make sure you change username and domainname to use it REM REM the actual program messtail.bas REM defint a-z REM Loop forever a=0 while a=0 REM read a line input a$ REM see if "to root" is in it if instr(1,a$,"to root") <> 0 then REM if found, save the file to temp.mes open "temp.mes" for output as 9 print #9,a$ close 9 REM mail temp.mes to username@domainname.net shell "mail -s 'MESSAGE: PROBLEM' username@domainname.net