Mail::MtPolicyd::Plugin::Quota - mtpolicyd plugin for accounting in sql tables
This plugin can be used to do accounting based on request fields.
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"
The module takes the following parameters:
Enable/disable this check.
The field used for accounting/quota.
The metric on which the quota should be based.
The Accounting module stores the following metrics:
Number of mails recivied.
Number of mails recivied multiplied with number of recipients.
Size of mails recivied.
Size of mails recivied multiplied with number of recipients.
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.
The quota limit.
The action to return when the quota limit has been reached.
A prefix to add to every table.
The table name will be the prefix + field_name.
Markus Benning <firstname.lastname@example.org>
This software is Copyright (c) 2014 by Markus Benning <email@example.com>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
To install Mail::MtPolicyd, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.