Mail::DSPAM::Learning - Perl extension for correcting spam learning of a DPSAM server
use Mail::DSPAM::Learning; my dspam_learner = Mail::DSPAM::Learning->new(); $dspam_learner->defineMyConfig("MyConfig.pm"); require $MyConfigFile; $dspam_learner->setMyConfig; $dspam_learner->setMailbox("spam_mbox"); $dspam_learner->parseMailbox(); $dspam_learner->askPassword(); $dspam_learner->setMailer; my $count = $dspam_learner->forwardMessages(!$test);
This module aims at proposing methods to correct the spam learning of your DSPAM server. Basically, it helps to parse a mailbox containing spams that a DSPAM server miss, and to forward them to the DSPAM server.
new();
This method creates a new DSPAM lerner object and returns it.
$dspamèl = defineMyConfig($path);
This method sets the filename c<$path/MyConfig.pm>. Several information is asked to the user: domain, username, email address, DSPAM email adress, SMTP server and port.
$dspam_l->setMyConfig;
This metho sets the user configuration of the dspam learner.
$dpsam_l->getMyConfig();
This method return the user configuration of the dspam learner.
$dspam_l->printMyConfig();
This method displays the user configuration of the dspam learner.
$dpsam-l->setDelay($delay);
This method set the delay ($delay) for sending a mail to learn to the dspam server.
$delay
$dspam_l->getDelay;
This method returns the delay for sending a mail to learn to the dspam server.
$dspam_l->askPassword();
This method sets the password of the user for the current session
$dspam_l->setMailbox;
This method set the mailbox file to parse. This mailbox contains the spam to learn.
$dspam_l->getMailbox;
This method returns the mailbox file which contains the spam to learn.
$dspam_l->setMailboxManager;
This method sets the new mailbox manager.
$dspam_l->getMailboxManager;
This method greturns the mailbox manager.
$dspam_l->parseMailbox;
The method parses and loads the mailbox containing the SPAMs, and sets the folder field.
$dspam_l->getFolder;
This method returns the folder field
$dspam_l->forwardMessages;
This method defines the message encapsulating the forwarded message and returns it. A additional parameter can be passed to the method. It is only useful, if its value is 0 to test the configuration without really sending message.
$dpsam_l->setMailer;
This method creats and sets the mailer.
$dspam_l->getMailer;
This method returns the mailer.
$dspam_l->sendForwardedMessage($forward_msg);
This method sends the formwarded message $forward_msg.
$forward_msg
DSPAM web site: http://dspam.nuclearelephant.com/
Thierry Hamon <thierry.hamon@lipn.univ-paris13.fr>
Copyright (C) 2008 by Thierry Hamon
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '$dspamèl'. Assuming CP1252
To install Mail::DSPAM::Learning, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::DSPAM::Learning
CPAN shell
perl -MCPAN -e shell install Mail::DSPAM::Learning
For more information on module installation, please visit the detailed CPAN module installation guide.