ELONIQ / ELONIQ Handbook
Deutsch English Français
Overview / Import / ELO Mail Importer

ELO Mail Importer

Automated email import from mailboxes

The ELO Mail Importer monitors email mailboxes (IMAP, Exchange, or Microsoft 365) and automatically imports incoming emails or their attachments into ELO. It runs on a schedule in the background and supports comprehensive filter rules, metadata mapping, and post-processing.

Overview

The ELO Mail Importer automates email archiving into ELO. It is designed for scenarios like invoice intake via email, support mailboxes, contract correspondence, and automated email archiving for entire teams.

How the Import Works
  1. Fetch — The module connects to the configured mailbox (IMAP, EWS, or M365) and retrieves new emails.
  2. Filter — Emails are checked against configured filters (subject, sender, attachments, date). Non-matching emails are skipped.
  3. Duplicate check — Already imported emails are recognized by message ID and not processed again.
  4. Resolve target — The ELO target folder is determined by a fixed ID or dynamic template path.
  5. Import — The email (or just attachments) is uploaded to ELO with mask, metadata, and optional ACL permissions.
  6. Post-processing — The email is marked as read, moved, or deleted in the mailbox. Optionally, a workflow is started or an auto-reply is sent.
Import Pipeline
┌──────────────────┐     ┌───────────────┐     ┌──────────────────┐
│ Mailbox          │────▶│ Filters       │────▶│ Duplicate Check  │
│ • IMAP           │     │ • Subject     │     │ • Message ID     │
│ • EWS            │     │ • Sender      │     │ • Database       │
│ • M365           │     │ • Attachments │     │                  │
└──────────────────┘     └───────────────┘     └──────────────────┘
                                                       │
                         ┌───────────────┐     ┌───────▼──────────┐
                         │ Post-Process  │◀────│ Upload to ELO    │
                         │ • Mark read   │     │ • Mask + fields  │
                         │ • Move        │     │ • ACL            │
                         │ • Auto-reply  │     │ • Target path    │
                         │ • Workflow    │     │ • Container      │
                         └───────────────┘     └──────────────────┘

Features

  • Multi-protocol support — IMAP (with SSL/TLS, STARTTLS), Exchange Web Services (EWS), and Microsoft 365 with OAuth authentication.
  • Multiple mailboxes — Monitor any number of mail accounts simultaneously, each with its own settings, filters, and targets.
  • Attachments-only mode — Import the complete email or only attachments. Ideal for invoice mailboxes.
  • Comprehensive email filters — Filter by subject, sender, recipient, date, priority, and attachments. Sender domains can be excluded.
  • Attachment filter — Advanced filtering by file type (PDF, TIFF, XML) with option for exactly one relevant attachment. Inline images and signatures are automatically ignored.
  • Dynamic target paths — ELO target paths with template variables like {{ .Subject }}, {{ .Sender }}, {{ formatDate .Date "2006/01" }} for automatic folder structures.
  • Metadata mapping — Automatically map email fields (sender, subject, date, recipient, message ID) to ELO index fields.
  • Container mode — Store emails with attachments as ELO containers (folders). Optionally separate containers per attachment.
  • Post-processing — Mark emails as read, move, delete, or change the subject after import.
  • Auto-reply — Send an automatic reply to the sender after successful import.
  • Workflow trigger — Automatically start an ELO workflow after import.
  • Access control (ACL) — Inherit permissions from the target folder or set custom permissions.
  • Rate limiting — Limit the request rate to ELO when processing large email volumes.
  • Batch processing — Parallel processing with configurable workers for higher throughput.
  • Chain integration — Trigger automation chains before/after import.
  • Dead letter queue — Failed imports are automatically retried with exponential backoff.
  • Duplicate detection — Already imported emails are recognized by message ID and skipped.
  • Microsoft 365 multi-mailbox — Monitor multiple mailboxes with a single Azure AD app account.
  • Import logs — Every import is logged with status, duration, file size, and error details.

Usage

1. Create a Mail Account

Open the Mail Importer Configuration and click Add Account. Select the connection mode (IMAP, EWS, or M365) and enter the credentials.

2. Mailbox Settings

Set which folder to monitor (e.g. Inbox) and whether to include subfolders. Use Max Emails per Run to limit processing per cycle.

3. Choose Import Mode

Decide what to import:

  • Complete Email — The entire email is stored as a document in ELO (including attachments as part of the email).
  • Attachments Only — Only the attachments are imported as individual documents. Ideal for invoices or receipts.
4. Set the ELO Target

Choose where documents are stored in ELO:

  • Fixed ID — All emails go to the same ELO folder (simplest mode).
  • Template Path — Dynamic path with variables, e.g. ARCPATH:/Archive/{{ formatDate .Date "2006" }}/{{ formatDate .Date "01" }} for monthly folders.
5. Configure Filters (Recommended)

Set up filters to only import relevant emails:

  • Subject Filter — Only emails with specific keywords (e.g. Invoice, Order).
  • Sender Filter — Only emails from specific addresses or domains.
  • Attachment Filter — Only emails with specific file types as attachments (e.g. PDF only).
6. Set Up Metadata Mapping

Map email fields to ELO index fields. For example, the sender is automatically saved to the SENDER field and the subject to SUBJECT. This makes imported emails immediately searchable in ELO.

7. Set Post-Processing

Determine what happens to the email in the mailbox after import: mark as read, move to an archive folder, or delete.

8. Set the Schedule

Choose Continuous with an interval (e.g. 5m) for regular polling, or Scheduled with fixed times for targeted import windows.

9. Start and Monitor

Activate the account and observe imports on the Status page. The Logs tab provides details on every imported email, including errors and skipped messages.

Best Practices

  • Start with a test mailbox — Set up the account with a test mailbox first and verify that emails are imported correctly. Only then switch to the production mailbox.
  • Always set TargetPath or TargetID — Without a valid ELO target, every import will fail. Use TargetPath for dynamic filing or TargetID for a fixed folder.
  • Use filters strategically — Set up subject and sender filters to only import relevant emails. For invoice mailboxes, also use the attachment filter to only import PDFs.
  • Configure post-processing — Decide what happens to the email after import: mark as read, move to folder, or delete. This keeps the mailbox manageable.
  • Use separate accounts for different document types — Use separate mail accounts or configurations for invoices, contracts, and general correspondence. This lets you configure mask, target folder, and filters individually.
  • Enable rate limiting for large mailboxes — For mailboxes with many emails, rate limiting protects the ELO instance from overload. Combine it with MaxEmailsPerRun.
  • Use metadata mapping — Map email fields (sender, subject, date) to ELO index fields. This makes imported emails immediately searchable in ELO.
  • Container mode for emails with attachments — When emails have multiple attachments that should be treated as individual documents, use container mode.
  • Monitor logs and statistics regularly — Import logs show errors, skipped emails, and duplicates. Check these regularly to detect issues early.

Examples

Example 1: Simple IMAP Import — Archive All Emails

All emails from a mailbox are imported into a fixed ELO folder.

Account:       General
Mode:          IMAP
Server:        imap.example.com:993 (SSL/TLS)
Start Folder:  Inbox
Target ID:     4711         (ELO folder ID)
Mask ID:       100
After Import:  Mark as read
Interval:      5m
Example 2: Invoice Mailbox — Import Only PDF Attachments

A dedicated invoice mailbox. Only emails with exactly one PDF attachment are imported. The attachment is stored as a separate document in ELO.

Account:          Invoices
Mode:             IMAP
Server:           imap.example.com:993
Attachments Only: true
Attachment Filter:
  Enabled:        true
  Allow PDF:      true
  Require Single: true
Sender Filter:    accounting@supplier.com
Target Path:      ARCPATH:/Archive/Invoices/{{ formatDate .Date "2006" }}/{{ formatDate .Date "01" }}
Mask ID:          200
Metadata Mapping:
  Sender     → SENDER
  Subject    → SUBJECT
  Date       → RECEIVED_DATE  (Format: 2006-01-02)
After Import:     Move to folder "Archived"
Interval:         10m
Example 3: Microsoft 365 — Monitor Multiple Mailboxes

An M365 account with OAuth monitors multiple team mailboxes simultaneously.

Account:          Team Mailboxes
Mode:             M365
Tenant ID:        abc-123-...
Client ID:        def-456-...
Login Type:       oauth
Target Mailboxes:
  - purchasing@company.com
  - sales@company.com
  - support@company.com
Start Folder:     Inbox
Recursive:        true
Target Path:      ARCPATH:/Email/{{ .MailboxName }}/{{ formatDate .Date "2006/01" }}
Mask ID:          100
Default Workflow: 3
After Import:     Mark as read
Interval:         15m
Example 4: Container Mode — Email with All Attachments

Each email is stored as a container (folder) in ELO. The email and all attachments are individual documents inside it.

Account:             Contracts
Mode:                IMAP
Server:              imap.example.com:993
Container Mode:      true
Container Name:      {{ .Subject }} - {{ formatDate .Date "02.01.2006" }}
Separate Containers: false
Target ID:           5000
Mask ID:             300
Filters:
  Attachments Only:  true
  Subject Filter:    Contract,Agreement
After Import:        Move to folder "Processed"
Interval:            30m
Example 5: Scheduled Execution — Night Import

The import only runs at specific times, e.g. overnight and at noon.

Account:          Night Archive
Mode:             IMAP
Server:           imap.example.com:993
Execution Mode:   scheduled
Start Times:      02:00, 12:00
Max Emails:       200
Target ID:        6000
Mask ID:          100
Rate Limiting:
  Enabled:        true
  Requests/Sec:   5
After Import:     Delete
Example 6: Auto-Reply and Subject Change

After import, the sender receives an automatic notification and the subject is prefixed.

Account:              Support Inbox
Mode:                 M365
Target ID:            7000
Mask ID:              100
Auto-Reply:           Your email has been archived. Ref: {{ .MessageID }}
Change Subject:       true
Subject Prefix:       [ELO-Archive]
After Import:         Mark as read
Interval:             5m