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:
| Field | Description | Example |
|---|---|---|
| Account Label | A friendly name for this connection | Work Email |
| SMTP Host | Outgoing mail server hostname | smtp.gmail.com |
| SMTP Port | Usually 465 for SSL or 587 for STARTTLS | 587 |
| SMTP Username | Your full email address or username | you@yourdomain.com |
| SMTP Password | App password or login password | ******** |
| SMTP Secure | Choose TRUE for SSL/TLS | TRUE |
| SMTP Pool | Optional — leave FALSE unless you know you need pooled connections | FALSE |
| IMAP Host | Incoming mail server (optional) | imap.gmail.com |
| IMAP Port | Usually 993 for SSL | 993 |
| IMAP Username | Your full email address or username | you@yourdomain.com |
| IMAP Password | Password or app password | ******** |
| IMAP Secure | Choose TRUE for SSL/TLS | TRUE |
3. Example Configurations
Gmail (App Password)
⚠️ Requires 2-Step Verification and an App Password
| Setting | Value |
|---|---|
| SMTP Host | smtp.gmail.com |
| SMTP Port | 465 (SSL) |
| SMTP Secure | TRUE |
| IMAP Host | imap.gmail.com |
| IMAP Port | 993 (SSL) |
| IMAP Secure | TRUE |
Use your Gmail address for both username fields and the 16-character app password for both passwords.
Outlook / Office 365
| Setting | Value |
|---|---|
| SMTP Host | smtp.office365.com |
| SMTP Port | 587 (STARTTLS) |
| SMTP Secure | TRUE |
| IMAP Host | outlook.office365.com |
| IMAP Port | 993 |
| IMAP Secure | TRUE |
Username is usually your full email address.
cPanel / Custom Domain
| Setting | Value |
|---|---|
| SMTP Host | mail.yourdomain.com |
| SMTP Port | 465 (SSL) or 587 (TLS) |
| IMAP Host | mail.yourdomain.com |
| IMAP Port | 993 |
| Secure | TRUE for both |
Contact your web host if you’re unsure of these values.
4. Security Options
| Field | Description |
|---|---|
| SMTP Secure | Enables SSL/TLS encryption for outgoing mail. Set to TRUE unless your server requires plain STARTTLS. |
| SMTP Pool | Allows reusing SMTP connections for faster bulk sending. Leave FALSE unless you’re running large workloads. |
| IMAP Secure | Enables 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
| Error | Meaning | Fix |
|---|---|---|
Invalid login or password | Wrong credentials or app password | Double-check username/password |
Connection refused | Wrong port or SSL setting | Try switching SMTP Secure or check your host’s SSL port |
IMAP timeout | IMAP disabled on the account | Enable IMAP (e.g. in Gmail settings) |
Hostname mismatch | Wrong IMAP/SMTP hostname | Use 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):
- Ensure
smtpd_tls_security_level = mayor higher in Postfix. - IMAP must listen on port
993withssl = yes. - 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:
| Field | Required | Description |
|---|---|---|
id | Yes | Unique lowercase identifier containing letters, numbers, _, or - |
name | Yes | Name displayed to users |
description | No | Short help text displayed on the provider card |
credentialMode | Yes | shared uses one login for SMTP and IMAP; separate requests each login separately |
smtp | Yes | host, port, secure, and optional pool settings |
imap | No | host, 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:
- stores an encrypted snapshot of the SMTP/IMAP connection in the Vault;
- verifies the connection and removes the account if verification fails;
- creates the linked email identity through the same lifecycle used by the manual Identity flow;
- discovers the IMAP folders and starts backfill and IDLE synchronization;
- 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