Amavis...dClient(3pm)
πΈ NAME πΈ
okay so bestie, welcome to Amavis...dClient(3pm) β that's the manual page, and the actual star of the show is Amavis::SpamControl::RspamdClient, which is an Amavis extension module to use Rspamd as a spam checker. That's the whole plot. π
β¨ DESCRIPTION β¨
The module goes in your Amavis @spam_scanners config and hands your spam-checking over to Rspamd. It's giving "I'll handle the vibes, you handle the mail". π¦
Copyright (c) 2019 Ralph Seichter, partially based on the SpamdClient extension. Released under GNU General Public License; see the Amavis LICENSE file for details. π
π Example configuration #1 (local Rspamd)
This one's for when Rspamd is literally right there on the same box as Amavis. It's a situationship, but a healthy one. π
# Rspamd running on the same machine as Amavis. Default URL
# is http://127.0.0.1:11333/checkv2 , matching Rspamd's
# "normal" worker defaults.
@spam_scanners = ( [
'Local Rspamd', 'Amavis::SpamControl::RspamdClient',
# Adjust scores according to Rspamd's "required score"
# setting (defaults to 15). Scores reported by Rspamd
# will be multiplied with this factor. The following
# adjusts Rspamd scores to SpamAssassin scores. While
# this setting is technically optional, not adjusting
# scores is prone to cause headaches.
score_factor => $sa_tag2_level_deflt / 15.0,
# MTA name is used to assess validity of existing
# Authentication-Results headers, e.g. if DKIM/DMARC
# validation has already happened.
mta_name => 'mail.example.com',
] );
quick notes on the lore in there: the default URL ishttp://127.0.0.1:11333/checkv2, matching Rspamd's "normal" worker defaults.score_factoradjusts scores to Rspamd's "required score" setting (defaults to15), Rspamd scores get multiplied by that factor, and the example tunes them to match SpamAssassin scores. It's technically optional but not adjusting scores is prone to cause headaches. π Andmta_nameis used to assess validity of existingAuthentication-Resultsheaders, like if DKIM/DMARC validation already happened.
π Example configuration #2 (remote Rspamd)
Now for the long-distance one β Rspamd living behind an HTTPS-capable proxy with basic authentication controlling access. Main character energy, remote edition. π
# Rspamd running behind HTTPS-capable proxy using basic
# authentication to control access.
@spam_scanners = ( [
'Remote Rspamd', 'Amavis::SpamControl::RspamdClient',
url => 'https://rspamd-proxy.example.com/checkv2',
# Response timeout in seconds. Default is 60, matching
# Rspamd's standard config for the "normal" worker.
timeout => 42,
# SSL-options and -credentials passed to LWP::UserAgent,
# see https://metacpan.org/pod/LWP::UserAgent . Default:
# ssl_opts => { verify_hostname => 1 },
credentials => {
# The following <host>:<port> must match the 'url'
# defined above or credentials won't be transmitted.
netloc => 'rspamd-proxy.example.com:443',
# Remote authentication realm
realm => 'Rspamd restricted access',
username => 'Marco',
password => 'Polo',
},
# Don't scan messages remotely if the body size extends
# the following limit (optional setting).
mail_body_size_limit => 32 * 1024,
score_factor => $sa_tag2_level_deflt / 15.0,
mta_name => 'mail.example.com',
] );
The deets, in bullet form because we love structure: π
urlβ the endpoint to hit. In this example:https://rspamd-proxy.example.com/checkv2.timeoutβ response timeout in seconds. Default is60, matching Rspamd's standard config for the "normal" worker.ssl_optsandcredentialsβ SSL-options and -credentials passed toLWP::UserAgent, seehttps://metacpan.org/pod/LWP::UserAgent. Default:ssl_opts => { verify_hostname => 1 }.credentialssub-fields, because the details MATTER:netlocβ the<host>:<port>here must match theurldefined above, or credentials won't be transmitted. fr fr, it will just silently not send them. In the example:rspamd-proxy.example.com:443.realmβ the remote authentication realm. In the example:Rspamd restricted access.usernameβ in the example:Marco.passwordβ in the example:Polo.
mail_body_size_limitβ don't scan messages remotely if the body size extends this limit. Optional setting. In the example:32 * 1024.score_factorβ same deal as config #1, here$sa_tag2_level_deflt / 15.0.mta_nameβ same deal as config #1, heremail.example.com.
π§ Requirements
On top of Amavis' core requirements, this extension needs these extra Perl modules. No skips. π«Ά
JSONHTTP::MessageLWP::UserAgentLWP::Protocol::httpsNet::SSLeay
Should your host OS not provide the necessary packages, these modules can be obtained via https://www.cpan.org. β¨
π and that's the whole page, bestie. this wasperl v5.40.1, dated2026-02-02, fromAmavis...dClient(3pm). slay, go filter some spam, periodt. ππ
π¦ where this page comes from
- ubuntu resolute: amavisd-new 1:2.13.0-7ubuntu2
- ubuntu stonking: amavisd-new 1:2.13.0-7ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms