annotate test.bash @ 176:4ec928b24bab stable-6-0-10

allow manual whitelisting with stamp 1 to remove a whitelist entry
author carl
date Sun, 23 Sep 2007 14:33:00 -0700
parents 97d7da45fe2a
children d6531c702be3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
163
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
1 #!/bin/bash
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
3 #rebuild
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
4 make
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
5
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
6 # build the test.cf file
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
7 make -f Makefile.test test.cf
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
8
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
9 # start the milter
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
10 pid=/var/run/dnsbl.pid
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
11 echo start the milter
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
12 mkdir -p /var/run/dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
13 chmod 700 /var/run/dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
14 #chown dnsbl:dnsbl /var/run/dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
15 [ -f "$pid" ] && mv -f $pid $pid.save
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
16 #src/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
17 #valgrind --leak-check=full --show-reachable=yes src/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
18 valgrind src/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
19 sleep 5
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
20 P2=`cat $pid`
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
21 [ -f "$pid.save" ] && mv -f $pid.save $pid
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
22 echo started dnsbl milter as process $P2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
23
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
24 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbltest
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
25 sleep 5
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
26 P3=`head -1 /var/run/sm-test.pid`
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
27 echo started sendmail as process $P3
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
28
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
29 echo "eventually, run the following two kill commands"
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
30 echo kill -SIGINT $P2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
31 echo kill -KILL $P3