# 邮件接收器设置

**URL:** https://meta.discourse.org/t/mail-receiver-setup/307590
**Category:** Self-hosting
**Tags:** mail-receiver
**Created:** [2024年五月10日 20:38 UTC](https://meta.discourse.org/t/mail-receiver-setup/307590 "2024-05-10T20:38:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Architect](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/architect/32/520575_2.png) [@Architect](https://meta.discourse.org/u/Architect)
#### Post date: [2024年五月10日 20:38 UTC](https://meta.discourse.org/t/mail-receiver-setup/307590/1 "2024-05-10T20:38:26Z")

</div>

邮件接收器重建失败，日志：

```plaintext
:/var/discourse# /var/discourse/launcher rebuild mail-receiver
检测到 x86_64 架构。
正在确保 launcher 是最新的
Launcher 是最新的
正在停止旧容器
+ /usr/bin/docker stop -t 600 mail-receiver
mail-receiver
2.0.20240502-0021: 从 discourse/base 拉取
摘要：sha256:ca10543693caa0b52f7318105dea1d47a84991e7927330db1010e13e39777ba7
状态：镜像已是最新版 discourse/base:2.0.20240502-0021
docker.io/discourse/base:2.0.20240502-0021
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-05-10T20:33:37.287835 #1] INFO -- : 从 stdin 读取
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/merge_command.rb:50:in `merge': 无法隐式转换 String 为 Hash (TypeError)

      first.merge(second, &merger)
                  ^^^^^^^^^^^^^^^
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/merge_command.rb:50:in `deep_merge'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/cli.rb:61:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/cli.rb:57:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/cli.rb:57:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/bin/pups:9:in `<top (required)>'
        from /usr/local/bin/pups:25:in `load'
        from /usr/local/bin/pups:25:in `<main>'
引导失败，退出代码 1
**引导失败**

```

不知道是什么原因导致此失败？

也许是这个：`无法隐式转换 String 为 Hash (TypeError)`

---

<div class="post-metadata">

### Author: ![Architect](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/architect/32/520575_2.png) [@Architect](https://meta.discourse.org/u/Architect)
#### Post date: [2024年五月10日 22:51 UTC](https://meta.discourse.org/t/mail-receiver-setup/307590/2 "2024-05-10T22:51:27Z")

</div>

重建现在已经成功了，但邮件接收还没有成功。

YAML 设置正确，域名也已配置，但即使重建邮件接收器，它仍然显示基础 URL 为“[discourse.example.com](http://discourse.example.com)”，而不是指定的域名，这似乎是个问题。

希望能够弄清楚如何让它工作，如果有人对可能存在的问题有任何想法，将不胜感激，希望能得到关于如何解决这个问题的建议。

出现了一个错误：`ERROR: Can't find Ruby library file or shared library pups`

已经按照指南中的步骤进行操作：[为自托管站点配置 Mail-Receiver 的直接投递入站电子邮件 - 文档 / sysadmin - Discourse Meta](https://meta.discourse.org/t/configure-direct-delivery-incoming-email-for-self-hosted-sites-with-mail-receiver/49487)

编辑：在另一次重建后，正确的记录已更新， **邮件接收工作正常** ！！！！

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2024年六月9日 22:51 UTC](https://meta.discourse.org/t/mail-receiver-setup/307590/3 "2024-06-09T22:51:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
