# DiscourseとStalwart-mailによる完全独立メール

**URL:** <https://meta.discourse.org/t/fully-independent-email-with-discourse-and-stalwart-mail/314490>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [2024 年 7 月 1 日午後 5:41 UTC](https://meta.discourse.org/t/fully-independent-email-with-discourse-and-stalwart-mail/314490 "2024-07-01T17:41:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)\
**Post date:** [2024 年 7 月 1 日午後 5:41 UTC](https://meta.discourse.org/t/fully-independent-email-with-discourse-and-stalwart-mail/314490/1 "2024-07-01T17:41:03Z")

</div>

> **トラブルシューティング**
>
> [Stalwart-mail+Discourse: POP3 EOF reached (again)](https://meta.discourse.org/t/stalwart-mail-discourse-pop3-eof-reached-again/312287/2) からの議論の続きです。
> 
> @programmerjake も Discourse ⇔ Stalwart-mail を調査しているので、SMTPS で TLS エラーが発生しているか確認したいのですが。
> 
> ```plaintext
> 2024-07-01T17:37:49.718793Z DEBUG common::listener: Failed to accept TLS connection: tls handshake eof context="tls" event="error" instance="smtps" protocol=Smtp remote.ip="128.140.68.114"
> 2024-07-01T17:37:49.899171Z DEBUG common::listener: Failed to accept TLS connection: tls handshake eof context="tls" event="error" instance="smtps" protocol=Smtp remote.ip="128.140.68.114"
> 
> ```
> 
> Discourse 側では、エラーポップアップが表示されます。
> 
> `ERROR - Net::ReadTimeout with #<TCPSocket:(closed)>`
> 
> これは Ruby の OpenSSL ライブラリが TLSv1.3 をサポートしていないことに関連しているようですが、TLSv1.2 で動作するはずなので、少し無理があるように思えます。

* * *

## 動作するインストール

### Stalwart-mail \>= [v0.8.3](https://github.com/stalwartlabs/mail-server/releases/tag/v0.8.3)

これで、このリリースにより Stalwart-mail は Discourse とのメールの送受信をサポートするようになりました。🎉

[Stalwart-mail](https://stalw.art/) は、Postfix + Spamassassin + Dovecot + etc. で長年慣れ親しんできた設定の煩雑さなしに、すべてのメールニーズをカバーする単一バイナリのメールサービスです。ここでは、インストールを設定すると、ACME と [LetsEncrypt](https://letsencrypt.org) による完全な TLS 自動化、SPF、DMARC、DKIM、ARC、DANE サポート（ドメインからのレポートおよびドメインへのレポートを含む）を標準で利用でき、TLSA やその他の DNS レコードもすぐに利用できます。簡単なメールクライアント設定のための自動設定と自動検出、共有フォルダ（「グループ」経由）、エイリアス、プロセス内のさまざまな段階でのすべての着信および発信メッセージに対する ManageSieve フィルター、Web 管理、2FA および TOTP サポート、OAUTH など、さらに多くの機能が利用できます。もうメールを外部化する必要はありません！

1. SMTP 用にポート 587 の `submission` リスナーを使用します。
  1. **暗黙的な TLS を無効にする** （つまり、STARTTLS を使用する）
  2. クライアント順序の無視が無効になっていることを確認します（デフォルトまたはリスナーの TLS オプションのオーバーライド）。

2. 暗黙的な TLS を使用してポート 995 の POP3 リスナーを有効にします。

 ![Submission Listener settings](https://global.discourse-cdn.com/meta/original/4X/6/1/4/61452a08efe9181d95025e6895267c5baaf98d8a.png)

### Discourse

通常どおり、Submission（STARTTLS を使用）には 587、POP3s（SSL/TLS を使用）には 995 を使用するようにメールを設定します。

---

_[View the full topic](https://meta.discourse.org/t/fully-independent-email-with-discourse-and-stalwart-mail/314490)._
