[GH-ISSUE #139] Error connecting to IMAP using StartTLS / Port 143 #110

Closed
opened 2026-03-03 01:19:53 +03:00 by kerem · 1 comment
Owner

Originally created by @d99kris on GitHub (May 13, 2023).
Original GitHub issue: https://github.com/d99kris/nmail/issues/139

Originally assigned to: @d99kris on GitHub.

Description:
This issue was highlighted in the nmail telegram group.

nmail is not able to connect to IMAP StartTLS service. Log content:

GnuTLS error: An unexpected TLS packet was received.
2023-05-10 19:46:15.295 | ERROR | mailimap_ssl_connect(m_Imap, m_Host.c_str(), m_Port) = MAILIMAP_ERROR_SSL  (imap.cpp:101)

How to reproduce it:
Configure IMAP port 143 and try connect using STARTTLS. Example for Gandi mail service:

imap_host=mail.gandi.net
imap_port=143

Environment:

  • Version: v4.20
  • OS / distro: Ubuntu 22.04.2 LTS, macOS 13.3.1
Originally created by @d99kris on GitHub (May 13, 2023). Original GitHub issue: https://github.com/d99kris/nmail/issues/139 Originally assigned to: @d99kris on GitHub. **Description**: This issue was highlighted in the [nmail telegram group](https://t.me/nmailusers). `nmail` is not able to connect to IMAP StartTLS service. Log content: ``` GnuTLS error: An unexpected TLS packet was received. 2023-05-10 19:46:15.295 | ERROR | mailimap_ssl_connect(m_Imap, m_Host.c_str(), m_Port) = MAILIMAP_ERROR_SSL (imap.cpp:101) ``` **How to reproduce it**: Configure IMAP port 143 and try connect using STARTTLS. Example for Gandi mail service: ``` imap_host=mail.gandi.net imap_port=143 ``` **Environment**: - Version: v4.20 - OS / distro: Ubuntu 22.04.2 LTS, macOS 13.3.1
kerem 2026-03-03 01:19:53 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@d99kris commented on GitHub (May 13, 2023):

This should be fixed in above commit. Tested OK with Gandi IMAP STARTTLS.

<!-- gh-comment-id:1546517896 --> @d99kris commented on GitHub (May 13, 2023): This should be fixed in above commit. Tested OK with Gandi IMAP STARTTLS.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#110
No description provided.