Re: [rt-users] scrip to detect attached zip files

2016-03-18 Thread Hugo Escobar
Thanks Jannae, it works like a charm!

On Wed, Mar 16, 2016 at 10:11 PM, Jannae Jacks  wrote:

> Hi Hugo,
>
> The N in Filename is not capitalized in the docs. Try lowercase?
>
> ttps://docs.bestpractical.com/rt/4.4.0/RT/Attachment.html#Filename
>
> Like so:
>
> while(my $attachment = $self->TransactionObj->Attachments->Next) {
> $RT::Logger->info($attachment->Filename);
> }
>
>
>
> On Wed, Mar 16, 2016 at 1:01 PM, Hugo Escobar  wrote:
>
>> Update:
>> The following lines work exactly as I expect:
>>
>> use Data::Dumper;
>>
>> my $tobj = $self->TransactionObj;
>> my $atts = $tobj->Attachments;
>>
>> my $attachment = $self->TransactionObj->Attachments->Next;
>> if (!$attachment) {
>> return 0;
>> }
>>
>> my $content = Dumper($attachment->ContentAsMIME(Children=>1));
>> if ($content=~/ name\=\".*?\.zip\"/i) {
>> $RT::Logger->info("message has a zip file");
>> } else {
>> $RT::Logger->info("no zip file");
>> }
>> return 1;
>>
>> However, this doesn't look like a good solution
>>
>>
>> In an attempt to use the API directly, I tried the following:
>>
>> https://docs.bestpractical.com/rt/4.2.12/RT/Attachment.html#Filename
>> https://docs.bestpractical.com/rt/4.2.12/RT/Transaction.html#Attachments
>>
>> while(my $attachment = $self->TransactionObj->Attachments->Next) {
>> $RT::Logger->info($attachment->FileName);
>> }
>>
>> But got this in the log file:
>>
>> [Wed Mar 16 16:47:07 2016] [error]: Scrip 34 Commit failed:
>> RT::Attachment::FileName Unimplemented in RT::Action::UserDefined. ((eval
>> 652) line 2)
>>
>> ​any ideas?
>>
>> Thanks in advance​
>>
>> ​PS:
>> our installation:
>> Centos 6.6/MySql/Apache+mod_perl
>> RT 4.2​.9
>>
>>
>> On Tue, Mar 15, 2016 at 7:04 PM, Hugo Escobar  wrote:
>>
>>> Hi,
>>>
>>> I need to detect if a zip file has been attached to a ticket at
>>> creation time and also at 'comment' or 'correspond' time.
>>>
>>> My idea to solve this is to extract the attachments and then parse
>>> the content.
>>>
>>> I think the best route for this would be:
>>>
>>>  TransactionObj->Attachments->Next ...
>>>   ContentAsMIME(Children=>1)
>>>
>>> Since MIME entities can themselves contain other entities,
>>> I think I'm going to need a recursive function ...
>>>
>>> Basically what I'd like is a few words of advice. I think I can
>>> come up with a solution but perhaps there's a simpler path I'm
>>> overlooking or I'm not aware of.
>>>
>>> ​Thanks in advance​,
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> Hugo Escobar
>>
>> 
>>
>> 4770 Biscayne Blvd, Ste 700
>> Miami, FL 33137
>>
>> main: 305.677.0022
>> support: 305.921.4620
>> email: hesco...@afslc.com
>>
>> Follow us on Facebook and Linked-In
>> 
>>
>>
>> NOTICE: This email and any attachment to this email may contain
>> confidential information. If you are not the intended recipient, you must
>> not review, retransmit, convert to hard copy, photocopy, use or disseminate
>> this email or any attachments to it. If you have received this email in
>> error, please notify us immediately by return email and delete this
>> message. Please note that if this email contains a forwarded message or is
>> a reply to a prior message, some or all of the contents of this message or
>> any attachments may not have been produced by our firm. *As our firm may
>> be deemed a debt collector, if your payment is in default, we may be
>> attempting to collect a debt on behalf of the association, and any
>> information obtained may be used for that purpose.*
>>
>> -
>> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
>> * Washington DC - May 23 & 24, 2016
>>
>>
>
>
> --
> Jannae Jacks
> Senior Network Security Analyst, Technology Security Services
> New York University, Information Technology
> 726 Broadway, 2nd Floor, New York, NY 10003
> http://www.nyu.edu
>
> p: (212) 992.7444 | m: (901) 229.3225
>
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
>
>


-- 
Regards,

Hugo Escobar



4770 Biscayne Blvd, Ste 700
Miami, FL 33137

main: 305.677.0022
support: 305.921.4620
email: hesco...@afslc.com

Follow us on Facebook and Linked-In



NOTICE: This email and any attachment to this email may contain
confidential information. If you are not the intended recipient, you must
not review, retransmit, convert to hard copy, photocopy, use or disseminate
this email or any attachments to it. If you have received this email in
error, please notify us immediately by return email and delete this
message. Please note that if this email contains a forwarded message or is
a reply to a prior message, some or all of the contents of this message or
any attachments

[rt-users] subscribe

2016-03-18 Thread Bourn, Lionel
---

Lionel Bourn, CISSP CISA
Senior Security Analyst
ISO Counter Threat Unit
(o)404-885-4298

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] which Perl version should one use with RT 4.4 on CentOS 6

2016-03-18 Thread Chris Groome
Hi Jerome,
First I want to apologize. I do not check my 'lists' every day. I hope you
have already found your answer by now. If not,,,
For my install I had a museum piece server and yet, its used every day. So
they need new HW and OS but old DB SW for a quick transition rather than
importing the data into a new ver install.(there done with background)
So new HW with centOS 6.5 using the std perl-5.10.1-136.el6.x86_64
but running rt-3.8.4
The key for my install was resolving dependencies by running the following:
perl sbin/rt-test-dependencies --with-postgres --with-modperl1 --install
(30min later the command finished with the following issues)

I saw messages like this too: Warning: Prerequisite 'Exception::Class =>
1.15' for 'DROLSKY/HTML-Mason-1.56.tar.gz' failed when processing
'DROLSKY/Exception-Class-1.40.tar.gz' with 'make_test => NO'. Continuing,
but chances to succeed are limited.
and this: Syntax error on line 1046 of /usr/local/apache/conf/httpd.conf:
Can't locate RT/Extension/ForkTicket.pm in @INC (@INC contains:
It could not locate it because it was not on the server

So with the above and below messages I knew I had a pyramid of dependencies
to resolve and I needed to start with the smallest and work my way to the
very top  installing them all. It took a small time really to get them all.

Install module Net::Server
Net::Server is up to date (2.008).

SOME DEPENDENCIES WERE MISSING. <==and by the way some of the missing had
missing for them too.
ICAL missing dependencies:
Data::ICal...MISSING
MAILGATE missing dependencies:
HTML::FormatText...MISSING
STANDALONE missing dependencies:
HTTP::Server::Simple >= 0.34...MISSING
HTTP::Server::Simple::Mason >= 0.09...MISSING
GPG missing dependencies:
GnuPG::Interface...MISSING
POSTGRESQL missing dependencies:
DBD::Pg >= 1.43...MISSING
CORE missing dependencies:
HTML::Scrubber >= 0.08...MISSING
MASON missing dependencies:
HTML::Mason >= 1.36...MISSING
http://perldoc.perl.org/perlmodinstall.html <==Read this for installing Dep
I hope this helps.
Sincerely, Chris


On Wed, Mar 16, 2016 at 12:30 PM, Jerome  wrote:

> Dear Cris Groome,
>
> You've wrote this answer:
>
> "I upvote Martin's answer. He gave you the version and the proper
> technique to achieving it."
>
> Would you be nice to send me too your "howto" about specific perl install
> for RT?
>
> Regards.
>
>
> --
> -- Jérôme
> Be yourself; everyone else is already taken.
>  (Oscar Wilde)
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Fwd: which Perl version should one use with RT 4.4 on CentOS 6

2016-03-18 Thread Jim Brandt

There is info on options for installing perl in the RT documentation too:

https://docs.bestpractical.com/rt/4.4.0/rt_perl.html

On 3/16/16 5:44 PM, Martin Wheldon wrote:

Hi Jerome,

The following google search came back with a tutorial which pretty much
describes the type of perl brew install that I carry out for RT.

perlbrew "request tracker" howto

Best Regards

Martin

 Original Message 
Subject: [rt-users] which Perl version should one use with RT 4.4 on 
CentOS 6

Date: 2016-03-16 16:30
From: Jerome 
To: rt-users@lists.bestpractical.com

Dear Cris Groome,

You've wrote this answer:

"I upvote Martin's answer. He gave you the version and the proper 
technique to achieving it."


Would you be nice to send me too your "howto" about specific perl 
install for RT?


Regards.
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016