Skip to content

SMTP: Mail Error on Auth (STARTTLS/587) #511

Closed

Description

@criegerde

Describe the bug

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

Image

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.

Thank you

Activity

  1. dragonchaser commented on Mar 28, 2025

    @dragonchaser
    Member

    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).

  2. criegerde commented on Mar 28, 2025

    @criegerde
    Author

    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"}

  3. rhafer commented on Mar 31, 2025

    @rhafer
    Member

    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?

  4. criegerde commented on Mar 31, 2025

    @criegerde
    Author

    I've append NOTIFICATIONS_SMTP_ENCRYPTION: "starttls" to the opencloud.yml.

    Image

    Tried with the following changes in .env:
    SMTP_AUTHENTICATION: auto/plain
    SMTP_INSECURE: true/false

    ^ still receive errors.

    Image

  5. moved this from Qualification to Prio <= 3 in OpenCloud Team Boardon Apr 3, 2025
  6. self-assigned this
    on Apr 3, 2025
  7. moved this from Prio <= 3 to In Progress in OpenCloud Team Boardon Apr 3, 2025
  8. rhafer commented on Apr 3, 2025

    @rhafer
    Member

    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).

  9. added a commit that references this issue on Apr 3, 2025
    f25e191
  10. added a commit that references this issue on Oct 13, 2026
    c74900f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions