Nextcloud Mail uses UUID instead of UID for a user's username?

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • CentOS 7
  • Web server and version (e.g, Apache 2.4.25):
    • Apache HTTPD 2.4.6
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • n/a
  • PHP version (e.g, 8.3):
    • PHP 8.2.20
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • When I first attempted to configure Nextcloud Mail against our LDAP server (the same LDAP we use to login).
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal/LAMP
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When I configure Nextcloud Mail (in the Administration Settings > Groupware section) to authenticate against our email server using the same LDAP accounts that Nextcloud itself uses for a user database, whenever I actually go INTO the “Mail” app (by clicking the “Mail” button in the top app bar), it seems pretty clear that it’s trying to login with a UUID. For example, my inbox is listed as 763f4084-b31a-4b1e-a81a-c5d1a6cc6b82@example.com, instead of what it should be, like, johndoe@example.com.

It seems like it’s pulling the%USERID% value from some UUID (the same one it gets from our LDAP backend), instead of just from… our account names (which would be uid in the LDAP backend).

Steps to replicate it (hint: details matter!):

  1. Navigate to “Administration Settings” > “Groupware”

  2. Configure email settings under “Mail app” > “Provisioning Configurations”

  3. Enter in details - note that using %USERID% produces the correct "simulated” output in the “Preview” box to the right - MY username and NOT a UUID, are displayed for the email.

  4. Attempt to go into the “Mail” app by clicking it from the top nav bar.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"aZd-hBQ3CNMOJkHVYn8cAgAAAA8","level":3,"time":"2026-02-19T21:24:20+00:00","remoteAddr":"192.168.2.100","user":"870cb744-c5f0-11ea-bb50-005056b7dd03","app":"mail","method":"GET","url":"/index.php/apps/mail/","message":"Could not load account mailboxes: IMAP error synchronizing account 1: Too many auth attempts","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.7444.134/135 Safari/537.36","version":"32.0.1.2","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"IMAP error synchronizing account 1: Too many auth attempts","Code":102,"Trace":[{"file":"/storage/web/application_files/nextcloud/apps/mail/lib/Service/MailManager.php","line":139,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/storage/web/application_files/nextcloud/apps/mail/lib/Controller/PageController.php","line":162,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/storage/web/application_files/nextcloud/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/storage/web/application_files/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/storage/web/application_files/nextcloud/apps/mail/lib/IMAP/MailboxSync.php","Line":110,"Previous":{"Exception":"Horde_Imap_Client_Exception","Message":"Too many auth attempts","Code":102,"Trace":[{"file":"/storage/web/application_files/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"OCA\\Mail\\IMAP\\HordeImapClient","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/storage/web/application_files/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1404,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/storage/web/application_files/nextcloud/apps/mail/lib/IMAP/FolderMapper.php","line":52,"function":"listMailboxes","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/storage/web/application_files/nextcloud/apps/mail/lib/IMAP/MailboxSync.php","line":107,"function":"getFolders","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->"},{"file":"/storage/web/application_files/nextcloud/apps/mail/lib/Service/MailManager.php","line":139,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/storage/web/application_files/nextcloud/apps/mail/lib/Controller/PageController.php","line":162,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/storage/web/application_files/nextcloud/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/storage/web/application_files/nextcloud/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/storage/web/application_files/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/storage/web/application_files/nextcloud/apps/mail/lib/IMAP/HordeImapClient.php","Line":53},"message":"Could not load account mailboxes: IMAP error synchronizing account 1: Too many auth attempts","exception":{},"CustomMessage":"Could not load account mailboxes: IMAP error synchronizing account 1: Too many auth attempts"}}

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

/var/log/httpd/nextcloud-access_log:

182.168.2.100 - johndoe [19/Feb/2026:14:33:45 -0700] "GET /ocs/v2.php/apps/spreed/api/v4/room?modifiedSince=1771536796&includeStatus=true&includeLastMessage=true HTTP/1.1" 200 81
182.168.2.100 - - [19/Feb/2026:14:33:55 -0700] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 176
182.168.2.100 - johndoe [19/Feb/2026:14:33:55 -0700] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
182.168.2.100 - - [19/Feb/2026:14:33:55 -0700] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
182.168.2.100 - - [19/Feb/2026:14:33:56 -0700] "GET /index.php/apps/mail/ HTTP/1.1" 200 16393
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 200 14575
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "PROPFIND /remote.php/dav/ HTTP/1.1" 207 257
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "GET /ocs/v2.php/apps/user_status/api/v1/user_status HTTP/1.1" 200 176
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 176
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1305
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "GET /index.php/apps/mail/api/accounts/1/test HTTP/1.1" 200 33
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "GET /index.php/apps/mail/api/textBlockshares HTTP/1.1" 200 50
182.168.2.100 - - [19/Feb/2026:14:33:57 -0700] "GET /index.php/apps/mail/api/textBlocks HTTP/1.1" 200 50
182.168.2.100 - - [19/Feb/2026:14:33:58 -0700] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 200 14575
182.168.2.100 - - [19/Feb/2026:14:33:58 -0700] "OPTIONS /remote.php/dav/principals/users/870cb744-c5f0-11ea-bb50-005056b7dd03/ HTTP/1.1" 200 -
182.168.2.100 - - [19/Feb/2026:14:33:58 -0700] "PROPFIND /remote.php/dav/principals/users/870cb744-c5f0-11ea-bb50-005056b7dd03/ HTTP/1.1" 207 767
182.168.2.100 - - [19/Feb/2026:14:33:58 -0700] "PROPFIND /remote.php/dav/calendars/870cb744-c5f0-11ea-bb50-005056b7dd03/ HTTP/1.1" 207 2196
182.168.2.100 - - [19/Feb/2026:14:34:03 -0700] "PUT /index.php/apps/mail/api/preferences/start-mailbox-id HTTP/1.1" 200 40

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - app_api: 32.0.0
  - appointments: 2.6.2
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.1
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.1.1
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - forms: 5.2.3
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - mail: 5.6.6
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - oauth2: 1.20.0
  - onlyoffice: 9.11.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - secrets: 2.1.4
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.5
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - updatenotification: 1.22.0
  - user_ldap: 1.23.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - encryption: 2.20.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - groupfolders: 20.1.6 (installed 20.1.6)
  - maps: 1.6.0 (installed 1.6.0)
  - otpmanager: 0.5.4 (installed 0.5.4)
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - user_saml: 7.1.1 (installed 7.1.1)
[root@atlas nextcloud]# sudo -u apache php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "atlas.zonit.com",
            "ourcloud.zonit.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "32.0.1.2",
        "overwrite.cli.url": "https:\/\/ourcloud.zonit.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "maintenance": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "theme": "",
        "loglevel": 2,
        "default_phone_region": "US",
        "onlyoffice": {
            "verify_peer_off": true,
            "jwt_secret": "***REMOVED SENSITIVE VALUE***",
            "jwt_header": "Authorization"
        },
        "memcache.local": "\\OC\\Memcache\\APCu",
        "defaultapp": "",
        "maintenance_window_start": 1
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - app_api: 32.0.0
  - appointments: 2.6.2
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.1
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.1.1
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - forms: 5.2.3
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - mail: 5.6.6
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - oauth2: 1.20.0
  - onlyoffice: 9.11.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - secrets: 2.1.4
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.5
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - updatenotification: 1.22.0
  - user_ldap: 1.23.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - encryption: 2.20.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - groupfolders: 20.1.6 (installed 20.1.6)
  - maps: 1.6.0 (installed 1.6.0)
  - otpmanager: 0.5.4 (installed 0.5.4)
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - user_saml: 7.1.1 (installed 7.1.1)