Email Recovery

Restore a Deleted Stalwart Account before its data is removed from your server

Leena Taylor Paul By Updated November 15, 2026 9 min read

Quick Answer

To restore a deleted Stalwart account, find its pending DestroyAccount task and delete that task before it starts. Stalwart then re-creates the account with its original id, name and domain and brings back mailboxes, messages, calendars, contacts and files. Credentials and group memberships return as defaults, so set them again.

Check the Tasks list in your WebUI before anything else.

You deleted a Stalwart account and its owner now asks for the mailbox back. Before you search for a backup, check one thing. Stalwart's page on deleted items says that deleting an account does not remove its data at once. The server schedules a task and keeps the data until that task is due.

If you follow this guide, you will find that task, delete it and bring the account back. You will also see how to restore a single deleted message and what to do when the task has already finished.

Start from your situation
  • If you deleted the account a short while ago, its task may still be waiting.
  • If the task has finished, the data is gone from your server and only a copy can bring it back.
  • If a user deleted single messages, the deleted-item archive may still have them.

Why Is a Deleted Stalwart Account Not Gone Yet?

On 15 November 2026 I read Stalwart's page on recovering deleted items. It marks the feature as part of the Enterprise edition. When you delete an account, Stalwart schedules a task named DestroyAccount. That task is due when the period in the archiveDeletedAccountsFor setting ends.

Until that task starts, mailboxes, messages, calendars, contacts and files of that account still exist on your stores. I could not find a default value for archiveDeletedAccountsFor on that page. If you want to count on the delay, check the value on your own server first.

Who Needs to Restore a Deleted Stalwart Account?

Where does your account stand today?
  • An admin who removed the wrong user Your clean-up deleted an account that is still in use.
  • An admin with a returning employee Your colleague left, you closed the account and now they are back.
  • An owner who needs old mail Your company asks for the mail of a user whose account you deleted.

Which Way Brings a Deleted Stalwart Account Back?

Each way below works only in one situation, so find the row that matches your account and read its limit before you start.

WayRequirementLimit
Delete the DestroyAccount task The task is still pending. The taskDestroyAccount permission A task that is already processing cannot be deleted. Credentials and group memberships come back as defaults
Deleted-item archive archiveDeletedItemsFor was set before the deletion. Enterprise edition Restores items like messages and events. It is not a backup and it does not recreate an account
Restore from a backup A copy of both stores from before the deletion The whole data store comes back. A single account needs a Vandelay archive
Mail files from a data copy A RocksDB or SQLite copy from before the deletion and a Windows PC Saves mail files only, so the account itself is not recreated. The trial saves 25 messages per folder

The first way costs you nothing and works within minutes. If your task is already gone, move down the table to the next row that matches you.

A deleted account is only gone when its task has finished. Open the task list first, because that is the one place a mailbox can still be saved in minutes.

Nick Rogers, Founder of Univik
Nick Rogers
Founder, Univik
Making Windows software since 2013

Five Steps to Restore a Deleted Stalwart Account From Its Task

Each step below comes from Stalwart's page. You need an administrator account with the taskDestroyAccount permission.

  1. Act before the task starts. Open Management and then Tasks and then Scheduled in your WebUI. If a task for your account is listed, you still have time.
  2. List the pending deletions. Enter stalwart-cli query Task --where @type=DestroyAccount. The accountName field in each row names the account that the task will delete, so note the id of your row.
  3. Delete the task. Enter stalwart-cli delete Task --ids b and replace b with your id. If Stalwart answers that the task is currently being processed, it is too late for this way.
  4. Check the account. Stalwart re-creates that account with its original id, name and domain. Mailboxes, messages, calendars, contacts and files become available again. The server also schedules a task to rebuild the share index.
  5. Set credentials and groups again. The restored account comes back with default credentials, group memberships and settings, so set them again before your user signs in.

How Do You Restore One Deleted Message in Stalwart?

1. Turn the archive on before you need it

Do this: The setting archiveDeletedItemsFor sits at Settings, Storage, Data Retention, Archiving and takes a value in milliseconds. An empty value means deleted items are removed at once, so nothing deleted before you set it can be restored. The value 2592000000 keeps items for 30 days.

2. Find the item

Do this: A user opens Account Manager, Account, Archived Items. An administrator sees one account at a time and picks another with the Account filter. The JMAP call x:ArchivedItem/query with an accountId filter works only for administrators with the impersonate permission.

3. Request the restore

Do this: Set the status of the item to requestRestore in the WebUI or with x:ArchivedItem/set. Stalwart creates a RestoreArchivedItem task that puts the item back and you can follow it under Tasks.

The archive covers messages, files, calendar events, contact cards and Sieve scripts. If your disk fails, the archive fails with it, because it lives on your own stores. When you delete an ArchivedItem, it is removed for good.

What If the Task Already Finished?

Once a Stalwart DestroyAccount task has finished, the data of that account is deleted. Only a copy that you made before the deletion can bring your mail back. My guide to Stalwart backup and restore shows how to keep such copies.

If you have a RocksDB or SQLite copy from before the deletion, Univik Stalwart Mail Recovery opens it on a Windows PC. It lists the accounts found in your copy. You choose one and export it as a PST, EML or MBOX file while Stalwart itself stays switched off. Univik does not claim mail of an account that was already orphaned in your data, so the account must still exist in your copy.

You open an older copy and the deleted account is listed like any other.
  1. Find the right copy. Look for the newest copy of your data folder that is older than the deletion. A newer copy no longer has the account.
  2. Open it on Windows. Copy the folder to your PC, start the software and browse to it. Look for the deleted account in the list.
  3. Save the account. Select that account. Name an output folder and set the export format to PST, EML or MBOX. If the save stops, select Resume.
  4. Open one file. Load the PST in Outlook or open an EML file and check that the folders you expect are there.

Limitations: the trial saves 25 messages per folder and the files do not recreate the account on a server. Your PC needs Windows 11 or 10 with .NET Framework 4.8. I have not timed a large copy, so test one account first.

Recover the mail of a deleted Stalwart account

Windows opens an older copy of your data and saves the account you need as files that open without Stalwart.

Download Free Trial Select a Licence - From $999

Choose one account in the older copy and compare its folder tree with what the user remembers.

What If Restoring the Stalwart Account Fails?

1. The task is already being processed

Do this: Stalwart refuses to delete a task that is already processing and says so in its answer. You cannot delete that task any more, so look for a copy that you made before the deletion.

2. Account recovery failed

Do this: Stalwart reports this message when it cannot re-create the account. The page names one cause, which is that another account now uses the same name. Check your account list for that name.

3. The account has no password

Do this: A restored account comes back with default credentials and group memberships. Set both of them again before your user signs in.

Which Stalwart Page Supports the Steps Above?

I read Stalwart's page on deleted items on 15 November 2026. It states that the feature is part of the Enterprise edition, so check your edition first. It gives no default for archiveDeletedAccountsFor and no Stalwart version list.

Univik's recovery page supplies the product details. Stalwart revises its documentation over time, so test each command on a spare account before you use it on a real one.

Key Takeaways
  • Deleting a Stalwart account schedules a DestroyAccount task and the data stays until that task is due.
  • Deleting the task before it starts restores the account with its original id, name and domain.
  • Credentials and group memberships come back as defaults and need to be set again.
  • The deleted-item archive restores items but not accounts and it is not a backup either.
  • After the task has finished, only a copy from before the deletion can bring the mail back.

FAQ: Restore a Deleted Stalwart Account

How do I restore a deleted Stalwart account?

Find its pending DestroyAccount task with stalwart-cli query Task --where @type=DestroyAccount and delete it with stalwart-cli delete Task --ids followed by the task id. Do this before the task starts, because a running task cannot be deleted.

Is mail of a deleted Stalwart account removed at once?

No. Deleting an account schedules a DestroyAccount task that is due when the archiveDeletedAccountsFor period ends, which means the data stays in place until then.

Which permission lets me delete the DestroyAccount task?

Stalwart's page names taskDestroyAccount. A task that is already being processed cannot be deleted.

Does a restored Stalwart account keep its password?

No. Credentials, group memberships and other settings come back as defaults, so set them before the user signs in.

Can I restore a single deleted message in Stalwart?

Yes, if archiveDeletedItemsFor was set before the deletion. Set the status of the archived item to requestRestore. An empty value means nothing is archived.

Is Stalwart's deleted-item archive a backup?

No. It lives on the same stores as your live data and is lost with them.

What if the DestroyAccount task already finished?

Then only a copy from before the deletion helps. Univik Stalwart Mail Recovery opens a RocksDB or SQLite copy on Windows. If the account exists in that copy, it exports that account as PST, EML or MBOX.

Is there a trial for opening an older copy?

Yes. Trial mode stops after 25 messages in each folder. That is enough to open one saved account and see whether it is the one you need.

Leena Taylor Paul

Every step in this guide follows the deleted-items page of Stalwart, which I read on November 15, 2026. The Univik details come from its recovery page.

More Guides for Stalwart Mail

Choose the guide that matches the next step for your Stalwart data.

Stalwart guides 4