[rt-users] RT3 and RTAddressRegexp...

Michael Bilow mike at bilow.com
Wed Oct 15 04:48:49 EDT 2003


On 2003-10-15 at 00:28 -0400, Glenn Sieb wrote:

> Sorry guys.. I'm playing with RT3, and I'm looking at the new config 
> file... In RT2 I could have this:
> 
> sub IsRTAddress {
>      my $address = shift;
> 
>          return(1) if ($address =~ /^what-sa\@wingfoot.org$/i);
>          return(1) if ($address =~ /^what-sa-comment\@wingfoot.org$/i);
>          return(1) if ($address =~ /^help\@wingfoot.org$/i);
>          return(1) if ($address =~ /^help-comment\@wingfoot.org$/i);
> 
>      # return(undef)
> }
> 
> In RT3, this is a bit different..?
> 
> Set($RTAddressRegexp , '^rt\@example.com$');
> 
> How do I set this so it can match multiple queues?

I may not know much about RT, but Perl I can handle.  How about:

Set($RTAddressRegexp , '^(rt\@example\.com)|(what-sa\@wingfoot\.org)|(what-sa-comment\@wingfoot\.org)$');

I think you get the idea.  FYI, you need to escape the dot as well as the
'@' in order to have it taken as a literal in a Perl regex; if you don't,
it will be interpreted as a metacharacter and, although it will mostly
work by coincidence, it will hurt performance.

-- Mike





More information about the rt-users mailing list