nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
108 stars 64 forks source link

IMAP authentication fails without error in nextcloud log #80

Closed sandroshu closed 5 years ago

sandroshu commented 5 years ago

I have updated the plugin to 0.6.1 and it broke the IMAP authentication. (Previous version 0.5)

This is what I have in configuration:

'user_backends' => array(
    array(
        'class' => 'OC_User_IMAP',
        'arguments' => array(
            'mail.xxxx.xx', 993, 'ssl', 'xxxx.xx'
        ),
    ),
),

According to the mail servers log it does not try to authenticate: May 25 19:22:24 imap-login: Info: Disconnected (no auth attempts in 0 secs): user=<>, rip=x, lip=xx, TLS, session=<21ICj7mJeutWZVlq>

I have tried to set SSL mode to TLS or NULL with port 143, but same result. As you can see currently it is set to use SSL.

I can not find any useful information in the Nextcloud log about this. The old plugin works with the following configuration:

'user_backends' =>
array (
   0 =>
  array (
    'class' => 'OC_User_IMAP',
    'arguments' =>
    array (
      0 => '{mail.xxxx.xx:143/imap/notls/norsh/novalidate-cert}',
    ),
  ),
),
kevo-gt commented 5 years ago

I get the same error. My IMAP server is Dovecot and the previous version 0.5 was working fine.

violoncelloCH commented 5 years ago

@sandroshu are you using dovecot as mail server as well? Then my guess it's related to or even a duplicate of #59

otherwise could you please report further details about your setup? there is a reason why we have issue templates... without these information it's unlikely your issue can be reproduced and without us being able to reproduce it it's impossible to find the root of the issue and fix it...

ThorstenUm commented 4 years ago

Hello, i have the same Problem. In Nextcloud i have the problem, that the user_external tool can not connect to imap server. he can not validate the certificat. When i testing imap_open("{127.0.0.1:143/imap/tls/novalidate-cert}", "... then i have good connection. I have lets encript certifikate. Non self signed... Can anyone help me.

sandroshu commented 4 years ago

If you want to use SSL, then you should use the server's FQDN instead of 127.0.0.1, but you have novalidate-cert in there so it should not matter if the IMAP server is running on the same host/instance. I've solved it by removing digest-md5 as an option from the IMAP server as @violoncelloCH suggested #59 Hope it helps.