새 설치 이메일 작동 안 함: "섀도되어 무시됨"

완전히 새로운 클린 설치 후에도 이메일 기능이 작동하지 않습니다. 여기의 문제 해결 가이드 모든 단계를 따랐습니다.

Zoho 메일을 사용하고 있으며, 메일 설정은 다음과 같이 매우 간단합니다:

 DISCOURSE_SMTP_ADDRESS: smtp.zoho.com
 DISCOURSE_SMTP_PORT: 587
 DISCOURSE_SMTP_USER_NAME: forum@blockchainofthings.com
 DISCOURSE_SMTP_PASSWORD: "redacted"
 DISCOURSE_SMTP_ENABLE_START_TLS: true       # (선택 사항, 기본값 true)
 DISCOURSE_SMTP_DOMAIN: blockchainofthings.com
 DISCOURSE_NOTIFICATION_EMAIL: sys@blockchainofthings.com

커스텀 커맨드 섹션의 주석은 제거했습니다.

- exec: rails r "SiteSetting.notification_email='forum@blockchainofthings.com'"

discourse가 설치된 EC2 인스턴스에서 SMTP 서버로 telnet을 수행하면 문제가 없습니다.

./discourse-doctor를 실행하면 다음과 같은 결과가 나타납니다:

==================== MAIL TEST ====================
강력한 테스트를 위해 http://www.mail-tester.com/에서 주소를 받으세요.
아니면 단순히 자신에게 테스트 메시지를 보내세요.
메일 테스트용 이메일 주소? ('n'을 누르면 건너뜁니다) [sys@blockchainofthings.com]: sue@rightclick.com
sue@rightclick.com으로 메일 전송 중. . . 
smtp.zoho.com:587, 사용자 이름:forum@blockchainofthings.com, 일반 인증을 사용하여 sue@rightclick.com으로 전송 테스트 중.
SMTP 서버 연결 성공.
sue@rightclick.com으로 전송 중. . . 
메일 전송 실패.
end of file reached

로그에는 An attempt was to change notification_email SiteSetting to forum@blockchainofthings.com however it is shadowed so this will be ignored!라는 재미있는 문구가 있습니다. 이것이 문제일 수 있지만, 왜 그런지 또는 어떻게 수정해야 하는지 확실하지 않습니다.

로그의 더 많은 내용은 다음과 같습니다:

An attempt was to change notification_email SiteSetting to forum@blockchainofthings.com however it is shadowed so this will be ignored!
Creating scope :open. Overwriting existing method Poll.open.
Started GET "/privacy" for 18.204.103.32 at 2021-09-15 20:22:27 +0000
Processing by StaticController#show as */*
 Parameters: {"id"=>"privacy"}
 Rendered static/show.html.erb within layouts/crawler (Duration: 7.7ms | Allocations: 963)
 Rendered layout layouts/crawler.html.erb (Duration: 41.8ms | Allocations: 8467)
Completed 200 OK in 114ms (Views: 45.2ms | ActiveRecord: 0.0ms | Allocations: 18560)
Started GET "/privacy" for 18.204.103.32 at 2021-09-15 20:22:27 +0000
Processing by StaticController#show as */*
 Parameters: {"id"=>"privacy"}
 Rendered static/show.html.erb within layouts/crawler (Duration: 5.2ms | Allocations: 931)
 Rendered layout layouts/crawler.html.erb (Duration: 26.5ms | Allocations: 6343)
Completed 200 OK in 59ms (Views: 30.1ms | ActiveRecord: 0.0ms | Allocations: 12955)
 Rendered layouts/email_template.html.erb (Duration: 0.8ms | Allocations: 273)
Delivered mail ac1148f5-a79f-4892-8982-8e6f512a3b04@forum.blockchainofthings.com (1462.1ms)
Job exception: end of file reached

Creating scope :open. Overwriting existing method Poll.open.
 Rendered layouts/email_template.html.erb (Duration: 2.1ms | Allocations: 487)
Delivered mail 5e74a41c-48ee-4e14-b669-091665840076@forum.blockchainofthings.com (544.7ms)

완전히 새로운 설치에서 이 문제를 어떻게 수정해야 하는지 도움이 되시면 감사하겠습니다.

app.yml 파일에서 변경해야 합니다. "shadowed"라는 표현이 바로 그 부분을 가리킵니다.

 DISCOURSE_NOTIFICATION_EMAIL: sys@blockchainofthings.com

Zoho에서 다른 주소 대신 forum@blockchainofthings.com에서 메일을 보내길 원한다면, app.yml 파일(원문에는 app..yml로 오타가 있음)에서 변경해야 합니다. (해당 설정을 위해 재빌드 대신 ./launcher destroy app; ./launcher start app을 실행하면 될 것 같지만, 이제는 완전히 확신하지 못합니다. 컨테이너 내부의 discourse.conf에 해당 설정이 필요할 수도 있고, 그렇다면 재빌드하는 것이 더 쉬울 것입니다. 단, 해당 과정에 대해 잘 알고 있다면の話는 다릅니다.)

end of file reached 메시지가 무엇을 의미하거나 무엇을 나타내는지도 불분명합니다.

Zoho와 트랜잭셔널 이메일(Transactional email)에 대해서는 잘 모르겠습니다. Reliable SMTP Relay & Transactional Email Sending API | Zoho ZeptoMail 을 말씀하시는 건가요? 아니라면, 상당한 고생을 하게 될 가능성이 큽니다. 이 글을 작성하는 동안에 mailgun을 설정해 두면 작동했을 텐데 말이죠.

감사합니다! 아래처럼 변경했더니 완벽하게 작동했습니다.

DISCOURSE_NOTIFICATION_EMAIL: forum@blockchainofthings.com