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 
> wrote:

How are you delivering mail to rt-mailgate?

On Jan 25, 2017, at 6:46 AM, Jonathan Sheehy 
> 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
www.prg.com

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com
 www.internap.com


--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com
 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 
> 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
www.prg.com

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
 lstew...@internap.com
 www.internap.com



Re: [rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Matt Zagrabelny
On Wed, Jan 25, 2017 at 3:03 PM, Matthew Coons  wrote:
> Is there anything besides restarting apache and clearing the Mason cache
> that I need to do for my changes to take effect?

Perhaps. What did you exactly do besides those two steps? Feel free to
copy and paste what commandline commands you ran.

> I found the callbacks that reference the "logout" button in the "Tabs" file
> and I commented them out.

Ideally you should be using the callback, not commenting it out.

> I restarted apache and cleared the mason cache, but I still see the logout
> option present. Even if I start a new session from a private webpage.
>
> Any ideas what I may be doing wrong?

Customizing RT can have a bit of a learning curve, but once you
understand the details, it is rather flexible and powerful.

All that being said, if this is your first customization, it might
take a few iterations before things start clicking.

-m


[rt-users] How to delete Ticket

2017-01-25 Thread Jonathan Sheehy
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
www.prg.com



Re: [rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Alex Hall
You're on Apache, so I doubt you're also using an FCGI server like Enginx
users have to? If you happen to be, you'll need to restart that separately,
and not worry about Apache. At least, I just restart the FCGI server and
not Nginx and it works. My only other idea is to reverse the order: clear
the cache, *then* restart Apache. I can't think of anything else you should
have to do. If it still doesn't work, check the names of your modified
files in local/html/Elements. If the file(s) you worked on there don't
match the names in share/html/Elements precisely, RT won't find and load
your versions.

On Wed, Jan 25, 2017 at 4:03 PM, Matthew Coons  wrote:

> Is there anything besides restarting apache and clearing the Mason cache
> that I need to do for my changes to take effect?
>
> I found the callbacks that reference the "logout" button in the "Tabs"
> file and I commented them out.
>
> I restarted apache and cleared the mason cache, but I still see the logout
> option present. Even if I start a new session from a private webpage.
>
> Any ideas what I may be doing wrong?
>
> Thanks.
>
> Matt Coons
> Incident Responder and Threat Analyst
> Information & Infrastructure Assurance (IIA)
> University of Michigan
>
> 734-764-4105 <(734)%20764-4105>
> coo...@umich.edu
>
> On Wed, Jan 25, 2017 at 3:03 PM, Matthew Coons  wrote:
>
>> Thanks Alex and Matt, this is really helpful!
>>
>>
>> Matt Coons
>> Incident Responder and Threat Analyst
>> Information & Infrastructure Assurance (IIA)
>> University of Michigan
>>
>> 734-764-4105 <(734)%20764-4105>
>> coo...@umich.edu
>>
>> On Wed, Jan 25, 2017 at 2:48 PM, Matt Zagrabelny 
>> wrote:
>>
>>> https://docs.bestpractical.com/rt/4.4.1/writing_extensions.h
>>> tml#Adding-and-Modifying-Menus
>>>
>>> On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons 
>>> wrote:
>>> > Hello RT users,
>>> >
>>> > I wanted to know if anybody had a working example or was already
>>> hiding RT
>>> > menu options from logged in users?
>>> >
>>> > The first item I want to hide is the "Logout" button for all users.
>>> We're
>>> > using SSO so it's not required to be present.
>>> >
>>> > The second item I would like to hide (for a specific user group) is
>>> the RTIR
>>> > menu option.
>>> >
>>> > Any help or suggestions would be much appreciated,
>>> >
>>> > Thank you!
>>> >
>>> > Matt Coons
>>> >
>>>
>>
>>
>


-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com


Re: [rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Matthew Coons
Is there anything besides restarting apache and clearing the Mason cache
that I need to do for my changes to take effect?

I found the callbacks that reference the "logout" button in the "Tabs" file
and I commented them out.

I restarted apache and cleared the mason cache, but I still see the logout
option present. Even if I start a new session from a private webpage.

Any ideas what I may be doing wrong?

Thanks.

Matt Coons
Incident Responder and Threat Analyst
Information & Infrastructure Assurance (IIA)
University of Michigan

734-764-4105
coo...@umich.edu

On Wed, Jan 25, 2017 at 3:03 PM, Matthew Coons  wrote:

> Thanks Alex and Matt, this is really helpful!
>
>
> Matt Coons
> Incident Responder and Threat Analyst
> Information & Infrastructure Assurance (IIA)
> University of Michigan
>
> 734-764-4105 <(734)%20764-4105>
> coo...@umich.edu
>
> On Wed, Jan 25, 2017 at 2:48 PM, Matt Zagrabelny 
> wrote:
>
>> https://docs.bestpractical.com/rt/4.4.1/writing_extensions.
>> html#Adding-and-Modifying-Menus
>>
>> On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons  wrote:
>> > Hello RT users,
>> >
>> > I wanted to know if anybody had a working example or was already hiding
>> RT
>> > menu options from logged in users?
>> >
>> > The first item I want to hide is the "Logout" button for all users.
>> We're
>> > using SSO so it's not required to be present.
>> >
>> > The second item I would like to hide (for a specific user group) is the
>> RTIR
>> > menu option.
>> >
>> > Any help or suggestions would be much appreciated,
>> >
>> > Thank you!
>> >
>> > Matt Coons
>> >
>>
>
>


Re: [rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Matthew Coons
Thanks Alex and Matt, this is really helpful!


Matt Coons
Incident Responder and Threat Analyst
Information & Infrastructure Assurance (IIA)
University of Michigan

734-764-4105
coo...@umich.edu

On Wed, Jan 25, 2017 at 2:48 PM, Matt Zagrabelny  wrote:

> https://docs.bestpractical.com/rt/4.4.1/writing_
> extensions.html#Adding-and-Modifying-Menus
>
> On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons  wrote:
> > Hello RT users,
> >
> > I wanted to know if anybody had a working example or was already hiding
> RT
> > menu options from logged in users?
> >
> > The first item I want to hide is the "Logout" button for all users. We're
> > using SSO so it's not required to be present.
> >
> > The second item I would like to hide (for a specific user group) is the
> RTIR
> > menu option.
> >
> > Any help or suggestions would be much appreciated,
> >
> > Thank you!
> >
> > Matt Coons
> >
>


Re: [rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Matt Zagrabelny
https://docs.bestpractical.com/rt/4.4.1/writing_extensions.html#Adding-and-Modifying-Menus

On Wed, Jan 25, 2017 at 11:57 AM, Matthew Coons  wrote:
> Hello RT users,
>
> I wanted to know if anybody had a working example or was already hiding RT
> menu options from logged in users?
>
> The first item I want to hide is the "Logout" button for all users. We're
> using SSO so it's not required to be present.
>
> The second item I would like to hide (for a specific user group) is the RTIR
> menu option.
>
> Any help or suggestions would be much appreciated,
>
> Thank you!
>
> Matt Coons
>


Re: [rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Alex Hall
I don't have a specific example, but you can hide the Logout option with an
overlay.

cp [RT path]/share/html/Elements/Tabs [RT path]/local/html/Elements

Now open the copy you just made, find the Logout option, and wrap it in a
conditional, or add to the conditions already present. You can check the
group membership of the current user, for instance. Once done, don't forget
to clear your Mason cache and restart RT:

find [RT path]/var/mason_data/obj -mindepth 1 -delete
/etc/init.d/[RT script name] restart

If you need more detailed instructions, let the list know.

On Wed, Jan 25, 2017 at 12:57 PM, Matthew Coons  wrote:

> Hello RT users,
>
> I wanted to know if anybody had a working example or was already hiding RT
> menu options from logged in users?
>
> The first item I want to hide is the "Logout" button for all users. We're
> using SSO so it's not required to be present.
>
> The second item I would like to hide (for a specific user group) is the
> RTIR menu option.
>
> Any help or suggestions would be much appreciated,
>
> Thank you!
>
> Matt Coons
>
>


-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com


[rt-users] Hiding menu options for particular user groups

2017-01-25 Thread Matthew Coons
Hello RT users,

I wanted to know if anybody had a working example or was already hiding RT
menu options from logged in users?

The first item I want to hide is the "Logout" button for all users. We're
using SSO so it's not required to be present.

The second item I would like to hide (for a specific user group) is the
RTIR menu option.

Any help or suggestions would be much appreciated,

Thank you!

Matt Coons


Re: [rt-users] MySQL backups of RT 4.4.1 truncated

2017-01-25 Thread Cena, Stephen (ext. 300)
Update on my MySQL backup issue: no change. I've now moved the Windows TEMP 
folders to the larger drive to see if the issue was running out of temp space 
and it has not helped. I will keep the group updated to any developments, but 
will refrain if its not anything noteworthy.  I'm going to try contacting the 
MySQL forums as this looks to be more suited to them. I'm also going to see if 
I can spin up a Linux MySQL DB server and "move" the tables into it via 
SFTP/copy, then attempt a backup there. I'm good with MySQL but it's not my 
bread & butter. Any additional help from the group will be welcomed.

To date, I've tried:
-Splitting the attachments table into its own backup job: failed.
-Moved MySQL temp folder/location to larger drive: failed.
-Moved Windows 2012 system TEMP folders to larger drive: failed.
-Ran MySQL diagnostics on the RT database affected: all tests pass

Stephen Cena
Senior Systems Administrator 
Quality Vision International, Inc.
Phone: (585) 544-0450 x300
To notify helpdesk: http://helpdesk.ogp.qvii.com or email: hd-gene...@qvii.com
To report email issues: postmas...@qvii.com


Re: [rt-users] queue change still triggers old queue's scrips

2017-01-25 Thread Sebastian Juenemann

Hi List,

ok, I came finally up with the solution myself and just want to share this.

The problem was the scrip execution order together with the wrong or misleading 
solution provided here:

https://rt-wiki.bestpractical.com/wiki/SpamFiltering (1b)

The queue change needs to be done already in the action preparation code (and not in the commit code). This is because 
all other scrips which meet the transaction condition (in this case "Crate") will be executed no matter what if their 
preparation code returns a true. For all those auto-notifications on new tickets this is always the case. So when their 
preparation code is executed the queue must have been changed already, so that their assemblage of all email recipients 
are based on the new SPAM queue (which has no watchers). Even if so, overwriting all global templates in the SPAM queue 
with empty local ones would result in empty emails (and this is based again on the queue, so the queue needs to be 
changed already).


Here is my solution for everyone interested. The commit action is in essence this one: 
https://rt-wiki.bestpractical.com/wiki/SpamScore2Priority but I found it more convenient to do this all in one scrip.


On Create Check spamassassin score and move to SPAM queue when exceeding 
threshold

custom condition:

return 0 unless $self->TransactionObj->Type eq "Create";
return 0 if $self->TicketObj->QueueObj->Name eq "SPAM";
return 1;

Custom action preparation code:

 # Match * level spam. You might want to set this higher/lower if needed
 my $match = '\*\*\*\*\*';
 my $inMessage = $self->TransactionObj->Attachments->First;
 return 0 if (!$inMessage);  # if no message attachment - assume web UI
 return 0 if (!$inMessage->GetHeader('Received'));  # exit if not email message

 my $spamLevel = $inMessage->GetHeader('X-Spam-Level');
 my $spam = ( $spamLevel !~ /$match/i ) ? 0 : 1;

 my $stat = undef;
 if ($spam) {

   # set owner to nobody
   $self->TicketObj->SetOwner( $RT::Nobody->id );

   # In any case remove any watchers to this ticket, just to be sure
   $self->TicketObj->DeleteWatcher( Type => 'Requestor');
   $self->TicketObj->DeleteWatcher( Type => 'Cc');
   $self->TicketObj->DeleteWatcher( Type => 'AdminCC');
   $self->TicketObj->DeleteWatcher( Type => 'Owner');

   my $newqueue = 'SPAM';

   my ($status, $msg) = $self->TicketObj->SetQueue($newqueue);
   $stat = $status ? 1 : 0;

   # set ticket to stalled
   $self->TicketObj->SetStatus( "stalled" );
   $self->TransactionObj->SetType("Create");
 }

 return $stat;

Custom action commit code:

#convert the spam score to negative priority
my $score = 
$self->TransactionObj->Attachments->First->GetHeader('X-Spam-Score');
unless( $score ){
   my $t = 
$self->TransactionObj->Attachments->First->GetHeader('X-Spam-Status');
   $t =~ /score=(-?\d+(|:.\d+)?)/ && ($score = $1);
}
$self->TicketObj->SetPriority( -int($score) ) if $score;

return 1;

- Sebastian


On 01/13/2017 03:34 PM, Sebastian Juenemann wrote:

Hi List,

I hope you can help me on this topic since the online documentation won't me 
bring any further.

So in order to deal with our spam I've done the following:

1) added a new spam queue
2) created a new global scrip (according to the spamfilter 1b solution provided 
here:
https://rt-wiki.bestpractical.com/wiki/SpamFiltering)
3) set the order of the scrips so that this new scrip is executed first
4) overwritten all global templates with empty ones in the spam queue (so that 
in any case a global scrip still triggers
here now mail is actually send out)

What happens is that the spam scrip successfully re-queues all spam to the spam 
queue _but_ after that still an email is
sent to all of our AdminCC's according to a global scrip which enforces this: 
The scrip order is the following

 24 0 On Creat Check Spamassasin score and move to SPAM queue when 
exceeding threshold User Defined User
Defined Blank Enabled
...
 8 On Create Notify Owner and AdminCcs On Create Notify Owner 
and AdminCcs Transaction in HTML Enabled
9 On Create Notify Ccs On Create Notify Ccs Correspondence 
in HTML Enabled
10 On Create Notify Other Recipients On Create Notify Other 
Recipients Correspondence in HTML Enabled

...

I don't quite understand this. I thought that the scrips are executed in the 
order I define. But it seems like all
scrips that meet the condition on the Transaction type (in this case "Create") 
are marked for execution and then
processed in the given order. This would mean that there are only two ways I 
can prevent further scrips from
triggering/doing their job after the detection of spam by a) either modifying 
all global scrips or b) achieve that after
the queue change the ticket/transaction itself if invalid somehow (so that 
consecutive scrips won't be able to do
anything meaningful anymore).

As I don't want to alter our global scrips (they are global and and easy for 
some reason) I would like