Hello<br><br>I was trying to understand why I was able to create a mailbox named <a href="mailto:foo%bar@domain.com">foo%bar@domain.com</a><br>but not able to use this identifier to setup acl like in<br><br>setacl <a href="mailto:another@domain.com">
another@domain.com</a> <a href="mailto:foo%bar@domain.com">foo%bar@domain.com</a> lrswipcda<br><br>This command return 'Invalid identifier' !<br><br>This is because imapd try to validate '<a href="mailto:foo%bar@domain.com">
foo%bar@domain.com</a>' like a valid "identifier"<br>and not solely as a valid "domain root" mailbox.<br><br>Looking further into the imap sources, I found some info!<br>Here they are.<br>You can see some other character invalid in "email address" that KOLAB should not be able to manage.
<br>But some of them are accepted in folder name :-)<br><br>Hope someone will find this info usefull<br><br>cyrus-imapd-2.3.1/ptclient/ldap.c<br><br>/* Map of which characters are allowed by auth_canonifyid.<br> * Key: 0 -> not allowed (special, ctrl, or would confuse Unix or imapd)
<br> * 1 -> allowed, but requires an alpha somewhere else in the string<br> * 2 -> allowed, and is an alpha<br> *<br> * At least one character must be an alpha.<br> *<br> * This may not be restrictive enough.
<br> * Here are the reasons for the restrictions:<br> *<br> * & forbidden because of MUTF-7. (This could be fixed.)<br> * : forbidden because it's special in /etc/passwd<br> * / forbidden because it can't be used in a mailbox name
<br> * * % forbidden because they're IMAP magic in the LIST/LSUB commands<br> * ? it just scares me<br> * ctrl chars, DEL<br> * can't send them as IMAP characters in plain folder names, I think<br> * 80-FF forbidden because you can't send them in IMAP anyway
<br> * (and they're forbidden as folder names). (This could be fixed.)<br> *<br> * + and - are *allowed* although '+' is probably used for userid+detail<br> * subaddressing and qmail users use '-' for subaddressing.
<br> *<br> * Identifiers don't require a digit, really, so that should probably be<br> * relaxed, too.<br> */<br>static char allowedchars[256] = {<br> /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00-0F */
<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10-1F */<br> 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* 20-2F */<br> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* 30-3F */<br><br> 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 40-4F */
<br> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 50-5F */<br> 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 60-6F */<br> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, /* 70-7F */<br><br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br><br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0<br>};<br><br clear="all"><br>-- <br>--<br>Alain Spineux<br>
aspineux gmail com<br>May the sources be with you<br>