A hands-on tutorial: scan a suspicious email in two minutes, then automate it with a watched folder or a live IMAP mailbox.
Phishing is still the most common way attackers get a foothold, and the evidence is usually sitting right in the message: a failed SPF check, a Reply-To that doesn't match the sender, a .docm attachment, a link that points somewhere other than it claims. Cyber Threat Analyzer (CTA) includes an Email Security module that checks for all of these and feeds the results into the same Events, Alerts and Dashboard you already use for endpoint monitoring.
This tutorial walks through using it, from a one-off scan to hands-off background monitoring.
What you'll learn
- What the Email Security engine checks
- How to scan a single
.emlfile from the GUI - How to enable automatic scanning of a folder or an IMAP mailbox
- How to read verdicts, scores, events and alerts
- Limits to keep in mind
What it checks
Every message goes through one detection pipeline:
- Authentication: SPF, DKIM and DMARC results
- Header integrity: signs of spoofing, such as mismatched sender and reply addresses
- Attachments: dangerous extensions, double extensions (like
invoice.pdf.exe) and suspected macros - URLs: suspicious or malicious-looking links in the body
- Phishing content: urgency and credential-theft language in the subject and body
- Sender domain age (optional): a WHOIS lookup that flags newly registered domains
Each finding adds weight to a 0-100 risk score, which maps to a verdict:
Score | Verdict | What CTA does |
|---|---|---|
Under 40 | Deliver | Logs an Event only |
40-69 | Quarantine | Logs an Event and raises an Alert |
70 or more | Reject | Logs an Event and raises an Alert |
Alert severity gets one more cut within each verdict, so a borderline reject and an obviously malicious message aren't treated the same. Quarantine is MEDIUM or HIGH (HIGH from score 55), and reject is HIGH or CRITICAL (CRITICAL from score 85).
Clean mail deliberately creates only an Event, not an Alert. Otherwise every legitimate message would flood your Alerts view.
Part 1: Scan one email by hand
This needs no configuration, and it works even when background monitoring is off.
Step 1: Get the message as an .eml file
Most mail clients can save or export a message as .eml. In Outlook, for example, you can drag a message to the desktop or use Save As. In Thunderbird, use Save As > File. If you want a safe test file, create one yourself:
From: "IT Support" <helpdesk@examp1e-support.test>
Reply-To: collect@different-domain.test
To: you@example.com
Subject: URGENT: Your account will be suspended
Date: Wed, 07 Oct 2026 09:00:00 +0800
Message-ID: <test-001@examp1e-support.test>
Content-Type: text/plain; charset=utf-8
Your password expires today. Verify your account immediately
or access will be suspended:
http://examp1e-support.test/login/verifySave it as test-phish.eml. It uses reserved .test domains, so nothing in it points at a real site.
Step 2: Run the scan
- Start CTA with
python main.py. - Click Email Security in the left sidebar.
- Click Scan .eml File… and choose your file.
Step 3: Read the result
A popup shows the verdict, the score out of 100, and a one-line summary with the most actionable finding first. It looks like this:
From "IT Support" <...>: "URGENT: ..." -- risk NN/100 (verdict) -- SPF/DKIM failed; 2 phishing indicator(s); 1 suspicious URL(s)The exact score and verdict depend on the findings for your file. A message like the test above, with a Reply-To mismatch, urgency language and a suspicious link, is the kind of thing the engine is built to flag.
Step 4: Decide whether to log it
WTA then asks whether to add the scan to Live Events. Choose Yes to record it, and to create an Alert if the verdict is quarantine or reject. Choose No to keep it as a throwaway check.
Part 2: Automate with a watched folder
The folder approach needs no extra packages. It fits a setup where your mail system, a SOAR playbook, or a "forward suspicious mail here" mailbox already drops messages into a directory.
Open src/config/settings.json, find the email_security block, and change it to:
"email_security": {
"enabled": true,
"watch_dirs": ["C:/mail/suspect/new"],
"poll_interval_seconds": 2.0,
"check_domain_age": false
}Restart WTA. From now on, any .eml file that lands in C:/mail/suspect/new is scanned within a couple of seconds and then moved into a sibling folder based on its verdict:
C:/mail/suspect/
├── new/ <- drop messages here
├── cur/ <- delivered (clean)
├── quarantine/ <- suspicious
└── rejected/ <- maliciousThe sibling folders are created automatically. You can list more than one path in watch_dirs.
Part 3: Watch a live IMAP mailbox
If you'd rather point WTA at a real mailbox, enable the IMAP intake. You can use it instead of folders or alongside them.
"email_security": {
"enabled": true,
"imap": {
"enabled": true,
"host": "imap.example.com",
"port": 0,
"username": "you@example.com",
"password": "",
"mailbox": "INBOX",
"use_ssl": true,
"use_idle": false
}
}A few notes on these settings:
- Keep the password out of the file. Set the
WTA_EMAIL_IMAP_PASSWORDenvironment variable instead. CTA reads it first. port: 0means the default: 993 with SSL, 143 without.- Polling vs IDLE:
use_idle: falsepolls on thepoll_interval_secondsschedule and needs only the standard library.use_idle: trueuses push-style IMAP IDLE but requires the optionalimapclientpackage. - Consider a dedicated mailbox. A mailbox used only for reported or forwarded suspicious mail is a safer starting point than your primary inbox.
Optional: sender domain age
Set "check_domain_age": true to add a WHOIS lookup of the sender's domain, which raises the score for newly registered domains. It needs network access and the optional whois package, and it quietly does nothing if either is missing.
Part 4: Reading the results
Once monitoring is running, results show up in several places.
The Email Security tab has a table with Time, Severity, Sender, Subject, Verdict, Score and Details. Click Refresh Scanned Emails to update it. The status line above the table tells you whether the background monitor is running this session.
Live Events and the Dashboard show every scanned message, using these synthetic event IDs:
Event ID | Meaning |
|---|---|
90500 | Email scanned and delivered cleanly |
90501 | Suspicious email quarantined |
90502 | Malicious email rejected |
Alerts appear only for quarantine and reject verdicts, with the risk score attached.
The startup banner and logs/wta.log show whether the module is on. The banner prints Email Security ...... Enabled or Disabled. If you enable it but configure neither watch_dirs nor IMAP, the log warns that there is nothing to watch.
Troubleshooting
- Nothing happens after I edit settings.json. Restart WTA. Settings are read at startup.
- The tab says monitoring isn't running. Check that
enabledistrueand that at least one ofwatch_dirsorimap.enabledis set. Manual file scanning still works either way. - IMAP IDLE fails. Install
imapclient, or setuse_idletofalseto use polling. - Files aren't picked up. The watcher looks only for files ending in
.eml. - Domain age has no effect. Make sure the machine has network access and the
whoispackage is installed.
Limits to keep in mind
- It takes in
.emlmessages. Mail has to reach CTA as.emlfiles, through a folder or IMAP. - It isn't a mail gateway. The only action it takes is filing messages into
cur/,quarantine/orrejected/and raising Events and Alerts. It doesn't block mail at your mail server. - Scores are heuristics. Treat verdicts as triage. Review quarantined messages before deciding they are malicious, and expect occasional false positives and misses.
- Handle samples carefully. Quarantined messages may contain real malware. Don't open attachments on a machine you care about.
Wrapping up
Start with the manual scan to get a feel for the verdicts. Once you trust the output, point a watched folder or a dedicated mailbox at it and let the Alerts view tell you when something needs attention. Because email findings land in the same Events and Alerts as your endpoint telemetry, a phishing hit can sit right next to the process, file or registry activity that follows it.
No comments:
Post a Comment