Detect spoofed email addresses by analyzing message headers
Workflow Description
An advanced security automation that receives emails via webhook, analyzes their headers to identify spoofing attempts and suspicious sources, classifies threat levels, and logs all findings for audit and incident response purposes.
How it works
- 1.Receive email data through webhook endpoint
- 2.Parse and analyze email headers using custom code logic
- 3.Verify sender source and declared domain authentication
- 4.Classify threat severity and document analysis results
- 5.Trigger alerts and reports when threats are detected
Use cases
- Protect corporate email from phishing and spoofing attacks
- Automatically assess incoming message security posture
- Document suspicious attempts for security reviews and compliance
- Alert security team immediately about malicious emails
Requirements
- Understanding of RFC 5322 and sender authentication protocols (SPF, DKIM, DMARC)
- Active webhook server configured to receive email message data
- Access to domain reputation services or APIs for validation
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (35)
Receive Headers
Webhook
Sticky Note
Sticky Note
Fraud Score
Code
Respond to Webhook
Webhook
Sticky Note1
Sticky Note
Explode Email Header
Code
Split Out IPs
Item Lists
Extract IPs from "received"
Code
IP Quality Score
HTTP Request
IP-API
HTTP Request
Collect interesting data
Set
SPF/DKIM/DMARC from "authentication-results"
Code
SPF from "received-spf"
Code
DKIM from "dkim-signature"
Code
DMARC from "received-dmarc"
Code
DKIM
Switch
Sticky Note4
Sticky Note
Extract Email Header from webhook
Set
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note8
Sticky Note
Sticky Note10
Sticky Note
Received Headers Present?
If
Authentication Results Present?
If
Aggregate Authentication Data
Set
Sticky Note2
Sticky Note
IP Data Merge
Merge
Merge Security Data
Merge
Join IP Analysis into one JSON object
Item Lists
Join results into one JSON object
Item Lists
SPF Authentication Checker
Switch
Set SPF Pass Status
Set
Set SPF Fail Status
Set
Set SPF Neutral Status
Set
Set SPF UnknownStatus
Set