Skip to content

Allow local network for custom email SMTP host for self-managed

What does this MR do and why?

Solves Custom email: Allow local network for SMTP host... (#435206 - closed)

This MR aims to allow local network for Service Desk custom email SMTP host for self-managed instances. We originally disallowed local networks to prevent any kind of abuse attempt, but received feedback that customers want to set up the custom email feature on their self-managed instance and connect to a mail server in the local network.

That doesn't necessarily mean the mail server is only accessible via the local network, but that DNS resolves to a local address. We use Gitlab::UrlBlocker.validate! to check the SMTP host address. This tries to resolve the host name and checks for several requirements (e.g. whether it's a private network).

Screenshots or screen recordings

🚫 backend only

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports