Mail::MtPolicyd::Plugin::Quota(3pm)

Mail::MtPolicyd::Plugin::Quota3pm

Mtpolicyd plugin for accounting in sql tables

Version

version 2.05

Overview

This plugin can be used to do accounting based on request fields.

Examples

  <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.

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

Markus Benning <[email protected]>

From mtpolicyd 2.05-1.2 in Debian 13 (Trixie). Parsed by carta from the page's man source.