E-Mail Notification failed

Hi, I am one step further with my e-mail notifications, but now I get the following error: Notification failed '1990': Target{type=CUSTOM, id=lxxx@web.de}, reason=Email send failed: 530 Authentication required

My docker-compose.yml looks like:

  manager:
#    privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:

      OR_EMAIL_HOST: smtp.web.de
      OR_EMAIL_USER: lxxx@web.de
      OR_EMAIL_PASSWORD: xxx
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: lxxx@web.de
      OR_EMAIL_ADMIN:
      OR_DATA_POINTS_MAX_AGE_DAYS: 37000

      OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      OR_SSL_PORT: ${OR_SSL_PORT:--1}
      OR_DEV_MODE: ${OR_DEV_MODE:-false}

Where else do I need to authenticate?

It worked now! The problem was the localhost, which replaced the username with my windows username, deleted the password and changed the port from 587 to 25. Without localhost everything works fine with these settings:

  manager:
#    privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST: ${OR_EMAIL_HOST:-smtp.web.de}
      OR_EMAIL_USER: ${OR_EMAIL_USER:-lxxx@web.de}
      OR_EMAIL_PASSWORD: ${OR_EMAIL_PASSWORD:-xxx}
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: ${OR_EMAIL_FROM:-lxxx@web.de}
      OR_EMAIL_ADMIN: ${OR_EMAIL_ADMIN:-lxxx@web.de}
      OR_HOSTNAME: ${OR_HOSTNAME:-xxx.de}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}

Hi @deputy-chief-hardy,

glad to hear that! Sorry, that nobody responsed… it was eastertime :slight_smile:

No worries! :smiley: thanks for your answer now nevertheless :slight_smile: do you have maybe an idea why the localhost grabs the windows username? actually docker should be isolated, shouldn’t it?

Hi @deputy-chief-hardy,

this is strange, how do you start the docker?

Grüße nach Karlsruhe.

No idea how this is working, I’m always getting the same error (and my hostname is an fqdn so is not localhost)

did you tried it without expressions?
just:

OR_EMAIL_HOST: smtp.web.de
OR_EMAL_USER: test@test.de
OR_EMAIL_PASSWORD: xxxxxxxx

Same thing

manager_1     | 2023-04-17 11:07:45.569  WARNING [Messaging-NotificationQu..e-26] manager.notification.NotificationService : Error processing from REALM_RULESET - NOTIFICATION_HANDLER_CONFIG_ERROR (Handler is not valid: email): Notification{name='null', message=org.openremote.model.notification.EmailNotificationMessage@1e7e85fc, repeatFrequency=null, repeatInterval='null', targets=[Target{type=CUSTOM, id=my@email.com}]}

this is only with Google Workspace, on another mail domain I could send without problems

show your docker-compose.yml pls :slight_smile:

This is from the other post where we discussed this issue
Let me know if you want the full yml

you sure you tested it this way too?

`   environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST: my.smtp.com
      OR_EMAIL_USER: my@username.com
      OR_EMAIL_PASSWORD: mypassword
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:--1}
      #OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: my@username.com
      OR_EMAIL_ADMIN: 

I just tried it when you asked me few minutes ago (except for port 1, you can’t really send on port 1?)
I need to try to comment TLS option, but i’m pretty sure Google will refuse it, give me a min

Google doesn’t allow it.


 environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST: my.smtp.com
      OR_EMAIL_USER: my@username.com
      OR_EMAIL_PASSWORD: mypassword
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-true}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: my@username.com
      OR_EMAIL_ADMIN:

could also try 465 instead of 587

yes but i’m using app-specific password

So I tried this configuration with 587, 465 and even regenerating the password, nothing works.
Fun fact: Google doesn’t even show the password as used

I am using GoDaddy mail, and it worked .

Try another domain , i also face same problem from gmail.

I already make it work with another domain, but that’s not the point of course. We are trying to make it work with Google

Hi @Denis , I started Docker via docker-compose -p openremote up -d

Grüße zurück :smiley:

Apologies, please see this thread:

Hi Rich
did another pull, but still no luck with Google

tried with this

      OR_EMAIL_HOST: gmail.smtp.com
      OR_EMAIL_USER: myemail@domain.com
      OR_EMAIL_PASSWORD: xxxxxxxxxxxx
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-true}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: myemail@domain.com
#      OR_EMAIL_ADMIN: ${OR_EMAIL_ADMIN:-myemail@domain.com}

and this

      OR_EMAIL_HOST: gmail.smtp.com
      OR_EMAIL_USER: myemail@domain.com
      OR_EMAIL_PASSWORD: xxxxxxxxxxxx
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: myemail@domain.com
#      OR_EMAIL_ADMIN: ${OR_EMAIL_ADMIN:-myemail@domain.com}

The error is always the same
manager_1 | 2023-04-26 09:50:21.456 WARNING [Messaging-NotificationQu…e-26] manager.notification.NotificationService : Error processing from REALM_RULESET - NOTIFICATION_HANDLER_CONFIG_ERROR (Handler is not valid: email): Notification{name=‘null’, message=org.openremote.model.notification.EmailNotificationMessage@1d9e8e96, repeatFrequency=null, repeatInterval=‘null’, targets=[Target{type=CUSTOM, id=myemail@mydomain.com}]}

edit: app-specific password still shows as never used on Google side