🧨 IMAP Trigger fails with "Connection closed unexpectedly" on IONOS email – works in Outlook but not in n8n (cloud & VPS)

:firecracker: IMAP Trigger fails with “Connection closed unexpectedly” on IONOS email – works in Outlook but not in n8n (cloud & VPS)

Hey everyone,

I’ve been banging my head against this for hours, and after multiple attempts, I’m turning to the community for help.

:wrench: Setup

I’m trying to use the IMAP Trigger node in n8n to listen for new emails from an IONOS-hosted inbox. These are the connection details:

  • Email: [email protected]
  • IMAP host: imap.ionos.es (also tried imap.1und1.de, which is what Outlook autodetects)
  • Port: 993
  • SSL/TLS: :white_check_mark: Enabled
  • Credentials: correct (tested)
    n8n runs in two environments:
  • :cloud_with_lightning: n8n cloud (official)
  • :laptop: Self-hosted VPS via Docker Compose

:white_check_mark: What I’ve confirmed

  • Works perfectly in Outlook (IMAP) using these same credentials, port, and host.
  • Ports are not blocked on the VPS or by my ISP.
  • I even tested from Windows PowerShell using openssl s_client and can establish the connection manually:
openssl s_client -connect imap.ionos.es:993

So the connection is definitely possible from outside.

:cross_mark: Problem in n8n

When I try to activate the IMAP Trigger node, I consistently get:

“Connection closed unexpectedly”
(in the UI and logs)
This happens in both environments (cloud and VPS). I’ve tried:

  • Recreating the IMAP node from scratch
  • Switching between imap.ionos.es and imap.1und1.de
  • Removing and re-adding credentials
  • Restarting containers, clearing volumes, forcing reconnect
  • Using alternative ports (587, 143 just to test) → rejected by server
    Still always the same result.

:test_tube: Additional clues

  • Outlook says the IMAP connection is SSL/TLS (recommended) over imap.1und1.de:993 — which works.
  • However, n8n can’t maintain or even establish the connection.
  • The same config works on Thunderbird as well. So it’s NOT 2FA, not wrong credentials, not IP block, and not port filtering.

:thread: Related posts checked

I’ve already read through:


:brain: Hypotheses

  1. n8n’s IMAP client library is unable to complete SSL handshake with this specific provider.
  2. The IMAP node internally crashes or mismanages reconnect events and dies silently.
  3. IONOS enforces a specific TLS version that n8n’s library isn’t defaulting to.
  4. There’s a quirk in how n8n handles certificate validation for IONOS — or something incompatible with their STARTTLS/SSL implementation.

:red_question_mark:What I need help with

  • Is this a known issue with imap.ionos.es or 1&1 IMAP in general?
  • Can I force n8n to log the full raw error? Or debug the SSL negotiation?
  • Would it make sense to try setting up a proxy IMAP forwarder to test in-between?
    I’d love any ideas — or if someone has IMAP working with an IONOS email, please share your exact config.
    Thanks in advance :folded_hands:
    Julio

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: [email protected]
  • Database (default: SQLite): Cloud and Sqlite for self hosted
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Even if this doesn’t help you resolve your issues, maybe it will be context to help narrow it. I just tried the IMAP Trigger from n8n cloud to imap.ionos.com (per docs). It worked (authenticated and fetched a test message) using the account/mailbox id (like m111222333-3), and using the associated default email address as a user name.

The issue you have might be limited to accessing the imap.ionos.es domain/servers.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.