Giter Site home page Giter Site logo

Error sending email about taiga-back HOT 6 CLOSED

unbranched avatar unbranched commented on August 12, 2024
Error sending email

from taiga-back.

Comments (6)

brett-stanley avatar brett-stanley commented on August 12, 2024

Same symptoms for me, using taigaio/taiga-back:6.0.4

from taiga-back.

brett-stanley avatar brett-stanley commented on August 12, 2024

@unbranched I was able to get this working by making these environment variables on the taiga-async container as well.

Connect to console of taiga-back and use sendtestemail command to verify:

python manage.py sendtestemail

This gave me more information when there were failures, for example when I had TLS and SSL both True in my config.

from taiga-back.

unbranched avatar unbranched commented on August 12, 2024

@brett-stanley still doesn't work, what did you change exactly?

from taiga-back.

brett-stanley avatar brett-stanley commented on August 12, 2024

I had modified the docker-compose from the repo (&default-back-environment), copying the settings into both taiga-back and taiga-async. When I did so, I originally neglected to have the EMAIL_ variables in the taiga-async config.

Here's my final working config for those two containers - ${VARS} are environment variables coming from the host:

taiga-async:
    image: taigaio/taiga-back:6.0.4
    container_name: taiga-async
    entrypoint: ["/taiga-back/docker/async_entrypoint.sh"]
    environment: 
      POSTGRES_DB: ${TAIGA_DB_DBNAME}
      POSTGRES_USER: ${TAIGA_DB_USER}
      POSTGRES_PASSWORD: ${TAIGA_DB_PASSWORD}
      POSTGRES_HOST: taiga-db
      TAIGA_SECRET_KEY: ${TAIGA_BACK_SECRET_KEY}
      TAIGA_SITES_DOMAIN: "project.**REMOVED**"
      TAIGA_SITES_SCHEME: "https"
      RABBITMQ_USER: ${TAIGA_EVENTS_RABBITMQ_USER}
      RABBITMQ_PASS: ${TAIGA_EVENTS_RABBITMQ_PASSWORD}
      ENABLE_TELEMETRY: "True"
      DEFAULT_FROM_EMAIL: ${SMTP_USER}
      EMAIL_USE_TLS: "True"
      EMAIL_USE_SSL: "False"
      EMAIL_HOST: smtp.gmail.com
      EMAIL_PORT: 587
      EMAIL_HOST_USER: ${SMTP_USER}
      EMAIL_HOST_PASSWORD: ${SMTP_PASSWORD}
      EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
    volumes:
      - /**REMOVED**/taiga/static:/taiga-back/static
      - /**REMOVED**/taiga/media:/taiga-back/media
    depends_on:
      - taiga-db
      - taiga-back
      - taiga-async-rabbitmq
  taiga-back:
    image: taigaio/taiga-back:6.0.4
    container_name: taiga-back
    ports:
      - "19001:8000"
    expose:
      - 19001
    environment:
      POSTGRES_DB: ${TAIGA_DB_DBNAME}
      POSTGRES_USER: ${TAIGA_DB_USER}
      POSTGRES_PASSWORD: ${TAIGA_DB_PASSWORD}
      POSTGRES_HOST: taiga-db
      TAIGA_SECRET_KEY: ${TAIGA_BACK_SECRET_KEY}
      TAIGA_SITES_DOMAIN: "project.**REMOVED**"
      TAIGA_SITES_SCHEME: "https"
      RABBITMQ_USER: ${TAIGA_EVENTS_RABBITMQ_USER}
      RABBITMQ_PASS: ${TAIGA_EVENTS_RABBITMQ_PASSWORD}
      ENABLE_TELEMETRY: "True"
      PUBLIC_REGISTER_ENABLED: "False"
      ENABLE_SLACK: "True"
      ENABLE_GITHUB_IMPORTER: "True"
      ENABLE_JIRA_IMPORTER: "False"
      ENABLE_TRELLO_IMPORTER: "True"
      DEFAULT_FROM_EMAIL: ${SMTP_USER}
      EMAIL_USE_TLS: "True"
      EMAIL_USE_SSL: "False"
      EMAIL_HOST: smtp.gmail.com
      EMAIL_PORT: 587
      EMAIL_HOST_USER: ${SMTP_USER}
      EMAIL_HOST_PASSWORD: ${SMTP_PASSWORD}
      EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
    volumes:
        - /**REMOVED**/taiga/static:/taiga-back/static
        - /**REMOVED**/taiga/media:/taiga-back/media
        - /**REMOVED**/taiga/back/config.py:/taiga-back/settings/config.py
    depends_on:
      - taiga-db
      - taiga-events-rabbitmq
      - taiga-async-rabbitmq

Side note: one other "gotcha" for me was the difference between Python-style "True/False" in the taiga-back and taiga-async vs Javascript-style "true/false" in the taiga-front environment variables.

from taiga-back.

dpineiden avatar dpineiden commented on August 12, 2024

I have some similar.

With:

./manage.py check --deploy

?: (security.W001) You do not have 'django.middleware.security.SecurityMiddleware' in your MIDDLEWARE so the SECURE_HSTS_SECONDS, SECURE_CONTENT_TYPE_NOSNIFF, SECURE_BROWSER_XSS_FILTER, and SECURE_SSL_REDIRECT settings will have no effect.
?: (security.W003) You don't appear to be using Django's built-in cross-site request forgery protection via the middleware ('django.middleware.csrf.CsrfViewMiddleware' is not in your MIDDLEWARE). Enabling the middleware is the safest approach to ensure you don't leave any holes.
?: (security.W019) You have 'django.middleware.clickjacking.XFrameOptionsMiddleware' in your MIDDLEWARE, but X_FRAME_OPTIONS is not set to 'DENY'. The default is 'SAMEORIGIN', but unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to 'DENY'

How correct that on the taiga back container?

from taiga-back.

yamila-moreno avatar yamila-moreno commented on August 12, 2024

@brett-stanley glad you figured it out. I'm closing the issue

@dpineiden your issue doesn't seem related to he original. Please, consider opening a new one.

from taiga-back.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.