--- title: "IMAP(S) (mail)" slug: "input-agents-mail-imap" updated: 2026-09-23T13:09:33Z published: 2026-09-23T13:09:33Z canonical: "docs.lobstersoftware.com/input-agents-mail-imap" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # IMAP(S) (mail) ## Settings ![Settings field for IMAP(S): channel selection, mail server, IMAP directory, target folder, S/MIME, parallel processing, and handling of unknown mails.](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/imap-version-1-modificationdate-1747736333948-api-v2.png) ① **Channel selection:** Channel of the **Mail** type that connects to the server to retrieve the e-mails (fetching channel). For `IMAPS` (port `993`), you must select a channel. ② **Mail server:** URL/IP address and port of the mail server, plus user and password. If these fields are empty, the system uses the values from the configuration file `./etc/startup.xml`. This also applies to user and password. Values entered in these fields are then ignored. If a channel is selected and the port is `0`, the port from the channel applies. For a port greater than `0`, that value applies. ③ **IMAP directory:** Name of the IMAP directory the Profile reads the e-mails from. It reads e-mails from this directory only and ignores any subdirectories. For the inbox of the user account, enter `INBOX`. For a subfolder of the inbox, enter `INBOX/<name of the subfolder>`. Two profiles with identical directory details count as equivalent on this point in the [Profile scoring](/v1/docs/en/intro-profiles-phase-1-profile-scoring). To avoid this, enter an empty string for one of the profiles. ④ **Move to:** Enter an existing IMAP folder here, and the system moves the fetched messages to that folder instead of deleting them. ⑤ **Use S/MIME operations:** If the checkbox is set, the system decrypts received S/MIME e-mails. Otherwise, the e-mails remain as received. See the corresponding settings in [Mail (Channels)](/v1/docs/en/channel-mail). ⑥ **Activate parallel processing:** If this checkbox is set, several instances of the Processing profile (see [Distribution rules (mail)](/v1/docs/en/input-agents-mail-distribution-rules)**)** can work in parallel. The checkbox "Profile may only run in one instance" (see [General (Main settings)](/v1/docs/en/profiles--tab-1-1)) must not be set for this profile. For details, see [Parallel processing of mails](/v1/docs/en/input-agents-mail-parallel). ⑦ **Skip corrupt mail:** If the checkbox is set, the system continues receiving after a corrupt e-mail. Otherwise, the job terminates. ⑧ **Unknown mails:** If the system finds no matching processing profile for an e-mail (see the following section), it moves the e-mail to the [Unresolved](/v1/docs/en/cc-unresolved) area or discards it. See also [Non-assignable e-mails](/v1/docs/en/intro-profiles-phase-1-nonassign-emails). **NOTE:** The syntax for ③ and ④ can differ depending on the server. Enable tracing for Phase 1 in the profile's logging configuration (see [Profiles: Specific log settings](/v1/docs/en/cc-logs-config-tab-2)), and the system writes a list of the supported folders to the log. ## Distribution rules See [Distribution rules (mail)](/v1/docs/en/input-agents-mail-distribution-rules). If no rule is specified or no rule applies, the setting in ⑧ applies. ## System variables Several [system variables](/docs/en/intro-concepts-system-variables) are available for received e-mails. `VAR_SYS_MAIL_HEADER_<name of the email header in capital letters>` deserves special mention. **Example:** The variable `VAR_SYS_MAIL_HEADER_DATE` receives the original string value of the e-mail header `Date`. The e-mail header line `Date: Wed, 6 Sep 2017 13:50:01 +0300` results in the variable content `Wed, 6 Sep 2017 13:50:01 +0300`. Further variables in the profile: - `VAR_MAILSUBJECT` contains the subject of the e-mail. - `VAR_SYS_MAIL_BODY` contains the text of the body. - `VAR_SYS_FILE_PATH` contains the IMAP directory from ③. See also `VAR_SYS_ATTACHMENT_NAME`. **NOTE:** The system variable `VAR_SYS_MAIL_HEADER_RECEIVED` contains only the first "Received" mail header. To get all of them, use `VAR_SYS_MAIL_HEADER_RECEIVED_ALLB64`. This variable contains all received mail headers, comma-separated and encoded in Base64. A profile is the central configuration unit in the Lobster Data Platform. It receives data, processes it, and forwards it. Configuration is done graphically, with no programming required. A profile to which files are routed by the Content Inspector (merger/file pool) for regular and serial processing. It receives custom and system variables. Files can alternatively be transferred via e-mail, X.400, ASM or, in the case of RFCs, via a **message queue** . Also relevant in distribution rules for incoming mail agents. Input: An input agent receives the data. It can work either as event based (e.g. FTP upload) or scheduled (cron).