Russell Wilton writes:
How does one set IMAPDEBUGFILE? I tried adding it to {prefix}/etc/imapd but the server just seemed to hang after I restarted it. If that's the right place to put it, I must have the value set wrong. Is it looking for a full file name and path eg /var/log/imapd.log, like I tried, or does it just want a file name? If the latter, where will the file be
You need to put a filename there.
created?
In the maildir.
That's a mighty handy option. I think I have figured out what is going on with Mozilla and the folders/filters problem, and maybe how to fix it. The problem is a result of a bug in Mozilla/Netscape/Thunderbird that I can best describe with the help of some DEBUG output.
When the Advanced IMAP Server Settings are set to the default, ie the 'IMAP server directory' is null and the 'Allow server to override these namespaces' box is checked, the following happens on login:
WRITE: 2 OK LOGIN Ok.
READ: NUMBER: 3
READ: ATOM: NAMESPACE
READ: EOL
WRITE: * NAMESPACE (("INBOX." ".")) NIL (("shared." "."))
3 OK NAMESPACE completed.READ: NUMBER: 4
READ: ATOM: LIST
READ: QUOTED_STRING: READ: QUOTED_STRING: INBOX.%
READ: EOL
WRITE: * LIST (\HasNoChildren) "." "INBOX.Test"
* LIST (\HasNoChildren) "." "INBOX.Sent Items"
* LIST (\HasNoChildren) "." "INBOX.Archive"
* LIST (\HasNoChildren) "." "INBOX.Courier"
* LIST (\HasNoChildren) "." "INBOX.SunMgr"
This shows Mozilla doing a NAMESPACE command to get back the namespaces and the hierarchy separators. It then uses these in the LIST command to get the list of folders.
When the Advanced options are set to make Mozilla display the folders at the top level, ie the 'IMAP server directory' is set to INBOX, the 'Personal namespace' is set to "" and the 'Allow server to override these namespaces' box is NOT checked, the following happens on login:
WRITE: 2 OK LOGIN Ok.
READ: NUMBER: 3
READ: ATOM: LIST
READ: QUOTED_STRING: READ: QUOTED_STRING: INBOX/%
READ: EOL
WRITE: 5 OK LIST completed.
Since it can't change the namespaces, it doesn't bother to do the NAMESPACE command and thus it doesn't know what the hierarchy separators are either. So it appears to default to using slashes. It tries to LIST INBOX/% and INBOX/%/% and then tries just plain INBOX where it finally gets some output. Part of the LIST output appears to be the separator character, so from then on it works properly - if you close the list and re-open it , it requests a LIST of INBOX.%
The 'fix' that I have come up with is to add a few lines of code to imapd.c in the section where it handles LIST commands. Since slashes appear to be illegal characters in folder names anyway, I just search for them in the LIST command name parameter and change them to periods. Between lines 2066 and 2067 of imapd.c I inserted:
#if IMAP_CLIENT_BUGS
/* Mozilla puts slashes in name on the first LIST after LOGIN */
char *s;
s=strchr(name, '/');
while (s)
{
s[0]=HIERCH;
s=strchr(name, '/');
}#endif
I put it all inside the IMAP_CLIENT_BUGS conditional so it only gets included if you enable the workarounds. It seems to be working for me, allthough more thorough testing is no doubt in order. It doesn't seem to cause any problems for Outlook or Outlook Express either. Feel free to use this as you see fit.
One final note, when you set the 'IMAP server directory', be sure to just enter INBOX with no trailing period. If you add a period it tries to LIST INBOX..% which it isn't going to find.
Russ
-- Russell D. Wilton E Mail: [EMAIL PROTECTED] Network Services Manager Voice: (403) 329-2525 University of Lethbridge FAX: (403) 382-7108 4401 University Drive Lethbridge, Alberta, CANADA T1K 3M4
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
