Analyze email headers for IPs and spoofing 3
This workflow analyzes email header information to extract IP addresses and assess their reputation, enabling real-time detection of potential fraud and spam activities. It also performs comprehensive validation of email authentication mechanisms such as SPF, DKIM, and DMARC to identify the risk of email forgery. By receiving email header data through Webhook, it facilitates automated security analysis, providing businesses with effective tools for email security monitoring, compliance checks, and anti-phishing protection.

Workflow Name
Analyze_email_headers_for_IPs_and_spoofing__3
Key Features and Highlights
This workflow focuses on in-depth analysis of email header information, emphasizing the extraction of IP addresses and leveraging third-party services to assess IP reputation, thereby detecting potential fraud and spam activities. It also performs comprehensive verification of the three major email authentication mechanisms—SPF, DKIM, and DMARC—to help identify risks of email spoofing or deception. Triggered via Webhook, it enables real-time reception and processing of email headers for automated security analysis.
Core Problems Addressed
- Trustworthiness and risk assessment of email source IP addresses
- Verification of email passing mainstream authentication mechanisms (SPF, DKIM, DMARC)
- Detection of hidden fraud, spam, or spoofing behaviors within email headers
- Centralized integration of multi-source information to generate clear security analysis reports
Use Cases
- Email security monitoring for enterprises or security operations teams
- Auxiliary analysis tool for anti-phishing and anti-spam systems
- Email security auditing and compliance checks
- Automated email source verification and threat intelligence gathering
Main Workflow Steps
- Receive Email Header Data: Accept raw email header information via a Webhook node.
- Parse Email Headers: Use a code node to decompose the email headers into structured fields.
- Inspect Email Header Content: Detect the presence of “received” fields and “authentication-results” fields separately.
- Extract IP Addresses and Assess Reputation:
- Extract all IP addresses from the “received” fields.
- Use the IP Quality Score API to obtain IP fraud scores, historical abuse records, associated organizations, and more.
- Retrieve IP geolocation and ISP information via IP-API.
- Determine spam activity status and IP reputation level based on risk scores.
- Email Authentication Analysis:
- Validate SPF, DKIM, and DMARC pass/fail status based on the “authentication-results” field.
- Extract detailed authentication results from “received-spf,” “dkim-signature,” and “received-dmarc” fields respectively.
- Perform status evaluation and routing logic for SPF and DKIM results.
- Data Integration: Merge IP reputation analysis with email authentication results to form a comprehensive security analysis dataset.
- Response Output: Return the analyzed data via Webhook response, supporting downstream system calls or display.
Involved Systems and Services
- n8n: The automation platform executing the entire workflow.
- Webhook: Receives external email header data and returns analysis results.
- IP Quality Score API: Provides IP fraud scoring and risk assessment.
- IP-API: Supplies IP geolocation and ISP information.
- JavaScript Code Nodes: Implement email header parsing, status evaluation, and data processing logic.
Target Users and Value
- Security Operations (SecOps) Teams: Quickly assess email risks to detect and block phishing and fraudulent emails.
- Email System Administrators: Monitor email authentication status to ensure secure email transmission.
- Enterprise IT Departments: Automate email security analysis to enhance protection efficiency.
- Developers and Automation Engineers: Utilize n8n for flexible integration and extension of email security workflows.
By analyzing email headers from multiple dimensions, this workflow helps users gain comprehensive insights into email security and source authenticity, serving as a vital tool to enhance email protection capabilities.