> ## Documentation Index
> Fetch the complete documentation index at: https://docs.msportal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Mailhardener Integration

> Connect Mailhardener with an API client, match customers to companies, and report each client domain's DMARC policy, SPF, DKIM and 30-day pass rate.

> [!NOTE]
>
> Mailhardener is in **Beta**. It is available to every tenant and shows a **Beta** badge on the **Directory** tab of **Settings > Integrations**. If something does not match your Mailhardener account, contact [support@msportal.ai](mailto:support@msportal.ai).

Mailhardener brings your clients' email domain security into MSPortal. For each client domain you see its DMARC policy, SPF, DKIM and the share of its mail that passed DMARC in the last 30 days, and a report block for business reviews lists the weakest domains first. This setup is for **MSP staff with integration management access**.

MSPortal only reads from Mailhardener. It never changes domains, customers or alert settings.

## What the integration covers

* **Covered:** your Mailhardener customers and their domains. For each domain: whether Mailhardener has validated it, the DMARC policy and its percentage, testing mode (`t=y`) and reporting address, SPF and its `all` qualifier, the DKIM keys Mailhardener has seen, BIMI, MTA-STS, TLS-RPT and DNSSEC. For validated domains, the messages, DMARC passes and failures and sending sources over the last 30 days.
* **Not covered:** individual DMARC reports, message sources by IP address, and alert settings. Volume always covers the last 30 days, whatever the report period.

## Before you connect

**1. Create an API client in Mailhardener**

In Mailhardener, open **Team › API clients** and add a client for MSPortal. Copy the **Client ID** and the **Client Secret** before you close the dialog. Mailhardener shows the secret only once.

**2. Give it the API Domain Viewer role**

**API Domain Viewer** can only read. MSPortal reads customers, domains and DMARC reports. If a sync says Mailhardener refused one of them, give the API client a role that can read it.

An API client reads every customer in your Mailhardener account. It cannot be limited to some customers. Keep each client in its own Mailhardener customer: MSPortal matches customers to companies, and a customer's domains follow it.

## Connect

**1. Open the connection**

Open **Settings > Integrations**, choose **Directory**, find **Mailhardener** and choose **Connect**.

**2. Enter the API client**

Paste the **Client ID**, a number, and the **Client Secret**.

**3. Test the connection**

Choose **Test connection**. A successful test shows how many customers the account lists. A failed test says why, for example that Mailhardener rejected the Client ID and Client Secret.

**4. Save**

Choose **Save and continue**. MSPortal stores the secret in the vault and starts the first sync.

> [!NOTE]
>
> If you sent us your Mailhardener secret before the integration was available, the connection holds only the **Client Secret**, and **Add the Client ID to start syncing** shows on the page. Open **Connect**, type the API client's **Client ID**, choose **Test connection** and save. The stored secret is kept.

## Match customers to companies

Mailhardener's customers arrive with the first sync. Open **Import or match companies**. Each row shows a Mailhardener customer, its **Domains** count and its **Reference** in Mailhardener, when you set one.

Link each customer to its MSPortal company: accept the suggestion, choose another company, or use **Import** to create one. **Ignore** hides a customer that is not a client's, and you can restore it later. A change to a match takes effect right away; nothing needs to sync again.

When the matches look right, open **Review** and choose **Finish setup**.

## Where the data appears

* **Reports:** add the **Mailhardener DMARC** block to a report, for example a business review. Its header reads **DMARC**. Depending on its size, it shows the **DMARC pass rate** over the last 30 days, the number of **Domains**, how many are at **p=reject**, **Failing messages** and **Domains not enforced**, a **Domains by DMARC policy** chart, and **Domains, weakest policy first** with each domain's company, policy, failing checks and **Pass rate**.
* **AI reports:** the security section of AI reports can include Mailhardener DMARC domain findings.
* **Assistant and MCP:** ask the assistant about a client's DMARC, SPF or DKIM, or use `list_mailhardener_domains` and `get_security_summary`.

There is no Mailhardener page under **Security**. Use a report or the assistant.

### How domains are ranked

The block lists the weakest domains first:

1. No DMARC policy.
2. A policy of **None (monitoring only)**, or an enforcing policy applied to 0% of mail.
3. **Quarantine**, or an enforcing policy applied to only part of the mail.
4. **Reject** with failing checks.
5. **Reject** with nothing failing.

A domain in testing mode (`t=y`) counts one level down, because receivers treat it that way: reject as quarantine, and quarantine as none. The block marks it **(testing)**.

### Failing checks

| Check | Fails when |
| - | - |
| **DMARC** | The domain publishes no DMARC policy. |
| **SPF** | The domain has no SPF record, or its SPF ends in `+all`. |
| **DKIM** | A validated domain sent mail in the last 30 days and Mailhardener saw no DKIM key. |
| **Reporting (not validated)** | Mailhardener has not validated the domain, so it receives no DMARC reports for it. |

A domain Mailhardener has not validated has no pass rate. The block says how many domains are not validated.

## Sync and troubleshooting

Mailhardener syncs daily. To sync now, choose **Run sync** on the connection page or on the integration's row.

| Symptom | What to check |
| - | - |
| **Mailhardener rejected this Client ID and Client Secret** | Create a new API client in Mailhardener and paste both values. |
| **The Mailhardener Client ID is a number** | Copy the Client ID from the API client in Mailhardener: digits only. |
| **This Mailhardener API client may not read customers and domains** | Give the API client a role with read access, such as **API Domain Viewer**, or create a new API client. |
| **Mailhardener is rate limiting this API client** | Wait a few minutes and try again. |
| **The first sync did not start** | Start a sync with **Run sync**. |
| No customers to match | Wait for the first sync to finish, or check that your Mailhardener account has customers. |
| The block says **No Mailhardener customer is mapped to these companies.** | Match the customer to the company on **Import or match companies**. |
| A domain shows no pass rate | Mailhardener has not validated it, or it sent no mail in the last 30 days. |
| The block says some customers were not read in the last sync | Check the connection's last sync. Those customers' domains are from an earlier sync. |

To replace the API client, open **Connect** on the connection page, paste the new **Client ID** and **Client Secret**, choose **Test connection**, then **Save changes**.

To remove the connection, open **More actions** on the connection page and choose **Disconnect…**. This removes the stored credentials, the customer matches and the data synced from Mailhardener. It changes nothing in Mailhardener; delete the API client there when you no longer need it.

## Related guides

* [Integration setup guides](https://docs.msportal.ai/user-guides/integrations/index.md)
* [Map and import companies](https://docs.msportal.ai/user-guides/integrations/import-companies.md)
* [Integration troubleshooting](https://docs.msportal.ai/user-guides/integrations/faq.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.