RT3 and RTAddressRegexp

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?

Thanks in advance!
Glenn

The original portions of this message are the copyright of the author
©1998-2003 Glenn E. Sieb. ICQ UIN: 300395 IRC Nick: Rainbear

“Religion is for those who do what they are told regardless of what is right.
Spirituality is for those who do what is right regardless of what
they are told.” – unattributed

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

Glenn Sieb wrote:

    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);

[…]

Set($RTAddressRegexp , ‘^rt@example.com$’);

How do I set this so it can match multiple queues?

Set($RTAddressRegexp , ‘^(what-sa|help)(-comment)?@wingfoot.org$’);

“man perlre” if you’re unfamiliar with perl regexps.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances