[rt-users] scrip to detect attached zip files

2016-03-15 Thread Hugo Escobar
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


Re: [rt-users] Unique custom fields for assets

2016-03-15 Thread Kyle Dippery

Here 'tis.

My addition to the Create {} subroutine is lines 130-138.  The check for 
uniqueness and auto-choosing the next highest number happen in 
additional subroutines beginning at line 230.


We call the relevant field "COE Number" (sometimes "CoE Number", the 
case seems not to matter); change that wherever I have it to whatever 
you call your field.


Lines 133 and 137 are where I needed to know that the custom field was 
#1 ('CustomField-1').  There are two SELECT queries, one (line 322) 
where I searched for the field by name and one (line 244) where I 
searched for it by number.  Probably I should have done both of those 
the same way, for clean code purposes.  Probably searching by name would 
be the way to go, for even cleaner code purposes.


We assume that we'll be adding (whenever I get this live) existing 
assets to a clean database, so we accept input for the COE Number. I do 
some basic testing, to make sure that if there is input, it is a number 
and not, say, an SQL command.  I don't do any sort of sanity checking on 
the given number, except to see if it's already in use; someone could, 
for instance, input "100" instead of "1000" and kick our asset 
numbers up a few orders of magnitude. Probably with some additional work 
the getNextNumber subroutine could look for such gaps and fill them in, 
but I don't think I'll be getting around to that extra work anytime soon.


I believe there are some rigorous tests that can be used on RT 
extensions; I have not done anything of that sort with this code. I've 
only played with it on a couple of test systems (both RT 4.2), but it so 
far does what I want it to.


If you have any questions, I'll try to answer, hopefully with something 
better than "It made sense at the time".


If any accomplished programmers would like to shred it and tell me 
everything I could do better, I'd appreciate the education.


Share and enjoy,
Kyle

On 03/15/2016 12:34 PM, Seever, Kenny wrote:


Kyle,

Thanks for the reply.  If possible would you be willing to share what 
you have?  This will be something I’ve never attempted so need all the 
help I can get.


Thanks again,

Kenny

*From:*Kyle Dippery [mailto:kyle.dipp...@uky.edu]
*Sent:* Monday, March 14, 2016 8:34 AM
*To:* rt-users@lists.bestpractical.com
*Cc:* Seever, Kenny 
*Subject:* Re: [rt-users] Unique custom fields for assets

Kenny,

I haven't looked at RT 4.4 yet, so perhaps it's built in there, but it 
wasn't in RT 4.2.


What you will need to do, if it isn't there already, is create your 
own extension to the Asset.pm module, call it Asset_Local.pm, and add 
code there to check for uniqueness and auto-populate the field.  The 
Create {} subroutine is the one you'll most likely want to override.


One gotcha that I remember (I did this about a year ago) is that I 
needed to know the number of the custom field; I couldn't figure out 
how to search the $args{} array for the field by name.  That being our 
most critical custom field, though, it made sense to create it first 
so it would be "CustomField-1".


I'm reluctant to post my actual code, because it's crappy and I don't 
want to release bad code into the wild, but if you'd like to see it I 
can sanitize it some and share it.


Cheers,
Kyle

On 03/11/2016 11:38 AM, Seever, Kenny wrote:

Hello,

I am working on evaluating using the Assets module in RT to manage
our equipment, but haven’t been able to figure out if there is a
way to make a field unique.  All of our equipment has a 5 digit
asset number (2) that is unique.  I need to be able to add a
field that makes sure that each number is only used once.  Ideally
it would auto populate with the next number when a new asset is
added, but that may be asking for too much.  Is there build in
functionality for any of this that I’ve missed in the documentation?

Thanks in advance,

Kenny



--
Kyle Dippery
Engineering Computing Services
219 RMB
859-257-1346


--
Kyle Dippery
Engineering Computing Services
219 RMB
859-257-1346



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


Re: [rt-users] Unique custom fields for assets

2016-03-15 Thread Tony G Palomino
Interested as well!  Perhaps if you post to the list, others can help make
it less "crappy".  ;)

On Tue, Mar 15, 2016 at 1:33 PM, Joop  wrote:

> On 15-3-2016 17:34, Seever, Kenny wrote:
>
> Kyle,
>
>
>
> Thanks for the reply.  If possible would you be willing to share what you
> have?  This will be something I’ve never attempted so need all the help I
> can get.
>
>
>
> Interested too. I have moved from the third-party AT-Assettracker to the
> RT Assets and lost the unique IP restriction that is in the former. Would
> love to have that back :-)
>
> Joop
>
>
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
>
>


-- 
tony.palom...@reed.edu
Director, Computer User Services
Reed College
503-788-6622
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Unique custom fields for assets

2016-03-15 Thread Joop
On 15-3-2016 17:34, Seever, Kenny wrote:
>
> Kyle,
>
>  
>
> Thanks for the reply.  If possible would you be willing to share what
> you have?  This will be something I’ve never attempted so need all the
> help I can get.
>
>  
>
>
Interested too. I have moved from the third-party AT-Assettracker to the
RT Assets and lost the unique IP restriction that is in the former.
Would love to have that back :-)

Joop

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


Re: [rt-users] Attachments don't reach database for one user

2016-03-15 Thread Gordon Scott Messmer
On Tue, Mar 15, 2016 at 9:31 AM, Chanel Wheeler 
wrote:

> Yes, everything in the ticket shows up for the faulty user except for the
> attachment. The rights for this user and other basic users of the system
> are the same.
>
>
>
Is that user using Outlook?  Might it be sending non-plain-text parts of
the message as winmail.dat?
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Unique custom fields for assets

2016-03-15 Thread Seever, Kenny
Kyle,

Thanks for the reply.  If possible would you be willing to share what you have? 
 This will be something I've never attempted so need all the help I can get.

Thanks again,

Kenny

From: Kyle Dippery [mailto:kyle.dipp...@uky.edu]
Sent: Monday, March 14, 2016 8:34 AM
To: rt-users@lists.bestpractical.com
Cc: Seever, Kenny 
Subject: Re: [rt-users] Unique custom fields for assets

Kenny,

I haven't looked at RT 4.4 yet, so perhaps it's built in there, but it wasn't 
in RT 4.2.

What you will need to do, if it isn't there already, is create your own 
extension to the Asset.pm module, call it Asset_Local.pm, and add code there to 
check for uniqueness and auto-populate the field.  The Create {} subroutine is 
the one you'll most likely want to override.

One gotcha that I remember (I did this about a year ago) is that I needed to 
know the number of the custom field; I couldn't figure out how to search the 
$args{} array for the field by name.  That being our most critical custom 
field, though, it made sense to create it first so it would be "CustomField-1".

I'm reluctant to post my actual code, because it's crappy and I don't want to 
release bad code into the wild, but if you'd like to see it I can sanitize it 
some and share it.

Cheers,
Kyle
On 03/11/2016 11:38 AM, Seever, Kenny wrote:
Hello,

I am working on evaluating using the Assets module in RT to manage our 
equipment, but haven't been able to figure out if there is a way to make a 
field unique.  All of our equipment has a 5 digit asset number (2) that is 
unique.  I need to be able to add a field that makes sure that each number is 
only used once.  Ideally it would auto populate with the next number when a new 
asset is added, but that may be asking for too much.  Is there build in 
functionality for any of this that I've missed in the documentation?

Thanks in advance,

Kenny



--

Kyle Dippery

Engineering Computing Services

219 RMB

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


Re: [rt-users] Attachments don't reach database for one user

2016-03-15 Thread Chanel Wheeler
Yes, everything in the ticket shows up for the faulty user except for the 
attachment. The rights for this user and other basic users of the system are 
the same.

chanel


From: Dustin Graves [mailto:dus...@bestpractical.com]
Sent: Monday, March 14, 2016 1:58 PM
To: Chanel Wheeler
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Attachments don't reach database for one user


On Mar 10, 2016, at 5:09 PM, Chanel Wheeler 
> wrote:

Hi all,
Hi Chanel,


I have one user that has used RT for a while with no problems. Recently, her 
attachments to web tickets ceased coming through. I’ve watched her add  
attachments and they appear to upload successfully but there’s no trace of them 
in the Attachments table. We tried multiple browsers and the same thing 
happened on each. I logged in as her on my computer and still the problem 
happened. Another person logged in to RT on her computer and successfully 
attached items. So it’s something to do with her account. I’ve taken a look at 
her user record in the db and I don’t see anything amiss.

Any ideas on what I might try?

We’re running RT 4.4 and use LDAP for authentication.

I would start by checking the rights for these two users and how they might be 
different.

Can the faulty user see the missing attachment’s associated 
comment/correspondence? If the user cannot, that is why the attachment is 
missing. A user needs the ShowTicketComments right to see attachments added as 
part of a comment.

If this is not the problem, then I can investigate further.


Thanks!
chanel
Thank you,
Dustin
-
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-15 Thread Joseph D. Wagner
If you can upgrade to the latest version of CentOS 7, you'll get perl
5.16. 

Joseph D. Wagner

On 2016-03-15 03:06, Boris Epstein wrote:

> Hi Peter, 
> 
> Thanks, I saw that. 
> 
> I was wondering what the benefits and general experience was of those who 
> used later versions of Perl 5 or Perl 6 vs 5.10.1. Just trying to see if it 
> was a worthwhile exercize trying to upgrade - which on Centos did not seem to 
> be trivial. 
> 
> Cheers, 
> 
> Boris. 
> 
> On Tue, Mar 15, 2016 at 4:27 AM, Peter Viskup  wrote:
> 
>> Hello Boris,
>> from readme [1] on github it is obvious the RT needs Perl as of
>> version 5.10.1 and above. Readme file from 4.4 version has the same
>> list of requirements.
>> Some RT modules may have their own dependencies. You need to check them.
>> 
>> [1] https://github.com/bestpractical/rt
>> 
>> --
>> Peter Viskup
>> 
>> On Mon, Mar 14, 2016 at 4:33 PM, Boris Epstein  wrote:
>>> Hello all,
>>> 
>>> I am about to upgrade my RT 4.2 to v4.4 on a CentOS 6 machine. It appears
>>> that Perl 5.1 is barely adequate. What is the recommended version of Perl
>>> for this setup?
>>> 
>>> Thanks.
>>> 
>>> Cheers,
>>> 
>>> Boris.
>>> 
>> 
>>> -
>>> 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
 -
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] RT with Office 365 Outlook

2016-03-15 Thread Bryon Baker
Donny
We have converted to Office 365, I have setup one use with an E1 license at a 
cost of about $10 a month.  The mailbox has folders setup and rules for sorting 
into those folders.  With Postfix and scripts the folder will dictate what 
queue is used for the ticket creation.


Thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726  •  262-783-6261 ext. 2296
bba...@copesan.com
www.copesan.com
"Servicing North America with Local Care"

From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Donny Brooks
Sent: Monday, March 14, 2016 6:55 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] RT with Office 365 Outlook


We recently migrated from in house Postfix to hosted Office365 
Outlook/exchange. I have been trying to figure out how to get RT to work with 
this setup but the only way I can see to do this is to "burn" a license or 4. 
With each one costing us around $20/month I would rather not do this. Has 
anyone successfully gotten RT to work with O365 without multiple email 
accounts? I was wondering if it could be done with "shared mailboxes" since I 
found the following instructions on accessing a shared mailbox via IMAP:





Exchange Configuration:

  USER EMAIL: u...@maindomain.com
  PASSWORD: password

  SHARED MAILBOX: sha...@anotherdomain.com  (could also be @domain.com, of 
course)
  SHARED MAILBOX ALIAS: shared-mailbox

  Note: Please make sure to create the UNIQUE alias always with the mailbox, 
because it creates the user [alias]@maindomain.com. In this case 
shared-mail...@maindomain.com



Settings for IMAP Configuration:

  EMAIL ADDRESS: sha...@anotherdomain.com (shared mailbox)

  IMAP SERVER: outlook.office365.com
  SMTP SERVER: smtp.office365.com

  USERNAME: u...@maindomain.com\shared-mailbox  (user\shared mailbox alias)
  PASSWORD: password (user's password)

SMTP LOGIN IS DIFFERENT (!)

  USERNAME: u...@maindomain.com  (users email)
  PASSWORD: password (user's password)




It has been a long time since I have delved into the bowels of RT. It has been 
that rock solid for us. So any and all help is much appreciated.



Donny B.


-
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-15 Thread Boris Epstein
Hi Peter,

Thanks, I saw that.

I was wondering what the benefits and general experience was of those who
used later versions of Perl 5 or Perl 6 vs 5.10.1. Just trying to see if it
was a worthwhile exercize trying to upgrade - which on Centos did not seem
to be trivial.

Cheers,

Boris.


On Tue, Mar 15, 2016 at 4:27 AM, Peter Viskup  wrote:

> Hello Boris,
> from readme [1] on github it is obvious the RT needs Perl as of
> version 5.10.1 and above. Readme file from 4.4 version has the same
> list of requirements.
> Some RT modules may have their own dependencies. You need to check them.
>
> [1] https://github.com/bestpractical/rt
>
> --
> Peter Viskup
>
>
> On Mon, Mar 14, 2016 at 4:33 PM, Boris Epstein 
> wrote:
> > Hello all,
> >
> > I am about to upgrade my RT 4.2 to v4.4 on a CentOS 6 machine. It appears
> > that Perl 5.1 is barely adequate. What is the recommended version of Perl
> > for this setup?
> >
> > Thanks.
> >
> > Cheers,
> >
> > Boris.
> >
> > -
> > 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] which Perl version should one use with RT 4.4 on CentOS 6

2016-03-15 Thread Peter Viskup
Hello Boris,
from readme [1] on github it is obvious the RT needs Perl as of
version 5.10.1 and above. Readme file from 4.4 version has the same
list of requirements.
Some RT modules may have their own dependencies. You need to check them.

[1] https://github.com/bestpractical/rt

-- 
Peter Viskup


On Mon, Mar 14, 2016 at 4:33 PM, Boris Epstein  wrote:
> Hello all,
>
> I am about to upgrade my RT 4.2 to v4.4 on a CentOS 6 machine. It appears
> that Perl 5.1 is barely adequate. What is the recommended version of Perl
> for this setup?
>
> Thanks.
>
> Cheers,
>
> Boris.
>
> -
> 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