The Basics
- Nextcloud Server version (e.g., 29.x.x):
30.0.13
- Operating system and version (e.g., Ubuntu 24.04):
debian bookworm
- Web server and version (e.g, Apache 2.4.25):
apache from official docker image
- Reverse proxy and version _(e.g. nginx 1.27.2)
traefik
- PHP version (e.g, 8.3):
php from official docker image
- Is this the first time you’ve seen this error? (Yes / No):
no
- When did this problem seem to first start?
always
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
docker
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
no
Summary of the issue you are facing:
Sending mails fails, POST /apps/mail/api/outbox/10 fails with error 500.
The mail server is handled by OVH.
tcpdump ‘port 465’ indicates no message is even sent.
tcpdump ‘port 993’ works well and messages from IMAP are indeed correctly received.
No errors in the logs linked to the mail sending, except:
OCA\Mail\Controller\OutboxController::index uses the @NoAdminRequired annotation and should use the #[OCP\AppFramework\Http\Attribute\NoAdminRequired] attribute instead
dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)
But those are debug level.
No logs in php logs.
Steps to replicate it (hint: details matter!):
- Install the docker image 30.0.13 + mailapp 5.1.10 configured with postgres
- Configure the mail account for IMAP 993 and SMTP 465
- Try sending a message
Log entries
OCA\Mail\Controller\OutboxController::index uses the @NoAdminRequired annotation and should use the #[OCP\AppFramework\Http\Attribute\NoAdminRequired] attribute instead
dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)
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.
OCA\Mail\Controller\OutboxController::index uses the @NoAdminRequired annotation and should use the #[OCP\AppFramework\Http\Attribute\NoAdminRequired] attribute instead
dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)
else only logs are like:
OCA\FirstRunWizard\Notification\Notifier::prepare() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \InvalidArgumentException yourself.
or IMAP log.
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.
[ERROR] mail: Failed to send message 8 from outbox
Object { app: "mail", uid: "20d968380e74f9ece8e2df7edc7dd4916b9a644b4c2e9eacd213723415a771bd", level: "0", error: {…} }
index.mjs:54:17
[ERROR] mail: Could not delay-send message 8
Object { app: "mail", uid: "20d968380e74f9ece8e2df7edc7dd4916b9a644b4c2e9eacd213723415a771bd", level: "0", message: {…} }
index.mjs:54:17
[ERROR] mail: Could not send or copy message
Object { app: "mail", uid: "20d968380e74f9ece8e2df7edc7dd4916b9a644b4c2e9eacd213723415a771bd", level: "0", error: {…} }
index.mjs:54:17
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
no logs...
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": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"objectstore": {
"class": "\\OC\\Files\\ObjectStore\\S3",
"arguments": {
"bucket": "nextcloud-storage-domaintld",
"region": "fr-par",
"hostname": "s3.fr-par.scw.cloud",
"port": "443",
"storageClass": "STANDARD",
"objectPrefix": "urn:oid:",
"autocreate": false,
"use_ssl": true,
"use_path_style": false,
"legacy_auth": false,
"key": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***"
}
},
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpsecure": "ssl",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"upgrade.disable-web": true,
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"mydomain.tld"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "30.0.13.1",
"overwrite.cli.url": "http:\/\/localhost",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_smtpauth": true,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"overwriteprotocol": "https",
"defaultapp": "files",
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"maintenance": false,
"loglevel": "0",
"mail_smtpdebug": "true",
"app.mail.transport": "smtp",
"app.mail.debug": true,
"app.mail.smtplog.enabled": true,
"debug": true
}
}
Apps
The output of occ app:list
(if possible).
Enabled:
- activity: 3.0.0
- admin_audit: 1.20.0
- app_api: 4.0.6
- bruteforcesettings: 3.0.0
- circles: 30.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- deck: 1.14.6
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- firstrunwizard: 3.0.0
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- mail: 5.1.10
- nextcloud_announcements: 2.0.0
- notifications: 3.0.0
- oauth2: 1.18.1
- password_policy: 2.0.0
- photos: 3.0.2
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- richdocuments: 8.5.9
- richdocumentscode: 25.4.202
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- support: 2.0.0
- survey_client: 2.0.0
- suspicious_login: 8.0.0
- systemtags: 1.20.0
- text: 4.1.0
- theming: 2.6.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_oidc: 7.3.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- encryption: 2.18.0
- files_external: 1.22.0
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_ldap: 1.21.0
Tips for increasing the likelihood of a response
- Use the
preformatted text
formatting option in the editor for all log entries and configuration output. - If screenshots are useful, feel free to include them.
- If possible, also include key error output in text form so it can be searched for.
- Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.