NAME
    FML::Header - header manipulators.

SYNOPSIS
        $header = use FML::Header \@header;
        $header->add('X-ML-Info', "mailing list name");
        $header->delete('Return-Receipt-To');
        $header->replace(field, value);

DESCRIPTION
    "FML::Header" is an adapter for "Mail::Header" class (See "CPAN" for
    more details). "Mail::Header" is the base class.

METHODS
    Methods defined in "Mail::Header" are available. For example,
    "modify()", "mail_from()", "fold()", "extract()", "read()", "empty()",
    "header()", "header_hashref()", "add()", "replace()", "combine()",
    "get()", "delete()", "count()", "print()", "as_string()",
    "fold_length()", "tags()", "dup()", "cleanup()", "unfold()".

    CAUTION: Pay attention! "FML::Header" overloads "get()" to remove the
    trailing "\n".

  new()
    constructor. forward the request up to superclass "Mail::header::new()".

  get($key)
    return the value of "Mail::Header::get($key)" but without the trailing
    "\n".

  set($key, $value)
    alias of "Mail::Header::set($key, $value)".

  address_cleanup(address)
    clean up given "address". This method parses the given address by
    "Mail::Address::parse()", remove < and > and return the result if the
    result is not empty.

    return the raw "<>" if the specified address is "<>" since we should not
    remove <> from "<>" special address.

  data_type()
    return the "type" defined in the header's Content-Type field. For
    example, "text/plain", "mime/multipart" and et. al.

FML SPECIFIC METHODS
  add_fml_ml_name($config, $rw_args)
    add X-ML-Name: field.

  add_fml_traditional_article_id($config, $rw_args)
    add X-Mail-Count: field.

  add_fml_article_id($config, $rw_args)
    add X-ML-Count: field.

  add_software_info($config, $rw_args)
    add X-MLServer: and List-Software: field.

    "MIME::Lite" object as a $rw_args->{ message } can be handled when
    $rw_args->{type} is 'MIME::Lite'.

  add_rfc2369($config, $rw_args)
    add List-* series defined in RFC2369 and RFC2919.

    "MIME::Lite" object as a $rw_args->{ message } can be handled when
    $rw_args->{type} is 'MIME::Lite'.

  add_x_sequence($config, $rw_args)
    add X-Sequence field.

  add_message_id($config, $rw_args)
    add Message-Id field.

  rewrite_subject_tag($config, $rw_args)
=head2 rewrite_article_subject_tag($config, $rw_args)
    add subject tag like [ML_NAME:00010] e.g. [elena:00010] for elena ML.
    The actual function definitions exist in "FML::Header::Subject".

  rewrite_reply_to
    replace "Reply-To:" with this ML's address for post. add reply-to: if
    not specified.

  rewrite_reply_to_enforce_article_post_address
    enforce replacement of "Reply-To:" with this ML's address for post.

  rewrite_errors_to
    replace "Errors-To:" with this ML's address for post. add errors-to: if
    not specified.

  rewrite_date
    replace original "Date:" to "X-Date:". and now fml process time add to
    "Date:".

  rewrite_stardate
    add/rewrite startrek stardate if needed.

  rewrite_precedence
    add/rewrite Precedence: field if needed.

  rewrite_received
    replace original "Received:" to "X-Received:".

  delete_unsafe_header_fields($config, $rw_args)
    remove header fields defiend in $unsafe_header_fields.
    $unsafe_header_fields is a list of keys. The keys are space separeted.

       unsafe_header_fields         =       Return-Receipt-To

MISCELLANEOUS UTILITIES
  delete_subject_tag_like_string($string)
    remove subject tag like the string given as $string.

  extract_message_id_references()
    return message-id list (ARRAY REFERENCE) extracted from the header
    ($self). It extracts message-id(s) from In-Reply-To: and References:
    fields.

FILTERING FUNCTIONS
  check_message_id($config, $rw_args)
    check whether message-id is unique or not. If the message-id is found in
    the past message-id cache, the injected message must causes a mail loop.

  check_x_ml_info($config, $rw_args)
    The injected message loops if x-ml-info: has our own
    "article_post_address" address.

  check_list_post($config, $rw_args)
    The injected message loops if list-post: has our own
    "article_post_address" address.

SEE ALSO
    Mail::Header

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

AUTHOR
    Ken'ichi Fukamachi

COPYRIGHT
    Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008 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::Header first appeared in fml8 mailing list driver package. See
    "http://www.fml.org/" for more details.

