Procházet zdrojové kódy

add experimental support for ignoring mailbox@domain by means of option with_ignmad; suggestion from Stefan Buys for kolab-20040217-2.0.0 issue

Thomas Lotterer před 21 roky
rodič
revize
865bfde303
2 změnil soubory, kde provedl 41 přidání a 2 odebrání
  1. 36 1
      imapd/imapd.patch
  2. 5 1
      imapd/imapd.spec

+ 36 - 1
imapd/imapd.patch

@@ -41,7 +41,7 @@ Index: perl/sieve/lib/isieve.c
 +++ perl/sieve/lib/isieve.c	2004-02-02 20:01:21.000000000 +0100
 @@ -41,9 +41,7 @@
  
- /* $Id: isieve.c,v 1.27 2003/10/22 18:50:25 rjs3 Exp $ */
+ /* $Id: imapd.patch,v 1.8 2004/02/02 20:45:59 rse Exp $ */
  
 -#ifdef HAVE_CONFIG_H
 -#include <config.h>
@@ -76,3 +76,38 @@ Index: perl/sieve/Makefile.in
  			fi; \
  			$(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
  	done
+Index: imap/mboxname.c
+--- imap/mboxname.c.orig	2003-10-22 20:50:08.000000000 +0200
++++ imap/mboxname.c	2004-03-10 21:08:47.000000000 +0100
+@@ -127,6 +127,7 @@
+ 		domainlen = strlen(result);
+ 	    }
+ 	}
++#ifndef IGNMAD /* ignore mailbox@domain */
+ 	if ((cp = strrchr(name, '@'))) {
+ 	    /* mailbox specified as mbox@domain */
+ 	    namelen = cp - name;
+@@ -149,6 +150,7 @@
+ 		domainlen = strlen(result);
+ 	    }
+ 	}
++#endif /* IGNMAD */
+ 
+ 	/* if no domain specified, we're in the default domain */
+     }
+@@ -212,6 +214,7 @@
+ 		domainlen = strlen(result);
+ 	    }
+ 	}
++#ifndef IGNMAD /* ignore mailbox@domain */
+ 	if ((cp = strrchr(name, '@'))) {
+ 	    /* mailbox specified as mbox@domain */
+ 	    namelen = cp - name;
+@@ -234,6 +237,7 @@
+ 		domainlen = strlen(result);
+ 	    }
+ 	}
++#endif /* IGNMAD */
+ 
+ 	/* if no domain specified, we're in the default domain */
+     }

+ 5 - 1
imapd/imapd.spec

@@ -34,11 +34,12 @@ Class:        PLUS
 Group:        Mail
 License:      BSD
 Version:      2.2.3
-Release:      20040218
+Release:      20040310
 
 #   package options
 %option       with_fsl    yes
 %option       with_group  no
+%option       with_ignmad no
 
 #   list of sources
 Source0:      ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
@@ -135,6 +136,9 @@ AutoReqProv:  no
 
 %build
     cflags="%{l_cppflags}"
+%if "%{with_ignmad}" == "yes"
+    cflags="$cflags -DIGNMAD=yes"
+%endif
     ldflags="%{l_ldflags} %{l_fsl_ldflags}"
     case "%{l_platform -t}" in
         *-sunos*   ) ldflags="$ldflags -lsocket -lnsl" ;;