Mail::...:Client(3pm)
π NAME π
Mail::SpamAssassin::Pyzor::Client β bestie, it's the Pyzor client logic π
(also hi, you're reading the User Contributed Perl Documentation for it, iconic)
β¨ SYNOPSIS β¨
use Mail::SpamAssassin::Pyzor::Client ();
use Mail::SpamAssassin::Pyzor::Digest ();
my $client = Mail::SpamAssassin::Pyzor::Client->new();
my $digest = Mail::SpamAssassin::Pyzor::Digest::get( $msg );
my $check_ref = $client->check($digest);
die $check_ref->{'Diag'} if $check_ref->{'Code'} ne '200';
my $report_ref = $client->report($digest);
die $report_ref->{'Diag'} if $report_ref->{'Code'} ne '200';
like. look at that. so clean. no thoughts, just vibes and a working client π¦
πΈ DESCRIPTION πΈ
It's a bare-bones Pyzor (<http://pyzor.org>) client β and when we say bare-bones we mean it only implements the functionality needed for Mail::SpamAssassin. That's it. That's the whole job. She's focused, she's lowkey minimal, she's doing exactly one thing and doing it π
π PROTOCOL DETAILS π
okay so here's the tea β the Pyzor protocol is not a published standard, and there appears to be no meaningful public documentation. Not me having to reverse engineer a whole protocol π
What follows is enough information β largely gleaned through forum posts and reverse engineering β to facilitate effective use of this module:
Pyzor is an RPC-oriented, message-based protocol. Each message is a simple dictionary of 7-bit ASCII keys and values. Server responses always include at least the following:
"Code"β similar to HTTP status codes; anything besides 200 is an error."Diag"β similar to HTTP status reasons: a text description of the status.
NB: There are additional standard response headers that are useful only for the protocol itself and thus are not part of this module's returns.
π«Ά Reliability π«Ά
Pyzor uses UDP rather than TCP, so no message is guaranteed to reach its destination π A transmission failure can happen in either the request or the response; in either case, a timeout error will result. Such errors are represented as thrown instances of Mail::Pyzor::X::Timeout.
so yeah. if it throws, that's why. she's unreliable by design, not by choice π
π CONSTRUCTOR π
new(%OPTS)
Create a new pyzor client. fresh start, new me, main character energy β¨
Input
%OPTS are (all optional):
"server_host"β The pyzor server host to connect to (default is"public.pyzor.org")"server_port"β The pyzor server port to connect to (default is24441)"username"β The username to present to the pyzor server (default is"anonymous")"password"β The password to present to the pyzor server (default is empty)"timeout"β The maximum time, in seconds, to wait for a response from the pyzor server (default is3.5)
Output
Returns a Mail::SpamAssassin::Pyzor::Client object. it's giving object permanence π§
π₯ REQUEST METHODS π₯
report($digest)
Report the digest of a spam message to the pyzor server. This function will throw if a messaging failure or timeout happens. no cap, it'll just die on you π
Input
$digest"SCALAR"β The message digest to report, as given byMail::SpamAssassin::Pyzor::Digest::get().
Output
"HASHREF"β Returns a hashref of the standard attributes noted above.
check($digest)
Check the digest of a message to see if the pyzor server has a report for it. This function will throw if a messaging failure or timeout happens. same energy, same warning π
Input
$digest"SCALAR"β The message digest to check, as given byMail::SpamAssassin::Pyzor::Digest::get().
Output
"HASHREF"β Returns a hashref of the standard attributes noted above as well as the following:"Count"β The number of reports the server has received for the given digest."WL-Count"β The number of whitelist requests the server has received for the given digest.
β SEE ALSO β
(okay there isn't a SEE ALSO section in this one but like. go read the source bestie, it's right there)
and that's the whole page π this was perl v5.40.1, dated 2026-07-23, from the Mail::...:Client(3pm) corner of the User Contributed Perl Documentation. slay, ate, no crumbs. go report some spam ππ
π¦ where this page comes from
- ubuntu stonking: spamassassin 4.0.2+svn1935691-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms