Gateway connection

If you need to process corporate emails before they reach your employees' mailboxes, you can use a mail gateway.

Why you might need it

For example, you can use a gateway to connect a third-party anti-spam solution. In addition, you can use this to implement a hybrid mail configuration, that is to place mailboxes of some users on your internal mail server (such as on Exchange) and others in Yandex Mail. In this case, an incoming email first comes to your internal server. If there's a suitable mailbox on it, the email goes into it. If at least one of the recipients of the email is missing on the server, it's forwarded to Yandex Mail.

To do this, you need to forward the email to the gateway and then send it to Yandex Mail:

Note that if the gateway is configured, all emails, including emails between employees, newsletters, and so on, are routed through it.

How to set up a gateway

Tip

This section provides an overview of the basic principle, not a detailed step-by-step instruction. The exact steps will depend on your specific needs and objectives.

If you don't know how to set up mail gateways yet, use the default configuration without a gateway.

  1. Change the MX record of your domain to point to the gateway.

  2. On the gateway side: create a rule for forwarding incoming mail to the DNS record mx.yandex.net.

  3. If necessary, add the gateway address to the whitelist (see the explanation and instructions in the next section).

If a third-party anti-spam solution is running on the gateway

In this case, you need to add a specific header to emails identified as spam. When receiving an email from the gateway with such a header, Yandex Mail will place it in the Spam folder in the user's mailbox.

Set up the gateway to add the header X-Yandex-ExternalGate-Spam: YES to unwanted emails when they are forwarded to Yandex Mail.

Whitelist of incoming email sources

You can add the address of your gateway or some other server to the whitelist. After this, the mail coming from this source won't be checked by Spamoborona. This can be useful in the following cases:

  • You use a third-party service for spam protection and fully trust it.

  • You've configured a hybrid system: some mailboxes are located on your internal mail server, which then forwards the emails it can't process to Yandex Mail.

  • You're booking a simulated phishing attack to test if your employees are ready to resist malicious actors.

Tip

We don't recommend disabling the Spamoborona protection, even if you're confident in your third-party security solution.

How to add an address to the whitelist

You can only add an address to the whitelist via the API.

The whitelist can include select addresses (for example, 77.88.21.249) as well as entire subnets (for example, 77.88.54.0/23 or 2a02:6b8::/32).

To manage the whitelist, use requests from the "Anti-spam" group.

Contact support

Yandex technology designed to combat spam.

The type of DNS record used to determine the mail processing server. When a sender tries to send an email to an address corresponding to a given domain name, the DNS server uses an MX record to determine which server to send the email to.

An API is a special mechanism for managing Yandex 360 services, designed primarily for process automation. There are two ways to work with the API: create a special application (which can be done by a developer) or use the computer's command line. You can find the developer documentation here.