Courie...lamAVd(3pm)
π NAME π
Courier::Filter::Module::ClamAVd β it's a ClamAV clamd filter module for the Courier::Filter framework, bestie. That's the whole vibe.
β¨ SYNOPSIS β¨
use Courier::Filter::Module::ClamAVd;
my $module = Courier::Filter::Module::ClamAVd->new(
# See the socket options description for details.
socket_name => '/var/run/clamav/clamd.ctl',
socket_host => 'clamav.example.com',
socket_port => '3310',
max_message_size
=> $max_message_size,
max_part_size => $max_part_size,
response => $response_text,
logger => $logger,
inverse => 0,
trusting => 0,
testing => 0,
debugging => 0
);
my $filter = Courier::Filter->new(
...
modules => [ $module ],
...
);
πΈ DESCRIPTION πΈ
Okay so listen. This class is a filter module class for use with Courier::Filter. What does it do? It matches a message if the ClamAV clamd daemon you configured detects malware all up in it. Malware detected? Match. Periodt. π¦
π Constructor π
Here's the constructor, bestie:
new(%options): returns Courier::Filter::Module::ClamAVd
Creates a new ClamAVd filter module. Iconic. π
%options is a list of key/value pairs representing any of the following options:
socket_namesocket_hostsocket_portβ these three describe the Unix domain or TCP/IP socket that should be used to connect to the ClamAV daemon. And the way it resolves is very specific, so pay attention: if no socket options are specified, first the socket options from the localclamd.confconfiguration file are tried, then the Unix domain socket/var/run/clamav/clamd.ctlis tried, then finally the TCP/IP socket at127.0.0.1on port3310is tried. But if either Unix domain or TCP/IP socket options are explicitly specified, only these are used. No fallback games. πmax_message_sizeβ an integer value controlling the maximum size (in bytes) of the overall message text for a message to even be processed by this filter module. Messages larger than this value will never be processed, and thus will never match. Ifundef, there is no size limit. Defaults to1024**2(1MB). And bestie, real talk: since MIME multipart processing can be quite CPU- and memory-intensive, you should definitely restrict the message size to some sensible value that easily fits in your server's memory.1024**2(1MB) should be appropriate for most uses of this filter module. Don't skip this one, I'm begging. πmax_part_sizeβ an integer value controlling the maximum size (in bytes) of any single MIME part for that part to be processed by this filter module. Parts larger than this value will never be processed, and thus will never match. Ifundef, there is no size limit. Defaults to the value of themax_message_sizeoption, so you don't really need to specify a part size limit if you're comfortable with using the same value for both. See themax_message_sizeoption for its default. π«Άresponseβ a string that is to be returned as the match result in case of a match. The name of the detected malware is appended to the response text. Defaults to"Malware detected:". Cute little warning label, slay.
All options of the Courier::Filter::Module constructor are also supported by the constructor of the ClamAVd filter module. Please see "new" in Courier::Filter::Module for their descriptions. (Go read it, iykyk. π)
π§ Instance methods π§
See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods.
π SEE ALSO π
Courier::Filter::ModuleCourier::Filter::Overview
For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. π
π AUTHOR π
Julian Mehnle <julian@mehnle.net> β thank you for your service, king. π«‘
that's the whole page bestie, no cap. β¨
perl v5.34.0, dated 2022-10-21 β that's the source and the date, and that's the tea. Courie...lamAVd(3pm) out. π π
π¦ where this page comes from
- debian bookworm: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- debian trixie: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms