# Sort incoming mail with rules

To create a rule, open **Settings › Rules/Advance Forwarding** and stay on the **Rules** tab. Choose a condition under **Rule**, type the text to match in **Message**, choose an **Action** such as **Move to the specified folder**, and click **Save**. Rules run on incoming mail, and your admin sets how many you can have.

## How to sort incoming mail with rules

1. Click your profile picture, then **Settings**, and open **Rules/Advance Forwarding**.
2. On the **Rules** tab, choose a condition under **Rule**, for example **Subject line contains**.
3. Type the text to match in **Message**.
4. Choose an **Action**. If it is **Move to the specified folder**, pick the folder.
5. Click **Save**. The rule appears in the list below.

## When to use it

> Meera in procurement at acme.in gets dozens of purchase orders a day. She creates a rule "Subject line contains PO#" with the action **Move to the specified folder › Purchase Orders**, so her Inbox shows only mail that needs a reply.

## Options

| Condition | Matches mail where |
|---|---|
| **To contains** | The To address contains your text. |
| **From contains** | The sender address contains your text, for example `@vendor.in`. |
| **Cc contains** | A Cc address contains your text. |
| **Date contains** | The mail arrived on the date you pick. |
| **Message has an attachment** | The mail has any attachment. |
| **Message is marked as priority** | The sender marked the mail as high priority. |
| **Message body contains** | The body contains your text. |
| **Subject line contains** | The subject contains your text. |

| Action | What it does |
|---|---|
| **Move to the specified folder** | Files the mail into the folder you choose, such as one of your own folders. |
| **Delete** | Deletes matching mail. |
| **Auto Reply** | Sends your reply to the sender, at most once a day per sender. |
| **Set Color** | Marks the mail with a colour in the mail list. |

## Good to know

- Rules and Advance Forwarding share one limit set by your admin.
- Each rule has one condition and one action. To combine actions, create two rules with the same condition.
- The text you type in **Message** can be up to 50 characters.
- XgenPlus refuses a rule that already exists with the same condition, text and action.
- At the top of the **Rules** tab there is a one-click option to move spam and bulk mail to the Spam-Promo folder.

## Common questions

**How many rules can I create?**

Your administrator sets the number of rules allowed for your mailbox. If you reach it, XgenPlus tells you, and you need to delete a rule before adding another.

**How do I delete a rule?**

Tick the rule in the list and click **Delete** in the table header.

**Can a rule forward mail to another address?**

Use **Advance Forwarding** on the next tab. It forwards mail by sender, with size and attachment limits.


Source: https://docs.xgenplus.com/mail/mail-rules/
