Claudio, What about adding a variation of the patch
http://www.mail-archive.com/[EMAIL PROTECTED]/msg04986.html,
with a define to enable in the Makefile for broken clients that don't
accept @ in the username field?

# diff -u qmail-1.03-orig/checkpassword.c qmail-1.03/checkpassword.c
--- qmail-1.03-orig/checkpassword.c     2004-03-11 02:14:47.000000000
+0100
+++ qmail-1.03/checkpassword.c  2004-03-11 02:14:09.000000000 +0100
@@ -56,7 +56,7 @@
        static  stralloc ld = {0};
        qldap   *q;
        char    *filter;
-       int     r, status, pwok, needforward;
+       int     r, status, pwok, needforward, i;
        unsigned long count, size, max;
        const   char    *attrs[] = {
                                LDAP_UID, /* the first 6 attrs are
default */
@@ -70,6 +70,14 @@
                                LDAP_QUOTA_COUNT,
                                LDAP_PASSWD, 0}; /* passwd is extra */
  
+#ifdef BROKEN_CLIENT_PRINCIPAL
+       /* Replace % with @, for broken clients */
+       /* By: Erik Nielsen <[EMAIL PROTECTED]> */
+       for(i = 0; i < login->len; i++)
+               if(login->s[i] == '%')
+                       login->s[i] = '@';
+#endif
+
        /* TODO more debug output is needed */
        needforward = 0;
        q = qldap_new();


# diff -u qmail-1.03-orig/Makefile qmail-1.03/Makefile
--- qmail-1.03-orig/Makefile    2004-03-11 02:14:47.000000000 +0100
+++ qmail-1.03/Makefile 2004-03-11 02:22:08.000000000 +0100
@@ -19,12 +19,14 @@
 # -DQMQP_COMPRESS to use the QMQP on the fly compression (for clusters)
 # -DQUOTATRASH to include the Trash in the quota calculation (normaly
it is not)
 # -DSMTPEXECCHECK to enable smtp DOS/Windows executable detection
+# -DBROKEN_CLIENT_PRINCIPAL to allow % as substitute for @ for broken
mail clients
 #LDAPFLAGS=-DQLDAP_CLUSTER -DEXTERNAL_TODO -DDASH_EXT -DDATA_COMPRESS
-DQMQP_COMPRESS


-- 
Torgeir Veimo <[EMAIL PROTECTED]>

Reply via email to