Skip to Content.
Sympa Menu

Documentation for Sympa


Sympa::Spool - Base class of spool classes


package Sympa::Spool::FOO;

use base qw(Sympa::Spool);

sub _directories {
    return {
        directory     => '/path/to/spool',
        bad_directory => '/path/to/spool/bad',
use constant _generator      => 'Sympa::Message';
use constant _marshal_format => '%s@%s.%ld.%ld,%d';
use constant _marshal_keys   => [qw(localpart domainpart date PID RAND)];
use constant _marshal_regexp =>



This module is the base class for spool subclasses of Sympa.

Public methods


Instance of Sympa::Spool may have following properties.

Low level functions

Methods subclass should implement

Marshaling and unmarshaling metadata

Spool class gives generator class the metadata to instantiate it. On spool based on filesystem, it is typically encoded into file names. For example a file name in incoming spool (Sympa::Spool::Incoming)

encodes the metadata

localpart  => 'listname-owner',
listname   => 'listname',
listtype   => 'return_path',
domainpart => '',
date       => 143599229,

Metadata always includes information of context: List, Robot, Site (or Family). For example:

- Message in incoming spool bound for

context    => Sympa::List <>,

- Command message in incoming spool bound for

context    => '',

- Message sent from Sympa to super-listmaster(s):

context    => '*'

Context is determined when the generator class is instantiated, and generally never changed through lifetime of instance. Thus, constructor of generator class should take context object as an argument.

localpart is encoded in a bit complex manner.


Following site configuration parameters in sympa.conf will be referred.


Sympa::Message, especially Serialization.


Sympa::Spool appeared on Sympa 6.2. It as the base class appeared on Sympa 6.2.6.

build_glob_pattern(), size(), _glob_pattern() and _store_key() were introduced on Sympa 6.2.8. _filter_pre() was introduced on Sympa 6.2.10. marshal(), unmarshal() and no_filter option of next() were introduced on Sympa 6.2.22. _no_glob_pattern() was introduced and _glob_pattern() was deprecated on Sympa 6.2.36.

Top of Page