There are times when moving SmarterMail domain and user data from internal storage to some type of shared storage just makes sense. For example, if you want to eventually set up SmarterMail Enterprise for failover, or, more commonly, if you want some redundancy in your domain, user, and message data by using a Raid10 NAS.
The process for doing this is relatively simple. However, the steps, below, assume your share is ready to be put into production. In addition, the more reliable way to do this is while having the SmarterMail service stopped. The process can be started with SmarterMail running, but administrators need to ensure whatever they're using to move data from the primary server over to the share has some type of Volume Shadow Copy (VSS) capability. Then, once the initial move is complete, a second will need to be performed to acquire more recent data, spool items, etc. This second move MUST be performed while the SmarterMail service is stopped.
The process, below, is being performed with the SmarterMail service stopped and with the understanding that the data is being moved to Network Attached Storage (NAS).
1. First, stop the SmarterMail service. This prevents any file locks or data corruption during the move
2. Next, copy the domain data to your NAS share. Copy the entire Domains folder from your current location (Windows Default: C:\SmarterMail\Domains | Linux Default: /var/lib/smartermail/Domains). If moving all domains, copy the entire Domains folder. If moving specific domains, you can copy individual domain folders.
3. Update the domain paths in SmarterMail. This entails editing domains.json (Windows Default: C:\Program Files (x86)\SmarterTools\SmarterMail\Service\Settings\domains.json) and update the path for each domain to point to the new UNC path (e.g., \\NAS-Server\SmarterMail\Domains\domain.com).
4. Configure service permissions for UNC access. This is the critical step that often causes issues:
- Open Windows Services (services.msc)
- Find the SmarterMail service
- Go to the Log On tab
- Change from "Local System account" to "This account"
- Enter credentials for a domain/network account that has full permissions on the NAS share
- Click Apply and restart the SmarterMail service
5. Finally, verify and test the migration. Start the SmarterMail service and verify domains load correctly, test login and mail delivery across multiple domains, and check logs for any access errors.
Important Considerations
- Permissions are critical: The most common issue when using UNC paths is permissions. The account running the SmarterMail service MUST have full read/write permissions on the NAS share. This typically won't be an issue on domain-authenticated networks but can cause problems in workgroup environments.
- UNC paths vs. mapped drives: You must use UNC paths (e.g., \\server\share\path) rather than mapped drives (e.g., Z:\path) because mapped drives are user-level and won't be available to the service.
- Performance: NAS storage will be slower than local storage due to network latency. For high-volume mail servers, this could impact performance.
- Archiving: You can also configure message archiving to use NAS storage, and each domain can have its archive in a separate location if needed.
- Alternative per-domain configuration: Instead of moving all domains at once, you can move domains individually by updating just their specific paths in domains.json.