MrOzone writes:

« HTML content follows »
With more reading I discoverd the disableimap and disablepop3 section.  My problem is I get a TRUE/FALSE value back from ldap. ( I cant change the schema to make it a number)  Does imap/pop recognize TRUE as a 1? And if

No.

not any suggestion to make it work?  Would a active filter to see if they are true to return 1?

Setting LDAP_FILTER will work, however that would effectively make the account completely nonexistent, as far as Courier is concerned. Not only you won't be able to log in via IMAP or POP3, but any mail addressed to this mailbox will be rejected by Courier.

Actually, by looking at the code, it looks like it's fairly easy to patch courier-authlib to treat 'true' or 'yes' as equivalent to '1', for these purposes. Try applying the following patch.



Index: authoption.c
===================================================================
RCS file: /cvsroot/courier/libs/authlib/authoption.c,v
retrieving revision 1.3
diff -U3 -r1.3 authoption.c
--- authoption.c        10 Nov 2004 00:42:04 -0000      1.3
+++ authoption.c        11 Nov 2009 22:45:03 -0000
@@ -28,6 +28,9 @@
        if (!p) return 0;
 
        i = atoi(p);
+
+       if (i == 0 && strchr("tTyY", *p))
+               i=1;   /* Convert 'true', 'TRUE', 'yes', 'YES' to 1 */
        free(p);
        return i;
 }

Attachment: pgp7ZKE91CsUK.pgp
Description: PGP signature

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to