changeset 371:df7dc6b2b153

install dnsblnogrey/whiteclnt for dccifd
author Carl Byington <carl@five-ten-sg.com>
date Wed, 08 Feb 2017 10:03:40 -0800
parents 5380552644e2
children fed9b9197346
files dnsbl.rc.in dnsbl.spec.in src/dccifd.cpp
diffstat 3 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dnsbl.rc.in	Tue Feb 07 18:09:52 2017 -0800
+++ b/dnsbl.rc.in	Wed Feb 08 10:03:40 2017 -0800
@@ -22,9 +22,7 @@
         echo -n "Starting dnsbl-milter: "
         if [ ! -f /var/lock/subsys/dnsbl ]; then
             cd SYSCONFDIR/dnsbl     # conf file is here
-            DCCIFD=
-            [ -S /var/dcc/dccifd ] && DCCIFD='-b /var/dcc/dccifd'
-            SBINDIR/dnsbl -d 10 $DCCIFD -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
+            SBINDIR/dnsbl -d 10 -b /var/dcc/dccifd -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
             RETVAL=$?
             pid=`pidof -s SBINDIR/dnsbl`
             if [ $pid ]
--- a/dnsbl.spec.in	Tue Feb 07 18:09:52 2017 -0800
+++ b/dnsbl.spec.in	Wed Feb 08 10:03:40 2017 -0800
@@ -68,6 +68,8 @@
 make DESTDIR=%{buildroot} install
 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/autowhite
 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/.spamassassin
+install -m 644 -D %{buildroot}%{_sysconfdir}/%{name}/dnsblnogrey \
+     %{buildroot}/var/dcc/userdirs/dnsblnogrey/whiteclnt
 %if "%{?dist}" == ".el7"
 install -m 644 -D %{buildroot}%{_sysconfdir}/%{name}/%{name}.service \
     %{buildroot}%{_unitdir}/%{name}.service
@@ -82,6 +84,7 @@
 rm -f  %{buildroot}%{_sysconfdir}/%{name}/%{name}
 rm -f  %{buildroot}%{_sysconfdir}/%{name}/%{name}.service
 rm -f  %{buildroot}%{_sysconfdir}/%{name}/%{name}-tmpfs.conf
+rm -f  %{buildroot}%{_sysconfdir}/%{name}/dnsblnogrey
 
 
 %pre
@@ -137,6 +140,7 @@
 %docdir %{_datadir}/doc/%{name}-%{version}
 %{_datadir}/doc/%{name}-%{version}
 %config(noreplace) %attr(0750,%{name},root) %{_sysconfdir}/%{name}
+%config(noreplace) %attr(0644,root,root) /var/dcc/userdirs/dnsblnogrey/whiteclnt
 %if "%{?dist}" == ".el7"
 %{_prefix}/lib/tmpfiles.d/%{name}.conf
 %{_unitdir}/%{name}.service
@@ -147,8 +151,9 @@
 
 
 %changelog
-* Tue Feb 07 2017 Carl Byington <carl@five-ten-sg.com> - 6.49-1
+* Wed Feb 08 2017 Carl Byington <carl@five-ten-sg.com> - 6.49-1
 - RHEL7 systemd and /var/run is on tmpfs
+- install dnsblnogrey/whiteclnt for dccifd
 
 * Tue Dec 20 2016 Carl Byington <carl@five-ten-sg.com> - 6.48-1
 - allow dkim whitelisting.
--- a/src/dccifd.cpp	Tue Feb 07 18:09:52 2017 -0800
+++ b/src/dccifd.cpp	Wed Feb 08 10:03:40 2017 -0800
@@ -105,6 +105,7 @@
 void DccInterface::mlfi_header(SMFICTX *ctx, const char *headerf, const char *headerv)
 {
 	if (dccifd_socket == NULL_SOCKET) Connect();
+    if (err) return;
 	if ((dccifd_socket != NULL_SOCKET) && (!dccifd_input.empty())) {
 		output(dccifd_input);
 		dccifd_input = "";
@@ -275,7 +276,6 @@
 
 void DccInterface::output(const char* buffer, size_t size)
 {
-	// if there are problems, fail.
 	if (err) return;
 
 	// buffer it if not connected yet