<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>mailstore-notes.dwlab.me - MailStoreSPE</title>
    <link rel="self" type="application/atom+xml" href="https://mailstore-notes.dwlab.me/products/mailstorespe/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2024-08-21T00:00:00+00:00</updated>
    <id>https://mailstore-notes.dwlab.me/products/mailstorespe/atom.xml</id>
    <entry xml:lang="en">
        <title>Grant a user read access to all archives via the audit user function</title>
        <published>2024-08-21T00:00:00+00:00</published>
        <updated>2024-08-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/grant-a-user-access-to-read-all-archives/"/>
        <id>https://mailstore-notes.dwlab.me/articles/grant-a-user-access-to-read-all-archives/</id>
        
        <summary type="html">&lt;p&gt;MailStore allows the &lt;em&gt;admin&lt;&#x2F;em&gt; user to unblock their access to the archive, granting them access to all archives, if admin access to the archive is unblocked.&lt;&#x2F;p&gt;
&lt;p&gt;It may be useful to grant only &lt;em&gt;Read&lt;&#x2F;em&gt; access to all archives without granting full admin permissions.&lt;&#x2F;p&gt;</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>EML Export from Storage Location in MailStore &lt;11</title>
        <published>2024-08-02T00:00:00+00:00</published>
        <updated>2024-08-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/eml-export-from-mailstore-pre-11/"/>
        <id>https://mailstore-notes.dwlab.me/articles/eml-export-from-mailstore-pre-11/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/eml-export-from-mailstore-pre-11/">&lt;p&gt;Storage Locations created in MailStore 10 or earlier can be exported to &lt;em&gt;EML&lt;&#x2F;em&gt; files using the internal metadata. This is useful if the database is corrupt and cannot be repaired, as the &lt;em&gt;EML&lt;&#x2F;em&gt; files can be used to re-archive the messages into a new storage location.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;This article applies to MailStore 10 and earlier &lt;em&gt;only&lt;&#x2F;em&gt;, as of MailStore 11 an entirely different process is used for recovering from a damaged FDB database.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.mailstore.com&#x2F;en&#x2F;products&#x2F;mailstore-server&#x2F;changelog&#x2F;#mailstore-server-11-0&quot;&gt;MailStore 11&lt;&#x2F;a&gt; introduced new recovery records, this article only applies to Storage Locations created with MailStore 10 or earlier, that have not been upgraded to MailStore 11 or later.&lt;&#x2F;p&gt;
&lt;p&gt;If you have a damaged MailStore Storage Location&#x27;s FDB file (&lt;em&gt;prior to MailStore 11&lt;&#x2F;em&gt;), it is often possible to recover and export the messages from the database using the internal recovery records.&lt;&#x2F;p&gt;
&lt;p&gt;For the purposes of this article, we will assume the following paths:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;description&lt;&#x2F;th&gt;&lt;th&gt;example path&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Damaged Storage Location&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;C:\MailArchive\2018-03&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;EML export destination&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;D:\EML&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Prepare the environment:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Avoid using network drives for storing files.&lt;&#x2F;li&gt;
&lt;li&gt;Use locally mounted drives (ideally SAS, NVMe, SATA, or iSCSI). Avoid external storage such as USB drives and network paths.&lt;&#x2F;li&gt;
&lt;li&gt;For performance reasons, consider placing the Storage Location and EML export destination on separate physical drives.&lt;&#x2F;li&gt;
&lt;li&gt;Ensure you have ample free space. It&#x27;s recommended to have at least double the size of the corrupted storage location available, but more may be needed in certain cases.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Prepare MailStore Server:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;If you have any &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt; profiles configured to run automatically they may re-archive messages from the original source, so it is recommended to disable all archiving profiles during this process.&lt;&#x2F;li&gt;
&lt;li&gt;Shut down MailStore Server completely or detach the problematic storage location to ensure it&#x27;s not in a failed state.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Run the Recovery Command:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Launch a Windows command prompt, enter the following command, substituting paths as necessary:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd.exe&quot; class=&quot;language-cmd.exe &quot;&gt;&lt;code class=&quot;language-cmd.exe&quot; data-lang=&quot;cmd.exe&quot;&gt;&amp;quot;C:\Program Files (x86)\deepinvent\MailStore Server\MailStoreServer_x64.exe&amp;quot; --recover --inputDir=&amp;quot;C:\MailArchive\2018-03&amp;quot; --outputDir=&amp;quot;D:\EML&amp;quot;
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Wait for MailStore to process all &lt;em&gt;DAT&lt;&#x2F;em&gt; files, extracting each to &lt;em&gt;EML&lt;&#x2F;em&gt; files.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Re-Archiving Process:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;(Optional)&lt;&#x2F;em&gt; Create a new Storage Location (&lt;em&gt;MailStore Client&lt;&#x2F;em&gt; &amp;gt; &lt;em&gt;Administrative Tools&lt;&#x2F;em&gt; &amp;gt; &lt;em&gt;Storage&lt;&#x2F;em&gt; &amp;gt; &lt;em&gt;Storage Locations&lt;&#x2F;em&gt; &amp;gt; &lt;em&gt;Create Storage Location&lt;&#x2F;em&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;Go to &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt; &amp;gt; Create a new profile, select &lt;em&gt;EML and MSG Files&lt;&#x2F;em&gt; (or &lt;em&gt;Directory (File System)&lt;&#x2F;em&gt;) files as the source.&lt;&#x2F;li&gt;
&lt;li&gt;Choose the &lt;em&gt;MailStore Export&lt;&#x2F;em&gt; option to re-archive the messages back to their correct location.&lt;&#x2F;li&gt;
&lt;li&gt;Ensure the corrupted storage location is not attached during this process otherwise messages may be skipped.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Post-Recovery Cleanup:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Once you verify the results, delete the corrupt storage location and the EML export destination. directory.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The extracted &lt;em&gt;EML&lt;&#x2F;em&gt; files can be used with email software that supports EML format, or MailStore itself.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;encryption-keys&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#encryption-keys&quot; aria-label=&quot;Anchor link for: encryption-keys&quot;&gt;🔗&lt;&#x2F;a&gt;Encryption Keys&lt;&#x2F;h2&gt;
&lt;p&gt;MailStore will attempt to read the keys from the &lt;em&gt;FDB&lt;&#x2F;em&gt; database files on disk if not specified, but if the database is corrupt it may not be possible to retrieve the keys automatically.&lt;&#x2F;p&gt;
&lt;p&gt;You can add the &lt;code&gt;--securityKey&lt;&#x2F;code&gt; and&#x2F;or  &lt;code&gt;--masterKey&lt;&#x2F;code&gt; parameters to the command line to specify the security and master keys as needed. Please contact support if you need assistance retrieving the keys as this process varies depending on the version of MailStore (and may not be possible in all cases).&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd.exe&quot; class=&quot;language-cmd.exe &quot;&gt;&lt;code class=&quot;language-cmd.exe&quot; data-lang=&quot;cmd.exe&quot;&gt;MailStoreServer.exe --recover
     --inputDir=&amp;quot;C:\FileGroup1&amp;quot;
     --outputDir=&amp;quot;D:\EML&amp;quot;
    [--securityKey=&amp;quot;...&amp;quot;]
    [--masterKey=&amp;quot;...&amp;quot;]
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;notes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notes&quot; aria-label=&quot;Anchor link for: notes&quot;&gt;🔗&lt;&#x2F;a&gt;Notes&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;EML&lt;&#x2F;em&gt; files are created with &lt;code&gt;X-MailStore-*&lt;&#x2F;code&gt; headers that contain metadata to allow for re-archiving or other analysis.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;EML&lt;&#x2F;em&gt; files can be:
&lt;ul&gt;
&lt;li&gt;Re-archived into the correct location in MailStore.&lt;&#x2F;li&gt;
&lt;li&gt;Opened and accessed by any email software that supports &lt;em&gt;EML&lt;&#x2F;em&gt; files, like Thunderbird.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;DAT&lt;&#x2F;em&gt; files contain fragments from various messages.&lt;&#x2F;li&gt;
&lt;li&gt;Messages in &lt;em&gt;DAT&lt;&#x2F;em&gt; files are not always in sequential order.&lt;&#x2F;li&gt;
&lt;li&gt;You may attempt to perform an export on an incomplete set of &lt;em&gt;DAT&lt;&#x2F;em&gt; files, only valid messages will be exported.&lt;&#x2F;li&gt;
&lt;li&gt;You may restore or replace &lt;em&gt;DAT&lt;&#x2F;em&gt; files and then export again to fill in missing messages if further &lt;em&gt;DAT&lt;&#x2F;em&gt; files are available.&lt;&#x2F;li&gt;
&lt;li&gt;Exporting again will create duplicate &lt;em&gt;EML&lt;&#x2F;em&gt; files, but these will be skipped by MailStore when re-archiving.&lt;&#x2F;li&gt;
&lt;li&gt;Special Case:
&lt;ul&gt;
&lt;li&gt;Storage Locations created in MailStore 10 or earlier, but with messages added by MailStore 11, may not export completely with this process.&lt;&#x2F;li&gt;
&lt;li&gt;In such cases, contact MailStore support for assistance.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Extracting unknown e-mail addresses from journal-type profile&#x27;s debug log</title>
        <published>2023-01-21T00:00:00+00:00</published>
        <updated>2023-01-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/"/>
        <id>https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/">&lt;h2 id=&quot;bulk-import-of-messages-without-a-list-of-all-known-e-mail-addresses&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#bulk-import-of-messages-without-a-list-of-all-known-e-mail-addresses&quot; aria-label=&quot;Anchor link for: bulk-import-of-messages-without-a-list-of-all-known-e-mail-addresses&quot;&gt;🔗&lt;&#x2F;a&gt;Bulk import of messages without a list of all known e-mail addresses&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;preface&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#preface&quot; aria-label=&quot;Anchor link for: preface&quot;&gt;🔗&lt;&#x2F;a&gt;Preface&lt;&#x2F;h3&gt;
&lt;p&gt;This article describes how to perform a one-time archive or migration of messages into MailStore where the messages are available in EML files, PST files, an Exchange journal mailbox or a Multidrop mailbox and there is no definitive list of users &#x2F; e-mail addresses available.&lt;&#x2F;p&gt;
&lt;p&gt;All steps are to be performed in MailStore Client, logged in as an admin, unless otherwise described.&lt;&#x2F;p&gt;
&lt;p&gt;I will be using &lt;code&gt;example.com&lt;&#x2F;code&gt; as the domain for my company in this article.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;licensing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#licensing&quot; aria-label=&quot;Anchor link for: licensing&quot;&gt;🔗&lt;&#x2F;a&gt;Licensing&lt;&#x2F;h3&gt;
&lt;p&gt;You will need a user license for each user for the archiving process. MailStore&#x27;s 30-day trial has a 500-user limit and can be used for the initial archiving, or you could import users in batches instead.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creating-the-initial-users-optional&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-the-initial-users-optional&quot; aria-label=&quot;Anchor link for: creating-the-initial-users-optional&quot;&gt;🔗&lt;&#x2F;a&gt;Creating the initial users (optional)&lt;&#x2F;h3&gt;
&lt;p&gt;To start off with, if you will eventually be using Directory Services to synchronize users then you can set it up first. This step is optional, and Directory Services is not actually needed at all, but by first synchronizing users it will reduce the number of users that need to be manually created.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ll be using the full e-mail address in this article but if your Directory Services synchronizes with Active Directory then it may use only the local part. You can modify the &quot;CreateUser&quot; API call slightly to accommodate. While it is possible to rename users&#x2F;archives after the fact it will save some time to use the correct configuration from the server.&lt;&#x2F;p&gt;
&lt;p&gt;If you aren&#x27;t using Directory Services or simply are not ready to synchronize users, you just need at least one user with an e-mail address attached to their account. You could edit the admin account and set &lt;code&gt;admin@example.com&lt;&#x2F;code&gt; for the address.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;archiving-profile&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#archiving-profile&quot; aria-label=&quot;Anchor link for: archiving-profile&quot;&gt;🔗&lt;&#x2F;a&gt;Archiving Profile&lt;&#x2F;h3&gt;
&lt;p&gt;You can archive from EML files, PST files of type &lt;em&gt;Multiple Users&lt;&#x2F;em&gt; or &lt;em&gt;Exchange Journal&lt;&#x2F;em&gt;, or &lt;em&gt;Multidrop&lt;&#x2F;em&gt; accounts, the process is similar for all message sources.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;eml-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#eml-files&quot; aria-label=&quot;Anchor link for: eml-files&quot;&gt;🔗&lt;&#x2F;a&gt;EML files&lt;&#x2F;h4&gt;
&lt;ul&gt;
&lt;li&gt;Go to &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Create a new profile --&amp;gt; &lt;em&gt;E-mail Files&lt;&#x2F;em&gt; --&amp;gt; &lt;em&gt;Multiple Users&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Set the &lt;em&gt;Directory&lt;&#x2F;em&gt; to a directory that contains the EML files to be archived.&lt;&#x2F;li&gt;
&lt;li&gt;Set &quot;Messages with unknown e-mail addresses&quot; to &quot;Don&#x27;t archive&quot;.&lt;&#x2F;li&gt;
&lt;li&gt;Leave &quot;Delete them in origin mailbox&quot; unchecked.&lt;&#x2F;li&gt;
&lt;li&gt;Run the archiving profile.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h4 id=&quot;running-the-archiving-profile-for-the-first-time&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#running-the-archiving-profile-for-the-first-time&quot; aria-label=&quot;Anchor link for: running-the-archiving-profile-for-the-first-time&quot;&gt;🔗&lt;&#x2F;a&gt;Running the archiving profile for the first time&lt;&#x2F;h4&gt;
&lt;p&gt;You can start with a subdirectory that contains a few messages to understand the process, and later run the profile again against the same messages without duplicating any messages in the archive. Depending on the amount of mail you have to import, it may take several hours to perform the initial archiving run which generates the list we will use going forward.&lt;&#x2F;p&gt;
&lt;p&gt;Any user that already exists in MailStore at this point will have their messages archived, while messages that do not belong to any known user will have a debug log entry created, providing us a list of needed users.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;get-the-debug-log&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-the-debug-log&quot; aria-label=&quot;Anchor link for: get-the-debug-log&quot;&gt;🔗&lt;&#x2F;a&gt;Get the debug log&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Click &lt;em&gt;Details&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;You should see a number of messages that are skipped with the message &lt;code&gt;because the target user archive could not be determined based on the e-mail addresses&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Click on &lt;em&gt;Debug Log&lt;&#x2F;em&gt; and &lt;em&gt;Select in Explorer&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Copy the log file to another directory as MailStore will remove the file when you close the dialog.&lt;&#x2F;li&gt;
&lt;li&gt;Return to the details dialog and close it (this dialog blocks further access to MailStore Client).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You may want to open the log to take a look, in which case look for the lines that look like this:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;MailStore.Common.Interfaces.ServerUnmappableException: MailStore is unable to determine where to store this email. Please ensure that e-mail addresses are specified in the users&#x27; settings. Senders and recipients: noreply@mailstore.com, sherry.hall@example.com, frank.clark@example.com&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;noreply@mailstore.com&lt;&#x2F;code&gt; is an example of an external address, while the&lt;code&gt;@example.com&lt;&#x2F;code&gt; addresses belong to our example company in this documentation. Note that there may be any number of addresses, but most messages will just have two.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;get-the-e-mail-addresses-out-of-the-debug-log&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-the-e-mail-addresses-out-of-the-debug-log&quot; aria-label=&quot;Anchor link for: get-the-e-mail-addresses-out-of-the-debug-log&quot;&gt;🔗&lt;&#x2F;a&gt;Get the e-mail addresses out of the debug log&lt;&#x2F;h3&gt;
&lt;p&gt;We need to get the e-mail addresses from the debug log lines above into a list, one e-mail address per line, with all other punctuation and spaces removed. Duplicates will not cause errors, but will take time to process, so it is ideal to remove them from the list but it is not required.&lt;&#x2F;p&gt;
&lt;p&gt;There are a lot of ways you can do this, including doing it entirely by hand for a small number of users, or you could use any regex capable editor or other tools. If you are doing it manually and miss a user, just create the user and run the archiving process again, MailStore will skip the messages already in the archive.&lt;&#x2F;p&gt;
&lt;p&gt;Aside from preparing this list manually, I will describe three ways to extract the data from the debug log.&lt;&#x2F;p&gt;
&lt;p&gt;The goal is to change this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;log-entry&quot; class=&quot;language-log-entry &quot;&gt;&lt;code class=&quot;language-log-entry&quot; data-lang=&quot;log-entry&quot;&gt;MailStore.Common.Interfaces.ServerUnmappableException: MailStore is unable to determine where to store this email. Please ensure that e-mail addresses are specified in the users&amp;#x27; settings. Senders and recipients: noreply@mailstore.com, sherry.hall@example.com, frank.clark@example.com
MailStore.Common.Interfaces.ServerUnmappableException: MailStore is unable to determine where to store this email. Please ensure that e-mail addresses are specified in the users&amp;#x27; settings. Senders and recipients: joe.smith@example.com, frank.clark@example.com
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To a test file called &lt;code&gt;userlist.txt&lt;&#x2F;code&gt; that looks like this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;log-entry&quot; class=&quot;language-log-entry &quot;&gt;&lt;code class=&quot;language-log-entry&quot; data-lang=&quot;log-entry&quot;&gt;sherry.hall@example.com
frank.clark@example.com
joe.smith@example.com
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note that the original list had external addresses like &lt;code&gt;noreply@mailstore.com&lt;&#x2F;code&gt; that were removed, and also &lt;code&gt;frank.clark@example.com&lt;&#x2F;code&gt; was listed twice but is now only listed once.&lt;&#x2F;p&gt;
&lt;p&gt;If you built the &lt;em&gt;userlist.txt&lt;&#x2F;em&gt; file manually, move ahead to &lt;strong&gt;Create the users&lt;&#x2F;strong&gt;, otherwise read on for automated ways of creating the list.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;linux-bash-command-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#linux-bash-command-line&quot; aria-label=&quot;Anchor link for: linux-bash-command-line&quot;&gt;🔗&lt;&#x2F;a&gt;Linux &#x2F; bash command line&lt;&#x2F;h4&gt;
&lt;p&gt;The Linux&#x2F;WSL steps are &lt;a href=&quot;https:&#x2F;&#x2F;mailstore-notes.dwlab.me&#x2F;articles&#x2F;ServerUnmappableException&#x2F;linux_wsl&#x2F;&quot;&gt;located in a separate article&lt;&#x2F;a&gt; and will only take a couple of minutes to complete.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;manually-via-excel&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#manually-via-excel&quot; aria-label=&quot;Anchor link for: manually-via-excel&quot;&gt;🔗&lt;&#x2F;a&gt;Manually (via Excel)&lt;&#x2F;h4&gt;
&lt;p&gt;The Excel steps are &lt;a href=&quot;https:&#x2F;&#x2F;mailstore-notes.dwlab.me&#x2F;articles&#x2F;ServerUnmappableException&#x2F;excel&#x2F;&quot;&gt;located in a separate article&lt;&#x2F;a&gt; and only needed if you do not have access to a Linux console for a few minutes.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-the-users&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-the-users&quot; aria-label=&quot;Anchor link for: create-the-users&quot;&gt;🔗&lt;&#x2F;a&gt;Create the users&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Return to &lt;em&gt;MailStore Client&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Right click on the profile created earlier and select &lt;em&gt;Create Scheduled Task&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;em&gt;Copy CMD Line&lt;&#x2F;em&gt;, then cancel the scheduled task dialog.&lt;&#x2F;li&gt;
&lt;li&gt;Paste the line into your favourite text editor.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The details of the line will vary, mine looks like this:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --cred=&quot;admin@127.0.0.1&quot; -c import-execute --id=3 --user=&quot;admin&quot; --verbose&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;We need the part up to and including &lt;code&gt;-c&lt;&#x2F;code&gt;, so like this:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --cred=&quot;admin@127.0.0.1&quot; -c&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;First we need to create each user, which we can do using a &lt;code&gt;for&lt;&#x2F;code&gt; loop through the &lt;em&gt;userlist.txt&lt;&#x2F;em&gt; file created above.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd.exe&quot; class=&quot;language-cmd.exe &quot;&gt;&lt;code class=&quot;language-cmd.exe&quot; data-lang=&quot;cmd.exe&quot;&gt;for &amp;#x2F;F %x in (userlist.txt) do &amp;quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&amp;quot; --h=&amp;quot;localhost&amp;quot; --cred=&amp;quot;admin@127.0.0.1&amp;quot; -c CreateUser --userName %x --privileges &amp;quot;none&amp;quot;
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then set the e-mail addresses field:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd.exe&quot; class=&quot;language-cmd.exe &quot;&gt;&lt;code class=&quot;language-cmd.exe&quot; data-lang=&quot;cmd.exe&quot;&gt;for &amp;#x2F;F %x in (userlist.txt) do &amp;quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&amp;quot; --h=&amp;quot;localhost&amp;quot; --cred=&amp;quot;admin@127.0.0.1&amp;quot; -c SetUserEmailAddresses --userName %x --emailAddresses %x
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A note about using bare usernames (without the &lt;code&gt;@example.com&lt;&#x2F;code&gt; domain portion): You could remove the domain from the lines in &lt;em&gt;userlist.txt&lt;&#x2F;em&gt; and then when setting e-mail addresses replace the &lt;code&gt;--emailAddresses %x&lt;&#x2F;code&gt; part with &lt;code&gt;--emailAddresses %x@example.com&lt;&#x2F;code&gt; instead.&lt;&#x2F;p&gt;
&lt;p&gt;Creating totally different usernames and e-mail addresses (e.g. &lt;code&gt;fclark&lt;&#x2F;code&gt; and &lt;code&gt;frank.clark@example.com&lt;&#x2F;code&gt;) or listing multiple e-mail addresses is out of scope for this article, but you could modify the command lines above to match your environment.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;running-the-archive-profile&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#running-the-archive-profile&quot; aria-label=&quot;Anchor link for: running-the-archive-profile&quot;&gt;🔗&lt;&#x2F;a&gt;Running the archive profile&lt;&#x2F;h3&gt;
&lt;p&gt;Once your users are created, return to the &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt; panel and run your &lt;code&gt;Multidrop Mailbox (File System)&lt;&#x2F;code&gt; profile again, this time it should process all messages.&lt;&#x2F;p&gt;
&lt;p&gt;Click the &lt;em&gt;Details&lt;&#x2F;em&gt; link again to review the results. If there are any messages that still don&#x27;t have a user associated with them, create the missing users and repeat the archive.&lt;&#x2F;p&gt;
&lt;p&gt;It is likely that you will have &lt;em&gt;new messages&lt;&#x2F;em&gt; archived and some &lt;em&gt;messages already existed in the archive&lt;&#x2F;em&gt;, but you should not have any further &lt;em&gt;messages have been skipped&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;cleanup-unneeded-users&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#cleanup-unneeded-users&quot; aria-label=&quot;Anchor link for: cleanup-unneeded-users&quot;&gt;🔗&lt;&#x2F;a&gt;Cleanup unneeded users&lt;&#x2F;h3&gt;
&lt;p&gt;At this point all of your source message files have been archived, and these files are no longer needed by MailStore.&lt;&#x2F;p&gt;
&lt;p&gt;It is likely you&#x27;ll want to delete the users created, you can do this using this command:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd.exe&quot; class=&quot;language-cmd.exe &quot;&gt;&lt;code class=&quot;language-cmd.exe&quot; data-lang=&quot;cmd.exe&quot;&gt;for &amp;#x2F;F %x in (userlist.txt) do &amp;quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&amp;quot; --h=&amp;quot;localhost&amp;quot; --cred=&amp;quot;admin@127.0.0.1&amp;quot; -c DeleteUser --userName %x
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note that this will remove all users listed, including those that were previously created by Directory Services.&lt;&#x2F;p&gt;
&lt;p&gt;Instead you could also use MailStore Client&#x27;s &lt;em&gt;Users&lt;&#x2F;em&gt; list. In this case, select all users, hold control and unselect the current admin user, then delete all users.&lt;&#x2F;p&gt;
&lt;p&gt;If any users were created by Directory Services and deleted above they will be recreated by Directory Services again, with their default set of permissions.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;final-notes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#final-notes&quot; aria-label=&quot;Anchor link for: final-notes&quot;&gt;🔗&lt;&#x2F;a&gt;Final notes&lt;&#x2F;h3&gt;
&lt;p&gt;A few more bits of information about the process that did not fit neatly above.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creating-a-user-that-has-permissions-to-access-the-entire-archive&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-a-user-that-has-permissions-to-access-the-entire-archive&quot; aria-label=&quot;Anchor link for: creating-a-user-that-has-permissions-to-access-the-entire-archive&quot;&gt;🔗&lt;&#x2F;a&gt;Creating a user that has permissions to access the entire archive&lt;&#x2F;h3&gt;
&lt;p&gt;You will likely now need to create one or more users that have access to the entire archive. From the users editor you can give a user the ability to read a specific archive, but this would take a lot of clicking to give a single user access to many archives.&lt;&#x2F;p&gt;
&lt;p&gt;Instead you can create an &lt;em&gt;Auditor&lt;&#x2F;em&gt; user that has read access to all archives without admin permissions. Go to &lt;em&gt;Compliance&lt;&#x2F;em&gt; -&amp;gt; &lt;em&gt;Compliance General&lt;&#x2F;em&gt; and create an auditor user.&lt;&#x2F;p&gt;
&lt;p&gt;You can create multiple auditor users if desired and once they&#x27;re created you can rename them to the user&#x27;s normal account name. If the target user already exists from Directory Services, delete their old account and rename the auditor user, then change their &lt;em&gt;Authentication Type&lt;&#x2F;em&gt; to &lt;code&gt;Directory Services&lt;&#x2F;code&gt;. Directory Services will update the full name and e-mail address the next time it synchronizes.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;user-interface&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#user-interface&quot; aria-label=&quot;Anchor link for: user-interface&quot;&gt;🔗&lt;&#x2F;a&gt;User Interface&lt;&#x2F;h4&gt;
&lt;p&gt;In the &lt;em&gt;Progress View&lt;&#x2F;em&gt; dialog when you click the &lt;em&gt;Details&lt;&#x2F;em&gt; link, the dialog blocks you from accessing MailStore Client&#x27;s interface until it is closed. I would therefore commend opening the debug log via Windows Explorer, copy the file, and return to MailStore Client to close this dialog otherwise it appears that MailStore Client is hung if you try to access other dialogs.&lt;&#x2F;p&gt;
&lt;p&gt;The debug log is only preserved while you leave &lt;em&gt;Progress View&lt;&#x2F;em&gt; open, if the &lt;em&gt;Debug Log&lt;&#x2F;em&gt; button is missing you are probably looking at Recent Results which does not contain the needed information.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;archiving&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#archiving&quot; aria-label=&quot;Anchor link for: archiving&quot;&gt;🔗&lt;&#x2F;a&gt;Archiving&lt;&#x2F;h4&gt;
&lt;p&gt;MailStore&#x27;s archiving profiles all skip messages already in the target archive&#x2F;folder, therefore there is no need to remove messages in the archive if you repeat the process after creating new users or adding more EML files.&lt;&#x2F;p&gt;
&lt;p&gt;If you change the folder names in the archiving profiles, this &lt;em&gt;will&lt;&#x2F;em&gt; cause duplicates to be created. I would recommend using the defaults, or at least, be sure to get it right.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;do-not-delete-messages-from-the-source-until-you-re-done&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#do-not-delete-messages-from-the-source-until-you-re-done&quot; aria-label=&quot;Anchor link for: do-not-delete-messages-from-the-source-until-you-re-done&quot;&gt;🔗&lt;&#x2F;a&gt;Do not delete messages from the source until you&#x27;re done&lt;&#x2F;h4&gt;
&lt;p&gt;While it might seem like you could save some time by having MailStore delete the source messages during each archiving profile execution so that you do not need to re-scan all messages that have already been archived, this is not recommended as it has an unexpected consequence.&lt;&#x2F;p&gt;
&lt;p&gt;The important thing to understand is that MailStore does not have any concept of your domain or any way to determine what is a local user or non-local user. MailStore just has the list of currently-licensed users and their e-mail addresses. Imagine we have &lt;code&gt;frank@example.com&lt;&#x2F;code&gt; created, but &lt;code&gt;bob@example.com&lt;&#x2F;code&gt; has not been created yet and then archive with the option to delete messages enabled, here is what will happen:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The first message is from &lt;code&gt;noreply@mailstore.com&lt;&#x2F;code&gt; and to &lt;code&gt;frank@example.com&lt;&#x2F;code&gt;, so it gets archived, and deleted. Great, this is what we want.&lt;&#x2F;li&gt;
&lt;li&gt;The second message is from &lt;code&gt;noreply@mailstore.com&lt;&#x2F;code&gt; and to &lt;code&gt;bob@example.com&lt;&#x2F;code&gt;, so it gets skipped and logged, but not deleted. Great, this is what we want.&lt;&#x2F;li&gt;
&lt;li&gt;The third message is from &lt;code&gt;frank@example.com&lt;&#x2F;code&gt; and to &lt;code&gt;bob@example.com&lt;&#x2F;code&gt;, so it gets archived to &lt;code&gt;frank@example.com&lt;&#x2F;code&gt; only -- This message is successfully archived, therefore if the delete option is enabled the message is deleted. When you later create &lt;code&gt;bob@example.com&lt;&#x2F;code&gt; the message is already gone from the source and therefore is never archived into into &lt;code&gt;bob@example.com&lt;&#x2F;code&gt; at all.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You will likely not even notice that &lt;code&gt;bob@example.com&lt;&#x2F;code&gt; is missing the messages, but even if noticed there is no way to find and fix this later. The message is not lost, it is in &lt;code&gt;frank&lt;&#x2F;code&gt;&#x27;s archive, but this can cause problems when reviewing just &lt;code&gt;bob&lt;&#x2F;code&gt;&#x27;s archive later.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Extracting unknown e-mail addresses from journal-type profile&#x27;s debug log via Excel</title>
        <published>2023-01-21T00:00:00+00:00</published>
        <updated>2023-01-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/excel/"/>
        <id>https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/excel/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/excel/">&lt;h2 id=&quot;preface&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#preface&quot; aria-label=&quot;Anchor link for: preface&quot;&gt;🔗&lt;&#x2F;a&gt;Preface&lt;&#x2F;h2&gt;
&lt;p&gt;This is part of a larger set of steps to set up a fresh MailStore Server and migrate messages from another archiving platform where the list of older users is not known.&lt;&#x2F;p&gt;
&lt;p&gt;This article just covers the steps to use Excel and the Windows Command Line to get the e-mail addresses, &lt;a href=&quot;https:&#x2F;&#x2F;mailstore-notes.dwlab.me&#x2F;articles&#x2F;ServerUnmappableException&#x2F;&quot;&gt;the full process is described here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;You could do this by hand using Excel as well although this has a lot more individual steps.&lt;&#x2F;p&gt;
&lt;p&gt;There are multiple ways to accomplish this, including using scripting, but I will attempt to provide easy-to-understand steps that allow you to see each step, and no scripting is required. Here is what I have done in the past:&lt;&#x2F;p&gt;
&lt;p&gt;Start with Windows&#x27; &lt;em&gt;find.exe&lt;&#x2F;em&gt; command to filter the log to just the relevant lines:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd&quot; class=&quot;language-cmd &quot;&gt;&lt;code class=&quot;language-cmd&quot; data-lang=&quot;cmd&quot;&gt;find &amp;quot;MailStore.Common.Interfaces.ServerUnmappableException&amp;quot; &amp;lt; *.log &amp;gt; userlist.txt
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Open the resulting file in Excel.&lt;&#x2F;li&gt;
&lt;li&gt;Use &lt;em&gt;Data&lt;&#x2F;em&gt; -&amp;gt; &lt;em&gt;Text to Columns&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Select &lt;em&gt;Delimited&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Set Delimiters to both &quot;Comma&quot; and &quot;Space&quot; only.&lt;&#x2F;li&gt;
&lt;li&gt;Enable &lt;em&gt;Treat consecutive delimiters as one&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;em&gt;Finish&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Look for the columns that contains e-mail addresses at the end of each line. This should start at &lt;em&gt;AA&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Copy the results and paste to a new sheet.&lt;&#x2F;li&gt;
&lt;li&gt;Repeat for each column that has further e-mail addresses. There may be more than &lt;em&gt;AA&lt;&#x2F;em&gt; and &lt;em&gt;AB&lt;&#x2F;em&gt; as e-mail can have more than a single sender&#x2F;recipient pair per message. Remember there may be lines that have no 3rd address followed by more lines that have a 3rd address, but if you miss any there is an opportunity to catch them later.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Now switch to the new sheet.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;em&gt;Data&lt;&#x2F;em&gt; --&amp;gt; &lt;em&gt;Remove Duplicates&lt;&#x2F;em&gt; to clean up the list.&lt;&#x2F;li&gt;
&lt;li&gt;Insert a blank row at the top.&lt;&#x2F;li&gt;
&lt;li&gt;Enable &lt;em&gt;Data&lt;&#x2F;em&gt; --&amp;gt; &lt;em&gt;Filter&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Click the down arrow on the top line to modify the filter.&lt;&#x2F;li&gt;
&lt;li&gt;Type &lt;code&gt;example.com&lt;&#x2F;code&gt; in the &lt;em&gt;search&lt;&#x2F;em&gt; field and press enter.&lt;&#x2F;li&gt;
&lt;li&gt;Copy the results and save it as &lt;code&gt;userlist.txt&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Extracting unknown e-mail addresses from journal-type profile&#x27;s debug log via Linux_WSL</title>
        <published>2023-01-21T00:00:00+00:00</published>
        <updated>2023-01-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/linux_wsl/"/>
        <id>https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/linux_wsl/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/ServerUnmappableException/linux_wsl/">&lt;h2 id=&quot;preface&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#preface&quot; aria-label=&quot;Anchor link for: preface&quot;&gt;🔗&lt;&#x2F;a&gt;Preface&lt;&#x2F;h2&gt;
&lt;p&gt;This is part of a larger set of steps to set up a fresh MailStore Server and migrate messages from another archiving platform where the list of older users is not known.&lt;&#x2F;p&gt;
&lt;p&gt;This article just covers the steps to use WSL (Windows Subsystem for Linux) to get the e-mail addresses, &lt;a href=&quot;https:&#x2F;&#x2F;mailstore-notes.dwlab.me&#x2F;articles&#x2F;ServerUnmappableException&#x2F;&quot;&gt;the full process is described here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;linux-bash-command-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#linux-bash-command-line&quot; aria-label=&quot;Anchor link for: linux-bash-command-line&quot;&gt;🔗&lt;&#x2F;a&gt;Linux &#x2F; bash command line&lt;&#x2F;h2&gt;
&lt;p&gt;From here we need to extract the e-mail addresses that match your users. If you are comfortable at a Linux command line we can do this easily:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;grep --only-matching --no-filename --extended-regex &amp;quot;[^ ]+@example\.com\b&amp;quot; *.log | sort | uniq &amp;gt; userlist.txt
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If completed this way, move ahead to &lt;strong&gt;Create the users&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;wsl-windows-subsystem-for-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#wsl-windows-subsystem-for-linux&quot; aria-label=&quot;Anchor link for: wsl-windows-subsystem-for-linux&quot;&gt;🔗&lt;&#x2F;a&gt;WSL (Windows Subsystem for Linux)&lt;&#x2F;h2&gt;
&lt;p&gt;Installing and learning WSL is out of scope for this article, but if you already have WSL on a machine that you can use, then from &lt;code&gt;cmd.exe&lt;&#x2F;code&gt; you can call WSL and convert the debug log into the needed text-file format like this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cmd&quot; class=&quot;language-cmd &quot;&gt;&lt;code class=&quot;language-cmd&quot; data-lang=&quot;cmd&quot;&gt;wsl grep --only-matching --no-filename --extended-regex &amp;quot;[^ ]+@example\.com\b&amp;quot; *.log ^| sort ^| uniq &amp;gt; userlist.txt
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If completed this way, move ahead to &lt;em&gt;Create the users&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Getting started with MailStore SPE&#x27;s Management API</title>
        <published>2023-01-01T00:00:00+00:00</published>
        <updated>2023-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/getting-started-with-mailstore-spe-s-management-api/"/>
        <id>https://mailstore-notes.dwlab.me/articles/getting-started-with-mailstore-spe-s-management-api/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/getting-started-with-mailstore-spe-s-management-api/">&lt;h2 id=&quot;enable-the-api&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enable-the-api&quot; aria-label=&quot;Anchor link for: enable-the-api&quot;&gt;🔗&lt;&#x2F;a&gt;Enable the API&lt;&#x2F;h2&gt;
&lt;p&gt;The API might already be enabled, but let&#x27;s check that it is enabled before proceeding:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Launch the &lt;em&gt;MailStore Service Provider Edition Configuration&lt;&#x2F;em&gt; tool.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Stop the &lt;em&gt;Management Server&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;em&gt;Configure...&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Ensure &lt;em&gt;API HTTP Server Enabled&lt;&#x2F;em&gt; is checked.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;em&gt;Listeners&lt;&#x2F;em&gt; to &lt;code&gt;*:8474&lt;&#x2F;code&gt; (without the quotes).&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;em&gt;Certificate&lt;&#x2F;em&gt; field from &lt;strong&gt;Management Server Settings&lt;&#x2F;strong&gt; and paste it in to the &lt;em&gt;Server Certificate&lt;&#x2F;em&gt; field in the API section.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;em&gt;OK&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Start&lt;&#x2F;em&gt; the &lt;em&gt;Management Service&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;using-the-powershell-wrapper&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-the-powershell-wrapper&quot; aria-label=&quot;Anchor link for: using-the-powershell-wrapper&quot;&gt;🔗&lt;&#x2F;a&gt;Using the PowerShell wrapper&lt;&#x2F;h2&gt;
&lt;h2 id=&quot;wrapper-and-sample-code&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#wrapper-and-sample-code&quot; aria-label=&quot;Anchor link for: wrapper-and-sample-code&quot;&gt;🔗&lt;&#x2F;a&gt;Wrapper and sample code&lt;&#x2F;h2&gt;
&lt;p&gt;Referring to the PowerShell API Wrapper and sample code found in: &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;spe&#x2F;PowerShell_API_Wrapper_Tutorial&quot;&gt;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;spe&#x2F;PowerShell_API_Wrapper_Tutorial&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-executionpolicy-to-run-downloaded-scripts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-executionpolicy-to-run-downloaded-scripts&quot; aria-label=&quot;Anchor link for: set-executionpolicy-to-run-downloaded-scripts&quot;&gt;🔗&lt;&#x2F;a&gt;Set-ExecutionPolicy to run downloaded scripts&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Launch PowerShell as administrator&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;Set-ExecutionPolicy -ExecutionPolicy Unrestricted&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;make-our-first-api-call&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#make-our-first-api-call&quot; aria-label=&quot;Anchor link for: make-our-first-api-call&quot;&gt;🔗&lt;&#x2F;a&gt;Make our first API call&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download &lt;em&gt;MailStore PowerShell API Wrapper and tutorial example scripts&lt;&#x2F;em&gt; from &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;spe&#x2F;images&#x2F;1&#x2F;19&#x2F;MailStore_SPE_Scripting_Tutorial.zip&quot;&gt;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;spe&#x2F;images&#x2F;1&#x2F;19&#x2F;MailStore_SPE_Scripting_Tutorial.zip&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Unzip &lt;code&gt;MailStore_SPE_Scripting_Tutorial.zip&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Open the &lt;code&gt;MailStore SPE Scripting Tutorial\PowerShell\Scripts&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Edit &lt;em&gt;Example1.ps1&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Set the username&#x2F;password.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Adjust the managementserver and port (if needed). If you&#x27;re working on the management server itself then the defaults should be fine.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;.\Example1.ps1&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The result I get is:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;error           :
token           :
statusVersion   : 2
statusCode      : succeeded
percentProgress :
statusText      :
result          : @{version=22.4.0.21151; webClientVersion=22.4.0.21151; copyright=Copyright (c) 2005-2022 MailStore
                  Software GmbH; licenseeName=ehemaliger Testaccount; licenseeID=10510;
                  serverName=spe-server.example.com; username=admin; systemProperties=}
logOutput       :
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;Example2.ps&lt;&#x2F;em&gt; shows how to pass parameters using &lt;code&gt;&quot;GetInstances&quot; @{instanceFilter = &quot;*&quot;}&lt;&#x2F;code&gt;, and then it pulls the users from within each instance as an example of how to repeat an operation through different instances. It should just be a matter of updating the connection string in this script with your servername and credentials.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;call-the-https-api-directly&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#call-the-https-api-directly&quot; aria-label=&quot;Anchor link for: call-the-https-api-directly&quot;&gt;🔗&lt;&#x2F;a&gt;Call the HTTPS API directly&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;install-a-browser-extension&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-a-browser-extension&quot; aria-label=&quot;Anchor link for: install-a-browser-extension&quot;&gt;🔗&lt;&#x2F;a&gt;Install a browser extension&lt;&#x2F;h3&gt;
&lt;p&gt;I&#x27;m using RESTClient (Firefox-based extension to make API calls interactively from a browser): &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;restclient&#x2F;&quot;&gt;https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;restclient&#x2F;&lt;&#x2F;a&gt; but other tools should be fine.&lt;&#x2F;p&gt;
&lt;p&gt;For reference my server&#x27;s API is available at:
&lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;spe-server.example.com:8474&quot;&gt;https:&#x2F;&#x2F;spe-server.example.com:8474&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;trust-the-certificate&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#trust-the-certificate&quot; aria-label=&quot;Anchor link for: trust-the-certificate&quot;&gt;🔗&lt;&#x2F;a&gt;Trust the certificate&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First access the URI and allow the untrusted certificate (if needed)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Do this by visiting &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;spe-server.example.com:8474&#x2F;&quot;&gt;https:&#x2F;&#x2F;spe-server.example.com:8474&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Advanced -&amp;gt; Accept the certificate&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Close the tab when prompted for credentials.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;make-a-first-call-to-the-api&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#make-a-first-call-to-the-api&quot; aria-label=&quot;Anchor link for: make-a-first-call-to-the-api&quot;&gt;🔗&lt;&#x2F;a&gt;Make a first call to the API&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Now launch RESTClient&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Click the Authentication tab&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Set the admin username&#x2F;password.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Change the &lt;strong&gt;Method&lt;&#x2F;strong&gt; to &lt;em&gt;Post&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Call &lt;code&gt;https:&#x2F;&#x2F;spe-server.example.com:8474&#x2F;api&#x2F;invoke&#x2F;GetInstanceHosts&lt;&#x2F;code&gt; (without the quotes)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;My response looks like this:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;error&amp;quot;: null,
  &amp;quot;token&amp;quot;: null,
  &amp;quot;statusVersion&amp;quot;: 2,
  &amp;quot;statusCode&amp;quot;: &amp;quot;succeeded&amp;quot;,
  &amp;quot;percentProgress&amp;quot;: null,
  &amp;quot;statusText&amp;quot;: null,
  &amp;quot;result&amp;quot;: [
    {
      &amp;quot;serverName&amp;quot;: &amp;quot;spe-server.example.com&amp;quot;,
      &amp;quot;port&amp;quot;: 8472,
      &amp;quot;serverCertificate&amp;quot;: {
        &amp;quot;thumbprint&amp;quot;: &amp;quot;A61597D8316DC39E26466F22C4C42B0C824ABE12&amp;quot;
      },
      &amp;quot;baseDirectory&amp;quot;: null
    }
  ],
  &amp;quot;logOutput&amp;quot;: null
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I used this API method because we can now add a body to test.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;add-parameters-to-apply-a-filter&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-parameters-to-apply-a-filter&quot; aria-label=&quot;Anchor link for: add-parameters-to-apply-a-filter&quot;&gt;🔗&lt;&#x2F;a&gt;Add parameters to apply a filter&lt;&#x2F;h3&gt;
&lt;p&gt;I&#x27;ll add the body &lt;code&gt;serverNameFilter=doesnotexist&lt;&#x2F;code&gt; (again, without the quotes) and we see no errors, but also no servers were returned, so we know the server accepted the parameter as the behaviour changed from above:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;error&amp;quot;: null,
  &amp;quot;token&amp;quot;: null,
  &amp;quot;statusVersion&amp;quot;: 2,
  &amp;quot;statusCode&amp;quot;: &amp;quot;succeeded&amp;quot;,
  &amp;quot;percentProgress&amp;quot;: null,
  &amp;quot;statusText&amp;quot;: null,
  &amp;quot;result&amp;quot;: [],
  &amp;quot;logOutput&amp;quot;: null
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And now I&#x27;ll change the body to:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;serverNameFilter=spe-server.example.com&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Now we get the requested server again, confirming everything is working:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;error&amp;quot;: null,
  &amp;quot;token&amp;quot;: null,
  &amp;quot;statusVersion&amp;quot;: 2,
  &amp;quot;statusCode&amp;quot;: &amp;quot;succeeded&amp;quot;,
  &amp;quot;percentProgress&amp;quot;: null,
  &amp;quot;statusText&amp;quot;: null,
  &amp;quot;result&amp;quot;: [
    {
      &amp;quot;serverName&amp;quot;: &amp;quot;spe-server.example.com&amp;quot;,
      &amp;quot;port&amp;quot;: 8472,
      &amp;quot;serverCertificate&amp;quot;: {
        &amp;quot;thumbprint&amp;quot;: &amp;quot;A61597D8316DC39E26466F22C4C42B0C824ABE12&amp;quot;
      },
      &amp;quot;baseDirectory&amp;quot;: null
    }
  ],
  &amp;quot;logOutput&amp;quot;: null
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;make-a-more-complex-api-call&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#make-a-more-complex-api-call&quot; aria-label=&quot;Anchor link for: make-a-more-complex-api-call&quot;&gt;🔗&lt;&#x2F;a&gt;Make a more complex API call&lt;&#x2F;h3&gt;
&lt;p&gt;Use &lt;em&gt;CreateSystemAdministrator&lt;&#x2F;em&gt; &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;spe&#x2F;Management_API_-_Function_Reference#CreateSystemAdministrator&quot;&gt;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;spe&#x2F;Management_API_-_Function_Reference#CreateSystemAdministrator&lt;&#x2F;a&gt; to create a new system administrator. I selected this example because we need both a &lt;em&gt;json&lt;&#x2F;em&gt; parameter, and a second parameter that is not part of the &lt;em&gt;json&lt;&#x2F;em&gt; block.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Change the URI to:
&lt;code&gt;https:&#x2F;&#x2F;spe-server.example.com:8474&#x2F;api&#x2F;invoke&#x2F;CreateSystemAdministrator&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Change the body:
&lt;code&gt;config={  &quot;userName&quot; : &quot;bob&quot;,  &quot;fullName&quot; : &quot;Bob the Admin&quot;,  &quot;emailAddress&quot; : &quot;bob@example.com&quot;}&amp;amp;password=Passw0rd!&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Submit to the server.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The result is &quot;statusCode&quot;: &quot;succeeded&quot;&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;error&amp;quot;: null,
  &amp;quot;token&amp;quot;: null,
  &amp;quot;statusVersion&amp;quot;: 2,
  &amp;quot;statusCode&amp;quot;: &amp;quot;succeeded&amp;quot;,
  &amp;quot;percentProgress&amp;quot;: null,
  &amp;quot;statusText&amp;quot;: null,
  &amp;quot;result&amp;quot;: null,
  &amp;quot;logOutput&amp;quot;: null
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And to confirm it really did work, I verified I can login with my newly created administrator &quot;bob&quot; using the management web interface *port 8470)&lt;&#x2F;p&gt;
&lt;h2 id=&quot;curl&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#curl&quot; aria-label=&quot;Anchor link for: curl&quot;&gt;🔗&lt;&#x2F;a&gt;curl&lt;&#x2F;h2&gt;
&lt;p&gt;We could do the same from &lt;em&gt;curl&lt;&#x2F;em&gt; using this command line:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;curl -X POST -k -H &#x27;Authorization: Basic YWRtaW46UGFzc3cwcmQhIQ==&#x27; -i &#x27;https:&#x2F;&#x2F;spe-server.example.com:8474&#x2F;api&#x2F;invoke&#x2F;CreateSystemAdministrator&#x27; --data &#x27;config={  &quot;userName&quot; : &quot;joe&quot;,  &quot;fullName&quot; : &quot;Joe the Admin&quot;,  &quot;emailAddress&quot; : &quot;joe@example.com&quot;}&amp;amp;password=Passw0rd!&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Use SetUserPrivilegesOnFolder from MailStoreCmd.exe</title>
        <published>2023-01-01T00:00:00+00:00</published>
        <updated>2023-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/use-setuserprivilegesonfolder-from-mailstorecmd-exe/"/>
        <id>https://mailstore-notes.dwlab.me/articles/use-setuserprivilegesonfolder-from-mailstorecmd-exe/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/use-setuserprivilegesonfolder-from-mailstorecmd-exe/">&lt;p&gt;To use &lt;em&gt;MailStoreCmd.exe&lt;&#x2F;em&gt; we need to know a bit about the environment, but we can use MailStore Client to generate a working command line for us:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go to the &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt; panel&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;See if you have any &lt;em&gt;EML&lt;&#x2F;em&gt; or &lt;em&gt;PST&lt;&#x2F;em&gt; or &lt;em&gt;File System&lt;&#x2F;em&gt; profiles that already exist and skip the next step.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;If you don&#x27;t have a profile you can use, create a &lt;em&gt;E-mail Files&lt;&#x2F;em&gt; --&amp;gt; &lt;em&gt;EML&lt;&#x2F;em&gt; profile, set the path to something that doesn&#x27;t exist (&quot;&lt;em&gt;C:\does-not-exist&lt;&#x2F;em&gt;&quot;), leave the other options at their defaults until you get the checkbox to run the profile now and uncheck this. Save the profile.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Now that you have a profile we can use, right click on it, choose &lt;em&gt;Create task on...&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Press the &lt;em&gt;Copy CMD Line&lt;&#x2F;em&gt; button at the bottom.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Paste into Notepad.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Mine looks like this:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c import-execute --id=3 --user=&quot;admin&quot; --verbose&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Cancel creating a scheduled task, we don&#x27;t need it, but this is a shortcut to generating a command line and setting the credentials. Once we have the command line above you can delete the profile you created, we don&#x27;t need it anymore.&lt;&#x2F;p&gt;
&lt;p&gt;Use your command rather than mine as it is personalized to your environment. We need everything up to the -c, this is where we specify the command we want to run, so for example with a base command line:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;We can &lt;em&gt;GetServerInfo&lt;&#x2F;em&gt; to prove we are connected:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The result:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;GetServerInfo
Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************

{
  &amp;quot;version&amp;quot;: &amp;quot;22.3.0.21002&amp;quot;,
  &amp;quot;machineName&amp;quot;: &amp;quot;EXCHANGEDC&amp;quot;
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we will retrieve the current status of the user:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c GetUserInfo --userName=&quot;frank.clark&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The result:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************

{
  &amp;quot;userName&amp;quot;: &amp;quot;frank.clark&amp;quot;,
  &amp;quot;fullName&amp;quot;: &amp;quot;Frank Clark&amp;quot;,
  &amp;quot;distinguishedName&amp;quot;: &amp;quot;CN=Frank Clark,OU=Seattle,DC=example, DC=com&amp;quot;,
  &amp;quot;authentication&amp;quot;: &amp;quot;directoryServices&amp;quot;,
  &amp;quot;emailAddresses&amp;quot;: [
    &amp;quot;frank.clark@example.com&amp;quot;
  ],
  &amp;quot;pop3UserNames&amp;quot;: [],
  &amp;quot;privileges&amp;quot;: [
    &amp;quot;login&amp;quot;
  ],
  &amp;quot;privilegesOnFolders&amp;quot;: [
    {
      &amp;quot;folder&amp;quot;: &amp;quot;frank.clark&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;abby.hernandez&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;alexis.page&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    }
  ]
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we will &lt;em&gt;SetUserPrivilegesOnFolder&lt;&#x2F;em&gt; to apply &lt;em&gt;&quot;read, write&quot;&lt;&#x2F;em&gt;:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c SetUserPrivilegesOnFolder --userName=&quot;frank.clark&quot; --folder=&quot;abby.hernandez&quot; --privileges=&quot;read, write&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;And the result:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And finally we can check the results with the previous &lt;em&gt;GetUserInfo&lt;&#x2F;em&gt; command:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c GetUserInfo --userName=&quot;frank.clark&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************

{
  &amp;quot;userName&amp;quot;: &amp;quot;frank.clark&amp;quot;,
  &amp;quot;fullName&amp;quot;: &amp;quot;Frank Clark&amp;quot;,
  &amp;quot;distinguishedName&amp;quot;: &amp;quot;CN=Frank Clark,OU=Seattle,DC=example, DC=com&amp;quot;,
  &amp;quot;authentication&amp;quot;: &amp;quot;directoryServices&amp;quot;,
  &amp;quot;emailAddresses&amp;quot;: [
    &amp;quot;frank.clark@example.com&amp;quot;
  ],
  &amp;quot;pop3UserNames&amp;quot;: [],
  &amp;quot;privileges&amp;quot;: [
    &amp;quot;login&amp;quot;
  ],
  &amp;quot;privilegesOnFolders&amp;quot;: [
    {
      &amp;quot;folder&amp;quot;: &amp;quot;frank.clark&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;alexis.page&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;abby.hernandez&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;,
        &amp;quot;write&amp;quot;
      ]
    }
  ]
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Active Directory with Microsoft 365 Modern Authentication</title>
        <published>2023-01-01T00:00:00+00:00</published>
        <updated>2023-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/using-active-directory-with-microsoft-365-mailboxes-modern-authentication/"/>
        <id>https://mailstore-notes.dwlab.me/articles/using-active-directory-with-microsoft-365-mailboxes-modern-authentication/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/using-active-directory-with-microsoft-365-mailboxes-modern-authentication/">&lt;h2 id=&quot;microsoft-365-hybrid-environments&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#microsoft-365-hybrid-environments&quot; aria-label=&quot;Anchor link for: microsoft-365-hybrid-environments&quot;&gt;🔗&lt;&#x2F;a&gt;Microsoft 365 &#x2F; Hybrid environments&lt;&#x2F;h2&gt;
&lt;p&gt;Hybrid environments are complicated, and there is no one-size-fits-all solution. MailStore is more flexible than is immediately obvious but there are a few things to understand.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;mailstore-s-article-abouy-microsoft-365-active-directory-hybrid-environments&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mailstore-s-article-abouy-microsoft-365-active-directory-hybrid-environments&quot; aria-label=&quot;Anchor link for: mailstore-s-article-abouy-microsoft-365-active-directory-hybrid-environments&quot;&gt;🔗&lt;&#x2F;a&gt;MailStore&#x27;s article abouy Microsoft 365 &#x2F; Active Directory hybrid environments&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;server&#x2F;Archiving_Emails_from_Microsoft_365_Hybrid&quot;&gt;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;server&#x2F;Archiving_Emails_from_Microsoft_365_Hybrid&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;further-details&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#further-details&quot; aria-label=&quot;Anchor link for: further-details&quot;&gt;🔗&lt;&#x2F;a&gt;Further details&lt;&#x2F;h2&gt;
&lt;p&gt;It is possible to switch to Microsoft 365&#x27;s Modern Authentication for the purposes of archiving while still using Active Directory as a user synchronization source, and in fact this is easier as it avoids needing to rename the archive folders in your existing archive to match. We will borrow some of the steps from our published documentation, but there are others that we can skip.&lt;&#x2F;p&gt;
&lt;p&gt;As long as your Microsoft 365 environment is synchronized with your local Active Directory, MailStore can use either option as a source for user information and can archive from both Microsoft 365 mailboxes and your on-premises Exchange as well if you happen to have a hybrid environment.&lt;&#x2F;p&gt;
&lt;p&gt;To set things up, login to MailStore Client with an &lt;em&gt;admin&lt;&#x2F;em&gt; account, go to &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt;, under &lt;em&gt;Servers&lt;&#x2F;em&gt; click &lt;em&gt;Microsoft 365&lt;&#x2F;em&gt;. Select &lt;em&gt;Multiple Mailboxes&lt;&#x2F;em&gt;. Now click the &lt;code&gt;...&lt;&#x2F;code&gt; button, which will open the &lt;em&gt;credentials manager&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Now we will use the &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;server&#x2F;Synchronizing_User_Accounts_with_Microsoft_365_(Modern_Authentication)&quot;&gt;Synchronizing User Accounts with Microsoft 365 (Modern Authentication)&lt;&#x2F;a&gt; help page article, but start at the step &lt;em&gt;In the Credential Manager that appears, click on Create…&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Start at &lt;em&gt;step 2.1&lt;&#x2F;em&gt;, register the app, create credentials and then publish the credentials:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Complete &lt;em&gt;step 2.1 Registering of MailStore Server as App in Azure AD&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Complete &lt;em&gt;step 2.2 Creating Credentials in MailStore Server&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Complete &lt;em&gt;step 2.3 Publishing Credentials in Azure AD&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Skip &lt;em&gt;step 2.4 Configuring App Authentication in Azure AD&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Skip &lt;em&gt;step 2.5 Configuring the Redirect URI in MailStore Server&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Complete &lt;em&gt;2.6 Configuring API Permissions in Azure AD&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Stop at &lt;em&gt;Step 2.7 User Database Synchronization&lt;&#x2F;em&gt; and skip the remainder of the article.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;We skip steps &lt;em&gt;2.4&lt;&#x2F;em&gt; and &lt;em&gt;2.5&lt;&#x2F;em&gt; as they only apply to synchronizing users with Microsoft 365, but we are intending to stay with Active Directory, but the API permissions are still needed so be sure that you completed step 2.6.&lt;&#x2F;p&gt;
&lt;p&gt;Now that the credentials have been created you can set up Microsoft 365 archiving profiles. For information refer to the &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;server&#x2F;Archiving_Emails_from_Microsoft_365_(Modern_Authentication)&quot;&gt;Archiving Emails from Microsoft 365 (Modern Authentication)&lt;&#x2F;a&gt; article to set up archiving as normal.&lt;&#x2F;p&gt;
&lt;p&gt;The principles are the same as your existing &quot;Exchange&quot; profiles, so you can probably skip directly to the section that covers &lt;a class=&quot;&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.mailstore.com&#x2F;en&#x2F;server&#x2F;Archiving_Emails_from_Microsoft_365_(Modern_Authentication)#Archiving_Multiple_Microsoft_365_Mailboxes_Centrally&quot;&gt;Archiving Multiple Microsoft 365 Mailboxes Centrally&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
