If you are having issues archiving from Microsoft 365 / Exchange Online via Graph, it is possible to revert to EWS.

 Restore a backup of MailStore's configuration

If you have a backup of a MailStoreMaster.fdb/.key file from before changing to Graph, you can revert configuration to that point by stopping the service, reverting these two files, and starting the service again. Do not restore the Storage Locations or any other files, just these two files.

 Use the API to create new archiving profiles

To use the API to create profiles, go to MailStore Client as admin, Administrative Tools > API > Command Prompt (or use the HTTPS API, if you would prefer).

First retrieve the existing profiles with this command: GetProfiles --raw=true

You'll need to identify a single profile, without the [ and ] file boundaries, a sample starting object:

{
   "id": 9,
   "version": 33,
   "owner": "admin",
   "type": "B",
   "connector": "MS365GraphGlobal",
   "name": "Microsoft 365 Mailboxes",
   "details": {
      "credentialId": "2",
      "deleteFlaggedMails": "0",
      "disableAutoExcludeSourceFolders": "0",
      "excludeUnRead": "0",
      "maxThreads": "5",
      "performDirectorySync": "0",
      "userListExclude": "1"
   },
   "serverSideExecution": {
      "automatic": "false"
   }
}
  • Remove the line "id": ...
  • Remove the line "version": ... (the numbers will vary).
  • Change the "connector": "MS365GraphGlobal", to "connector": "Microsoft365",
  • Optionally, update the name to differentiate. This is not needed as the UI does show EWS vs Graph, but it can be helpful when looking at Recent Results.
  • Replace the double quotes " with single quotes '
  • Remove all line breaks. (If you're using an editor that does regex, replace all sets of whitespace with a single space)

The resulting JSON object:

{
   "owner": "admin",
   "type": "B",
   "connector": "Microsoft365",
   "name": "Microsoft 365 Mailboxes (EWS!)",
   "details": {
      "credentialId": "2",
      "deleteFlaggedMails": "0",
      "disableAutoExcludeSourceFolders": "0",
      "excludeUnRead": "0",
      "maxThreads": "5",
      "performDirectorySync": "0",
      "userListExclude": "1"
   },
   "serverSideExecution": {
      "automatic": "false"
   }
}

Now we have a single JSON object in the format expected, use the command: CreateProfile --raw=true --properties="{ ... json object ... }"

A full command example:

CreateProfile --raw=true --properties="{ 'owner': 'admin', 'type': 'B', 'connector': 'Microsoft365', 'name': 'Microsoft 365 Mailboxes (EWS!)', 'details': { 'credentialId': '2', 'deleteFlaggedMails': '0', 'disableAutoExcludeSourceFolders': '0', 'excludeUnRead': '0', 'maxThreads': '5', 'performDirectorySync': '0', 'userListExclude': '1' }, 'serverSideExecution': { 'automatic': 'false' } }"

The response will be the ID number of the profile that was created:

{
  "id": 15
}

You could also use the HTTPS API, refer to the MailStore Article - Using the API -- If you are comfortable with a modern replacement of postman, this is straightforward.

 Switch to gateway/journal-based archiving

Or finally, you might also consider switching from mailbox-based archiving to journal-based archiving, in general using a journal- or gateway-based archiving solution is both faster (less resource intensive) and more reliable (users cannot delete a message before it is archived). I would highly recommend using journal-based archiving whenever possible.

Review MailStore Article - Choosing the Right Archiving Strategy for a breakdown of the differences.

For Microsoft 365, this requires an external mailbox, MailStore Gateway is a companion product (available at no cost) that can fulfill this need, or an external mailbox can be used if it has sufficient capacity, but be aware that the journal mailbox receives copies of all mail sent or received in your company, so it is both high traffic and security sensitive, so MailStore Gateway is recommended. Happy to review the specifics with you.

In general, what you need is a server that is online with a static IP and can receive traffic on TCP port 25. A Dynamic IP service can be used, but it is best to avoid them if needed. Create a DNS "A" record (if your company is example.com, consider using "gateway.example.com") pointing to the external IP. You can of course use NAT or other port forwarding to route the traffic, it is up to you how you manage the networking details.

When configuring the Gateway, use the same "gateway.example.com" domain, it will create a mailbox mbx-... at the same domain, this is the address you use when creating the Exchange Online journal rule.

 Article links / references