NAME
    FML::Error - front end of error messages analyzer.

SYNOPSIS
        use FML::Error;
        my $error = new FML::Error $curproc;

        # analyze error messages and holds the result within the object.
        $error->analyze();

        # remove addresses analyze() determined as bouncers.
        $error->delete_bouncers();

DESCRIPTION
    This class provides top level dispatcher to analyze error messages. It
    can parse error messages and classifies them into error or not messages.

    You can use delete_bouncers() method to remove bounce addresses.

METHODS
  new($curproc)
    constructor.

  get_lock_channel_name()
    return the lock channel name to be used to lock/unlock error related
    functions.

LOCK ACCESS TO ERROR CACHE DB
  lock()
  unlock()
DATABASE
  db_open()
    open cache database.

  db_close()
    close cache database (dummy).

  add($info)
    add bounce information into cache where $info is a HASH_REF. Currently,
    $info expects "address", "status" (status code) and "reason". "address"
    and "status" are mandatory.

        $info = {
            address => $address,
            status  => $status,
            reason  => $reason,
        };

    The format to store these information depends on FML::Error::Cache
    module, which conceals the detail of the cache structure.

  analyze()
    open error message cache and analyze the data by the analyzer function.
    The function is specified by $config->{ error_mail_analyzer_function }.
    Available functions are located in "FML::Error::Analyze". "simple_count"
    function is used by default if $config->{ error_mail_analyzer_function }
    is unspecified.

  set_analyzer_function($fp)
    set the function for error cost evaluator. Acutually, the content
    locates at "FML::Error::Analyze::$fp".

  get_analyzer_function($fp)
    get the current function.

ADDRESS MANIPULATION
  is_list_address($addr)
    check whether $addr is one of addresses this ML uses, such as elena,
    elena-ctl, elena-admin ... for elena ML.

    We need this function to exclude list related addresses from removal
    target.

  delete_bouncers()
    delete mail addresses, determined by analyze() as bouncers, by
    delete_address() method.

    You need to call analyze() method before calling delete_bouncers() to
    list up addresses to remove.

  delete_address( $address )
    delete the specified address by "FML::Command::Admin::unsubscribe".

DUMP ADDRESS AND STATUS
  print([$handle])
    print list of addresses and the corresponding point.

CODING STYLE
    See "http://www.fml.org/software/FNF/" on fml coding style guide.

AUTHOR
    Ken'ichi Fukamachi

COPYRIGHT
    Copyright (C) 2002,2003,2004,2005,2006 Ken'ichi Fukamachi

    All rights reserved. This program is free software; you can redistribute
    it and/or modify it under the same terms as Perl itself.

HISTORY
    FML::Error first appeared in fml8 mailing list driver package. See
    "http://www.fml.org/" for more details.

