---
title: Setting Up Mail Rules
description: Mail rules define what Essal Office does with each email it retrieves from the import inbox. They let you automatically assign metadata — like corresp...
---

[Skip to content](https://help.essal.cloud/en/article/1473-#main-content)

English

Show submenu for translations

[More support](https://help.essal.cloud/en/kb-tickets/new?hsLang=en) [Customer portal](https://clients.essal.cloud/tickets?hsLang=en)

[![logo](https://help.essal.cloud/hubfs/logo.svg)](https://help.essal.cloud/?hsLang=en)

- [Home](https://essal.cloud/)
- [Products](https://essal.cloud/products)
- [Industries](https://essal.cloud/industries)
- [About](https://essal.cloud/about)
- [Contact](https://essal.cloud/contact)

Open main navigation

Close main navigation

- [Home](https://essal.cloud/)
- [Products](https://essal.cloud/products)
- [Industries](https://essal.cloud/industries)
- [About](https://essal.cloud/about)
- [Contact](https://essal.cloud/contact)
- English
  
  Show submenu for translations
- [More support](https://help.essal.cloud/en/kb-tickets/new)
- [Customer portal](https://clients.essal.cloud/tickets)
- [Home](https://essal.cloud/)

[Home](https://essal.cloud/)

 Essal Help Center

- There are no suggestions because the search field is empty.

1. [Help Center](https://help.essal.cloud/en?hsLang=en)
2. [Essal Office](https://help.essal.cloud/en/essal-office?hsLang=en)
3. [Email import](https://help.essal.cloud/en/essal-office?hsLang=en#email-import)

# Setting Up Mail Rules

Mail rules define what Essal Office does with each email it retrieves from the import inbox. They let you automatically assign metadata — like correspondent, document type, tags, and title — based on conditions from the email itself (sender, subject, or body content).

---

## What Mail Rules Do

Without mail rules, all imported documents land in your archive with minimal metadata. With mail rules, you can:

- Assign the correspondent based on the email sender
- Set the document type based on the subject line
- Add specific tags automatically
- Set the document title from the email subject
- Control what happens to the email after import

---

## Creating a Mail Rule

1. Go to **Settings** → **Mail Rules** (or **Administration \> Mail Rules**)
2. Click **Add rule**
3. Configure the rule:

### Filter Conditions

Conditions determine which emails this rule applies to:

- **Condition**: \*\*From\*\*
- **Checks**: The sender's email address (exact, contains, or regex)

- **Condition**: \*\*Subject\*\*
- **Checks**: The email subject line (contains, exact, regex)

- **Condition**: \*\*Body\*\*
- **Checks**: Text anywhere in the email body

Multiple conditions within one rule must all match (AND logic).

---

### Actions

When conditions match, Essal Office applies these actions to the imported document:

- **Action**: \*\*Assign correspondent\*\*
- **Effect**: Sets the correspondent on the imported document

- **Action**: \*\*Assign document type\*\*
- **Effect**: Sets the document type

- **Action**: \*\*Assign tags\*\*
- **Effect**: Adds specific tags to the document

- **Action**: \*\*Set title\*\*
- **Effect**: Sets the document title (can use the email subject as a template)

- **Action**: \*\*Set owner\*\*
- **Effect**: Assigns the document to a specific user

- **Action**: \*\*Mark email as\*\*
- **Effect**: Mark the processed email as read, or move it to a folder

- **Action**: \*\*Delete email\*\*
- **Effect**: Permanently delete the email from the mailbox after import

---

## Rule Ordering and Priority

Rules are evaluated from top to bottom. The first rule whose conditions match is applied. If no rule matches, the document is imported with no automatic metadata.

Drag rules in the list to change their order. Put more specific rules above more general ones to avoid the general rule winning first.

---

## Example: Automatic Invoice Import

Rule name: `Supplier Invoice Import`

Conditions: - From contains: `@acme-supplies.com`

Actions: - Assign correspondent: `Acme Supplies` - Assign document type: `Invoice` - Add tags: `Finance`, `Inbox` - Set title: Use email subject

This rule processes all emails from Acme with the right metadata applied automatically.

---

## Testing Rules

After configuring rules, send a test email to the import address from the expected sender. Trigger a manual import check and verify the imported document has the expected metadata.

- [Essal Office](https://help.essal.cloud/en/essal-office?hsLang=en#main-content)

    - [Getting started](https://help.essal.cloud/en/essal-office?hsLang=en#getting-started)
    - [Searching and saved views](https://help.essal.cloud/en/essal-office?hsLang=en#searching-and-saved-views)
    - [Correspondents and document types](https://help.essal.cloud/en/essal-office?hsLang=en#correspondents-and-document-types)
    - [Email import](https://help.essal.cloud/en/essal-office?hsLang=en#email-import)
    - [Users groups and permissions](https://help.essal.cloud/en/essal-office?hsLang=en#users-groups-and-permissions)
    - [Sharing documents](https://help.essal.cloud/en/essal-office?hsLang=en#sharing-documents)
    - [Working with documents](https://help.essal.cloud/en/essal-office?hsLang=en#working-with-documents)
    - [Pdf tools](https://help.essal.cloud/en/essal-office?hsLang=en#pdf-tools)
    - [Uploading documents](https://help.essal.cloud/en/essal-office?hsLang=en#uploading-documents)
    - [Archive serial numbers](https://help.essal.cloud/en/essal-office?hsLang=en#archive-serial-numbers)
    - [Workflows and automation](https://help.essal.cloud/en/essal-office?hsLang=en#workflows-and-automation)
    - [Organizing with tags](https://help.essal.cloud/en/essal-office?hsLang=en#organizing-with-tags)
    - [Troubleshooting and faq](https://help.essal.cloud/en/essal-office?hsLang=en#troubleshooting-and-faq)
    - [Account and security](https://help.essal.cloud/en/essal-office?hsLang=en#account-and-security)
    - [Custom fields](https://help.essal.cloud/en/essal-office?hsLang=en#custom-fields)

- [Portal](https://admin.essal.cloud/)
- [Newsroom](https://newsroom.essal.cloud/)
- [Careers](https://careers.essal.cloud/)
- [Help](https://support.essal.cloud/)
- [Status](https://status.essal.cloud/)
- [Contact](https://essal.cloud/contact)
- [Terms](https://legal.essal.cloud/terms)

[![logo](https://help.essal.cloud/hubfs/logo.svg "logo")](https://essal.cloud/)

Essal LLC

<https://facebook.com/essal> <https://www.linkedin.com/company/essal> <https://github.com/essal>

Copyright © 2026, Essal