packages: exim/exim.spec, exim/exim-bug-1056.patch (NEW), exim/exim-noloadb...

arekm arekm at pld-linux.org
Thu Jan 6 14:14:15 CET 2011


Author: arekm                        Date: Thu Jan  6 13:14:15 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 4.73; add better spamd loadbalance patch; drop noloadbalance patch

---- Files affected:
packages/exim:
   exim.spec (1.321 -> 1.322) , exim-bug-1056.patch (NONE -> 1.1)  (NEW), exim-noloadbalance.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/exim/exim.spec
diff -u packages/exim/exim.spec:1.321 packages/exim/exim.spec:1.322
--- packages/exim/exim.spec:1.321	Thu Dec 16 15:30:01 2010
+++ packages/exim/exim.spec	Thu Jan  6 14:14:09 2011
@@ -14,15 +14,15 @@
 Summary(pl.UTF-8):	Agent Transferu Poczty Uniwersytetu w Cambridge
 Summary(pt_BR.UTF-8):	Servidor de correio eletrônico exim
 Name:		exim
-Version:	4.72
-Release:	5
+Version:	4.73
+Release:	1
 Epoch:		2
 License:	GPL
 Group:		Networking/Daemons/SMTP
 Source0:	ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2
-# Source0-md5:	ccc937b533568e5e8340f181a3b3d2ff
+# Source0-md5:	b32fb85c5161ad2fabfe9ba860a1ad2c
 Source1:	ftp://ftp.exim.org/pub/exim/exim4/%{name}-html-%{version}.tar.bz2
-# Source1-md5:	8b39be84de74b94bd4b5c3e7aad3fcdf
+# Source1-md5:	2122481f3248a7c102024a5c22cd5c72
 Source2:	%{name}.init
 Source3:	%{name}.cron.db
 Source4:	%{name}4.conf
@@ -47,7 +47,7 @@
 Patch4:		%{name}4-Makefile-Default.patch
 # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch
 Patch5:		localscan_dlopen_%{name}_4.20_or_better.patch
-Patch6:		%{name}-noloadbalance.patch
+Patch6:		%{name}-bug-1056.patch
 # http://sourceforge.net/projects/eximdsn/
 Patch7:		%{name}_463_dsn_1_3.patch
 Patch8:		%{name}-spam-timeout.patch
@@ -321,6 +321,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.322  2011/01/06 13:14:09  arekm
+- up to 4.73; add better spamd loadbalance patch; drop noloadbalance patch
+
 Revision 1.321  2010/12/16 14:30:01  zagrodzki
 add config.h to the list of installed header files.
 

================================================================
Index: packages/exim/exim-bug-1056.patch
diff -u /dev/null packages/exim/exim-bug-1056.patch:1.1
--- /dev/null	Thu Jan  6 14:14:15 2011
+++ packages/exim/exim-bug-1056.patch	Thu Jan  6 14:14:09 2011
@@ -0,0 +1,68 @@
+diff -urN exim-4.71/src/spam.c exim-4.71-new/src/spam.c
+--- exim-4.71/src/spam.c	2008-07-18 18:55:42.000000000 +0100
++++ exim-4.71-new/src/spam.c	2009-12-17 12:37:14.000000000 +0000
+@@ -104,10 +104,8 @@
+ 
+   /* socket does not start with '/' -> network socket */
+   if (*spamd_address_work != '/') {
+-    time_t now = time(NULL);
+     int num_servers = 0;
+-    int current_server = 0;
+-    int start_server = 0;
++    int current_server;
+     uschar *address = NULL;
+     uschar *spamd_address_list_ptr = spamd_address_work;
+     uschar address_buffer[256];
+@@ -119,6 +117,7 @@
+                                         address_buffer,
+                                         sizeof(address_buffer))) != NULL) {
+ 
++      /* Potential memory leak as we never free the store. */
+       spamd_address_container *this_spamd =
+         (spamd_address_container *)store_get(sizeof(spamd_address_container));
+ 
+@@ -143,9 +142,10 @@
+       return DEFER;
+     };
+ 
+-    current_server = start_server = (int)now % num_servers;
++    while ( num_servers > 0 ) {
+ 
+-    while (1) {
++      /* Randomly pick a server to try */
++      current_server = random_number( num_servers );
+ 
+       debug_printf("trying server %s, port %u\n",
+                    spamd_address_vector[current_server]->tcp_addr,
+@@ -173,16 +173,21 @@
+          spamd_address_vector[current_server]->tcp_addr,
+          spamd_address_vector[current_server]->tcp_port,
+          strerror(errno));
+-      current_server++;
+-      if (current_server >= num_servers)
+-        current_server = 0;
+-      if (current_server == start_server) {
+-        log_write(0, LOG_MAIN|LOG_PANIC, "spam acl condition: all spamd servers failed");
+-        (void)fclose(mbox_file);
+-        (void)close(spamd_sock);
+-        return DEFER;
+-      };
+-    };
++
++      (void)close(spamd_sock);
++
++      /* Remove the server from the list. XXX We should free the memory */
++      num_servers--;
++      int i;
++      for( i = current_server; i < num_servers; i++ )
++        spamd_address_vector[i] = spamd_address_vector[i+1];
++    }
++
++    if ( num_servers == 0 ) {
++      log_write(0, LOG_MAIN|LOG_PANIC, "spam acl condition: all spamd servers failed");
++      (void)fclose(mbox_file);
++      return DEFER;
++    }
+ 
+   }
+   else {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/exim/exim.spec?r1=1.321&r2=1.322&f=u



More information about the pld-cvs-commit mailing list