Help PhishTrainer: reports
Set up reports, triage them and connect webhooks
On this page
What reports are for
Your staff receive doubtful emails: real phishing, spam, or PhishTrainer simulations. Reporting lets them pass these emails on to your security team, which finds them in PhishTrainer.
- Receiving: one or more sources bring reported emails into PhishTrainer (Settings menu, Receiving reports page).
- Triage: the Suspicious emails page groups reported emails; you classify each one (phishing, spam, benign…). PhishTrainer simulations are recognized and linked to their campaign.
- Integration: webhooks (Settings menu, Webhooks page) send PhishTrainer data to another application, for example a SIEM or a ticketing tool.
Reporting sources
A source describes the path a reported email takes to PhishTrainer. There are two families, shown in the Add a reporting source window:
- PhishTrainer reads a mailbox: your staff forward the suspicious email to a dedicated address (for example report@your-domain.com), which PhishTrainer reads at regular intervals;
- A “Report” button in the mail client: an add-in adds a button to the mail client; the email goes straight to PhishTrainer, with no intermediate mailbox.
| Source | For | What you need |
|---|---|---|
| Mailbox (IMAP) | A reporting mailbox hosted by any provider | The IMAP server address, a username and a password |
| Microsoft 365 mailbox | A Microsoft 365 reporting mailbox, read through Microsoft Graph without a mailbox password; works with the “Report” button built into Outlook | A Microsoft 365 administrator, to prepare the mailbox once |
| Outlook for Windows (VSTO) | Classic Outlook installed on Windows computers | Installing an MSI file on each computer, by hand or through deployment |
| Outlook Microsoft 365 | Outlook on the web, new Outlook, Outlook mobile | A Microsoft 365 administrator, to deploy the add-in |
| Gmail (Google Workspace) | Your organization’s Gmail mailboxes | A Google Workspace administrator, to install the add-on |
You can configure several sources and combine them, for example a reporting mailbox and an Outlook add-in. Each one is enabled independently.
Add a source
- In the extranet, open the Settings menu, then the Receiving reports page.
- In the My receiving sources card, click Add a source.
- Choose the source type. The matching form opens, with a reminder of what you need.
- Fill in the form (see the following sections), then click Save.
Source: mailbox (IMAP)
First create a mailbox dedicated to reports with your email provider. Then choose Mailbox (IMAP) and fill in the fields. Fields marked with an asterisk are required.
| Field | Value to enter |
|---|---|
| Source name: | Any name, to recognize the source in the list. |
| IMAP server: | Your provider’s IMAP server address, for example imap.example.com. |
| IMAP port: | A number between 1 and 65535: usually 993 for direct TLS, 143 for STARTTLS. |
| Encryption: | Direct TLS (usually port 993) or STARTTLS (usually port 143). The connection is always encrypted before the username and password are sent; if the server does not support STARTTLS, collection fails. There is no unencrypted mode. |
| User: and Password: | Credentials of the reporting mailbox account. When editing, leave the password empty to keep the current one. |
| Folder: | Folder to read. Suggested value: INBOX. |
| Collection frequency (minutes): | Interval between two collections, in whole minutes: 60 minimum (suggested value). |
| After collection: | What PhishTrainer does with the message in the mailbox once collected: Leave as is (default), Mark as read, Mark as unread or Delete the message. |
| Collection enabled | Switch: the mailbox is only collected while it is on. |
| Ignore certificate errors | Leave it off, unless an internal server uses a certificate you know is not trusted. |
Test, then save
- Click Test the connection at the bottom of the window. If it succeeds, PhishTrainer shows the number of unread emails in the folder.
- Click Save. The source appears under My receiving sources.
What to tell your staff
Give them the address of the reporting mailbox. Ask them to forward the suspicious email as an attachment when their mail client allows it: PhishTrainer then analyzes the original email as it is. A regular forward (in the message body) is also accepted, but the original sender is only found if it remains readable in the forwarded block.
Source: Microsoft 365 mailbox (Graph)
PhishTrainer reads an Exchange Online mailbox through Microsoft Graph, with an application registered in your Microsoft Entra, without a mailbox password. The application can only read this one mailbox. Combined with the “Report” button built into Outlook, this source receives the emails your staff report with that button.
Two ways to prepare
Choose Microsoft 365 mailbox. The window shows the procedure on the left (Prepare Microsoft 365) and the fields to fill in on the right. Two methods are offered: Manually (recommended), where you make each setting in the Microsoft portals, or With the script, a PowerShell script that makes the settings for you. The window details each step; here is how they fit together.
“Manually” method
- Outlook “Report” button: in the Microsoft Defender portal, declare the reporting mailbox as a SecOps mailbox (advanced delivery), then send reported messages to it (user reported settings).
- Create the application in Entra: under App registrations, create an application named “PhishTrainer - Reporting” (accounts in this directory only, no API permission), then a client secret. Copy the tenant ID, application ID, secret and its expiry date into the fields on the right.
- Allow the application to read the mailbox, and only that one: copy the application’s object ID from Enterprise applications (not the one under App registrations) into the Object ID (enterprise application) field, click Prepare the commands, then run the displayed commands in PowerShell 7 with an Exchange Administrator account. The last command must answer “InScope : True”.
- Click Save, then Test the connection.
“With the script” method
- Enter the reporting mailbox address in the Reporting mailbox field.
- Download the script and unblock it with the displayed command. It runs in PowerShell 7.2 or later, on an internet-connected workstation, not on an Active Directory server.
- Click Generate the command, copy it and run it. Add
-Simulationto see what the script would do without changing anything. - Sign in with a Microsoft 365 administrator account (Exchange Administrator and Application Administrator, or Global Administrator). The script shows what it will do and waits for your confirmation: answer
yes. - Copy the five values displayed at the end into the fields on the right. The secret is only shown once. Then click Save, then Test the connection.
Source fields
| Field | Value |
|---|---|
| Source name: | Any name, to recognize the source in the list. |
| Reporting mailbox | Address of the Exchange Online mailbox that receives reports (its primary address if it has several). Script value: Reporting mailbox. |
| Tenant ID | GUID shown in Entra on the application page, “Directory (tenant) ID”. Script value: Tenant ID. |
| Application (client) ID | GUID shown on the same page. Script value: Application (client) ID. |
| Secret and Secret expiry | The client secret “Value” (not its ID) and its expiry date, in the future. When editing, leave the secret empty to keep the current one. Script values: Secret and Secret expiry. |
| Folder to read: | Under Reading settings: Inbox (default) or Other folder (name):. Emails that are read stay in the mailbox. |
| Collection frequency (minutes): and Collection enabled | As for an IMAP source: 60 minutes minimum. |
After saving
Exchange permissions take 30 minutes to 2 hours to apply: a test refused just after saving is normal, try again later. The test reads no message; it tells you whether the mailbox is empty or holds messages to collect.
-RenewSecret), then enter the new secret and its date in the source. Otherwise collection stops. To remove everything from your Microsoft 365, run the script with -Remove -ReportingMailbox followed by the mailbox address.Sources: report buttons in the mail client
The three add-ins (Outlook for Windows (VSTO), Outlook Microsoft 365, Gmail (Google Workspace)) are added the same way: choose the type, fill in Source name:, check that Reception enabled is ticked and save. The source then shows an activation code and the tabs Settings, Installation, Message to employees, plus Enrolled devices (VSTO) or Links and users (Microsoft 365, Gmail). The Delete the email after reporting option moves the reported email to the employee’s deleted items, from where it can still be recovered.
Each add-in has its own deployment guide:
Monitor and manage sources
Each source in the My receiving sources list carries an Enabled or Disabled badge. Sources that read a mailbox show Last collection: and the latest error, if any; add-ins show Last report received:. Available actions:
| Action | Effect |
|---|---|
| Edit | Reopens the form. Saved passwords and secrets are never shown again: leave the field empty to keep them. |
| Disable | Stops collection, or reception for an add-in, without erasing the configuration. |
| Enable | Resumes collection or reception. |
| Delete | Stops the source and erases its configuration. This cannot be undone. |
Triage reports
Open Suspicious emails in the PhishTrainer menu, or click View suspicious emails on the sources page. An email reported by several employees appears only once: classifying it classifies it for everyone.
Overview
The Overview card gives, for the chosen Statistics period (7 days to 12 months): the number of Reported emails, those To analyze, the share of PhishTrainer simulations, the breakdown by Analysis result and by reported type (Reported as), and the Domains to analyze and Domains classified as phishing or spam. Clicking a domain filters the list on its emails.
Email list
The tabs filter by result: All, To analyze, Phishing, Spam, Benign, Undetermined, PhishTrainer simulations. Further filters: Sender domain, Reported as (phishing or spam, as declared by the employee), Declared interactions and Period. Sort by offers Most recent, To analyze for the longest and Most reported. Emails to analyze are highlighted.
Email details
Click a row to open Email details: sender, subject, first and last report dates, type, result, Last classification (who and when), then Employees who received it, Message body, Indicators (URLs, domains, sender, IP addresses, attachment hashes) and Attachments (name, type, size, SHA-256). The body is shown in an isolated frame; attachments cannot be downloaded.
Classify an email
- In the list, click the icon of the result you want at the end of the row, or open the details.
- In the details, choose the result after Classify this email as:.
- The classification applies to every report of this email. You can change it later: the last classification wins.
| Result | When to use it |
|---|---|
| Phishing | A real phishing attempt. |
| Spam | Unwanted mail with no established fraudulent intent. |
| Benign | A legitimate email, reported out of caution. |
| Undetermined | Not possible to decide with the available information. |
| PhishTrainer simulation | Offered in the details only: to correct a simulation that PhishTrainer did not recognize. |
Each report has a status: To analyze, Analysing or Classified. An email with no classification shows To analyze.
PhishTrainer simulations
When an employee reports a simulation email, PhishTrainer recognizes it and classifies it automatically (Last classification: Automatic). The view campaign results link opens the campaign concerned. Unmatched PhishTrainer simulation marks a recognized simulation for which no campaign was found.
Declared interactions
With some add-ins, the employee states what they did with the email: clicked a link, opened an attachment, entered credentials, replied or called. The Interacted badge flags entered credentials or an opened attachment; Interaction declared flags a clicked link, a reply or a call. For mailbox collection, the question is not asked (Not asked). The With a risky interaction filter isolates these emails.
Webhooks
A webhook is a web address (URL) of your application to which PhishTrainer sends data as your campaigns run. Use it to feed a SIEM, a ticketing tool or a team chat channel, without checking the extranet by hand.
Create a webhook
- Open the Settings menu, then Webhooks.
- Click New WebHook.
- Name : any name, at least 5 characters.
- URL : full address of the application that receives the data, for example
https://siem.your-domain.com/phishtrainer. Use anhttps://address. - Secret: optional, but recommended. Enter a long random string known only to PhishTrainer and your application: it is used to sign each delivery.
- Turn on Is active ? (data is sent only to active webhooks), then click Register Webhook.
Delivery format
Each delivery is an HTTP POST request whose body is a JSON document. Your application must answer with an HTTP code below 400: a code of 400 or more, or no answer within 10 seconds, counts as a failure. Redirects are not followed. Headers sent:
Check the signature
When a secret is set, PhishTrainer adds the X-Gophish-Signature header, in the form sha256= followed by a hexadecimal signature. This signature is the HMAC-SHA256 of the raw request body, computed with the secret as key. To check a delivery, your application computes this HMAC over the body as received, before any JSON decoding, and compares it with the header value. Reject any request without the header or with a different signature.
hash_equals in PHP, hmac.compare_digest in Python) and never log the secret.Edit or delete
The list shows each webhook’s title, URL and state. The Edit Webhook and Delete Webhook buttons act on the row. Deletion cannot be undone. To pause deliveries without losing the configuration, turn off Is active ?.
Troubleshooting
| Message or symptom | What to do |
|---|---|
| “Unable to connect to the mailbox” (IMAP) | Check the server, port, encryption and credentials. The port must match the mode: usually 993 for direct TLS, 143 for STARTTLS. |
| “Unable to read the mailbox” or “The folder to read cannot be found” | Check the exact name of the folder to read. For Microsoft 365, if several folders have this name, rename one. |
| Warning “saved without encryption” on an IMAP source | The source is no longer collected. Open it, choose an encryption mode, test the connection, then save. |
| Microsoft 365 test refused just after saving, or “Permissions are still propagating” | Normal: Exchange permissions take up to 2 hours to apply. Try again later. |
| “Microsoft denies access to the reporting mailbox” | Run the script again, which checks and corrects the permissions, or check the Exchange commands from step 3 of the manual method. |
| “The application secret has expired” or “Microsoft refused the application's connection” | Check the tenant, the application and the secret. If needed, create a new secret (script with -RenewSecret) and enter it, with its expiry date, in the source. |
| Warning: the application has Microsoft permissions | The application must have no API permission. Remove them in Entra, then run the script again. |
| “No agent answered in time” (encrypted organization) | Check that your organization’s Bexxo Protected agent is running and connected, then run the test again. |
| A reported email does not appear in Suspicious emails | Check that the source is Enabled and look at its Last collection: and latest error. A mailbox is only collected at the chosen frequency (60 minutes minimum). |
| Reporter shown as “Reporter not recognized” | The address that sent the email does not match any PhishTrainer target in your organization. Check your list of targets. |
| Webhook: no data received | Check that Is active ? is on, that the URL can be reached from the internet and that your application answers with a code below 400 within 10 seconds, without redirect. |
Didn’t find the answer? Contact us