oCIS email setup and config

Hello Friends,

I recently set up a test oCIS installation using docker on an ubuntu vm.

I tried to setup outgoing emails using the following docker compose file:

version: "3.9"

networks:
  owncloud-net:
    external: false

services:
  owncloud:
    container_name: owncloud
    image: owncloud/ocis:latest
    restart: unless-stopped
    entrypoint:
      - /bin/sh
    # run ocis init to initialize a configuration file with random secrets
    # it will fail on subsequent runs, because the config file already exists
    # therefore we ignore the error and then start the ocis server
    command: ["-c", "ocis init || true; ocis server"]
    networks:
      - owncloud-net
    ports:
      - "9200:9200"
    environment:
        - NOTIFICATIONS_SMTP_HOST=stmp.host
        - NOTIFICATIONS_SMTP_PORT=587
        - NOTIFICATIONS_SMTP_AUTHENTICATION=login
        - NOTIFICATIONS_SMTP_SENDER=sender-email
        - NOTIFICATIONS_SMTP_USERNAME=username
        - NOTIFICATIONS_SMTP_PASSWORD=pass
        - NOTIFICATIONS_SMTP_ENCRYPTION=ssl
        - DEMO_USERS=false
        - PROXY_TLS=false
        - OCIS_INSECURE=false  # reverse proxy terminates ssl
        - OCIS_URL=https://owncloud.example.com 
        - PROXY_HTTP_ADDR=0.0.0.0:9200 
        - OCIS_LOG_LEVEL=info
        - OCIS_LOG_COLOR=true
        - OCIS_LOG_PRETTY=true
        - ADMIN_PASSWORD=pass
        volumes:
          - ./ocis-config:/etc/ocis
          -./ocis-data:/var/lib/ocis

After initializing the server i see no indication of errors in the docker logs.
When searching for the notification configuration the only thing i can find is
in ./ocis-config/ocis.yaml

...
notifications:
  notifications:
    events:
      tls_insecure: false

I am not sure where i am going wrong and i can’t find a way to test sending an email out (I am assuming it isn’t implemented yet in the webgui).

Should I edit the yaml file manually to achieve this ?
Should there be a separate yaml file for this configuration?

Any guidance would be appreciated.

Did you sort out the issue?

No, unfortunately i had to pause migrating to oCIS due to time constraints.

Ok, can you reopen it when you run into issues again?

I am migrating from OC 10 classic to OCIS (at least partly). I am using these settings in the env file:

NOTIFICATIONS_SMTP_HOST=mail1.netzwissen.de
NOTIFICATIONS_SMTP_PORT=587
NOTIFICATIONS_SMTP_AUTHENTICATION=login
NOTIFICATIONS_SMTP_SENDER=noreply@netzwissen.de
NOTIFICATIONS_SMTP_USERNAME=noreply@netzwissen.de
NOTIFICATIONS_SMTP_PASSWORD=xxxxxx
NOTIFICATIONS_SMTP_ENCRYPTION=starttls
NOTIFICATIONS_EMAIL_TEMPLATE_PATH=/etc/ocis/templates/text/email.text.tmpl
NOTIFICATIONS_EMAIL_TEMPLATE_PATH=/etc/ocis/templates/html/email.html.tmpl
NOTIFICATIONS_EMAIL_TEMPLATE_PATH=/etc/ocis//templates/html/img/

I see notifications in the web GUI and the sync client, but is there any way to test the mail notfication setup somehow? I want to force the notification service to send something …

1 Like

The notification service will handle share created, share expired, and space shared\unshared\membership expired events. Make sure that Receive notification mails is turned on in an account setting for a recipient.

You need to use the env. like below and just create manually the folders and files (/etc/ocis/templates/text/email.text.tmpl etc):

NOTIFICATIONS_EMAIL_TEMPLATE_PATH=/etc/ocis