From 021ea96748cbb905e5dbc868a5104e1e22fdd62a Mon Sep 17 00:00:00 2001
From: Stuart Gathman <stuart@gathman.org>
Date: Wed, 25 Jul 2007 19:04:44 +0000
Subject: [PATCH] Fixes from test on EL5.

---
 milter.spec   | 8 ++++++++
 spfmilter.cfg | 6 +++---
 start.sh      | 5 +++--
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/milter.spec b/milter.spec
index 068e7d8..a3eae85 100644
--- a/milter.spec
+++ b/milter.spec
@@ -156,6 +156,14 @@ python="%{python}"
 w
 q
 EOF
+ed $RPM_BUILD_ROOT%{libdir}/start.sh <<'EOF'
+/^python=/
+c
+python="%{python}"
+.
+w
+q
+EOF
 %endif
 chmod a+x $RPM_BUILD_ROOT%{libdir}/start.sh
 
diff --git a/spfmilter.cfg b/spfmilter.cfg
index 3a2a7c2..52f4d34 100644
--- a/spfmilter.cfg
+++ b/spfmilter.cfg
@@ -1,18 +1,18 @@
 [milter]
 # The socket used to communicate with sendmail
-socketname = /tmp/spfmiltersock
+socketname = /var/run/milter/spfmiltersock
 # Name of the milter given to sendmail
 name = pyspffilter
 # Trusted relays such as secondary MXes that should not have SPF checked.
 ;trusted_relay =
 # Internal networks that should not have SPF checked.
-internal_connect = 127.0.0.1,192.168.0.0/16
+internal_connect = 127.0.0.1,192.168.0.0/16,10.0.0.0/8
 
 # See http://www.openspf.com for more info on SPF.
 [spf]
 # Use sendmail access map or similar format for detailed spf policy.
 # SPF entries in the access map will override defaults.
-;access_file = /etc/mail/access.db
+access_file = /etc/mail/access.db
 # Connections that get an SPF pass for a pretend MAIL FROM of 
 # postmaster@sometrustedforwarder.com skip SPF checks for the real MAIL FROM.
 # This is for non-SRS forwarders.  It is a simple implementation that
diff --git a/start.sh b/start.sh
index d8de1c4..4945840 100755
--- a/start.sh
+++ b/start.sh
@@ -2,14 +2,15 @@
 appname="$1"
 script="${2:-${appname}}"
 datadir=/var/log/milter
+python="python2.4"
 exec >>${datadir}/${appname}.log 2>&1
 if test -s ${datadir}/${script}.py; then
-  cd %{datadir} # use version in log dir if it exists for debugging
+  cd ${datadir} # use version in log dir if it exists for debugging
 else
   cd /usr/lib/pymilter
 fi
 
 cd /var/log/milter
 exec >>${appname}.log 2>&1
-python2.4 ${appname}.py &
+${python} ${appname}.py &
 echo $! >/var/run/milter/${appname}.pid
-- 
GitLab