Skip to content

OC_User_IMAP Dovecot (no auth attempts in 0 secs) #59

Closed

Description

@benbrummer

After upgrading to 0.6.0 and modifying the config.php external users are not able to login. In the maillog only one line gets logged, after entering the credentials.
Mar 25 02:31:22 mail dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=46.163.73.154, lip=46.163.73.154, TLS, session=<JmSBKeGE2Owuo0ma>

Nextcloud logs
{"reqId":"XJgwzy6jSZoAADDtgekAAAAF","level":2,"time":"2019-03-25T01:37:26+00:00","remoteAddr":"92.117.153.184","user":"--","app":"core","method":"POST","url":"/login?user=user%40domain.com","message":"Login failed: 'user@domain.com' (Remote IP: '92.117.153.184')","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0","version":"15.0.5.3","id":"5c9832441bd5d"}

Nextcloud 15.0.5 with php 7.2 on Ubuntu 16.04 with mailserver on one machine (vserver with plesk)

User_backend from config.php
'user_backends' =>
array (
0 =>
array (
'class' => 'OC_User_IMAP',
'arguments' =>
array (
'my-mail-server.com', 993, 'ssl', ''
),
),
),

Activity

  1. benbrummer commented on Mar 25, 2019

    @benbrummer
    Author

    When switching dovecot to courier
    Mar 25 03:59:30 mail courier-imaps: couriertls: accept: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
    php 7.3 same error

  2. benbrummer commented on Mar 25, 2019

    @benbrummer
    Author

    #52 (comment) another user with same problem

  3. violoncelloCH commented on Mar 25, 2019

    @violoncelloCH
    Member

    #52 (comment) another user with same problem

    yes, thank you for reporting!
    I would like to keep this issue open to discuss it here
    cc @PaulFreund

  4. tweibert commented on Mar 26, 2019

    @tweibert

    Same issue here (Login failed; "no auth attemps" in Dovecot log). After an hour of trying different options, and comparing to my Roundcube configuration, I was able to solve it by manually specifying CRAM-MD5 as authentication type by manually editing imap.php from

    $params = ["port"=>$this->port, "timeout"=>10];
    

    to:

    $params = ["port"=>$this->port, "timeout"=>10, "auth_type" => "CRAM-MD5"];
    

    This is probably because I'm using CRAM-MD5 passwords (the default?) in my Dovecot passdb. Likewise, I have to use

    $config['imap_auth_type'] = 'CRAM-MD5';
    

    in my Roundcube configuration.

    Bottom line: The Roundcube IMAP class supports a lot of more parameters than just "port" and "timeout", and we need a way to specify them in the user_backends configuration please.

  5. benbrummer commented on Mar 26, 2019

    @benbrummer
    Author

    @tweibert thanks this fixed it on my side, too

  6. violoncelloCH commented on Mar 26, 2019

    @violoncelloCH
    Member

    thank you @tweibert for investigating into this!
    I'll try to find the best way to allow to pass additional parameters.

  7. added this to the 0.6.2 milestone on Mar 26, 2019
  8. tweibert commented on Mar 27, 2019

    @tweibert

    I propose you add a fifth, optional, parameter which is an associative array that is merged into $params.

  9. violoncelloCH commented on Mar 27, 2019

    @violoncelloCH
    Member

    yes, that should be doable...
    would you like to do this @tweibert? I would be happy to merge a PR :) (this would greatly accelerate it, because my time as a student is limited and there are lots of other things to do for user_external)

  10. tweibert commented on Mar 27, 2019

    @tweibert

    I wish I could do a PR, but I don't do PHP development normally, and I have absolutely no knowledge about the structure of the project. I don't feel fit for the job. Will probably break things instead of fixing them ;)

    And when it comes to available time - I wish I had as much today as I had as a student (being a father of two, and a self-employed software dev - no PHP though).

  11. violoncelloCH commented on Mar 27, 2019

    @violoncelloCH
    Member

    I see...time is precious (however you could learn new things ;) )

    if anyone wants to try (just state so here):
    The relevant lines would be https://github.com/nextcloud/user_external/blob/master/lib/imap.php#L20-L40 (where we need to make sure, that additional parameter array from config.php will be passed into the class by the constructor) and then https://github.com/nextcloud/user_external/blob/master/lib/imap.php#L73 (where the parameters are passed to roundcube)...
    If you have questions - just ask.

  12. 29 remaining items

  13. modified the milestones: , 0.7 on Aug 22, 2019
  14. modified the milestones: 0.7, on Sep 1, 2019
  15. kevo-gt commented on Dec 16, 2019

    @kevo-gt

    Has anyone found a workaround for this in the meantime before the 0.7.1 release?

  16. matthias-scheler commented on Dec 16, 2019

    @matthias-scheler

    Yes, I've posted the work around above:

    #59 (comment)

  17. modified the milestones: , on Jan 12, 2020
  18. kevo-gt commented on Jan 22, 2020

    @kevo-gt

    Yes, I've posted the work around above:

    #59 (comment)

    Thanks but this did not work for me still. I get the same error on the Dovecot server and then the following error on Nextcloud:

    Failed to enable crypto at user_external/lib/imap/imap_rcube.php#999"

    and

    message":"ERROR: Could not connect via roundcube lib: Could not connect to ssl://X.X.X.X:993: Unknown reason"

    Any pointers on what could cause this and how I could fix?

  19. violoncelloCH commented on Feb 4, 2020

    @violoncelloCH
    Member

    hi everyone
    we have a nice new approach for IMAP authentication which hopefully also fixes this issue from @rollbrettler in #122 (Thanks a lot to them!)
    now we're looking for as much volunteers as possible to test this out, so please take a look at #122 - further info (also on how to proceed) will be following there...

  20. violoncelloCH commented on Feb 4, 2020

    @violoncelloCH
    Member

    please take a look at this comment with info on how to proceed: #122 (comment)

  21. modified the milestones: , 0.9 on Apr 2, 2020
  22. stefangweichinger commented on Apr 23, 2020

    @stefangweichinger

    I know this one is closed, but I am unsure where to mention my issue with your app.
    I also see these "no auth attempts" lines, but with version 0.9.1, inside a docker container.
    See nextcloud/docker#1086 for my initial ticket, pls advise, thanks a lot.
    (I already looked at the dovecot servers, they both only offer "AUTH=PLAIN", btw)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions