NAME

Mail::Decency::LogParser::Aggregator

DESCRIPTION

Aggregates events (sent, reject, bounced) by IP, sender domain and recipient domain in database.

CLASS ATTRIBUTES

interval_formats : ArrayRef[Str]

Intervals in strftime format for DateTime

maintenance_ttl : Int

Maintenance Time To Live. In maintenance mode, all entries from the database older then (now - ttl) will be wiped.

schema_definition : ArrayRef[Str]

Schema for Aggregator is:

  • Aggregator

    • (ip|from_domain|to_domain)

      • (ip|from_domain|to_domain)

        Varchar 255 (39 for IP) ..

      • type

        Varchar 25 .. either sent, bounced or reject

      • interval

        Varchar 25 .. the interval value, such as '2010-06-17'

      • format

        Varchar 25 .. the interval format, such as '%Y-%m-%d'

      • counter

        Integer .. the amount

      • last_update

        Integer (timestamp) .. last time updated

METHODS

setup

handle_data

Checks wheter incoming mail is whilist for final recipient

maintenance

Remove old cumulated entries. See maintenance_ttl

AUTHOR

Ulrich Kautz <uk@fortrabbit.de>

COPYRIGHT

Copyright (c) 2010 the "AUTHOR" as listed above

LICENCSE

This library is free software and may be distributed under the same terms as perl itself.