Maildir recovery

Maildir stores each message as a separate file, so folder and index damage can hide mail without corrupting every message.

A Maildir mailbox uses tmp, new, and cur directories. Individual message files carry the message content, while mail servers may add index, UID, subscription, quota, keyword, and cache files needed to present the mailbox consistently over IMAP.

Understand the symptom

Message files and IMAP identity metadata are related but recoverable at different layers.

WHY

What is happening

The Maildir format places new messages in new and seen messages in cur, with tmp used during delivery. Implementations such as Dovecot maintain additional index and UID data; rebuilding views must not overwrite the only message set.

What you may see

Symptoms that change the recovery path.

01

Mailbox appears empty after restart

Indexes, permissions, mount state, or directory paths may be wrong.

02

Messages exist in cur but not IMAP

UID or index metadata may not match message files.

03

Duplicate messages appear

A rebuild or restore may assign new identities to existing files.

04

Zero-byte or partial files remain in tmp

Delivery may have been interrupted before final placement.

Protect the source

Actions that can make the situation worse.

01

Expunge deletes message files

Server cleanup may permanently remove mail marked deleted.

02

Index rebuild can change UID relationships

Clients may redownload, duplicate, or delete mail.

03

Copying without metadata loses context

Permissions, timestamps, flags, hierarchy, and extended attributes can matter.

Do this now

Safe steps before evaluation.

01

Stop the mail service

Prevent delivery, expunge, quota cleanup, index writes, and replication.

02

Copy the complete tree

Keep all folders, hidden files, names, ownership, timestamps, and xattrs.

03

Collect server context

Preserve namespace, storage paths, UID validity, indexes, logs, and configuration.

04

Inventory alternate sources

Keep replicas, IMAP clients, snapshots, backups, and journaled filesystems.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Mailbox inventory

NEPFOSYS maps folders, message files, headers, UIDs, flags, indexes, permissions, and storage health.

02

Message-level extraction

Readable files are parsed and deduplicated without changing the source tree.

03

Mailbox validation

Counts, dates, folders, participants, attachments, flags, and priority messages are reviewed.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

Can Maildir indexes be deleted safely?

Only after preserving the complete source and understanding the server's UID and cache behavior.

Are files in tmp always useless?

No. Some may contain interrupted deliveries and should be examined before cleanup.

Can filenames alone restore read flags?

Sometimes flags are encoded in names, but server-specific keywords and UID state may live elsewhere.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case