I have installed Gitlab 8.15 and Exim 4.84 on CentOS 7
Whenever Gitlab sends a message, it should come from 'gitlab@mydomain.nl' which is correctly set in config/gitlab.yml
.
If I look in the log, I see the following:
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
Note that between those 2 lines, the from address changed from gitlab@mydomain.nl
to git@vps.mydomain.nl
which is based on user@FQDN
.
My external SMTP server then does a DKIM and SPF lookup on vps.mydomain.nl
, instead of mydomain.nl
, which fails and the mail is rejected.
I am not sure where this change happens and how I should fix this. Is this something on Gitlab side or something on Exim side?
The relevant parts from my exim configuration:
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