# IMAP mailbox does not connect - UNSUPPORTED_PROTOCOL
# Symptoms

When configuring the receiving server while connecting the email channel via IMAP, the following error occurs:

```txt
[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1017) and [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1017)
```

The variables `IMAP_SSL_CUSTOM_CONTEXT=true` and `IMAP_SSL_CUSTOM_CIFERS=DEFAULT` have already been added.

Mail server: MS Exchange

# Solution

On the mail server, you need to either allow login connection without encryption or use classic SSL/TLS and try connecting on the port where they are configured.

Alternatively, instead of a simple IMAP connection, you can configure [SMTP transfer](https://support.swarmica.com/article/en/1624-kak-nastroit-smtp-kanal-dlya-pochty-v-swarmica.html)

# Cause

Swarmica uses a standard library for connecting via classic TLS/SSL. Therefore, it is recommended to use either standard types of connection via these protocols or connect without encryption. All these settings are on the side of the mail server.