Redmine - 发送邮件的docker版本问题
Posted
技术标签:
【中文标题】Redmine - 发送邮件的docker版本问题【英文标题】:Redmine - docker version problem with sending mail 【发布时间】:2021-11-30 01:57:15 【问题描述】:我的 docker istance of redmine 有问题。 对于电子邮件发件人来说,一切正常。
我创建了一个新的 configuration.yml:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
ssl: true
address: example@mydomain.com
port: 465
authentication: :plain
domain: 'mydomain.com'
user_name: 'example@mydomain.comt'
password: 'password'
但我无法发送电子邮件,在日志中我可以看到此错误:
I, [2021-10-11T11:23:49.199903 #1] INFO -- : Rendered issues/_action_menu.html.erb (4.7ms)
I, [2021-10-11T11:23:49.216825 #1] INFO -- : Rendering mailer/issue_edit.text.erb within layouts/mailer
I, [2021-10-11T11:23:49.219989 #1] INFO -- : Rendered issue_relations/_form.html.erb (0.9ms)
I, [2021-10-11T11:23:49.220134 #1] INFO -- : Rendered issues/_relations.html.erb (1.3ms)
I, [2021-10-11T11:23:49.226888 #1] INFO -- : Rendered issues/tabs/_history.html.erb (6.2ms)
I, [2021-10-11T11:23:49.226962 #1] INFO -- : Rendered common/_tabs.html.erb (6.7ms)
I, [2021-10-11T11:23:49.228740 #1] INFO -- : Rendered issues/_action_menu.html.erb (1.6ms)
I, [2021-10-11T11:23:49.237345 #1] INFO -- : Rendered issues/_trackers_description.html.erb (0.3ms)
I, [2021-10-11T11:23:49.243580 #1] INFO -- : Rendered mailer/_issue.text.erb (26.3ms)
I, [2021-10-11T11:23:49.243686 #1] INFO -- : Rendered mailer/issue_edit.text.erb within layouts/mailer (26.8ms)
I, [2021-10-11T11:23:49.244331 #1] INFO -- : Rendering mailer/issue_edit.html.erb within layouts/mailer
I, [2021-10-11T11:23:49.251245 #1] INFO -- : Rendered mailer/_issue.html.erb (2.3ms)
I, [2021-10-11T11:23:49.251366 #1] INFO -- : Rendered mailer/issue_edit.html.erb within layouts/mailer (6.9ms)
E, [2021-10-11T11:23:49.263689 #1] ERROR -- : Email delivery error: getaddrinfo: Name or service not known
I, [2021-10-11T11:23:49.263774 #1] INFO -- : Performed ActionMailer::DeliveryJob (Job ID: bafe66f3-6335-4c9b-9fab-f9257c808360) from Async(mailers) in 65.5ms
I, [2021-10-11T11:23:49.276232 #1] INFO -- : Rendered issues/_form_custom_fields.html.erb (0.1ms)
I, [2021-10-11T11:23:49.276484 #1] INFO -- : Rendered issues/_attributes.html.erb (38.1ms)
I, [2021-10-11T11:23:49.277168 #1] INFO -- : Rendered issues/_form.html.erb (48.0ms)
I, [2021-10-11T11:23:49.286616 #1] INFO -- : Rendered attachments/_form.html.erb (1.5ms)
I, [2021-10-11T11:23:49.288190 #1] INFO -- : Rendered issues/_edit.html.erb (59.3ms)
I, [2021-10-11T11:23:49.288238 #1] INFO -- : Rendered issues/_action_menu_edit.html.erb (61.2ms)
I, [2021-10-11T11:23:49.292637 #1] INFO -- : Rendered issues/_sidebar.html.erb (2.7ms)
I, [2021-10-11T11:23:49.295925 #1] INFO -- : Rendered watchers/_watchers.html.erb (3.2ms)
I, [2021-10-11T11:23:49.296376 #1] INFO -- : Rendered issues/show.html.erb within layouts/base (101.3ms)
我不明白是什么问题
Docker 版本 20.10.7,构建 20.10.7-0ubuntu1~20.04.2 Redmine 4.2.2.stable 图片最新稳定
谢谢大家
【问题讨论】:
为什么会和你的 Docker 版本有关?容器日志来自图像的入口点。 【参考方案1】:configuration.yml
中的 address
字段必须包含 Redmine 将邮件发送到的服务器主机名,以便进一步投递,例如smtp.example.com
.
但它不包含发件人的电子邮件地址。此电子邮件地址是从 Redmine 内部的 Administration -> Settings 配置的。
还请确保遵循您的 YAML 文件的正确缩进,因为前导空格在 YAML 中在语义上很重要。一些例子可以在https://www.redmine.org/projects/redmine/wiki/emailconfiguration找到。
【讨论】:
天哪,你说得对!!是我的错……非常感谢……(我不是瞎子,只是傻XD) 我的回答帮你解决了你的问题,你可以考虑accepting it。 好伙伴,谢谢以上是关于Redmine - 发送邮件的docker版本问题的主要内容,如果未能解决你的问题,请参考以下文章