Perl Modules
From ASSPSMTP
A Perl module is a self-contained piece of Perl code that can be used by a Perl program or by other Perl modules. It is conceptually similar to a C link library, or a C++ class. ASSP uses Perl modules to easily extend its functionality based on the previous work of other developers. A Perl module is a really a Perl package saved as a library file. You can find out more about Perl modules at Wikipedia.
On This Page |
Registered (publicly published) Perl modules have unique names that are based on hierarchal namespaces that are organized by class and function. The first part of the name is the class, followed by a double-colon delimiter, then concluding the module name with a name for the function of the module. It is possible to have function and sub-function delineations in the module name using the same double-colon delimiter to distinguish the function branching. The double-colon delimited name is what is used when performing a function call in Perl code.
When dealing with Perl modules, there are two distinct ways of referring to the module. The first way is by its registered module name (e.g., Net::DNS). This is how the module is referred to when discussing the Perl code explicitly in development or troubleshooting. The second is by the Perl module's distribution name. This is used when referring to the name of the distribution package used to install the module. The distribution package name is typically different between various platforms.
Modules used by ASSP
Since Perl module distribution package names differ between Unix-like and Win32 systems, they are listed here based on their registered Perl module names.
Required modules
These are Perl modules that are required for ASSP to operate. They provide core functionality to the application.
Compress::Zlib
- This module provides in-memory compression and decompression functions. It is used to compress the HTML of the web interface.
- Required for ASSP to run.
Digest::MD5
- This module provides Message-Digest algorithm 5 (MD5) cryptographic hash functions. It is used to key delayed Triplets and Whitelisted Tuplets for Delaying.
- Required for ASSP to run.
Net::DNS
- This module provides functionality to look-up Domain Name System (DNS) records. It is used for multiple aspects of ASSP's functionality pertaining to DNS records; including DNSBL/RBL and SPF functionality.
- Required for ASSP to run.
-
Version 0.58 and 0.59 of the Net::DNS module has been known to cause timeouts in functionally for RBL, SPF, and A/MX/PTR record checks on some Windows platforms. Use an older or preferably newer version.
Time::HiRes
- This module provides functionality to use high-resolution interval timers. It is used to determine CPU usage statistics.
- Required for ASSP to run.
Optional modules
These are Perl modules that are optional to ASSP and are used to extend functionality.
Email::Valid
- This module provides functionality to determine whether an email address is well-formed (according to RFC 2822), and optionally, whether a mail host exists for the domain. It is used by the Sender Validation functions.
- Optional for ASSP to run, but recommended.
File::ReadBackwards
- This module provides functionality to read a file backwards by lines. It is used to search the mail log tail in the web interface.
- Optional for ASSP to run, but recommended.
File::Scan::ClamAV
- This module provides functionality to scan an email for viruses. It is used to access the ClamAV (Clam AntiVirus) engine for scanning purposes.
- Optional for ASSP to run. This module requires manual installation on the Win32 platform. See Installing the File::Scan::ClamAV module on Windows for details.
Mail::SPF::Query
- This module provides functionality to query and verify Sender Policy Framework (SPF) record entries in DNS. It is used to determine if an email sender is being spoofed or masqueraded.
- Optional for ASSP to run, but recommended.
Mail::SRS
- This module provides functionality to rewrite the FROM: address, according to the Sender Rewriting Scheme (SRS). It is used to prevent SPF failures for e-mail that is forwarded or relayed to another server.
- Optional for ASSP to run.
Net::LDAP
- This module provides functionality to search directories or perform maintenance functions such as adding, deleting or modifying entries on a Lightweight Directory Access Protocol (LDAP) server. It is used to verify that the recipient exists before allowing the message through to the Mail Transfer Agent (MTA).
- Optional for ASSP to run.
Net::Syslog
- This module provides functionality for logging information to a Syslog, on Windows platforms. It is used to log ASSP maillog information to a Syslog daemon or server.
- Optional for ASSP to run. Net::Syslog is for Windows platforms only.
Sys::Syslog
- This module provides functionality for logging information to a Syslog, on Unix-like platforms. It is used to log ASSP maillog information directly to a Syslog daemon or server.
- Optional for ASSP to run. Sys::Syslog is for Unix-like platforms only.
Tie::RDBM
- This module provides functionality to use a MySQL database to store hashes. It is used for running multiple ASSP servers that share a centralized whitelist, delaydb and redlist.
- Optional for ASSP to run. This module requires manual installation on the Win32 platform. See (HowTo - Tie::RDBM on win32) for details.
Win32::Daemon
- This module provides functionality to install a Perl script as a Microsoft Windows system service.
- Optional for ASSP to run. It is required to run ASSP as a system service on Windows. It is not applicable for Unix-like platforms.
Installation notes
- Note: Double-colon delimited module names are case sensitive.
Debian Linux
# apt-get install libcompress-zlib-perl libdigest-md5-perl libemail-valid-perl \ libfile-readbackwards-perl libfile-scan-perl libmail-spf-query-perl \ libmail-srs-perl libnet-dns-perl libsys-syslog-perl libnet-ldap-perl \ libtime-hires-perl
CentOS/Red Hat Linux
# perl -MCPAN -e shell cpan>install Compress::Zlib cpan>install Digest::MD5 cpan>install Email::Valid cpan>install File::ReadBackwards cpan>install File::Scan::ClamAV cpan>install Mail::SPF::Query cpan>install Mail::SRS cpan>install Net::DNS cpan>install Net::LDAP cpan>install Sys::Syslog cpan>install Tie::RDBM cpan>install Time::HiRes
Windows
The Perl modules used by ASSP can be installed using the ppm command line tool.
ppm install Compress::Zlib ppm install Digest::MD5 ppm install Email::Valid ppm install File::ReadBackwards ppm install Mail::SPF::Query ppm install Mail::SRS ppm install Net::DNS ppm install Net::LDAP ppm install Net::Syslog ppm install Tie::RDBM ppm install Time::HiRes ppm install Win32::Daemon


