SpamFeedback for OFORK
SpamFeedback records a human decision on a received ticket email and optionally reports the original message to a configurable gateway. It provides Confirm spam, Not spam, Whitelist sender, Blacklist sender and removal of an existing sender rule.
Developed by Openfactory Nordic Oy. Author: Silvan Gebhardt contact@fi.openfactory.net. Copyright 2026 Openfactory Nordic Oy. Licensed under GPL-3.0-or-later.
What it does
- Confirmation remains available when an email already carries a spam tag. The human decision is separate from the automatic verdict.
- A false-positive report learns the message as ham. Rspamd can reverse a previous spam classification without counting the same message repeatedly.
- Whitelist and blacklist entries are mutually exclusive, reversible, exact From mailbox rules. They apply gateway-wide, not just to one ticket or recipient. Domain wildcards and ambiguous/multiple From addresses are refused.
- Reporting uses the stored original RFC822 message, including MIME structure and attachments. The email, subject, ticket queue and ticket state are preserved. Nothing is sent as an email reply.
- History shows the agent name and records agent ID, UTC time, decision, destination and reporting status. A gateway timeout retains the decision as pending. Retry uses the same request ID.
- The optional incoming-mail policy checks the sender list first, then asks both Bayes and AI. Only agreement marks spam. Weak, missing or conflicting results are uncertain and delivered without the consensus spam tag. Malware protection remains independent.
Components and compatibility
| Component | Purpose | Tested platform |
|---|---|---|
SpamFeedback-12.0.2.opm |
OFORK article action and human-feedback history | OFORK 12.0.3, Perl 5.38, PostgreSQL |
gateway/feedback.py |
Authenticated HTTPS learning and sender-policy API | Python 3.12/3.13; Python 3.14 unit tests |
gateway/consensus.py |
PMG custom-check protocol v1, sender lists and Bayes/AI agreement | PMG integration classes 9.1.4, Rspamd 3.12.1 |
gateway/PMG/SpamFeedback.pm |
Optional strict gate for selected native PMG spam rules | Isolated tests against installed PMG 9.1.4 classes |
The OFORK add-on works without a gateway: decisions remain local. Reporting teaches the Bayesian filter and does not require AI. If an AI model is configured in PMG/Rspamd, these reports do not retrain it. The gateway does not expose the PMG administration API and needs no PMG root password or administrator token.
Znuny and OTOBO are not certified or tested targets of this release. The gateway protocol is independent of the helpdesk. Porting the frontend requires adapting package/configuration manifests and verifying article, permission, session and rendering APIs. See compatibility and tests.
Install and operate
- Read OFORK installation and use.
- Set up the HTTPS gateway and learner.
- If wanted, activate the incoming-mail consensus policy. This is a separate step; installing the OPM alone changes no mail-gateway filtering.
- Run the acceptance checks in testing and release before production activation.
The supplied configuration contains example hostnames and file paths only. Endpoint, certificates, credentials, group names and PMG object IDs are site-specific. Credentials are generated during installation and kept outside the package.
Build from source
Python 3.10 or later is sufficient for the build; it requires no network access, credentials or local OFORK installation.
python3 build.py
sha256sum -c SHA256SUMS
python3 -m unittest discover -s tests -v
perl tests/pmg-gate.t
The builder produces the OPM, SOPM, deterministic source archive and checksum list. It packages only the explicitly listed source directories and files. Do not add live configuration, tokens, certificates with private keys, mail samples or runtime databases to those directories. Keep deployment data outside the source tree.