kurrier
Configuring Providers

SMTP/IMAP

Setting up SMTP/IMAP

SMTP / IMAP

Kurrier supports connecting to any standard SMTP and IMAP server — letting you send and receive emails through your own mail host.

This option is perfect if you already have an email account with a provider such as Gmail (App Password), Outlook, Zoho, Proton, or a custom domain managed through cPanel or another hosting provider.


1. Overview

When you add an SMTP/IMAP account in Kurrier, two connections are created:

  • SMTP (Simple Mail Transfer Protocol) — used to send emails
  • IMAP (Internet Message Access Protocol) — used to receive and sync incoming emails

You can configure only SMTP (for outbound mail) or both SMTP + IMAP (for full two-way sync).

Accounts, identities, and mailboxes

Kurrier stores the connection, address, and synchronized folders separately:

  • an SMTP/IMAP account contains the encrypted server credentials;
  • an email identity contains the address and display name used by Kurrier;
  • mailboxes are the folders discovered from the IMAP server for that identity.

This separation allows SMTP-only sending accounts, aliases, and advanced multi-identity configurations. The manual Generic SMTP flow therefore creates the account first and lets you create its identity separately under Identities.


2. Adding Your Account

In Kurrier, go to:

Dashboard → Providers → Add Provider → SMTP/IMAP

You’ll see the following fields:

FieldDescriptionExample
Account LabelA friendly name for this connectionWork Email
SMTP HostOutgoing mail server hostnamesmtp.gmail.com
SMTP PortUsually 465 for SSL or 587 for STARTTLS587
SMTP UsernameYour full email address or usernameyou@yourdomain.com
SMTP PasswordApp password or login password********
SMTP SecureChoose TRUE for SSL/TLSTRUE
SMTP PoolOptional — leave FALSE unless you know you need pooled connectionsFALSE
IMAP HostIncoming mail server (optional)imap.gmail.com
IMAP PortUsually 993 for SSL993
IMAP UsernameYour full email address or usernameyou@yourdomain.com
IMAP PasswordPassword or app password********
IMAP SecureChoose TRUE for SSL/TLSTRUE

3. Example Configurations

Gmail (App Password)

⚠️ Requires 2-Step Verification and an App Password

SettingValue
SMTP Hostsmtp.gmail.com
SMTP Port465 (SSL)
SMTP SecureTRUE
IMAP Hostimap.gmail.com
IMAP Port993 (SSL)
IMAP SecureTRUE

Use your Gmail address for both username fields and the 16-character app password for both passwords.


Outlook / Office 365

SettingValue
SMTP Hostsmtp.office365.com
SMTP Port587 (STARTTLS)
SMTP SecureTRUE
IMAP Hostoutlook.office365.com
IMAP Port993
IMAP SecureTRUE

Username is usually your full email address.


cPanel / Custom Domain

SettingValue
SMTP Hostmail.yourdomain.com
SMTP Port465 (SSL) or 587 (TLS)
IMAP Hostmail.yourdomain.com
IMAP Port993
SecureTRUE for both

Contact your web host if you’re unsure of these values.


4. Security Options

FieldDescription
SMTP SecureEnables SSL/TLS encryption for outgoing mail. Set to TRUE unless your server requires plain STARTTLS.
SMTP PoolAllows reusing SMTP connections for faster bulk sending. Leave FALSE unless you’re running large workloads.
IMAP SecureEnables SSL/TLS encryption for incoming mail. Always set to TRUE unless debugging local servers.

5. Verification & Troubleshooting

Once you click Save, Kurrier will test your connection automatically.

✅ Success

You’ll see a Verified badge next to your new provider.

⚠️ Common Errors

ErrorMeaningFix
Invalid login or passwordWrong credentials or app passwordDouble-check username/password
Connection refusedWrong port or SSL settingTry switching SMTP Secure or check your host’s SSL port
IMAP timeoutIMAP disabled on the accountEnable IMAP (e.g. in Gmail settings)
Hostname mismatchWrong IMAP/SMTP hostnameUse provider’s documented host name

6. Best Practices

  • Use App Passwords when available — never your real login password.
  • Always use secure ports (465/993) with SSL.
  • Avoid shared or root email credentials.
  • For hosted domains, create dedicated mailbox users for Kurrier.

7. Notes for Self-Hosted Mail Servers

If you’re connecting to your own mail server (e.g., Postfix/Dovecot):

  1. Ensure smtpd_tls_security_level = may or higher in Postfix.
  2. IMAP must listen on port 993 with ssl = yes.
  3. You may need to allow Kurrier’s IP or internal Docker network.

Tip: You can create multiple SMTP/IMAP accounts in Kurrier — one for each mailbox or domain you manage.

8. Instance-wide provider presets

Self-hosted administrators can publish company SMTP/IMAP settings on the Providers page. Users then select the company provider and enter only their own mailbox credentials.

Set CUSTOM_EMAIL_PROVIDERS to a JSON array in the environment of the Kurrier web container:

CUSTOM_EMAIL_PROVIDERS='[{"id":"company-mail","name":"Company Mail","description":"Corporate email","credentialMode":"shared","smtp":{"host":"smtp.example.com","port":465,"secure":true},"imap":{"host":"imap.example.com","port":993,"secure":true}}]'

Each provider supports these fields:

FieldRequiredDescription
idYesUnique lowercase identifier containing letters, numbers, _, or -
nameYesName displayed to users
descriptionNoShort help text displayed on the provider card
credentialModeYesshared uses one login for SMTP and IMAP; separate requests each login separately
smtpYeshost, port, secure, and optional pool settings
imapNohost, port, and secure settings for incoming mail

Do not put passwords or other credentials in this variable. Preset objects are strictly validated, unknown fields are rejected, and user credentials continue to be encrypted in the Kurrier Vault.

Kurrier skips malformed entries and duplicate IDs while logging a warning. If the whole value is malformed JSON, no custom providers are displayed and Generic SMTP remains available.

The selected server settings are copied into the account when it is created. Changing or removing a preset does not change existing accounts; it only affects future connections after the web container is restarted.

Connecting a preset mailbox

When a preset includes IMAP, its card displays Add mailbox. The user enters their mailbox credentials, display name, and daily IMAP quota once. Kurrier then:

  1. stores an encrypted snapshot of the SMTP/IMAP connection in the Vault;
  2. verifies the connection and removes the account if verification fails;
  3. creates the linked email identity through the same lifecycle used by the manual Identity flow;
  4. discovers the IMAP folders and starts backfill and IDLE synchronization;
  5. opens the connected Inbox.

If the email identity is already connected in the workspace, Kurrier reuses it instead of creating a duplicate account or identity.

An SMTP-only preset continues to display Add account. It stores an outbound connection but does not create an inbox; an identity can still be configured separately for an advanced sending-only setup.

The worker service must be running while an IMAP mailbox is connected so Kurrier can discover its folders and start synchronization:

docker compose logs -f worker