Seafile in docker + email in docker, cannot send emails

I have basically the same setup on my gitea server:

  1. gitea in a container, no ports mapped
  2. jwilder front proxy that redirects properly
  3. an email server in a docker container on the same host

It works perfectly, although I had to disable ssl certificate verification, because it was self-signed.

So for email to work from seafile, I did the same thing:

EMAIL_HOST = 'dockermail' 
EMAIL_HOST_PASSWORD = 'somePassword'

STARTTLS is disabled on my server, so is port 587. ‘dockermail’ is a hostname resolving to the internal ip address of the container. It’s pingable and port 465 is open.

However, when creating a new account with confirmation email, the user dialog hangs and after quite a while I get:

2018-06-08 22:23:16,420 [ERROR] seahub.views.sysadmin:1150 user_add Connection unexpectedly closed

The mail account I register at is working, I verified with an email program. I suspect seafile is doing some very fishy stuff in order to connect to the email host.

I also see an smtpd connection on the postfix side, but nothing happens. I strongly suspect this is a certificate issue, maybe also because of the odd EMAIL_HOST name?

Try EMAIL_USE_SSL instead of _TLS, please.

You are right, that worked perfectly, thanks!

I don’t see that option documented in Maybe the documentation needs a fix.

@Jonathan - this is still not documented in the manual - almost three years later :wink: I just spent a couple hours looking for a solution…

1 Like