-
-
24 Aug 2020 14:36:28 UTC
- Distribution: Mail-MtPolicyd
- Module version: 2.05
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers
- Kwalitee
Bus factor: 1- % Coverage
- License: gpl_2
- Perl: v5.8.5
- Activity
24 month- Tools
- Download (94.86KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Markus Benning
- Dependencies
- BerkeleyDB
- BerkeleyDB::Hash
- Cache::Memcached
- Config::General
- DBI
- Data::Dumper
- File::Slurp
- Geo::IP
- Getopt::Long
- HTTP::Request::Common
- IO::Handle
- IO::Socket::INET
- IO::Socket::UNIX
- JSON
- LWP::UserAgent
- Mail::RBL
- Mail::SPF
- Moose
- Moose::Role
- Moose::Util::TypeConstraints
- MooseX::Getopt
- MooseX::Role::Parameterized
- MooseX::Singleton
- Net::DNS::Resolver
- Net::LDAP
- Net::LDAP::Util
- Net::SMTP::Verify
- Net::Server::PreFork
- NetAddr::IP
- Redis
- Storable
- Tie::IxHash
- Time::HiRes
- Time::Piece
- Time::Seconds
- namespace::autoclean
- strict
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Mail::MtPolicyd::Plugin::Quota - mtpolicyd plugin for accounting in sql tables
VERSION
version 2.05
DESCRIPTION
This plugin can be used to do accounting based on request fields.
Example
<Plugin quota-clients> module = "Quota" table_prefix = "acct_" # per month time_pattern = "%Y-%m" # per ip field = "client_address" # allow 1000 mails metric = "count" threshold = 1000 action = "defer you exceeded your monthly limit, please insert coin" </Plugin>
Configuration
Parameters
The module takes the following parameters:
- (uc_)enabled (default: on)
-
Enable/disable this check.
- (uc_)field (required)
-
The field used for accounting/quota.
- (uc_)metric (required)
-
The metric on which the quota should be based.
The Accounting module stores the following metrics:
- count
-
Number of mails recivied.
- count_rcpt
-
Number of mails recivied multiplied with number of recipients.
- size
-
Size of mails recivied.
- size_rcpt
-
Size of mails recivied multiplied with number of recipients.
- time_pattern (default: "%Y-%m")
-
A format string for building the time key used to store counters.
Default is to build counters on a monthly base.
For example use:
* "%Y-%W" for weekly * "%Y-%m-%d" for daily
See "man date" for format string sequences.
You must use the same time_pattern as used in for the Accounting module.
- threshold (required)
-
The quota limit.
- action (default: defer smtp traffic quota has been exceeded)
-
The action to return when the quota limit has been reached.
- table_prefix (default: "acct_")
-
A prefix to add to every table.
The table name will be the prefix + field_name.
AUTHOR
Markus Benning <ich@markusbenning.de>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
Module Install Instructions
To install Mail::MtPolicyd, copy and paste the appropriate command in to your terminal.
cpanm Mail::MtPolicyd
perl -MCPAN -e shell install Mail::MtPolicyd
For more information on module installation, please visit the detailed CPAN module installation guide.