# Gmail mails not received - TLS handshake error

**URL:** <https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373>\
**Category:** Community Support\
**Created:** [October 28, 2026, 4:52pm UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373 "2026-10-28T16:52:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 28, 2026, 4:52pm UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/1 "2026-10-28T16:52:16Z")

</div>

Subject: Gmail mails not received - TLS handshake error

Hello,

After manually renewing/replacing Let’s Encrypt certificates, emails sent from Gmail are no longer delivered.

Current status:

- Outgoing mail works

- Mail from Microsoft/Outlook and other providers is received correctly

- Only Gmail delivery fails

- MX records are correct

- SSL certificates are valid

- Exim and Dovecot are running normally

Exim logs show:

TLS error on connection from mail-\*.google.com

(gnutls\_handshake): (unknown error code)

Has anyone seen Gmail-specific TLS handshake failures with Exim on HestiaCP after certificate renewal?

Any suggestions would be appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 28, 2026, 4:58pm UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/2 "2026-10-28T16:58:46Z")

</div>

Hi,

What’s the affected domain name?

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 7:33am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/3 "2026-10-29T07:33:41Z")

</div>

> **[Coming Soon](https://omargaiani.com/)**

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 8:54am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/4 "2026-10-29T08:54:48Z")

</div>

The MX record of your domain points to `mail.omargaiani.com`, and this is correct. But when connecting to Exim or Dovecot using TLS, the certificate only shows `omargaiani.com` domain as the only domain covered by that certificate, when the certificate must cover domains `webmail.omargaiani.com` and `mail.omargaiani.com`.

How did you add the mail domain to Hestia? How did you issued the certificate for the mail domain?

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 9:07am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/5 "2026-10-29T09:07:43Z")

</div>

On October 27, I had a problem with the automatic SSL certificate renewal on my HestiaCP server. After that, I manually reinstalled the certificates using commands suggested by Copilot.

Could I have accidentally changed or misconfigured something related to the mail services, DNS records, Exim, Dovecot, or the SSL configuration?

Since then, I have noticed issues with email delivery to Gmail, and some sent messages do not appear in the Sent folder. I am wondering whether the manual certificate renewal process may have altered any configuration files or settings that could affect email delivery or authentication.

Any suggestions on what logs, configuration files, or settings I should check would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 9:24am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/6 "2026-10-29T09:24:47Z")

</div>

> [@omar](#):
>
> I manually reinstalled the certificates using commands suggested by Copilot.

Bad move.

> [@omar](#):
>
> Could I have accidentally changed or misconfigured something related to the mail services, DNS records, Exim, Dovecot, or the SSL configuration?

Yes, but I need the exact commands/steps you followed to know what’s happening.

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 10:08am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/7 "2026-10-29T10:08:49Z")

</div>

![immagine](https://forum.hestiacp.com/uploads/default/original/2X/c/cec10e96b046f0890afd1fb05ef25ecd154b900e.png)

Initially, I believe I only had **[mail.omargaiani.com](http://mail.omargaiani.com)** configured. Later, I followed some commands suggested by Copilot, and since then I no longer have the previous configuration. The issue may have started after those changes.

```auto
I could revert the machine to a backup from before the certificate renewal, but I’m not sure if that might cause any issues

```

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 10:30am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/8 "2026-10-29T10:30:10Z")

</div>

Remove that web domain `mail.omargaiani.com`, you don’t need it, Hestia already uses it when adding the mail domain.

I still don’t know what you did but you should disable ssl for the mail domain `omargaiani.com` and add it again.

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:20am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/9 "2026-10-29T11:20:11Z")

</div>

```auto
But I do it on web access the hestia via admin and for certificates—how do I renew them later?

```

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 11:21am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/10 "2026-10-29T11:21:23Z")

</div>

Yes, do it from Web UI and certificates will be renewed automatically.

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:23am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/11 "2026-10-29T11:23:35Z")

</div>

i have done and then

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 11:32am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/12 "2026-10-29T11:32:55Z")

</div>

I don’t see a new certificate for your mail domain. Did you disabled it and enabled it again to obtain a new certificate? Did you modify any conf file manually?

Show me the output of these commands :

```t
v-list-web-domain userhestia omargaiani.com json
v-list-web-domain userhestia mail.omargaiani.com json
v-list-mail-domain userhestia omargaiani.com json
v-list-mail-domain userhestia mail.omargaiani.com json
openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/omargaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E 's/^\s+//g'
cat /etc/dovecot/conf.d/domains/omargaiani.com.conf

```

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:34am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/13 "2026-10-29T11:34:31Z")

</div>

> [@sahsanu](#):
>
> ```auto
> v-list-web-domain userhestia omargaiani.com json
> v-list-web-domain userhestia mail.omargaiani.com json
> v-list-mail-domain userhestia omargaiani.com json
> v-list-mail-domain userhestia mail.omargaiani.com json
> openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/omargaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E 's/^\s+//g'
> cat /etc/dovecot/conf.d/domains/omargaiani.com.conf
> 
> ```

Web console: [https://hcp.omargaiani.com:9090/](https://hcp.omargaiani.com:9090/) or [https://10.0.10.141:9090/](https://10.0.10.141:9090/)

Last login: Thu Oct 29 09:28:23 2026 from 188.152.5.125  
ubuntu@hcp:~$ sudo su  
root@hcp:/home/ubuntu# ^[[200~v-list-web-domain userhestia [omargaiani.com](http://omargaiani.com) json  
v-list-web-domain userhestia [mail.omargaiani.com](http://mail.omargaiani.com) json  
v-list-mail-domain userhestia [omargaiani.com](http://omargaiani.com) json  
v-list-mail-domain userhestia [mail.omargaiani.com](http://mail.omargaiani.com) json  
openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/omargaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E ‘s/^\s+//g’  
cat /etc/dovecot/conf.d/domains/omargaiani.com.conf^[[201~v-list-web-domain: com mand not found  
root@hcp:/home/ubuntu# v-list-web-domain userhestia [mail.omargaiani.com](http://mail.omargaiani.com) json  
v-list-web-domain: command not found  
root@hcp:/home/ubuntu# v-list-mail-domain userhestia [omargaiani.com](http://omargaiani.com) json  
v-list-mail-domain: command not found  
root@hcp:/home/ubuntu# v-list-mail-domain userhestia [mail.omargaiani.com](http://mail.omargaiani.com) json  
v-list-mail-domain: command not found  
root@hcp:/home/ubuntu# openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/om argaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E ‘s/^\s+//g’  
notBefore=Oct 27 06:43:32 2026 GMT  
notAfter=Jan 25 06:43:31 2027 GMT  
subject=CN = [mail.omargaiani.com](http://mail.omargaiani.com)  
X509v3 Subject Alternative Name:  
DNS:mail.omargaiani.com  
root@hcp:/home/ubuntu# cat /etc/dovecot/conf.d/domains/omargaiani.com.conf~

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 11:40am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/14 "2026-10-29T11:40:36Z")

</div>

> [@omar](#):
>
> ubuntu@hcp:~$ sudo su

Instead of `sudo su` use `sudo -i` and execute the commands again.

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:42am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/15 "2026-10-29T11:42:39Z")

</div>

```auto
ubuntu@hcp:~$ sudo -i
root@hcp:~# v-list-web-domain userhestia omargaiani.com json
v-list-web-domain userhestia mail.omargaiani.com json
v-list-mail-domain userhestia omargaiani.com json
v-list-mail-domain userhestia mail.omargaiani.com json
openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/omargaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E 's/^\s+//g'
cat /etc/dovecot/conf.d/domains/omargaiani.com.conf
{
    "omargaiani.com": {
        "IP": "10.0.10.141",
        "IP6": "",
        "DOCUMENT_ROOT": "/home/userhestia/web/omargaiani.com/public_html/",
        "U_DISK": "1",
        "U_BANDWIDTH": "36",
        "TPL": "default",
        "ALIAS": "www.omargaiani.com",
        "STATS": "",
        "STATS_USER": "",
        "SSL": "yes",
        "SSL_FORCE": "yes",
        "SSL_HSTS": "yes",
        "SSL_HOME": "same",
        "LETSENCRYPT": "yes",
        "FTP_USER": "",
        "FTP_PATH": "",
        "AUTH_USER": "",
        "BACKEND": "PHP-8_1",
        "PROXY": "default",
        "PROXY_EXT": "jpeg,jpg,png,gif,bmp,ico,svg,tif,tiff,css,js,htm,html,ttf,otf,webp,woff,txt,csv,rtf,doc,docx,xls,xlsx,ppt,pptx,odf,odp,ods,odt,pdf,psd,ai,eot,eps,ps,zip,tar,tgz,gz,rar,bz2,7z,aac,m4a,mp3,mp4,ogg,wav,wma,3gp,avi,flv,m4v,mkv,mov,mpeg,mpg,wmv,exe,iso,dmg,swf",
        "FASTCGI_CACHE": "no",
        "FASTCGI_DURATION": "0s",
        "REDIRECT": "",
        "REDIRECT_CODE": "",
        "CUSTOM_DOCROOT": "",
        "SUSPENDED": "no",
        "TIME": "19:28:40",
        "DATE": "2022-12-16"
    }
}
Error: web domain mail.omargaiani.com doesn't exist
{
    "omargaiani.com": {
        "ANTIVIRUS": "yes",
        "ANTISPAM": "yes",
        "DKIM": "yes",
        "CATCHALL": "",
        "ACCOUNTS": "2",
        "RATE_LIMIT": "",
        "REJECT": "yes",
        "U_DISK": "646",
        "SSL": "yes",
        "LETSENCRYPT": "yes",
        "SUSPENDED": "no",
        "TIME": "19:32:44",
        "DATE": "2022-12-16",
        "WEBMAIL_ALIAS": "webmail.omargaiani.com",
        "WEBMAIL":"roundcube",
        "U_SMTP_RELAY":"",
        "U_SMTP_RELAY_HOST":"",
        "U_SMTP_RELAY_PORT":"",
        "U_SMTP_RELAY_USERNAME":""
        }
}
Error: mail domain mail.omargaiani.com doesn't exist
notBefore=Oct 27 06:43:32 2026 GMT
notAfter=Jan 25 06:43:31 2027 GMT
subject=CN = mail.omargaiani.com
X509v3 Subject Alternative Name:
DNS:mail.omargaiani.com

local_name mail.omargaiani.com {
  ssl_cert = </home/userhestia/conf/mail/omargaiani.com/ssl/omargaiani.com.pem
  ssl_key = </home/userhestia/conf/mail/omargaiani.com/ssl/omargaiani.com.key
}
root@hcp:~#

```

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:47am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/16 "2026-10-29T11:47:25Z")

</div>

Surely some command sent by the artificial intelligence messed up the certificates and EXIM

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:49am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/17 "2026-10-29T11:49:27Z")

</div>

i’m going to go eat; thanks for everything, anyway. We’ll talk later

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 11:50am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/18 "2026-10-29T11:50:18Z")

</div>

Ok, remove ssl and add it again:

```t
v-delete-mail-domain-ssl userhestia omargaiani.com

```

If no error:

```t
v-add-letsencrypt-domain userhestia omargaiani.com '' yes

```

Once finished, show again the output of this command:

```t
openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/omargaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E 's/^\s+//g'

```

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [October 29, 2026, 11:53am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/19 "2026-10-29T11:53:56Z")

</div>

root@hcp:~# v-delete-mail-domain-ssl userhestia [omargaiani.com](http://omargaiani.com)  
root@hcp:~# v-add-letsencrypt-domain userhestia [omargaiani.com](http://omargaiani.com) ‘’ yes  
root@hcp:~# openssl x509 -in /etc/exim4/domains/omargaiani.com/ssl/omargaiani.com.crt -noout -dates -subject -ext subjectAltName | sed -E ‘s/^\s+//g’  
notBefore=Oct 29 10:54:51 2026 GMT  
notAfter=Jan 27 10:54:50 2027 GMT  
subject=CN = [mail.omargaiani.com](http://mail.omargaiani.com)  
X509v3 Subject Alternative Name:  
DNS:mail.omargaiani.com, DNS:webmail.omargaiani.com  
root@hcp:~#

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [October 29, 2026, 11:55am UTC](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373/20 "2026-10-29T11:55:47Z")

</div>

Ok, now it should work fine. Test it again.

[Next page](https://forum.hestiacp.com/t/gmail-mails-not-received-tls-handshake-error/22373.md?page=2)
