163
|
1 #!/bin/bash
|
|
2
|
|
3 #rebuild
|
|
4 make
|
|
5
|
|
6 # build the test.cf file
|
|
7 make -f Makefile.test test.cf
|
|
8
|
|
9 # start the milter
|
|
10 pid=/var/run/dnsbl.pid
|
|
11 echo start the milter
|
|
12 mkdir -p /var/run/dnsbl
|
|
13 chmod 700 /var/run/dnsbl
|
|
14 #chown dnsbl:dnsbl /var/run/dnsbl
|
|
15 [ -f "$pid" ] && mv -f $pid $pid.save
|
178
|
16 DCCIFD=
|
|
17 [ -S /var/dcc/dccifd ] && DCCIFD='-b /var/dcc/dccifd'
|
|
18 #valgrind --leak-check=full --show-reachable=yes src/dnsbl -d 10 $DCCIFD -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2
|
|
19 valgrind --leak-check=full src/dnsbl -d 10 $DCCIFD -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2
|
|
20 rm -f tracelog*
|
|
21 #strace -e trace=open,close,read,write -o tracelog -f -ff -x src/dnsbl -d 10 $DCCIFD -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2 &
|
163
|
22 sleep 5
|
|
23 P2=`cat $pid`
|
|
24 [ -f "$pid.save" ] && mv -f $pid.save $pid
|
|
25 echo started dnsbl milter as process $P2
|
|
26
|
|
27 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbltest
|
|
28 sleep 5
|
|
29 P3=`head -1 /var/run/sm-test.pid`
|
|
30 echo started sendmail as process $P3
|
|
31
|
|
32 echo "eventually, run the following two kill commands"
|
|
33 echo kill -SIGINT $P2
|
|
34 echo kill -KILL $P3
|