0
|
1 #!/bin/bash
|
|
2
|
|
3 g++ -c dnsbl.cpp
|
|
4 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
|
|
5 if [ "$1" == "comp" ]; then
|
|
6 exit
|
|
7 fi
|
|
8
|
|
9 # build the test.cf file
|
|
10 make test.cf
|
|
11
|
|
12 # start the milter
|
|
13 pid=/var/run/dnsbl.pid
|
|
14 echo start the milter
|
|
15 mkdir -p /var/run/dnsbl
|
|
16 chmod 700 /var/run/dnsbl
|
|
17 mv -f $pid $pid.save
|
|
18 rm -f /var/run/dnsbl/dnsbl.sock
|
5
|
19 cp /var/dnsbl/*conf .
|
4
|
20 ./dnsbl -c -p local:/var/run/dnsbl/dnsbl.sock >check.txt 2>&1
|
|
21 #sleep 5
|
|
22 #P2=`cat $pid`
|
|
23 #mv -f $pid.save $pid
|
|
24 #echo started dnsbl milter as process $P2
|
|
25 #
|
|
26 #/usr/lib/sendmail -bd -Ctest.cf -Ldnsbl
|
|
27 #sleep 5
|
|
28 #P3=`head -1 /var/run/sm-test.pid`
|
|
29 #echo started sendmail as process $P3
|
|
30 #
|
|
31 #echo eventually "'"kill -KILL $P2 $P3"'"
|
0
|
32
|