Gitlab_email_from not working

I would like to setup gitlab so that it sends emails from gitlab_email_from = “gitlab@example.com”. The gitlab site itself is available under external_url=“https://gitlab.example.com”. (of course these are not real domain names, but demonsrates the setup).

In other words, gitlab_email_from and external_url parameters should be under two different domains. The problem I’m facing is that it does not seem to be working. I have changed gitlab_email_from to “gitlab@example.com”, external_url to “https://gitlab.example.com” and also git_user_email to “gitlab@example.com”, and then restarted gitlab with “gitlab-ctl restart”. But it has no effect. No matter what I do, the sender address is always calculated from user name + external_url. In the end, gitlab will send out email with this from address: “gitlab@gitlab.example.com” instead of “gitlab@example.com”.

Gitlab version is 10.1.0.

Is this a bug? What am I missing?