OFORK installation and use
Prerequisites
Use OFORK 12 with stored original email sources and a normal agent interface. This release was exercised on 12.0.3. The Perl modules JSON::PP, Digest::SHA, MIME::Base64, Mail::Address, LWP::UserAgent and LWP::Protocol::https must be available. On Debian/Ubuntu, the HTTPS dependency is provided by liblwp-protocol-https-perl. Install dependencies through your normal package-maintenance process.
Back up the OFORK database and configuration before installing an add-on. Establish a development instance with outgoing email disabled for acceptance tests. The supplied test setup refuses to run unless SendmailModule contains DoNotSendEmail.
Install the package
Verify the downloaded OPM against SHA256SUMS. Install through Admin → Package Manager, or run the OFORK console under the installation's application user:
cd /opt/ofork
sudo -u ofork bin/ofork.Console.pl Admin::Package::Install /path/to/SpamFeedback-12.0.2.opm
sudo -u ofork bin/ofork.Console.pl Maint::Config::Rebuild
sudo -u ofork bin/ofork.Console.pl Maint::Cache::Delete
Adapt the installation path and application user to your system. Reload the web workers using your normal graceful procedure. The package adds its own modules; it does not replace core OFORK files or the existing Email article-actions configuration.
Select a received email article in a ticket. Its article menu now contains Spam feedback. An outgoing agent email or internal note cannot be reported. Missing stored source and messages above 20 MiB are rejected without creating a report. The ticket-level menu and currently selected article are different: select the received email first.
Configuration
In System Configuration, search for SpamFeedback and edit the hash:
| Key | Example | Meaning |
|---|---|---|
Endpoint |
https://pmg.example.org:9443 |
HTTPS origin of the companion gateway, without a trailing slash or path. Blank means local recording only. This is not PMG port 8006. |
TokenFile |
/opt/ofork/var/spamfeedback-token |
Absolute path to the bearer token file; never paste a token into System Configuration. |
CAFile |
/opt/ofork/var/spamfeedback-ca.pem |
Optional trusted CA bundle. Blank uses the system trust store. Hostname verification is always enabled. |
SenderGroup |
admin |
OFORK group whose agents have rw membership and may change gateway-wide sender policy. |
Transfer the gateway's matching token securely to the OFORK host. The token must be 32–256 URL-safe characters. Make the file readable by the application user and inaccessible to other users, normally mode 0600. The code also permits 0640 for a deliberately restricted application group. Do not expose the file through the web server. Keep the certificate's private key on the gateway; the helpdesk needs only a public CA certificate when using a private CA.
This version supports one gateway per OFORK installation. It does not implement automatic queue-to-gateway mapping or recipient-specific lists. Do not use the global sender controls for a multi-tenant gateway unless the designated group is authorised to manage all its recipients.
A blank/unreachable endpoint still allows local spam/ham decisions. Sender controls appear only when the gateway is reachable, the sender is unambiguous, the agent has sender-list permission, and sender-policy enforcement is enabled in the gateway configuration.
Daily use
- Select the received email and open Spam feedback.
- Inspect the displayed subject, exact From address, gateway and current sender policy.
- Choose Confirm spam or Not spam. Reporting is checked by default when a gateway is configured; uncheck it to record only locally.
- For an authorised sender change, select Whitelist, Blacklist or Remove sender rule. These actions always report to the gateway and do not silently train the email as spam or ham.
- Check the explicit confirmation box, apply, and read the resulting history.
The Send or retry the latest report action sends an unsent decision or retries a pending request using its original request ID. A timeout is not proof of failure. Do not make a new contradictory report merely to clear a pending indicator. The gateway deduplicates identical IDs, rejects mismatched payloads and prevents an old pending classification from overriding a newer correction.
Whitelisting and blacklisting replace one another in the managed list; removal restores normal classification. The selected mailbox is lowercased and matched exactly. Only ASCII mailbox addresses are supported in this release. Quoted local parts, internationalised addresses, multiple From headers, multiple mailboxes and wildcards need manual review. Display names, Reply-To and Return-Path are never substituted for From.
Status and permissions
- Saved here only (
local): human decision saved in OFORK; no gateway acknowledgement. - Waiting for confirmation (
pending): reporting was attempted and is unconfirmed. The remote action may already have happened. - Received by mail filter (
reported): the gateway acknowledged learning/already-learned or a sender-policy change. It does not mean the AI was trained, nor does it certify the rest of a site's mail-routing configuration.
Ticket rw permission and action ACLs are checked on every request. Sender changes additionally require rw membership in SenderGroup. Hiding an option is not the permission boundary: forged direct POSTs are also checked. Mutations require POST, a valid OFORK challenge token and explicit confirmation. A stale form is rejected rather than overwriting a newer decision.
History is private to the agent feature, not a customer-visible article. It displays agent names and retains numeric IDs in the audit record. The name shown follows the current agent profile. This version does not generate ticket notes, email notifications, queue moves, closures or destructive mail deletions.
Storage, backups and removal
The module stores per-ticket/article JSON history and lock files in <OFORK Home>/var/spamfeedback/, mode 0700 for the directory and 0600 for history. Back this up alongside OFORK. It contains sender addresses and case metadata, but not copies of message bodies or tokens. Writes are locked, flushed and atomically replaced. Multiple web nodes require a shared filesystem with reliable locking and the same history directory; independent local directories are not supported.
Uninstall with Package Manager or Admin::Package::Uninstall SpamFeedback. The package deliberately does not delete runtime history. Archive or remove it separately according to your retention policy after backing it up. Remove the token only when no other configured application uses it. Uninstalling the frontend does not undo gateway lists or learned Bayesian data.
If changing gateways, reconcile any pending reports first. An event already attempted against one endpoint cannot be silently retried against another. A copied/cloned installation should have a distinct FQDN/SystemID and its own gateway credential/source name.