NAME

Mail::Decency::Policy::GeoWeight

DESCRIPTION

Implements weighting and statistics by countries. It can be used for collecting stats from which countries the senders come from as well as for fighting spam by scoring certain countries (negative or positive).

This module requires Geo::IP which itself requires various libraries on your OS.

CONFIG

    ---
    disable: 0
    
    enable_stats: 1
    
    weight_classes:
        -
            countries:
                - DE
                - US
                - AU
            weight: 10
        -
            countries:
                - SE
                - DK
            weight: 5
        - { countries: [ 'XX' ], weight: -100 }
    
    weight_default: -5

CLASS ATTRIBUTES

weight_by_country : HashRef

Weight class, containging one or multiple country codes and a weighting (positive or negative)

weight_default : Int

Weight for all values not specified via "weight_by_country"

enable_stats : Bool

Enable statistics by country (either stats or weight or both should be enabled)

enable_weight : Bool

Enable weighting (either stats or weight or both should be enabled)

geo_ip : Geo::IP

schema_definition

Database schema

METHODS

init

Checks weight classes

handle

Either build stats per country or score with negative or positve weight per country or do both

Print statistics per country

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.