aboutsummaryrefslogtreecommitdiff
path: root/dns/rbldnsd/files
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2004-04-13 00:54:39 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2004-04-13 00:54:39 +0000
commite917cd1d09a44c149dd2092f93c4cf40d206094d (patch)
tree94e52d53b196d900914ccb083ecfe7ab5d3b3998 /dns/rbldnsd/files
parent87dafad4f21bc3407be707a780394d015aa2cb94 (diff)
downloadports-e917cd1d09a44c149dd2092f93c4cf40d206094d.tar.gz
ports-e917cd1d09a44c149dd2092f93c4cf40d206094d.zip
Notes
Diffstat (limited to 'dns/rbldnsd/files')
-rw-r--r--dns/rbldnsd/files/example30
-rw-r--r--dns/rbldnsd/files/rbldnsd.sh41
2 files changed, 71 insertions, 0 deletions
diff --git a/dns/rbldnsd/files/example b/dns/rbldnsd/files/example
new file mode 100644
index 000000000000..3e245bcc6c34
--- /dev/null
+++ b/dns/rbldnsd/files/example
@@ -0,0 +1,30 @@
+:127.0.0.2:Open relay, see http://relays.example.com/lookup?$
+# The above is a default or implicit value which is used when no value given
+# for an entry. The `$' characters will be replaced by an IP address in
+# question.
+127.0.0.2
+# A simplest case: single IP address, with default value.
+10.8.60.0/24 :127.0.0.3:Address $ is from private IP range
+# Netblock - 256 IP addresses with it's own A and TXT records
+224/4 Reserved multicast address
+# Another netblock, with default A and explitit TXT values.
+192.168 Dialup pool, see http://dialups.example.com/lookup?$ for explanations
+# IP numbers may be abbreviated, the above is the same as 192.168.0.0/16
+10.10 :5:This network blocked due to massive spam issues
+# A value may be abbreviated as well - :5: is the same as :127.0.0.5:.
+10.10.5-129:5:Those hosts are nasty
+# repeat last octet: 10.10.5.0..10.10.129.255 inclusive
+!10.10.1.2
+# exclusion entry
+#
+# The following examples are for name-based zones.
+#example.com :2:This domain has no working postmaster@ address
+#*.example.com :2:All subdomains of example.com lacks working abuse@ address
+# Simple and wildcarded entry, both will return 127.0.0.2 A record
+#
+# some specials
+$SOA 3000 ns1.example.com admin.example.com 0 600 300 86400 300
+# Start of authority record (TTL 3000), with serial (0) computed as
+# a timestamp of data file
+$NS 3000 ns1.example.com ns2.example.com
+# two nameservers
diff --git a/dns/rbldnsd/files/rbldnsd.sh b/dns/rbldnsd/files/rbldnsd.sh
new file mode 100644
index 000000000000..593adaa299f8
--- /dev/null
+++ b/dns/rbldnsd/files/rbldnsd.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+# PROVIDE: rbldnsd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+#
+# Add the following lines to /etc/rc.conf to enable rbldnsd:
+#
+# rbldnsd_enable="YES"
+#
+# See rbldnsd(8) for flags.
+#
+
+. %%RC_SUBR%%
+
+name=rbldnsd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/rbldnsd
+pidfile=/var/run/rbldnsd.pid
+
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+ rm -f $pidfile
+}
+
+# set defaults, enforce pidfile by making it last option before db
+
+rbldnsd_enable=${rbldnsd_enable:-"NO"}
+rbldnsd_flags=${rbldnsd_flags:-"-r /usr/local/etc/rbldnsd -b 127.0.0.1 bl.example.com:ip4set:example"}
+rbldnsd_flags="${rbldnsd_flags% *} -p $pidfile ${rbldnsd_flags##* }"
+
+load_rc_config $name
+run_rc_command "$1"
+