I would like to set one of the values in our FreeField fields by the From address match by using the PostMaster::Filter::Match module.
This is the excerpt of my code in Config.pm (I did not know how to do it from the web GUI with the elements below):
Code: Select all
my %freekeys = (
'test' => 'value1',
'second' => 'value2'
);
$Self->{'PostMaster::PreFilterModule'}->{'1-FreeMatch} = {
Module => 'Kernel::System::PostMaster::Filter::Match',
Match => {
From => '((pd|hm)\.(.*)|[Tt]est|[Ss]econd)@ourdomain.com',
},
Set => {
'X-OTRS-TicketKey1' => 'MyKey1',
#'X-OTRS-TicketValue1' => $freekeys{'second'}, # this works just fine...
#'X-OTRS-TicketValue1' => $freekeys('[***]'), # this does not work (issues error in the log)
'X-OTRS-TicketValue1' => lc('[***]'), # this assigns the value of the key to the X-OTRS-TicketValue1 var, but is not put to lowercase
},
};
Kind Regards,
Bostjan