From cmoulin@simplerezo.com  Sun Oct 24 14:56:08 2004
Return-Path: <cmoulin@simplerezo.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D736A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Oct 2004 14:56:08 +0000 (GMT)
Received: from mail.ouestil.com (home.ouestil.com [81.56.27.190])
	by mx1.FreeBSD.org (Postfix) with SMTP id 9786E43D48
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Oct 2004 14:56:07 +0000 (GMT)
	(envelope-from cmoulin@simplerezo.com)
Received: (qmail 51542 invoked by uid 98); 24 Oct 2004 14:56:03 -0000
Received: from 192.168.1.153 by xeon-web.ouestil.com (envelope-from <cmoulin@simplerezo.com>, uid 82) with qmail-scanner-1.24 
 (clamdscan: 0.80/533. f-prot: 4.1.1/3.13.4. spamassassin: 3.0.0.  
 Clear:RC:1(192.168.1.153):. 
 Processed in 0.248304 secs); 24 Oct 2004 14:56:03 -0000
Received: from unknown (HELO nbferrari) (192.168.1.153)
  by mail.ouestil.com with SMTP; 24 Oct 2004 14:56:02 -0000
Message-Id: <20041024145607.9786E43D48@mx1.FreeBSD.org>
Date: Sun, 24 Oct 2004 16:55:55 +0200
From: <freebsd@simplerezo.com>
Sender: =?iso-8859-1?Q?Cl=E9ment_MOULIN?= <cmoulin@simplerezo.com>
To: "'Renato Botelho'" <renato@galle.com.br>,
	<FreeBSD-gnats-submit@freebsd.org>
In-Reply-To: <20041022124633.59109.qmail@srv1.galle.com.br>
Subject: RE: [PATCH] mail/qmail-scanner: Fix spamd/spamc unix sockets detection

>Number:         73085
>Category:       ports
>Synopsis:       [PATCH] mail/qmail-scanner: Fix spamd/spamc unix sockets
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ceri
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 24 15:00:43 GMT 2004
>Closed-Date:    Sun Oct 24 17:43:02 GMT 2004
>Last-Modified:  Sun Oct 24 17:43:02 GMT 2004
>Originator:     Renato Botelho
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
Galle Folheados
>Environment:
System: FreeBSD srv1.galle.com.br 5.2.1-RELEASE-p8 FreeBSD =
5.2.1-RELEASE-p8
#27: Wed May 26 10:21:14 BRT 2004
>Description:
When you are running spamd/spamc with unix sockets, Q-S configure script
don=B4t detect the socket right.

Port maintainer (freebsd@simplerezo.com) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- qmail-scanner-1.24.patch begins here ---
diff -ruN --exclude=3DCVS
/var/jail/data/usr/ports/mail/qmail-scanner.orig/files/patch-configure
/var/jail/data/usr/ports/mail/qmail-scanner/files/patch-configure
--- =
/var/jail/data/usr/ports/mail/qmail-scanner.orig/files/patch-configure
Fri Oct 22 08:45:25 2004
+++ /var/jail/data/usr/ports/mail/qmail-scanner/files/patch-configure	=
Fri
Oct 22 09:38:58 2004
@@ -1,5 +1,5 @@
---- configure.orig	Tue Oct 19 02:26:55 2004
-+++ configure	Fri Oct 22 01:36:34 2004
+--- ./configure.orig	Mon Oct 18 21:26:55 2004
++++ ./configure	Fri Oct 22 09:36:22 2004
 @@ -1,13 +1,6 @@
  #!/bin/sh
  #
@@ -78,7 +78,20 @@
    --scanners <list of installed content scanners>
  				    Defaults to "auto" - will use
  				    whatever scanners are found on system.
-@@ -1005,9 +1017,14 @@
+@@ -910,10 +922,11 @@
+ 	    #Test to see if spamc is calling Unix sockets instead of TCP
+ 	    SPAMD_SOCKET=3D`ps -ef 2>/dev/null|egrep 'spamd.*socket'|grep -v
grep|sed -e 's/^.*socketpath=3D//'|awk '{print $1}'`
+ 	    if [ "$SPAMD_SOCKET" =3D "" ]; then
+-		SPAMD_SOCKET=3D`ps aux 2>/dev/null|egrep 'spamd.*socket'|grep
-v grep|sed -e 's/^.*socketpath=3D//'|awk '{print $1}'`
++		SPAMD_SOCKET=3D`ps auxww 2>/dev/null|egrep
'spamd.*socket'|grep -v grep|sed -e 's/^.*socketpath=3D//'|awk '{print =
$1}'`
+ 	    fi
+ 	    if [ "$SPAMD_SOCKET" !=3D "" -a -S "$SPAMD_SOCKET" ]; then
+ 		SPAMC_BINARY=3D"$SPAMC_BINARY -U $SPAMD_SOCKET"
++		SA_HN=3D" -U $SPAMD_SOCKET"
+ 	    fi
+             DD=3D"`$SPAMC_BINARY < ./contrib/spamc-nice.eml`"
+             if [ "`echo $DD|grep '^From '`" !=3D "" ]; then
+@@ -1005,9 +1018,14 @@
 =20
  MAILDOMAIN=3D${MAILDOMAIN:-$FQDN}
  LOCAL_DOMAINS_ARRAY=3D${LOCAL_DOMAINS_ARRAY:-$MAILDOMAIN}
@@ -95,7 +108,7 @@
  if [ "$MANUAL_INSTALL" =3D "1" ]; then
      CMDLINE=3D"$CMDLINE --no-QQ-check $MANUAL_INSTALL"
  fi
-@@ -1381,7 +1398,7 @@
+@@ -1381,7 +1399,7 @@
      fi
  fi
 =20
@@ -104,7 +117,7 @@
 =20
  SCANNER_ARRAY=3D`echo $SCANNER_ARRAY|sed 's/^,//g'`
 =20
-@@ -1461,7 +1478,13 @@
+@@ -1461,7 +1479,13 @@
      fi
      echo "archiving $ASTRING into $AS_QQ/$ARCHIVEDIR/"
  fi
@@ -119,7 +132,7 @@
  echo "local-domains=3D$LOCAL_DOMAINS_ARRAY"
  echo "silent-viruses=3D$FIND_SILENT_VIRUSES_ARRAY"
  echo "scanners=3D$SCANNER_ARRAY"
-@@ -1623,10 +1646,12 @@
+@@ -1623,10 +1647,12 @@
  s?SPAMC_BINARY?$SPAMC_BINARY?g;
  s?SPAMC_OPTIONS?$SPAMC_OPTIONS?g;
  s?SPAMC_SUBJECT?$SPAMC_SUBJECT?g;
--- qmail-scanner-1.24.patch ends here ---



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ceri 
State-Changed-When: Sun Oct 24 17:42:25 GMT 2004 
State-Changed-Why:  
Misfiled followup to ports/73001 [content migrated]. 


Responsible-Changed-From-To: gnats-admin->ceri 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Sun Oct 24 17:42:25 GMT 2004 
Responsible-Changed-Why:  
Misfiled followup to ports/73001 [content migrated]. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73085 
>Unformatted:
 Hi,
 
 Maybe i will include this in the next release of the ports, but i hope =
 QS
 team will include this in QS 1.25.
 I have see your patch submission on sourceforge... And you have forgot =
 the
 attachment ;-)
 http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1052136&grou=
 p_id=3D61
 16&atid=3D306116
 
 Regards,
 
 --
 Clement Moulin
 SimpleRezo
 
 -----Message d'origine-----
 De : Renato Botelho [mailto:renato@galle.com.br]=20
 Envoy=E9 : vendredi 22 octobre 2004 14:47
 =C0 : FreeBSD-gnats-submit@freebsd.org
 Cc : freebsd@simplerezo.com
 Objet : [PATCH] mail/qmail-scanner: Fix spamd/spamc unix sockets =
 detection
 
 
 detection
