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 configured SMTP and expected to receive notification emails. But errors occurs.
Steps to reproduce
1.configure SMTP in .env
2.docker compose up
3. error "opencloud-1 | {"level":"error","service":"notifications","error":"Mail Error on Auth: 535 5.7.8 Error: authentication failed: (reason unavailable)","event":"SendEmail","time":"2025-03-28T11:46:47Z","line":"github.com/opencloud-eu/opencloud/services/notifications/pkg/service/service.go:158","message":"failed to send a message"}
"
Expected behavior
Mail are sent
Actual behavior
Error message appears in the log.
"Mail Error on Auth: 535 5.7.8 Error: authentication failed: (reason unavailable)"
Setup
SMTP_HOST=v082295.kasserver.com
# Port of the SMTP host to connect to.
SMTP_PORT=587
# An eMail address that is used for sending OpenCloud notification eMails
# like "opencloud notifications <[email protected]>".
SMTP_SENDER="OpenCloud <[email protected]>"
# Username for the SMTP host to connect to.
SMTP_USERNAME=a000000
# Password for the SMTP host to connect to.
SMTP_PASSWORD=sensible-data
# Authentication method for the SMTP communication.
SMTP_AUTHENTICATION=plain
# Allow insecure connections to the SMTP server. Defaults to false.
SMTP_INSECURE=
Details
Additional context
Already tried SMTP_AUTHENTICATION=plain or login or kept it blank - it did not work.
Mails were send e.g. from zammad using this configuration (STARTTLS/587)
Please advise us how to configure properly.
Can you try with SMTP_INSECURE=true so we can narrow it down if it is maybe an issue with the certs. (Not recommended for production use, just for a quick test).
Re-created the container docker compose up -d --force-recreate
Using
SMTP_HOST="v082295.kasserver.com"
# Port of the SMTP host to connect to.
SMTP_PORT=587
# An eMail address that is used for sending OpenCloud notification eMails
# like "opencloud notifications <[email protected]>".
SMTP_SENDER="OpenCloud <[email protected]>"
# Username for the SMTP host to connect to.
SMTP_USERNAME="a000000"
# Password for the SMTP host to connect to.
SMTP_PASSWORD="mypassword_:-)"
# Authentication method for the SMTP communication.
SMTP_AUTHENTICATION=plain
# Allow insecure connections to the SMTP server. Defaults to false.
SMTP_INSECURE=true
Both values, "plain" or "auto", ends in
{"level":"error","service":"notifications","error":"Mail Error on Auth: 535 5.7.8 Error: authentication failed: (reason unavailable)","event":"SendEmail","time":"2025-03-28T13:27:45Z","line":"github.com/opencloud-eu/opencloud/services/notifications/pkg/service/service.go:158","message":"failed to send a message"}
Mails were send e.g. from zammad using this configuration (STARTTLS/587)
The configuration you posted is not using STARTTLS I think. It seems that our docker compose example is not settting NOTIFICATIONS_SMTP_ENCRYPTION and it might be that your SMTP relay is just not accepting PLAIN without TLS.
Can you try to add a line NOTIFICATIONS_SMTP_ENCRYPTION: "starttls" to the environment section in the opencloud.yml file in the opencloud_full directory and retry?
Activity
dragonchaser commentedon Mar 28, 2025
Can you try with
SMTP_INSECURE=trueso we can narrow it down if it is maybe an issue with the certs. (Not recommended for production use, just for a quick test).criegerde commentedon Mar 28, 2025
Re-created the container
docker compose up -d --force-recreateUsing
Both values, "plain" or "auto", ends in
{"level":"error","service":"notifications","error":"Mail Error on Auth: 535 5.7.8 Error: authentication failed: (reason unavailable)","event":"SendEmail","time":"2025-03-28T13:27:45Z","line":"github.com/opencloud-eu/opencloud/services/notifications/pkg/service/service.go:158","message":"failed to send a message"}rhafer commentedon Mar 31, 2025
The configuration you posted is not using STARTTLS I think. It seems that our docker compose example is not settting
NOTIFICATIONS_SMTP_ENCRYPTIONand it might be that your SMTP relay is just not accepting PLAIN without TLS.Can you try to add a line
NOTIFICATIONS_SMTP_ENCRYPTION: "starttls"to theenvironmentsection in theopencloud.ymlfile in theopencloud_fulldirectory and retry?criegerde commentedon Mar 31, 2025
I've append NOTIFICATIONS_SMTP_ENCRYPTION: "starttls" to the opencloud.yml.
Tried with the following changes in .env:
SMTP_AUTHENTICATION: auto/plain
SMTP_INSECURE: true/false
^ still receive errors.
rhafer commentedon Apr 3, 2025
Hm, it looks as if the opencloud yaml does not handle all the settings from the .env file correctly. (E.g. the password is not set).
fix(opencloud_full): add missing SMTP env vars
fix(opencloud_full): add missing SMTP env vars