Namshi Cannot assign requested address

Hello, I have trouble with SMTP.

in the smtp log:

namshi ... Cannot assign requested address

Why could this be?
1. I read the discussion here:

The local project is set up with a protonmail address
I have not configured SSL certificates for the domain.
I used the command line
tutor config save --set EMAIL_HOST_USER=
etc. to configure and it did save these settings in .local/share/tutor/config.yml :

EMAIL_HOST_USER: gmail_user

~/.local/share/tutor/env/apps/openedx/config$ nano lms.env.json

"EMAIL_HOST": "smtp",
"EMAIL_USE_TLS": false,

My guess is that setting “allow less secure apps” in gmail is sufficient and that either SSL certificates are required on the client or there is a protonmail/gmail conflict. Who knows? How to further analyse?

2. I read

this and it is true that I also cannot traceroute via port 25. I am also running tutor on EC2.

sudo traceroute -n -T -p 25 shows only ***
sudo traceroute -n -T -p 80 does seem to resolve:
sudo traceroute -n -T -p 80
traceroute to (, 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 0.395 ms 0.389 ms 0.285 ms
7 1.795 ms 1.024 ms 1.075 ms
8 1.792 ms 1.910 ms 1.984 ms
9 1.701 ms 1.681 ms 1.890 ms
10 1.164 ms 1.192 ms 1.157 ms
11 1.162 ms 2.616 ms 2.614 ms
12 1.295 ms 1.289 ms 1.668 ms
13 93.441 ms 93.432 ms 93.414 ms
14 93.416 ms 104.172 ms 93.164 ms
15 93.375 ms 92.745 ms 94.307 ms
16 * * *

3. I also have about 100 times:

[] [user None] - Invalid HTTP_HOST header: xx.AWS-IP.xx.xx:80'. You may need to add 'xx.AWS-IP.xx.xx' to ALLOWED_HOSTS.

and the same for
and the same for You may need to add ‘’ to ALLOWED_HOSTS. leads to (I’m in Japan but I don’t know what this is).

Later in the log, ^[[34;1mnginx_1 |^[[0m - - [25/Jul/2020:16:54:22 +0000] "GET / HTTP/1.1" 400 37 "-" "Mozilla/5.0 (compatible; Nimbostratus-Bot/v1.3.2;" "-"
Note that is Cogent, which I don’t recognize and

I have no limits on the outgoing traffic from the EC2 instance. This may be from the CMS container, but how can I change ALLOWED_HOSTS from the tutor command line?

4. I see that

^[[32msmtp_1 |^[[0m 674 Connecting to [2404:6800:4003:c04::1b]:25 ... failed: Cannot assign requested address ^[[32msmtp_1 |^[[0m 674 LOG: MAIN ^[[32msmtp_1 |^[[0m 674 [2404:xx:xx:xx::xx] Cannot assign requested address ^[[32msmtp_1 |^[[0m 674 Connecting to [xx.xx.xx.xx]:25 ... failed: Connection timed out (timeout=5m) here it seems that port 25 is used. This seems correct, that the gmail server can be connected to over this port, but I don’t see 587 being used locally.

Why did you configure tutor with EMAIL_* settings? You should use SMTP_* variables, as described here:
If you want to use the Google servers for sending email you should also set ACTIVATE_SMTP=false.

Thanks, I just found that out myself from another question on this board. I followed a tutorial for openEdX.

ACTIVATE_SMTP is probably false by default? It seems to work without setting this explicitly.

The problem could be made clearer I think. The logs are misleading. It took me too long to figure it out. Maybe I’ll file an issue.

No, it is true by default.

Yes, it works, but the namshi SMTP server runs needlessly when you set a different SMTP_HOST with ACTIVATE_SMTP=true.

You should really read the docs instead of blindly following 3rd-party tutorials. Granted, sometimes the docs are wrong, but they will always be the most authoritative and up-to-date source of information.

OK, thanks. I found this confusing in the docs too, there it says:

Note that the SMTP server shipped with Tutor by default does not implement TLS.

But gmail is an alternative server/when using gmail, Tutor is client.
The default settings in the docs are not sufficient when using gmail, so you automatically start web searching. Then you see that you need to enable /lesssecureapps in your gmail account and that the port is 587. Then I missed the EMAIL_/SMTP_ difference. I think EdX uses EMAIL_ for SMTP settings by the way.

And I tend to rely on logs too. I’m not sure all of the smtp exim mainlog is in the docker log from --follow. But in the exim log it says, cannot assign requested address. This is from exim on the namshi image, the bash script there could check and print more or the tutor scripts could in my opinion because this message sounds more like a DNS issue.

I needed to look around the docker containers anyway and set up https in the process. Does the Tutor documentation cover all of EdX?