# starttls 또는 인증서 검증을 비활성화해도 더 이상 작동하지 않음

**URL:** https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148
**Category:** Bug
**Created:** [5월 26, 2022, 6:54오전 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148 "2022-05-26T06:54:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [5월 26, 2022, 6:54오전 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148/1 "2022-05-26T06:54:34Z")

</div>

#Support 채널에 이 문제에 대한 게시글이 많이 올라와 있다가, 이제 원인을 찾은 것 같아서 실제 문제만 설명한 이 게시글을 #Contribute > Bug 토픽으로 만들어 보는 것이 좋겠다고 생각했습니다. 관련 링크: [Email Hostname Certificate Mismatch Causing sidekiq Queue Overload, Severe Site Instability - #47 by RGJ](https://meta.discourse.org/t/email-hostname-certificate-mismatch-causing-sidekiq-queue-overload-severe-site-instability/225778/47)

간단히 요약하면 다음과 같습니다:

2.9.0 beta 4 버전부터 `DISCOURSE_SMTP_OPENSSL_VERIFY_MODE`와 `DISCOURSE_SMTP_ENABLE_START_TLS` 설정이 더 이상 올바르게 작동하지 않습니다.

이 문제는 Rails 7로의 전환과 관련이 있으며, 이 과정에서 net-smtp가 0.1.0에서 0.3.1로 업데이트되어 이 두 연결 파라미터의 기본값이 변경되었기 때문입니다.

`smtp` 지엠이 `net-smtp`를 호출하는 방식은 `enable_starttls_auto`와 `openssl_verify_mode`를 비활성화하지 않으며, 활성화된 경우에만 활성화할 뿐입니다.

`smtp` 지엠에 대한 관련 보고: [SMTP: allow disabling starttls\_auto since it's now true by default in Ruby 3 - Pull Request #1435#issuecomment-1044852765 - mikel/mail - GitHub](https://github.com/mikel/mail/pull/1435#issuecomment-1044852765)

기술적으로 이 버그는 `smtp` 지엠에서 발생하기 때문에 Discourse 코드 외부에 해당하지만, 해당 지엠이 현재 Discourse를 위해 포크되어 있으므로 #Contribute > Bug 토픽을 만드는 것이 적절하다고 생각합니다. 쉽게 수정할 수 없다면, 이 파라미터들을 문서에서 제거하고 비추천(deprecation) 경고를 표시하여 적어도 혼란을 없앨 수 있을 것입니다.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [5월 26, 2022, 12:56오후 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148/2 "2022-05-26T12:56:31Z")

</div>

버그 리포트 크로스 링크:

> [@Sidekiq 재시도 오류](https://meta.discourse.org/t/retry-error-in-sidekiq/224706):
>
> This is the first time I’m seeing this error after the recent upgrade to 2.9.0beta4 Jobs::UserEmail {“type”=\>“user\_watching\_first\_post”, “user\_id”=\>1735, “notification\_id”=\>33246, “notification\_data\_hash”=\>{“topic\_title”=\>“Some new notes”, “original\_post\_id”=\>11592, “original\_post\_type”=\>1, “original\_username”=\>“xfactor”, “revision\_number”=\>nil, “display\_username”=\>“xfactor”}, “notification\_type”=\>“watching\_first\_post”, “post\_id”=\>11592, “current\_site\_id”=\>“default”} Jobs::HandledExcepti…

---

<div class="post-metadata">

### Author: ![loic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loic/32/105621_2.png) [@loic](https://meta.discourse.org/u/loic)
#### Post date: [6월 8, 2022, 9:48오전 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148/3 "2022-06-08T09:48:47Z")

</div>

이 PR은 올바른 동작을 복원해야 합니다(아직 병합되지 않음):

> <https://github.com/discourse/discourse/pull/17024>
>
> Following the Rails 7 upgrade, the \`DISCOURSE\_SMTP\_ENABLE\_START\_TLS\` setting doe…sn’t work anymore. This is because Rails upgraded the \`net-smtp\` gem to the 0.3.1 version which enables \`starttls\` by default.
> The \`mail\` gem doesn’t support this new behavior yet and doesn’t know how to disable TLS. This should be fixed in an upcoming release.
> 
> Meanwhile applying this patch allows us to get back the previous behavior which is expected by many.

---

<div class="post-metadata">

### Author: ![loic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loic/32/105621_2.png) [@loic](https://meta.discourse.org/u/loic)
#### Post date: [6월 8, 2022, 3:28오후 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148/4 "2022-06-08T15:28:20Z")

</div>

PR이 오늘早些에 병합되었으므로, `tests-passed` 브랜치를 사용하면 이전처럼 TLS를 비활성화할 수 있습니다 :slight_smile:

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [6월 14, 2022, 3:15오후 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148/5 "2022-06-14T15:15:48Z")

</div>

11개의 게시글이 새로운 주제로 분리되었습니다: [이메일 작동 안 함 (포트 465)](https://meta.discourse.org/t/email-not-working-port-465/229934)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [7월 9, 2022, 2:39오후 UTC](https://meta.discourse.org/t/disabling-starttls-or-certificate-verification-does-not-work-any-more/228148/6 "2022-07-09T14:39:29Z")

</div>

이 주제는 7시간 후 자동으로 닫혔습니다. 더 이상 새 답변을 작성할 수 없습니다.
