collect CCs from original email, with extra settings in RT_SiteConfig
authorStephen Soltesz <soltesz@cs.princeton.edu>
Wed, 24 Jun 2009 23:00:54 +0000 (23:00 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Wed, 24 Jun 2009 23:00:54 +0000 (23:00 +0000)
no output from adduserstort.pl
move some scrips and templates from initialdata to planetlab.pl

rt3/RT_SiteConfig.pm
rt3/adduserstort.pl
rt3/initialdata
rt3/rtconf.d/planetlab.pl
rt3/rtcron.d/syncadmins.sh

index 52b5e6a..cf89cf6 100644 (file)
@@ -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;
index 91ff801..dc64899 100644 (file)
@@ -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,
index 3c3db8c..8e917e6 100644 (file)
@@ -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
index b6db92d..3b07d49 100644 (file)
        { 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()}
+'
+       },
+);
index 8009a18..f27243d 100644 (file)
@@ -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 \