[rt-users] RT 4.2.11 ActivityReports-Billing: Use of uninitialized value $_ in pattern match

2015-07-30 Thread Aaron C. de Bruyn
I have had RT 4.2.11 up and running for a few months now, and we
wanted to test billing directly from RT.

I installed the latest RT-Extension-ActivityReports from github along
with RT-Extension-ActivityReports-Billing.

They installed without errors.

Every report I try to run comes up the following logged to syslog:

Jul 30 21:29:27 tickets RT: [27076] Use of uninitialized value $_ in
pattern match (m//) at
/opt/rt4/local/plugins/RT-Extension-ActivityReports/html/Reports/Activity/Elements/ActivitySummary
line 38.

There's usually a delay (I'm guessing while it fetches the report
data) and then I get this:
Jul 30 21:30:11 tickets RT: [27076] Use of uninitialized value
$printable_args{"Query"} in concatenation (.) or string at
/opt/rt4/local/plugins/RT-Extension-ActivityReports/html/Reports/Activity/Elements/ScreenFooter
line 7.

Some of the reports produce output--like the Activity Summary report.

The Billable Activity Detail report returns no data, with the
following error messages in syslog:

Jul 30 21:31:46 tickets RT: [27074] Use of uninitialized value $_ in
pattern match (m//) at
/opt/rt4/share/html/Reports/Activity/Elements/BillableActivityDetail
line 55.

Jul 30 21:31:46 tickets RT: [27074] Use of uninitialized value
$printable_args{"Query"} in concatenation (.) or string at
/opt/rt4/local/plugins/RT-Extension-ActivityReports/html/Reports/Activity/Elements/ScreenFooter
line 7.

I looked at BillableActivityDetail at line 55 and see that it's
hard-coded to use 'resolved' as the status.  We changed ours to
'complete', so I modified the line like so:

$tickets->FromSQL(join " AND ", map {"($_)"} grep {/\S/} ($query,
"Updated >= '$start' AND Updated <= '$end'", "Status = 'complete'"));

We get the same errors in syslog before and after the change with no
data in the report either way.

Am I missing something?

Thanks,

-A


Re: [rt-users] Creating Tickets in RT with a redirected email

2015-07-30 Thread Jeffrey Pilant
On 29-7-2015 1:12, Joop writes:

>On 29-7-2015 1:12, Jeff Smith wrote:

>> Thanks for your insight.

>>

>> I've looked at the headers from one of the messages and I cannot find

>> anything related to bulk preference (literally, a string search cannot

>> find "bulk" anywhere in the headers), but I do have a line

>> "RT-Squelch-Replies-To" which is populated with the sender's address.

>>

>> I've so far been unable to find anywhere I can disable this.

>>

>> Further suggestions?

>

>Searching through the source of rt-4.2.5 I had lying around I came

>across RedistributeAutoGeneratedMessages. What is this config parameter

>set to in RT_Config.pm and more importantly RT_SiteConfig.pm?

>Its indicating that it shouldn't redistribute messages to unprivilged users.

>

>What might be helpful too is headers captured at the Exchange level and

>again at the RT level. Maybe somebody will spot the problem.

The text "RT-Squelch-Replies-To" occurs in:
lib/RT/Action/SendEmail.pm (sub RemoveInappropriateRecipients)
lib/RT/Interface/Email.pm (sub _HandleMachineGeneratedMail)
I don't know which is preventing the mail you want, but one of these files is 
the one you want to patch.

/jeff

PS: the Email.pm file has a documentation error fir the 
_HandleMachineGeneratedMail sub:
Returns a triple of (
Should be:
Returns a quad of (
Since there are 4 values.



The information contained in this e-mail is for the exclusive use of the 
intended recipient(s) and may be confidential, proprietary, and/or 
legally privileged.  Inadvertent disclosure of this message does not 
constitute a waiver of any privilege.  If you receive this message in 
error, please do not directly or indirectly use, print, copy, forward,
or disclose any part of this message.  Please also delete this e-mail 
and all copies and notify the sender.  Thank you. 

For alternate languages please go to http://bayerdisclaimer.bayerweb.com



Re: [rt-users] Automatically Deleting Ticket Attachments Matching Name

2015-07-30 Thread Zoey Schutt
Hello,

 

That worked perfectly, thanks a lot!

 

I’ve got a cron job running that command after my nightly backup, and it’s 
exactly what I needed.

 

0 4 * * * root /opt/rt4/sbin/rt-shredder --plugin 
'Attachments=limit,1000;files_only,1;file,smime.p7s' –force

 

Regards,

 

Zoey Schutt

 

From: Nathan Baker [mailto:bak...@gmail.com] 
Sent: Tuesday, July 28, 2015 12:16 PM
To: Zoey Schutt 
Cc: RT User List 
Subject: Re: [rt-users] Automatically Deleting Ticket Attachments Matching Name

 

Have you tried something like this:

 

rt-shredder --plugin 'Attachments=limit,1000;files_only,1;file,smime.p7s'

 

That should delete only attachments with the name you mentioned, and will limit 
it to 1000 attachments which you can adjust.

 

On Tue, Jul 28, 2015 at 8:52 AM, Zoey Schutt mailto:z...@braincoral.io> > wrote:

Hello,

 

RT Instance Info:

 

Debian GNU/Linux 7 (wheezy)

Apache/2.2.22 (Debian)

Request Tracker 4.2.11

OpenSSL 1.0.1e 11 Feb 2013

perl 5, version 14, subversion 2 (v5.14.2) built for 
x86_64-linux-gnu-thread-multi

 

  _  

 

I have been searching for a way to do this, but I haven’t been able to find a 
good way to get this working. I’m trying to figure out a way to get Request 
Tracker to automatically delete ticket attachments with a specific name, in 
this case “smime.p7s”. Essentially all outgoing emails in my Request Tracker 
instance are signed, and every email Request Tracker sends attaches a 
“smime.p7s” file to the ticket. I just need a way to get these attachments 
deleted automatically, as they are not needed.

 

I’ve attached a screenshot of the attachments pane of a ticket that’s been 
worked on for a few days as an example.

 

I was thinking a cron job running rt-shredder might work, but I can’t figure 
out a way to delete attachments by name, only via transaction ID.

 

Any assistance would be appreciated!

 

Regards,

 

Zoey Schutt

 



Re: [rt-users] Creating Tickets in RT with a redirected email

2015-07-30 Thread Jeff Voskamp

On 30/07/15 09:47 AM, Jeff Smith wrote:

I did grep that config setting in RT_Config.pm and changed it to
unprivileged with no result.  It did not appear in RT_SiteConfig.pm at all.


The proper way to do this is to copy the setting from RT_Config.pm to 
RT_SiteConfig.pm and change it there. That way you won't loose your 
changes when you upgrade to a newer RT and RT_Config.pm changes under 
your feet.  RT_SiteConfig.pm logically overwrites RT_Config.pm as far as 
settings go and doesn't change during upgrades.


Jeff



Re: [rt-users] Creating Tickets in RT with a redirected email

2015-07-30 Thread Joop
On 30-7-2015 15:47, Jeff Smith wrote:
>
> I did grep that config setting in RT_Config.pm and changed it to
> unprivileged with no result.  It did not appear in RT_SiteConfig.pm at
> all.
>
>  
>
> Headers captured at the RT level are below.  Unfortunately it doesn’t
> appear that Exchange writes a sent item on redirected messages and I
> haven’t yet been able to find it in the Office365 Exchange management
> portal either.
>
>  
>
> 20:/ZQKp9vLHlpf4+nUkEMJZeD6P08tNtvF2Rq3hIqj0iQAlPuWZEny0c844Z+5USTm0SATus6YPyxkyKGw3mCsFg==
>
> *Auto-Submitted: auto-generated*
>
> Content-Language: en-US
>
> X-MS-Exchange-Transport-Crosstenantheadersstamped:   
> BLUPR11MB0082
>
> RT-Squelch-Replies-To: *jsm...@hoosiercancer.org*
>
> *RT-DetectedAutoGenerated: true*
>
>
How about the 'autogenerated' headers?
It seems logical to me that RT shouldn't react to such emails because
that will cause a loop.

Joop



Re: [rt-users] Creating Tickets in RT with a redirected email

2015-07-30 Thread Jeff Smith
I did grep that config setting in RT_Config.pm and changed it to unprivileged 
with no result.  It did not appear in RT_SiteConfig.pm at all.

Headers captured at the RT level are below.  Unfortunately it doesn't appear 
that Exchange writes a sent item on redirected messages and I haven't yet been 
able to find it in the Office365 Exchange management portal either.

X-MS-Exchange-Crosstenant-Fromentityheader: Hosted
X-MS-Exchange-Crosstenant-Fromentityheader: Hosted
MIME-Version: 1.0
X-MS-Exchange-Parent-Message-ID: 

Content-Type: multipart/related; 
boundary="_004_613ca39631a2450d834ccfd0a1d0b7dbBLUPR11MB0083namprd11pr_"; 
type="multipart/alternative"
X-MS-Exchange-Transport-Endtoendlatency: 00:00:02.2154948
X-Exchange-Antispam-Report-Test:
UriScan:(108003899814671);UriScan:(108003899814671);
Authentication-Results:hoosiercancer.org; dkim=none (message 
not signed) header.d=none;
Received:from na01-bn1-obe.outbound.protection.outlook.com 
(mail-bn1bon0077.outbound.protection.outlook.com [157.56.111.77]) by 
rt.hcrn.hoosiercancer.org (Postfix) with ESMTP id 50F8B80396 for 
; Tue, 28 Jul 2015 08:49:48 -0400 (EDT)
Received:from BLUPR11MB0083.namprd11.prod.outlook.com 
(10.160.37.20) by BLUPR11MB0082.namprd11.prod.outlook.com (10.160.37.19) with 
Microsoft SMTP Server (TLS) id 15.1.225.19; Tue, 28 Jul 2015 12:49:47 +
Received:from BLUPR11MB0083.namprd11.prod.outlook.com ([127.0.0.1]) 
by BLUPR11MB0083.namprd11.prod.outlook.com ([10.160.37.20]) with Microsoft SMTP 
Server id 15.01.0225.018; Tue, 28 Jul 2015 12:49:46 +
Delivered-To:myqu...@myrtserver.blah
Subject:   Test ticket 0847
Thread-Index:   AdDJM6IG3diL5wq8SWqD03TgSgnalg==
Date: Tue, 28 Jul 2015 12:49:44 +
X-Originatororg:   myhostedmaildomain.blah
X-MS-Exchange-Crosstenant-ID:  7339cc1b-025e-4d51-bde7-1fa620901b4d
X-MS-Exchange-Crosstenant-ID:  7339cc1b-025e-4d51-bde7-1fa620901b4d
X-Microsoft-Exchange-Diagnostics-Untrusted: 
1;DM2PR11MB0089;23:2F4CAPMDkYchYvGtZHqZ+i36MXpYRQp87riCUgq50gUFkaGJN0jZfjbjMlxrkwInZDnnHdl/L9rXJ0lmjfliKcn2ksBmDFdtVRoOWOZYufyWjxfgZLd2iWDicucUtMplmbzzT8TgAozsIxnzsP5OmdpbrzT9Gm+/bPARsk3R3yh0bNFWG6oRoWWrY5Z1jMTErFHgQPFQZEBgSPjIbFu+gS7SpiQfiiZIfyRayoX4SFhblLAjMB9rZTCJZAQrHDy/;5:Hwb8QMGk597nYwz3sKsKL+Fi8hO4oaZphESS86Rwbo6llfaj6BiPc75c91DCTJcNhzEfwoBlBqqc4XZeiGGTzICW9k5m0XA3EQ3y2P8oOxSGnB5DNPrr1uz2Wyg+w7LoBVk1tOvpF3fyjGVuAdQTzA==;24:oEdwayxinVTjzuDCWVUNrZ5sjb8u1PjfijYk2KS9eyMXm+HFzRnIFaU8q/Gmloi8C2lYtAdExITHhKCwK7Btcno92t9YQd2hljQRsSv8bBc=;20:/BDFa27uqdsepSdFM+mAboO/dEMGbv11kB7382KPKxdwN/xns5NVPUvB0JhdWASr9HHqnKL7xdiZ1eCydb7pMA==
To:  "HCRN Technology Services" 

X-Exchange-Antispam-Report-Cfa-Test: 
BCL:0;PCL:0;RULEID:(601004)(3002001);SRVR:DM2PR11MB0089;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0089;BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BLUPR11MB0082;BCL:0;PCL:0;RULEID:;SRVR:BLUPR11MB0082;
X-Microsoft-Antispam: 
UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0089;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR11MB0082;
>From myoriginaladdr...@myhostedmaildomain.blah Tue Jul 28 08:  49:48 2015
X-Forefront-Antispam-Report: 
SFV:SKI;SFS:;DIR:INB;SFP:;SCL:-1;SRVR:DM2PR11MB0089;H:BN4PR11MB0945.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:;SFV:NSPM;SFS:(10009020)(40124003)(45011)(311042)(24736003)(15975445007)(77096005)(229853001)(76576001)(18206015028)(62966003)(189998001)(500264011)(99936001)(92566002)(77156002)(102836002)(4013)(50986999)(122556002)(110136002)(638011)(54356999)(500196012)(107886002)(19580395003)(19580405001)(74316001)(500360012)(99286002)(108616004)(33646002)(400145012)(19627595001)(87936001)(19300405004)(89836001)(19617315012)(46102003)(17760045003)(2656002)(16236675004)(19625215002)(66066001)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR11MB0082;H:BLUPR11MB0083.namprd11.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:;
X-Microsoft-Exchange-Diagnostics: 
1;BLUPR11MB0082;5:ycs5weIPJHxc9XxlI/ta+94Z7fdKXcTowiTKfeq47EI8J+jgMx7ix9QDAaMYklSmLXGXD0+KYQPWtIpB2pFyWwvGHIyMXy0WqZ0dtiNNudO4B4LYaNC79CmuQBWpY8HA7LTlizZbBnQ0kzmNlbCPWg==;24:eEYNMzflO+U2Hte/cu7Sx25NEEbNFdXFDWhObQ/uIZJVyKoqJO+Po1Xz8Mat/CobQKVkh2PL+l7DDKRgDQtjK9veh8iIuTV1dyEdLg4LLEM=;20:/ZQKp9vLHlpf4+nUkEMJZeD6P08tNtvF2Rq3hIqj0iQAlPuWZEny0c844Z+5USTm0SATus6YPyxkyKGw3mCsFg==
Auto-Submitted: auto-generated
Content-Language: en-US
Message-ID:  
<613ca39631a2450d834ccfd0a1d0b...@blupr11mb0083.namprd11.prod.outlook.com>
X-MS-Exchange-Generated-Message-Source:   Mailbox Rules Agent
X-Microsoft-Antispam-PRVS: 

X-MS-Tnef-Correlator:
Resent-From:myoriginaladdr...@myhostedmaildomain.blah
Return-Path:  < myoriginaladdr...@myhostedmaildomain.blah >
X-Original-To:myoriginaladdr...@myhostedmaildomain.blah
X-MS-Exchange-Crosstenant-Originalarrivaltime:   

Re: [rt-users] Needing some advice on migration/upgrade plans

2015-07-30 Thread Josep Manel Andrés

Hi,
I've had problems with migrating from sles 11, to sles 12 or centos 7, 
which use MariaDB,but the problem was when upgrading the DDBB with the 
script provided, at some point it got stacked and filled up the disk 
with innoDB log data(I think it was, don't remember...) but with CentOS 
6.6 the script worked great.


Best.



On 30/07/15 10:23, Aaron Hockett wrote:

Hello all,

I have some upcoming work that in light of lack of specific
documentation to my questions, I figured I would ask the list.

First and foremost, I have a server migration planned in the next few
weeks where we’ve moving off an old metal box to a VM.  We’re currently
running RT ver. 4.0.9

Moving from CentOS 4.3 w/

MySQL 5.0.x

Apache 2.0.x

CentOS 6.6

MariaDB 5.5

Apache 2.2.15

Both 64 bit.

In all the reading the areas of which I need to migrate are:

MySQL Database

/opt/rt4/

I’m now the 2^nd or 3^rd gen DevOPs person to touch this server so I
can’t wait for things to go sideways… yeah.  That said, I’ve tried to
keep up on the mailing lists but have there been any horror stories
going from MySQL to MariaDB?  The first part of the migration is simply
a 1-to-1 move where I am not upgrading the database nor the version.
This will make sure everything is migrated properly and all the kinks
(if any) are worked out prior to moving up to the latest release
4.2.11.  As for moving them, I’ve already got a script that provides me
a MySQL dump and a TAR of the web directories so I should be set with that.

The second part of my question;  To help better maintain the site, I am
wanting a development box to test new features and add-ons once we get
upgraded.  One of the things that I’m running into is the naming.  Right
now our RT server is listed as: “rt.domain.com” and my development box I
want to have “devrt.domain.com”  Is there / does anyone have a SED
script to go in and change all the variables of “rt.domain.com” to
“devrt.domain.com”?  If not, is there an easier way to have a version of
your production database on another box and easily deal with a different
DNS name for the server?

Thank you for your time.

=Aaron

*Aaron Hockett**|*Network Operations

NOC: (866) 366-2638 Opt 1, Opt 1 *| *Fax(503) 227-8585
LS Networks *|* 921 SW Washington Street *|* Suite 370 *|* Portland, OR
97205

ahock...@lsnetworks.net  |
www.lsnetworks.net 



--
Josep Manel Andrés (josep.and...@bsc.es)
Operations - Barcelona Supercomputing Centre
C/ Jordi Girona, 31  http://www.bsc.es
08034 Barcelona, Spain Tel: +34-93-405 42 14
e-mail: syst...@bsc.es Fax: +34-93-413 77 21
---

WARNING / LEGAL TEXT: This message is intended only for the use of the
individual or entity to which it is addressed and may contain
information which is privileged, confidential, proprietary, or exempt
from disclosure under applicable law. If you are not the intended
recipient or the person responsible for delivering the message to the
intended recipient, you are strictly prohibited from disclosing,
distributing, copying, or in any way using this message. If you have
received this communication in error, please notify the sender and
destroy and delete any copies you may have received.

http://www.bsc.es/disclaimer


[rt-users] Needing some advice on migration/upgrade plans

2015-07-30 Thread Aaron Hockett
Hello all,

I have some upcoming work that in light of lack of specific documentation to my 
questions, I figured I would ask the list.

First and foremost, I have a server migration planned in the next few weeks 
where we've moving off an old metal box to a VM.  We're currently running RT 
ver. 4.0.9

Moving from CentOS 4.3 w/
MySQL 5.0.x
Apache 2.0.x

CentOS 6.6
MariaDB 5.5
Apache 2.2.15

Both 64 bit.

In all the reading the areas of which I need to migrate are:
MySQL Database
/opt/rt4/

I'm now the 2nd or 3rd gen DevOPs person to touch this server so I can't wait 
for things to go sideways... yeah.  That said, I've tried to keep up on the 
mailing lists but have there been any horror stories going from MySQL to 
MariaDB?  The first part of the migration is simply a 1-to-1 move where I am 
not upgrading the database nor the version.  This will make sure everything is 
migrated properly and all the kinks (if any) are worked out prior to moving up 
to the latest release 4.2.11.  As for moving them, I've already got a script 
that provides me a MySQL dump and a TAR of the web directories so I should be 
set with that.

The second part of my question;  To help better maintain the site, I am wanting 
a development box to test new features and add-ons once we get upgraded.  One 
of the things that I'm running into is the naming.  Right now our RT server is 
listed as: "rt.domain.com" and my development box I want to have 
"devrt.domain.com"  Is there / does anyone have a SED script to go in and 
change all the variables of "rt.domain.com" to "devrt.domain.com"?  If not, is 
there an easier way to have a version of your production database on another 
box and easily deal with a different DNS name for the server?

Thank you for your time.
=Aaron

[cid:image003.jpg@01D0CA66.570EB140]
Aaron Hockett| Network Operations
NOC: (866) 366-2638 Opt 1, Opt 1 | Fax (503) 227-8585
LS Networks | 921 SW Washington Street | Suite 370 | Portland, OR 97205
ahock...@lsnetworks.net | 
www.lsnetworks.net