Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP doesn't work #237

Closed
jonas-krug opened this issue Aug 21, 2023 · 4 comments
Closed

IMAP doesn't work #237

jonas-krug opened this issue Aug 21, 2023 · 4 comments
Labels
0. Needs triage bug Something isn't working

Comments

@jonas-krug
Copy link

jonas-krug commented Aug 21, 2023

I have the right creds inserted into config.php

'user_backends' => array(
    array(
        'class' => '\OCA\UserExternal\IMAP',
        'arguments' => array(
            'IMAP-DOMAIN', 993, 'tls', null, true, false
        ),
    ),
  ),

I got the following error, if I try to login with creds from Dovecot/Postfix:

ERROR: Could not connect to imap server via curl: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received

This works:

curl -v -u 'MAIL:PW' imaps://SERVER/INBOX?NEW

After reload Nextcloud I get everytime following "Warning":

Can not determine user count for OCA\UserExternal\IMAP

Server configuration

User External App version: 3.2.0

Operating system: Ubuntu 20.04

Web server: apache2 - 2.4.41

Database: mariadb 10.3

PHP version: 8.2.9

Nextcloud version: 27.0.2

List of activated apps:

App list

  - activity: 2.19.0
  - announcementcenter: 6.6.2
  - bruteforcesettings: 2.7.0
  - calendar: 4.4.4
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.3.2
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - encryption: 2.15.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_antivirus: 5.2.1
  - files_automatedtagging: 1.17.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - groupfolders: 15.0.2
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - quota_warning: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - richdocuments: 8.1.1
  - richdocumentscode: 23.5.202
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - socialsharing_email: 2.6.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - suspicious_login: 5.0.0
  - systemtags: 1.17.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_totp: 9.0.0
  - unroundedcorners: 1.0.9
  - updatenotification: 1.17.0
  - user_external: 3.2.0
  - user_status: 1.7.0
  - users_picker: 0.2.2
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "overwrite.cli.url": "https:\/\/cloud.krugson.net",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "mysql.utf8mb4": true,
        "default_phone_region": "DE",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "app_install_overwrite": [
            "apporder"
        ],
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "user_backends": [
            {
                "class": "\\OCA\\UserExternal\\IMAP",
                "arguments": [
                    "***REMOVED SENSITIVE VALUE***",
                    993,
                    "tls",
                    null,
                    true,
                    false
                ]
            }
        ]
    }
}

@jonas-krug jonas-krug added 0. Needs triage bug Something isn't working labels Aug 21, 2023
@jonas-krug
Copy link
Author

after first login, error not coming up again

@pierrecorsini
Copy link
Contributor

@jonas-krug Any hint on the resolution of your issue ? I have the same problem.

@damnms
Copy link

damnms commented Dec 3, 2023

also have the same problem, curl on the command line works like a charm

@nshah14285
Copy link

I faced the same problem, using Nextcloud 28.0.3, PHP 8.2.
Solved the issue by replacing 'tls' with 'ssl' in the settings and it worked.
I hope this helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants