【发布时间】:2016-12-21 21:08:00
【问题描述】:
我在 CentOS 7 上安装了 Gitlab 8.15 和 Exim 4.84
每当 Gitlab 发送消息时,它都应该来自 'gitlab@mydomain.nl',它在 config/gitlab.yml 中正确设置。
如果我查看日志,我会看到以下内容:
2016-12-21 21:50:02 cwd=/ 6 args: /usr/sbin/sendmail -i -f gitlab@mydomain.nl -- mypersonal@gmail.com
2016-12-21 21:50:02 1cJnpq-0001ZR-NG <= git@vps.mydomain.nl U=git P=local S=3859 id=585aeafaad130_175126f0b9c43854@vps.mydomain.nl.mail T="Reset password instructions" from <git@vps.mydomain.nl> for mypersonal@gmail.com
请注意,在这两行之间,发件人地址从 gitlab@mydomain.nl 更改为基于 user@FQDN 的 git@vps.mydomain.nl。
然后,我的外部 SMTP 服务器在 vps.mydomain.nl 而不是 mydomain.nl 上执行 DKIM 和 SPF 查找,查找失败并且邮件被拒绝。
我不确定这个变化发生在哪里以及我应该如何解决这个问题。这是 Gitlab 方面的东西还是 Exim 方面的东西?
我的 exim 配置中的相关部分:
begin routers
mysmtphost_email:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = mysmtphost_relay
route_list = * vps.mysmtphost.email::587
no_more
(...)
begin transports
mysmtphost_relay:
driver = smtp
port = 587
hosts_require_auth = <; $host_address
hosts_require_tls = <; $host_address
【问题讨论】: