Email Relay config

178 views
Skip to first unread message

Ignacio Lista

unread,
Aug 18, 2022, 8:48:49 AM8/18/22
to taigaio
Hi all, 
I really apreciate it if could help me to found out the way to config my docker Taiga Email Relay host, I cannot send any new user invite to my proyect.

I share my docker-compose config with gmail without relay

  EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
    # ENABLE_EMAIL: "True"
  DEFAULT_FROM_EMAIL: "us...@example.com"
  #EMAIL_USE_TLS: "True"
  #EMAIL_USE_SSL: "False"    
  EMAIL_HOST: "relay.domain.net"
  EMAIL_PORT: 25
  #EMAIL_HOST_USER: "us...@gm.com"
  #EMAIL_HOST_PASSWORD: "pass"

I also tried to use postfix but the result is the same.

taiga-email:
    image: postix:latest
    environment:
      ALLOWED_SENDER_DOMAINS: "domain.com"
      HOSTNAME: postfix-mail
      RELAYHOST: relay.domain.net
      MYNETWORKS: 10.0.0.0/8, 127.0.0.0/8, 172.0.0.0/8
    ports:
      - "25:25"
    networks:
      - taiga

If you have any solution or comment please share. Thank you in advance

Ignacio Lista

unread,
Aug 18, 2022, 9:58:29 AM8/18/22
to taigaio

socket.gaierror: [Errno -2] Name or service not known
ERROR:2022-08-18 13:53:57,769: Internal Server Error: /api/v1/memberships/bulk_create
Traceback (most recent call last):

David Barragán

unread,
Aug 19, 2022, 4:08:01 AM8/19/22
to Ignacio Lista, taigaio
If you comment EMAIL_BACKEND, taiga use the default backend that only prints the content of the email to standard output, the console in this case.

Try with:

  ENABLE_EMAIL: "True"
  EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"

  DEFAULT_FROM_EMAIL: "us...@example.com"
  EMAIL_USE_TLS: "False"
  EMAIL_USE_SSL: "False"

  EMAIL_HOST: "relay.domain.net"
  EMAIL_PORT: 25
  EMAIL_HOST_USER: ""
  EMAIL_HOST_PASSWORD: ""

If the error persist, could you send this information?
 - the full error traceback
 - the curl command that is working
 - the email settings

With all of this, maybe I can see where is the problem.


Best regards



El jue, 18 ago 2022 22:28, Ignacio Lista <ignaci...@despegar.com> escribió:
Only when I comment the line EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
seems to be working but the mail never arrive to destiny.

root@01e4683a1827:/taiga-back# python manage.py sendtestemail x...@domain.com
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Test email from 01e4683a1827 on 2022-08-18 20:07:04.859793+00:00
From: xx...@domain.com
To: xx...@domain.com
Date: Thu, 18 Aug 2022 20:07:04 -0000
Message-ID: <166085322486.67.11426681872608094008@01e4683a1827>

If you're reading this, it was successful.


El jue, 18 ago 2022 a las 12:30, David Barragán (<david.b...@kaleidos.net>) escribió:
The Taiga error trace means that there is no SMTP server running at "relay.domain.net:25".

Have you checked that the SMTP server is working properly? I mean you can send mail with your smtp server with a command line form a terminal. For example you can use curl https://everything.curl.dev/usingcurl/smtp

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/0de59b9d-3dcc-4422-b7ed-d15269f05d14n%40googlegroups.com.


--
Logo Kaleidos David Barragán Merino
Engineer & Co-founder 
kaleidos.net/FFF8E7
 


Este mensaje y sus archivos adjuntos van dirigidos exclusivamente a su destinatario, y pudiendo contener información confidencial sometida a secreto profesional, o cuya divulgación esté legalmente prohibida. Cualquier opinión en él contenida es exclusiva de su autor y no representa necesariamente la opinión de la empresa. Si ha recibido este mensaje por error, le rogamos nos lo comunique de forma inmediata por esta misma vía y proceda a su eliminación, así como a la de cualquier documento adjunto al mismo. El correo electrónico vía Internet no es seguro y no se puede garantizar que no haya errores ya que puede ser interceptado, modificado, perdido o destruido, o contener virus. Cualquier persona que se ponga en contacto con nosotros por correo electrónico se considerará que asume estos riesgos.

KALEIDOS OPEN SOURCE se reserva las acciones legales que le correspondan contra todo tercero que acceda de forma ilegítima al contenido de cualquier mensaje externo procedente del mismo.

INFORMACIÓN PROTECCIÓN DE DATOS. Responsable: KALEIDOS OPEN SOURCE (B86241973)

Le informamos que sus datos identificativos y los contenidos en los correos electrónicos y ficheros adjuntos pueden ser incorporados a nuestras bases de datos con la finalidad de mantener relaciones profesionales y/o comerciales y, que serán conservados mientras se mantenga la relación. Si lo desea, puede ejercer su derecho a acceder, rectificar y suprimir sus datos y demás reconocidos normativamente dirigiéndose al correo emisor o en los datos del responsable. Para información y consultas visite nuestra web  https://kaleidos.net


Este mensaje y sus archivos adjuntos van dirigidos exclusivamente a su destinatario, y pudiendo contener información confidencial sometida a secreto profesional, o cuya divulgación esté legalmente prohibida. Cualquier opinión en él contenida es exclusiva de su autor y no representa necesariamente la opinión de la empresa. Si ha recibido este mensaje por error, le rogamos nos lo comunique de forma inmediata por esta misma vía y proceda a su eliminación, así como a la de cualquier documento adjunto al mismo. El correo electrónico vía Internet no es seguro y no se puede garantizar que no haya errores ya que puede ser interceptado, modificado, perdido o destruido, o contener virus. Cualquier persona que se ponga en contacto con nosotros por correo electrónico se considerará que asume estos riesgos.

KALEIDOS OPEN SOURCE se reserva las acciones legales que le correspondan contra todo tercero que acceda de forma ilegítima al contenido de cualquier mensaje externo procedente del mismo.

INFORMACIÓN PROTECCIÓN DE DATOS. Responsable: KALEIDOS OPEN SOURCE (B86241973)

Le informamos que sus datos identificativos y los contenidos en los correos electrónicos y ficheros adjuntos pueden ser incorporados a nuestras bases de datos con la finalidad de mantener relaciones profesionales y/o comerciales y, que serán conservados mientras se mantenga la relación. Si lo desea, puede ejercer su derecho a acceder, rectificar y suprimir sus datos y demás reconocidos normativamente dirigiéndose al correo emisor o en los datos del responsable. Para información y consultas visite nuestra web  https://kaleidos.net

David Barragán

unread,
Aug 19, 2022, 8:51:08 AM8/19/22
to Ignacio Lista, taigaio
\o/ Marvelous!!

By default, the system expects the connection with the smtp server is authenticated and safe. You have to be explicit if you need the opposite.


Best regard.

On Fri, Aug 19, 2022 at 2:25 PM Ignacio Lista <ignaci...@despegar.com> wrote:
David, 
Those options work for me like a charm!!! You are a genius!!! Seems to be ENABLE_EMAIL and uncomment the options with "False" if there wasn't use it was the key.
Thank you so much for your help and support.

Cheers.

Ignacio Lista

unread,
Aug 30, 2022, 4:15:15 PM8/30/22
to David Barragán, taigaio
Hello again, David, how are you?

Maybe you can help me again with something.
I would like to change the template format of how a new member receives an email invitation as shown below. Could you tell me in which place this template is stored?

Welcome to Taiga, an Open Source, Agile Project Management Tool

You have been invited to Taiga!

Hi! SR. has sent you an invitation to join project PROYECT in Taiga. Taiga is an Open Source Agile Project Management Tool. There is no cost for you to be a Taiga user.

And now a few words from the jolly good fellow or sistren
who thought so kindly as to invite you




Thank you again in advance.
 

David Barragán

unread,
Aug 31, 2022, 8:52:35 AM8/31/22
to Ignacio Lista, taigaio
Yes, there is 3 files per email: subject html body and txt body. For this email, the templates are in:

- taiga-back/taiga/projects/templates/emails/membership_invitation-subject.jinja -> https://github.com/kaleidos-ventures/taiga-back/blob/main/taiga/projects/templates/emails/membership_invitation-subject.jinja
- taiga-back/taiga/projects/templates/emails/membership_invitation-body-html.jinja  -> https://github.com/kaleidos-ventures/taiga-back/blob/main/taiga/projects/templates/emails/membership_invitation-body-html.jinja
- taiga-back/taiga/projects/templates/emails/membership_invitation-body-text.jinja -> https://github.com/kaleidos-ventures/taiga-back/blob/main/taiga/projects/templates/emails/membership_invitation-body-text.jinja

If you modify these files (the best solution would probably be to fork the repository), you'll need to rebuild the taiga-back docker image and modify docker-compose file to use the new compiled image. Note that changing the templates will "break" the translations system, so this email will always appear in the language you typed in unless you change and recompile the localization files as well.


Best regards

David Barragán

unread,
Sep 7, 2022, 11:48:14 AM9/7/22
to Ignacio Lista, taigaio
You are welcome!!!! :-)

On Wed, Sep 7, 2022 at 5:46 PM Ignacio Lista <ignaci...@despegar.com> wrote:
David, 
Thank you for all your help, it was really helpful!

Have a great day!!!
--
logo

Ignacio Lista

NOC Engineer III | Network Operations Center


Juana Manso 1069 - piso 2° - C.A.B.A. (C1043AAU)

Seguinos en Twitter!Seguinos en Facebook!Seguinos en YouTube!Seguinos en Instagram!

Este mensaje es confidencial y puede contener información amparada por el secreto profesional. Si usted ha recibido este e-mail por error, por favor comuníquenoslo inmediatamente respondiendo a este e-mail y luego eliminándolo de su sistema. El contenido de este mensaje no deberá ser copiado ni divulgado a ninguna persona.

Reply all
Reply to author
Forward
0 new messages