annotate dnsbl.rc.in @ 449:d4275f26241c stable-6-0-69

fix spf mx:domain.tld token parsing
author Carl Byington <carl@five-ten-sg.com>
date Tue, 10 Apr 2018 12:56:07 -0700
parents df7dc6b2b153
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
163
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
1 #!@BASH@
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
2 #
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
3 # dnsbl This script controls the dnsbl milter daemon.
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
4 #
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
5 #
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
6 # chkconfig: 2345 79 31
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
7 # description: dnsbl is an interface between MTA and the various dns blocking lists
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
8 # processname: dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
9 # pidfile: /var/run/dnsbl.pid
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
10 # Source function library.
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
11 #
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
12 . /etc/rc.d/init.d/functions
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
13
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
14 # Source networking configuration.
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
15 . /etc/sysconfig/network
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
16
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
17 RETVAL=0
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
18 # See how we were called.
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
19 case "$1" in
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
20 start)
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
21 # Start daemons.
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
22 echo -n "Starting dnsbl-milter: "
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
23 if [ ! -f /var/lock/subsys/dnsbl ]; then
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
24 cd SYSCONFDIR/dnsbl # conf file is here
371
df7dc6b2b153 install dnsblnogrey/whiteclnt for dccifd
Carl Byington <carl@five-ten-sg.com>
parents: 211
diff changeset
25 SBINDIR/dnsbl -d 10 -b /var/dcc/dccifd -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
163
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
26 RETVAL=$?
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
27 pid=`pidof -s SBINDIR/dnsbl`
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
28 if [ $pid ]
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
29 then
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
30 success "Starting dnsbl milter:"
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
31 touch /var/lock/subsys/dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
32 echo
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
33 else
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
34 failure "Starting dnsbl milter:"
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
35 echo
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
36 fi
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
37 else
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
38 echo -n "already running! "
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
39 failure "dnsbl milter already running!"
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
40 echo
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
41 fi
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
42
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
43 ;;
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
44 stop)
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
45 # Stop daemons.
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
46 echo -n "Shutting down dnsbl-milter: "
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
47 killproc dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
48 RETVAL=$?
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
49 echo
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
50 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
51 ;;
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
52 restart|reload)
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
53 $0 stop
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
54 $0 start
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
55 RETVAL=$?
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
56 ;;
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
57 status)
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
58 status dnsbl
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
59 RETVAL=$?
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
60 ;;
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
61 *)
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
62 echo "Usage: dnsbl {start|stop|restart|status}"
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
63 exit 1
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
64 esac
97d7da45fe2a spamassassin changes
carl
parents:
diff changeset
65 exit $RETVAL