(New in MS 7.0u2) Similar to
store, but adjustment is treated as a delta value. It can be specified as integer, +integer, or -integer. If the
key doesn't currently exist, it is presumed to be
0 and the value is set to whatever the adjustment is. Succeeds by default, fails if an error occurs.
(New in MS 7.0u2) This combines the adjustment with a test. The return value is the same as
(New in MS 7.0u2) Returns a string from that
key's value. Fails if an error occurs or the
key is not currently set.
(New in MS 7.0u2) Removes the key/value pair specified by the
key from the
table. Return success by default, and fail if an error occurs.
(New in MS 7.0u2) Sets the value for the specified
key in that
table. Returns success if completed successfully, and fails if not.
(New in MS 7.0u2)
test-expr is a simple expression that gives the test to be done. It consists of an operator and a value. The operator can be one of
<=. The value should be an integer.
This returns success if the
test-expr returns true, and fails if it's false or an error occurs. (This flexibility permits control of whether the default should be to pass, or to fail.)
New in MS 8.0,
check_metermaid.so supports use of multiple MeterMaid servers, and also supports SSL for communication.
An example of using Metermaid to implement a simple rate limit on a given authenticated sender to 10 messages every 5 minutes implemented using a FROM_ACCESS mapping would be:
msconfig> show metermaid.local_table:sendlim role.metermaid.local_table:sendlim.data_type = string role.metermaid.local_table:sendlim.max_entries = 100000 role.metermaid.local_table:sendlim.quota = 10 role.metermaid.local_table:sendlim.quota_time = 300 role.metermaid.local_table:sendlim.table_type = throttle
And finally, the following callout rule added at the end of the
FROM_ACCESS mapping implements the limit:
FROM_ACCESS TCP|*|SMTP*|MAIL|tcp_*|*|* $C$;R$[IMTA_LIB:check_metermaid.so,throttle,sendlim,$4]$X4.2.3|$NRate$ too$ high$E
Note the "$;R" (new in MS 8.0) prevents this rule from being applied to enqueues from "internal" channels (process channel, reprocess channel, conversions channel, etc.). Also note that the rule can be added to an existing