Re: [rt-users] How to grab requestor's first and last name in email address ?
Hi, I tried your suggestion and it doesn't work, RT complains: [3270] [Thu Feb 6 12:50:36 2014] [error]: Scrip 25 IsApplicable failed: Can't locate object method First via package No object mapping for field (perhaps you forgot to load No object mapping for field?) at (eval 792) line 20. When I try this code, it runs but it's not outputting what I need: my $trueuser = $TicketObj-Requestors-UserMembersObj-First-RealName; $RT::Logger-debug(trueuser is: .$trueuser); Resulting output looks to be whatever is before the @ in the email address, not the RealName: [3263] [Thu Feb 6 12:55:07 2014] [debug]: trueuser is: ethier ((eval 625):28) Any other ideas ? Thanks, Mike From: Landon Stewart [mailto:lstew...@iweb.com] Sent: Wednesday, February 05, 2014 2:50 PM To: Ethier, Michael Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] How to grab requestor's first and last name in email address ? On 5 February 2014 11:16, Ethier, Michael meth...@cgr.harvard.edumailto:meth...@cgr.harvard.edu wrote: Hello, I need to obtain the first and last name that would be part of the requestor's email address. For example, requestor email address comes in as: From: Smith, Joe jsm...@mail.commailto:jsm...@mail.com In this example I want parse out the Joe and Smith keywords and assign them to 2 variables which I will use for comparison later. I am writing a RT Scrip. Is this possible to do ? The name of the requestor is stored within the UsersObj in the Requestors group object for the $Ticket. You want the first UsersObj. There's no way to know if it's the name is written Last, First or First Last so you'll have to figure that out somehow. Usually a comma in a name field means Last, First though so the following is a decent bet. I haven't tested this code but this ought to get you close anyway. my $realname = $self-TicketObj-Requestors-UsersObj-First-RealName; # Switch things around if there's a comma in the field. $realname =~ s/(.*),\s*(.*)/$2 $1/ if $realname =~ /,/; If they have First Last, Company it'll come out as ACME Inc., Jim Smith though which might not be terrible. Worse would be Last, First - Position coming out as Jim - Manager Smith which might sound a little too familiar for business. In my opinion you'd want to just leave it as-is so if it's Last, First and they get an email addressed to them with Dear Smith, Jim: they'll know it's because they have it that way in their mail client. -- Landon Stewart :: lstew...@iweb.commailto:lstew...@iweb.com Lead Specialist, Abuse and Security Management Spécialiste principal, gestion des abus et sécurité http://iweb.com :: +1 (888) 909-4932
[rt-users] How to grab requestor's first and last name in email address ?
Hello, I need to obtain the first and last name that would be part of the requestor's email address. For example, requestor email address comes in as: From: Smith, Joe jsm...@mail.commailto:jsm...@mail.com In this example I want parse out the Joe and Smith keywords and assign them to 2 variables which I will use for comparison later. I am writing a RT Scrip. Is this possible to do ? Thanks, Mike
Re: [rt-users] Need to send Big Cheese email based on requestor's email or group membership
Hi Chris, Thanks for the reply back. So there is no way to do the check dynamically in case the members of the Big Cheese group change randomlyvia grep'ing a file with all the email addresses in it, or quering a Window AD group on the fly ? We would have to maintain the group in RT manually as members change ? Thanks, Mike -Original Message- From: Christian Loos [mailto:cl...@netcologne.de] Sent: Friday, January 17, 2014 2:48 AM To: Ethier, Michael Cc: rt-users@lists.bestpractical.com Subject: Re: Need to send Big Cheese email based on requestor's email or group membership Hi, for this type of requests we create an group inside RT, add all email adresses (RT User) to this Group, add all User that should be notified as AdminCc to the queue and then create a scrip (replace xxx with the Big Cheese group id): Condition: User Defined Action: Notify AdminCcs Template: you custom email template Stage: TransactionCreate Custom condition: return 0 unless $self-TransactionObj-Type eq 'Create'; my $CreatorObj = $self-TransactionObj-CreatorObj; my $GroupObj = RT::Group-new(RT-SystemUser); $GroupObj-Load(xxx); # Big Cheese Group Id return 1 if $GroupObj-HasMember($CreatorObj-PrincipalId); return 0; Chris
[rt-users] Import a text file into RT as a scrip ?
Hi, I have a text file (exact RT scrip syntax) that sits on our RT server that I would like to import into RT and update(overwrite) a particular scrip's custom condition with it on a regular basis. Is this possible ? And if yes, how ? Thanks, Mike
[rt-users] Need to send Big Cheese email based on requestor's email or group membership
Hello, We are running RT 4.0.7 in production and a test instance of 4.0.18. We have the need to flag tickets from VIPs by comparing the incoming (on create) ticket's requestor's email address OR if they are member of a particular Windows AD group. If a match is found, then send an email to a specific email address (our group) with Subject: Big Cheese ticket RT ticket number and a short body with the requestors name and email let's say. Maybe action of Notify AdminCC's would be fine in this case. I found this snippet of code in the RT wiki: http://requesttracker.wikia.com/wiki/CustomConditionSnippets return 0 unless $self-TransactionObj-Type eq Create; return 1 if $self-TicketObj-IsWatcher( Type = 'Requestor', Email = 'bigche...@harvard.edu' ); return 0; Which works but only checks against 1 email address. We have 50-60 people in the big cheese group. I have written a small perl script which dumps out all the email address for all the big cheese's in a file in /tmp, 1 email per line. Any way to check against that inside RT on create ? Or check if a requestor is in a specific Windows AD group ? If yes, trigger the email to our group. Thanks in advance for any help, Mike
[rt-users] Any way to disable cross-site request forgery ?
Hi, We have a RT 4.0.7 instance setup that can be accessed by 2 different urls. With one url we get this message: RT has detected a possible cross-site request forgery for this request, because the Referrer header supplied by your browser (prodrt.rcs.fas.harvard.edu:443) is not allowed by RT's configured hostname (prodrt.fas.harvard.edu:443). This is possibly caused by a malicious attacker trying to perform actions against RT on your behalf. If you did not initiate this request, then you should alert your security team. The other url path we don't. This is annoying to some of the people using RT. Is there any way to disabled these warnings ? This didn't exist in an earlier version of RT we were running (v3.8.8). Thanks, Mike Final RT training for 2012 in Atlanta, GA - October 23 24 http://bestpractical.com/training We're hiring! http://bestpractical.com/jobs
[rt-users] How to have RT send email as a group (not individually) ?
Hello, We would like RT to send email such that all the requestors and cc's are included on one email. Right now it appears RT sends and email to each individual separately, consequently people don't know If others received RT's email. Is there a way to configure RT such that everyone involved in a ticket is included in 1 email ? Thanks, Mike Final RT training for 2012 in Atlanta, GA - October 23 24 http://bestpractical.com/training We're hiring! http://bestpractical.com/jobs
[rt-users] Error in rt.log from from new upgrade to RT 4.0.7
Hello, We just upgraded to RT 4.0.7 and I see this error below when it started up. RT seems to operate fine. I'm wondering it anyone else has hit this and if this is a real problem or not. This message is repeating, not continuously. Thanks, Mike [Wed Aug 29 14:02:14 2012] [error]: Couldn't load RT::Interface::Email::Filter::TakeAction: Can't locate RT/Interface/Email/Filter/TakeAction.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/../lib /usr/local/perl-5.12.4/lib/site_perl/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/site_perl/5.12.4 /usr/local/perl-5.12.4/lib/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/5.12.4 .) at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 1317. Stack: [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1380] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317) [Wed Aug 29 14:03:24 2012] [error]: Couldn't load RT::Interface::Email::Filter::TakeAction: Can't locate RT/Interface/Email/Filter/TakeAction.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/../lib /usr/local/perl-5.12.4/lib/site_perl/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/site_perl/5.12.4 /usr/local/perl-5.12.4/lib/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/5.12.4 .) at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 1317. Stack: [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1380] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317)
Re: [rt-users] Error in rt.log from from new upgrade to RT 4.0.7
Ok scratch this question, we found this line in RT_SiteConfig.pm: Set(@MailPlugins, qw(Auth::MailFrom Filter::TakeAction)); Which is related to the commandbymail module we used in RT 3.8.8, that we don't use anymore. After commenting that line out and restarting httpd, the error has gone away. All set. Thanks, Mike From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Ethier, Michael Sent: Wednesday, August 29, 2012 10:24 AM To: rt-users@lists.bestpractical.com Subject: [rt-users] Error in rt.log from from new upgrade to RT 4.0.7 Hello, We just upgraded to RT 4.0.7 and I see this error below when it started up. RT seems to operate fine. I'm wondering it anyone else has hit this and if this is a real problem or not. This message is repeating, not continuously. Thanks, Mike [Wed Aug 29 14:02:14 2012] [error]: Couldn't load RT::Interface::Email::Filter::TakeAction: Can't locate RT/Interface/Email/Filter/TakeAction.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/../lib /usr/local/perl-5.12.4/lib/site_perl/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/site_perl/5.12.4 /usr/local/perl-5.12.4/lib/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/5.12.4 .) at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 1317. Stack: [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1380] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317) [Wed Aug 29 14:03:24 2012] [error]: Couldn't load RT::Interface::Email::Filter::TakeAction: Can't locate RT/Interface/Email/Filter/TakeAction.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib /opt/rt4/sbin/../lib /usr/local/perl-5.12.4/lib/site_perl/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/site_perl/5.12.4 /usr/local/perl-5.12.4/lib/5.12.4/x86_64-linux-thread-multi /usr/local/perl-5.12.4/lib/5.12.4 .) at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 1317. Stack: [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1380] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1317)
[rt-users] Chart (and legend) display on RT at a Glance dashboard - rt3.8.8 vs rt4
Hello, We noticed in RT 3.8.8, legends appear inline below a chart. In RT 4.0.6, the legend appears in a rendered box to the right of the chart and violates the boundary of the chart window. A problem with this is if you put a chart on a dashboard body, it overwrites whatever is to the right of the chart in the summary section. We have been displaying charts in the RT at a Glance dashboard so this problem was immediately seen. Any ideas as to why the chart legend location was modified in RT 4 or how to adjust it so it's below the chart ? Thanks, Mike
[rt-users] rt-mailgate problem - certificate verify failure ?
Hello, The rt-mailgate program acts differently between v 3.8.8 and v 4.0.6. The v 3.8.8 version works fine using https, and even when I have v 4.0.6 running with the /etc/aliases point to the v 3.8.8 version of rtmailgate, email get sent to the queue. But the v 4.0.6 version fails with certificate verify failed, output from mailq: (temporary failure. Command output: An Error Occurred = 500 Can't connect to testrt.rc.fas.harvard.edu:443 (certificate verify failed)) r...@testrt.rc.fas.harvard.edu Any ideas as to the verification of my RT/ssl setup, on how to fix this ? Apparently the RT 4.0.6 is less forgiving about the ssl setup and config. I ran RT configure with the --enable-ssl-mailgate option and installed all perl modules required with make fixdeps in RT 4.0.6. Thanks, Mike This is in /etc/aliases: # rt3 rt: |/opt/rt-3.8.8/bin/rt-mailgate --queue 'General' --action correspond --url https://testrt.rc.fas.harvard.edu/; rt-comment: |/opt/rt-3.8.8/bin/rt-mailgate --queue 'General' --action comment --url https://testrt.rc.fas.harvard.edu/; # rt4 #rt: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file /etc/pki/tls/certs/ca-bundle.crt --action correspond --url https://testrt.rc.fas.harvard.edu/; #rt-comment: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file /etc/pki/tls/certs/ca-bundle.crt --action comment --url https://testrt.rc.fas.harvard.edu/;
Re: [rt-users] rt-mailgate problem - certificate verify failure ?
Hi Martin, Thanks for the suggestion but if I enable --no-ssl I will be creating a security vulnerability no ? Thanks, Mike -Original Message- From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Martin Drasar Sent: Tuesday, August 21, 2012 10:11 AM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] rt-mailgate problem - certificate verify failure ? On 21.8.2012 15:59, Ethier, Michael wrote: Hello, The rt-mailgate program acts differently between v 3.8.8 and v 4.0.6. The v 3.8.8 version works fine using https, and even when I have v 4.0.6 running with the /etc/aliases point to the v 3.8.8 version of rtmailgate, email get sent to the queue. But the v 4.0.6 version fails with certificate verify failed, output from mailq: (temporary failure. Command output: An Error Occurred = 500 Can't connect to testrt.rc.fas.harvard.edu:443 (certificate verify failed)) r...@testrt.rc.fas.harvard.edu Any ideas as to the verification of my RT/ssl setup, on how to fix this ? Apparently the RT 4.0.6 is less forgiving about the ssl setup and config. I ran RT configure with the --enable-ssl-mailgate option and installed all perl modules required with make fixdeps in RT 4.0.6. Thanks, Mike This is in /etc/aliases: # rt3 rt: |/opt/rt-3.8.8/bin/rt-mailgate --queue 'General' --action correspond --url https://testrt.rc.fas.harvard.edu/; rt-comment: |/opt/rt-3.8.8/bin/rt-mailgate --queue 'General' --action comment --url https://testrt.rc.fas.harvard.edu/; # rt4 #rt: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file /etc/pki/tls/certs/ca-bundle.crt --action correspond --url https://testrt.rc.fas.harvard.edu/; #rt-comment: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file /etc/pki/tls/certs/ca-bundle.crt --action comment --url https://testrt.rc.fas.harvard.edu/; Hi Mike, add this option to your aliases if you want to bypass certificate validation: --no-verify-ssl So your rt entry in /etc/aliases would look like this: #rt: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file /etc/pki/tls/certs/ca-bundle.crt --action correspond --url https://testrt.rc.fas.harvard.edu/ --no-verify-ssl Martin
Re: [rt-users] warnings from make upgrade-database from v3.8.8 to 4.0.6
to 4.0.6 On Tue, Aug 14, 2012 at 12:29:10PM -0400, Ethier, Michael wrote: I executed make upgrade-database and I get warnings, see below. make testdeps says all the modules are installed. Can these warning be ignored and if not has someone hit this before and what was the fix ? This was executed with a new version of perl installed in /usr/local/perl. Which new version of perl ? [Tue Aug 14 14:38:45 2012] [warning]: Use of uninitialized value in subroutine entry at /opt/rt-4.0.6/sbin/../lib/RT/Record.pm line 643, line 1. (/opt/rt-4.0.6/sbin/../lib /RT/Record.pm:641) This is probably caused by your perl version or a module version, but it's hard to debug without knowing the perl involved. [Tue Aug 14 16:16:05 2012] [warning]: Use of uninitialized value in string eq at /opt/rt-4.0.6/sbin/../lib/RT/Template.pm line 651, line 1. (/opt/rt-4.0.6/sbin/../lib/RT/Template.pm:651) This is completely ignorable. -kevin
Re: [rt-users] warnings from make upgrade-database from v3.8.8 to 4.0.6
Hi Kevin, Ok so these warnings can be ignored and we can proceed with going to production as is ? Or should I revert to the system perl and use that to do the database update ? These warnings are the last thing stopping me from cutting over to v4.0.6. When is v 4.0.7 coming out ? We want to cut over tomorrow if possible. Thanks, Mike -Original Message- From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone Sent: Tuesday, August 14, 2012 1:53 PM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] warnings from make upgrade-database from v3.8.8 to 4.0.6 On Tue, Aug 14, 2012 at 01:44:25PM -0400, Ethier, Michael wrote: The new version of perl a very recent stable version 5.16.0. I just re-installed this version of perl and all the required modules and I still get the warnings. Should I just use the system version of perl to do the upgrade with ? System perl is v5.10.1. This was done on a development box. However the production rt4 server will be running a different machine with perl 5.16.0 and the database upgraded by the dev box above. There are some warning fixes on 4.0-trunk that will be in 4.0.7 that quiet those warnings (they're new with 5.16). They should just be warnings though, not actual problems. -kevin
[rt-users] Upgrade RT from 3.8.8 to 4.0.6
Hello, I want to upgrade our production RT v3.8.8 to the latest v4.0.6. I un-tarred the RT 4.0.6 kit in /opt/rt-4.0.6. on our production RT box. I want to be able to revert back to our current production RT v3.8.8 system if something goes wrong. I also am willing to build a new machine for RT 4.0.6 to make a clean install and separation between RT 3.8.8 and RT 4.0.6, but that causes some possible extra work to our email/dns/apache setup. I have a few questions about the upgrade: 1) RT 4.0.6 complains about several missing perl modules when I run make testdeps. on the production RT machine. If I then run make fixdeps in /opt/rt-4.0.6 and install the missing modules, this will not break the existing production RT 3.8.8 running on the machine, correct ? Or will it ? This is the key to using the existing production box, or to installing on a brand new machine. We can't break the existing production RT system. 2) Although this is an upgrade to 4.0.6, I don't wish to touch any of /opt/rt-3.8.8 so what I am doing is a new install and it will install by default into /opt/rt4 I believe. This won't touch the 3.8.8 software correct ? 3) When upgrading the RT database, I will dump the existing production database and load it into a different mysql server for v4.0.6 because the existing mysql server is old. When running the following commands below in /opt/rt-4.0.6, on the production box, it will look at the settings in /opt/rt4/etc/RT_SiteConfig.pm pointing to the new mysql server, and not what's set in /opt/rt-3.8.8/etc/RT_SiteConfig.pm which points to the existing production mysql sever, correct ? I don't want to touch the existing production mysql database. make upgrade-database perl etc/upgrade/vulnerable-passwords perl -I /opt/rt4/local/lib -I /opt/rt4/lib etc/upgrade/shrink_transactions_table.pl I'm going back and forth on what is the best path to go, install on the existing production server or install it on a separate new machine which gives a way to revert back to RT 3.8.8. What do you recommend ? Thanks in advance, Mike