Ruzor
Ruzor is the Rust port of the Pyzor 1.1.2 UDP client and server.
Pyzor is a collaborative, networked spam detection system that identifies messages by digest and lets clients check, report, or whitelist those digests against a Pyzor server. This crate provides the ruzor client and ruzord daemon as a Rust package with command-line behavior and storage formats compatible with the upstream Pyzor 1.1 documentation.
Compatibility
This project targets 1:1 observable compatibility with Pyzor 1.1.2 for the client and server CLIs:
- Same UDP protocol shape: RFC-822-style datagrams,
PV: 2.1, 8192-byte packet limit, thread ids, SHA-1 digests, and SHA-1 request signatures. - Same client commands:
check,info,report,whitelist,ping,pong,digest,predigest,genkey,local_whitelist, andlocal_unwhitelist. - Same input styles:
msg,mbox, anddigests. - Same server operations, anonymous access defaults, passwd/access-file semantics, logging behavior, forwarding behavior, and Unix signal handling for graceful shutdown and reload.
- Same backend record formats for GNU gdbm, Redis v1, Redis v0, and MySQL.
Upstream Pyzor documentation is available at https://www.pyzor.org/en/latest/. This crate intentionally covers the client/server package surface; it does not ship the Python-only pyzor-migrate helper.
Install
Prebuilt Binaries
Download release archives from https://github.com/bonjourservices/ruzor/releases. Release archives contain ruzor, ruzord, README.md, and LICENSE for the target platform. The default release binaries use the GNU gdbm backend and require GNU gdbm at runtime.
Cargo
Install the full package with the default backends:
The default build includes the GNU gdbm backend, so system GNU gdbm headers/libraries must be available:
# Debian/Ubuntu
# macOS/Homebrew
For a build without the gdbm backend:
Quick Start
Create a small test message:
Print the Pyzor digest without contacting a server:
Start a local server in one terminal:
Use the client from another terminal:
Check by digest rather than by message content:
Client Usage
The client reads from stdin for message-oriented commands:
Common commands:
Useful options:
||
If no server file is configured, Pyzor clients default to the public Pyzor server public.pyzor.org:24441, matching upstream Pyzor. Use a local servers file for private testing so report and whitelist do not affect a public server.
Server Usage
Run a server with the default GNU gdbm backend:
Use explicit paths for database, passwd, and ACL files:
Backend examples:
# Redis v1 hash backend
# Legacy Redis v0 string backend
# MySQL backend: host,user,password,database,table
The MySQL table must use the upstream Pyzor schema:
(
digest char(40) NOT NULL,
r_count int(11) DEFAULT NULL,
wl_count int(11) DEFAULT NULL,
r_entered datetime DEFAULT NULL,
wl_entered datetime DEFAULT NULL,
r_updated datetime DEFAULT NULL,
wl_updated datetime DEFAULT NULL,
PRIMARY KEY (digest)
);
Operational options:
On Unix, send SIGTERM for graceful shutdown and SIGUSR1 to reload passwd/access files:
Configuration Files
By default, both commands use ~/.ruzor when HOME is set, otherwise /etc/ruzor. Paths in config files are resolved relative to --homedir unless absolute.
Common files:
servers: onehost:portserver per line for client operations.accounts: client credentials in upstream Pyzor format.whitelist: local client whitelist digests.ruzord.passwd: server account database.ruzord.access: server ACL file.ruzord.db: default GNU gdbm digest database.
If no access file exists, anonymous users may check, report, ping, pong, and info; whitelist is denied by default.
Build From Source
Requirements:
- Rust stable, MSRV
1.95. - GNU gdbm development files for the default backend.
- Redis or MySQL only when using those live backends.
Build:
Run directly from the checkout:
Test
The normal package test suite is self-contained:
Optional live backend tests:
PYZOR_MYSQL_DSN=host,user,password,db,table
Feature Flags
| Feature | Default | Description |
|---|---|---|
backend-gdbm |
yes | GNU gdbm server backend, compatible with Python dbm.gnu databases. |
backend-gdbm-native |
no | Alias for backend-gdbm kept for compatibility with earlier builds. |
backend-redis |
yes | Redis v1/v0 server backends. |
backend-mysql |
yes | MySQL server backend through the Rust mysql crate. |
Releases
GitHub releases are tag-driven. To cut a release:
The release workflow builds with stable Rust, verifies the crate package, and uploads native binary archives for Linux x64, macOS arm64, and macOS Intel. CI runs on pushes and pull requests with fmt, clippy, cargo test, and cargo package.
License
GPL-3.0-only. See LICENSE.