You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know, this is not the most sophisticated bug report but I am not an expert at all so please bear with me. What I'm asking for, basically, are the simple most instructions that I must follow in order to get user_external working again after updating to 0.6.4. I have been reading here on github and tempering with my server for 3 days straight, completely crashing our NC and now I simply don't have the nerve anymore - no offence intended.
My issue in short:
I want to allow login from the localhost IMAP server. It runs at mail.mydomain.de (same server, like i said).
I want to preserve the former (IMAP) user accounts. There are lots of files on them.
We have a Let's encrypt certificate, so SSL should work
There is nothing in the nextcloud.log. I set NC to DEBUG level logging, but there has not been a singly entry by user_external after the day i updated.
I have tried a stupid amount of configurations, but none worked. I'll post the current one below.
I tried updating my own (IMAP) account in the database to mail.mydomain.de to no effect.
I removed my own (IMAP) account from the users_external db
Hi @michelmay
My guess is it fails, because it can't verify the mail servers certificate if you contact it over localhost/127.0.0.1 (doesn't match the name on the certificate)... I would recommend you to use the domain name for your mail server even tough it's on the same server as then the certificate should be accepted as valid... If you want to make sure the traffic is routed locally, add a respective entry for your domain name in the /etc/hosts file on your server. Could you try if this works for you?
Regarding the logging, the issue here is that we use an external component (roundcube) for the mail here, which doesn't log to the Nextcloud log by default. For this, PR #102 should help, which will be part of the next release.
Was that what you meant? In any case, it didn't work =/
If you want to make sure the traffic is routed locally, add a respective entry for your domain name in the /etc/hosts file on your server. Could you try if this works for you?
I would love to do that, but I'm afraid I have no idea how to properly tweak these files and I've been breaking enough working systems in the last few weeks. Could you give an exact line that I could copy / paste, please? I'd appreciate that. Like I said, I'm really not good with web hosting, sorry :(
I'll post the current contents of the etc/hosts below: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # Auto-generated hostname. Please do not remove this comment. XX.XXX.XX.XX myserver.myhost.net myserver
I tried version 0.7 today without any luck. I updated from 0.6.4 on my 'production' server (A) - no success. I installed user_external on a clean(ish) NC on a testing server (B), attempting to log in via server A's IMAP -> nope.
I don't know if this is related, but there seems to be an issue with the DB on server B. Like I said, it was a fresh install of user_external there. Whenever I check the oc_users_external table via phpMyAdmin, however, I am getting SQL errors. I tried dropping the table multiple times along with re-installing user_external, but it's always the same thing:
Warning in ./libraries/sql.lib.php#613
count(): Parameter must be an array or an object that implements Countable
Backtrace
./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'nextcloud',
string 'oc_users_external',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `oc_users_external`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'nextcloud',
string 'oc_users_external',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `oc_users_external`',
NULL,
NULL,
)
thanks for the feedback @michelmay and sorry for the late response
Was that what you meant? In any case, it didn't work =/
hmm
I would love to do that, but I'm afraid I have no idea how to properly tweak these files and I've been breaking enough working systems in the last few weeks. Could you give an exact line that I could copy / paste, please? I'd appreciate that. Like I said, I'm really not good with web hosting, sorry :(
that would be a new line with 127.0.0.1 mail.mydomain.de
hmm, have you set your loglevel to 0 and try to log in over user_external and there is still no log entry?
that DB error is strange, though I can't say if this is an error with phpmyadmin or something caused by Nextcloud/user_external
Thank you for still tending to this matter (and sorry for this late reply).
hmm, have you set your loglevel to 0 and try to log in over user_external and there is still no log entry?
As I stated in my first post, I didn't see any user_external-related output in my log files, but today, for some (lucky) reason, I was finally able to get some feedback. Now, my log file is actually getting spammed with the following message:
[core] Error: User backend OC_User_IMAP not found.
This error wasn't there before, but I sincerely hope it helps us getting closer to the issue. For now, I have disabled user_external and removed the respective line from the NC config file.
I'm sorry for being such a bother as this seems to be a very basic problem.
As I stated in my first post, I didn't see any user_external-related output in my log files, but today, for some (lucky) reason, I was finally able to get some feedback. Now, my log file is actually getting spammed with the following message:
[core] Error: User backend OC_User_IMAP not found.
Hmm, this happens if either the app is deactivated but the config still referencing the backend or if parts of the code is either missing or not loaded correctly...
Maybe it would be worth it to completely uninstall the app (remove the user_external directory from apps/ and install it over again
Progress! I uninstalled user_external, deleted the lines from the config file and dropped the database table, then reinstalled the whole thing. Now I am getting the following error:
[user_external] Error: ERROR: Could not connect via roundcube lib: The Auth_SASL package is required for DIGEST-MD5 authentication
POST /cloud/index.php/login
from XXX.XXX.XXX.XXX at 2019-10-18T22:36:48+00:00
hmm looks like your imap server configuration requires auth_sasl, so you would need to install that php package to make it work... can you try this?
looks the same as #97 (comment) so this might be interesting for you to take a look there...
I spent one hour fiddling around with the server yesterday, but we're running PLESK (12.0) on it so adding PHP packages wasn't half as easy as I'd have hoped.
it looks like auth_sasl is used, not auth_sasl2; auth_sasl is unmaintained but auth_sasl2 is still in beta, so maybe that's the reason it's not yet used by roundcube...
I was able to install Auth_SASL 1.1.0, but logging in hasn't been possible yet. I have tried a stupid amount of configurations, which I am going to post below. I have added the respective error messages.
[user_external] Error: ERROR: Could not connect via roundcube lib: Could not connect to 127.0.0.1 mail.mydomain.de:143: php_network_getaddresses: getaddrinfo failed: Name or service not known
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:55:51+00:00
[no app in context] Warning: Login failed: tester@mydomain.de (Remote IP: XX.XX.XX.XX)
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:55:51+00:00
[support] Warning: Can not determine user count for OC_User_IMAP
GET /cloud/index.php/settings/apps/installed/user_external
from XX.XX.XX.XX by admin at 2019-11-17T19:55:57+00:00
[support] Warning: Can not determine user count for OC_User_IMAP
GET /cloud/index.php/settings/apps/list
from XX.XX.XX.XX by admin at 2019-11-17T19:55:59+00:00
[user_external] Error: ERROR: Could not connect via roundcube lib: Could not connect to 11.22.33.44 mail.mydomain.de:143: php_network_getaddresses: getaddrinfo failed: Name or service not known
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:59:40+00:00
[no app in context] Warning: Login failed: tester@mydomain.de (Remote IP: XX.XX.XX.XX)
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:59:40+00:00
[support] Warning: Can not determine user count for OC_User_IMAP
at 2019-11-17T20:00:03+00:00
[user_external] Error: ERROR: Could not connect via roundcube lib: Could not connect to ssl://127.0.0.1 mail.mydomain.de:993: php_network_getaddresses: getaddrinfo failed: Name or service not known
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:02:29+00:00
[no app in context] Warning: Login failed: tester@mydomain.de (Remote IP: XX.XX.XX.XX)
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:02:29+00:00
[user_external] Error: ERROR: Could not connect via roundcube lib: Could not connect to ssl://11.22.33.44:993: Unknown reason
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:05:19+00:00
[no app in context] Warning: Login failed: tester@mydomain.de (Remote IP: XX.XX.XX.XX)
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:05:19+00:00
[user_external] Error: ERROR: Could not connect via roundcube lib: Could not connect to ssl://127.0.0.1:993: Unknown reason
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:49:28+00:00
[no app in context] Warning: Login failed: tester@mydomain.de (Remote IP: XX.XX.XX.XX)
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:49:28+00:00
[user_external] Error: ERROR: Could not connect via roundcube lib: Could not connect to ssl://11.22.33.44 mail.mydomain.de:993: php_network_getaddresses: getaddrinfo failed: Name or service not known
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:18:38+00:00
[no app in context] Warning: Login failed: tester@mydomain.de (Remote IP: XX.XX.XX.XX)
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:18:38+00:00
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...
please take a look at this comment with info on how to proceed: #122 (comment)
Activity
violoncelloCH commentedon Aug 31, 2019
Hi @michelmay
My guess is it fails, because it can't verify the mail servers certificate if you contact it over localhost/127.0.0.1 (doesn't match the name on the certificate)... I would recommend you to use the domain name for your mail server even tough it's on the same server as then the certificate should be accepted as valid... If you want to make sure the traffic is routed locally, add a respective entry for your domain name in the
/etc/hostsfile on your server. Could you try if this works for you?Regarding the logging, the issue here is that we use an external component (roundcube) for the mail here, which doesn't log to the Nextcloud log by default. For this, PR #102 should help, which will be part of the next release.
michelmay commentedon Aug 31, 2019
By now, I have (again) tried the following lines:
'mail.mydomain.de', 993, 'ssl', 'mydomain.de', false, false'mail.mydomain.de', 143, null, 'mydomain.de', false, falseWas that what you meant? In any case, it didn't work =/
I would love to do that, but I'm afraid I have no idea how to properly tweak these files and I've been breaking enough working systems in the last few weeks. Could you give an exact line that I could copy / paste, please? I'd appreciate that. Like I said, I'm really not good with web hosting, sorry :(
I'll post the current contents of the
etc/hostsbelow:127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6# Auto-generated hostname. Please do not remove this comment.XX.XXX.XX.XX myserver.myhost.net myservermichelmay commentedon Sep 7, 2019
UPDATE:
I tried version 0.7 today without any luck. I updated from 0.6.4 on my 'production' server (A) - no success. I installed user_external on a clean(ish) NC on a testing server (B), attempting to log in via server A's IMAP -> nope.
I don't know if this is related, but there seems to be an issue with the DB on server B. Like I said, it was a fresh install of user_external there. Whenever I check the
oc_users_externaltable via phpMyAdmin, however, I am getting SQL errors. I tried dropping the table multiple times along with re-installing user_external, but it's always the same thing:violoncelloCH commentedon Oct 5, 2019
thanks for the feedback @michelmay and sorry for the late response
hmm
that would be a new line with
127.0.0.1 mail.mydomain.dehmm, have you set your loglevel to 0 and try to log in over user_external and there is still no log entry?
that DB error is strange, though I can't say if this is an error with phpmyadmin or something caused by Nextcloud/user_external
michelmay commentedon Oct 18, 2019
Thank you for still tending to this matter (and sorry for this late reply).
As I stated in my first post, I didn't see any user_external-related output in my log files, but today, for some (lucky) reason, I was finally able to get some feedback. Now, my log file is actually getting spammed with the following message:
[core] Error: User backend OC_User_IMAP not found.This error wasn't there before, but I sincerely hope it helps us getting closer to the issue. For now, I have disabled user_external and removed the respective line from the NC config file.
I'm sorry for being such a bother as this seems to be a very basic problem.
violoncelloCH commentedon Oct 18, 2019
Hmm, this happens if either the app is deactivated but the config still referencing the backend or if parts of the code is either missing or not loaded correctly...
Maybe it would be worth it to completely uninstall the app (remove the user_external directory from apps/ and install it over again
michelmay commentedon Oct 18, 2019
Progress! I uninstalled user_external, deleted the lines from the config file and dropped the database table, then reinstalled the whole thing. Now I am getting the following error:
violoncelloCH commentedon Oct 22, 2019
hmm looks like your imap server configuration requires auth_sasl, so you would need to install that php package to make it work... can you try this?
looks the same as #97 (comment) so this might be interesting for you to take a look there...
michelmay commentedon Oct 23, 2019
Before I continue messing around with things again, you mean this plugin, right?
https://pear.php.net/package/Auth_SASL2
and not its outdated version here
https://pear.php.net/package/Auth_SASL/
I spent one hour fiddling around with the server yesterday, but we're running PLESK (12.0) on it so adding PHP packages wasn't half as easy as I'd have hoped.
Mannshoch commentedon Nov 11, 2019
@violoncelloCH I already spoke with my webhoster and they installed Auth_SASL
I do not know what they installed Auth_SASL or Auth_SASL2
violoncelloCH commentedon Nov 13, 2019
sorry for the late reply
From Roundcubes documentation:
https://github.com/roundcube/roundcubemail/wiki/Install-Requirements
it looks like auth_sasl is used, not auth_sasl2; auth_sasl is unmaintained but auth_sasl2 is still in beta, so maybe that's the reason it's not yet used by roundcube...
michelmay commentedon Nov 17, 2019
I was able to install Auth_SASL 1.1.0, but logging in hasn't been possible yet. I have tried a stupid amount of configurations, which I am going to post below. I have added the respective error messages.
Note: 11.22.33.44 -> the IP of the server
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:55:51+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:55:51+00:00
GET /cloud/index.php/settings/apps/installed/user_external
from XX.XX.XX.XX by admin at 2019-11-17T19:55:57+00:00
GET /cloud/index.php/settings/apps/list
from XX.XX.XX.XX by admin at 2019-11-17T19:55:59+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:59:40+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T19:59:40+00:00
at 2019-11-17T20:00:03+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:02:29+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:02:29+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:05:19+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:05:19+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:49:28+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:49:28+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:18:38+00:00
POST /cloud/index.php/login
from XX.XX.XX.XX at 2019-11-17T20:18:38+00:00
violoncelloCH commentedon Feb 4, 2020
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...
please take a look at this comment with info on how to proceed: #122 (comment)