Can email server settings be made configurable for easy modification?

סיכום מבוסס בינה מלאכותית

singi2016cn 提出了一个紧急场景:邮件服务商突然禁用账号,但 Discourse 的 SMTP 配置目前固定在 app.yaml 文件中。修改配置需要重新构建应用,这会导致几分钟的停机时间,在白天业务高峰期是不可接受的,且期间积压的失败邮件通知令人焦虑。用户询问是否可以将邮件服务器设置改为可随时在线修改的配置。

itsbhanusharma 建议,如果在 yml 文件中注释掉或移除环境变量(如 DISCOURSE_SMTP_ADDRESS 等),这些设置通常会暴露在管理后台 UI 中,从而允许在线修改。

然而,singi2016cn 尝试了该方法并附上了截图,反馈说即使注释掉相关配置,管理后台的设置页面中仍然没有出现可供填写的 SMTP 字段,导致无法通过界面进行配置。

针对这一情况,itsbhanusharma 建议用户在设置菜单的搜索框中搜索 “SMTP”,指出相关选项可能位于其他菜单页面,或者由于版本更新,界面布局可能发生了变化。

I recently ran into a situation where my email service provider suddenly disabled my account, forcing me to switch to a different provider. I can’t change the email server configuration on the fly; instead, I have to modify the app.yaml configuration and rebuild, which causes the website to go down for several minutes—unacceptable during daytime hours. Meanwhile, the number of failed email send attempts keeps piling up, which is really frustrating me.

iirc if you don’t add the env variables (or remove them after the fact) from the yml file, the settings are then exposed in the admin ui.

I tried it, but it didn’t work.

  #DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org
  #DISCOURSE_SMTP_USER_NAME: forums@xxx.com
  #DISCOURSE_SMTP_PASSWORD: xxx
  #DISCOURSE_SMTP_PORT: 587
  #DISCOURSE_NOTIFICATION_EMAIL: noreply@xxx.com
  #DISCOURSE_SMTP_DOMAIN: forums.xxx.com

After commenting out the configuration above, the admin panel displays the following:


I don’t see anywhere that can be filled in automatically.

Can you use the search box in settings menu to search for “SMTP” maybe those are placed on a different menu page, or maybe something has changed.