On Wed, Dec 28, 2005 at 04:42:53PM +0530, Sameer N Ingole wrote: > Hi, > > I have been trying to add an attribute mailReplyText for an LDAP entry. > The message I was trying to store is a multiline message so I was > referring to > > http://www.nrg4u.com/qmail/QLDAPINSTALL > LDAP_REPLYTEXT (default: "mailReplyText") > > I tried to use base64 encoded message for that attribute but it did not > work. I got autoreply with encoded message string. But if I set it in > plain text (even multiline, but not encoded), it works. >
Keep in mind, that many ldap libraries do the base64 encoding and decoding on the fly. Base64 encoding will only be visible in the LDIF. > I am encoding this using PHP function as I am building a web application > for mail users. > > I used functions like this base64_encode($mymessage) and > chunk_split(base64_encode($mymessage)) but both base64 strings failed. > I remeber that doing the right conversion with php is not that easy. > If anyone have any Ideas what I am doing wrong? Did anyone managed to > use multiline autoreply message using base64 encoding? > > An example of an LDAP entry (as in LDIF file) would be a greate help. > Here is an example entry: dn: uid=test,ou=regress,o=qmail-ldap objectClass: top objectClass: qmailUser objectClass: person mail: [EMAIL PROTECTED] uid: test sn: test cn: test mailMessageStore: test userPassword:: e1NTSEF9UDlSYUhDNkJUN2g4dE4xZDZhdlZmbk9iSmcvTTl1SkY= mailQuotaSize: 512000 mailQuotaCount: 20 mailReplyText:: JUhFQURFUiUKRnJvbTogIkkgZG8gbm90IGNhcmUiIDxlZGl0ZWRfZm9yX3NwY W0+ClN1YmplY3Q6ICVTVUJKRUNUJQoKSG1tbW0uCk1vdyBtb3cuCkJvYi1vcC1vcC4KSG1tbW1tb S4KTW93IG1vdy4K While unencoded attributes use only one ":" after the attribute name base64 encoded ones use two ":". If your entry has only one ":" it is not recognized as base64 encoded entry. Also the userPassword is base64 encoded since it is defined as binary data in the schema file. In the end base64 encoding only matters for LDIF files. -- :wq Claudio
