secondary path - again
Idea shared by Sabatino - 9/24/2026 at 1:05 AM
Proposed
Hi everyone.
I’d like to revisit the topic of secondary paths

Specifically, the problem remains (unless changes in recent versions have escaped my notice) that if the secondary path becomes unavailable—either partially or completely (e.g., missing .grp files)—SmarterMail treats those items as deleted messages and removes them from the index. Restoring them requires a rebuild, which is not only a hassle to perform for every domain but also results in data loss (such as message labels).

Of course, I don't *plan* on having a secondary path go offline, but by its very nature, a secondary path might reside on an external mount or a non-redundant drive, meaning things can always go wrong.

This issue came back to mind because I am currently migrating to a new server in a different farm.
During the initial setup, I need to perform a first sync of the domain folders. The fastest approach at this stage was using backups, though restoring 4TB of data is certainly not a quick process. Fortunately, one of the backup repositories is located at the destination server farm, so the restore will take about 20 hours.

However, I started thinking about a disaster recovery scenario where I would have to restore from a remote cloud (Acronis)—a process that takes a very long time.
This led me to reconsider secondary paths: in this scenario, the drives would have equal reliability, but in the event of a disaster, I could recover the primary path drive first, followed by the secondary one.
The user experience would be: a disaster occurs, but we’ve restored operations with the last 90 days of messages; over the following days, older messages will gradually reappear. However, the fact remains that the partial or total absence of .grp files in the secondary SM path should not result in their removal from the index.
There is still a need for an index removal procedure that is left to the administrator's discretion.
Sabatino Traini
      Chief Information Officer
Genial s.r.l. 
Martinsicuro - Italy

Andrew Barker Replied
Employee Post
One of the changes in build 9756 was to improve how messages on an unreachable secondary storage are handled. Specifically, any potentially damaging actions involving secondary messages - auto deleting, moving an item to secondary storage, disabling secondary storage, etc. - are avoided when the secondary path is unreachable. If your secondary storage goes offline, all that should happen is that the message or file storage item cannot be accessed. This means that rebuilding folders after a secondary storage outage should no longer be necessary and information like flags, read state, and more should be maintained until the secondary store is restored.

Andrew Barker
Lead Software Developer
SmarterTools Inc.
www.smartertools.com 

Great.
I'll run some tests, then.

Could you clarify that a bit, though?
You mentioned "unreachable," implying the path doesn't exist.
But if the path *does* exist yet is empty, how does it behave?
Sabatino Traini
      Chief Information Officer
Genial s.r.l. 
Martinsicuro - Italy

Andrew Barker Replied
Employee Post
By "unreachable," I meant that the secondary storage path defined in the domain settings isn't currently accessible. On Linux, that path is typically a mount point: a regular directory that the storage device is mounted onto. When the device isn't mounted, the directory still exists, but it's just an empty folder on the underlying (usually root) filesystem. Because of that, SmarterMail runs several checks to determine whether it's looking at the mounted device or just the bare mount point. Once a secondary storage path has been identified as reachable, SmarterMail has no way of knowing that a restore is in progress, so it acts as if the data it finds is complete and allows potentially destructive actions to proceed.

For the recovery scenario you described, I recommend keeping the replacement drive disconnected from your SmarterMail server until you've finished restoring data to it. This keeps the secondary path unreachable, so SmarterMail won't act on the items it expects to exist there until you reconnect the drive with the restore complete.

Andrew Barker
Lead Software Developer
SmarterTools Inc.
www.smartertools.com 

Ohhh that means the email index wont go missing after it come back online right?

Looks like i should upgrade soon to benefit from this improvement
Update.
I’ve run some tests.
Windows environment.
I enabled the secondary path on a domain.

Then, I simply renamed the secondary path folder on the disk.

I waited three days; in the meantime, I even attempted re-indexing.

The messages remained inaccessible and were not removed from the index.

As soon as I restored the original folder name, the messages became accessible again.

Great work.
To me, this is exactly how it should work.

The system didn't determine whether it was an external mount; it simply failed to find the folder and took no action.

The only question remaining for me is:
If I, as the administrator, decide that the path will not be restored, how do I tell SM to delete the messages from the index?
Sabatino Traini
      Chief Information Officer
Genial s.r.l. 
Martinsicuro - Italy

Andrew Barker Replied
Employee Post
Right now, the only way to tell SmarterMail to clean up the messages that won't be restored is:

  1. Stop SmarterMail.
  2. Delete secondary_storage_is_disabling and secondary_storage_path from the domain's settings file. Make sure to also delete or rename the copy of the file in "Archived Data".
  3. Start SmarterMail.
With those settings removed, secondary storage for the domain will be fully disabled. When SmarterMail does a clean after that, messages marked as being in secondary storage will be treated as missing and will be removed from the account's CFG files and index.

Andrew Barker
Lead Software Developer
SmarterTools Inc.
www.smartertools.com 

Reply to Thread

Enter the verification text