NAME
Debbugs::Log::Spam -- an interface to debbugs .log.spam files and .log.spam.d directories
SYNOPSIS
use Debbugs::Log::Spam;
my $spam = Debbugs::Log::Spam->new(bug_num => '12345');
DESCRIPTION
Spam in bugs can be excluded using a .log.spam file and a .log.spam.d directory. The file contains message ids, one per line, and the directory contains files named after message ids, one per file.
BUGS
None known.
FUNCTIONS
- new
-
Creates a new log spam reader.
my $spam_log = Debbugs::Log::Spam->new(log_spam_name => "56/123456.log.spam");my $spam_log = Debbugs::Log::Spam->new(bug_num => $nnn);Parameters
- bug_num -- bug number
- log_spam_name -- name of log
One of the above options must be passed.
- save
-
"$spam_log-"save();>Saves changes to the bug log spam file.
- is_spam
-
"next if ($spam_log-"is_spam('[email protected]'));>Returns 1 if this message id confirms that the message is spam
Returns 0 if this message is not known to be spam
- is_ham
-
next if ($spam_log->is_ham('[email protected]'));Returns 1 if this message id confirms that the message is ham
Returns 0 if this message is not known to be ham
- add_spam
-
$spam_log->add_spam('[email protected]');Add a message id to the spam listing.
You must call
"$spam_log-"save()> if you wish the changes to be written out to disk.
- add_ham
-
$spam_log->add_ham('[email protected]');Add a message id to the ham listing.
You must call
"$spam_log-"save()> if you wish the changes to be written out to disk.
- remove_message
-
$spam_log->remove_message('[email protected]');Remove a message from the spam/ham listing.
You must call
"$spam_log-"save()> if you wish the changes to be written out to disk.