Re: [rt-users] RT 4 on Amazon EC2

2017-02-22 Thread Landon Stewart
On Feb 22, 2017, at 4:09 AM, Peter Nikolaidis 
<pet...@paradigmcc.com<mailto:pet...@paradigmcc.com>> wrote:

Sorry- too quick with the send button. I did have to add a separate swap 
partition because my instance was indeed running out of memory. I also was not 
able to quickly get fcgi working, so I just moved on with standard Apache2. I 
am using the Amazon Ubuntu AMI.

Is there any interesting output from the command 'dmesg'?  Interesting messages 
might include 'signal 13' or other things related to memory issues.

Also what multi-processing module are you using?  Check the output of 'httpd 
-V' for the 'Server MPM' line.  It should be prefork and you should tune the 
configuration of that to use less resources if not already done.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] Help with rt-email-digest: not found

2017-02-04 Thread Landon Stewart
On Feb 4, 2017, at 3:23 AM, Martin Petersson 
<mar...@uanet.se<mailto:mar...@uanet.se>> wrote:

Hello,

I receive these emails everyday, why is it not found?

The subject: Cron <root@helpdesk> /usr/sbin/rt-email-digest -m daily
and the body: /bin/sh: 1: /usr/sbin/rt-email-digest: not found

How do i get it running so it sends the digest emails?

Hi Martin,

Does /usr/sbin/rt-email-digest actually not exist or does the interpreter on 
the first line of /usr/sbin/rt-email-digest not exist?  Is your RT installation 
in /opt/rt4/ or something?

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] How to delete Ticket

2017-01-25 Thread Landon Stewart
Oh, also.  To remove a ticket properly (do not attempt to edit the database) 
you use rt-shredder.

Example:
rt-shredder --plugin 'Tickets=query,id = '

There's also a web UI within RT:
https://rt-wiki.bestpractical.com/wiki/Shredder#WebUI

On Jan 25, 2017, at 1:24 PM, Landon Stewart 
<lstew...@internap.com<mailto:lstew...@internap.com>> wrote:

How are you delivering mail to rt-mailgate?

On Jan 25, 2017, at 6:46 AM, Jonathan Sheehy 
<jshe...@prg.com<mailto:jshe...@prg.com>> wrote:

We are having an issue where RT is looping a ticket every few seconds causing 
an NDR bomb to our Exchange system.  What is the process for permanently 
removing a ticket or series of tickets.  We have a Postgres db

Jonathan Sheehy
Exchange Administrator


PRG Secaucus
A Division of Production Resource Group
915 Secaucus Rd.
Secaucus, NJ 07094
201-758-4262 phone
908-902-0660 cell
jshe...@prg.com<mailto:jshe...@prg.com>
www.prg.com<http://www.prg.com/>

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com/>


--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] How to delete Ticket

2017-01-25 Thread Landon Stewart
How are you delivering mail to rt-mailgate?

On Jan 25, 2017, at 6:46 AM, Jonathan Sheehy 
<jshe...@prg.com<mailto:jshe...@prg.com>> wrote:

We are having an issue where RT is looping a ticket every few seconds causing 
an NDR bomb to our Exchange system.  What is the process for permanently 
removing a ticket or series of tickets.  We have a Postgres db

Jonathan Sheehy
Exchange Administrator


PRG Secaucus
A Division of Production Resource Group
915 Secaucus Rd.
Secaucus, NJ 07094
201-758-4262 phone
908-902-0660 cell
jshe...@prg.com<mailto:jshe...@prg.com>
www.prg.com<http://www.prg.com/>

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] Occasional errors sending email through RT: Duplicate header field

2016-12-25 Thread Landon Stewart
On Dec 20, 2016, at 8:46 AM, Stephen Switzer 
<st...@sbsroc.com<mailto:st...@sbsroc.com>> wrote:


Hello!

   I'm using RT 4.4.1 sitting behind Kolab 16 as a mail server. This includes 
amavisd-new as a filter, and this combination causes bounces to RT 
occasionally... and my customers aren't getting my replies!

   If I send an email to an RT ticket, which I am the owner of, RT sends an 
email on my behalf to the requestor (as it should). Unfortunately, amavisd-new 
sometimes sees 2 "Sender" headers and rejects the email which creates a new 
ticket in RT with the bounce reason. Here' the header-1.hdr attachment that 
amavis replies with:


Hi Steve,

What is the wording of the actual reason for the bounce within the bounce 
message? What do the headers of the message that bounced look like?  Does the 
email that's being bounced actually have multiple From: fields?  Have you tried 
whitelisting senders in amavisd?


--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] Are these log errors normal?

2016-12-21 Thread Landon Stewart
What version of HTML::Element are you using?  I don't get these warnings in our 
logs.

# perl -MHTML::Element -e 'print "$HTML::Element::VERSION\n"';
5.03


On Dec 21, 2016, at 8:45 AM, Stephen Switzer 
<st...@sbsroc.com<mailto:st...@sbsroc.com>> wrote:


I'm running RT 4.4.1 w/ RTIR. The following appears when viewing a ticket. 
Please keep in mind that I shortened this a LOT. Each section repeats a few 
hundred times in the log:

[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $_ in 
concatenation (.) or string at 
/usr/share/perl5/HTML/FormatText/WithLinks/AndTables.pm line 214. 
(/usr/share/perl5/HTML/FormatText/WithLinks/AndTables.pm:214)
---clip---
[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $ptag 
in string eq at /usr/share/perl5/HTML/Element.pm line 711. 
(/usr/share/perl5/HTML/Element.pm:711)
[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $ptag 
in string eq at /usr/share/perl5/HTML/Element.pm line 711. 
(/usr/share/perl5/HTML/Element.pm:711)
[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $ptag 
in hash element at /usr/share/perl5/HTML/Element.pm line 711. 
(/usr/share/perl5/HTML/Element.pm:711)
[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $ptag 
in string eq at /usr/share/perl5/HTML/Element.pm line 711. 
(/usr/share/perl5/HTML/Element.pm:711)
[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $ptag 
in string eq at /usr/share/perl5/HTML/Element.pm line 711. 
(/usr/share/perl5/HTML/Element.pm:711)
[11754] [Wed Dec 21 16:35:39 2016] [warning]: Use of uninitialized value $ptag 
in hash element at /usr/share/perl5/HTML/Element.pm line 711. 
(/usr/share/perl5/HTML/Element.pm:711)
---clip---
[11754] [Wed Dec 21 16:35:44 2016] [warning]: Use of uninitialized value $tag 
in string eq at /usr/share/perl5/HTML/Element.pm line 2632. 
(/usr/share/perl5/HTML/Element.pm:2632)
[11754] [Wed Dec 21 16:35:44 2016] [warning]: Use of uninitialized value $tag 
in string eq at /usr/share/perl5/HTML/Element.pm line 2656. 
(/usr/share/perl5/HTML/Element.pm:2632)
[11754] [Wed Dec 21 16:35:44 2016] [warning]: Use of uninitialized value $tag 
in string eq at /usr/share/perl5/HTML/Element.pm line 2656. 
(/usr/share/perl5/HTML/Element.pm:2632)
[11754] [Wed Dec 21 16:35:44 2016] [warning]: Use of uninitialized value $tag 
in string eq at /usr/share/perl5/HTML/Element.pm line 2656. 
(/usr/share/perl5/HTML/Element.pm:2632)


Is there something I need to fix, or is this "normal"?

Extra information:

root@sbs-help:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

root@sbs-help:~# perl --version

This is perl 5, version 22, subversion 1 (v5.22.1) built for 
x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)


Thank you!

--

Best regards,
Steve

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] LastUpdated for tickets not working?

2016-12-19 Thread Landon Stewart

On Dec 19, 2016, at 11:48 AM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

I'm using the Crontool, yes, but I've also been doing searches on the web 
interface to see if I could get this to work. My Crontool syntax is something 
like:

/opt/rt4/bin/rt-crontool --search RT::Search::FromSQL \
--search-arg "status != 'resolved' and LastUpdated <= '3 days ago'" \
--action RT::Action \
--verbose


LastUpdated can change for nearly any change to the ticket if that change is 
recorded (ie. RecordTransaction => 1) like a Status change or an update to the 
watchers etc.  The one you might want to use instead is LastTold which, to my 
knowledge, is when the last correspondence was made.  I may be mistaken here 
though but I think that's what LastTold is for.  Try using LastTold instead of 
LastUpdated.

I'm in the database now, looking at the Tickets table and messing with queries. 
I just tried this, but got an empty set:

select id, LastUpdated from Tickets where LastUpdated <= '3 days ago' order by 
LastUpdated DESC limit 10;

I'm not surprised I got nothing, as I imagine the '3 days ago' syntax is 
something RT interprets before giving the query to the database engine. Still, 
it was worth a shot. I'm now refreshing my knowledge of date math in MySQL so I 
can query exactly what I want, but I hoped UntouchedInHours would do all that 
for me. Oh, and yes, LastUpdated does seem to have normal values in it.

Yes - '3 days ago' is interpreted specially by a module used by RT for things 
like rt-crontool and the search UI within RT.   MySQL has no idea how to 
interpret that though so it won't work there.

They're in GMT time, but they seem to be correct.

All date/time values stored by MySQL are GMT.  One must convert them to GMT 
before storage and convert them to the user's timezone when displaying them.  
RT is aware of this and already takes care of it assuming your time zone 
settings are correct on the server.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>



Re: [rt-users] supplying database credentials to rt-fulltext-indexer

2016-12-09 Thread Landon Stewart
On Dec 9, 2016, at 2:06 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

I thought the tool I had to run periodically was 
/opt/rt4/sbin/rt-fulltext-indexer. That's the one guides tell me to run; the 
setup tool seems to be the initial database adjustment tool, but once it runs 
once, I thought I had to run the indexer every so often. The indexer is the 
tool that refuses database credentials. Unless the guides on this are wrong, 
and the setup one is the one I have to run with cron?

I haven't enabled Full Text searching in RT before but I have set it up in 
MySQL for other uses.  From my experiences with MySQL I believe you setup the 
indexes once only with the setup tool for RT and once they are setup there's no 
need to 're-index' anything regularly with any crontab or anything.

Above all though - do this on a copy of your RT installation/database and make 
sure it works before you potentially interrupt the flow of business in 
production.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] supplying database credentials to rt-fulltext-indexer

2016-12-09 Thread Landon Stewart
On Dec 9, 2016, at 1:33 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

I still don't have this working, so any input would be great. I just wanted to 
add that, since my last email on the topic, I've tried putting an rtrc file in 
/root, since I'm running this as root for the moment. It didn't help. I've also 
looked through the actual file, trying to find where it gets its credentials 
from, but all I saw was some kind of database handler function which I'll have 
to try to track down. I'm really hoping someone knows an easier way. After all, 
I can't be the first to use my own database name, username, and password who 
needs this tool to run.


/opt/rt4/sbin/rt-setup-fulltext-index --dba root --dba-password secret

Source: https://docs.bestpractical.com/rt/4.2.12/full_text_indexing.html

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] which scripts fire when

2016-12-07 Thread Landon Stewart
On Dec 7, 2016, at 1:17 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:
I guess that's it for now. I'd like a way to watch the different scripts do 
their thing for a single transaction, and I need to better understand how the 
different scripts decide when to fire and when to stay quiet. Thanks as always!

The debug log will do just that.  It will tell you what scrip is being skipped 
or is triggering for what ticket and transaction.

Example of a ticket being created:
[16981] [Mon Oct 17 16:03:31 2016] [debug]: About to prepare scrips for 
transaction #3644426 (/opt/rt4/sbin/../lib/RT/Transaction.pm:187)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Found 20 scrips for 
TransactionCreate stage with applicable type(s) Create for txn #3644426 on 
ticket #20035600 (/opt/rt4/sbin/../lib/RT/Scrips.pm:495)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #18 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #20 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #42 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #21 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #24 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #25 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #78 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: About to commit scrips for 
transaction #3644426 (/opt/rt4/sbin/../lib/RT/Transaction.pm:210)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Committing scrip #13 on txn 
#3644426 of ticket #20035600 (/opt/rt4/sbin/../lib/RT/Scrips.pm:306)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Committing scrip #16 on txn 
#3644426 of ticket #20035600 (/opt/rt4/sbin/../lib/RT/Scrips.pm:306)

Example of a custom field change (different ticket than above):
[16980] [Mon Oct 17 16:03:55 2016] [debug]: About to prepare scrips for 
transaction #3644476 (/opt/rt4/sbin/../lib/RT/Transaction.pm:187)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Found 8 scrips for 
TransactionCreate stage with applicable type(s) CustomField for txn #3644476 on 
ticket #20035308 (/opt/rt4/sbin/../lib/RT/Scrips.pm:495)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #21 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #24 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #25 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #31 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #32 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #74 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #78 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:353)

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] RTIR: Best way for customers to see all tickets for their employees

2016-12-05 Thread Landon Stewart
On Dec 5, 2016, at 12:21 PM, Stephen Switzer 
<st...@sbsroc.com<mailto:st...@sbsroc.com>> wrote:


Please excuse the re-post, but I've made some progress today, and I think I 
just need a tweak. I have the following code in "Custom action preparation 
code":

my $groupname='Cust-Customer1';

# Load the custom group from RT
my $groupObj = RT::Group->new($RT::SystemUser); 
$groupObj->LoadUserDefinedGroup($groupname);
return undef unless $groupObj;

#This worked
#my $admincclist = $self->TicketObj->AdminCc;
#$admincclist->AddMember($groupObj->Id);

#This doesn't work...
$self->TicketObj->AddWatcher(
  Type=>"Customer",
  PrincipalId=>$groupObj->Id
);
return 1;

Can anyone shed light on how to add a custom role member to a ticket on create? 
If I uncomment the admincclist lines, I get it added to the AdminCC field... 
but not the Customer custom role. I see no errors in the rt.log file, which is 
set to warning.

Thank you!


I'm not sure exactly why it's not working but you could check out the return 
value from $self->TicketObj->AddWatcher() and see if there's any useful 
information in there since AddWatcher() returns a tuple of (status, message).

Untested code:

my $groupname='Cust-Customer1';

# Load the custom group from RT
my $groupObj = RT::Group->new($RT::SystemUser);
   $groupObj->LoadUserDefinedGroup($groupname);
return undef unless $groupObj;

#This worked
#my $admincclist = $self->TicketObj->AdminCc;
#$admincclist->AddMember($groupObj->Id);

#This doesn't work...
my ($status, $message) = $self->TicketObj->AddWatcher(
  Type=> "Customer",
  PrincipalId => $groupObj->Id
);
RT->Logger->warning("AddWatcher Status: $status");
RT->Logger->warning("AddWatcher Message: $message");
return 1;

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] how to supply db credentials to rt-email-dashboards?

2016-12-02 Thread Landon Stewart
As far as I know the ~user/.rtrc file is good for both rt-crontool and the rt 
utility itself. I've cc'd the list in case anyone has any more info or 
corrections.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

On Nov 28, 2016, at 6:47 AM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Thank you, this works perfectly. What else is this 'rtrc' file good for, if 
anything? Or is it only for the scripts in [rtDir]/sbin to use for database 
connections?

On Fri, Nov 25, 2016 at 7:31 PM, Landon Stewart 
<lstew...@internap.com<mailto:lstew...@internap.com>> wrote:
On Nov 25, 2016, at 2:08 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi list,
I'm trying to run /opt/rt4/sbin/rt-email-dashboards, but am getting an error 
that the database credentials are not correct. They aren't, but why? If they 
get picked up from the configuration, they should be correct, since RT itself 
is running just fine. If they aren't gotten from the configuration files, where 
do they come from and how can I supply them? The tool's help text didn't list 
any DB settings as possible flags. Thanks.

In the homedir of the user that runs the rt-email-dashboards create a file 
called '.rtrc'.

That file should contain:
server 
user root
passwd 

Example:
# cat ~root/.rtrc
server http://localhost/rt
user root
passwd ohsupaihai7moR1

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com/>




--
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com<mailto:ah...@autodist.com>
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] how to supply db credentials to rt-email-dashboards?

2016-11-25 Thread Landon Stewart
On Nov 25, 2016, at 2:08 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi list,
I'm trying to run /opt/rt4/sbin/rt-email-dashboards, but am getting an error 
that the database credentials are not correct. They aren't, but why? If they 
get picked up from the configuration, they should be correct, since RT itself 
is running just fine. If they aren't gotten from the configuration files, where 
do they come from and how can I supply them? The tool's help text didn't list 
any DB settings as possible flags. Thanks.

In the homedir of the user that runs the rt-email-dashboards create a file 
called '.rtrc'.

That file should contain:
server 
user root
passwd 

Example:
# cat ~root/.rtrc
server http://localhost/rt
user root
passwd ohsupaihai7moR1

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] Timezone set to GMT?

2016-11-18 Thread Landon Stewart
On Nov 18, 2016, at 11:40 AM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi all,
I have the timezone set in SiteConfig how it came by default, and /etc/timezone 
on my server is correct. Yet, I've just noticed that times in RT are GMT, not 
Eastern like they should be. I only just noticed this, but I'm told it has been 
an ongoing problem. That means I don't know what I might have changed, or when.

Is there more to the timezone than letting RT pick it up from /etc/timezone? Do 
I need to worry about setting MySQL somehow? The file is 644, so is readable by 
everyone. Thanks.

This is probably already set in the shipped configuration in etc/RT_Config.pm 
as follows but you can override it in etc/RT_SiteConfig.pm

   $Timezone
   $Timezone is the default timezone, used to convert times entered by 
users into GMT, as they are stored in the database, and back again;
   users can override this.  It should be set to a timezone recognized 
by your server.

eg:
Set($Timezone, "US/Eastern");

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] Unable to drag files to attach them?

2016-11-08 Thread Landon Stewart
On Nov 8, 2016, at 10:39 AM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi all,
Users are complaining that they can't drag/drop files to attach them to 
tickets. I can't see the screen, so don't use a mouse, so can't test this 
first-hand. Are there browsers or other variables that are known to stop this 
functionality, or did I disable something I shouldn't have? Thanks.

I can say that I've never dragged and dropped a file onto a ticket to attach 
it.  It sounds like users might just be used to sites like imgur and the like 
who let you do this because they have scripts that make it possible and they 
expect it to be possible for RT.  They'll have to click the "Choose File" 
button while updating a ticket and actually choose the file.

With that said - On Sarfari for macOS you can drag a file to the "Choose File" 
button and it lights up while you do it but I don't know if that works on 
Windows and I don't know if it's the same in all browsers.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] Enable devel-mode on existing RT instance?

2016-11-02 Thread Landon Stewart
On Nov 2, 2016, at 10:45 AM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi all,
I'm getting an error in an overlay, but nothing is logged. I know I can use
./configure --devel-mode
to help, though whether that will show additional information for errors like 
this I'm not sure. Either way, how do I enable it on an existing installation 
of RT? Do I go back to the unpacked source and re-run the configure script, or 
is there more to it? Thanks.

Update your RT_SiteConfig.pm with the following and then restart apache:
Set($DevelMode, '1');

From https://docs.bestpractical.com/rt/4.4.1/RT_Config.html#Development-options

$DevelMode

RT comes with a "Development mode" setting. This setting, as a convenience for 
developers, turns on several of development options that you most likely don't 
want in production:

  *   Disables CSS and JS minification and concatenation. Both CSS and JS will 
be instead be served as a number of individual smaller files, unchanged from 
how they are stored on disk.
  *   Uses Module::Refresh<http://metacpan.org/module/Module::Refresh> to 
reload changed Perl modules on each request.
  *   Turns off Mason's static_source directive; this causes Mason to reload 
template files which have been modified on disk.
  *   Turns on Mason's HTML error_format; this renders compilation errors to 
the browser, along with a full stack trace. It is possible for stack traces to 
reveal sensitive information such as passwords or ticket content.
  *   Turns off caching of callbacks; this enables additional callbacks to be 
added while the server is running.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017

Re: [rt-users] Mason Cache clear

2016-10-31 Thread Landon Stewart
Hi Brian,

Check what user apache2 runs as (probably www-data but depends on what distro 
you use).  Then make sure that user can write to the 
/opt/rt4/var/mason_data/obj directory (chown -R www-data:www-data 
/opt/rt4/var/mason_data/obj).

To make sure apache2 runs as www-data (or to find out what it does run as) 
check the output of "ps aux | grep apache2".  There will be one process running 
as root but the others will run as a different user; that is the one you want.

On Oct 31, 2016, at 10:49 AM, Dunbar, Brian 
<brian.dun...@von.ca<mailto:brian.dun...@von.ca>> wrote:

I was installing RT-Extension-ActivityReports into RT 4.4.0 after the install I 
ran
rm -rf /opt/rt4/var/mason_data/obj
then service apache2 restart

Apache restarted ok but RT will not load. I found this error in syslog but not 
sure what to fix.
[40707] mkdir /opt/rt4/var/mason_data/obj/3407077840: Permission denied at 
/usr/share/perl5/HTML/Mason/Compiler/ToObject.pm line 115.#012#012Stack:#012
[/usr/share/perl/5.20/Carp.pm:166]#012  
[/usr/share/perl/5.20/File/Path.pm:156]#012
[/usr/share/perl/5.20/File/Path.pm:133]#012
[/usr/share/perl/5.20/File/Path.pm:114]#012
[/usr/share/perl5/HTML/Mason/Compiler/ToObject.pm:115]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:440]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:776]#012
[/usr/share/perl5/HTML/Mason/Request.pm:259]#012
[/usr/share/perl5/HTML/Mason/Request.pm:215]#012
[/opt/rt4/sbin/../lib/RT/Interface/Web/Request.pm:61]#012
[/usr/share/perl5/Class/Container.pm:275]#012
[/usr/share/perl5/Class/Container.pm:353]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:351]#012
[/usr/share/perl5/HTML/Mason/Interp.pm:345]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler.pm:59]#012
[/usr/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm:52]#012
[/usr/share/perl5/Plack/Util.pm:301]#012  [/usr/share/perl5/

Then I google clearing mason cache and it shows
rm -Rf /usr/local/rt4/var/mason_data/obj/*
Not usre if the asterisk at end makes difference I tried that after still no 
luck.

Anyone see what is wrong and how to fix?  Greatly appreciated.
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017

Re: [rt-users] CommandByMail config

2016-10-28 Thread Landon Stewart
Is the command you are sending on the very first line of the message?  Did you 
really send an email with both of those commands with the word Or between them 
or was that two examples?  Is there anything in the log (ie. 
/opt/rt4/var/log/rt.log) when the email correspondence is being dealt with?  If 
you restarted apache did you clear the mason cache as well?

On Oct 28, 2016, at 6:38 AM, Dunbar, Brian 
<brian.dun...@von.ca<mailto:brian.dun...@von.ca>> wrote:

Hello All,

I am trying to enable CommandByMail

I installed the plugin and patch
Added these two lines to my RT_SiteConfig.pm
Plugin('RT::Extension::CommandByMail');
Set(@MailPlugins, qw(Auth::MailFrom Action::CommandByMail));

When I send an email with

Queue: Nameofqueue
Or
Status: resolved

It does not change any status info in RT
I am using RT 4.4.0
I did bounce the apache

Anyone with ideas?
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017

Re: [rt-users] Template snippet causes template to silently fail

2016-10-26 Thread Landon Stewart
On Oct 26, 2016, at 2:29 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi all,
The way our company uses RT, there's no need to distinguish between comments 
and replies, and users may use either one without realizing the difference. In 
my new email template, I want to show whichever was set. My template works fine 
without the two if statements I'm trying to use, but as soon as I put them in, 
it fails. The odd thing is that, though the email using the template is never 
sent, I don't get any errors at all. When I was missing a dollar sign earlier, 
I got an error--an error not really related to the dollar sign, but an error. 
Now, though, I get nothing whatsoever. Here's the snippet:

{ if (my $transactionCorrespond = $Transaction->correspond) { 
$transactionCorrespond
} elsif (my $transactionComment = $Transaction->comment) { $transactionComment }
}

I don't know what's so wrong with that bit of code, but there must be 
something. I don't really speak Perl, and the only page I've found thus far 
that enumerates the Transaction object properties isn't overly helpful, so I'm 
guessing at the properties I need. Can anyone see what I've done wrong here? 
Thanks.

Since $Transaction is a thing then $Transaction->correspond is empty since it's 
not a thing.  This is why you'll get no errors.

Try this:
{
  if ($self->TransactionObj->Type eq 'Correspond') {
# something
  } elsif ($self->TransactionObj->Type eq 'Comment') {
# something else
  } else {
# Not a Comment or Correspond transaction
  }
}

Or something that actually does exactly what your pseudocode does:
{ $self->TransactionObj->Type }

I have found these very helpful in the past:
https://rt-wiki.bestpractical.com/wiki/CustomConditionSnippets

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] error when using custom template

2016-10-26 Thread Landon Stewart
Add this directly above or below the Subject line in the template but before 
the blank line.


Content-Type: text/html

On Oct 26, 2016, at 12:15 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hello list,
I'm starting to test a custom template. When RT tries to use it, I see an error 
appear in the system log:

Use of uninitialized value in substitution (s///) at 
/opt/rt4/sbin/../lib/RT/Transaction.pm line 362

That line seems to be detecting any form of new line it can, so how could my 
template possibly cause such an odd problem? This is my first stab at custom 
templates; my boss doesn't want quoted text, so he wants reply links in the 
body of notification emails that people will use in place of standard email 
replies. I've pasted the text of my template below:


Subject: {$Transaction->CreatorObj->Name} Updated Ticket {Ticket->id}

Ticket {$Ticket->id} was updated (
mailto:{$Ticket->QueueObj->CorrespondAddress}">click here to 
reply):

{$Transaction->Description}

Please do not reply to this message. Instead,
mailto:{$Ticket->QueueObj->CorrespondAddress}">click here to reply,
or
open this 
ticket on the ticket site.


--
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com<mailto:ah...@autodist.com>
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Seeing this error in the log

2016-10-25 Thread Landon Stewart
On Oct 25, 2016, at 2:17 PM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hello list,
Every so often, and seemingly randomly, I see this error in /var/log/messages 
just as the FCGI server stops working:

Oct 25 13:43:07 RTServer RT: [8137] Argument "username" isn't numeric in 
numeric ne (!=) at /opt/rt4/sbin/../lib/RT/Interface/Web.pm line 3027.

It shows up three times, at the same exact time, and that's it. The "username" 
appears to be the username of one of our users (I've replaced the actual name 
with 'username' for this email). This is the only reason RT ever goes down. If 
it weren't for this, I doubt we'd have any problems at all. Manually restarting 
the FCGI server fixes things for anywhere from one to five days before the same 
problem happens again. Has anyone seen this before? RT4.4.1 on Debian 8. Thanks.

I think it has something to do with the reminders if that helps.  The following 
if() statement is on line 3027 of that file.  I have no idea why "$args->{ 
'Reminder-Owner-' . $reminder->id }" is has a value of the username of someone 
though since "$reminder->id" should return a numerical ID of the user.  Looks 
like a bug to me.

if (
exists( $args->{ 'Reminder-Owner-' . $reminder->id } )
&& ( $reminder->Owner !=
$args->{ 'Reminder-Owner-' . $reminder->id } )
  )
{
( $status, $msg ) =
  $reminder->SetOwner(
$args->{ 'Reminder-Owner-' . $reminder->id }, "Force" );
push @subresults, $msg;
}
--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Seeing this error in the log

2016-10-25 Thread Landon Stewart
OH!  I should mention that code stanza below is taken from the rt-4.4.1.tar.gz 
since I don't have 4.4.1 installed.

On Oct 25, 2016, at 2:29 PM, Landon Stewart 
<lstew...@internap.com<mailto:lstew...@internap.com>> wrote:

I think it has something to do with the reminders if that helps.  The following 
if() statement is on line 3027 of that file.  I have no idea why "$args->{ 
'Reminder-Owner-' . $reminder->id }" is has a value of the username of someone 
though since "$reminder->id" should return a numerical ID of the user.  Looks 
like a bug to me.

if (
exists( $args->{ 'Reminder-Owner-' . $reminder->id } )
&& ( $reminder->Owner !=
$args->{ 'Reminder-Owner-' . $reminder->id } )
  )
{
( $status, $msg ) =
  $reminder->SetOwner(
$args->{ 'Reminder-Owner-' . $reminder->id }, "Force" );
push @subresults, $msg;
}
--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com/>

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] RT 4.2.9 (+ RTIR 3.2.0) Menus do not load all of a sudden this morning unless I turn $DevelMode on

2016-10-17 Thread Landon Stewart
Hello,

This morning my team could not see the ticket history on tickets.  I changed 
the $ShowHistory setting to 'always' and this fixed that particular issue.  
Then I noticed that the menus at the top of the pages were also not loading so 
I looked at the source of the page and saw a few JQuery errors.  I'm not 100% 
sure if those are relevant but when I turned $DevelMode on the issue's went 
away.

There were no changes made over the weekend.

With $DevelMode off (like it usually is) I see errors about squish-.js 
having an unexpected end of file.  I know RTIR caches these kinds of things in 
the mason_data/obj/ directory which is why I turned on $DevelMode to see if 
that fixed it.

What can I do or investigate to make things work again without $DevelMode 
turned on?  I'm not able to upgrade RT+RTIR quite yet but we plan to 
eventually.  I'd also like to delay the ticket history like it was before too 
but I suspect that these issues are related (javascript issues).

From my browser's developer console:

[cid:C0C704A7-5798-43D0-A14D-A9B693CE1756@corp.iweb.com]

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Calculating the number of emails/replies/correspondences per ticket

2016-10-04 Thread Landon Stewart
On Oct 4, 2016, at 2:09 PM, Anthony Nguyen-Duong 
<ant...@hotmail.com<mailto:ant...@hotmail.com>> wrote:

Hi Landon,

Thanks for the reply.
In your implementation, what kind of charts can you make with those CFs?

We classify our tickets by subject matter so the chart I'm seeing is basically 
grouped by three CFs.  It basically shows that X staff replies are made for 
every Y client replies broken down by each classification.   It's not perfect 
but I haven't looked into using the calculation part of the graphing yet for 
CFs.

I have implemented a "Number of Emails" CF before with a similar implementation 
as your second approach, but when charting I can only use it for grouping. So 
the table would look something like:
Number of Emails | Ticket count

 053
 189
 225
Further, wouldn't all tickets that already exist in my database have "(no 
value)" for the new CF? My understanding is that the new CF would only "kick 
in" for new tickets.
I might re-consider implementing a CF again, but something similar to your 
first approach. The second approach is definitely more efficient, but my 
supervisor has asked that I implement it in a way that it is drawing from the 
data in the database rather than incrementing a counter, which could end up 
being less reliable.

I think I would consider doing some creative joins and subqueries with the 
mysql tables to get this information instead but it will get complicated really 
quickly.  I should have mentioned that after I used the second approach I 
described I had to update all the tickets with the first approach in order to 
get everything caught up but I only have to do it once after the second 
approach was finished and working.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Calculating the number of emails/replies/correspondences per ticket

2016-10-04 Thread Landon Stewart
On Oct 4, 2016, at 10:28 AM, Anthony Nguyen-Duong 
<ant...@hotmail.com<mailto:ant...@hotmail.com>> wrote:


Hi,

I'd like to find out how to add my own calculation to charts, as opposed to the 
limited Ticket Count and various time calculations available for charts.
I'd like to add a calculation that calculates the number of 
emails/correspondences between an agent and a customer. I've tried looking 
through "lib/RT/Report/Tickets.pm" and "share/html/Search/Chart.html", but 
there's a lot of things I don't understand in there.

Now, realistically I may not have to go through the effort of adding a 
calculation for charts.
My end result is a table that has the columns: TicketId, NumberOfEmails (and 
I'll probably add some other things like Subject and whatnot). However, I'd 
prefer not to have a Custom Field for NumberOfEmails, reason being I'm not sure 
if there's a way to calculate the number of emails for all my past tickets and 
set all of them to their correct value apart from manually counting and 
inputting it. Instead, I was considering doing Callbacks or something to count 
the number of Correspondences in the Transactions table from the database and 
appending a column to a table.

We have two CFs that are populated - ClientReplies, StaffReplies and can be 
used in the charts.  I've done this twice before with two different approaches.

The first approach worked like this:
A crontab would use an action which would do this for each ticket.  It would 
cycle through all the create and correspond transactions and attribute them to 
either staff or clients then update the CF when it was done.  This meant that 
every single create,correspond transaction was processed for every ticket every 
time it ran.  It was a wasteful way to do it.

The second approach worked like this:
Two conditions were created - One that detected 'staff' correspondence and 
another to detect 'client' (non-staff) correspondence.  Depending on which 
condition was true an action to increment the appropriate CF (read the current 
CF value, add 1, delete the old CF value, record the new CF value).  The net 
effect was that the CFs were updated only when it was necessary.  This is a 
much more efficient way to do it.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Close tickets with email

2016-10-01 Thread Landon Stewart
On Sep 30, 2016, at 9:13 AM, Martin Petersson 
<mar...@uanet.se<mailto:mar...@uanet.se>> wrote:

Hello all

I've heard that I can close a ticket by sending an email, how do I do that?

It it's just closing tickets you want you could create a scrip on the queue for 
globally that looks for a condition and carries out the action to close a 
ticket.

Alternatively if you want to allow more commands (be careful if users use the 
queue(s)) you could use something like RT::Extension::CommandByMail.  I've used 
it in the past and it's quite good once people get used to using it.  You can 
limit it's use to certain groups and change the Queue, Owner, Status, Custom 
Fields, etc with it by replying to tickets with certain content at the top of 
the reply.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] REST API; the plus-character (+) will be not processed; plain email

2016-09-20 Thread Landon Stewart
On Sep 20, 2016, at 9:41 AM, mdroe...@gmx.de<mailto:mdroe...@gmx.de> wrote:

Dear Request Tracker users,

while we working with special characters, we noticed that the plus-character 
will be not processed by the REST-API, when a new ticket is created.
All other special characters will be processed.

Here a simple content:
content=
id: ticket/new
Subject: Test '\+'
Queue: General

You should urlencode that text:

$ perl -e 'use URL::Encode qw/url_encode_utf8/; print url_encode_utf8("Test 
+");'
Test+%2B

The + here is the space, the %2B is the plus sign from the string.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Ubuntu 16.04.1 LTS

2016-09-12 Thread Landon Stewart
On Sep 12, 2016, at 2:51 PM, Pavneet Arora 
> wrote:

This is the error that I am getting on the command line.  If anyone has any 
insights, I would be most grateful before I dive into the switch to mod_fcgid 
with apache2 tonight:

#  /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300
STDIN is not a socket, and no --listen, --socket, or --port provided

Can you paste the full apache config for this site?  What does the apache error 
log say for this site?
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Apt source for RT dependencies?

2016-09-12 Thread Landon Stewart

On Sep 12, 2016, at 12:39 PM, Alex Hall 
> wrote:

When I issue the command you suggested:
Can't open perl script: no such file or directory
Something seems very off about the Perl installation on this server, given that 
all the dependencies it can't get seem to be the Perl ones.

What is installed related to perl?

dpkg -l | grep perl

Try that on a system that worked and the system that doesn't work and see if 
there's any obvious differences.
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Moving Tickets in Bulk

2016-09-12 Thread Landon Stewart
I would personally avoid editing the database manually.  Instead I would simply 
stop new mail from coming in from users/staff and disable the Scrip that would 
send the notification until the import is done.

On Sep 12, 2016, at 9:08 AM, Tim Gustafson  wrote:
> 
> We just finished importing around 50,000 tickets from one RT instance
> into another instance with its own large collection of tickets.  The
> rt-importer script put them into new queues (which we expected) rather
> than the ones we had already created in the destination system for the
> cut-over.  I went in to start moving tickets from the imported queues
> into the correct ones, and noticed that it's kinda slow, and it's
> sending notification e-mails (via scrips) for each move.
> 
> What's the safest way to move tickets from one queue to another in
> bulk without sending notification e-mails?  Is it safe to just do:
> 
> update Tickets set queue = 1234 where queue = 4321
> 
> in Postgres?  I don't care so much if the ticket's transaction history
> doesn't show the move.
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Apt source for RT dependencies?

2016-09-12 Thread Landon Stewart

> On Sep 12, 2016, at 12:32 PM, Landon Stewart <lstew...@internap.com> wrote:
> 
> I would not use the repo version even without familiarity with Linux - it 
> would make things actually more difficult later.  I would follow the 
> instructions exactly as they are written by BestPractical from the .tar.gz on 
> their site.  One thing you can do to make life a little easier before doing 
> that however is to install the CPAN bundle with perl.

All on one line:
PERL_MM_USE_DEFAULT=1 perl -MCPAN 'install CPAN::Bundle'

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Apt source for RT dependencies?

2016-09-12 Thread Landon Stewart
I would not use the repo version even without familiarity with Linux - it would 
make things actually more difficult later.  I would follow the instructions 
exactly as they are written by BestPractical from the .tar.gz on their site.  
One thing you can do to make life a little easier before doing that however is 
to install the CPAN bundle with perl.

On Sep 12, 2016, at 12:29 PM, Alex Hall 
> wrote:

Hey all,
Our virtual server host isn't too familiar with Linux. We have a Debian server, 
finally, but when I try to apt-get install request-tracker4, I get a bunch of 
errors about not being able to install dependencies. I'm using the sources the 
original install came with. What source(s) do I need to include to let Debian 
access the necessary dependencies for RT? Thanks.

--
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] import tickets from csv file

2016-09-09 Thread Landon Stewart
What kind of columns does the CSV have?  May it's possible to simply convert 
each record in the CSV to an email and use rt-mailgate?

On Sep 9, 2016, at 10:28 AM, Dunbar, Brian 
<brian.dun...@von.ca<mailto:brian.dun...@von.ca>> wrote:

Hello All,

I have a new 4.4 install of RT and I would like to import tickets from another 
ticket system (Spiceworks). I can get the ticket info in a csv file to import 
but I have not found a script that works to populate RT with the info. I found 
a script by Alister West (https://alisterwest.com/code/perl-rt-import-tickets) 
but it did not work and it was made for RT4.0 I do not know perl enough to 
write my own script. So hopefully there is something out there that works and 
can be shared.

Regards
Brian

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] import tickets from csv file

2016-09-09 Thread Landon Stewart
If you formulate the email with the "From:" as the requestor it would set it 
accordingly in the ticket.  If RT is set to produce auto-replies though they'd 
get that auto-reply.

On Sep 9, 2016, at 11:51 AM, Dunbar, Brian 
<brian.dun...@von.ca<mailto:brian.dun...@von.ca>> wrote:

I can format the csv anyway as  desired but importing as email will make me the 
requester for every ticket?


From: Landon Stewart [mailto:lstew...@internap.com]
Sent: Friday, September 9, 2016 2:38 PM
To: Dunbar, Brian
Cc: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>
Subject: Re: [rt-users] import tickets from csv file

What kind of columns does the CSV have?  May it's possible to simply convert 
each record in the CSV to an email and use rt-mailgate?

On Sep 9, 2016, at 10:28 AM, Dunbar, Brian 
<brian.dun...@von.ca<mailto:brian.dun...@von.ca>> wrote:

Hello All,

I have a new 4.4 install of RT and I would like to import tickets from another 
ticket system (Spiceworks). I can get the ticket info in a csv file to import 
but I have not found a script that works to populate RT with the info. I found 
a script by Alister West (https://alisterwest.com/code/perl-rt-import-tickets) 
but it did not work and it was made for RT4.0 I do not know perl enough to 
write my own script. So hopefully there is something out there that works and 
can be shared.

Regards
Brian

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com/>

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] FW: Query for custom fields using 'NOT LIKE' is no longer working

2016-09-07 Thread Landon Stewart
On Sep 7, 2016, at 2:57 PM, Keith Creasy 
<kcre...@aph.org<mailto:kcre...@aph.org>> wrote:

Apologies. I keep forgetting that replies to this list go to the sender and not 
to the list…


From: Keith Creasy
Sent: Wednesday, September 7, 2016 5:55 PM
To: 'Hien Ly' <hien.thai...@gmail.com<mailto:hien.thai...@gmail.com>>
Subject: RE: [rt-users] Query for custom fields using 'NOT LIKE' is no longer 
working

Hi. I think I now know the problem but haven’t confirmed it yet.

We just created a new queue for requests submitted by beta testors. It’s sort 
of an approval queue though we are not using the built-in __approval queue, 
it’s just a regular queue. A “Type” custom field was created in it with 
different values from the existing Type field. I suspect that RT is matching 
the first field with the name CF.{Type} it finds. The reason is that if you use 
the field id CF.{11} it works.

CF.{11} NOT LIKE ‘Epic’

If this is a solution I’ll let you know but it is equally strange that “LIKE” 
works while “NOT LIKE” does not.

Is this a bug in RT?

I try to apply a single CF to multiple queues if it has the same name so it is 
treated the same.  Apart from that though - do you need to use LIKE?  Can you 
use != instead?  eg. CF.{cfname} != 'EPIC'.  I wonder if you have the same 
problem using != instead but yeah it does sound like a bug to me.  I did notice 
that you had strange quotations again though but I trust you are just using 
regular single quotes in actuality.

CF.{11} NOT LIKE ‘Epic’

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Emails causing duplicate tickets?

2016-09-07 Thread Landon Stewart
On Sep 7, 2016, at 10:13 AM, Alex Hall 
<ah...@autodist.com<mailto:ah...@autodist.com>> wrote:

Hi all,
I just ran into a very odd problem. I opened a ticket via email, which worked. 
But I then saw three more tickets open from that same email, each at the next 
mail polling. I haven't seen this problem before, and I don't know where to 
look to tell RT what to do with fetched emails. As I said, I only just started 
seeing this, which means I must have changed something. All I did was add a few 
more queues to my fetchmailrc file, though. Are there fetchmail options I 
should add, or is this an RT setting? If the latter, is it in the web UI or 
somewhere in a configuration file? Thanks for any help.

Is fetchmail being told to delete mail from the mailbox after it has been 
fetched?  Deleting mail from the mailbox is the default behaviour AFAIK.  In 
any event, with or without deleting mail after it is fetched you'll probably 
want to use the 'uidl' keyword in your configuration to keep track of what 
messages are considered new on your side of things instead of relying on the 
server to decide what's new and what's not.

From 'man 1 fetchmailrc':

   -U | --uidl
  (Keyword: uidl)
  Force UIDL use (effective only with POP3).  Force client-side 
tracking of 'newness' of messages (UIDL stands for "unique ID listing"
  and  is  described  in RFC1939).  Use with 'keep' to use a 
mailbox as a baby news drop for a group of users. The fact that seen mes‐
  sages are skipped is logged, unless error logging is done through 
syslog while running in daemon  mode.   Note  that  fetchmail  may
  automatically  enable  this  option depending on upstream server 
capabilities.  Note also that this option may be removed and forced
  enabled in a future fetchmail version. See also: --idfile.

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Query for custom fields using 'NOT LIKE' is no longer working

2016-09-07 Thread Landon Stewart
On Sep 7, 2016, at 5:01 AM, Keith Creasy 
<kcre...@aph.org<mailto:kcre...@aph.org>> wrote:

Hi everyone.

We are using RT 4.2.7. I think this used to work but now it isn’t. In a query 
like this:

Queue = 'Nimas' AND Priority > 49 AND (  Status = 'new' OR Status = 'open' OR 
Status = 'development' ) AND Due > 0 AND CF.{Type} NOT LIKE ‘Epic’

The “NOT LIKE” operator doesn’t work. I’ve tried it using the Query Builder and 
using Advanced. The “LIKE” operator does work. Does anyone have an idea for 
solving this?


I'm not sure if this means anything but on my screen the single quotes around 
the word Epic are different than the other words that have single quotes.

'development'
vs
‘Epic’

[cid:B1747A7F-2B3B-409D-9B0F-63C79811C7FC@telus]

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] How to backup/dump Postgre SQL

2016-08-05 Thread Landon Stewart
eg:
# su postgres
$ pg_dump rtdb -> /tmp/rtdb-backup

OOPS
# su postgres
$ pg_dump rtdb > /tmp/rtdb-backup

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] How to backup/dump Postgre SQL

2016-08-05 Thread Landon Stewart
On Aug 5, 2016, at 4:05 AM, Martin Petersson 
<mar...@uanet.se<mailto:mar...@uanet.se>> wrote:

Hello,

I need to backup or dump the database to a .bak file, it´s Request Tracker 
4.0.7.
Frits i tried this:
root@rt:~# pg_dump rtdb > rtdb-backup
pg_dump: [archove (db)] connection against database "rtdb" failed: FATAL:  role 
"root" does not exist

Then i tried:
root@rt:~# su postgres
postgres@rt:/root$ pg_dump rtdb > rtdb-backup
bash: rtdb-backup: Access denied

What do i have to do to create a backup of the database?

Use 'su - postgres' instead to become postgres instead of just get the 
permissions of postgres.  If that doesn't work because it doesn't have a shell 
try sudo but ultimately you need to be in a place you can write to while having 
the permissions of postgres or specify the location in the redirect.

eg:
# su postgres
$ pg_dump rtdb -> /tmp/rtdb-backup

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Recover original scripts in RT

2016-07-18 Thread Landon Stewart
On Jul 15, 2016, at 10:32 AM, yugi 
<uriboxmob...@gmail.com<mailto:uriboxmob...@gmail.com>> wrote:

Hi
I have one RT that is in production, that had suffer some deletes on the 
scripts that do the send of the emails …

I tried to create new ones to do RT send emails in CC and BCC again but without 
success.

It sounds like you just need to recreate the global Scrip that does this:

[cid:83379900-285D-4257-B334-5A7854A16D06@corp.iweb.com]

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Please help with RT::Authen::ExternalAuth with nested LDAP/AD groups

2016-07-15 Thread Landon Stewart
On Jul 15, 2016, at 11:03 AM, Nilesh 
<m...@nileshgr.com<mailto:m...@nileshgr.com>> wrote:

Your setup looks perfectly fine, but I may be missing something because I
haven't used AD. I use OpenLDAP with rt-ldapimport script for authentication and
rt-ldapimport --no-users --import to sync users (enabled Group member syncing in
the importer). Works good. May be give that a try?

I guess my next step would be figuring out how to sync the groups so that our 
RTIR_WEB_SC_ACCESS group users would be within the "DutyTeam" group in RTIR.  I 
believe you are right in that rt-ldapimport would help with that I think but it 
looks like a nightmare to set up.  I'll burn that barn down when I come to it I 
guess.

I think my issues with authentication lay within the following part of the 
configuration.  I'm not sure what the group* configuration variables are for 
exactly because they are loosely documented and there are I've found very few 
examples via google and (almost?) none related to nested groups.

'base' => 'OU=iweb,DC=corp,DC=iweb,DC=com',
'filter' => '(objectClass=*)',
'd_filter' => 'UserAccountControl:1.2.840.113556.1.4.803:=2',
'group' => 'RTIR_WEB_SC_ACCESS',
'group_scope' => 'sub',
'group_attr' => 
'memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS',
'group_attr_value' => 'OU=Groupes,OU=iWeb,DC=corp,DC=iweb,DC=com',

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Recover original scripts in RT

2016-07-15 Thread Landon Stewart

On Jul 15, 2016, at 10:41 AM, yugi 
<uriboxmob...@gmail.com<mailto:uriboxmob...@gmail.com>> wrote:

That one i tried already



Are the emails that are not being CC'd or BCC'd coming into RT via email or are 
they being composed and sent from the RT interface?

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com<mailto:lstew...@internap.com>
 www.internap.com<http://www.internap.com>

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Please help with RT::Authen::ExternalAuth with nested LDAP/AD groups

2016-07-14 Thread Landon Stewart
Hello,

I have a working mod_authnz_ldap configuration for apache 2.4 (on a virtualhost 
on the same server) but I cannot seem to convert the configuration to a valid 
RT::Authen::ExternalAuth::LDAP configuration.  At one point I could see in 
var/log/rt.log that it was at least checking the nested groups for membership 
but the filter didn't look quite right.  I have since changed that 
configuration and it seems to stall for a minute and then fail.  It gets my 
real name from the AD service but then cannot match the sub/nested group filter 
I think?

The apache configuration that works is:

LogLevel debug
AuthName "Password protected. Enter your AD username and password."
AuthType Basic
AuthBasicProvider ldap
AuthLDAPURL 
"ldap://ldap.server.hostname/OU=iweb,DC=corp,DC=iweb,DC=com?sAMAccountName?sub?(objectClass=*)"
AuthLDAPGroupAttribute member
AuthLDAPGroupAttributeIsDN on
AuthLDAPBindDN "ldapbinduserstring"
AuthLDAPBindPassword ldapbindpass
Require ldap-filter 
memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS,OU=Groupes,OU=iWeb,DC=corp,DC=iweb,DC=com



So far I've got this in RT_SiteConfig.pm for RT:
...snipped...
Set($ExternalSettings, {
'My_LDAP' => {
'type' => 'ldap',
'server' => 'corp.iweb.com<http://corp.iweb.com>',
'user' => 'ldapbinduserstring',
'pass' => 'ldapbindpass',
'base' => 'OU=iweb,DC=corp,DC=iweb,DC=com',
'filter' => '(objectClass=*)',
'd_filter' => 'UserAccountControl:1.2.840.113556.1.4.803:=2',
'group' => 'RTIR_WEB_SC_ACCESS',
'group_scope' => 'sub',
'group_attr' => 
'memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS',
'group_attr_value' => 'OU=Groupes,OU=iWeb,DC=corp,DC=iweb,DC=com',
'tls' => 0,
'attr_match_list' => [
'Name',
'EmailAddress',
],
'attr_map' => {
'Name' => 'sAMAccountName',
'EmailAddress' => 'mail',
'Organization' => 'physicalDeliveryOfficeName',
'RealName' => 'cn',
'ExternalAuthId' => 'sAMAccountName',
'Gecos' => 'sAMAccountName',
},
},
} );
...snipped...
Plugin('RT::IR', 'RT::Authen::ExternalAuth');

The log entries with the above configuration are:
[28280] [Thu Jul 14 19:12:14 2016] [debug]: Attempting to use external auth 
service: My_LDAP 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:424)
[28280] [Thu Jul 14 19:12:14 2016] [debug]: Calling UserExists with $username 
(lstewart) and $service (My_LDAP) 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:465)
[28280] [Thu Jul 14 19:12:14 2016] [debug]: UserExists params:
username: lstewart , service: My_LDAP 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:439)
[28280] [Thu Jul 14 19:12:14 2016] [debug]: LDAP Search ===  Base: 
OU=iweb,DC=corp,DC=iweb,DC=com == Filter: 
(&(objectClass=*)(sAMAccountName=lstewart)) == Attrs: 
sAMAccountName,physicalDeliveryOfficeName,mail,cn,sAMAccountName,sAMAccountName 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:469)
[28280] [Thu Jul 14 19:12:14 2016] [debug]: Password validation required for 
service - Executing... 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:517)
[28280] [Thu Jul 14 19:12:14 2016] [debug]: Trying external auth service: 
My_LDAP 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:153)
[28280] [Thu Jul 14 19:14:14 2016] [debug]: LDAP Search ===  Base: 
OU=iweb,DC=corp,DC=iweb,DC=com == Filter: 
(&(sAMAccountName=lstewart)(objectClass=*)) == Attrs: 
dn,OU=Groupes,OU=iWeb,DC=corp,DC=iweb,DC=com 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:186)
[28280] [Thu Jul 14 19:14:14 2016] [debug]: Found LDAP DN: CN=Landon 
Stewart,OU=Utilisateurs,OU=iWeb,DC=corp,DC=iweb,DC=com 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:220)
[28280] [Thu Jul 14 19:14:15 2016] [debug]: Attribute 
'OU=Groupes,OU=iWeb,DC=corp,DC=iweb,DC=com' has no value; falling back to 
'CN=Landon Stewart,OU=Utilisateurs,OU=iWeb,DC=corp,DC=iweb,DC=com' 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:249)
[28280] [Thu Jul 14 19:14:15 2016] [debug]: LDAP Search ===  Base: 
RTIR_WEB_SC_ACCESS == Scope: sub == Filter: 
(memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS=CN=Landon 
Stewart,OU=Utilisateurs,OU=iWeb,DC=corp,DC=iweb,DC=com) == Attrs: dn 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:256)
[28280] [Thu Jul 14 19:14:15 2016] [critical]: Search for 
(memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS=CN=Landon 
Stewart,OU=Utilisa

Re: [rt-users] RT 4.2.12 and CentOS 7

2015-09-02 Thread Landon Stewart
On Sep 2, 2015, at 10:23 AM, Tom Misilo 
<misi...@fit.edu<mailto:misi...@fit.edu>> wrote:

Hi,

I was wondering if anyone has successfully used “make fixdeps” with Request 
Tracker on CentOS 7? As it seems like cpan only installs to the local users 
home directory in a ~/perl5 folder and not systemwide. Which when using Request 
Tracker and mod_fcgid  apache does not find any of the modules.

Are you running 'make fixdeps' as root privileges?



Landon Stewart : lstew...@iweb.com<mailto:lstew...@iweb.com>
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



Re: [rt-users] ExtractCustomFields for Ticket values

2015-09-01 Thread Landon Stewart
Just an FYI, it might simplify things in the future if you access things as 
directly as possible.  Some prefer to do this, some don't I guess.

For Example - instead of:
my $ticket = $self->TicketObj; $ticket->SetOwner($value)

You might do:
$self->TicketObj->SetOwner($value)

Or even:
$self->TicketObj->SetOwner(
$self->TransactionObj->Attachments->First->GetHeader('X-NEW-RT-OWNER')
);


On Sep 1, 2015, at 1:17 PM, Josh Coombs 
> wrote:

Solved my own issue, I was mis-reading the error.  Final solution for the 
postcmd: my $ticket = $self->TicketObj; $ticket->SetOwner($value)|

Josh C

On Tue, Sep 1, 2015 at 2:46 PM, Josh Coombs 
> wrote:
I'm working on switching from individual per Queue custom scrips in Perl to 
using ExtractCustomFields for populating ticket data on creation via incoming 
email.  So far I've gotten the basics working, but I'm running into a brick 
wall changing the ticket owner.

What we had as a scrip, pruned down to just setting the owner:

my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;
my $Attachment = $Transaction->Attachments;
my $AttFirst = $Attachment->First;

my $NewRTOwner = $AttFirst->GetHeader('X-NEW-RT-OWNER');

$Ticket->SetOwner($NewRTOwner);

With ExtractCustomFields I've setup the standard scrip with the following 
template:

|X-NEW-RT-OWNER|.*|$RT::Ticket->SetOwner($value)|

With debug logging lit, the post command is failing saying method SetOwner 
can't be called on an undefined value.  I can see that $value is getting 
correct set from the debug leading up to that failure, so I suspect this is a 
scope error on my part?

Any guidance would be greatly appreciated.

Josh C




Re: [rt-users] single queue for multiple customers

2015-08-05 Thread Landon Stewart
In my opinion this would best be done with Constituencies but using a plugin 
for RT called RTIR.

https://www.bestpractical.com/docs/rtir/3.2.0/Constituencies.html

On Aug 4, 2015, at 11:54 PM, Asanka Gunasekera asanka_gunasek...@yahoo.co.uk 
wrote:
 
 Hi All, hope some one can give me some insight to below or refer to a UTL
 
 Currently I am using RT as below (must be the must be the simplest way of 
 using).
 
 1. I have created a queue per each customer
 2. and Create, admincc etc the customer and some internal supervisors
 3. Each queue has its own reply address and comment address (both using the 
 same address)
 
 Above set-up works fine, till my technical directer started saying otherwise 
 :) below is what he wants me to go about looking.
 
 How can I have have signal queue for multiple customer and retain the same 
 level of access rights that I have with the current configuration.
 
 Appreciate any help that you can provide
 
 Best Regards
 
 Asanka



Re: [rt-users] Configuring fetchmail to poll emails to respective queues.

2015-06-02 Thread Landon Stewart
 On Jun 2, 2015, at 9:12 AM, Rohit Gupta rohit.gu...@syncoms.co.uk wrote:
 
 Dear All,
 I have configured new queue with ‘IT Support’ and configured want that any 
 emails coming to ithelpd...@syncoms.co.uk mailto:ithelpd...@syncoms.co.uk 
 should be fetched into this new queue. The snapshot of the new queue:
 
 image001.png
 So far, everything is running fine and emails are been received in the 
 ‘general’ queue. Now what do I need to do in order to configure rt such that 
 any emails coming to ithelpd...@syncoms.co.uk 
 mailto:ithelpd...@syncoms.co.uk comes in IT Support queue. As per few blogs 
 they are saying to add in /etc/aliases . can you please suggest as what do I 
 need to do – if I have to enter into the /etc/aliases then how my 
 configuration will look like?
  At the moment, /etc/aliases is:
 image002.png
  And /etc/fetchmailrc:
  image003.png
 Also, I have tried changing the –queue general to –queue ‘it support’ but it 
 didn’t work. Infact this time the requestor is receiving a mailer demon error 
 message.
 Please suggest. Thanks

Hi Rohit,

Since you are using fetchmail to get the mail and deliver it you do not need to 
modify your aliases.

Your —queue option is incorrect in your fetchmail configuration.  Use the name 
of the queue here.  Since it has spaces you'll have to use quotation marks.

…./rt-mailgate —queue IT Support —action correspond …etc...

Also -
Set your comment address to something else like 
(ithelpdesk-comme...@syncoms.co.uk mailto:ithelpdesk-comme...@syncoms.co.uk). 
 Setup another POP3 mailbox for that address.  Add that configuration to 
fetchmailrc but instead of using correspond for the action use comment.

If the sender gets an email back instead of the email being created in the 
queue make sure you find out what it's saying back to them.  Also make sure you 
check:
- the fetchmail output (try running fetchmail manually in the foreground with 
verbose output)
- the RT log (usually /opt/rt4/var/log/rt.log)

Since this is a newly created queue it could be that everyone simply doesn't 
have permission to create tickets in the new queue.  Hard to say without more 
information.


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Configuring fetchmail to poll emails to respective queues.

2015-06-02 Thread Landon Stewart
 Your —queue option is incorrect in your fetchmail configuration.  Use the 
 name of the queue here.  Since it has spaces you'll have to use quotation 
 marks.

Oops, I should have mentioned you'll need to use single quotes instead of 
double quotes for the queue name since you are enclosing the whole command in 
double quotes.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] mail solutions

2015-05-26 Thread Landon Stewart

 On May 26, 2015, at 11:18 AM, Terry O'Leary tole...@wth.com wrote:
 
 We have 14 different queues so using fetchmail to manage the email accounts 
 is useful for us. But that is where the problem lies as well I think. 
 Fetchmail doesn’t seem to be deleting the email from the inbox consistently. 
 Sometimes it works and sometimes it doesn’t. I have gone the route of working 
 with the Network Engineering team to see if there were any configuration 
 changes or updates to exchange that may have done but came up with nothing. 
 The emails get to their respective inboxes, then fetchmail (I have running in 
 a crontab every minute) executes to pick up and send any emails to RT 
 mailgate.:
 
 Here is an example:
 
 poll imap.corp.test.com http://imap.corp.test.com/ proto IMAP and port 143:
 
 # Team Queue
 username team  password 123456 mda 
 /opt/rt4/bin/rt-mailgate --url http://test http://test/ --queue 'Team 
 Requests' --action correspond
 username team-comments password 123456 mda /opt/rt4/bin/rt-mailgate --url 
 http://test http://test/ --queue 'Team Requests' --action comment
 
 I know this isn’t a fetchmail forum, but any input would be gladly taken.

Just in case you are - I wouldn't cron it since you'll get duplicate processes 
checking the mailbox at the same time which would account for duplicates.  If 
you have to cron it though use flock to make sure more than one is never 
running at the same time:

/usr/bin/flock -n /tmp/fetchmail.lockfile /path/to/fetchmail -blahblahblah

I'm assuming you start fetchmail as a daemon instead of cron'd though.  If you 
are running fetchmail as a daemon make sure you use --uidl when starting the 
daemon in the /etc/init.d (or equivalent) something like this:

/usr/bin/fetchmail --uidl -f /etc/fetchmail.conf

-U | --uidl

   (Keyword: uidl)
   Force UIDL use (effective only with POP3).  Force client-side tracking 
of  'newness'  of  messages
   (UIDL  stands  for  unique  ID  listing  and is described in RFC1939). 
 Use with 'keep' to use a
   mailbox as a baby news drop for a group of users. The fact  that  seen  
messages  are  skipped  is
   logged,  unless  error  logging  is  done  through syslog while running 
in daemon mode.  Note that
   fetchmail may automatically enable this option depending on upstream  
server  capabilities.   Note
   also  that  this option may be removed and forced enabled in a future 
fetchmail version. See also:
   —idfile.


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Is setting up RT to create tickets via Gmail possible?

2015-05-15 Thread Landon Stewart
On May 15, 2015, at 1:52 PM, hydn hyd...@gmail.com wrote:
 ... However, when a reply is posted via email, how can the reply email be 
 retrieved and posted back to RT?

The email should be From an email address that pipes directly to rt-mailgate. 
 However you do that is up to you but that's generally how it's done.  If you 
want to use an external POP3 account you can use fetchmail or getmail to 
download the mail and pipe each message to rt-mailgate but all mail to the From 
address needs to pipe to rt-mailgate somehow so that all replies are fed to RT.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Cannot Login to RT

2015-04-17 Thread Landon Stewart
Hi Lorraine,

Before anyone can provide any useful answer to this I think we'd need more 
details from you.  Where did you look for the log files before giving up on 
finding them?  Did you check the RT_SiteConfig.pm file to see where logging is 
supposed to be going and then check there?  Did you check in /var/log/* or?  
Usually the log for RT can be found in /opt/rt4/var/log/rt.log but your 
installation might be different.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

 On Apr 17, 2015, at 6:36 AM, Lorraine Johnson rrainey...@gmail.com wrote:
 
 Hello,
 
 I try logging into my RT and I get this error
 
   An internal RT error has occurred. Your administrator can find more 
 details in RT's log files.
 
 I seem not to find the RT log files. Please help



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] User Authentication

2015-04-16 Thread Landon Stewart
On Apr 16, 2015, at 1:28 PM, Jeremy Wilson jwil...@androsna.com wrote:
 
 Hello,
 I am running RT 4.2.9 on centos release 6.6 (final).  I have tried many, many 
 times to get RT::Authen::ExternalAuth to work and I am unsuccessful.  Active 
 directory 2008 R2.  I have looked at almost every web page I can find on the 
 subject, and have tried multiple configurations.  I have made it to the point 
 of giving up on the extension, and just having a separate username and 
 password.  I want all users except myself and one other to be unprivileged, 
 which I have already setup permissions for unprivileged users to create and 
 comment on their tickets.  I was disappointed to learn that RT does not have 
 a self-registration page, or a bulk input for users.
 
 What I would like to do is, create CVS file with username and password, then 
 import into mysql database.  Can anyone point me in the direction of know 
 what tables and fields need to be populated to create a user in mysql that 
 the user will use to log into web interface of RT?
 
 We will not be utilizing the mail function and it is not an option.

Why not just create users using the bin/rt utility?

Example:
/opt/rt4/bin/rt create -t users add Name=userName 
EmailAddress=em...@address.com Password=password

More information can be found here:
http://requesttracker.wikia.com/wiki/CLI 
http://requesttracker.wikia.com/wiki/CLI

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] User Authentication

2015-04-16 Thread Landon Stewart
On Apr 16, 2015, at 3:05 PM, Jeremy Wilson jwil...@androsna.com wrote:
 
 Yep, completely missed that.  Looks like I could use the command tool to 
 accomplish what I need.   Thank you.
 

You're welcome.  I should mention that at one place I worked at there was no 
way to let RT authenticate against an LDAP servce so instead I used perl to 
grab user data from the LDAP service to generate a diff.  The perl script 
used the bin/rt utility to add or remove users depending on what the diff said. 
 If there were no new or deleted users in the diff output then there was 
nothing to do.  Just an idea that might help...

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] RT::Extension::Announce post install question

2015-04-08 Thread Landon Stewart
I could be wrong but it looks like it adds a queue called RTAnnounce and then 
a Custom Field for that queue called 'Announcement Groups'.

Does this mysql query return an record from the Queues table?

SELECT * FROM Queues WHERE Name = 'RTAnnounce';

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

 On Apr 8, 2015, at 11:48 AM, Karres, Dean kar...@illinois.edu wrote:
 
 Good idea!.  I did that, the Makefile lines are interesting but obscure.  
 After running the initdb I saw no obvious changes to the DB structure.  I 
 suspect that I’d have to know exactly what changes it was likely to make… 
 again obscure
 
 
 
 From: Landon Stewart [mailto:lstew...@iweb.com]
 Sent: Wednesday, April 08, 2015 1:20 PM
 To: Karres, Dean
 Cc: rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] RT::Extension::Announce post install question
 
 On Apr 8, 2015, at 8:36 AM, Karres, Dean kar...@illinois.edu 
 mailto:kar...@illinois.edu wrote:
 
 Hi,
 
 I am running RT 4.2.10.  I just used cpan to install RT::Extension::Announce 
 and I looked at the resulting install messages.  I see the line where is says 
 to run “make initdb” but can’t tell if the CPAN make did that or if I still 
 need to.  I see in the docs that running the initdb step more than once can 
 be a bad thing.  How can I tell if initdb has already been run?
 
 I would check the Makefile to see what initdb actually does and then check 
 the database to see if it was done.
 
 Landon Stewart : lstew...@iweb.com mailto:lstew...@iweb.com
 Lead Specialist, Abuse and Security Management
 Spécialiste principal, gestion des abus et sécurité
 http://iweb.com http://iweb.com/ : +1 (888) 909-4932
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] RT::Extension::Announce post install question

2015-04-08 Thread Landon Stewart
On Apr 8, 2015, at 8:36 AM, Karres, Dean kar...@illinois.edu wrote:
 
 Hi,
 
 I am running RT 4.2.10.  I just used cpan to install RT::Extension::Announce 
 and I looked at the resulting install messages.  I see the line where is says 
 to run “make initdb” but can’t tell if the CPAN make did that or if I still 
 need to.  I see in the docs that running the initdb step more than once can 
 be a bad thing.  How can I tell if initdb has already been run?

I would check the Makefile to see what initdb actually does and then check the 
database to see if it was done.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] web request from custom scrip

2015-04-02 Thread Landon Stewart
 
 On Apr 2, 2015, at 11:03 AM, Hugo Escobar hesco...@afslc.com wrote:
 
 Hi,
 
 I'm trying to write a scrip that sends a web request to an external server
 and depending on the answer set a specific priority level
 
 So far the web request goes out and the priority can be set. The only
 missing part is that I can't get a hold of the external web server response.
 

Hi Hugo,

Firstly - Does https://extwebserv/ have a real certificate?

Try the following instead.  I haven't tested it but basically it tries the URL 
and sets the priority if it was successful.  It also logs the response message 
(a short human readable single line string that explains the response code) 
regardless of what it was.  It returns whatever $status is (if it's set then 
it'll be non-zero).

use LWP::UserAgent;

my $url = 'https://extwebserv/'.somePieceOfData;
RT::Logger-info(Ticket .$self-TicketObj-id. Checking .$url);
my $ua = LWP::UserAgent-new;
my $response = $ua-get($url);
my ($status, $msg);  # Set these up as empty for now
($status, $msg) =  $self-TicketObj-SetPriority('100') if 
$response-is_success;
RT::Logger-info(Ticket .$self-TicketObj-id. .$response-message);
return $status;


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] need to run code when user presses a button

2015-03-26 Thread Landon Stewart
On Mar 26, 2015, at 11:52 AM, Al Joslin allen.jos...@gmail.com wrote:
 
 I would like to have a button on the display page of a ticket that when 
 clicked runs some code (*) which then causes the display page to refresh
 
 I have the code (*) written which queries a remote database and updates an rt 
 ticket based on what it finds
   - this is all perl code, using DBI to connect the external db
 
 I don’t care if the code is stored in RT or not
 
 How can I do this?
 
 I can create a button on the Ticket display page which submits a form to an 
 url, perhaps I should return the result as a redirect back to the Ticket 
 display page ?

Hi Al,

There is probably a way to hack this into the RT pages but the way I'd probably 
do it is build a separate webpage on a different virtualhost that will do what 
you want (very simple page with the button) and the necessary headers to 
redirect to the referrer.  Then I'd use a custom field to show that page 
(custom fields can show data *or* actual webpage content).  When I click the 
button within the custom field that's displaying this other page it would go to 
that page, do what it's supposed to do and then redirect back to the referrer 
(the display page in RT).  Be sure to protect the page on the virtualhost 
somehow so it's not available to someone who should not see/use it.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Custom Fields

2015-03-24 Thread Landon Stewart
On Mar 24, 2015, at 2:10 PM, Bryon Baker bba...@copesan.com wrote:
 
 Sorry I did not explain this very well.
 
 The area I would like to use the custom field in is the Calculate section of 
 the graphing tool.
 
 Also I am using version 4.2.3

A!  Well ya got me there.  I don't know.  I checked mine (4.2.9) and it's 
not available, only date fields that you are probably already seeing listed as 
well.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Custom Fields

2015-03-24 Thread Landon Stewart
On Mar 24, 2015, at 11:49 AM, Bryon Baker bba...@copesan.com wrote:
 
 Hello all
 Can custom fields be used in graphs?  If so can someone point me in the 
 direction of some article explaining how?

Yes.  Before version 4.2 you perform a search and make sure to select the 
Queue as part of the query so the queue specific CFs are loaded.  Once that 
is done you click Chart on the upper right.  You can then use the dropdown 
for Show chart grouped by to select any field including custom fields.

In 4.2 however you can graph by multiple custom fields at once.

Example:


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


[rt-users] Is there a way to include attachments from $Tickets{TOP} when using RT::Action::CreateTickets ?

2015-03-24 Thread Landon Stewart
Hello,

I'm using RT::Action::CreateTickets to create a ticket with the contents of a 
template.  In the template I'm using 
{$Tickets{TOP}-Transactions-First-Content} in the 'Content:' of the 
ticket which is working.

Is there a way to include all attachments that might be present on that 
transaction as well?  I've found the example code for including ticket history 
in another ticket but it doesn't really apply because I'm creating the ticket 
with a template using RT::Action::CreateTickets.

I suppose if there's no way I'll have to abandon the use of 
RT::Action::CreateTickets and write a custom action module more similar to the 
example code I found.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] change queue not triggering Scrip

2015-03-20 Thread Landon Stewart
On Mar 20, 2015, at 5:20 AM, a.sm...@ldex.co.uk wrote:
 
 Hi,
 
   I've created a Scrip with condition On Queue Change but it only works 
 when I change the queue via the GUI. I've created a little custom perl module 
 in Actions to change the queue which works great (I'm calling it from 
 rt-crontool), but it doesn't trigger the Scrip. Anyone any ideas what's going 
 on?
 
 
I've noticed that some of the things done with rt-crontool don't get recorded 
and therefor don't trigger scrips.  This might be because of something minor 
missing in your custom perl module (custom action).  When the custom perl 
module changes the queue do you see a transaction listed in the ticket history 
reflecting the queue change or is the queue just different on the ticket with 
no mention of it in the ticket history?  If there's no mention of it in the 
ticket history it means that the transaction is not recorded.  This is similar, 
although not quite the same as, AddCustomFieldValue( Field ..., Value ..., 
RecordTransaction = 0 ).  I'd probably try and find a way to get the queue 
change to be recorded in the ticket history that way it would trigger scrips 
such as the On Queue Change one you have that works when using the GUI.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Search Query Builder Issues (Space Encoding?)

2015-03-19 Thread Landon Stewart
On Mar 19, 2015, at 8:20 AM, Richard Stevens piratef...@gmail.com wrote:
 ...
 The end result is:
 
 [25773] [Thu Mar 19 14:56:10 2015] [error]: Wrong query, expecting a OPERATOR 
 in 'Queue = 'Incident Reports' AND CF.{Affected Users}--here LIKE 'frog'' 
 at /opt/rt4/sbin/../lib/RT/SQL.pm line 130.
 
 Has anyone observed this type of behaviour?

Hi Richard,

I had this problem just the other day actually.  You must enclose CF.{...} in 
single quotes when ... has a space in it.

Instead of:  CF.{Affected Users}
Do this: 'CF.{Affected Users}'

Also to see what you are looking at in plain text you can visit the full URL 
and then change RTIR/Search/Results.html to /Search/Build.html and then click 
Advanced on the top right.  The Query box will give you the plain text of 
the search you are performing for any given URL.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] How to email entire ticket history and attach items from tickets

2015-03-13 Thread Landon Stewart
Hi Rick,

For the complete history of a ticket you need to first load the tickets 
transactions and then select those you want to cycle through - then cycle 
through them and only printing the create and correspond content.

In the template try something like this code block:
{
# Select which transactions to cycle through
my $transactions = $Ticket-Transactions;
$transactions-Limit( FIELD = 'Type', VALUE = 'Create' );
$transactions-Limit( FIELD = 'Type', VALUE = 'Correspond', 
ENTRYAGGREGATOR = 'OR', OPERATOR = '=' );

# Build the $content variable up - we'll be concatenating to this string 
below
my $content;
while (my $transaction = $transactions-Next) {
my $attachments = $transaction-Attachments;
while (my $attachment = $attachments-Next) {
next unless $attachment-ContentType =~ 
m!^(text/html|text/plain|message|text$)!i;  # skip non-text stuff
# Only include headers if they are present on the attachment
$content .= defined $attachment-GetHeader('From') ? From: 
.$attachment-GetHeader('From').\n : ;
$content .= defined $attachment-GetHeader('To') ? To: 
.$attachment-GetHeader('To').\n : ;
$content .= defined $attachment-GetHeader('Subject') ? Subject: 
.$attachment-GetHeader('Subject').\n\n : ;
# Include the content of the attachment
$content .= defined $attachment-OriginalContent ? 
$attachment-OriginalContent : ;
}
}
return $content;
}

The above is not really tested code but I know the idea behind it works.

You've got me on the attachments.  I'd like to know more about that as well 
since attaching a file from a past update to a new a ticket update would be 
awesome.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

 On Mar 13, 2015, at 1:58 PM, Rick Zoerner rick.zoer...@cccparts.com wrote:
 
 Hi,
 
 I have set up an approval process for invoices that is working perfectly up 
 to the paying part. However, to finish it up I have 2 tasks I can't figure 
 out on my own.
 1)   I need to be able to send the entire History of the ticket in an 
 email, and,
 2)   Attach any and all attachments from a particular custom field (of a 
 type=attach multiple documents).
 
 So far, for this project, I have:
   1- created a custom lifecycle using status changes to move a CapEx through 
 stages of authorization, acquisition, approval for payment and payment.
   2- created custom templates for each status. Each status change triggers an 
 email using a template customized  for that person/stage in the process (i.e. 
 Manager Approval, IT Approval, Finance Approval, Acquire, 
 ApproveToPay, Coding, Pay).
   3- set up custom fields in the ticket to hold all the attachments needed 
 during the process in a consistent location. Quotes, invoices, etc.
 
 The history display is particularly important because it is the audit trail 
 of all the approvals. Each approval level is just a drop-down custom field in 
 the ticket (approved/denied). It is the history that shows who flipped it to 
 Approved and the date/time stamp of when they did.
 
 It works great for everybody in the sequence except the final stage - paying 
 the invoice(s).
 Finance has to open the ticket, print the web page to capture the history 
 (audit trail), then find the attachments and open/print each of them, then 
 look at the field where coding listed how to book the payable (GL account and 
 dollar amount), etc.
 
 Since I am already sending them an email with a link to the ticket in it when 
 the status changes to pay... I would like to include in that email the full 
 history, a couple other custom fields I can capture easily (like the coding, 
 the original justification, etc.), and attach the invoices - one-stop 
 shopping for A/P. I just can't find anything to help me figure out how to 
 call out the entire ticket history.
 
 Thanks in advance to anyone who has a ready answer for this - I'm NOT a 
 programmer at all, so I've spent several days looking through the 
 documentation and only barely able to understand a fraction of it. Please 
 speak to me as to a child - in Perl that would be an overly generous 
 appraisal of my ability.
 
 -Rick
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] TicketSQL to select all tickets with requestor nobody in particular

2015-03-13 Thread Landon Stewart
Our Nobody user is ID #6 so I'd use that in the TicketSQL query as:

Requestor.id = 6

You can find out what your Nobody user's ID is (probably the same as ours):

1) Admin - Users - Select
2) Go to user: Nobody
3) click Go!

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932

 On Mar 13, 2015, at 1:02 PM, Al Joslin allen.jos...@gmail.com wrote:
 
 What is the TicketSQL to select all tickets with requestor nobody in 
 particular” ?
 
 I can’t get  that list from the Search GUI either
 
 thanks
 al;



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] The use of $Ticket{'TOP'}-CustomFieldValues($fieldname) with RT::Action::CreateTickets

2015-03-12 Thread Landon Stewart
On Mar 10, 2015, at 3:28 AM, Christian Loos cl...@netcologne.de wrote:
 
 @Alex:
 CreateTickets support both, CustomField and CF keys [1].
 
 @Landon:
 Why don't you simply add this lines to you template, as you are using a
 static customfield list and don't want to add all customfields (assuming
 you customfields are single value fields):
 
 CF-Customfield1: {$Tickets{'TOP'}-FirstCustomFieldValue('Customfield1')}
 CF-Customfield2: {$Tickets{'TOP'}-FirstCustomFieldValue('Customfield2')}
 CF-etc: {$Ticket{'TOP'}-FirstCustomFieldValue('etc')}

The problem with using FirstCustomFieldValue() is that I'd, of course, only get 
the first value for each CF but I want all the values for each CF to be copied 
over.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] The use of $Ticket{'TOP'}-CustomFieldValues($fieldname) with RT::Action::CreateTickets

2015-03-10 Thread Landon Stewart
Hello RT-Users,

Nevermind!  :-)

I'm doing a chain of RT::Action::CreateTickets and it turns out my problem was 
that the custom fields were not being set before the Investigation ticket 
creation and therefor the CF's had no values.  Once the issue with that was 
resolved it all started working perfectly.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932


 On Mar 10, 2015, at 12:15 AM, Landon Stewart lstew...@iweb.com wrote:
 
 Hello,
 
 It seems that one cannot load the values of a CF with 
 $Ticket{'TOP'}-CustomFieldValues($fieldname).  The result is an empty 
 variable.  I've confirmed that the foreach works for each of the $cfname in 
 the @cflist since I get log entries for them but $cfvs-Next doesn't produce 
 a value (nothing is logged).
 
 ===Create-Ticket: Investigation
 {
   my @cflist = [ 'Customfield1', 'Customfield2', 'etc'];
   our @CFTEXT;
   foreach my $cfname (@cflist) {
 RT::Logger-info($cfname);
 my $cfvs = $Tickets{TOP}-CustomFieldValues($cfname);
 while (my $cfv = $cfvs-Next) {
   RT::Logger-info($cfname.: .$cfv-Content);
   push @CFTEXT, CF-.$cfname.: .$cfv-Content;
 }
   }
 }
 Queue: Investigations
 Parents: TOP
 Status: open
 { join(\n, @CFTEXT) }
 Content-Type: text/html
 Content:pre{$Tickets{TOP}-Transactions-First-Content}/pre
 ENDOFCONTENT




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] The use of $Ticket{'TOP'}-CustomFieldValues($fieldname) with RT::Action::CreateTickets

2015-03-10 Thread Landon Stewart
On Mar 10, 2015, at 2:29 AM, Alex Peters a...@peters.net wrote:
 
 You need to output CustomField-$cfname as the key, not CF-$cfname.
 
 

CF-$cfname should work as well but more importantly nothing is being outputted 
there which is the problem I'm most concerned with.


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


[rt-users] The use of $Ticket{'TOP'}-CustomFieldValues($fieldname) with RT::Action::CreateTickets

2015-03-10 Thread Landon Stewart
Hello,

It seems that one cannot load the values of a CF with 
$Ticket{'TOP'}-CustomFieldValues($fieldname).  The result is an empty 
variable.  I've confirmed that the foreach works for each of the $cfname in the 
@cflist since I get log entries for them but $cfvs-Next doesn't produce a 
value (nothing is logged).

===Create-Ticket: Investigation
{
  my @cflist = [ 'Customfield1', 'Customfield2', 'etc'];
  our @CFTEXT;
  foreach my $cfname (@cflist) {
RT::Logger-info($cfname);
my $cfvs = $Tickets{TOP}-CustomFieldValues($cfname);
while (my $cfv = $cfvs-Next) {
  RT::Logger-info($cfname.: .$cfv-Content);
  push @CFTEXT, CF-.$cfname.: .$cfv-Content;
}
  }
}
Queue: Investigations
Parents: TOP
Status: open
{ join(\n, @CFTEXT) }
Content-Type: text/html
Content:pre{$Tickets{TOP}-Transactions-First-Content}/pre
ENDOFCONTENT

LOGS from the foreach() (but not from the while()):
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer ID (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Language (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Name (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Email (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Email Tech (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Status (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Type (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Status (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Name (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Status (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device O/S (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Control Panel (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer DBID (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Country (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Created (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Closed (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Groups (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Ticket Priority (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Managed (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer SystemDB (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Service DBID (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Price (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Created (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Closed (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device DBID (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Created (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Closed (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Type (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Facility (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Bits (template:8)
[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Addresses (template:8)



I've also tried loading the CF using 
$Tickets{TOP}-LoadCustomFieldByIdentifier($cfname) but this does not work 
either.

Basically I'm waning to copy a list of CFs from $Tickets{'TOP'} to the newly 
created one.

Thank you.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Cancel Resolve transaction based on custom fields

2015-01-29 Thread Landon Stewart
On Jan 29, 2015, at 3:05 PM, Landon Stewart lstew...@iweb.com wrote:
 In the action (commit) section of the Scrip:
 $self-TicketObj-Status(open);
 $self-TicketObj-Comment( Content = Script re-opened because 
 CustomFieldName is 
 .$self-TicketObj-FirstCustomFieldValue(CustomFieldName) );

Oops.  Should read Ticket re-opened because...

And it should be followed by:

return 1;


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Cancel Resolve transaction based on custom fields

2015-01-29 Thread Landon Stewart
On Jan 28, 2015, at 5:27 AM, Jasper Olbrich 
jasper.olbr...@students.uni-marburg.de wrote:
 
 Hello,
 
 I want to cancel or undo the Mark as Resolved transaction based on the 
 content of custom fields. Currently I'm using a Scrip and I'm only able to do 
 the following:
 
 * access the custom fields
 * make the decision
 * comment on the ticket with the reason why it can't be resolved
 * reopen the ticket
 
 From the ticket's history, I can tell that it is resolved first, then my 
 scrip adds the comment and reopens it. But yellow Results box shows only 
 Status changed from open to resolved.
 
 Is it possible to suppress the status change from open to resolved with a 
 scrip or to include the scrip-induced status change in the result box?

I hope I'm understanding this correctly...

I would use a Scrip with a condition of On Resolve and have the scrip 
evaluate the ticket to see if it should be reopened.  If it should be reopened 
the action portion of the scrip would open the ticket via 
$self-TicketObj-Status(open) again.

Name of Scrip:
On Resolve Reopen if CustomFieldName Contains Some Text

Condition: Select On Resolve

In the preparation section of the Scrip:
return 0 unless $self-TicketObj-FirstCustomFieldValue(CustomFieldName) =~ 
/Some Text/;
return 1;

In the action (commit) section of the Scrip:
$self-TicketObj-Status(open);
$self-TicketObj-Comment( Content = Script re-opened because CustomFieldName 
is .$self-TicketObj-FirstCustomFieldValue(CustomFieldName) );

Maybe?

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Scrip for adding to the custom field based on another CF

2015-01-21 Thread Landon Stewart
On Jan 21, 2015, at 7:07 AM, Kevin Squire gentg...@wikiak.org wrote:
 
 
 I have a scrip currently that checks for status change from X-- Y and if 
 true, adds an entry to the Custom Field RMA Num.  It adds our RMA number, 
 which is really just RMA-$RT_Ticket_Number
 
 They have asked me to change the number based on another CF RMA TYPE.  If 
 the RMA type = Student Withdrawl they want the RMA number to be appended 
 with WD
 
 
 My perl skills are limited to copy/paste and tweaking existing so I would 
 like a little bit of help with my If/Then statement.  The idea being:
 
 IF CustomField{RMA Type} = Student Withdrawl
 THEN $Append = -WD
 ELSE $Append = 
 
 Then in the current line (below)
  my $Value = RMA- . $Num ;
 
 would be changed to
   my $Value = RMA- . $Num . $Append ;

This can be done with one ternary operator:
my $value = $self-TicketObj-FirstCustomFieldValue('RMA Type') eq 'Student 
Withdrawl' ? RMA- . $Num : RMA- . $Num . $Append;

Some notes:
- The condition here is:  $self-TicketObj-FirstCustomFieldValue('RMA Type') 
eq 'Student Withdrawl'
- If the condition is true then $value will equal what's between the ? and the 
: (colon)
- If the condition is false then $value will equal what's between the : and the 
; (semi-colon)

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Warning before sending correspondence

2014-12-20 Thread Landon Stewart
On Dec 20, 2014, at 7:31 AM, Jason Foster m81l1ngl1...@gmail.com wrote:
 
 We just got ... singed ... when someone accidentally sent a comment as 
 correspondence.  Even with the red background in the message box.
 
 I'm guessing that this is a common failure mode, and am wondering whether 
 there is a { setting, plugin } that will pop up a This is going to the 
 Requestor ... are you sure? alert before sending?

There's definitely no setting and I don't think I've seen a plugin for this.  
Although this sounds like one of those cases where a technological solution to 
a problem with people might not be the answer perhaps modifying the textbox 
with some default text (ie. This response will be seen by customers - remove 
this text.) for correspondence with something they have to actually remove 
before typing might be a relatively simple way to achieve some warning.

--
Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Problem with date

2014-11-19 Thread Landon Stewart
On Nov 19, 2014, at 11:18 AM, Bryon Baker bba...@copesan.com wrote:
 The dates printed to the console are correct but when I view the ticket the 
 resolved date is different than the dates printed to the console by 6 hours.  
 This seems to me to be the off set for the time zone.  What do I need to add 
 for Request Tracker to take the date as is?

Hi Byron,

AFAIK RT provides it's own offset when printing dates/times in the UI so one 
must store the date/time as UTC.  What is printed on the console should 
actually be UTC.  Date/Time entered by users or stored in any way need to be 
converted to UTC first.

More info:
http://bestpractical.com/docs/rt/latest/RT_Config.html#Date-and-time-handling 
http://bestpractical.com/docs/rt/latest/RT_Config.html#Date-and-time-handling

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] how to allow subject line if update is from specific email address

2014-11-13 Thread Landon Stewart
On Nov 13, 2014, at 5:06 AM, Atif Mehboob atif.mehb...@eckoh.com wrote:
 
 Hi All,
  
 We are using RT 4.2.1. How can we allow a specific email address to update 
 the subject line of ticket in any queue.  Any suggestions please?
  
 Regards,
 Atif

Hi Atif,

We do this using a scrip (in this case it'd be a global scrip).  Update it with 
the email address in question.

Description:
Update the subject for theem...@address.com

Condition:
On Correspond

Action: (User defined)
my $attachments = $self-TransactionObj-Attachments;
$attachments-Columns( qw(id Headers Subject) );
my $attachment = $attachments-First;
return 0 unless $attachment;
return 0 unless $self-TicketObj-IsWatcher( Type = 'Requestor', Email = 
'theem...@address.com mailto:theem...@address.com' );
my $subject = $attachment-GetHeader('Subject');
return 0 unless $subject;
$self-TicketObj-SetSubject($subject);
return 1;

Template:
Global template: Blank

Stage: 
TransactionCreate

Re: [rt-users] Sorting by the value of a custom field in search results *numerically*

2014-05-06 Thread Landon Stewart
Thanks for your replies guys.  And thanks for adding that feature request
Brent (http://issues.bestpractical.com/Ticket/Display.html?id=29638).


On 2 May 2014 13:52, Landon Stewart lstew...@iweb.com wrote:

 Hello,

 It seems that the sorting by custom field in search results is always done
 alphabetically.

 For example sorting by CF that contains only integers in descending order:
 4
 3
 2
 11
 1

 Is there a way to sort search results by custom field numerically?

 --
 Landon Stewart :: lstew...@iweb.com
 Lead Specialist, Abuse and Security Management
 Spécialiste principal, gestion des abus et sécurité
 http://iweb.com :: +1 (888) 909-4932





-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training

[rt-users] Sorting by the value of a custom field in search results *numerically*

2014-05-02 Thread Landon Stewart
Hello,

It seems that the sorting by custom field in search results is always done
alphabetically.

For example sorting by CF that contains only integers in descending order:
4
3
2
11
1

Is there a way to sort search results by custom field numerically?

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training

[rt-users] How can I take a user's dashboard and making it the default for everyone

2014-03-26 Thread Landon Stewart
Hello,

A staff member is creating a dashboard which we'd like to use as the
default for all other staff members.  I'd like to do this with the UI of
course since making changes to the actual database is never a good idea but
in an attempt to get familiar with how this might work under the hood,
after a cursory eyeballing, I can't even seem to find the saved searches in
the MySQL tables let alone the dashboard configuration.  I assume they are
some kind of Object but I don't know what to look for.

How can one either copy their dashboard to be the default for a group or
somehow allow them to create the default dashboard for the group by
temporarily elevating their privileges or something?

Unfortunately, like many I suppose, I've never become super familiar with
how the dashboards work. I've always just used the defaults and dabbled a
little but nothing serious.

Thanks for reading and any information you can offer.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training

Re: [rt-users] MySQL Question (joins and stuff)

2014-03-04 Thread Landon Stewart
Jason this is brilliant!  Thank you!


On 4 March 2014 13:57, j.hubbard jason.hubb...@circles.com wrote:

 Hi Landon, below is some sql I wrote (I'm not too good at sql so some of it
 could probably be optimized).  It pulls a bunch of fields both system and
 custom as well as the first comment on the ticket and names the columns
 something friendly.  Also it compensates for timezones since the db is in
 UTC.

 Hopefully it helps.

 The custom fields I am pulling are Priority (not the built-in one) and
 Category.  I have two different Category custom fields from two
 different queues but I am showing them both in one column, hence the OR in
 the first custom field join statement below.

 Let me know



 --begin SQL--

 SELECT T.id, T.EffectiveId, DATE(CONVERT_TZ(T.Created, '+00:00', '-04:00'))
 as 'Day Created',
 CONVERT_TZ(T.Created, '+00:00', '-04:00') as Created,
 CONVERT_TZ(T.Resolved,
 '+00:00', '-04:00') as Resolved,
 WEEK(CONVERT_TZ(T.Created, '+00:00', '-04:00')) as week,
 MONTH(CONVERT_TZ(T.Created, '+00:00', '-04:00')) as Month,
 U3.Name as 'Requestor', U6.EmailAddress as 'Requestor Email', U5.RealName
 as
 'Requestor RealName',
 U4.City as 'Requestor City', U.name as 'Owner', U2.RealName as 'Owner
 RealName', Q.id as QueueID,
 Q.Name as 'Queue Name', T.Status, OOCF.Content as 'Priority',
 OCF.Content as 'Category', OCF.ObjectId, OCF.CustomField, T.Subject,
 TO_DAYS(IF(Resolved != '-00-00 00:00:00' AND
 Resolved != '1970-01-01 00:00:00',
 DATE(Resolved), CURDATE())) -
 TO_DAYS(DATE(T.Created)) as days_open
 FROM Tickets T
 LEFT JOIN Users U on U.id = T.Owner
 LEFT JOIN Users U2 on U2.id = T.Owner
 LEFT JOIN Queues Q on Q.id = T.Queue
 LEFT JOIN Users U3 on U3.id = T.Creator
 LEFT JOIN Users U4 on U4.id = T.Creator
 LEFT JOIN Users U5 on U5.id = T.Creator
 LEFT JOIN Users U6 on U6.id = T.Creator
 LEFT JOIN (ObjectCustomFieldValues OCF) on (OCF.ObjectId = T.id AND
 (OCF.CustomField = '3' OR OCF.CustomField = '5'))
 LEFT JOIN (ObjectCustomFieldValues OOCF) on (OOCF.ObjectId = T.id AND
 OOCF.CustomField = '4')
 WHERE Type = 'ticket'
 AND
 (
 Status IN ('open','stalled','new','autoclose','resolved','rejected')
 OR
 (
 Status = 'resolved'
 AND Resolved  DATE_SUB(CURDATE(), INTERVAL 30 DAY)
 )
 )
 ORDER BY T.id

 --end SQL--



 --
 View this message in context:
 http://requesttracker.8502.n7.nabble.com/MySQL-Question-joins-and-stuff-tp56822p56850.html
 Sent from the Request Tracker - User mailing list archive at Nabble.com.
 --
 RT Training London, March 19-20 and Dallas May 20-21
 http://bestpractical.com/training




-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-- 
RT Training London, March 19-20 and Dallas May 20-21
http://bestpractical.com/training

[rt-users] MySQL Question (joins and stuff)

2014-03-03 Thread Landon Stewart
Hello,

I'd never modify the database without the API but I'd like a flattened
version of the data as a snapshot every so often for statistical purposes.
 If I run the following MySQL query I basically get a line for every
CustomField Value and it duplicates all the T.* fields while writing new
data for the OCFV.* values on each line of course.

SELECT
T.id,Q.Name,T.Subject,T.Status,T.Created,T.Resolved,CF.Name,OCFV.Content
FROM Tickets T, ObjectCustomFieldValues OCFV,CustomFields CF,Queues Q
 WHERE T.id = OCFV.ObjectID AND OCFV.CustomField = CF.id AND T.Queue = Q.id
AND Q.Name = Incidents
 AND T.Status != abandoned
AND OCFV.Disabled = 0
LIMIT 1000;

OUTPUT:
id Name Subject Status Created Resolved Name Content
16478020 Incidents open resolver - This host is most likely running an open
DNS resolver. open 2013-09-19 19:19:41 2013-10-04 16:25:04 Constituency
EDUNET
16478020 Incidents open resolver - This host is most likely running an open
DNS resolver. open 2013-09-19 19:19:41 2013-10-04 16:25:04 IP 10.0.0.220
16478020 Incidents open resolver - This host is most likely running an open
DNS resolver. open 2013-09-19 19:19:41 2013-10-04 16:25:04 CCName 
16478020 Incidents open resolver - This host is most likely running an open
DNS resolver. open 2013-09-19 19:19:41 2013-10-04 16:25:04 ClientName Johnny
Appleseed
16478020 Incidents open resolver - This host is most likely running an open
DNS resolver. open 2013-09-19 19:19:41 2013-10-04 16:25:04 Customer 9877659
16478020 Incidents open resolver - This host is most likely running an open
DNS resolver. open 2013-09-19 19:19:41 2013-10-04 16:25:04 PreferredLanguage
English

What I'd like to do is have the output with the T.* columns like normal and
each CF.Name as a column name with the value from OCFV.Content would be
desired.  I think I know this involves using the right INNER or OUTER or
FULL JOIN or sub-queries or something but I'm afraid that's over my head
here.  I'm familiar with JOINs but not turning a table on it's side.  It's
either this or have a ridiculous amount of output feed into some ridiculous
kludgy script to reformat it.

If anyone knows how I could flatten this data so a snapshot of each ticket
(within a date range based on Tickets.Created or Tickets.Resolved) on one
line with CF names as columns and CF values as values can be achieved I
would really really appreciate it.  Failing that if anyone knows of any
tips to figure this out (like a primer on turning tables on their side) I'd
appreciate any advice you can give me.  :-D


-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-- 
RT Training London, March 19-20 and Dallas May 20-21
http://bestpractical.com/training

Re: [rt-users] How to grab requestor's first and last name in email address ?

2014-02-05 Thread Landon Stewart
On 5 February 2014 11:16, Ethier, Michael meth...@cgr.harvard.edu wrote:

  Hello,



 I need to obtain the first and last name that would be part of the
 requestor's email address.

 For example, requestor email address comes in as:



 From: Smith, Joe jsm...@mail.com



 In this example I want parse out the Joe and Smith keywords and assign
 them to 2 variables

 which I will use for comparison later.



 I am writing a RT Scrip. Is this possible to do ?


The name of the requestor is stored within the UsersObj in the Requestors
group object for the $Ticket.  You want the first UsersObj.  There's no way
to know if it's the name is written Last, First or First Last so you'll
have to figure that out somehow.  Usually a comma in a name field means
Last, First though so the following is a decent bet.  I haven't tested
this code but this ought to get you close anyway.

my $realname = $self-TicketObj-Requestors-UsersObj-First-RealName;
# Switch things around if there's a comma in the field.
$realname =~ s/(.*),\s*(.*)/$2 $1/ if $realname =~ /,/;

If they have First Last, Company it'll come out as ACME Inc., Jim Smith
though which might not be terrible.
Worse would be Last, First - Position coming out as Jim - Manager Smith
which might sound a little too familiar for business.

In my opinion you'd want to just leave it as-is so if it's Last, First and
they get an email addressed to them with Dear Smith, Jim: they'll know
it's because they have it that way in their mail client.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] RT crashes during spreadsheet export with ...rt-server.fcgi aborted: idle timeout (3 sec)

2014-02-03 Thread Landon Stewart
Signal 13 is just a broken pipe, as it says.  You need to find out why it's
broken.  It's probably running out of memory or taking too long.  FastCGI
in my experience likes to timeout and not tell anyone that it did.  I find
it strange that your idle timeout is only 3 seconds.  It'll likely timeout
often while it waits for the database to produce the query results.


On 3 February 2014 09:19, Alex Geo. a...@russian-cyprus.org wrote:

 Hi all,

 Would really appreciate any help/advise on this.

 Centos 6.4
 Mysql
 RT 4.0.10

 here is what's in /etc/httpd/conf.d/rt.conf :

 VirtualHost support.company.com
   ### Optional apache logs for RT
   # Ensure that your log rotation scripts know about these files
   # ErrorLog /opt/rt4/var/log/apache2.error
   # TransferLog /opt/rt4/var/log/apache2.access
   # LogLevel debug

   AddDefaultCharset UTF-8

   Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
   ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

   DocumentRoot /opt/rt4/share/html
 Location /
  Order allow,deny
  Allow from all

  Options +ExecCGI
  AddHandler fastcgi-script fcgi
 /Location
 /VirtualHost

 I have a queue called TOS with 34 Ticket Custom Fields, which is
 reproducing a spreadsheet in RT and each ticket is one shipment record. All
 works good!

 Now occasionally we need to export some Saved searches contents into a
 spreadsheet. When the search contains little amount of results, i.e. 19
 tickets or 36 tickets, the export works as expected. When it contains for
 example 56 tickets - the Internal Server Error in the browser.

 Looking in the httpd log we have the following:

 [Mon Feb 03 16:55:30 2014] [error] [client 10.x.x.x] FastCGI: comm with
 server /opt/rt4/sbin/rt-server.fcgi aborted: idle timeout (3 sec),
 referer:
 http://support.company.com/Search/Results.html?Format=%27%3Cb%3E%3Ca%20href%3D%22%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Ca%20href%3D%22%2FTicket%2FUpdate.html%3FAction%3DComment%26amp%3Bid%3D__id__%22%3E__CustomField.%7BShipper%7D__%3C%2Fa%3E%27%2C%0A%27__CustomField.%7BLoadport%7D__%27%2C%0A%27__CustomField.%7BI%7D__%2
 ..

 And this above log line is very long listing all of the custom fields.
 Then one second later the following comes into the log:

 [Mon Feb 03 16:55:34 2014] [warn] FastCGI: server
 /opt/rt4/sbin/rt-server.fcgi (pid 4995) terminated due to uncaught signal
 '13' (Broken pipe)
 [Mon Feb 03 16:55:34 2014] [warn] FastCGI: server
 /opt/rt4/sbin/rt-server.fcgi restarted (pid 16011)

 Any clues how to overcome this issue? We will need to be exporting into
 spreadsheets on a monthly basis, and the amount of tickets in the queue
 will be growing approx 100 per month.

 Thanks in advance for your assistance!

 Kind regards,
 Alex Geo.




-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Relationship Permissions

2014-01-23 Thread Landon Stewart
On 23 January 2014 11:18, Tim Wiley t...@marchex.com wrote:

 rt-4.0.13

 We have a Queue A  Queue B.

 Ticket A is in Queue A, and Ticket B is in Queue B.

 User A has ModifyTicket on Queue A, but not on Queue B.  User A would like
 to make Ticket A refer to Ticket B, but is getting a permission denied
 error.  I can only find documentation requiring ModifyTicket on both queues
 to merge tickets, but not for other relationships.  Is there a way to get
 this to work without granting User A ModifyTicket on Queue B?


I don’t think so because when you setup a link of any type on Ticket A RT
will create a reciprocal link on Ticket B pointing to A as referred to by
(in this case).

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Postfix error: 500 No Host option provided

2014-01-16 Thread Landon Stewart
From the server itself what if execute the following while in an SSH
session (obviously replacing the host.example.com with the correct fqdn of
RT):

curl http://host.example.com

What do you get back?  If you get a 500 error back from that your problem
is not RT related (yet).


On 16 January 2014 12:30, Mathew Snyder mathew.sny...@gmail.com wrote:

 Apologies. I have not been seeing the responses. Checking my spam folder
 did not turn up the emails either.

 My aliases file contains two entries. One for rt: and the other for
 rt-comment:

 rt:  |/opt/rt4/bin/rt-mailgate --queue general --action
 correspond --url http://host.example.com;
 rt-comment:|/opt/rt4/bin/rt-mailgate --queue general --action comment
 --url http://host.example.com;

 The web logs don't mention anything about this.

 -Mathew

 When you do things right, people won't be sure you've done anything at
 all. - God; Futurama

 We'll get along much better once you accept that you're wrong and
 neither am I. - Me


 On Thu, Jan 16, 2014 at 5:36 AM, Kevin Falcone 
 falc...@bestpractical.comwrote:

 On Wed, Jan 15, 2014 at 12:25:17PM -1000, Mathew Snyder wrote:
 Jan 15 17:09:14 zen-rt postfix/qmgr[6294]: 314F2808AD: from=[26]
 u...@example.com, size=447,
 nrcpt=1 (queue active)
 Jan 15 17:09:15 zen-rt postfix/local[6409]: 314F2808AD: to=[27]
 r...@host.example.com,
 relay=local, delay=54, delays=53/0.01/0/0.11, dsn=4.3.0,
 status=deferred (temporary failure.
 Command output: HTTP request failed: 500 No Host option provided.
 Your webserver logs may have
 more information or there may be a network problem. )
 Jan 15 17:09:16 zen-rt postfix/smtpd[6375]: disconnect from
 [28]host.example.com[192.168.231.42]
 I have searched around online and have not seen anything that even
 references this problem. If
 anyone can provide any insight I will be very appreciative.

 You appear to have asked variants on this question a few times.
 In each case, a mailing list user asked you for information needed to
 help you.

 How are you invoking rt-mailgate, from an aliases file?
 Show the alias file, with all the options you are passing to
 rt-mailgate.

 Have you read your apache error log?  Since you're getting a 500
 error, and that's an HTPT status code, I'd look there.

 -kevin





-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Postfix error: 500 No Host option provided

2014-01-16 Thread Landon Stewart
I guess that’s why pasting what you actually have instead of what is in the
documentation is important in a problem description.


On 16 January 2014 12:40, Mathew Snyder mathew.sny...@gmail.com wrote:

 Great...

 After sending multiple emails due to not seeing responses and then finally
 getting one, I've discovered that the aliases file was malformed. I didn't
 actually have --url http://host.example.com;. Instead I had --url http:
 host.example.com

 /facepalm

 -Mathew

 When you do things right, people won't be sure you've done anything at
 all. - God; Futurama

 We'll get along much better once you accept that you're wrong and
 neither am I. - Me


 On Thu, Jan 16, 2014 at 10:37 AM, Landon Stewart lstew...@iweb.comwrote:

 From the server itself what if execute the following while in an SSH
 session (obviously replacing the host.example.com with the correct fqdn
 of RT):

 curl http://host.example.com

 What do you get back?  If you get a 500 error back from that your problem
 is not RT related (yet).


 On 16 January 2014 12:30, Mathew Snyder mathew.sny...@gmail.com wrote:

 Apologies. I have not been seeing the responses. Checking my spam folder
 did not turn up the emails either.

 My aliases file contains two entries. One for rt: and the other for
 rt-comment:

 rt:  |/opt/rt4/bin/rt-mailgate --queue general --action
 correspond --url http://host.example.com;
 rt-comment:|/opt/rt4/bin/rt-mailgate --queue general --action
 comment --url http://host.example.com;

 The web logs don't mention anything about this.

 -Mathew

 When you do things right, people won't be sure you've done anything at
 all. - God; Futurama

 We'll get along much better once you accept that you're wrong and
 neither am I. - Me


 On Thu, Jan 16, 2014 at 5:36 AM, Kevin Falcone 
 falc...@bestpractical.com wrote:

 On Wed, Jan 15, 2014 at 12:25:17PM -1000, Mathew Snyder wrote:
 Jan 15 17:09:14 zen-rt postfix/qmgr[6294]: 314F2808AD: from=[26]
 u...@example.com, size=447,
 nrcpt=1 (queue active)
 Jan 15 17:09:15 zen-rt postfix/local[6409]: 314F2808AD: to=[27]
 r...@host.example.com,
 relay=local, delay=54, delays=53/0.01/0/0.11, dsn=4.3.0,
 status=deferred (temporary failure.
 Command output: HTTP request failed: 500 No Host option provided.
 Your webserver logs may have
 more information or there may be a network problem. )
 Jan 15 17:09:16 zen-rt postfix/smtpd[6375]: disconnect from
 [28]host.example.com[192.168.231.42]
 I have searched around online and have not seen anything that even
 references this problem. If
 anyone can provide any insight I will be very appreciative.

 You appear to have asked variants on this question a few times.
 In each case, a mailing list user asked you for information needed to
 help you.

 How are you invoking rt-mailgate, from an aliases file?
 Show the alias file, with all the options you are passing to
 rt-mailgate.

 Have you read your apache error log?  Since you're getting a 500
 error, and that's an HTPT status code, I'd look there.

 -kevin





 --
 Landon Stewart :: lstew...@iweb.com
 Lead Specialist, Abuse and Security Management
 Spécialiste principal, gestion des abus et sécurité
 http://iweb.com :: +1 (888) 909-4932






-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Question

2014-01-15 Thread Landon Stewart
I don’t know if that’s even still valid.  I did see this:
http://requesttracker.wikia.com/wiki/RtBounceHandler

We aren’t using that though.  We just handle the straight bounce messages
in their own queue and then process the message content itself to find the
original ticket #.  Unless you have a very high volume of tickets it might
not be worth it to do that but instead set the “-f” for sendmail to
something someone actually receives so they can intervene if a bounce comes
back.


On 15 January 2014 14:35, Bryon Baker bba...@copesan.com wrote:

  Thanks for the information



 but where can I download the program rtbouncehandler from?



 Bryon Baker

 Network Operations Manager

 *Copesan** - Specialists in Pest Solutions*

 800-267-3726  •  262-783-6261 ext. 2296

 bba...@copesan.com cstep...@copesan.com

 www.copesan.com

 *Servicing North America with Local Care*



 *From:* Landon Stewart [mailto:lstew...@iweb.com]
 *Sent:* Wednesday, January 15, 2014 3:34 PM
 *To:* Bryon Baker
 *Subject:* Re: [rt-users] Question



 On 15 January 2014 13:13, Bryon Baker bba...@copesan.com wrote:

  Hello All



 I have a question.



 What happen to the NDR message that come from a forwarded or replied to
 with an invalid email address?



 I cannot find the NDR anywhere.  We are reling through an exchange server.
 On the Suse server I am using postfix to send the message off the Suse
 server.



 Please keep in mind I am not a Linux guru when trying to explain this.



 This thread might answer your question if you are talking about emails
 bouncing that were sent from RT



 http://www.gossamer-threads.com/lists/rt/users/91551



 On a side note - We have “SendmailArguments” in RT’s configuration to
 include ‘-fbounce@ourdomainname.com’ and then we have a queue for
 bounces.  I wrote a module that looks at the bounces and attributes them to
 the original by ticket # and posts a comment on the original alerting the
 owner that the email bounced and then marks the bounce email ticket
 resolved.



 --

 Landon Stewart :: lstew...@iweb.com

 Lead Specialist, Abuse and Security Management
 Spécialiste principal, gestion des abus et sécurité
 http://iweb.com :: +1 (888) 909-4932








-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Using Fetchmail to pipe mail into RT.

2014-01-14 Thread Landon Stewart
On 13 January 2014 16:30, Joshua Riden jri...@cmhshare.org wrote:

 Landon,

 Thank you so much Landon for your help. I appreciate it a lot! : )

 Now just a few questions..

 Where is the mailserver log that pertains to fetchmail?
 /var/logs/mailserver ?


fetchmail logging has to be turned on like this in .fetchmailrc:

defaults:
  batchlimit 100
  set logfile /home/username/fetchmail.log


  So when you say I should send  to RT from a real email address, you mean
 from my /etc/aliases file?


I mean from a real email address so that bounces will come back to you if
there are any.


 How would I check for bounces that I would receive back?


You would check your mail.


 How would I manually pipe the mail into RT ? Is there a command that I can
 use?


If you had an email in a file in all its original glory you could pipe it
easily using cat.

# cat emailfile.eml | rt-mailgate

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Big size of /opt/rt4/var directory

2014-01-06 Thread Landon Stewart
On 5 January 2014 01:31, Ivan Osipov osipo...@gmail.com wrote:

 Hello all.
 I'm using Request Tracker 4.2.1 and Lighttpd (1.4.28-2ubuntu4) via fastcgi
 on Ubuntu 12.04 LTS.
 Now size of /opt/rt4/var directory is 5.2 Gb and full backup archive of
 /opt/rt4/ is very big.
 In this directory a lot of folders with random name:
 ---
 ls -la /opt/rt4/var
 [...]
 drwx--   2 www-data www-data  4096 Dec 30 19:19 xO_kAcCdQA
 drwx--   2 www-data www-data  4096 Dec 30 20:34 xR08jEpXhN
 drwx--   2 www-data www-data  4096 Dec 30 18:21 y2A3tJXMy8
 drwx--   2 www-data www-data  4096 Dec 30 21:01 Y5mPEdMSWh
 drwx--   2 www-data www-data  4096 Dec 30 17:42 yBixm9CtAO
 drwx--   2 www-data www-data  4096 Dec 30 17:41 yeihY9J9VX
 drwx--   2 www-data www-data  4096 Dec 30 22:25 yKjJdoKUNU
 [...]
 ---
 Can I delete all this folders from /opt/rt4/var? If yes, how to delete
 this folders automaticaly? This is cache of attachments?


I may be mistaken but to me those look like they might be procmail storing
mail in a directory because it doesn’t know what else to do with them.
 Those shouldn’t be there though so I’d probably first advise that you
resolve that issue before you start using ‘find’ in a crontab to delete
them if they are a certain number of days old or something.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


[rt-users] Triggering two separate templates

2014-01-03 Thread Landon Stewart
Hi Folks,

Currently we have a situation where when a custom field is changed to a
certain value via ticket “edit” a template for that custom field value is
used to correspond with the requestor.  It’s actually a “TERMINATION”
notice telling them they no longer have an account with us.

I’d like to also send an email to other department to have them take an
action as well though.  Basically the customer gets a termination notice
and we want billing to get a request from us to terminate the account.

Does anyone have any ideas on how I’d trigger a second email that the
requestor won’t see?  I thought of just CCing the other department when
that template is used but that’s not really a viable thing to do in this
case.  The other department needs some data from a template that shouldn’t
be sent to the requestor so the emails have to be entirely different.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] RT sending emails on behalf of

2013-12-20 Thread Landon Stewart
On 20 December 2013 13:28, mamir ma...@ucdavis.edu wrote:

 Hi,
 This is how the email looks like in Outlook sent by RT (4.2.1):
 rt-...@rt-dev.org on behalf of t...@rt-dev.org
 Greetings,
 bla bla bla

 Here is my Autoreply template:
 Sender: rt-dev
 Subject: {$Ticket-Subject}
 RT-Attach-Message: yes



How can I get rid of  rt-...@rt-dev.org on behalf of so only the

t...@rt-dev.org appears in email.


It’s basically how services like Hotmail/Live/Outlook and Gmail alert
people that the email was sent from a mail server that’s not explicitly
authorized to send mail for that domain.  Add SPF and DKIM records for the
sending domain (from domain).

Also…  I’d use these headers instead of the Sender header:

From:  Some Friendly Name rt-...@rt-dev.org
Subject: {$Ticket-Subject}
RT-Attach-Message: yes

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Landon Stewart
On 18 December 2013 10:07, Kevin Falcone falc...@bestpractical.com wrote:

 Can you download and run http://mysqltuner.pl on your database.


Fun tip.  You can download that with just “wget mysqltuner.pl”.  There’s
some redirection magic that makes it work with just that command.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-17 Thread Landon Stewart
On 17 December 2013 11:53, Adam Hobaugh a...@cs.pitt.edu wrote:

 Hello,

 I just updated from 4.0.10 to 4.2.1 and it seems to be working well except
 when I am in a ticket, any page that shows a user drop down, ie display and
 people load incredible slowly. I enabled slow query logging and below are
 the two queries that appear to be causing the problem. I appreciate any
 help in resolving this. 10 second load times is rough. Please let me know
 what further information is needed.



Hi Adam,

I’m not sure if this applies but we had this issue and it was an RT ACL
issue.  I remember that it was an issue with granting or not-granting
rights to special groups Everyone or “Unprivileged” but the details of
which I cannot recall exactly.  I do remember there were large ACL joins in
the database whenever we would try to load pages with these drop downs just
like you’ve described in your post.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-17 Thread Landon Stewart
On 17 December 2013 13:19, Adam Hobaugh a...@cs.pitt.edu wrote:

  Hi Adam,

  I’m not sure if this applies but we had this issue and it was an RT ACL
 issue.  I remember that it was an issue with granting or not-granting
 rights to special groups Everyone or “Unprivileged” but the details of
 which I cannot recall exactly.  I do remember there were large ACL joins in
 the database whenever we would try to load pages with these drop downs just
 like you’ve described in your post.

Hello Landon,

 I removed the rights from Everyone and we had nothing on Unprivileged and
 I still see the issue. Thanks for the suggestion though.


Maybe you need to go the other way with it and grant something?  Maybe you
need to grant some simple rights for showing users or something to
Privileged.  I just checked ours and I have “Privileged” under “General
Rights” allowed to View custom field values” configured in each queue.  In
the Global - Group Rights the View custom fields” is not granted.

I wish I could remember the details of what solved it for us.  I do
remember some things were changed which caused the issue and then had to be
rolled back.  I just don’t recall what was changed that caused it.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-17 Thread Landon Stewart
On 17 December 2013 13:19, Adam Hobaugh a...@cs.pitt.edu wrote:

  Hi Adam,

  I’m not sure if this applies but we had this issue and it was an RT ACL
 issue.  I remember that it was an issue with granting or not-granting
 rights to special groups Everyone or “Unprivileged” but the details of
 which I cannot recall exactly.  I do remember there were large ACL joins in
 the database whenever we would try to load pages with these drop downs just
 like you’ve described in your post.

Hello Landon,

 I removed the rights from Everyone and we had nothing on Unprivileged and
 I still see the issue. Thanks for the suggestion though.


Maybe you need to go the other way with it and grant something?  Maybe you
need to grant some simple rights for showing users or something to
Privileged.  I just checked ours and I have “Privileged” under “General
Rights” allowed to View custom field values” configured in each queue.  In
the Global - Group Rights the View custom fields” is not granted.

I wish I could remember the details of what solved it for us.  I do
remember some things were changed which caused the issue and then had to be
rolled back.  I just don’t recall what was changed that caused it.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


[rt-users] Looking for flattened ticket data - De-normalized RT Views originally by Kenneth Crocker KFCrocker at lbl.gov

2013-12-11 Thread Landon Stewart
Hello,

Hopefully Kenneth Crocker is still on the mailing list since he originally
posted about this in 2009.  I’ve been digging around for a way to have a
flattened representation of ticket data including customfields for
statistical purposes.

I think what it is I’m looking for is a to use MySQL Views (stored queries
that when invoked produce a result set and act as a virtual table) but I
can’t figure out how to build one that includes CustomField data from the
ObjectCustomFieldValues table with proper names of fields instead of
numbers and Usernames instead of UIDs etc…  I find the joins required for
the RT data a little extreme to figure out in my head.

I know it’s a complex thing to do but it would make generating statistics
and digging through the data very easy without having to code something in
perl from scratch every time a new statistical report is requested.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


[rt-users] Datetime customfield’s values not being stored in ticket created with RT::Ticket

2013-11-26 Thread Landon Stewart
Hello,

Basically I’m successfully creating a ticket where a bunch of other
CustomFields are set properly except these two Datetime customfields.  The
CFs apply to all applicable queues and are type “Select datetime”.  I’ve
simplified the -Create() below a little but generally this is working
perfectly *except* for the CustomerCreated and ServerCreated fields.  The
new ticket in the “Investigations queue does not have values for those
(totally unset).

my ($newinvid, $newinvTransObj, $inverrorMsg) =
$new_investigation-Create(
 'Queue'  = Investigations,
'Subject' = $self-TransactionObj-Subject,
 'Status' = 'open',
 'CustomField-83' = 'Customer Notification',
   'MemberOf' = $IncidentObj-id,
   'Priority' = $IncidentObj-Priority,
 'CustomField-65' =
$IncidentObj-FirstCustomFieldValue('Classification'),
 'CustomField-75' =
$IncidentObj-FirstCustomFieldValue('Customer'),
 'CustomField-77' =
$IncidentObj-FirstCustomFieldValue('Email'),
 'CustomField-78' =
$IncidentObj-FirstCustomFieldValue('CustomerCreated'),
 'CustomField-79' =
$IncidentObj-FirstCustomFieldValue('ServerCreated'),
 'CustomField-81' =
$IncidentObj-FirstCustomFieldValue('PreferredLanguage'),
 'CustomField-86' =
$IncidentObj-FirstCustomFieldValue('CCName'),
 'CustomField-87' =
$IncidentObj-FirstCustomFieldValue('TechEmail'),
 'CustomField-88' =
$IncidentObj-FirstCustomFieldValue('ClientName'),
 'CustomField-91' =
$IncidentObj-FirstCustomFieldValue('ClientGroups'),
 'CustomField-92' =
$IncidentObj-FirstCustomFieldValue('ProductPrice'),
'CustomField-104' =
$IncidentObj-FirstCustomFieldValue('ServerType'),
'CustomField-105' =
$IncidentObj-FirstCustomFieldValue('OperatingSystem'),
'MIMEObj' = $InvMIMEObj,
);

Do they have to be converted to RT::Date objects or even as far as AsString
to be used as the value?

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


[rt-users] What’s the correct SQL syntax for a date/time custom field that’s not set?

2013-11-20 Thread Landon Stewart
Hello,

Basically I want to find tickets with rt-crontool that match the following:
Queue = 'Blocks’ AND Status != ‘removed’ AND CF.{ServerClosed}  ’now'

The problemI’m encountering, although minor, is that it lists tickets that
match that as well as tickets that have no date set whatsoever.  The
rt-crontool utility displays the date as '1970-01-01 00:00:00’ when I
include CF.{ServerClosed} in the -f part of rt-crontool so I thought I’d
use that as part of the query.  I’ve tried variations on “IS NOT NULL” as
!= ‘’ and != ‘0’ as well.  They act the same as “IS NOT NULL”.

*This does not return the expected results which is very puzzling:*
# /opt/rt4/bin/rt ls Queue = 'Blocks' AND Status != 'removed' AND
CF.{ServerClosed}  'now' AND CF.{ServerClosed} IS NOT NULL -f
'id,CF.{ServerClosed}'
*id CF.{ServerClosed}*
xx454020 1970-01-01 00:00:00
xx478114 1970-01-01 00:00:00
xx489293 1970-01-01 00:00:00
xx489299 1970-01-01 00:00:00
xx492598 1970-01-01 00:00:00
xx495471 1970-01-01 00:00:00
xx495481 1970-01-01 00:00:00
xx506972 1970-01-01 00:00:00
xx518388 1970-01-01 00:00:00
xx519494 2013-11-20 05:00:00
xx525723 1970-01-01 00:00:00
xx525730 1970-01-01 00:00:00
xx525787 1970-01-01 00:00:00
xx528536 1970-01-01 00:00:00
xx528542 1970-01-01 00:00:00
xx530465 1970-01-01 00:00:00
xx532486 1970-01-01 00:00:00
xx532492 1970-01-01 00:00:00
xx532556 1970-01-01 00:00:00
xx532595 1970-01-01 00:00:00
xx533669 1970-01-01 00:00:00

*Either does this which is even more puzzling considering the output above:*
# /opt/rt4/bin/rt ls Queue = 'Blocks' AND Status != 'removed' AND
CF.{ServerClosed}  'now' AND CF.{ServerClosed} != '1970-01-01 00:00:00'
-f 'id,CF.{ServerClosed}'
*id CF.{ServerClosed}*
xx454020 1970-01-01 00:00:00
xx478114 1970-01-01 00:00:00
xx489293 1970-01-01 00:00:00
xx489299 1970-01-01 00:00:00
xx492598 1970-01-01 00:00:00
xx495471 1970-01-01 00:00:00
xx495481 1970-01-01 00:00:00
xx506972 1970-01-01 00:00:00
xx518388 1970-01-01 00:00:00
xx519494 2013-11-20 05:00:00
xx525723 1970-01-01 00:00:00
xx525730 1970-01-01 00:00:00
xx525787 1970-01-01 00:00:00
xx528536 1970-01-01 00:00:00
xx528542 1970-01-01 00:00:00
xx530465 1970-01-01 00:00:00
xx532486 1970-01-01 00:00:00
xx532492 1970-01-01 00:00:00
xx532556 1970-01-01 00:00:00
xx532595 1970-01-01 00:00:00

xx533669 1970-01-01 00:00:00

*I *can* find tickets where the value is set by doing this though:*
# /opt/rt4/bin/rt ls Queue = 'Blocks' AND Status != 'removed' AND
CF.{ServerClosed}  'now' AND CF.{ServerClosed}  '1970-01-01 00:00:00' -f
'id,CF.{ServerClosed}'
*id CF.{ServerClosed}*
xx519494 2013-11-20 05:00:00

Is using  1970-01-01 00:00:00” the only way?  Seems like that definite
value might be begging for bugs or something if somehow the unset date
equals 1970-01-01 0*5*:00:00” for some reason down the road.  I just want
to make sure I’m not setting myself up for buggy behaviour in the future.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] What’s the correct SQL syntax for a date/time custom field that’s not set?

2013-11-20 Thread Landon Stewart
On 20 November 2013 11:29, Alex Vandiver ale...@bestpractical.com wrote:

 On Wed, 2013-11-20 at 11:13 -0800, Landon Stewart wrote:

  Is using  1970-01-01 00:00:00” the only way?

 Currently, yes.


Ok thank you.


  Seems like that definite value might be begging for bugs or something
  if somehow the unset date equals 1970-01-01 05:00:00” for some reason
  down the road.  I just want to make sure I’m not setting myself up for
  buggy behaviour in the future.

 That magic date is the UNIX epoch, and will not change.
  - Alex


Oh I knew it was the Unix epoch date/time but I was concerned that maybe if
the server’s timezone changed it could somehow offset the epoch.  I guess
since that’s simply the ‘display’ version of null then it’s safe to use it
as a constant.

Anyway thanks again.


-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] RT4.2 with Ubuntu13.10 and Postfix

2013-11-13 Thread Landon Stewart
Open http and then use mod_rewrite for connections to http from everyone
else other than localhost to hit https then tell aliases to use http.

On Tuesday, November 12, 2013, mmahoney wrote:

 S the firewall was on... ufw allow 25 fixed that which got me closer.
 But
 now the HTTPs is failing because of the certificate.

 Nov 12 21:08:44 RTv4 postfix/local[6445]: 908C7480ECE:
 to=rt4tic...@rtv4.nhsocal.com javascript:;, relay=local, delay=0.32,
 delays=0.04/0.02/0/0.26, dsn=4.3.0, status=deferred (temporary failure.
 Command output: HTTP request failed: 500 Can't connect to
 rtv4.nhsocal.com:443 (certificate verify failed). Your webserver logs may
 have more information or there may be a network problem. )


 Ugh.. checking on that.



 --
 View this message in context:
 http://requesttracker.8502.n7.nabble.com/RT4-2-with-Ubuntu13-10-and-Postfix-tp55783p55788.html
 Sent from the Request Tracker - User mailing list archive at Nabble.com.



-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] RT4.2 with Ubuntu13.10 and Postfix

2013-11-12 Thread Landon Stewart
On 12 November 2013 16:03, mmahoney mmaho...@nhsocal.com wrote:


 
 root@RTv4:/opt/rt4/etc# cat /etc/aliases
 # See man 5 aliases for format
 #postmaster:root
 rt4ticket: |/opt/rt4/bin/rt-mailgate --queue General --action correspond
 --url https://rtv4.nhsocal.com/;
 rt4comment: |/opt/rt4/bin/rt-mailgate --queue General --action comment
 --url https://rtv4.nhsocal.com/;


Is --url https://rtv4.nhsocal.com/; really on a separate line in this file?
If so it should not be.  Is /etc/aliases the right file?  Check main.cf for
postfix and check and see what is defined for the alias_maps file.  Also -
If alias_maps is defined as a hash in your postfix main.cf file you must
rebuild it. Example:
Under Ubuntu you can use newaliases to rebuild the the aliases.db file
with the file specified as the alias_maps file as the source.

You might want to check this out:
https://help.ubuntu.com/community/PostfixBasicSetupHowto#Local_Alias_database

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] RT4.2 with Ubuntu13.10 and Postfix

2013-11-12 Thread Landon Stewart
Check logs and look for bounces.

On Tuesday, November 12, 2013, mmahoney wrote:

 Thanks for the prompt response. I think the copy/paste wrapped. I verified
 the aliases as a single line.

 I also cp /etc/aliases /etc/postfix/aliases
 Ran postalias /etc/aliases to create the aliases.db
 modified the main.cf

 myhostname = rtv4.nhsocal.com
 *alias_maps = hash:/etc/postfix/aliases
 alias_database = hash:/etc/postfix/aliases.db*
 myorigin = /etc/mailname
 mydestination = rtv4.nhsocal.com, localhost.nhsocal.com, localhost
 relayhost = 10.10.1.37
 mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128
 #mainbox_command = procmail -a $EXTENSION
 #mailbox_size_limit = 0
 #recipient_delimiter = +
 #inet_interfaces = all

 I will try the virtual thing, but it is a little over my head.




 --
 View this message in context:
 http://requesttracker.8502.n7.nabble.com/RT4-2-with-Ubuntu13-10-and-Postfix-tp55783p55786.html
 Sent from the Request Tracker - User mailing list archive at Nabble.com.



-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


  1   2   >