Skip to main content

Connection - IMAP4​

The IMAP4 Connection stores the address, sign-in and security settings that the Email - Get Messages, Email - Get Single Message, Email - Get Headers, Email - Delete Messages, Email - Delete Single Message and Email - Move Messages Tasks and the Email Trigger use to connect to a mail server over Internet Message Access Protocol (IMAP4).

Common settings​

IMAP4 Connection, Common settings tab with the Protocol and Information groups

The Common settings and Proxy tabs are the same for every Connection type that has them; see Common settings and Proxy.

Test

The Server connects to the mail server and logs on with the settings of this Connection, then disconnects. No email is read or changed.

Main settings​

These fields are on Connection settings -> Main settings.

The Connection settings tab holds three tabs: Main settings, Encryption and Proxy.

IMAP4 Connection, Main settings tab with the Server and Credentials groups

Address

The DNS name or IP address of the IMAP4 server. Required.

Port

The port of the IMAP4 server. A new Connection opens with "21" in Port. Change it to the port of the mail server: usually "993" with "SSL", or "143" with "TLS" or without encryption. Port "993" expects encryption from the start, so use it with "SSL". Port cannot be "0".

Authentication type

  • "Default": a user name and password
  • "OAuth": Google OAuth only, for Gmail and Google Workspace accounts; it does not work with other mail services

Anonymous

Shown only with "Default". When selected, Username and Password are unavailable. The Server does not use Anonymous when it reads email, and always logs on with Username and Password, so leave it cleared. Anonymous access to a shared mailbox is not supported in IMAP4.

Username

The user name of the email account. Required unless Anonymous is selected. With "OAuth", this field is labeled Application Id and holds the client ID of your Google OAuth client.

Password

The password of the email account. With "OAuth", this field is labeled Client secret and holds the client secret of your Google OAuth client.

Setup app

Shown with "OAuth". Opens the Google API Console in the web browser, where you create the OAuth client.

Authenticate

Shown with "OAuth". Opens the Google sign-in page in the web browser. When sign-in succeeds, the authorization is saved in the Connection, and the Server reads email as the Google account that signed in.

App settings

Shown with "OAuth". Of the fields in this group, only Redirect Url is used with Google. Tenant Id, Tenant Primary Domain, Tenant Name and Auto-accept server certificates are not used.

Redirect Url is the address that receives the reply from Google after sign-in, on the computer that runs the Client. It is required for Authenticate. Enter a local address such as "http://localhost:9999", and add the same address as an authorized redirect URI in the Google OAuth client.

With "OAuth", the Server connects to Address with an encrypted connection. It does not use Port or the settings on the Encryption tab.

To set up "OAuth", complete the following steps:

  1. In Authentication type, select "OAuth".
  2. Click Setup app. The Google API Console opens.
  3. In the Google API Console, create an OAuth client ID.
  4. Add the address that you will enter in Redirect Url as an authorized redirect URI of the OAuth client.
  5. Enter the client ID in Application Id.
  6. Enter the client secret in Client secret.
  7. Enter the redirect address in Redirect Url.
  8. Click Authenticate.
  9. In the web browser, sign in with the Google account of the mailbox.
  10. Allow access.
  11. Click OK.

The Connection now reads email from that Google account. After you edit and save an IMAP4 Connection that uses "OAuth", click Authenticate again before you use it.

Default settings for some servers​

Office 365

https://support.office.com/en-nz/article/Settings-for-POP-and-IMAP-access-for-Office-365-for-business-or-Microsoft-Exchange-accounts-7fc677eb-2491-4cbc-8153-8e7113525f6c

Main settings

  • Address: outlook.office365.com
  • Port: 993

Encryption

  • Cryptographic protocol: SSL

Gmail

  • Address: imap.gmail.com
  • Port: 993

Encryption

  • Cryptographic protocol: SSL
  • SSL Version: 3

Encryption​

IMAP4 Connection, Encryption tab with the SSL/TLS and Allowed SSL/TLS versions groups

The settings on this tab are used with "Default" authentication. With "OAuth", the mail connection does not use them, but the Email Trigger and Test still set the SSL and TLS versions for the whole Server process from them, as described under Allowed SSL/TLS versions.

Cryptographic protocol

  • "No encryption": the connection is not encrypted; the Allowed SSL/TLS versions group is unavailable
  • "SSL": SSL encryption; selects SSL version 2 and SSL version 3 in Allowed SSL/TLS versions
  • "TLS": TLS encryption; selects TLS version 1 to TLS version 1.3 in Allowed SSL/TLS versions

The email receiving Tasks and the Email Trigger use Cryptographic protocol when they read email. With "SSL", they encrypt the connection from the start. With "TLS", they connect in plain text and then switch to encryption.

Allowed SSL/TLS versions

The available versions are:

  • SSL version 2
  • SSL version 3
  • TLS version 1
  • TLS version 1.1
  • TLS version 1.2
  • TLS version 1.3

The email receiving Tasks do not read these boxes. When the Email Trigger checks the mailbox, and when you click Test, the Server first sets the SSL and TLS versions for the whole Server process from them:

  • "TLS": the selected boxes among TLS version 1, TLS version 1.1 and TLS version 1.2, or all three when none of them is selected; never TLS version 1.3
  • "SSL" with SSL version 3 selected: the system default versions
  • "SSL" with SSL version 3 cleared: SSL version 3 only

With "SSL" and SSL version 3 cleared, the whole Server process is limited to SSL 3, and other Tasks that connect over HTTPS can then fail.

note

Each time you open an existing IMAP4 Connection, the version boxes reset to the defaults of the selected protocol. Check them before you click OK.

Proxy​

IMAP4 Connection, Proxy tab

When the Server reads email, it uses Proxy type, Address and Port and, when Use credentials is selected, Username and Password. It does not use Authentication or Domain.