View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Руслан У. Закиров > RT-Extension-ExtractCustomFieldValues-3.05 > RT::Extension::ExtractCustomFieldValues



Annotate this POD


New  4
Open  0
View/Report Bugs
Module Version: 3.05   Source   Latest Release: RT-Extension-ExtractCustomFieldValues-3.14


RT::Extension::ExtractCustomFieldValues - extract CF values from email headers or body


ExtractCustomFieldValues is based on a scrip action "ExtractCustomFieldValues", which can be used to scan incoming emails to set values of custom fields.


    perl Makefile.PL
    make install
    make initdb # first time only

When using this extension with RT 3.8, you will need to add extension to the Plugins configuration:

    Set( @Plugins, qw(... RT::Extension::ExtractCustomFieldValues) );


To use the ScripAction, create a Template and a Scrip in RT. Your new Scrip should use a ScripAction of 'Extract Custom Field Values'. The Template consists of the lines which control the scanner. All non-comment lines are of the following format:



<cf-name> - the name of a custom field (must be created in RT) If this field is blank, the match will be run and Postcmd will be executed, but no custom field will be updated. Use this if you need to execute other RT code based on your match.
<Headername> - either a Name of an email header, "body" to scan the body of the email or "headers" to search all of the headers.
<MatchString> - a regular expression to find a match in the header or body if the MatchString matches a comma separated list and the CF is a multi value CF then each item in the list is added as a separate value.
<Postcmd> - a perl code to be evaluated on $value, where $value is either $1 or full match text from the match performed with <MatchString>
<Options> - a string of letters which may control some aspects. Possible options include:
'q' - (quiet) Don't record a transaction when adding the custom field value
'*' - (wildcard) The MatchString regex should contain _two_ capturing groups, the first of which is the CF name, the second of which is the value. If this option is given, the <cf-name> field is ignored.


You can change the separator string (initially "\|") during the template with:


Changing the separator may be necessary, if you want to use a "|" in one of the patterns in the controlling lines.

Example and further reading

An example template with some further examples is installed during "make install" or "make insert-template". See the CustomFieldScannerExample template for examples and further documentation.


This extension was originally written by Dirk Pape <>.

This version is modified by Best Practical for customer use and maintained by Best Practical Solutions.


Report bugs using service, discuss on RT's mailing lists, see also </SUPPORT>


Support requests should be referred to Best Practical <>.

syntax highlighting: