Installation and Upgrade Using a Command Line Interface
SmarterMail has the ability to be installed using a simple Command Line Interface (CLI). This can come in handy when automating the installation process. It also gives system administrators the ability to specify which User Account that SmarterMail installs under, which can limit the security risk and help control access to the server. For example, you may want to specify a service user with very limited access to other applications and services on the server, thereby mitigating the potential for cross-service exploitation.
Jump to:
Things to Know
- Release Notes for all current Builds of SmarterMail are available on the SmarterMail Release Notes page of our website. It's a great idea to familiarize yourself with all changes made to SmarterMail in the last few public releases.
- The current Build of SmarterMail can be found on the SmarterMail Downloads page of our website. Here you can get the current Build number to reference during the installation process.
- Finally, review the System Requirements before attempting any installation.
Before You Start
During a standard installation of SmarterMail using the .EXE, SmarterMail will download any prerequisites it needs, and install those alongside the standard application files. It also will automatically configure a website in IIS, an app pool, and any other things necessary for SmarterMail to "just work" after it's installed. However, installing SmarterMail via CLI does not do that. All the CLI installation does is install the program files. Therefore, any prerequisites will need to be installed and configured prior to running the SmarterMail CLI installer .
- Have a user account and password set that you'll want to use for the installation.
- Ensure Internet Information Services (IIS) is installed and running on the server.
- Download and install .NET core components. This includes the .NET Core Hosting Bundle (at the time of this
writing it's the .NET Core Hosting Bundle for .NET 10), Application Request Routing module, and the URL
Rewrite Module 2.
Note: The links above are subject to change. Please check the links for the latest version of the .NET Core Hosting Bundle especially, and Application Request Routing and URL Rewrite modules.
You will also want to set up the following in IIS:
- App Pool - You'll want to set up an App Pool for SmarterMail. You can name it whatever you like, but the default is generally "SmarterMail".
- Website - SmarterMail does require a website to run, so set one up initially. You can point it to wherever you like initially.
- OPTIONAL: You may want to configure the Centralized Certificate Store if you intend on setting up custom SSL certificates for any SmarterMail sites you configure. You will also want to properly configure bindings for your default website.
Installing SmarterMail Via CLI
SmarterMail's Windows installer accepts the following properties. The three "SERVICE_USER_*" properties are what bind the SmarterMail service to your authorized account. You will want to run the installation command using an elevated command prompt (i.e., Run as Administrator).
Installer Arguments
- SERVICE_USER_TYPE (Required) - Tells the installer to run the SmarterMail service under a specific user account. For example: "user".
- SERVICE_USER_ACCOUNT (Required) - The account the service runs as. This must have full read/write access to the shared hub/node data directories/shares. Use "DOMAIN\User" for a domain account or ".\User" for a local account. For example, ".\SmarterMail".
- SERVICE_USER_PWD (Required) - The password for the service account. For example: "Your5tr0ngP@5s"
- /exenoui (Required) - Runs the bundled EXE installer without its UI. (I.e., "silently").
- /qn (Required) - Passes quiet/no-UI mode through to the underlying MSI.
- /L*V <path> (Strongly recommended) - Writes a verbose installation log. This allows you to confirm the service account was applied and diagnose failures. For example, use c:\install-log.txt.
Installation Command
Ideally, you have downloaded the most recent Build of SmarterMail and placed it in a directory on your local machine. You'll reference this path in your installation script. The general, bare bones script looks like this:
$lt;path-to-installation-file.exe>/exenoui /qn /L*V SERVICE_USER_TYPE="user"
SERVICE_USER_ACCOUNT="\" SERVICE_USER_PWD=""
Example with data
C:\Staging\SmarterMail_9733.exe /exenoui /qn /L*V C:\install-log-Aug312026.log SERVICE_USER_TYPE=".\user"
SERVICE_USER_ACCOUNT=".\smartermail" SERVICE_USER_PWD="Your5tr0ngP@5s"
Installation
Once the command has been entered, SmarterMail will silently install. It can take take several minutes for the product to install and for all directories to get set up. To make sure the installer is running, you'll look for folders created in the following default locations:
- C:\SmarterMail - This will also have three (3) subfolders: Certificates, Logs, and Spool
- C:\Program Files (x86)\SmarterTools\SmarterMail - This will have several subfolders as well: Assets, MRS, Resources, Service, Tools, as well as the License Agreement.
If you've added verbose logging, you can review that as well.
Finalizing the Installation
After you've verified that the installation has completed, it's time to finalize things. This includes:
- Ensuring that the site that was set up in IIS points to the proper location: C:\Program Files (x86)\SmarterTools\SmarterMail\MRS
- Ensuring the site is started in IIS.
- Ensuring the SmarterMail servers (mailservice) is running in Services.
Once you've verified everything, browse the site and begin the set up process!
Welcome to SmarterMail
After SmarterMail is installed, a window opens in your default browser that takes you to the web interface for your installation. The URL used will match what was configured during the setup process, and if nothing was changed (e.g., no changes to the hostname or port), your browser will open localhost:9998/interface/setup#/.
The first thing you'll do is select which version of SmarterMail you want to install: Professional or Enterprise, or SmarterMail High Availability.
- SmarterMail Professional or Enterprise - This is the typical, single server installation of SmarterMail.
- SmarterMail High Availability - This is the installation process for installing a node (either the first node or subsequent nodes) that resides in a SmarterMail High Availability cluster. SmarterMail High Availability requires a partnership with SmarterTools. For more information, contact sales@smartertools.com.
After selecting your installation type, you'll set up a few pieces of information to get started using SmarterMail:
- You'll create the primary system administrator account
- You'll set the default base path for storing all SmarterMail data. This includes domain data, spool, log files, and POP and IMAP retrieval data, etc. By default, this path is C:\SmarterMail\
Once you have set up this information, you will be redirected to the webmail interface and automatically logged in to SmarterMail using the system administrator you created. From there, you can add in your first domain, then add users to that domain, you can modify your default domain template, adjust the security settings as needed, and more.
Upgrade Process
The upgrade process is pretty much the same as the installation process using the CLI. You simply adjust the SmarterMail version in your install script, updating the Build number as needed. It's a good idea to follow the Best Practices for an upgrade as well. This includes:
- Stop the SmarterMail service.
- Stop the SmarterMail site in IIS and it's associated App Pool.
- Uninstall SmarterMail however you like: via CLI or using Add/Remove Programs.
- Run your installation script.
- Restart the SmarterMail Service.
- Restart the SmarterMail App Pool and website in IIS.
- Navigate to SmarterMail in a browser to ensure it's started up and that the version number has changed.