# Detect alignment regression for a known DMARC sender

**Use case:** 

Compare two synthetic daily DMARC periods and surface an existing source IP whose DMARC alignment changes from aligned to unaligned.

## Input

```json
{
  "comparisons": [
    {
      "id": "synthetic-known-source-regression",
      "domain": "example.invalid",
      "baselineReports": [
        {
          "id": "baseline-known-source",
          "format": "XML",
          "xml": "<feedback><report_metadata><org_name>Synthetic Receiver</org_name><report_id>regression-baseline</report_id><date_range><begin>1789516800</begin><end>1789603199</end></date_range></report_metadata><policy_published><domain>example.invalid</domain><p>none</p></policy_published><record><row><source_ip>192.0.2.10</source_ip><count>20</count><policy_evaluated><disposition>none</disposition><dkim>pass</dkim><spf>pass</spf></policy_evaluated></row><identifiers><header_from>example.invalid</header_from><envelope_from>example.invalid</envelope_from></identifiers><auth_results><dkim><domain>example.invalid</domain><result>pass</result></dkim><spf><domain>example.invalid</domain><result>pass</result></spf></auth_results></record></feedback>"
        }
      ],
      "currentReports": [
        {
          "id": "current-known-source",
          "format": "XML",
          "xml": "<feedback><report_metadata><org_name>Synthetic Receiver</org_name><report_id>regression-current</report_id><date_range><begin>1789603200</begin><end>1789689599</end></date_range></report_metadata><policy_published><domain>example.invalid</domain><p>quarantine</p></policy_published><record><row><source_ip>192.0.2.10</source_ip><count>9</count><policy_evaluated><disposition>quarantine</disposition><dkim>fail</dkim><spf>fail</spf></policy_evaluated></row><identifiers><header_from>example.invalid</header_from><envelope_from>relay.vendor.invalid</envelope_from></identifiers><auth_results><dkim><domain>relay.vendor.invalid</domain><result>pass</result><selector>relay</selector></dkim><spf><domain>relay.vendor.invalid</domain><result>pass</result><scope>mfrom</scope></spf></auth_results></record></feedback>"
        }
      ]
    }
  ],
  "maxXmlBytes": 1000000,
  "maxReportsPerPeriod": 100,
  "maxRecordsPerReport": 20000,
  "maxTotalRecordsPerComparison": 50000,
  "maxFindingsPerComparison": 1000
}
```

## Output

```json
{
  "recordType": {
    "label": "Record type",
    "format": "string"
  },
  "comparisonId": {
    "label": "Comparison id",
    "format": "string"
  },
  "domain": {
    "label": "Domain",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "findingType": {
    "label": "Finding type",
    "format": "string"
  },
  "sourceIp": {
    "label": "Source ip",
    "format": "string"
  },
  "count": {
    "label": "Count",
    "format": "integer"
  },
  "previousState": {
    "label": "Previous state",
    "format": "string"
  },
  "currentState": {
    "label": "Current state",
    "format": "string"
  },
  "summary": {
    "label": "Summary",
    "format": "string"
  },
  "fingerprint": {
    "label": "Fingerprint",
    "format": "string"
  },
  "baselineSourceCount": {
    "label": "Baseline source count",
    "format": "integer"
  },
  "currentSourceCount": {
    "label": "Current source count",
    "format": "integer"
  },
  "baselineMessageCount": {
    "label": "Baseline message count",
    "format": "integer"
  },
  "currentMessageCount": {
    "label": "Current message count",
    "format": "integer"
  },
  "findingCount": {
    "label": "Finding count",
    "format": "integer"
  },
  "errorCode": {
    "label": "Error code",
    "format": "string"
  },
  "comparisonFingerprint": {
    "label": "Comparison fingerprint",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [DMARC Aggregate Drift Monitor](https://apify.com/ceddl/dmarc-aggregate-drift-monitor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/ceddl/dmarc-aggregate-drift-monitor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/ceddl/dmarc-aggregate-drift-monitor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
