NAME

Mail::DSPAM::Learning - Perl extension for correcting spam learning of a DPSAM server

SYNOPSIS

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);

DESCRIPTION

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.

METHODS

new

new();

This method creates a new DSPAM lerner object and returns it.

defineMyConfig

$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.

setMyConfig

$dspam_l->setMyConfig;

This metho sets the user configuration of the dspam learner.

getMyConfig

$dpsam_l->getMyConfig();

This method return the user configuration of the dspam learner.

printMyConfig

$dspam_l->printMyConfig();

This method displays the user configuration of the dspam learner.

setDelay

$dpsam-l->setDelay($delay);

This method set the delay ($delay) for sending a mail to learn to the dspam server.

getDelay

$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

setMailbox

$dspam_l->setMailbox;

This method set the mailbox file to parse. This mailbox contains the spam to learn.

getMailbox

$dspam_l->getMailbox;

This method returns the mailbox file which contains the spam to learn.

setMailboxManager

$dspam_l->setMailboxManager;

This method sets the new mailbox manager.

getMailboxManager

$dspam_l->getMailboxManager;

This method greturns the mailbox manager.

parseMailbox

$dspam_l->parseMailbox;

The method parses and loads the mailbox containing the SPAMs, and sets the folder field.

getFolder

$dspam_l->getFolder;

This method returns the folder field

forwardMessages

$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.

setMailer

$dpsam_l->setMailer;

This method creats and sets the mailer.

getMailer

$dspam_l->getMailer;

This method returns the mailer.

sendForwardedMessage

$dspam_l->sendForwardedMessage($forward_msg);

This method sends the formwarded message $forward_msg.

SEE ALSO

DSPAM web site: http://dspam.nuclearelephant.com/

AUTHOR

Thierry Hamon <thierry.hamon@lipn.univ-paris13.fr>

LICENSE

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:

Around line 388:

Non-ASCII character seen before =encoding in '$dspamèl'. Assuming CP1252