Announcement

Collapse
No announcement yet.

Newbie: IMAP mail Connection failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie: IMAP mail Connection failed

    Hello !

    I'm new to OX and new to this forum.

    Just installed OX quite successfully I think, but having trouble with connection to an external IMAP-server.
    I am sure I have 'Server Name', 'Server Port', 'Login' and 'Password' filled in correctly in the GUI (Configuration>E-Mail>Accounts).

    I am logged in as testuser.
    I'm making connection to the mailserver of my hosting company (where I host my website and domainname)

    From another mailclient all goes well...

    This is what the logfile tells me :

    Code:
    Dec 12, 2009 5:15:36 PM com.openexchange.ajax.request.QuotaRequest mail
    SEVERE: MSG-1001 Category=3 Message=Wrong or missing login data to access server XX.XX.XX.XX with login test@jocan.be (user=3, context=1). Error message from server: Login failed. exceptionID=867600015-129
    MSG-1001 Category=3 Message=Wrong or missing login data to access server XX.XX.XX.XX with login test@jocan.be (user=3, context=1). Error message from server: Login failed. exceptionID=867600015-129
    	at com.openexchange.mail.mime.MIMEMailException.handleMessagingException(MIMEMailException.java:403)
    	at com.openexchange.imap.IMAPAccess.connectInternal(IMAPAccess.java:477)
    	at com.openexchange.mail.api.MailAccess.connect0(MailAccess.java:430)
    	at com.openexchange.mail.api.MailAccess.connect(MailAccess.java:353)
    	at com.openexchange.mail.MailServletInterfaceImpl.initMailAccess(MailServletInterfaceImpl.java:1320)
    	at com.openexchange.mail.MailServletInterfaceImpl.initConnection(MailServletInterfaceImpl.java:1297)
    	at com.openexchange.mail.MailServletInterfaceImpl.getQuotas(MailServletInterfaceImpl.java:1079)
    	at com.openexchange.ajax.request.QuotaRequest.mail(QuotaRequest.java:150)
    	at com.openexchange.ajax.request.QuotaRequest.action(QuotaRequest.java:105)
    	at com.openexchange.ajax.Multiple.doAction(Multiple.java:244)
    	at com.openexchange.ajax.Multiple.parseActionElement(Multiple.java:177)
    	at com.openexchange.ajax.Multiple.doPut(Multiple.java:125)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:619)
    	at com.openexchange.ajax.AJAXServlet.service(AJAXServlet.java:373)
    	at com.openexchange.ajax.SessionServlet.service(SessionServlet.java:164)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    	at com.openexchange.ajp13.najp.AJPv13RequestHandlerImpl.doServletService(AJPv13RequestHandlerImpl.java:459)
    	at com.openexchange.ajp13.AJPv13Request.response(AJPv13Request.java:128)
    	at com.openexchange.ajp13.najp.AJPv13RequestHandlerImpl.createResponse(AJPv13RequestHandlerImpl.java:302)
    	at com.openexchange.ajp13.najp.AJPv13ConnectionImpl.createResponse(AJPv13ConnectionImpl.java:189)
    	at com.openexchange.ajp13.najp.AJPv13Task.call(AJPv13Task.java:346)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
    	at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.runTask(CustomThreadPoolExecutor.java:735)
    	at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:761)
    	at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.mail.AuthenticationFailedException: Login failed.
    	at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:606)
    	at javax.mail.Service.connect(Service.java:291)
    	at com.openexchange.imap.IMAPAccess.connectInternal(IMAPAccess.java:440)
    	... 24 more
    Can someone advise ??

  • #2
    Hi,

    does your hosting company offer IMAP access to your mailbox? Some only allow POP3 and block incoming IMAP logins. Have you double/tripplechecked the imap username and the password (lower/uppercase)? Do you have configured equal server settings in your other mail client?

    Greetings

    Comment


    • #3
      Originally posted by Martin Braun View Post
      Hi,

      does your hosting company offer IMAP access to your mailbox? Some only allow POP3 and block incoming IMAP logins. Have you double/tripplechecked the imap username and the password (lower/uppercase)? Do you have configured equal server settings in your other mail client?
      Martin,
      thank you for your reaction.
      I am sure my hosting provider supports IMAP, I have several domains and several IMAP-mailboxes.
      I am sure I have the correct settings.

      Although I think there might be a mix up.

      This is how I created the testuser :

      Code:
      [root@ox ~]# /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P passwd -u testuser -d "Test User" -g Test -s User -p testuser -e test@jocan.be --imaplogin test@jocan.be --imapserver XX.XX.XX.XX --smtpserver XX.XX.XX.XX
      And in the webGUI I use the hostname of my mailserver namely "mail.jocan.be".

      It seems that changes in the webGUI do not change the settings I have made on the CLI.

      Maybe giving the IP-address of the imapserver was wrong and it should have been the mailserver hostname.

      Even when changing these values in the webGUI, OX keeps contacting the IP-address I've mentioned on the CLI.
      (so what if mail.jocan.be does not always resolve to the IP-address I gave ??)

      When entering the E-Mail setting I get this error :
      12-12-2009 19:49-->Error: Error in low level connection to sieve server (MAIL_FILTER-0014, 867600015-167)
      And when wanting to change a setting I get :
      12-12-2009 19:50-->Error: Denied update of default mail account of user 3 in context 1. (ACC-0007, 867600015-169)
      So the default mailaccount that was maid from CLI, I can not change and all the fields are blanked out. I see there that there is no password filled in.

      So my question needs to be : How can I change these mail-settings as admin-user ?? I can not log in as admin, only as my testuser...

      I don't find a command in /opt/open-xchange/sbin/ to modify a user. Only to create and delete a user.

      EDIT :

      I found how to change certain imap-settings, however not the password for the imap-user.

      The manual states :
      The “imapCredSrc” parameter specifies the credentials to be used for authentication against
      the SMTP and IMAP server:
      "session" password and open-xchange username given on login
      "user.imapLogin" password from login and username from "--imaplogin"
      I don't know where to look...
      Last edited by Guest; 12-12-2009, 09:11 PM.

      Comment


      • #4
        Hi,

        the imap/smtp settings for the user are for its primary mail account. Using the "Accounts" plugin allows to add additional E-Mail accounts. Still the primary one is configured through the CLT, not through the web interface.

        The password for the primary mail account (the one configured at the CLT) must be equal to the OX user account.

        Error in low level connection to sieve server -> If this still occurs after the primary account is fixed, you might uninstall the open-xchange-mailfilter plugin since the hosting providers mail backend does not support mail filtering through sieve.

        There shoud be something like "changeuser" at sbin/

        Greetings

        Comment


        • #5
          Thank you for your reaction and help !

          Originally posted by Martin Braun View Post
          the imap/smtp settings for the user are for its primary mail account. Using the "Accounts" plugin allows to add additional E-Mail accounts.
          I have created a secondary mail-account, but here also the connection fails.

          Code:
          mysql> select * from user;
          | cid | id | imapServer               | imapLogin     | mail          | mailDomain | mailEnabled | preferredLanguage | shadowLastChange | smtpServer               | timeZone        | userPassword                 | contactId | passwordMech | uidNumber | gidNumber | homeDirectory  | loginShell |
          |   1 |  3 | imap://mail.jocan.be:143 | test@jocan.be | test@jocan.be | NULL       |           1 | en_US             |               -1 | smtp://uit.telenet.be:25 | Europe/Brussels | RcVxoVbdzvQTUacTvN3uW6fpVGA= |         2 | {SHA}        |     65534 |     65534 | /home/testuser | /bin/bash  | 
          
          mysql> select * from user_mail_account;
          | id | cid | user | name          | url                          | login          | password                 | primary_addr              | personal | default_flag | spam_handler  | trash | sent       | drafts | spam | confirmed_spam | confirmed_ham | unified_inbox | trash_fullname | sent_fullname | drafts_fullname | spam_fullname | confirmed_spam_fullname | confirmed_ham_fullname |
          |  0 |   1 |    3 | E-Mail        | imap://mail.jocan.be:143     | test@jocan.be  | NULL                     | test@jocan.be             | NULL     |            1 | NoSpamHandler | Trash | Sent Items | Drafts | Spam | confirmed-spam | confirmed-ham |             0 |                |               |                 |               |                         |                        | 
          |  3 |   1 |    3 | jonas         | imap://mail.jocan.be:143     | jonas@jocan.be | nowCOtONy5qGbk3w2qETNA== | jonas@jocan.be            | Jonas    |            0 | NoSpamHandler |       |            |        |      |                |               |             1 |                |               |                 |               |                         |                        |
          Originally posted by Martin Braun View Post
          The password for the primary mail account (the one configured at the CLT) must be equal to the OX user account.
          Code:
          [root@ox ~]# /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P passwd -u testuser -P myimappassword --imapserver mail.jocan.be
          user testuser in context 1 changed
          I have changed the password of the user 'testuser'.
          Now I am unable to log in to the webGUI...

          EDIT : I can still log in with the old password...

          Originally posted by Martin Braun View Post
          Error in low level connection to sieve server -> If this still occurs after the primary account is fixed, you might uninstall the open-xchange-mailfilter plugin since the hosting providers mail backend does not support mail filtering through sieve.
          This I will be able to test if the above works...
          Last edited by Guest; 12-12-2009, 10:17 PM.

          Comment


          • #6
            Since the user configuration gets cached, it might be the case that an old login still works for some time if the backend cache is not working properly.
            Could you try to restart the groupware?

            //edit

            Code:
            [root@ox ~]# /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P passwd -u testuser -P myimappassword --imapserver mail.jocan.be
            user testuser in context 1 changed
            Note that the lowercase p is the users password while the uppercase P is the context admin password to authenticate. To change the password taken to authenticate against at IMAP you'll have to change the -p
            Last edited by Martin Heiland; 12-13-2009, 12:04 AM.

            Comment


            • #7
              Originally posted by Martin Braun View Post
              Code:
              [root@ox ~]# /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P passwd -u testuser -P myimappassword --imapserver mail.jocan.be
              user testuser in context 1 changed
              Note that the lowercase p is the users password while the uppercase P is the context admin password to authenticate. To change the password taken to authenticate against at IMAP you'll have to change the -p
              I have restarted the groupware and the mysqld, but as you say above, actually I have never changed the passwd.

              So I went on to your next tip, about the 'sieve'-thing and removed the plugin through yum.

              I no longer have an error of "low level connection".

              Yesterday-evening I could go to the mail-tab and check my emails for the 2 accounts I had created. I tried sending mail, which worked, I did not try receiving.

              This morning I can not check my email :
              Unable to establish a connection to the E-Mail server. Possible reasons: the mail server is (temporarily) down or there are network connection problems. To prevent further errors the module has been disabled. Please contact your administrator
              Checking the connection in Configuration > Email > Accounts :
              The connection was successful.
              Going to my 'home' > Test User > Unified Inbox :
              I can see my newly received mail.

              When trying to send a receive-confirmation these errors occur :
              12-13-2009 10:22-->Error: The specified email address <null> is not covered by allowed email address aliases (MSG-0056, -126374581-87)
              12-13-2009 10:23-->Error: Messaging error: Connection dropped by server? (MSG-1023, -126374581-88)
              EDIT: the receive-confirmation has been send after a delay of about 2 minutes...

              The above all sounds a bit confusing.

              Still not able to go directly to the E-Mail tab.
              Last edited by Guest; 12-13-2009, 11:20 AM.

              Comment


              • #8
                Hi,

                going directly to the E-Mail tab is only possible if the primary IMAP account is configured correctly through the command line. The accounts listed at "Configuration -> E-Mail -> Accounts" are additional accounts and not related to the primary account. The primary account is typically provided by the owner of the OX server, so it is mandatory for many operations.

                Please check the logfile again when logging in to the groupware. It shoudl print out some stuff about the primary mail account and why it is disabled.

                Greetings

                Comment


                • #9
                  Martin,

                  let's see if I get this right.

                  There should be a parameter "imapCredSrc" in imap.properties to define where the imap-password for the user is defined.

                  I, however, see no parameter in this file.

                  The OX administration manual also talks about a configuration globally for all users or separately by each user.
                  1. globally means for users in the same context ??
                  2. this separately config by user file is situated where ??

                  Is the only way to access the IMAP-server making the user of OX have the same password as his mailaccount-password ??

                  Comment

                  Working...
                  X