Mail Attachment Downloader PRO Rules Server: the Windows service

PRO Rules Server runs Mail Attachment Downloader 4.0 as a Windows service, so your rules and Watches keep running 24x7, even when nobody is signed in to Windows. It works on Windows Server or on a desktop with Windows 10 or later.

The service in 4.0

  • PRO Rules Server is the edition with the service. The other editions run in the program only.
  • Watches run as a service. Folder, network share, cloud folder and DocuSign Watches (PRO Rules Client and up) and Watches of database tables, Slack and Microsoft Teams channels (PRO Rules Server) keep checking in the background, about every 60 seconds.
  • Server-only steps run in the service: for example Send an email, Forward the email, Unzip, OCR, Merge PDFs, Split PDF, Save to a database, Run a script, Web hook and Fill a template.
  • Run summaries and notifications: the service can send a run summary and error alerts to Slack, Microsoft Teams, Discord, Google Chat, Telegram, ntfy, Pushover, a custom webhook or email.
  • Settings are copied to the service when you install or reinstall it. Change a setting in the program and reinstall the service to apply it.
  • The program and the service are the same build. The program's installer updates the service with it.
  • New in build 1081: the service runs CRM and ERP watches and steps (Dynamics 365 and Business Central sign in there with your own app registration), keeps a restored account up to date after its own backup runs, and adds its runs to Extract data's lists. Reinstall the service to pass it new settings.

Compare the editions.

Installing the service step by step

Coming from 3.x? The steps below are for 4.0. In 4.0 the service is installed from the Schedule tab, on its Service schedule page, not from a Service tab. Version 4.0 installs side by side with 3.x, and the service has one name in every version, so only one service can be installed at a time: uninstall the 3.x service first, from the Service tab of 3.x, then install the 4.0 service in Schedule › Service schedule. For the 3.x pages, see 3.x plans and 3.x features.

Get the latest build

Before contacting support, or if anything doesn't work as expected, make sure you have the latest build. The program and the service are always the same build. The program looks for a newer build when it starts and once a day, and shows an Update available banner. Click Install...: the program downloads the installer, checks that Gearmage signed it, then closes and installs it, and the service is updated with it. Nothing installs without your click, and the service never updates itself.

To look right away, open Settings › Updates and click Check now. The same page shows the version you have. The release notes list what changed in each build. You can also download a build from the link in your license email: see How to get the latest build.

Your settings are kept when you update. We still recommend a backup first: in Settings › Export / Import settings, click Export settings (passwords are not exported). Or in Settings › Logs and support, click Settings folder under Client and choose Save settings as a zip.... The Service box on the same page has the service's own settings and logs folders.

Updating? The installer updates the service with the program, and its History is kept. If the service can't be updated, uninstall it in Schedule › Service schedule with Uninstall service, install the new build, then install the service again. If Sysinternals Process Explorer is running, close it: it can stop the service from being fully uninstalled. If the service still won't uninstall, see "The service won't stop or uninstall" in How to get the latest build.

Before you install the service

The service runs with a copy of your settings, under its own Windows account. Get everything working in the program first, then install:

  • Each account works on its own. Set it up and click Test Connection in the mail server settings. See Set up your mail account and Check that your account is set up correctly.
  • Save password is ticked for every account that uses a password. Accounts that sign in with the browser (Gmail, Outlook.com, Microsoft 365) don't need one.
  • A Connect and Download from the program works, with the rules you want the service to run.
  • Save folders are reachable by the service. Network folders must be UNC paths such as \\server\share\folder, not mapped drive letters: the service can't see mapped drives.
  • In Settings › Startup and tray, After login, run the program with this account is unticked. The install won't start while it's on.
  • The App schedule will be turned off. The service has its own schedule. If Schedule › App schedule is on, the install asks to turn it off, so both don't download the same emails. Its choices are kept, and uninstalling the service offers to turn it back on.
  • The program runs as administrator, so it can follow the service's status. If it doesn't, the Service schedule page says "Not running as administrator" and offers Relaunch as admin and Always run as admin. The install asks Windows for permission either way.

Microsoft 365 and Google Workspace accounts take the sign-in you made in the program with them, and your organization's sign-in policies or a password reset can end it. You can sign in through your organization's own app registration instead. For Microsoft 365, app-only access (with a client secret) doesn't depend on anyone's sign-in, so the service keeps running. Setup guides: Microsoft 365 (Entra) and Google Workspace. See also Custom app registration.

Proton Mail users: the service downloads through Proton Mail Bridge, so Bridge must be running too, signed in as the same Windows user. Downloads fail until Bridge starts.

Install the service

Schedule, Service schedule page: Not installed, Install the service for with an account, the Install service button, Sync status, and How the service runs with Check every and Auto start on bootup
The Service schedule page before the service is installed.
  1. Open Schedule › Service schedule. The Service schedule switch at the top of the main window opens it too.
  2. Under How the service runs, set Check every in hours and minutes, more than 0, and tick Auto start on bootup. Tick Also download new email as soon as it arrives if you want that too.
  3. Leave Service type on LocalSystem, and leave Skip validation unticked, so the install checks your accounts. See Service type below if the service must run as a specific user.
  4. Choose the account in the Install the service for box at the top of the page: the service downloads for this account only. For several accounts, pick <multiple@multiple>, click Select accounts..., tick them and click Validate and use selected.
  5. Click Install service and allow the Windows prompt. If the App schedule is on, the program first asks to turn it off. The page lists the install's steps as they happen, such as "Checking the settings" and "Starting the service and signing in to each account", each with the time it took.
  6. Check the status: the page says "Running for" and the account, with the schedule and the Windows account it runs as. The service downloads every time the Check every time passes, even after you sign out of Windows.

What the install checks

The service only starts if everything it needs works. For each account it will use, including accounts that "Send mail" rule actions send from, the install:

  • copies just that account's settings, and its password into the service's own encrypted store;
  • signs in to the mail server, as the service;
  • checks that the account's save folder, and the save and "Copy saved file" folders of its rules and of the global rules, can be written to by the service's Windows account. It does this by writing and deleting a small test file.

If anything fails, the install is undone and one message lists every account or folder with the reason (for example access denied, or a mapped drive the service can't reach) and what to do. Fix them, or deselect the account, and click Install service again. The page's Service activity list keeps each install and its result: click Problems to see only what went wrong.

Check that the service is working

  • Status: Schedule › Service schedule shows whether the service is running, its last run with the files it saved, and its next run. Hover over the Service schedule switch at the top of the main window to see if it's running. When it's running, Run now on the page makes it download at once.
  • Errors: the service's sign-in and download errors show in the program and say what to do. For example, when a Gmail or Microsoft sign-in has been revoked: sign in again in the program, then reinstall the service. For Microsoft 365, app-only access avoids this. If the service stops, the Service schedule page says why when it can tell, and offers Start the service.
  • What the service downloaded: in the Downloads tab, click View and choose The service to see the service's runs and files.
  • Sync status: before each Connect and Download, at uninstall and when an account is loaded, the program copies each account's download state from the service, so it doesn't download the same emails again. Click the Sync status line on the Service schedule page to see when each account was last synced, or to Sync now.

Changing settings after the service is installed

The service uses the copy of your settings it got when it was installed. Changes you make in the program don't reach it until you reinstall it. When you change a setting while the service is installed, the Service schedule page shows Reinstall to apply changes. A change under How the service runs, or another account in the account box, is kept and marked "Changed: Reinstall to apply".

  1. Make your changes, and test them with Connect and Download.
  2. In Schedule › Service schedule, click Reinstall.... It uninstalls the service and installs it again with your new settings. Windows asks for permission twice.

You can also click Uninstall service, then Install service. Uninstalling stops the service and removes its copy of your accounts and passwords. Either way, each account's download state and History come back from the service first, and go to it again.

Service Frequently Asked Questions

Changing configuration settings after service installation

Once you have successfully installed the Windows service, any changes you make to any configuration as a user will NOT take effect on the service. The service has a copy of the configuration from the time you installed it, and the Service schedule page (Schedule tab) shows Reinstall to apply changes when you change something.

To apply your changes, click Reinstall... on that page. See Changing settings after the service is installed.

Service type

By default the service is installed with the 'LocalSystem' account. This is the recommended setting.

Alternatively, you can select 'User' in the Service type box under How the service runs to restrict access. On a domain, you can also choose 'gMSA' and enter a group Managed Service Account in gMSA account (DOMAIN\name$), which needs no password. Please note that when you select 'User', the account should have Local Administrative rights for it to work properly.

If you choose to install the service as a User or non-administrator, it will require more effort to ensure the service has all write permissions in all the right places in order to enable it to start up successfully. Support for this kind of non-administrative type of account is limited at this time.

Network folders are reached with the service account's network identity. For LocalSystem that's the computer's account (for example DOMAIN\PC$), so the share must allow that computer to write to it.

Read and Write access to all necessary folders

The account the service runs as (see Service Type) needs read AND write access to every save folder: each account's save location and the save and "Copy saved file" folders of its rules and the global rules.

Since build 1036 the install checks this as the service's own Windows account, by writing and deleting a small test file in each folder, and lists every folder it can't write to with the reason. Use \\server\share paths for network folders: the service can't see mapped drive letters. You can run the same check before installing with Validate and use selected in the Select accounts window.

Troubleshoot service install or startup

A failed install lists each account or folder that failed and what to do, and undoes itself, so you can fix the problem and click Install service again. See What the install checks.

For more detail, look at the Service activity list in Schedule › Service schedule, or click Logs... › Open logs folder there (StartServiceLog.txt covers the install and start). Connection diagnostics on the same page shows the service's last connections and sign-ins, stage by stage.

Still stuck? Click Submit a bug report... in Settings › Logs and support. We should be able to look into your issue within a day.

Viewing service running status

Open Schedule › Service schedule. It shows whether the service is running, for which account, its schedule, its last run with the files it saved, and its next run. Hover over the Service schedule switch at the top of the main window for a quick look.

If you start the program as a regular user, it can't follow the service's progress. The page then says "Not running as administrator": click Relaunch as admin, or Always run as admin to have it start that way every time.

If the service isn't running, the page says why when it can tell. You can also check ServiceLog.txt in the service logs folder (Logs... › Open logs folder on the same page).

To see the files the service downloaded, open the Downloads tab, click View and choose The service.

Email Account

When you install the Service, the service will only install and download attachments for the Email account you've picked in the Install the service for box of Schedule › Service schedule, with the same settings you have for that email account.

If you want the service to run for multiple accounts, pick <multiple@multiple> in that box, click Select accounts... and select the accounts, then install the service. Only these accounts, and any accounts that "Send mail" rule actions send from, are copied to the service. If one account fails during a run, the others still run.

Passwords for email accounts

You MUST have the Save password checkbox checked for all accounts that sign in with a password and that you want the service to download attachments for. The install copies each password into the service's own encrypted store. Accounts that sign in with the browser (Gmail, Outlook.com, Microsoft 365) take their sign-in with them instead.

If you change a password, or a provider cancels an app password, update it in the program and reinstall the service.

Frequently Asked Questions

How do I run several accounts at once?

Pick <multiple@multiple> in the Account box of the main window, click Choose accounts..., tick the accounts and click Validate and use selected. Then click Connect and Download. For the service, pick <multiple@multiple> in Install the service for on Schedule › Service schedule. See Download from several accounts at once.

What are PRO Rules and why do I need them?

Each account has its own Account rule tab: what to search, which files to keep and where to save them. PRO Rules are rules for every account at once, run from the top of the list down. A rule picks emails or files by its conditions, saves them where and how you say, then runs its steps: convert to PDF, upload, send to document management, save data to a database and more.

To start, open the PRO Rules tab and click Move Account rules to PRO Rules...: each account's settings become a rule of its own there, shown to you first.

How do I change the order of PRO Rules?

Drag and drop the rule in the PRO Rules list, or right-click it and use Move in the list (Move to top, Move up, Move down, Move to bottom). Put catch-all rules at the bottom.

Why does the first run look at my older mail?

History remembers every email each account has seen, so nothing is downloaded twice. On the first run nothing has been seen yet, so the program looks at the mail in the folders you chose. When a folder holds more older emails than you allow, the run waits and shows how many, and you choose: download them, or skip them (Ask me first when a folder has more than).

To start from a date instead, see the next question. After the first run, only new mail is downloaded.

How do I download from a given date?

For one account: open its Account rule tab, page Search, and set the Start date under Search between dates.

With PRO Rules for every account: set the Start date in the PRO Rules tab. It applies to every account and overrides each account's own dates.

How do I download the same attachments again?

Use Redo... in the menu next to the main button. Pick the dates and folders, then what to do: download the emails History doesn't have yet, download or process emails again, or erase them and download them again. Tick Inline content (slower) on the account's Search page if you also want pictures placed inside the email body.

If the service runs the account, make the change in the program, then click Reinstall... on Schedule › Service schedule.

Google blocked the sign-in or sent me a security alert

Google doesn't accept passwords from other programs. Gmail and Google Workspace accounts sign in with Google in your web browser instead: make sure Gmail is selected in the mail server settings, click Test Connection, and sign in when your browser opens. See Signing in with your browser.

Google may send a "new sign-in" or "access granted" security alert the first time you allow the program. That's expected. More info about security

How do several PRO Rules work together?

Each rule has conditions, where and how to save, and steps to run afterwards. Rules run from the top of the list down: when a rule's conditions match an attachment or the email body, the file is saved as that rule says and its steps run. Order matters, so Check rule order... finds rules that can never run because one above takes their files. See PRO Rules on the features page.

How do I test PRO Rules?

Open a rule and click Test this rule..., or click Test all rules... in the PRO Rules tab. You pick real emails; the program shows which rule saves each file, without changing anything: files go to a temporary folder, and nothing is moved or deleted.

After a real run, the Downloads tab lists each file with what happened to it.

Having trouble connecting?

Start with the message the program shows: sign-in problems now say what the provider needs. For Yahoo, AOL, iCloud and other providers under Other, click Set up <provider>… and follow the setup guide. Then open Connection diagnostics to see which stage fails.

You may be behind a corporate firewall or something may be blocking your connection. Check with your IT administrator to ensure that your host, port, TLS and IMAP/POP3 information is correctly entered and that you have a direct connection to the mail server. If the connection still fails, send us a bug report from the program.

I'm using gmail and some attachments aren't being downloaded.

Some attachments are inlined, check the 'Inline attachments' checkbox in the Search tab. If the attachment still doesn't download, contact issues@gearmage.com.

Why is Selected Folders grayed out?

Some mail servers only support the POP3 mail server protocol.

The POP3 protocol inherently does not support folders whereas the IMAP protocol does.

To overcome this, first, make sure that your mail server supports IMAP and then change the protocol via the Settings button to IMAP.

Setting the date doesn't seem to work

If you are using POP3 (in the mail server tab, see if POP3 is selected), the program will still need to scan/download (and throw away) attachments from the start of time even if the date is set.

File type limitations

A format of attached files that is sent by Outlook (TNEF) is not supported if your mail server does not convert them. These will be ignored by the program.

I see [THROTTLED] in the Status, what is that?

Some email providers like Gmail will end up throttling your connection if we end up processing too many requests for a given email account.

Where are the settings stored?

The program's settings are stored in the users %AppData%\MAD folder based on the logged on Windows user. The service keeps its own copy in C:\ProgramData\MADService. Open the service's from Schedule › Service schedule with Settings folder, where you can also save them as a zip file (without passwords or sign-in tokens).

Related

Helpful Resources

Find Solutions to Common Problems

Before reaching out, explore these quick-access links to guides, updates, and troubleshooting resources. Most common questions are answered here—saving you time and getting you back on track faster.

Upgrade to Pro

Get the PRO Rules Server edition

We try to ensure our programs are bug free and adapt to changes that email providers continually make. The free versions are fully functional software for non-commercial use only.