Re: Spamd checker script

2012-10-31 Thread Ted Mittelstaedt
I run the following once an hour out of cron on my FreeBSD mailserver, the echos are merely stuff the log and aren't necessary. You could easily delete them: $ cat /root/spamdwatch.sh #!/bin/sh if ps -p `cat /var/run/spamd/spamd.pid` > /dev/null; then echo spamd is running else echo spamd i

Spamd checker script

2012-10-31 Thread Troy McBride
I am trying to write a script that takes an array of server names and pings their spamd to make sure that it is still alive. $t = new Net::Telnet(Prompt=>'//', Port=> 783, output_log=>"out_log.txt", input_log=>"in_log.txt"); for($i=0;$i<$count;$i++) { $t -> open(@server_list[$i]); $line =