The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Mail::MtPolicyd::Plugin::RegexList - mtpolicyd plugin for regex matching


version 2.05


  <Plugin regex-whitelist>
    module = "RegexList"
    key = "request:client_name"
    regex = "^mail-[a-z][a-z]0-f[0-9]*\.google\.com$"
    regex = "\.bofh-noc\.de$"
    # file = "/etc/mtpolicyd/regex-whitelist.txt"
    action = "accept"


This plugin matches a value against a list of regular expressions and executes an action if it matched.


The module takes the following parameters:

(uc_)enabled (default: "on")

Could be set to 'off' to deactivate check. Could be used to activate/deactivate check per user.

key (default: "request:client_address")

Field to query.

invert (default: 0)

If set to 1 the logic will be inverted.

regex (default: empty)

One or more regular expressions

file (default: empty)

A file to load regular expressions from.

One regex per line. Empty lines and lines starting with # will be ignored.

By default the plugin will do nothing. One of the following actions should be specified:

action (default: empty)

If given this action will be returned to the MTA if the SQL query matched.

score (default: empty)

If given this score will be applied to the session.

Plugin (default: empty)

Execute this plugins when the condition matched.


Markus Benning <>


This software is Copyright (c) 2014 by Markus Benning <>.

This is free software, licensed under:

  The GNU General Public License, Version 2, June 1991