title: Using Taiga6 with Docker and an SMTP Server that does not require authentication
body: <p>I've recently used the docker images provided for Taiga6 to run an instance using docker-compose on Ubuntu 20.04.</p>
  <p>Everything seems to work fine, except that I can't seem to get email working quite right. I use Gmail for my company's email, foamfactory.io, but the gmail smtp relay seems to be... finicky at best.</p>
  <p>I decided to try using <a href="https://github.com/bokysan/docker-postfix" rel="nofollow noreferrer">https://github.com/bokysan/docker-postfix</a> to have a simple SMTP relay set up as part of the docker-compose.yml file. I can get the email server to start fine, and it will send emails as expected when I connect to the taiga-back container, install cURL, and run the following command:</p>
  <pre><code>curl --url 'smtp://taiga-email:25' --mail-from 'taiga-noreply@foamfactory.io' --mail-rcpt 'jaywir3@gmail.com' --upload-file mail.txt --insecure
  </code></pre>
  <p>However, when I attempt to send an email from Taiga (for example, inviting a user), I get the following exception:</p>
  <pre><code>taiga-back_1             | ERROR:2021-02-10 17:42:49,044: Internal Server Error: /api/v1/memberships/4/resend_invitation
  taiga-back_1             | Traceback (most recent call last):
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/core/handlers/exception.py&quot;, line 34, in inner
  taiga-back_1             |     response = get_response(request)
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/core/handlers/base.py&quot;, line 115, in _get_response
  taiga-back_1             |     response = self.process_exception_by_middleware(e, request)
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/core/handlers/base.py&quot;, line 113, in _get_response
  taiga-back_1             |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  taiga-back_1             |   File &quot;/taiga-back/taiga/base/api/viewsets.py&quot;, line 104, in view
  taiga-back_1             |     return self.dispatch(request, *args, **kwargs)
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py&quot;, line 54, in wrapped_view
  taiga-back_1             |     return view_func(*args, **kwargs)
  taiga-back_1             |   File &quot;/taiga-back/taiga/base/api/views.py&quot;, line 458, in dispatch
  taiga-back_1             |     response = self.handle_exception(exc)
  taiga-back_1             |   File &quot;/taiga-back/taiga/base/api/views.py&quot;, line 456, in dispatch
  taiga-back_1             |     response = handler(request, *args, **kwargs)
  taiga-back_1             |   File &quot;/taiga-back/taiga/projects/api.py&quot;, line 1078, in resend_invitation
  taiga-back_1             |     services.send_invitation(invitation=invitation)
  taiga-back_1             |   File &quot;/taiga-back/taiga/projects/services/invitations.py&quot;, line 32, in send_invitation
  taiga-back_1             |     email.send()
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/core/mail/message.py&quot;, line 306, in send
  taiga-back_1             |     return self.get_connection(fail_silently).send_messages([self])
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/core/mail/backends/smtp.py&quot;, line 103, in send_messages
  taiga-back_1             |     new_conn_created = self.open()
  taiga-back_1             |   File &quot;/opt/venv/lib/python3.7/site-packages/django/core/mail/backends/smtp.py&quot;, line 70, in open
  taiga-back_1             |     self.connection.login(self.username, self.password)
  taiga-back_1             |   File &quot;/usr/local/lib/python3.7/smtplib.py&quot;, line 697, in login
  taiga-back_1             |     &quot;SMTP AUTH extension not supported by server.&quot;)
  taiga-back_1             | smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported by server.
  </code></pre>
  <p>The configuration looks like the following inside of <code>docker-compose.yml</code>:</p>
  <pre><code>EMAIL_BACKEND: &quot;django.core.mail.backends.smtp.EmailBackend&quot;
  DEFAULT_FROM_EMAIL: &quot;taiga-noreply@foamfactory.io&quot;
  ...
  services:
    taiga-email:
      build: ../docker-postfix
      environment:
        ALLOWED_SENDER_DOMAINS: &quot;foamfactory.io&quot;
        RELAYHOST_TLS_LEVEL: &quot;may&quot;
      ports:
        - &quot;1587:${EMAIL_PORT}&quot;
      networks:
        - taiga
  </code></pre>
  <p>I previously had Taiga v5 set up on a host that provided its own email service. We'll call this server email.foamfactory.io. I augmented it so that it would accept connections from the new host server (on which I'm running the docker image for taiga6) and receive email. It does not use TLS, and does not require authentication (the only server that can forward email through it is the one on which the taiga6 docker container is running).</p>
  <p>Even with this solution, I'm still getting the error smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported. I'm a bit at my wits end, because I want to use Taiga6, but the conversion to this newer version requires me to send an email invitation so that I can verify the user account for which I want to use.</p>
  <p>I guess what I'm wondering is how I can disable SMTP authentication in Django... I want to be able to use unauthenticated SMTP over non-TLS connections, from a specific server to another specific SMTP server.</p>