- Nextcloud Server version (e.g., 29.x.x):
- 31.0.5
- Operating system and version (e.g., Ubuntu 24.04):
- Debian 12
- Web server and version (e.g, Apache 2.4.25):
- Apache 2
- Reverse proxy and version _(e.g. nginx 1.27.2)
- none
- PHP version (e.g, 8.3):
- 8.3
- Is this the first time you’ve seen this error? (Yes / No):
- No
- When did this problem seem to first start?
- Since the “slow mail service” message is tested by Nextcloud admin panel ? NC 30 ?
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
- Update from NC 30
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
- No
Summary of the issue you are facing:
Admin overview of Nextcloud 31.0.5 is complaining about our mail server in these terms : “Slow mail service detected (mail server) an attempt to connect to several accounts took an average of 10.089 seconds per account”.
But if I try the performance benchmark described on the Nextcloud Mail Admin Documentation from the Nextcloud server, I get these numbers 6044 connections in 9.33s; 647.80 connections/user sec
On Nextcloud log, I can regularly see this kind of message, but don’t know which user is concerned :
{"reqId":"dzcmjiybzURCLTLsjicu","level":3,"time":"2025-06-20T16:25:50+02:00","remoteAddr":"","user":"--","app":"mail","method":"","url":"--","message":"Could not copy message to sent mailbox","userAgent":"--","version":"31.0.5.1","exception":{"Exception":"Horde_Imap_Client_Exception","Message":"Mail server denied authentication.","Code":102,"Trace":[{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/HordeImapClient.php","line":59,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/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":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1857,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php","line":420,"function":"append","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/CopySentMessageHandler.php","line":68,"function":"save","class":"OCA\\Mail\\IMAP\\MessageMapper","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/AHandler.php","line":34,"function":"process","class":"OCA\\Mail\\Send\\CopySentMessageHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/SendHandler.php","line":28,"function":"processNext","class":"OCA\\Mail\\Send\\AHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/AHandler.php","line":34,"function":"process","class":"OCA\\Mail\\Send\\SendHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/AntiAbuseHandler.php","line":33,"function":"processNext","class":"OCA\\Mail\\Send\\AHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/AHandler.php","line":34,"function":"process","class":"OCA\\Mail\\Send\\AntiAbuseHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/SentMailboxHandler.php","line":24,"function":"processNext","class":"OCA\\Mail\\Send\\AHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Send/Chain.php","line":54,"function":"process","class":"OCA\\Mail\\Send\\SentMailboxHandler","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Service/OutboxService.php","line":238,"function":"process","class":"OCA\\Mail\\Send\\Chain","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/BackgroundJob/OutboxWorkerJob.php","line":30,"function":"flush","class":"OCA\\Mail\\Service\\OutboxService","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\\Mail\\BackgroundJob\\OutboxWorkerJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":97,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":84,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":170,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":572,"message":"Could not copy message to sent mailbox","exception":{"details":null,"logged":false,"raw_msg":"Mail server denied authentication."},"CustomMessage":"Could not copy message to sent mailbox"}}
On the mail server side (postfix / dovecot), I have multiple auth errors in logs when using Mail App on my personal account (double checked user/password and server configuration), but I can receive and send message without problem.
2025-06-20T15:49:38.503859+02:00 msgsrv auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=my_username rhost=X.X.X.X
2025-06-20T15:49:38.590063+02:00 msgsrv auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=my_username rhost=X.X.X.X
2025-06-20T15:50:10.282814+02:00 msgsrv auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=my_jvuitten rhost=X.X.X.X
Should I worry ? How to troubleshoot ?
Steps to replicate it (hint: details matter!):
- Go to Nextcloud admin overview and see the message
- Go to Mail App and see everything seems to work as expected
- See logs on nextcloud and mail server
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.
see above
Web Browser
If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.
not relevant
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
not relevant
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!):
“system”: {
“ratelimit.protection.enabled”: false,
“auth.bruteforce.protection.enabled”: false,
“simpleSignUpLink.shown”: false,
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“cloud.agglo-montbeliard.fr”,
“192.168.50.106”
],
“trusted_proxies”: “REMOVED SENSITIVE VALUE”,
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“overwrite.cli.url”: “https://cloud.agglo-montbeliard.fr/”,
“dbtype”: “mysql”,
“version”: “31.0.5.1”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “Europe/Paris”,
“installed”: true,
“theme”: “”,
“loglevel”: 3,
“debug”: false,
“maintenance”: false,
“maintenance_window_start”: 1,
“app.mail.background-sync-interval”: 86400,
“app.mail.verify-tls-peer”: false,
“activity_expire_days”: 365,
“trashbin_retention_obligation”: “auto, 15”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“app.mail.imap.timeout”: 620,
“appstore.experimental.enabled”: true,
“ldapIgnoreNamingRules”: false,
“ldapProviderFactory”: “\OCA\User_LDAP\LDAPProviderFactory”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_sendmailmode”: “smtp”,
“mail_smtpport”: “25”,
“mysql.utf8mb4”: true,
“default_phone_region”: “FR”,
“has_rebuilt_cache”: true,
“app_install_overwrite”: [
“spreed”,
“files_mindmap”,
“pdfdraw”,
“issuetemplate”,
“files_linkeditor”,
“files_texteditor”,
“files_trackdownloads”,
“emlviewer”,
“files_archive”,
“impersonate”,
“extract”,
“tables”,
“cfg_share_links”,
“workflow_script”,
“files_emlviewer”,
“deck”,
“external”,
“groupfolders”
],
“allow_local_remote_servers”: true,
“default_language”: “fr”,
“default_locale”: “fr_FR”,
“force_locale”: “fr_FR”,
“memcache.local”: “\OC\Memcache\APCu”,
“memcache.distributed”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“port”: 6379
},
“memcache.locking”: “\OC\Memcache\Redis”,
“preview_max_memory”: 512,
“twofactor_enforced”: “false”,
“twofactor_enforced_groups”: ,
“twofactor_enforced_excluded_groups”: ,
“sharing.enable_share_mail”: false,
“preview_libreoffice_path”: “/usr/bin/libreoffice”,
“bulkupload.enabled”: “false”,
“filelocking.enabled”: false
}
}
#### Apps
Enabled:
- activity: 4.0.0
- admin_audit: 1.21.0
- announcementcenter: 7.1.3
- approval: 2.2.0
- assistant: 2.4.0
- calendar: 5.3.3
- call_summary_bot: 3.0.1
- circles: 31.0.0
- cloud_federation_api: 1.14.0
- collectives: 2.18.0
- comments: 1.21.0
- contacts: 7.1.3
- contactsinteraction: 1.12.0
- dashboard: 7.11.0
- dav: 1.33.0
- deck: 1.15.1
- drawio: 3.1.0
- external: 6.0.2
- federatedfilesharing: 1.21.0
- federation: 1.21.0
- files: 2.3.1
- files_downloadlimit: 4.0.0
- files_emailviewer: 0.1.4
- files_external: 1.23.0
- files_linkeditor: 1.1.22
- files_pdfviewer: 4.0.0
- files_reminders: 1.4.0
- files_sharing: 1.23.1
- files_trashbin: 1.21.0
- files_versions: 1.24.0
- files_zip: 2.1.0
- forms: 5.1.0
- groupfolders: 19.1.0
- guests: 4.2.0
- impersonate: 2.0.0
- integration_giphy: 2.0.2
- integration_openai: 3.5.0
- logreader: 4.0.0
- lookup_server_connector: 1.19.0
- mail: 5.1.4
- nextcloud_announcements: 3.0.0
- notifications: 4.0.0
- notify_push: 1.1.0
- oauth2: 1.19.1
- onlyoffice: 9.9.0
- password_policy: 3.0.0
- photos: 4.0.0-dev.1
- polls: 7.4.4
- profile: 1.0.0
- provisioning_api: 1.21.0
- serverinfo: 3.0.0
- settings: 1.14.0
- spreed: 21.1.0
- systemtags: 1.21.1
- tables: 0.9.3
- tasks: 0.16.1
- text: 5.0.0
- text_templates: 1.2.0
- theming: 2.6.1
- theming_customcss: 1.18.0
- thesearchpage: 1.2.12
- twofactor_backupcodes: 1.20.0
- twofactor_totp: 13.0.0-dev.0
- updatenotification: 1.21.0
- user_ldap: 1.22.0
- user_status: 1.11.0
- viewer: 4.0.0
- weather_status: 1.11.0
- webhook_listeners: 1.2.0
- workflowengine: 2.13.0
Disabled: - analytics: 4.14.0 (installed 4.14.0)
- app_api: 5.0.2 (installed 5.0.2)
- appointments: 1.15.2 (installed 1.15.2)
- auto_groups: 1.4.1 (installed 1.4.1)
- bruteforcesettings: 4.0.0 (installed 2.2.0)
- cadviewer: 8.75.4 (installed 8.75.4)
- calendar_resource_management: 0.1.0 (installed 0.1.0)
- cfg_share_links: 7.0.1 (installed 7.0.1)
- context_chat: 4.3.0 (installed 4.3.0)
- customproperties: 2.0.4 (installed 2.0.4)
- duplicatefinder: 1.0.5 (installed 1.0.5)
- emlviewer: 1.0.9 (installed 1.0.9)
- encryption: 2.19.0
- event_update_notification: 2.0.0 (installed 2.0.0)
- extract: 1.3.6 (installed 1.3.6)
- files_accesscontrol: 1.19.1 (installed 1.19.1)
- files_archive: 1.1.2 (installed 1.1.2)
- files_automatedtagging: 1.19.0 (installed 1.19.0)
- files_downloadactivity: 1.18.1 (installed 1.18.1)
- files_lock: 29.0.1 (installed 29.0.1)
- files_markdown: 2.3.6 (installed 2.3.6)
- files_mindmap: 0.0.30 (installed 0.0.30)
- files_retention: 1.18.0 (installed 1.18.0)
- files_rightclick: 0.15.1 (installed 1.6.0)
- files_texteditor: 2.15.1 (installed 2.15.1)
- files_trackdownloads: 1.11.0 (installed 1.11.0)
- firstrunwizard: 4.0.0 (installed 2.12.0)
- group_everyone: 0.1.10 (installed 0.1.10)
- hibp: 0.1.0 (installed 0.1.0)
- integration_deepl: 1.0.0 (installed 1.0.0)
- integration_ews: 1.0.37 (installed 1.0.37)
- integration_replicate: 4.0.1 (installed 4.0.1)
- issuetemplate: 0.7.0 (installed 0.7.0)
- ldap_write_support: 1.12.1 (installed 1.12.1)
- mailnotifier: 0.0.3 (installed 0.0.3)
- metadata: 0.22.0 (installed 0.22.0)
- passwords: 2024.11.10 (installed 2024.11.10)
- pdfdraw: 0.1.2
- privacy: 3.0.0 (installed 1.7.0)
- ransomware_protection: 1.14.0 (installed 1.14.0)
- recommendations: 4.0.0 (installed 1.3.0)
- related_resources: 2.0.0 (installed 1.1.0-alpha1)
- sharebymail: 1.21.0 (installed 1.17.0)
- smb_test: 0.3.5 (installed 0.3.5)
- snappymail: 2.36.3 (installed 2.36.3)
- support: 3.0.0 (installed 1.6.0)
- survey_client: 3.0.0 (installed 1.11.0)
- suspicious_login: 9.0.1
- twofactor_nextcloud_notification: 5.0.0
- user_usage_report: 1.13.1 (installed 1.13.1)
- workflow_pdf_converter: 1.14.1 (installed 1.14.1)
- workflow_script: 1.11.1 (installed 1.11.1)