I followed this post to setup doctor multisites.
but how to configure different smtp email settings for different sites?
The discussion revolves around configuring separate SMTP email settings for different sites in a multisite Discourse installation. suanfazu and 5minpause initially struggled to achieve this, and sam confirmed that multisite installations currently don’t support multiple outgoing SMTP servers.
However, sam expressed willingness to consider a pull request for this feature, suggesting that email settings should be in site settings with the option to be shadowed by globals.
SimonBiggs explored the possibility of funding the implementation of this feature, but later discovered that the desired effect could be achieved by not setting the DISCOURSE_NOTIFICATION_EMAIL environment variable, allowing site-specific email settings to be configured.
silverdr proposed the details of the changes that could be implemented, including the possibility to override all SMTP configuration variables per site or, at a minimum, override the SMTP user name and password per site.
I followed this post to setup doctor multisites.
but how to configure different smtp email settings for different sites?
I tried this as well and couldn’t get the second site to use different settings from the first site.
Perhaps @sam could offer an opinion, if this is a known bug or something else.
We don’t support multiple outgoing SMTP servers in multisite
Thanks for the answer. Is this something you would consider given a pull request? Does it make sense to invest time in?
Sure, if you can pull it off, its pretty complicated, but I would be open to have a PR for it and would kind of prefer if email settings were in site settings as long as they can be shadowed by globals.
Привет, @sam,
Есть ли возможность получить финансирование, если я реализую эту функцию? Мы сейчас рассматриваем возможность получения гранта на MVP от нашего правительства (MVP Ventures 2023-2024 | NSW Government), и любые средства, которые вы предоставите, правительство сможет удвоить в соотношении 1 к 1 — это было бы просто замечательно
.
С наилучшими пожеланиями,
Саймон
Можете ли вы подробно описать все предлагаемые изменения?
Привет @sam,
Я только что осознал, что если я не установлю следующую переменную окружения:
DISCOURSE_NOTIFICATION_EMAIL
в файле app.yml, то в настройках появится следующий элемент конфигурации:
И я могу использовать его для достижения именно того эффекта, который мне нужен.
Спасибо @sam за открытость к этой возможности
, но, похоже, на этот раз PR не понадобится.
Максимальный/лучший вариант:
DISCOURSE_SMTP_ADDRESSDISCOURSE_SMTP_PORTDISCOURSE_SMTP_USER_NAMEDISCOURSE_SMTP_PASSWORDDISCOURSE_SMTP_ENABLE_START_TLSDISCOURSE_SMTP_DOMAINМинимальный вариант:
DISCOURSE_SMTP_USER_NAMEDISCOURSE_SMTP_PASSWORDв соответствующих файлах config/multisite.yml
Контекст для минимального варианта: при отсутствии других вариантов я могу настроить систему для работы с одним SMTP-сервером, но обязательно нужны отдельные SMTP-пользователи (отправители). Отправка писем с адреса, домен которого отличается от домена, на котором работает Discourse, к сожалению, выглядит как непреодолимое препятствие.