Multisite installation with seperated smtp emails

AI-generated summary

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 매칭으로 추가 지원을 받을 수 있을 것 같아 정말 멋진 기회가 될 거라고 생각합니다. :slight_smile:

감사합니다,
Simon

제안되는 모든 변경 사항을 자세히 설명해 주시겠어요?

안녕하세요 @sam,

실제로는 app.yml에서 다음 환경 변수를 설정하지 않으면:

DISCOURSE_NOTIFICATION_EMAIL

설정 화면에 다음 구성 항목이 표시된다는 걸 방금 깨달았습니다:

이것을 사용하면 제가 원했던 효과를 정확히 얻을 수 있습니다.

이것이 가져올 수 있는 가능성을 열어두고 도와주셔서 감사합니다 @sam :slight_smile:, 하지만 이번에는 PR이 필요 없을 것 같습니다.

최대 / 최적:

  • 멀티사이트 설정에서 사이트별로 모든 SMTP 구성 변수를 오버라이드할 수 있는 기능
    • DISCOURSE_SMTP_ADDRESS
    • DISCOURSE_SMTP_PORT
    • DISCOURSE_SMTP_USER_NAME
    • DISCOURSE_SMTP_PASSWORD
    • DISCOURSE_SMTP_ENABLE_START_TLS
    • DISCOURSE_SMTP_DOMAIN

최소:

  • 사이트별로 다음 SMTP 관련 변수를 오버라이드할 수 있는 기능
    • DISCOURSE_SMTP_USER_NAME
    • DISCOURSE_SMTP_PASSWORD

해당 변수의 config/multisite.yml 파일에서 설정 가능

최소 요구 사항의 배경: 다른 선택지가 없는 경우 하나의 SMTP 서버로 설정하여 운영할 수는 있지만, 분명히 개별 SMTP 사용자(발신자)가 필요합니다. 디스코urs 사이트가 실행되는 도메인과 다른 도메인의 주소에서 메일을 보내는 것은 불행히도 치명적인 문제(deal breaker)로 보입니다.