Since todays rebuild, it’s official (I thought I read about this somewhere, but cannot find it). Since this can really be a show-stopper, especially for new Discourse-admins, I will file it officially:
Docker Manager does not escape anything in the SMTP password. If you use quotes, they will be stripped. Therefore, any hash sign (and probably some other special characters) will be fatal for your SMTP connectivity…

It’s hard to read the comments in app.yml due to the color in VI editor (sorry I’m new in Linux and don’t know how to change color setting in VI), can we mention this issue as part of the discouse-setup?

codinghorror:

Yes this is mentioned in the app.yml help but you would not see it as part of the discourse-setup questions,

I changed my Gmail password without “#” and rebuild app, then send test email works fine.

Docs say pretty clearly not to use Gmail for mail sending. The recommended services don’t (in my experience) create passwords with hashes in them. Seems like an edge case, but I can have ./discourse-setup check for hashes in passwords if @codinghorror wants.

It’s passed correctly to Docker if you use the quotes. The problem is that once it ends up inside discourse.conf, it’s not quoted there - and then # is interpreted as beginning of the comment for that line.

Note that this is very to trip up if you 1) use a mail service that lets you provide your own password, and 2) use a strong password generator. Just spent several days trying to figure out why mail wasn’t working on a fresh Discourse docker install, and this was the culprit.

Passwords containing # are a problem in mySQL too. I know there are ways of fixing it but I have resorted to not using # characters in mySQL or Discourse passwords. There are other great special characters that we can use but we all seem to be addicted to # … me included

It’s passed correctly to Docker if you use the quotes. The problem is that once it ends up inside discourse.conf, it’s not quoted there - and then # is interpreted as beginning of the comment for that line.