annotate test.bash @ 326:5e4b5540c8cc

allow multiple dkim signers in authentication results
author Carl Byington <carl@five-ten-sg.com>
date Sun, 18 Dec 2016 16:51:33 -0800
parents d6531c702be3
children
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
178
d6531c702be3 embedded dcc filtering
carl
parents: 163
diff changeset
16 DCCIFD=
d6531c702be3 embedded dcc filtering
carl
parents: 163
diff changeset
17 [ -S /var/dcc/dccifd ] && DCCIFD='-b /var/dcc/dccifd'
d6531c702be3 embedded dcc filtering
carl
parents: 163
diff changeset
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
d6531c702be3 embedded dcc filtering
carl
parents: 163
diff changeset
19 valgrind --leak-check=full src/dnsbl -d 10 $DCCIFD -r /var/run/dnsbl/dnsbl.resolver.sock2 -p local:/var/run/dnsbl/dnsbl.sock2
d6531c702be3 embedded dcc filtering
carl
parents: 163
diff changeset
20 rm -f tracelog*
d6531c702be3 embedded dcc filtering
carl
parents: 163
diff changeset
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
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
22 sleep 5
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
23 P2=`cat $pid`
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
24 [ -f "$pid.save" ] && mv -f $pid.save $pid
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
25 echo started dnsbl milter as process $P2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
26
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
27 /usr/lib/sendmail -bd -Ctest.cf -Ldnsbltest
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
28 sleep 5
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
29 P3=`head -1 /var/run/sm-test.pid`
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
30 echo started sendmail as process $P3
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
31
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
32 echo "eventually, run the following two kill commands"
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
33 echo kill -SIGINT $P2
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
34 echo kill -KILL $P3