summaryrefslogtreecommitdiff
path: root/tools/mk_smtp_rules
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-06-03 00:01:46 -0700
committerJohn Denker <jsd@av8n.com>2012-06-03 00:01:46 -0700
commit332213df3e305f06bdda6a191a7f98834c61aa9a (patch)
treef143526559efd663f0fe978223e449c88eebce19 /tools/mk_smtp_rules
parente866b3e47fe92eafc9d6d40a579993c8919b9842 (diff)
move code from makefile to script, to give better control;
defaults should not clobber non-defaults
Diffstat (limited to 'tools/mk_smtp_rules')
-rwxr-xr-xtools/mk_smtp_rules18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/mk_smtp_rules b/tools/mk_smtp_rules
new file mode 100755
index 0000000..85c3298
--- /dev/null
+++ b/tools/mk_smtp_rules
@@ -0,0 +1,18 @@
+#! /bin/bash
+
+# if /etc/tcpserver/smtp.rules does not already exist,
+# create it with some reasonable defaults
+
+dest=/etc/tcpserver/smtp.rules
+
+install -d $( dirname $dest )
+
+if ! test -r $dest ; then
+
+<<EoF cat > $dest
+10.:allow,RELAYCLIENT=""
+127.0.0.:allow,RELAYCLIENT=""
+:allow
+EoF
+
+fi