./discourse-setup mette il nome utente SMTP all'inizio della password SMTP

Yeah. That’s the issue. There are multiple levels of escaping that need to happen, like when bash reads the value, when bash hands the value to sed, when sed replaces it, and then, maybe, when the yml file gets it. It’s a known issue:

I recategorized this as Support.