[packages/exim] - up to 4.82; disable DSN support (not maintained and doesn't seem to get integrated); bug 1057 fixe

arekm arekm at pld-linux.org
Mon Oct 28 15:25:08 CET 2013


commit f1095e43668f9dcdc8897ab37895521e6003cec4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Oct 28 15:25:04 2013 +0100

    - up to 4.82; disable DSN support (not maintained and doesn't seem to get integrated); bug 1057 fixed upstream

 exim-bug-1057.patch | 223 ----------------------------------------------------
 exim.spec           |  19 ++---
 exim4-cflags.patch  |  13 +--
 3 files changed, 15 insertions(+), 240 deletions(-)
---
diff --git a/exim.spec b/exim.spec
index c9f5e74..04e0571 100644
--- a/exim.spec
+++ b/exim.spec
@@ -9,20 +9,21 @@
 %bcond_without	spf	# without spf support
 %bcond_without	srs	# without srs support
 %bcond_without	dynamic # dynamic modules
+%bcond_with	dsn	# DSN
 #
 Summary:	University of Cambridge Mail Transfer Agent
 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.80.1
-Release:	16
+Version:	4.82
+Release:	1
 Epoch:		2
 License:	GPL
 Group:		Networking/Daemons/SMTP
 Source0:	ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2
-# Source0-md5:	1a95dc9f02834b1b7430403a75edf162
+# Source0-md5:	feb933baa4db773c2ef76b794c60b647
 Source1:	ftp://ftp.exim.org/pub/exim/exim4/%{name}-html-%{version}.tar.bz2
-# Source1-md5:	a0974c2ed244faa27cb6bc1724880ed3
+# Source1-md5:	072326f172ddbda684ba5cc8bc85e0aa
 Source2:	%{name}.init
 Source3:	%{name}.cron.db
 Source4:	%{name}4.conf
@@ -35,9 +36,8 @@ Source9:	%{name}.aliases
 Source10:	newaliases
 Source11:	%{name}.logrotate
 Source12:	%{name}.sysconfig
-Source13:	ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2
-# Source13-md5:	ff781bd31fb1d574c8b9d33f4bfd34a7
-Source14:	ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2
+
+Source14:	ftp://ftp.exim.org/pub/exim/exim4/old/config.samples.tar.bz2
 # Source14-md5:	4b93321938a800caa6127c48ad60a42b
 Source15:	%{name}4-smtp.pamd
 Source16:	%{name}on.png
@@ -53,7 +53,6 @@ Patch7:		%{name}_463_dsn_1_3.patch
 Patch8:		%{name}-spam-timeout.patch
 Patch9:		exim-bug-659.patch
 Patch10:	%{name}-force-sigalrm.patch
-Patch11:	%{name}-bug-1057.patch
 URL:		http://www.exim.org/
 %{?with_sasl:BuildRequires:	cyrus-sasl-devel >= 2.1.0}
 BuildRequires:	db-devel
@@ -166,13 +165,11 @@ Pliki nagłówkowe dla Exima.
 %patch4 -p1
 %patch5 -p1
 
-%patch7 -p1
+%{?with_dsn:%patch7 -p1}
 %patch8 -p1
 %patch9 -p2
 %patch10 -p1
-%patch11 -p1
 
-install %{SOURCE13} doc/FAQ.txt.bz2
 install %{SOURCE14} doc/config.samples.tar.bz2
 
 install -d Local
diff --git a/exim-bug-1057.patch b/exim-bug-1057.patch
deleted file mode 100644
index ccd2825..0000000
--- a/exim-bug-1057.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-diff -urN exim-4.73_RC1/src/malware.c exim-4.73_RC1-new/src/malware.c
---- exim-4.73_RC1/src/malware.c	2010-12-23 14:19:35.000000000 +0000
-+++ exim-4.73_RC1-new/src/malware.c	2011-01-05 09:58:34.000000000 +0000
-@@ -12,6 +12,18 @@
- #include "exim.h"
- #ifdef WITH_CONTENT_SCAN
- 
-+/* The maximum number of clamd servers that are supported in the configuration */
-+#define MAX_CLAMD_SERVERS 32
-+#define MAX_CLAMD_SERVERS_S "32"
-+/* Maximum length of the hostname that can be specified in the clamd address list */
-+#define MAX_CLAMD_ADDRESS_LENGTH 64
-+#define MAX_CLAMD_ADDRESS_LENGTH_S "64"
-+
-+typedef struct clamd_address_container {
-+  uschar tcp_addr[MAX_CLAMD_ADDRESS_LENGTH];
-+  unsigned int tcp_port;
-+} clamd_address_container;
-+
- /* declaration of private routines */
- static int mksd_scan_packed(int sock, uschar *scan_filename);
- static int malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking);
-@@ -1295,7 +1307,7 @@
-      * WITH_OLD_CLAMAV_STREAM is defined.
-      * See Exim bug 926 for details.  */
-     else if (strcmpic(scanner_name,US"clamd") == 0) {
--      uschar *clamd_options;
-+      uschar *clamd_options = NULL;
-       uschar clamd_options_buffer[1024];
-       uschar clamd_options_default[] = "/tmp/clamd";
-       uschar *p, *vname, *result_tag, *response_end;
-@@ -1304,16 +1316,16 @@
-       unsigned int port;
-       uschar file_name[1024];
-       uschar av_buffer[1024];
--      uschar hostname[256];
-+      uschar *hostname = "";
-       struct hostent *he;
-       struct in_addr in;
--      uschar *clamd_options2;
--      uschar clamd_options2_buffer[1024];
--      uschar clamd_options2_default[] = "";
-       uschar *clamav_fbuf;
-       int clam_fd, result;
-       unsigned int fsize;
--      BOOL use_scan_command, fits;
-+      BOOL use_scan_command = FALSE, fits;
-+      clamd_address_container * clamd_address_vector[MAX_CLAMD_SERVERS];
-+      int current_server;
-+      int num_servers = 0;
- #ifdef WITH_OLD_CLAMAV_STREAM
-       uschar av_buffer2[1024];
-       int sockData;
-@@ -1327,16 +1339,60 @@
-         /* no options supplied, use default options */
-         clamd_options = clamd_options_default;
-       }
--      if ((clamd_options2 = string_nextinlist(&av_scanner_work, &sep,
--                                             clamd_options2_buffer,
--                                             sizeof(clamd_options2_buffer))) == NULL) {
--        clamd_options2 = clamd_options2_default;
--      }
- 
--      if ((*clamd_options == '/') || (strcmpic(clamd_options2,US"local") == 0))
-+      if (*clamd_options == '/')
-+        /* Local file; so we def want to use_scan_command and don't want to try
-+         * passing IP/port combinations */
-         use_scan_command = TRUE;
--      else
--        use_scan_command = FALSE;
-+      else {
-+        uschar *address = clamd_options;
-+        uschar address_buffer[MAX_CLAMD_ADDRESS_LENGTH + 20];
-+
-+        /* Go through the rest of the list of host/port and construct an array
-+         * of servers to try. The first one is the bit we just passed from
-+         * clamd_options so process that first and then scan the remainder of
-+         * the address buffer */
-+        do {
-+          clamd_address_container *this_clamd;
-+
-+          /* The 'local' option means use the SCAN command over the network
-+           * socket (ie common file storage in use) */
-+          if (strcmpic(address,US"local") == 0) {
-+            use_scan_command = TRUE;
-+            continue;
-+          }
-+
-+          /* XXX: If unsuccessful we should free this memory */
-+          this_clamd =
-+              (clamd_address_container *)store_get(sizeof(clamd_address_container));
-+
-+          /* extract host and port part */
-+          if( sscanf(CS address, "%" MAX_CLAMD_ADDRESS_LENGTH_S "s %u", this_clamd->tcp_addr,
-+                                            &(this_clamd->tcp_port)) != 2 ) {
-+            log_write(0, LOG_MAIN|LOG_PANIC,
-+                      "malware acl condition: clamd: invalid address '%s'", address);
-+            continue;
-+          }
-+
-+          clamd_address_vector[num_servers] = this_clamd;
-+          num_servers++;
-+          if (num_servers >= MAX_CLAMD_SERVERS) {
-+            log_write(0, LOG_MAIN|LOG_PANIC,
-+                  "More than " MAX_CLAMD_SERVERS_S " clamd servers specified; "
-+                  "only using the first " MAX_CLAMD_SERVERS_S );
-+            break;
-+          }
-+        } while ((address = string_nextinlist(&av_scanner_work, &sep,
-+                                        address_buffer,
-+                                        sizeof(address_buffer))) != NULL);
-+
-+        /* check if we have at least one server */
-+        if (!num_servers) {
-+          log_write(0, LOG_MAIN|LOG_PANIC,
-+             "malware acl condition: clamd: no useable clamd server addresses in malware configuration option.");
-+          return DEFER;
-+        }
-+      }
- 
-       /* See the discussion of response formats below to see why we really don't
-       like colons in filenames when passing filenames to ClamAV. */
-@@ -1347,45 +1403,72 @@
- 	return DEFER;
-       }
- 
--      /* socket does not start with '/' -> network socket */
--      if (*clamd_options != '/') {
-+      /* We have some network servers specified */
-+      if (num_servers) {
- 
-         /* Confirmed in ClamAV source (0.95.3) that the TCPAddr option of clamd
-          * only supports AF_INET, but we should probably be looking to the
-          * future and rewriting this to be protocol-independent anyway. */
- 
--        /* extract host and port part */
--        if( sscanf(CS clamd_options, "%s %u", hostname, &port) != 2 ) {
--          log_write(0, LOG_MAIN|LOG_PANIC,
--                    "malware acl condition: clamd: invalid socket '%s'", clamd_options);
--          return DEFER;
--        };
-+        while ( num_servers > 0 ) {
-+          /* Randomly pick a server to start with */
-+          current_server = random_number( num_servers );
-+
-+          debug_printf("trying server name %s, port %u\n",
-+                       clamd_address_vector[current_server]->tcp_addr,
-+                       clamd_address_vector[current_server]->tcp_port);
-+
-+          /* Lookup the host. This is to ensure that we connect to the same IP
-+           * on both connections (as one host could resolve to multiple ips) */
-+          if((he = gethostbyname(CS clamd_address_vector[current_server]->tcp_addr))
-+                          == 0) {
-+            log_write(0, LOG_MAIN|LOG_PANIC,
-+                    "malware acl condition: clamd: failed to lookup host '%s'",
-+                    clamd_address_vector[current_server]->tcp_addr
-+                    );
-+            goto try_next_server;
-+          }
- 
--        /* Lookup the host */
--        if((he = gethostbyname(CS hostname)) == 0) {
--          log_write(0, LOG_MAIN|LOG_PANIC,
--                    "malware acl condition: clamd: failed to lookup host '%s'", hostname);
--          return DEFER;
--        }
-+          in = *(struct in_addr *) he->h_addr_list[0];
- 
--        in = *(struct in_addr *) he->h_addr_list[0];
-+          /* Open the ClamAV Socket */
-+          if ( (sock = ip_socket(SOCK_STREAM, AF_INET)) < 0) {
-+            log_write(0, LOG_MAIN|LOG_PANIC,
-+                      "malware acl condition: clamd: unable to acquire socket (%s)",
-+                      strerror(errno));
-+            goto try_next_server;
-+          }
- 
--        /* Open the ClamAV Socket */
--        if ( (sock = ip_socket(SOCK_STREAM, AF_INET)) < 0) {
--          log_write(0, LOG_MAIN|LOG_PANIC,
--                    "malware acl condition: clamd: unable to acquire socket (%s)",
--                    strerror(errno));
--          return DEFER;
--        }
-+          if (ip_connect( sock,
-+                          AF_INET,
-+                          (uschar*)inet_ntoa(in),
-+                          clamd_address_vector[current_server]->tcp_port,
-+                          5 ) > -1) {
-+            /* Connection successfully established with a server */
-+            hostname = clamd_address_vector[current_server]->tcp_addr;
-+            break;
-+          } else {
-+            log_write(0, LOG_MAIN|LOG_PANIC,
-+               "malware acl condition: clamd: connection to %s, port %u failed (%s)",
-+               clamd_address_vector[current_server]->tcp_addr,
-+               clamd_address_vector[current_server]->tcp_port,
-+               strerror(errno));
- 
--        if (ip_connect(sock, AF_INET, (uschar*)inet_ntoa(in), port, 5) < 0) {
--          (void)close(sock);
--          log_write(0, LOG_MAIN|LOG_PANIC,
--                    "malware acl condition: clamd: connection to %s, port %u failed (%s)",
--                    inet_ntoa(in), port, strerror(errno));
--          return DEFER;
-+            (void)close(sock);
-+          }
-+
-+try_next_server:
-+          /* Remove the server from the list. XXX We should free the memory */
-+          num_servers--;
-+          int i;
-+          for( i = current_server; i < num_servers; i++ )
-+            clamd_address_vector[i] = clamd_address_vector[i+1];
-         }
- 
-+        if ( num_servers == 0 ) {
-+          log_write(0, LOG_MAIN|LOG_PANIC, "malware acl condition: all clamd servers failed");
-+            return DEFER;
-+        }
-       } else {
-         /* open the local socket */
-         if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
diff --git a/exim4-cflags.patch b/exim4-cflags.patch
index 14ad870..aa265dc 100644
--- a/exim4-cflags.patch
+++ b/exim4-cflags.patch
@@ -1,12 +1,13 @@
 diff -urN exim-4.60.org/OS/Makefile-Linux exim-4.60/OS/Makefile-Linux
 --- exim-4.60.org/OS/Makefile-Linux	2005-11-28 11:57:32.000000000 +0100
 +++ exim-4.60/OS/Makefile-Linux	2006-02-17 20:17:00.698452750 +0100
-@@ -9,7 +9,7 @@
- CHOWN_COMMAND=look_for_it
- CHGRP_COMMAND=look_for_it
+@@ -13,7 +13,7 @@
+ CHMOD_COMMAND=look_for_it
  
--CFLAGS=-O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-+CFLAGS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $(CUSTOM_CFLAGS)
- CFLAGS_DYNAMIC=-shared -rdynamic
+ # Preserve CFLAGS and CFLAGS_DYNAMIC from the caller/environment
+-CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
++CFLAGS ?= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $(CUSTOM_CFLAGS)
+ CFLAGS_DYNAMIC ?= -shared -rdynamic
  
  DBMLIB = -ldb
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/exim.git/commitdiff/f1095e43668f9dcdc8897ab37895521e6003cec4



More information about the pld-cvs-commit mailing list