Custom Threat Rules (Enterprise)
Custom threat rules let enterprise admins define organisation-specific logic that overrides PhishNet's AI scan score before an email is classified as clean, suspicious, or phishing. Rules run after all scoring (deterministic checks and LLM analysis) is complete, so they can act on the final computed score as well as the email's content.
How rules work
Each rule has:
- One or more conditions — criteria that are tested against the email (sender domain, subject, phish score, etc.)
- Match logic — whether all conditions must match (AND) or any one is enough (OR)
- An action — what to do when the rule matches
- A priority — lower number = evaluated first. The first matching rule wins; subsequent rules are not evaluated.
Actions
| Action | Effect on the score |
|---|---|
| Allow | Sets the score to 0, so the email is classified as clean regardless of what the AI scored it. Use this for trusted senders that occasionally trip heuristics. |
| Flag | Raises the score to at least 40, so the email is at least suspicious even if the AI thought it was clean. A higher score is left as it is. |
| Quarantine | Sets the score to 100, so the email is classified as phishing. It's moved to quarantine automatically if the organisation's Auto-quarantine high-risk emails policy or the member's own auto-quarantine setting is on (see Policies & Preferences). |
Managing rules
Go to Enterprise → Threat Rules in the admin dashboard. The bar at the top shows where rules sit in a scan: AI score → Your rules (first match wins) → Final verdict.
Creating a rule
- Click + New rule.
- Enter a Name (required) and an optional Description, which is shown in the rules list.
- Set the Priority: a whole number, default 100. Lower numbers run first.
- Under When, choose whether all or any of the conditions must match.
- Add conditions. Each one is a field, an operator and a value. Click + Add condition for more; rows left blank are ignored.
- Under Then, choose Allow, Flag or Quarantine. Each option shows its effect on the score.
- Check the Preview line, which describes the rule in plain English, then click Create rule.
The editor only offers operators that fit the field. A phish score must be a whole number from 0 to 100, and a regular expression is checked when you save; if it's invalid, the editor shows why.
Editing a rule
Click Edit on any rule, make your changes and click Save rule. Changes apply to the next email scanned.
Pausing a rule
Use the toggle on a rule to pause it without deleting it. Paused rules are dimmed, marked Paused and skipped during scanning. Turn the toggle back on to resume.
Reordering rules
Rules are listed in the order they run. Use the ▲ and ▼ arrows beside a rule's priority number to move it up or down. Moving a rule swaps its priority with its neighbour's. If rules share a priority, the whole list is renumbered in steps of 10 (10, 20, 30…) so the new order sticks.
Deleting a rule
Click Delete on a rule, then Delete again to confirm. This can't be undone; pause the rule instead if you might need it later.
Rule priority
Rules run in ascending priority order (1 before 2, 10 before 100), and the first rule that matches wins. When two rules have the same priority, the older rule runs first.
If you have many rules, keep your most specific or highest-confidence rules at low priority numbers so they are evaluated first.
If a rule can't be evaluated, for example one saved before the editor's current checks existed, it's skipped and the rules after it still run.
Conditions
Each condition targets one field of the email and applies an operator and a value.
Available fields
| Field | What it matches |
|---|---|
Sender email | The full from-address (e.g. phishing@evil.com) |
Sender domain | The domain portion of the from-address (e.g. evil.com) |
Display name | The sender's display name as shown in the inbox (e.g. IT Support) |
Subject | The email subject line |
Body text | The first portion of the email body |
Phish score | The numeric threat score (0–100) computed by PhishNet before rules run |
Any URL | True if any URL in the email matches the condition |
Any attachment | True if any attachment filename matches the condition |
Available operators
Text fields (every field except Phish score). All of these ignore case except matches regex:
| Operator | Matches when… |
|---|---|
equals | Field exactly equals the value |
not equals | Field does not equal the value |
contains | Field contains the value as a substring |
starts with | Field begins with the value |
ends with | Field ends with the value |
matches regex | Field matches the regular expression. Case-sensitive; start the pattern with (?i) to ignore case. Uses RE2 syntax, so lookarounds and backreferences aren't supported. |
Phish score (a whole number from 0 to 100):
| Operator | Matches when… |
|---|---|
equals | Score is exactly the value |
not equals | Score is not the value |
≥ | Score is greater than or equal to the value |
≤ | Score is less than or equal to the value |
Example rules
Block a specific domain
Quarantine all email from a known-bad sender domain, regardless of what the AI scored.
| Field | Operator | Value |
|---|---|---|
| Sender domain | equals | evil-lookalike.com |
Action: Quarantine · Logic: All · Priority: 10
Protect against display-name spoofing
Flag any email claiming to be from "IT Support" or "Help Desk" that doesn't come from your internal domain.
Condition 1:
| Field | Operator | Value |
|---|---|---|
| Display name | matches regex | (?i)it support|help desk |
Condition 2:
| Field | Operator | Value |
|---|---|---|
| Sender domain | not equals | acme.com |
Action: Flag · Logic: All · Priority: 20
Suppress false positives for a trusted partner
A supplier's invoicing system sends automated emails that occasionally trip the AI's urgency heuristics. Allow them unconditionally.
| Field | Operator | Value |
|---|---|---|
| Sender domain | equals | invoices.trustedsupplier.com |
Action: Allow · Logic: All · Priority: 50
Escalate high-score emails from outside your organisation
Emails scoring 70 or more are already classified as phishing, but auto-quarantine only starts at 80. This rule pushes every external email scoring 70 or more to 100, so auto-quarantine catches the 70–79 band too.
Condition 1:
| Field | Operator | Value |
|---|---|---|
| Phish score | ≥ | 70 |
Condition 2:
| Field | Operator | Value |
|---|---|---|
| Sender domain | not equals | acme.com |
Action: Quarantine · Logic: All · Priority: 30
How rules interact with policies
Custom threat rules run after all org policies (trusted-sender allowlist, domain blocklist) and before the final classify step. The processing order is:
- Deterministic checks (SPF, DKIM, URL heuristics)
- LLM analysis (PhishNet's models, or your organisation's own provider)
- Trusted-sender allowlist
- Block known phishing domains (org policy)
- Custom threat rules ← runs here
- Final classification (clean / suspicious / phishing)
If a trusted-sender allowlist entry already set the score to 0, a custom rule can still raise it. Rules operate on whatever score exists at the time they run.
When a rule matches, the email's details on the Threats page include a note such as Custom rule "Block spoofed domains" applied: quarantine, so admins can see exactly which rule fired and what it did.
Requirements
- PhishNet Enterprise plan
- Admin or Owner role in the PhishNet admin dashboard