Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    johnye Guest

    Question OX6 Can't work with Courier-IMAP server

    Dear Community,

    I installed OX6 rpm package on openSUSE11.1. Everything seems Ok except mail: It can't get mail folders on Courier-IMAP server. After logging in the gui, I got an error:
    Error code: "No connection available to access mailbox(IMAP 2001, 77504639-53)

    The same installation is working well on Cyrus-IMAP server(I can swap Cyrus-imap and Courier-imap).

    I turned on maildebug=true, found that the OX logout the IMAP session right after issued a NAMESPACE command with Courier-IMAP, while it continues to LIST the folders after NAMESPACE with Cyrus-IMAP.

    ----------THIS IS GOOD IMAP SESSION ON CYRUS---------------
    .........................
    A2 NOOP
    A2 OK Completed
    A3 LIST "" INBOX
    * LIST (\HasChildren) "." "INBOX"
    A3 OK Completed (0.000 secs 6 calls)
    A4 LSUB "" INBOX
    * LSUB (\HasChildren) "." "INBOX"
    A4 OK Completed (0.000 secs 6 calls)
    A5 NAMESPACE
    * NAMESPACE (("INBOX." ".")) (("user." ".")) (("" "."))
    A5 OK Completed
    A6 LIST "" INBOX.Drafts
    * LIST (\HasNoChildren) "." "INBOX.Drafts"
    A6 OK Completed (0.000 secs 2 calls)
    A7 LSUB "" INBOX.Drafts
    * LSUB () "." "INBOX.Drafts"
    A7 OK Completed (0.000 secs 2 calls)
    A8 LIST "" "INBOX.Sent Items"
    * LIST (\HasNoChildren) "." "INBOX.Sent Items"
    A8 OK Completed (0.000 secs 2 calls)
    A9 LSUB "" "INBOX.Sent Items"
    * LSUB () "." "INBOX.Sent Items"
    A9 OK Completed (0.000 secs 2 calls)
    A10 LIST "" INBOX.Spam
    * LIST (\HasNoChildren) "." "INBOX.Spam"
    A10 OK Completed (0.000 secs 2 calls)
    A11 LSUB "" INBOX.Spam
    * LSUB () "." "INBOX.Spam"
    A11 OK Completed (0.000 secs 2 calls)
    A12 LIST "" INBOX.Trash
    * LIST (\HasNoChildren) "." "INBOX.Trash"
    A12 OK Completed (0.000 secs 2 calls)
    A13 LSUB "" INBOX.Trash
    * LSUB () "." "INBOX.Trash"
    A13 OK Completed (0.000 secs 2 calls)
    IMAP DEBUG: IMAPProtocol noop
    A14 NOOP
    A14 OK Completed
    IMAP DEBUG: IMAPProtocol noop
    A15 NOOP
    A15 OK Completed

    ------ BAD IMAP SESSION ON COURIER ----------------------
    .................
    A3 NOOP
    A3 OK NOOP completed
    A4 LIST "" INBOX
    * LIST (\Unmarked \HasChildren) "." "INBOX"
    A4 OK LIST completed
    A5 LSUB "" INBOX
    * LSUB (\Unmarked \HasChildren) "." "INBOX"
    A5 OK LSUB completed
    A6 NAMESPACE
    * NAMESPACE (("INBOX." ".")) NIL (("#shared." "")("shared." "."))
    A6 OK NAMESPACE completed.
    A7 LOGOUT
    * BYE Courier-IMAP server shutting down
    A7 OK LOGOUT completed

    Pls give me help if anyone knows the solution for this. Thanks in advance.

    John Ye

  2. #2
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    3,695

    Default

    Hi,

    we have already discovered this issue with courier on another installation, the problem is (i think) a RFC breach at the courier imap server on shared imap folders. This shared folder information is not correct to RFC2342 -> (("#shared." "") it needs to be ("#shared." ".") (note the . as delimiter).

    http://www.isi.edu/in-notes/rfc2342.txt

    Code:
    5. NAMESPACE Command
    
       Arguments: none
    
       Response:  an untagged NAMESPACE response that contains the prefix
                     and hierarchy delimiter to the server's Personal
                     Namespace(s), Other Users' Namespace(s), and Shared
                     Namespace(s) that the server wishes to expose. The
                     response will contain a NIL for any namespace class
                     that is not available.
    This causes a non-accessible mailbox with OX because the sun javamail parser breaks on this what i think is a rfc breach. I think this does not occur with all versions of courier, what version are you using?
    Last edited by Martin Heiland; 01-02-2009 at 02:59 AM.

  3. #3
    johnye Guest

    Default

    Hi Braun,

    Yes! thanks a lot for your timely help and the accurate info. I correct the incorrect C code in file COURIERIMAP_ROOT/imap/imapd.c in line 4987. see the code below.

    I am using courier-imap-2.2.2. with qmail vpopmail.

    Thanks again!

    John Ye


    Code:
    if (strcmp(curtoken->tokenbuf, "NAMESPACE") == 0)
            {
                    if (nexttoken()->tokentype != IT_EOL)
                            return (-1);
    
                    writes("* NAMESPACE ((\"INBOX.\" \".\")) NIL "
                           "((\"#shared.\" \".\")(\""               //JOHNYE CHANGE
                            SHARED ".\" \".\"))\r\n");
                    /* //BAD CODE
                    writes("* NAMESPACE ((\"INBOX.\" \".\")) NIL "
                           "((\"#shared.\" \"\")(\""
                            SHARED ".\" \".\"))\r\n");
                    */
                    writes(tag);
                    writes(" OK NAMESPACE completed.\r\n");
                    return (0);
            }

  4. #4
    johnye Guest

    Default

    Hi Braun,

    2 more questions

    1) After sending a message to myself, I need some time (1-2 minutes) to see it in my INBOX. Does OX have a time interval to refresh the INBOX? Can I make the message instantly visible when it comes?

    2) Does OX support Chinese(zh_CN) right now?

    Thanks.

    John Ye

  5. #5
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    3,695

    Default

    Hi,

    the GUI has a configurable automatic refresh that can be set at Configuration > Options > "Reload current view every". If you wish to poll manually you can do this at any time by using the refresh icon at the upper right corner (next to the help icon).
    As far as i know there is no chinese language pack available yet, but in general we support full utf8 which also includes most of the chinese characters on all levels (data, translation, user interface).

    Greetings

  6. #6
    johnye Guest

    Default

    Hi Braun,

    Thanks.

    Now, I am still having IMAP connection problem.
    It seems that the SUSE11 rpm package is using Sun java 1.6(/usr/lib/jvm/jre-1.6.0-openjdk/bin/java). When I install the rpms from yast, it automatically download Sun java 1.6 and install it.

    After the installation(OX rpm and java) complete, I switched the java verstion to Sun 1.,6. update-alternatives --config java shows:

    Selection Alternative
    -----------------------------------------------
    1 /usr/lib/jvm/jre-1.5.0-sun/bin/java
    *+ 2 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java


    Then, I re-inistialize all the things from beginging, installed a user with the previous setting. All settings (conntext and user) shoud be OK.

    After logging on the GUI, I can't get the IMAP folder connection, and got the following mail.debug info in the console log:

    .......................more.....................
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Pro vider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport ,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provide r[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport ,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: successfully loaded file: /usr/lib/jvm/java-1.6.0-openjdk-1.2_b11/jre/lib/javamail.address.map
    DEBUG: setDebug: JavaMail version 1.4.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384

    From the mail.debug log, we can see:
    the OX has not even tried to connect to IMAP(I see the IMAP log and found no connection coming in), and stops at the last line
    "DEBUG: mail.imap.fetchsize: 16384".

    I don't know why.
    BTW, I know little about JAVA.

    Thanks.

    John Ye

  7. #7
    johnye Guest

    Default

    Hi Braun,

    Please disregard my last post at thread 6. I have resolved the problem by cleaning up the JAVA platforms--delete the sun-java-1.5, reinstall all the packages of java-1.6.
    Now it's working with IMAP. I don't know the exact cause, though.

    Some preliminary thought after test:
    1) OX has a very very beautiful web GUI, better than any I have ever seen. It must be a result of the state-of-the-art work that OX team has done with the code.

    2) It seems that OX is much slower than other webmail based on IMAP. For example, I have been using Squirrelwebmail (a php webmail based on IMAP server) for years, it's much faster then OX. May this be caused by java?

    3) I have messages in Chinese language. mostly in UTF-8 or GB2312. OX can display the mail body, but not the mail subject. A lot Chinese subject can't be shown correctly. This is a fault of javamail? The subject has its own encoding (b64 plus encoding tag).

    I am going to do more test.

    Thanks.

    John Ye

  8. #8
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    3,695

    Default

    Hi,

    first of all, please do not use Java 1.6 - we have identified some severe issues with that Version and currently support Java 1.5 only. There is no real advantage in using 1.6 if 1.5 works flawless. We already have a solution for the issue but i guess until 1.5 is fully supported by Sun we'll stick to it. Using Java 1.6 will result in severe issues like E-Mails with attachment cannot be sent and others. I wrote about the technical background in some other posts, it's just some kind of version incompatibility.

    The question of performance is not easy to answer. The server itself is not the cause for E-Mail performance issues, working with E-Mail typically takes few milliseconds for every mail to process, even mailboxes with 20.000 mails can be handled very quick. The myth that Java programs are slow may been valid in the 1990's but since that the language and toolset made huge steps forward and performance is definitely no longer an key issue, especially compared to PHP i think Java as a server process backend is much faster. Note that the OX GUI is not Java-Applet or something like that, it's HTML+CSS+Javascript (which has nothing to do with Java).

    It would be interesting to know what operation is too slow in your eyes to break it down to a possible webserver or ox configuration or imap problem. Clients like Squirrelwebmail can't really be compared because they have a plain HTML interface and OX comes with a complex ajax style interface so it would be unfair to compare those interfaces - but i agree that a user does not care about the technology if the response times are not okay. Typically there are some checkpoints for bad performance:
    1. Use a state-of-the-art browser (FF3, IE7)
    2. Check if mod_expires and mod_deflate are enabled at apache
    3. Use a local IMAP Server, remote servers sum up the latency
    4. Get firebug for Firefox and check the "Network" tab to identify how long downloads of the single elements (pictures, js, html) takes. Also look at the "Console" tab to see how long servlet requests take.
    5. Use a broadband and low latency internet connection
    6. Make sure using mod_proxy_ajp instead of mod_jk especially when using SSL

    It would be very greatful if you could provide the sourcecode of this E-Mail (remove private parts) to check at the lab what exactly the problem is.

    Greetings
    Last edited by Martin Heiland; 01-03-2009 at 04:51 PM.

  9. #9
    johnye Guest

    Default

    Hi Braun,

    Got your comments & suggestions. I will go back to Sun Java-1.5.

    I am going to do more test, and will write new thread here if I found any difficulties in the testing process.

    Thanks for your great help.

    John Ye

  10. #10
    johnye Guest

    Default

    Hi Braun,

    When I use yast to install the OX6 RPM packages, jre-1.6.0-openjdk is automatically required and downloaded. This is why I switched the java to 1.6.0 before.

    It seems some of the RPM was complied by jre-1.6.0-openjdk as a dependency?

    After jre-1.6.0-openjdk is downloaded and installed, the Java platforms in my server are like this:
    ua --config java

    There are 2 alternatives which provide `java'.

    Selection Alternative
    -----------------------------------------------
    1 /usr/lib/jvm/jre-1.5.0-sun/bin/java
    *+ 2 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java

    When I switch java back to 1.5, the install process reports many version errors.
    The problem I reported in thread 6 will appear if I don't switch to Java 1.5.

    Please help.

    John Ye
    Last edited by johnye; 01-04-2009 at 09:30 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •