---
name: "Debbugs::Log::Spam"
section: "3pm"
platform: "linux"
package: "libdebbugs-perl"
version: "2.6.4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Debbugs::Log::Spam"
---

# Debbugs::Log::Spam(3pm)

## 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('12456@exmaple.com'));\>

  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('12456@exmaple.com'));
  ```

  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('123456@example.com');
  ```

  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('123456@example.com');
  ```

  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('123456@example.com');
  ```

  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.
