Parse SPF and DKIM Aggregate Report XML into a Structured Database for Email Verification
Turn SPF and DKIM aggregate reports into actionable data. Structure XML into a database to improve email verification accuracy and deliverability with.
Why parsing SPF and DKIM aggregate reports matters for email verification accuracy
You’re sending emails. Your deliverability is slipping. You check your bounce rate, adjust your list, but the root issue isn’t in your campaign—it’s buried in raw XML logs no one’s reading.
SPF and DKIM aggregate reports are domain-level records of email authentication performance. They show which messages passed, failed, or were rejected. But out of the box, they’re unstructured XML dumps—impossible to query, filter, or use for verification scoring.
Parsing these reports turns noise into insight. Only by converting the raw XML into a structured database can you link authentication failures to specific sender IPs, domains, and — most importantly — actual email addresses. That’s how you find risky senders, detect misconfigurations, and prevent future bounces.
Key takeaways
- SPF and DKIM aggregate reports contain domain-level evidence of email authentication performance, but only usable when parsed into structured data.
- Without parsing, authentication failure patterns remain invisible, leaving senders unaware of configuration flaws or rogue IPs.
- Structured parsing enables mapping of authentication errors to real email addresses, revealing risky senders and infrastructure gaps.
What are SPF and DKIM aggregate reports, and how are they generated?
SPF and DKIM aggregate reports are automated XML files generated weekly by major email providers like Google, Microsoft, and Yahoo to share authentication results for emails sent to their domains. They include data on SPF pass/fail rates, DKIM pass/fail results, source IPs used, email volume, timestamps, and the outcome of your domain’s DMARC policy. You receive these reports when you publish a DMARC record, and they help you track how well your sending practices align with your authentication setup.
How SPF and DKIM Aggregate Reports Are Created
Each week, receiving servers analyze incoming emails and compile metrics into XML files based on your domain’s DMARC policy. These reports are sent to the email address listed in your DMARC record, typically in a subdomain like [email protected].
Inside each report, you’ll find detailed information: the time period covered, the source IP address of each sending server, the number of messages sent, and whether each message passed or failed SPF or DKIM checks. The report also includes a policy verdict—whether the message was aligned and compliant with your DMARC policy (p=none, p=quarantine, or p=reject).
These reports follow a standardized format defined in RFC 7483, which outlines how receiving services should structure and send the data. While not every email provider uses the same level of detail, the core fields—including pass/fail counts, source IPs, timestamps, and alignment status—are consistent across providers like Google and Microsoft. You can validate the structure using public documentation from RFC 7483.
Because these reports contain operational insights about your senders, they’re crucial for identifying spoofed addresses, misconfigured servers, or third-party tools sending on your behalf. You can parse them into a structured database using custom code or tools like bulk verification to monitor sender reputation and detect anomalies before they hurt deliverability.
Why This Matters for Email Verification
While SPF and DKIM aggregate reports aren’t designed for real-time email validation, they offer a historical view of your sending landscape. Over time, trends in failure rates or unexpected IPs can reveal compromised accounts or unauthorized senders, helping you clean your list before sending.
For instance, if you see repeated DKIM failures from a specific IP, it may indicate a misconfigured ESP or a takeover attempt. Parsed over time, these reports help you build a reliable dataset for internal fraud detection and improve your sender reputation with inbox providers.
What happens when you parse SPF and DKIM aggregate report XML into a structured database
When you parse SPF and DKIM aggregate report XML, you transform raw, nested data into clean relational tables—domain, IP, and timestamped authentication results—where each entry becomes a structured row with key details: domain, source IP, timestamp, SPF result, DKIM result, message count, and alignment status. This enables real-time analysis, long-term trend tracking, and direct integration with email verification engines like Emaillistchecker.io for actionable insights.
From XML to Relational Structure
Aggregate reports from DMARC-compliant domains arrive as XML files, often large and deeply nested. Parsing them means reading through the raw document and extracting discrete, repeatable data points. You end up with a normalized database: one table tracks domains, another maps source IPs to their behavior, and a third logs time-stamped authentication outcomes. This structure turns unstructured logs into something queryable and predictable.
Each row in the authentication table captures a moment in time: what domain was involved, which IP sent the message, whether SPF passed or failed, whether DKIM did too, and if the alignment of the two checks was consistent. Message counts help weight anomalies—sudden spikes in failed DKIM might signal a compromised sender or misconfigured domain.
Why Structure Matters for Email Verification
Structured data doesn’t just look cleaner—it unlocks real value. You can filter by domain to spot persistent alignment failures, drill down by IP to identify repeat offenders, or track changes over time to detect emerging threats like spoofing campaigns. When combined with tools that validate email addresses at scale—like bulk verification—this data helps prioritize which domains or IPs to investigate before sending campaigns.
Organizations using DMARC are already collecting these reports; parsing them well turns passive data into active defense. You can use them to validate sender authenticity, improve domain reputation, or feed real-time signals into verification systems that assess deliverability risk. Tools like Emaillistchecker.io’s API can ingest these results as part of a broader validation pipeline, reducing false positives and improving inbox placement.
Industry standards like RFC 7489 and DMARC.org outline how these reports should be formatted, making parsing reliable across domains. The real power comes not from collecting data, but from turning it into something actionable—especially when used alongside third-party tools that analyze email infrastructure health.
How to parse SPF and DKIM aggregate report XML into a structured database: a step-by-step process
You can parse SPF and DKIM aggregate report XML into a structured database by downloading the DMARC feed from your reporting address, using a script to extractelements from thesection, mapping key data points like domain, IP, alignment status, and failure reason, storing the results in a database such as PostgreSQL or SQLite with indexes on domain, IP, and date, and automating ingestion to track alignment trends over time. This gives you actionable visibility into email authentication failures and helps strengthen your sender reputation.
- Download the aggregate report from your DMARC reporting address (e.g. [email protected]). These reports are generated daily or weekly by receiving mail servers and are sent in XML format. You’ll need to set up a mailbox to receive them. Refer to RFC 7483 for the official specification of DMARC aggregate reports.
- Use a parser script—like Python with
xml.etree.ElementTree—to extract<record>elements within the<feedback>section. Each record contains metadata about one sender’s email activity during a reporting window. Parsing at scale is more reliable than manual inspection. - Map core fields from each
<record>to your schema: domain, source_ip, date_start, date_end, spf_aligned, dkim_aligned, policy (none, quarantine, reject), failure_reason (if any), and count (total messages). These fields are standardized in the DMARC spec and are critical for assessing authentication health. - Store data in a database like PostgreSQL or SQLite. Normalize the schema to avoid redundancy. Add indexes on domain, source IP, and date range to speed up queries and trend analysis. This enables you to detect repeated failures from specific IPs or domains over time.
- Schedule automated ingestion. Run the parser daily or weekly to ingest new reports. Aggregate data over time to identify patterns—e.g., a spike in SPF alignment failures from a specific IP. This supports proactive remediation.
Why this matters for deliverability
You’re not just auditing past data—you’re building a system that shows whether your email infrastructure is aligned with accepted practices. A consistent drop in SPF or DKIM alignment signals misconfiguration or possible spoofing. Tools like bulk verification and real-time API checks complement this by validating recipient address health before sending, reducing bounce rates and protecting sender reputation.
Track trends, not just snapshots
Raw XML reports are hard to reason about. Once parsed into a structured database, you can run queries to compare alignment rates across domains, identify compromised IPs, or validate changes after updating DNS records. Long-term tracking is the only way to ensure sustained deliverability.
What you gain by integrating parsed SPF and DKIM data into email verification workflows
You reduce sender risk by flagging domains with consistent SPF or DKIM failures during verification—these often signal non-functional addresses, spoofing attempts, or poor sender hygiene. This data also helps you block IPs tied to low authentication rates, protecting your sender reputation. Over time, historical parsing reveals patterns, like recurring DKIM misconfigurations, that expose deeper alignment issues in your email infrastructure.
Flags domains with ongoing authentication failures
Domains that fail SPF or DKIM in repeated, aggregated reports are usually either misconfigured or abandoned. You can catch these early during verification—especially if you're using a service with access to real-time aggregate reports like those from Dmarcian or Valimail’s public data. These failures often correlate with high bounce rates or inbox filtering, so filtering them out before sending reduces waste and improves engagement.
When you parse XML reports from DMARC aggregates, you’re not just seeing pass/fail outcomes—you’re seeing trends. A domain failing DKIM across 80% of messages over a 30-day period is a red flag, even if one message succeeds. You’re not relying on a single email test; you’re grounding decisions in historical behavior. Real-world evidence shows that inconsistent SPF alignment is one of the top reasons for email rejection by major providers [RFC 7073].
Protect your sender reputation by filtering risky IPs
IPs that repeatedly fail SPF or DKIM signals poor infrastructure or compromised systems. If you're routing mail through an IP that’s failing authentication in aggregate reports, your sender reputation takes damage—even if the individual emails are legitimate. Integrating parsed data helps you identify and exclude such IPs from your sending pools.
Consider this: a single IP with a 20% DKIM failure rate across 10,000 messages in a month will likely get flagged by reputation systems like those used by Gmail or Outlook. By catching this early, you avoid accidental inclusion in high-risk sending pools. Tools like bulk verification can ingest this intelligence during list hygiene, flagging domains and IPs tied to persistent failures.
Over time, aggregated parsing reveals systemic flaws—like inconsistent DKIM signing across subdomains or misaligned SPF and DKIM records. These patterns aren't visible in single-message checks. By integrating this data into your verification process, you’re not just cleaning a list—you’re auditing your sending environment for deeper issues that affect deliverability at scale.
The role of SPF, DKIM, and DMARC in email verification — distinct but interconnected
You verify email addresses by checking if they pass technical trust signals. SPF confirms the sending server is authorized. DKIM confirms the message wasn’t altered in transit. DMARC ties both together, enforcing policy and collecting reports. Together, they form a layered defense that inbox providers use to decide whether to deliver, quarantine, or reject mail. You can’t skip any of them during inbox placement testing.
How each protocol contributes to trust
- SPF validates the sending server IP against the domain’s published list of authorized IPs. If the IP isn’t listed, the message fails SPF. This prevents spoofing but doesn’t protect against message tampering.
- DKIM ensures message integrity by attaching a cryptographic signature to the email headers. Recipients recompute this signature to verify the content hasn’t changed since signing. A mismatch means the email was altered or forged.
- DMARC uses SPF and DKIM results to enforce policy and aggregate reports. It tells receiving servers what to do if SPF or DKIM fails: quarantine, reject, or allow. It also provides feedback on domain usage patterns via aggregate reports.
- Aggregated DMARC reports contain XML data that includes sender IP, policy, alignment status, and message counts. Parsing this XML correctly is key to diagnosing deliverability issues at scale.
- Alignment is mandatory: DMARC only flags failures if the domain in the From header aligns with the domain used for SPF or DKIM. A mismatch means the email fails even if both SPF and DKIM pass.
Why parsing reports matters in verification
Real-time inbox placement testing depends on seeing how messages perform across real receivers. A single failed SPF or DKIM check can trigger inbox filtering, even if the email address is valid. Let’s break down why parsing DMARC/XML reports into a structured database helps.
- Raw DMARC reports are not human readable. Extracting IPs, policy details, and failure types requires parsing XML.
- Without a structured database, you can't track policy drift, detect misconfigurations, or correlate failures with sender reputations.
- Combining verified email lists with parsed DMARC reports lets you identify domains with inconsistent policies or known delivery risks.
- Tools like the inbox placement report use these signals to predict deliverability outcomes without sending real messages.
- SPF, DKIM, and DMARC are distinct—but interoperability is required. Ignoring any one breaks the chain of trust.
For more context on how these protocols work together, see the DMARC specification or refer to Spamhaus’s DMARC guide. They’re not optional layers—they’re part of the core deliverability infrastructure.
How Emaillistchecker.io uses authentication signals like SPF and DKIM to improve verification accuracy
You can’t verify email addresses in isolation. Emaillistchecker.io boosts its 98.9% accuracy by analyzing domain-level authentication signals like SPF and DKIM — not by parsing raw XML, but by evaluating their real-world alignment and health during every verification round. These signals act as digital fingerprints: if a domain fails SPF or DKIM checks consistently, that’s a red flag for the entire list.
Why authentication matters for email validation
SPF and DKIM are not just technical details — they're strong indicators of sender legitimacy. A domain with misconfigured or missing records is more likely to be associated with spam, poor deliverability, or even abuse. When you send mail, receiving servers use these protocols to confirm whether the message originated from an authorized source. If the domain behind an email address fails these checks, the address itself is higher risk.
While we don’t parse aggregate XML reports from third-party sources like Spamhaus or Google’s Postmaster Tools, we do use the same underlying data these services rely on. Every time we verify an email, we check whether the domain’s SPF and DKIM records are present, properly configured, and aligned with the sending domain. This happens behind the scenes during bulk checks and API calls.
How this improves risk scoring
Domains with weak or inconsistent SPF/DKIM setup don’t just cause delivery issues — they often point to poorly managed or compromised infrastructure. Emaillistchecker.io flags such domains during verification and reflects that in its risk scoring. An address from a domain with poor authentication gets a higher risk rating, even if the address itself technically exists.
Let’s say you’re verifying a list of 10,000 addresses. If 20% come from domains with missing or conflicting SPF records, the system will flag those addresses as higher risk, even if they don’t bounce outright. You’ll get clearer insights into list quality before you send. This means fewer wasted sends, lower bounce rates, and less chance your sender reputation gets damaged.
This level of intelligence is built into every verification — whether you’re using our bulk verification, the real-time API, or integrating with Mailchimp, HubSpot, Klaviyo, or SendGrid. It’s not just about catching invalid emails — it’s about catching the ones that might look valid but will never land in the inbox.
For deeper insights into domain reputation, you can also run inbox placement tests using our inbox placement tool, which includes real-world deliverability checks across major providers. Authentication health is one piece of the puzzle — but an essential one.
Common challenges in parsing SPF and DKIM aggregate report XML
You’ll face inconsistent XML structures across providers like Google, Microsoft, and Yahoo, which means your parser must handle varying field names, nesting, and optional elements. Delayed reporting can create gaps or outdated data, especially when trying to track real-time email deliverability. Large reports with thousands of entries can also crash or slow down parsing scripts if not processed efficiently and with proper memory management.
Structure variability across email providers
Each email provider formats aggregate reports differently—Google uses spf and dmarc fields within policypublished blocks, while Microsoft’s reports often nest reputation data under unique child elements. Yahoo’s structure follows a slightly different schema again. These differences mean rigid parsers fail; you need flexible field mapping, often driven by dynamic schema detection. Without it, you risk misclassifying valid attempts or missing anomalies. This is why tools that support multi-provider parsing—like those used in email verification platforms—must include configurable rules per vendor.
Delayed or incomplete data can mislead analysis
Aggregated reports are typically delayed by 24 to 72 hours, sometimes longer, especially for historical data. A report labeled “last week” might not arrive until days after the event. This creates timing mismatches when assessing recent deliverability changes or diagnosing spikes in failures. You can’t rely solely on these reports for real-time decisions. For active verification, pairing them with real-time API checks—such as those in our API—ensures you’re not acting on stale data.
Large reports with thousands of records can overwhelm a poorly optimized script, especially if parsed in memory. If your system loads the entire XML into RAM, it can cause timeouts or crashes during ingestion. Efficient handling requires streaming parsers (like SAX-style in Python or .NET) that process nodes one at a time. This is where tools like bulk verification excel—they manage massive datasets with background processing and automatic batching.
According to RFC 7483, which defines the format for aggregate DMARC reports, structures should be consistent, but implementation varies in practice. You can find the standard at RFC 7483. Even with the standard, real-world reports rarely follow it perfectly. This inconsistency is why automated parsing tools must include fallback logic and validation layers. The goal isn’t perfect parsing every time—it’s reliable data extraction, even when the source format shifts. That’s where a robust email verification infrastructure really matters.
How to validate and clean parsed authentication data before use
You should filter out malformed or incomplete records, deduplicate entries using composite keys, and cross-check IPs/domains against reputable blocklists like Spamhaus before using parsed SPF and DKIM reports. This ensures only clean, actionable data moves into your verification pipeline.
Filtering invalid or incomplete records
- Remove any record with a missing, invalid, or improperly formatted date field—this breaks time-based analysis and can skew trend reporting.
- Discard entries where the source IP is blank, malformed (e.g., not a valid IPv4 or IPv6), or resolves to a private or reserved range.
- Exclude records with undefined or missing alignment status—this indicates a failure in the DMARC policy enforcement check.
- Verify that each record includes a valid domain and sender address; empty or malformed values indicate a parsing error or fake data.
Deduplication and data integrity
- Combine record ID and timestamp into a composite key to identify and remove exact duplicates across multiple parsing runs.
- Use a rolling window (e.g., 24 hours) to flag and suppress repeated entries from the same source IP and domain during short intervals—common in automated testing tools or scan campaigns.
- Apply a deduplication threshold: if more than three identical entries appear from the same IP within one hour, treat them as noise and exclude them unless verified as legitimate by a broader context.
Cross-referencing with threat intelligence
- Use known blocklists like Spamhaus (https://www.spamhaus.org/) or the Spamhaus DROP List to flag IPs associated with spam, phishing, or abuse activity.
- Check domains against recent DNSBL or SURBL reports—especially if they’re newly registered or have high spam volume indicators.
- Automatically flag records where the source IP or domain appears on any of these lists; these should be set aside for manual review or excluded entirely.
- Regularly update your blocklist cache—static checks can miss evolving abuse patterns.
After this process, your parsed authentication data will reflect only high-fidelity records, reducing false positives in your email verification workflow. Tools like the bulk verification and real-time API can ingest this cleaned dataset to improve deliverability and sender reputation accuracy.
Integrating parsed DMARC data with email verification tools like Emaillistchecker.io
You can use parsed SPF and DKIM aggregate report XML to enrich domain profiles in email verification tools, flagging high-risk domains with frequent authentication failures, detecting sudden drops in alignment that suggest compromised infrastructure, and prioritizing domains for manual review or rejection during list hygiene—improving deliverability and reducing bounce rates.
Enriching domain profiles with DMARC analytics
DMARC aggregate reports provide insight into how your domains are being authenticated across the wild. By parsing SPF and DKIM results from these reports, you build a historical record of domain-level alignment. This data can be ingested into your verification system to enrich the profile of each domain in a list before sending.
For example, domains with consistent SPF or DKIM failures over time are more likely to be misconfigured or compromised. When you run a bulk verification, you can now flag these domains early—before sending—based on their authentication track record, not just real-time checks.
Using trends to identify infrastructure risks
Let’s say a domain has had consistent SPF/DKIM alignment for months, but a sudden spike in failures appears in a recent DMARC report. That’s an early signal something changed—maybe a compromised server, a misconfigured mail relay, or a leaked API key.
By integrating this historical trend analysis into tools like Emaillistchecker.io’s bulk verification, you can catch these anomalies before they impact deliverability. Sudden drops in alignment are not just technical glitches—they often precede blacklisting or high bounce rates.
Spam filters and inbox providers increasingly rely on domain reputation signals. According to the IETF’s DMARC specification, domain-level authentication failure rates are a key metric in reputation evaluation. Acting on these signals during list hygiene gives you an edge in inbox placement.
When you combine real-time verification with historical DMARC data, you're not just checking if an email exists—you're assessing whether it’s likely to be delivered. That’s what makes modern verification more than a syntax check.
Summary: Structuring SPF and DKIM data transforms passive reports into proactive deliverability intelligence
Parsing SPF and DKIM aggregate report XML into a structured database turns raw, passive data into actionable insights. This process reveals authentication failures, alignment issues, and sending patterns that impact sender reputation and inbox placement.
Why structure the data?
- It identifies mismatches between sender domains and DKIM signatures, a common cause of spam filtering.
- It detects unauthorized senders or impersonation attempts through SPF alignment failures.
- It enables early detection of configuration drift or compromise before deliverability degrades.
When this data is integrated into email verification workflows, it reduces the risk of sending to invalid or high-risk addresses. Even without parsing XML directly, tools like Emaillistchecker.io use these authentication signals to enhance verification accuracy and provide a stronger guard against delivery failures.
Sources
- Only about 9% of analyzed domains meet best practice — a p=reject DMARC policy with aggregate reporting enabled — despite record adoption growth. — DMARC Report (EasyDMARC 2026 data) (2026)
- DMARC adoption among the world's top 1.8 million domains jumped from 27.2% in 2023 to 47.7% in 2025 — a 75% surge driven by Google and Yahoo's sender rules. — EasyDMARC DMARC Adoption Report 2025 (2025)
Keep reading
- Email authentication: SPF, DKIM, DMARC and BIMI (complete guide)
- How Does SPF Validation Affect Email Deliverability for Verified Domains?
- How Does SPF Record Evaluation Order Affect Email Deliverability?
- Optimizing SMTP TLS Negotiation to Improve Email Validation Throughput
- SMTP Authentication Failure Codes List for Email Verification Services
Ready to put this into practice? Emaillistchecker.io verifies emails with 98.9% accuracy — start with 100 free verifications.
Frequently asked questions
What is an SPF and DKIM aggregate report?
It's an automated XML file sent weekly by email providers that summarizes how often emails from a domain passed or failed SPF and DKIM authentication, along with source IPs and timestamps.
Why can't I use SPF and DKIM reports directly for email verification?
The data is unstructured XML and hard to query. To use it for verification, you must extract and store it in a database for real-time analysis and matching against individual email addresses.
Can Emaillistchecker.io parse my SPF and DKIM aggregate reports?
No, the tool does not accept raw XML reports. However, it uses real-time authentication signals during verification to surface risk flags based on SPF and DKIM health.
How does parsing SPF and DKIM data improve email verification accuracy?
It allows identifying domains with consistent authentication failures, which can then be flagged as risky, reducing the chance of sending to invalid or compromised addresses.
What tools can parse SPF and DKIM aggregate report XML?
Python scripts with ElementTree, command-line tools like xmllint, or automated data pipelines using Apache NiFi or Airflow can parse and structure the XML into databases.
How often are SPF and DKIM aggregate reports generated?
Most providers such as Google and Microsoft generate them weekly. The report covers a rolling seven-day period and is delivered to the domain's DMARC reporting email address.
What are the most common issues in DMARC reports?
Common issues include failed SPF alignment, DKIM signature mismatches, or spoofing attempts. These often surface as high failure counts in aggregate reports.
How do I set up DMARC reporting to receive SPF and DKIM data?
Publish a DMARC DNS record with a rua tag pointing to an email address. Receiving mail servers will send aggregate reports to that address each week.
What is SPF alignment, and why does it matter?
SPF alignment checks that the domain in the envelope-from header matches the domain in the From header. Misalignment can lead to DMARC failures even if SPF passes.
Can I automate the parsing of DMARC reports at scale?
Yes — automate ingestion using scripts that connect to an email inbox (via IMAP), download reports, parse XML, and store results in a database for analysis.
How does this affect sender reputation?
Domains with consistent SPF and DKIM failures are often flagged by spam filters, which harms sender reputation and reduces inbox placement rates.
Is parsing aggregate reports required for email verification?
No — but it gives advanced teams a data advantage. Most SaaS tools handle it automatically using real-time infrastructure checks.