---
title: "Connect Selectel email service"
sidebar_label: "Connect Selectel email service"
description: "How to connect Selectel email service"
sidebar_position: 1
---

import { CustomTable } from '@selectel/docux/components';
import CopyIcon from '@selectel/docux/icons/copy';
import Formbricks from '@theme/MDXComponents/Formbricks';

# Connect Selectel email service

1. [Create an email resource](#create-mailing-resource).
2. [Create a TXT record](#create-txt-record) to verify domain ownership.
3. [Add a domain to the resource](#add-domain-to-resource).
4. [Create a DKIM record](#create-dkim-record).
5. [Configure a DMARC record](#configure-dmarc-record).
6. [Configure an SPF record](#configure-spf-record).
7. [Configure SMTP sending](#configure-smtp-sending).
8. Optional: [configure spam complaint processing](#configure-processing-of-spam-complaints).

## 1. Create an email resource \{#create-mailing-resource}

1. In the [Control panel](https://my.selectel.ru/ses/), on the top menu, click **Products** and select **Email service**.
2. Click **Create resource**.
3. Enter a resource name. The name does not affect resource settings and is used only in the Control Panel.
4. Click **Create**.

## 2. Create a TXT record \{#create-txt-record}

To add a domain to a resource, you must first verify your ownership of it by creating a TXT record for the domain with the unique resource key. Propagation of the record to caching servers may take up to 72 hours.

1. In the [Control panel](https://my.selectel.ru/ses/), on the top menu, click **Products** and select **Email service**.
2. Open the resource page → **Information** tab.
3. Copy the value in the **Domain ownership verification key** field.
4. Go to the domain registrar panel where your domain's resource records are stored.
5. Create a new resource record for the domain.
6. Specify the record type as TXT.
7. Specify the record name as your domain name, for example `example.com`.
8. Paste the record value, for example `74f878e2-dia4-477a-ccc5-989f428173f9`, that you copied in step 3.

## 3. Add a domain to a resource \{#add-domain-to-resource}

You can add up to three domains to a resource.

1. In the [Control panel](https://my.selectel.ru/ses/), on the top menu, click **Products** and select **Email service**.
2. Open the resource page → **Information** tab.
3. In the **Linked domains** block, click **Add**.
4. Enter the domain name for which you [created a TXT record](#create-txt-record), without specifying a protocol.
5. Click **Add**.

## 4. Create a DKIM record \{#create-dkim-record}

After changes, DNS records may take up to 72 hours to update.

1. Go to the domain registrar panel that manages your domain.

2. Create a new resource record.

3. Specify the record type as TXT.

4. Specify the record name:

   ```sh
   selcloud._domainkey.example.com
   ```

   Here `example.com` is the name of the domain you [added to the resource](#add-domain-to-resource).

5. Specify the record value; you can copy it in the [Control panel](https://my.selectel.ru/ses/): on the top menu, click **Products** → **Email service** → page of the resource the domain is linked to → **Information** tab → domain card → row **DKIM**.

## 5. Configure a DMARC record \{#configure-dmarc-record}

After changes, DNS records may take up to 72 hours to update.

1. Go to the domain registrar panel that manages your domain.

2. If you already have a DMARC record, change the `p` parameter value to `quarantine`, for example:

   ```sh
   v=DMARC1; p=quarantine;
   ```

3. If you do not have a DMARC record, create one:

   * record type — TXT;
   * record name — `_dmarc.example.com`, where `example.com` is the domain name you [added to the resource](#add-domain-to-resource);
   * value — `v=DMARC1; p=quarantine;`.

## 6. Configure an SPF record \{#configure-spf-record}

After changing a DNS record, it may take up to 72 hours for updates to propagate. A domain can have only one SPF record.

1. Go to the domain registrar panel that manages your domain.

2. If you already have an SPF record, add the `include:spf.mail.selcloud.ru` block to it, for example:

   ```sh
   v=spf1 include:spf.mail.selcloud.ru include:domain2.com ?all
   ```

   Where:

   * `include:spf.mail.selcloud.ru` — added block;
   * `include:domain2.com` — an example of the rest of the record content.

3. If you do not have an SPF record, create one:

   * record type — TXT;
   * record name — `example.com`, where `example.com` is your domain name;
   * record value — `v=spf1 include:spf.mail.selcloud.ru ?all`.

## 7. Configure SMTP sending \{#configure-smtp-sending}

You can use any email address on the domain for which you enabled the email service as the sender address.

In the settings of the utility used on your server to send emails, enter the sending details:

* hostname (hostname) — `smtp.mail.selcloud.ru`;

* port (port):

  * port 1126 — if you need to establish a no SSL / STARTTLS connection;
  * port 1127 — if you need to establish a TLS (SSL) connection.

* login (login) and password (password), which you can view in the [Control panel](https://my.selectel.ru/ses/): on the top menu, click **Products** → **Email service** → **Email service** section → page of the resource to which the domain is added → **Information**.

To configure bulk email from a Linux server using the sSMTP utility, refer to the [Configure email sending via sSMTP on Linux](/email-service/configure-send-mail-via-ssmtp.mdx) guide.

Pay attention to [possible errors in the SMTP dialogue](/email-service/smtp-errors.mdx).

## 8. Optional: configure spam complaint processing \{#configure-processing-of-spam-complaints}

You can automatically unsubscribe Mail.ru users who have reported spam. To do this, set up forwarding of spam complaints to fbl@mail.selcloud.ru.

1. Add your domain to Postmaster and verify ownership following the [Adding a domain](https://help.mail.ru/developers/postmaster/add/) instruction in the Mail.ru documentation.
2. Create and specify a separate email that starts with `fbl@`, for example fbl@example.ru, following the [FBL configuration](https://help.mail.ru/developers/notes/fbl/) instruction in the Mail.ru documentation. Reports containing a list of users who complained about spam will be sent to this email address.
3. Configure forwarding of reports from the created email address to the service email address fbl@mail.selcloud.ru following the [How to enable email forwarding](https://help.mail.ru/mail/letters/inbox/forward/) instruction in the Mail.ru documentation.

Complaints from addresses of other email providers, such as Yandex or Gmail, are processed by the Selectel email service without additional configuration.

<Formbricks />
