# Delete archived mail for a domain

To delete archived mail, open **Manage Server › Domain Cleaner** and select the **Archived Domain Cleaner** tab. Enter and verify the domain, set **From Date** and **To Date**, optionally add a user, subject or **Mark as** filter, and click **Cleanup Archived Emails**. Check the count shown, then click **Yes, Proceed**. This cannot be undone.

## How to delete archived mail for a domain

1. Open **Manage Server › Domain Cleaner** and select the **Archived Domain Cleaner** tab.
2. Type the domain in **Domain** and click the search button next to it to verify it.
3. To clean one mailbox only, type its address in **Email Address** and click the search button. Leave it empty for all users.
4. Pick **From Date** and **To Date**, and optionally fill **Subject** and choose **Mark as**.
5. Click **Cleanup Archived Emails**, read the count in the window, then click **Yes, Proceed**.

## Options

| Option | What it does | Default |
|---|---|---|
| **Domain** | The domain to clean. Click the search button to check that it exists. It must be checked before you can clean. | Empty |
| **Email Address** | One user to clean. You can type only the user name and the domain is added. The address must belong to the domain. Check it with the search button. | Empty (all users) |
| **From Date** / **To Date** | Archived mail in this range is deleted. Pick both dates from the calendar. A date in the future is not accepted, and **From Date** cannot be after **To Date**. | Empty |
| **Subject** | Only mail with this subject text is cleaned. | Empty |
| **Mark as** | **All**, **Read** or **Unread** mail. | **All** |
| **Cleanup Archived Emails** | Counts the matching archived mail and opens the confirmation window. | |

## What the confirmation window says

After you click **Cleanup Archived Emails**, a window asks **Do you want to clean mails ?** It shows how many mails will be deleted permanently for the domain or the user in your date range, and warns that the process cannot be stopped and undone later. Click **Yes, Proceed** to start or **No** to go back.

If nothing matches, the window says you have no mail to delete in that range and only offers **Close**.

After you proceed, the page confirms that the cleaning has started. The cleaning runs in the background and you are notified through email when it is finished.

## Example

> The archive storage for oldclient.in is nearly full. Rohit, the server administrator, verifies the domain, picks 01-04-2019 to 31-03-2021 and clicks **Cleanup Archived Emails**. The window shows the number of mails that will go. After checking with the client, he clicks **Yes, Proceed** and waits for the email that says the job is done.

## Good to know

<div class="callout limit"><div><b>Cleanup is permanent.</b> Archived mail that is deleted here cannot be restored. Agree the date range with the domain's owner before you click <b>Yes, Proceed</b>.</div></div>

- This tab works on **archived** mail only. Mail in users' live folders is cleaned from the **Live Domain Cleaner** tab.
- Dates use the day-month-year format.

Source: https://docs.xgenplus.com/server/clean-archived-mail/
