From 11cfeb7edd71af8520bcea7a129c9b72facd7c65 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Wed, 24 Jun 2009 23:00:54 +0000 Subject: [PATCH] collect CCs from original email, with extra settings in RT_SiteConfig no output from adduserstort.pl move some scrips and templates from initialdata to planetlab.pl --- rt3/RT_SiteConfig.pm | 6 ++++-- rt3/adduserstort.pl | 4 ++-- rt3/initialdata | 15 --------------- rt3/rtconf.d/planetlab.pl | 26 ++++++++++++++++++++++++-- rt3/rtcron.d/syncadmins.sh | 1 - 5 files changed, 30 insertions(+), 22 deletions(-) diff --git a/rt3/RT_SiteConfig.pm b/rt3/RT_SiteConfig.pm index 52b5e6a..cf89cf6 100644 --- a/rt3/RT_SiteConfig.pm +++ b/rt3/RT_SiteConfig.pm @@ -65,8 +65,10 @@ Set($NotifyActor, 1); #Send a copy to RT owner: True Set($LoopsToRTOwner , 1); -#Standard Support Email Address -Set($RTAddressRegexp , '^support@PLC_RT_HOSTNAME$'); +# Try to figure out CC watchers +Set($ParseNewMessageForTicketCcs , 1); +# pattern to self-identify to avoid loops to itself. +Set($RTAddressRegexp , '^(support|monitor|legal|security)@PLC_RT_HOSTNAME$'); 1; diff --git a/rt3/adduserstort.pl b/rt3/adduserstort.pl index 91ff801..dc64899 100644 --- a/rt3/adduserstort.pl +++ b/rt3/adduserstort.pl @@ -27,7 +27,7 @@ my $city = ''; my $country = ''; my $priv = 0; -if ( $ARGV[0] == 'priv' ) +if ( $ARGV[0] =~ /priv/ ) { shift @ARGV; $priv = 1; @@ -42,7 +42,7 @@ foreach $bc_user (@raw_data) ($email_address,$realname,$organization)=split(/\,/,$bc_user); my $UserObj = new RT::User(RT::SystemUser); - print "adding user: $email_address\n"; + # print "adding user: $email_address\n"; $UserObj->Create(Name => $email_address, RealName => $realname, EmailAddress => $email_address, diff --git a/rt3/initialdata b/rt3/initialdata index 3c3db8c..8e917e6 100644 --- a/rt3/initialdata +++ b/rt3/initialdata @@ -316,21 +316,6 @@ further questions or concerns, please respond to this message. }, { Queue => '0', - Name => 'correspondance with CC', # loc - Description => 'Message with the recipients in the header', # loc - Content => 'RT-Attach-Message: yes - -Email Recipients (see http://PLC_RT_HOSTNAME/rt3/Ticket/Display.html?id={$Ticket->id} ) - Owner: {$Ticket->OwnerObj->Name} - Requestor: {$Ticket->RequestorAddresses} -{ if ($acc=$Ticket->AdminCcAddresses) { " Ticket Ccs: " . $acc } } -================================================== - -{$Transaction->Content()} -' - }, - { - Queue => '0', Name => 'Create with CC in body', # loc Description => 'Create with CC in body', # loc Content => 'RT-Attach-Message: yes diff --git a/rt3/rtconf.d/planetlab.pl b/rt3/rtconf.d/planetlab.pl index b6db92d..3b07d49 100644 --- a/rt3/rtconf.d/planetlab.pl +++ b/rt3/rtconf.d/planetlab.pl @@ -27,7 +27,14 @@ { GroupDomain => 'RT::System-Role', GroupType => 'Owner', Right => 'ModifyTicket', }, -) +); + +@Scrips = ( + { ScripCondition => 'On Create', + ScripAction => 'AutoReply To Requestors', + Template => 'AutoReply' }, +); + @Templates = ( { Queue => '0', Name => 'Autoreply', # loc @@ -60,4 +67,19 @@ Thank you, {$Transaction->Content()} ' }, -) + { + Queue => '0', + Name => 'correspondance with CC', # loc + Description => 'Message with the recipients in the header', # loc + Content => 'RT-Attach-Message: yes + +Email Recipients (see http://PLC_RT_HOSTNAME/rt3/Ticket/Display.html?id={$Ticket->id} ) + Owner: {$Ticket->OwnerObj->Name} + Requestor: {$Ticket->RequestorAddresses} +{ if ($acc=$Ticket->AdminCcAddresses) { " Ticket Ccs: " . $acc } } +================================================== + +{$Transaction->Content()} +' + }, +); diff --git a/rt3/rtcron.d/syncadmins.sh b/rt3/rtcron.d/syncadmins.sh index 8009a18..f27243d 100644 --- a/rt3/rtcron.d/syncadmins.sh +++ b/rt3/rtcron.d/syncadmins.sh @@ -1,6 +1,5 @@ #!/bin/bash -echo "syncadmins.sh" MDIR=/usr/share/monitor source $MDIR/monitorconfig.sh ${MONITOR_SCRIPT_ROOT}/plcquery.py --type person --withsitename --byrole admin \ -- 2.47.0