# Test-MailFlow status failure on Exchange 2013 with GFI Mail Essentials installed

Our Client has Exchange 2013 with GFI Mail Essentials. Recently Test-Mailflow started failing with no real reason to do so. Servers…

blog

19 Feb 2017 pl

![Test-MailFlow status failure on Exchange 2013 with GFI Mail Essentials installed](/wp-content/uploads/2016/01/MicrosoftExchange.png)

[Zobacz obrazy (9)](#pf-content-image-1-0)

Our Client has **Exchange 2013** with **GFI Mail Essentials. **Recently **Test-Mailflow** started failing with no real reason to do so. Servers were up and running, mails were flowing but still **Test-Mailflow** is showing status **failure**.

### ❗ Problem Description

We monitor the **servers** for our **Clients** with special scripts showing status of the **servers** and all their **roles**. It's all nice and green except **Mail-Flow Test** showing **failures**.

[!\[Panel monitoringu pokazujący błąd Test-Mailflow\](/wp-content/uploads/2017/02/img_58a9fbedbcdc3.png)](/wp-content/uploads/2017/02/img_58a9fbedbcdc3.png)

Additional verification with **PowerShell** confirms that issue is indeed there and not just **script** error.

[!\[Weryfikacja błędu Test-Mailflow w PowerShell\](/wp-content/uploads/2017/02/img_58a9fb14b031a.png)](/wp-content/uploads/2017/02/img_58a9fb14b031a.png)

While the error itself can have many reasons we've tracked it down to **GFI Mail Essentials** blocking it.

[!\[GFI Mail Essentials blokuje test Test-Mailflow\](/wp-content/uploads/2017/02/img_58a9fd69374cc.png)](/wp-content/uploads/2017/02/img_58a9fd69374cc.png)

### ✅ Solution

To solve this problem an exclusion has to be made for** System Mailboxes. **However this is not simply done by using **WhiteList** but has to be done thru Directory Harvesting Exclusions which is not done thru web interface. To do it one has to:

Find out all mailboxes that need exclusion. While the **GFI Interface** is able to deliver full name for **System Mailboxes** it's doing so while using **lowercase** email address.

[!\[Interfejs GFI z systemowymi skrzynkami pocztowymi i małymi adresami\](/wp-content/uploads/2017/02/img_58aa02898a267.png)](/wp-content/uploads/2017/02/img_58aa02898a267.png)

When taking those emails make sure to properly format it **SystemMailbox{….}@domain.pl** otherwise it will be ignored. Additionally it seems **GFI** is showing different **SystemMailboxes** than the ones that are defined in **Exchange, **so you have to verify what **GFI** is showing in it's Dashboard on all your **GFI** instances. As you can see below **PowerShell** command shows different emails for arbitration mailboxes than those in **GFI DashBoard**.

[!\[Wynik PowerShell ze skrzynkami arbitrażowymi i adresami SMTP\](/wp-content/uploads/2017/02/img_58aa03a940b43.png)](/wp-content/uploads/2017/02/img_58aa03a940b43.png)

```plain
[PS] C:\Windows\system32>get-mailbox -Arbitration | ft Name, PrimarySmtpAddress -AutoSize

Name                                                PrimarySmtpAddress
----                                                ------------------
SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c} SystemMailboxbb558c35-97f1-4cb9-8ff7-d53741dc928c@
SystemMailbox{1f05a927-a1fd-4ef6-96aa-50f419d0d2b7} MSExchApproval1f05a927-3be2-4fb9-aa03-b59fe3b56f4c@
FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042 FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042@
SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9} MsExchDiscoverye0dc1c29-89c3-4034-b678-e6c29d823ed9@
Migration.8f3e7716-2011-43e4-96b1-aba62d229136      Migration.8f3e7716-2011-43e4-96b1-aba62d229136@
```

After we've all emails ready for GFI Directory Harvesting Exclusions we have to modify **config.mdb** with Microsoft Access that's located in **C:\Program Files (x86)\GFI\MailEssentials\Antispam.**

[!\[Microsoft Access otwiera plik config.mdb z GFI\](/wp-content/uploads/2017/02/img_58aa048313c69.png)](/wp-content/uploads/2017/02/img_58aa048313c69.png)

Since editing **config.mdb** is not possible directly, make a copy of the file to **PC** with **Microsoft Access**, modify it there and replace original file.

[!\[Kopiowanie config.mdb na komputer do edycji w Microsoft Access\](/wp-content/uploads/2017/02/img_58a9feb9a54e9.png)](/wp-content/uploads/2017/02/img_58a9feb9a54e9.png)

As mentioned above, make sure SystemMailbox is formatted properly or it won't work. After replace is done on all servers make sure to restart all **GFI Services** (restarting GFI MailEssentials Attendant should fix it). Unfortunately this change has to be made on all servers with **GFI**.

And just like that **Test-MailFlow** works and shows success.

[!\[Test-MailFlow działa poprawnie po zmianie wykluczeń w GFI\](/wp-content/uploads/2017/02/img_58aa194b0a7ac.png)](/wp-content/uploads/2017/02/img_58aa194b0a7ac.png)

And in **GFI Dashboard everything** looks OK now.

[!\[Panel GFI pokazuje, że wszystko wróciło do normy\](/wp-content/uploads/2017/02/img_58aa1987d468d.png)](/wp-content/uploads/2017/02/img_58aa1987d468d.png)

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:2249C01A4D85616465E66A8EA94000763A85A4A8D99F4800368F8C15147BA6EC -->
