# IMAP connection over SSL does not work: [SSL: SSLV3_ALERT_HANDSHAKE FAILURE sslv3 alert handshake failure (ssl.c:1017)
# Symptoms

When attempting to configure IMAP with SSL encryption, the connection cannot be verified.
An error is displayed:

```txt
[SSL: SSLV3_ALERT_HANDSHAKE FAILURE sslv3 alert handshake failure (ssl.c:1017)
```

# Solution

Allow connections using less secure SSL ciphers:

1.  Edit the file /root/swarmica/.env so that it contains the following lines:
    ```bash
    IMAP_SSL_CUSTOM_CONTEXT=true
    IMAP_SSL_CUSTOM_CIFERS=DEFAULT
    ```
2.  Restart Swarmica:
    ```bash
    docker compose down
    docker compose up -d
    ```

If the IMAP server uses self-signed certificates, then additional instructions from article [#650: Receiving mail via IMAP with self-signed certificates](https://support.swarmica.com/article/ru/650-poluchenie-pochty-po-imap-s-samopodpisannymi-sertifikatami.html) must be followed.

# Cause

The server uses an outdated version of SSL ciphers, which is disabled by default in Swarmica for better security.