What sets the domain in the Email Settings?

To rephrase my question to hopefully make it more clear why this is not a “help me troubleshoot my install” issue:

How does Discourse populate the list of settings in the view that I included as a screenshot in the OP? Does it blindly list any setting in the conf file that starts with smtp, or does it have an internal list of valid settings that it will present to the user?

Does it fetch these from the configuration file at application startup every time, or do they get mirrored to the backing DB and then pulled from there after the first run?

Is there any mechanism in the UI to edit these settings (either in the configuration file or in the DB, depending on where they are actually read from at runtime), or do I have to do it by hand?