GoWeBaKnowledge Center

title: "Email Security — Anti-Spoofing & Anti-Spam Filters" description: "GoWeBa protects your email domains against identity spoofing and spam with built-in RFC 2822, SPF, DKIM, and DMARC filters in the reception engine." lastUpdated: "2026-05-13" author: "GoWeBa — Security Team"

Email Security — Anti-Spoofing & Anti-Spam Filters

🛡️ GoWeBa includes a multi-layer email protection system that automatically detects and blocks fraudulent emails, identity spoofing attempts, and spam before they ever reach your inbox.

📅 Date: May 13, 2026 🏷️ Version: 1.2.1 🟢 Status: Active — deployed in production


🔒 What is Email Spoofing?

Email spoofing is a technique used by scammers to send emails that appear to come from your own email address or domain. The goal is to trick the recipient into believing the message is legitimate.

Common example: a sextortion email claiming "I hacked your email account and sent this message from your own address!" In reality, the scammer simply forged the "From" field — they have no access to your account.

⚠️ Important: A spoofed email does NOT mean your account has been hacked. It's the digital equivalent of writing a fake return address on a paper envelope.

🛡️ GoWeBa Multi-Layer Protection

GoWeBa uses a defense-in-depth system with 3 layers of protection:

Layer 1 — DNS-Level Filtering (Prevention)

Your email domains are protected by three Internet security standards:

StandardFunctionGoWeBa Configuration
SPF (Sender Policy Framework)Declares which servers are authorized to send emails for your domainv=spf1 include:sendgrid.net -allStrict mode: any unauthorized server is rejected
DKIM (DomainKeys Identified Mail)Cryptographic signature proving the email wasn't modified in transit2048-bit RSA keys (s1 + s2) via SendGrid — automatic signing
DMARC (Domain-based Message Authentication)Policy telling worldwide servers what to do with unauthenticated emailsp=rejectStrict mode: spoofed emails are rejected, never delivered

Layer 2 — Webhook-Level Filtering (Real-Time Detection)

GoWeBa's reception engine analyzes every incoming email in real time:

RuleDetectionAction
Self-spoofingSender claims to send from your own domain but fails SPF verification🚫 Blocked — email never stored
High spam scoreSpamAssassin score (provided by SendGrid) exceeds 5.0 threshold🚫 Blocked — email never stored
SPF hard failSPF verification fails for any sender🚫 Blocked — email never stored
💡 Every blocked email is logged with the reason, spam score, and SPF/DKIM results for audit and analysis.

Layer 3 — Security Verdicts (Traceability)

Every email that passes the filters is stored with complete security verdicts:

  • SPF result: pass, fail, softfail, neutral
  • DKIM result: pass, fail
  • Spam score: numeric SpamAssassin score

This information is accessible in each message's metadata for full transparency.


📊 Security Dashboard

Administrators can monitor email security from the WEBA Cleanup module (/inbox/cleanup):

  • 📈 Real-time statistics — messages analyzed, RFC links found
  • 🔗 Conversation regrouping — detection of fragmented threads via In-Reply-To and Message-ID
  • 🧹 Automatic cleanup — removal of empty threads, counter corrections
  • Retroactive regrouping — intelligent merging of scattered conversations after import/migration

When you connect a custom domain to GoWeBa, we automatically configure the security DNS records. Here's the optimal configuration:

SPF (TXT record on your domain)

v=spf1 include:sendgrid.net -all
  • include:sendgrid.net — authorizes SendGrid servers (GoWeBa)
  • -allstrict mode — rejects any other server
  • ⚠️ Do not use ~all (tilde) — that's the permissive mode that lets spoofed emails through

DKIM (CNAME records)

s1._domainkey.yourdomain.com → s1.domainkey.u61475168.wl169.sendgrid.net
s2._domainkey.yourdomain.com → s2.domainkey.u61475168.wl169.sendgrid.net

Two 2048-bit RSA signing keys for redundancy and secure rotation.

DMARC (TXT record on _dmarc.yourdomain.com)

v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com; pct=100
  • p=rejectblocks unauthenticated emails (doesn't even send them to spam)
  • rua=mailto:... — aggregated DMARC reports for monitoring
  • pct=100 — applied to 100% of emails

🆘 What to Do If You Receive a Suspicious Email?

ActionRecommendation
Don't replyNever respond to a spam or sextortion email
Don't payCryptocurrency ransom demands are always scams
Don't clickDon't click any links in a suspicious email
Delete itYou can safely delete the email
Check your DNSConfirm your SPF uses -all and your DMARC p=reject
Contact supportIf in doubt, contact support@goweba.com

🏗️ Technical Architecture

Email Reception Flow

Internet → SendGrid (MX) → GoWeBa Webhook → Anti-spoofing/spam filter → Storage
                                    ↓
                            ┌───────────────┐
                            │ Rule 1: Self-spoof  │ → Blocked (SPF fail + same domain)
                            │ Rule 2: Spam score   │ → Blocked (score ≥ 5.0)
                            │ Rule 3: SPF fail     │ → Blocked (hard fail)
                            └───────────────┘
                                    ↓
                            Legitimate email → Stored with verdicts

Components Involved

ComponentRole
SendGrid Inbound ParseEmail reception via MX, delivery to webhook
/api/webhooks/sendgrid-inboundProcessing webhook with built-in anti-spoofing filter
checkSpamAndSpoofing()Multi-level verification function (3 rules)
securityVerdictsJSON storage of SPF, DKIM and spam score results per message
lib/imap/thread-cleanup.tsConversation cleanup and regrouping engine

✅ Summary

ProtectionTypeStatus
SPF -allDNS — prevention✅ Configured by GoWeBa
DKIM RSA 2048DNS — authenticity✅ Configured by GoWeBa
DMARC p=rejectDNS — policy✅ Configured by GoWeBa
Self-spoofing filterWebhook — detection✅ Active
Spam score filterWebhook — detection✅ Active
SPF hard fail filterWebhook — detection✅ Active
Security verdictsStorage — traceability✅ Active
RFC 2822 regroupingCleanup — conversations✅ Active

GoWeBa protects your communications. You can send and receive emails with confidence. 🛡️

— GoWeBa Security Team 🔒

© 2024–2026 GOWEBA INC. — Make it Simple, Make it Possible, Make it Real.