[rt-users] CanonicalizeEmailAddressMatch
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: cw...@us.fujitsu.com
Re: [rt-users] CanonicalizeEmailAddressMatch
On Fri, Mar 29, 2013 at 07:10:53AM -1000, Camron W. Fox wrote: 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
[rt-users] CanonicalizeEmailAddressMatch
Need the proper syntax for 'CanonicalizeEmailAddressMatch' setting to match either @domaina or @domainb to allow 'CanonicalizeEmailAddressReplace' it with @domainc. Thank you, Kamber Dalal RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 6, 2012
Re: [rt-users] CanonicalizeEmailAddressMatch
On Thu, Feb 02, 2012 at 09:00:06AM -0500, Dalal, Kamber Z wrote: 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 = b...@domaina.com; $email =~ s/CanonicalizeEmailAddressMatch/CanonicalizeEmailAddressReplace/gi print $email; outside RT to get what you want. -kevin pgpEoThRI8pTA.pgp Description: PGP signature RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 6, 2012
Re: [rt-users] CanonicalizeEmailAddressMatch/Replace Problems
Camron, We do not include the '@' in our regex here, but if you do, shouldn't it be escaped as well as the '.' characters? Cheers, Ken On Wed, Apr 22, 2009 at 11:14:33AM -1000, Camron W. Fox wrote: Alle, Running RT 3.6.6, RHEL 5.3, Apache 2.2.3 and Perl v5.8.8. When we try to use the following in RT_SiteConfig.pm, nothing changes: Set($CanonicalizeEmailAddressMatch , '@domain\.example\.ac\.jp$'); Set($CanonicalizeEmailAddressReplace , '@domain.example.org'); Internally, we are domain.example.ac.jp but externally we are domain.example.org (long story). What are we missing. Below are the relevant(?) log entries: [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::CurrentUser /opt/rt3/lib/RT/CurrentUser.pm 218 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeUserInfo called by RT::User /opt/rt3/lib/RT/User_Overlay.pm 192 with: Comments: Autocreated on ticket submission, Disabled: 0, EmailAddress: naojt...@domain.example.ac.jp, Name: naojt...@domain.example.ac.jp, Password: , Privileged: 0, RealName: (Test User) (/opt/rt3/local/lib/RT/User_Local.pm:380) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeUserInfo returning Comments: Autocreated on ticket submission, Disabled: 0, EmailAddress: naojt...@domain.example.ac.jp, Name: naojt...@domain.example.ac.jp, Password: , Privileged: 0, RealName: (Test User) (/opt/rt3/local/lib/RT/User_Local.pm:413) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::User /opt/rt3/lib/RT/User_Overlay.pm 196 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::User /opt/rt3/lib/RT/User_Overlay.pm 563 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::User /opt/rt3/lib/RT/User_Overlay.pm 563 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:50 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::CurrentUser /opt/rt3/lib/RT/CurrentUser.pm 218 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:50 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] CanonicalizeEmailAddressMatch/Replace Problems
Kenneth Marshall wrote: Camron, We do not include the '@' in our regex here, but if you do, shouldn't it be escaped as well as the '.' characters? Cheers, Ken Ken, We're just following the example from the documentation and RT_Config.pm: # RT provides functionality which allows the system to rewrite # incoming email addresses. In its simplest form, # you can substitute the value in CanonicalizeEmailAddressReplace # for the value in CanonicalizeEmailAddressMatch # (These values are passed to the CanonicalizeEmailAddress subroutine in RT/User.pm) # By default, that routine performs a s/$Match/$Replace/gi on any address passed to it #Set($CanonicalizeEmailAddressMatch , '@subdomain\.example\.com$'); #Set($CanonicalizeEmailAddressReplace , '@example.com'); We've tested s/$Match/$Replace/gi with the same regex and it works, so that's why we thought we might be missing something. Best Regards, Camron Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] CanonicalizeEmailAddressMatch/Replace Problems
It is a bit pedantic, but have you flushed the Mason cache and restarted RT? Ken On Thu, Apr 23, 2009 at 07:42:50AM -1000, Camron W. Fox wrote: Kenneth Marshall wrote: Camron, We do not include the '@' in our regex here, but if you do, shouldn't it be escaped as well as the '.' characters? Cheers, Ken Ken, We're just following the example from the documentation and RT_Config.pm: # RT provides functionality which allows the system to rewrite # incoming email addresses. In its simplest form, # you can substitute the value in CanonicalizeEmailAddressReplace # for the value in CanonicalizeEmailAddressMatch # (These values are passed to the CanonicalizeEmailAddress subroutine in RT/User.pm) # By default, that routine performs a s/$Match/$Replace/gi on any address passed to it #Set($CanonicalizeEmailAddressMatch , '@subdomain\.example\.com$'); #Set($CanonicalizeEmailAddressReplace , '@example.com'); We've tested s/$Match/$Replace/gi with the same regex and it works, so that's why we thought we might be missing something. Best Regards, Camron Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] CanonicalizeEmailAddressMatch/Replace Problems
Kenneth Marshall wrote: It is a bit pedantic, but have you flushed the Mason cache and restarted RT? Ken Ken, We *did* restart Apache, but as we weren't using CanonicalizeEmailAddressMatch/Replace prior to this, there shouldn't be anything cached there, should there? Best Regards, Camron Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] CanonicalizeEmailAddressMatch/Replace Problems
Do a recursive grep on the files in the Mason cache for the variable or regex. It may be cached but I am not familiar enough with the startup process to know without checking. A cached no value would result in the behavior you are seeing. Cheers, Ken On Thu, Apr 23, 2009 at 08:19:24AM -1000, Camron W. Fox wrote: Kenneth Marshall wrote: It is a bit pedantic, but have you flushed the Mason cache and restarted RT? Ken Ken, We *did* restart Apache, but as we weren't using CanonicalizeEmailAddressMatch/Replace prior to this, there shouldn't be anything cached there, should there? Best Regards, Camron Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] CanonicalizeEmailAddressMatch/Replace Problems
Alle, Running RT 3.6.6, RHEL 5.3, Apache 2.2.3 and Perl v5.8.8. When we try to use the following in RT_SiteConfig.pm, nothing changes: Set($CanonicalizeEmailAddressMatch , '@domain\.example\.ac\.jp$'); Set($CanonicalizeEmailAddressReplace , '@domain.example.org'); Internally, we are domain.example.ac.jp but externally we are domain.example.org (long story). What are we missing. Below are the relevant(?) log entries: [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::CurrentUser /opt/rt3/lib/RT/CurrentUser.pm 218 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeUserInfo called by RT::User /opt/rt3/lib/RT/User_Overlay.pm 192 with: Comments: Autocreated on ticket submission, Disabled: 0, EmailAddress: naojt...@domain.example.ac.jp, Name: naojt...@domain.example.ac.jp, Password: , Privileged: 0, RealName: (Test User) (/opt/rt3/local/lib/RT/User_Local.pm:380) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeUserInfo returning Comments: Autocreated on ticket submission, Disabled: 0, EmailAddress: naojt...@domain.example.ac.jp, Name: naojt...@domain.example.ac.jp, Password: , Privileged: 0, RealName: (Test User) (/opt/rt3/local/lib/RT/User_Local.pm:413) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::User /opt/rt3/lib/RT/User_Overlay.pm 196 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::User /opt/rt3/lib/RT/User_Overlay.pm 563 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:49 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::User /opt/rt3/lib/RT/User_Overlay.pm 563 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:49 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) [Wed Apr 22 20:59:50 2009] [debug]: RT::User::CanonicalizeEmailAddress : called with naojt...@domain.example.ac.jp by RT::CurrentUser /opt/rt3/lib/RT/CurrentUser.pm 218 (/opt/rt3/local/lib/RT/User_Local.pm:328) [Wed Apr 22 20:59:50 2009] [info]: RT::User::CanonicalizeEmailAddress naojt...@domain.example.ac.jp = naojt...@domain.example.ac.jp (/opt/rt3/local/lib/RT/User_Local.pm:347) Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com