How to properly forward Service Desk emails within cPanel?

I tried to create a Forwarder to my project’s service desk email but the issues are not created.

I confirmed the emails are indeed leaving my server from the below lines in exim log:

2021-01-04 21:22:29 1kwXJ6-0002Ng-Ny <= someone@gmail.com H=mail-ed1-f50.google.com [209.85.208.50]:39288 P=esmtps X=TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no S=4636 id=op.0wpsarhtcikgk6@win-g T="gitlab test" for info@dev.project.com
2021-01-04 21:23:48 1kwXKN-0002PY-CU <= someone@gmail.com H=mail-ed1-f51.google.com [209.85.208.51]:40070 P=esmtps X=TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no S=4731 id=op.0wpsarhtcikgk6@win-g T="gitlab test 1234" for info@dev.project.com
2021-01-04 21:23:48 1kwXKN-0002PY-CU SMTP connection identification D=dev.project.com O=info@dev.project.com E=incomingorganization-the-repo-name-1245432-issue-@incoming.gitlab.com M=1kwXKN-0002PY-CU U=hostname ID=1002 B=redirect_resolver
2021-01-04 21:23:48 1kwXKN-0002PY-CU SMTP connection outbound 1609795428 1kwXKN-0002PY-CU dev.project.com incoming+organization-the-repo-name-1245432-issue-@incoming.gitlab.com
2021-01-04 21:23:48 1kwXKN-0002PY-CU => incoming+organization-the-repo-name-1245432-issue-@incoming.gitlab.com <info@dev.project.com> R=dkim_lookuphost T=dkim_remote_smtp H=aspmx.l.google.com [74.125.133.27] X=TLS1.2:ECDHE-ECDSA-AES128-GCM-SHA256:128 CV=yes C="250 2.0.0 OK  1609795428 25si402360wmj.97 - gsmtp"

This is relative to the gitlab.com instance of gitlab

Bump, I believe this may be related to the parsing of the email headers in Gitlab.
Soon I will provide a full headers dump of an example email that gets ignored.

1 Like

I have the same problem, if I forward an email from the same server which is forwarding the emails, it’s accepted in gitlab, but not external emails. For example:

I’ve configured my acme.co server to forward all emails sent to support@acme.co to incoming+acme-emails-423422-issue-@incoming.gitlab.com

I suppose gitlab is not accepting emails that had been relayed.

@rhonyx You can try this little hack which might help you: create a gitlab@acme.co account on your server. Create a forward from support@acme.co to gitlab@acme.co
And a forward from gitlab@acme.co to incoming+acme-emails-423422-issue-@incoming.gitlab.com

This way gitlab should accept the relaying of the email.

It worked for me!

What is the email address that ends up in the Gitlab issue with your workaround?

The most ironic part is that Gitlab itself does recommends setting an alias for that email address.
I believe that can be fixed by allowing the users to specify a trusted email relay server.

Still no solution for this issue ?

:roll_eyes: