CanonicalizeEmailAddressMatch

Need the proper syntax for ‘CanonicalizeEmailAddressMatch’ setting to match either @domaina or @domainb

to allow ‘CanonicalizeEmailAddressReplace’ it with @domainc.

Thank you,
Kamber Dalal

Need the proper syntax for ‘CanonicalizeEmailAddressMatch’ setting to match either @domaina or
@domainb

to allow ‘CanonicalizeEmailAddressReplace’ it with @domainc.

It’s just a perl regular expression, so literally you get

s/CanonicalizeEmailAddressMatch/CanonicalizeEmailAddressReplace/gi
at the end.

So experiment with:

my $email = "bob@domaina.com";
$email =~ s/CanonicalizeEmailAddressMatch/CanonicalizeEmailAddressReplace/gi
print $email;

outside RT to get what you want.

-kevin

Alle,

Is it possible to use multiple entries for

CanonicalizeEmailAddressMatch? For example:

Set( $CanonicalizeEmailAddressMatch,
‘@example.ac.jp$|@example.org$|@example.com$’);

Best Regards,
Camron

Camron W. Fox
Hilo Office
High Performance Computing Group
Fujitsu Management Services of America, Inc.
E-mail: cwfox@us.fujitsu.com

Alle,

Is it possible to use multiple entries for
CanonicalizeEmailAddressMatch? For example:

Set( $CanonicalizeEmailAddressMatch,
’@example.ac.jp$|@example.org$|@example.com$’);

Best Regards,
Camron

Hi Camron,

Yes, here is the usage in the RT code:

if ( my $match   = RT->Config->Get('CanonicalizeEmailAddressMatch') and
     my $replace = RT->Config->Get('CanonicalizeEmailAddressReplace') )
{
    $email =~ s/$match/$replace/gi;
}
return ($email);

Regards,
Ken