2

Add Exim rewrite configuration option


N
Nickske00

Hi,

I'm currently setting up a gitlab instance and I also wanted to use the service desk option. For this option they recommend to use 'sub addressing' what was easy to activate in exim (because you have .include_if_exists /etc/exim/local_part_suffix.conf in the exim.conf file).

So far so good, but after setting this up you get really ugly email addresses. You end up with something like 'gitlabmail+buggedbrain-testproject1-10-issue-@domain.com'.
My initial idea was to set up a forwarder from project1@domain.com to the ugly email address, but this didn't work because in the email you keep the project1@domain.com in the 'To:' header, it doesn't get replaced so gitlab doesn't know what to do with the email and rejects it.

The solution appears to be address rewriting in exim. In the exim.conf file you have the '#EDIT#47:' section reserved for rewriting. Currently it only states rewriting isn't used and if you need it you can put it there.

Would it be possible to add an include if exists there by default? At the moment I added my own, but when custombuild updates the exim.conf file my change will be lost.

My proposed solution is to add this line:
.include_if_exists /etc/exim/rewrite.rules.conf

That way people who may want to use this can do it by just adding that file and fill it with replace rules. This way everything stays the way it is, but people who need this (like me now) can use it.

A