Re: [rt-users] How to automatically disable user account

2012-07-30 Thread Kriegers Horst
Thanks for this start idea.

Horst





> -Message d'origine-
> De : rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
> boun...@lists.bestpractical.com] De la part de Joachim Thuau
> Envoyé : lundi, 30. juillet 2012 17:20
> À : 'ML - rt-users'
> Objet : Re: [rt-users] How to automatically disable user account
>
> This should get you started:
>
> (&(objectClass=user)(!(objectClass=computer))(mail=*)(!(userAccountContr
> ol:1.2.840.113556.1.4.803:=2)))
>
> That is:
> * users, not computers, which are mail enabled, and which don't have the bit
> in userAccountControl set for "disabled account".
>
> From there, you can write a perl script that go over every user in your RT db,
> and checks them against this filter via LDAP and updates the users that are
> disabled in AD...
>
> Thanks,
> Jok
> --
> | Joachim Thuau | IT Systems Engineer - Linux / SpaceX |
>
> From: Kriegers Horst
> mailto:horst.krieg...@loro.ch>>
> Date: Monday, July 30, 2012 2:48 AM
> To: 'ML - rt-users' mailto:rt-
> us...@lists.bestpractical.com>>
> Subject: [rt-users] How to automatically disable user account
>
> Hi all,
>
> Based on AD user properties “userAccountControl” , I need to automatically
> disable RT users (similar to unchecking the checkbox "Let User Access RT" in
> the rt web UI).
> It is possible to do this ? With a Perl script ?
>
> Thanks for your help.
> Horst
>
>
>
>
>
>
> 
> Note Importante: Le contenu de ce courriel est uniquement réservé à la
> personne ou l'organisme à qui il est destiné. Si vous n'êtes pas le 
> destinataire
> prévu, veuillez nous en informer au plus vite et détruire le présent courriel.
> Dans ce cas, il ne vous est pas permis de copier ce courriel, de le 
> distribuer ou
> de l'utiliser de quelque manière que ce soit.
>
> 
> Important Notice: The content of this e-mail is intended only and solely for
> the use of the named recipient or organization. If you are not the named
> recipient, please inform us immediately and delete the present e-mail. In this
> case, you are not allowed to copy, distribute or use this e-mail in any way.
>
> 


Note Importante: Le contenu de ce courriel est uniquement réservé à la personne 
ou l'organisme à qui il est destiné. Si vous n'êtes pas le destinataire prévu, 
veuillez nous en informer au plus vite et détruire le présent courriel. Dans ce 
cas, il ne vous est pas permis de copier ce courriel, de le distribuer ou de 
l'utiliser de quelque manière que ce soit.


Important Notice: The content of this e-mail is intended only and solely for 
the use of the named recipient or organization. If you are not the named 
recipient, please inform us immediately and delete the present e-mail. In this 
case, you are not allowed to copy, distribute or use this e-mail in any way.




Re: [rt-users] Reporting SPAM From Within RT

2012-07-30 Thread hyu

On 07/31/2012 03:49 AM, Tim Gustafson wrote:

Hi,

One problem that I have fairly regularly is that SPAM makes its way
into my RT tickets.

I run SpamAssassin on my RT box, so I was thinking that it should be
easy-ish to connect RT to SpamAssassin's Bayesian learner to help weed
these messages out in the future.

I came across RT::Extension::ReportSpam but it seems that it is written for 3.6.

Does anyone have that module working in 4.x?  Does it integrate with
SpamAssassin, or does it handle SPAM some otherway?

Hi

I updated the ReportSpam extension for RT 4.0 and did a pull request in 
github, but didn't get

reply from the author.

https://github.com/bestpractical/rt-extension-reportspam/pulls




If that module does not work with SpamAssassin, how hard would it be
to connect RT to SpamAssassin?





[rt-users] Steal ticket using REST interface

2012-07-30 Thread James Marcinik
Well, I don't see this on the wiki and Google is not turning anything up, so I 
am hoping to get some answers here.

I have a basic REST client working to get tickets, add comments, etc.  In order 
to publicly reply to a ticket, I need to steal it first.  I saw in the 3.6.0 
release notes from 2006 that this functionality should be available, but the 
wiki doesn't really say how.

Here is what doesn't work so far:

Issue a basic request to "/REST/1.0/ticket/[ticketnumber]/steal"
Issue request to "/REST/1.0/ticket/[ticketnumber]/steal" and set content 
variable with "id: [ticketnumber] Action: steal" (yes, each key/value on a 
seperate line)

Issue request to "/REST/1.0/ticket/[ticketnumber]/comment" and set content 
variable with "id: [ticketnumber] Action: steal"

Issue request to "/REST/1.0/ticket/[ticketnumber]/edit" and set content 
variable with "owner: [username]" 


I know I am missing some obvious, any help?

[rt-users] RT 4.0.6 still not receiving incoming tickets via email

2012-07-30 Thread Hesan D Yousif
I have had problems with incoming tickets not being received into RT and 
mail delivery delays and failures occurring.


I have checked MX records and traced the route to the server from the 
DNS -and all seems fine and correct.


My scenario is:

RT server sits on domain X
Postfix ESMTP with authentication

Emails sent from domain Y into RT on domain X
Emails sent from RT handled by Google
Emails sent into RT also handled by Google.

Could anyone shed some light please?

Many thanks,
Hesan


Re: [rt-users] Reporting SPAM From Within RT

2012-07-30 Thread k...@rice.edu
On Mon, Jul 30, 2012 at 10:49:45AM -0700, Tim Gustafson wrote:
> Hi,
> 
> One problem that I have fairly regularly is that SPAM makes its way
> into my RT tickets.
> 
> I run SpamAssassin on my RT box, so I was thinking that it should be
> easy-ish to connect RT to SpamAssassin's Bayesian learner to help weed
> these messages out in the future.
> 
> I came across RT::Extension::ReportSpam but it seems that it is written for 
> 3.6.
> 
> Does anyone have that module working in 4.x?  Does it integrate with
> SpamAssassin, or does it handle SPAM some otherway?
> 
> If that module does not work with SpamAssassin, how hard would it be
> to connect RT to SpamAssassin?
> 
> -- 
> 
> Tim Gustafson
> t...@soe.ucsc.edu
> 831-459-5354
> Baskin Engineering, Room 313A
> 

Hi Tim,

We put DSPAM in front of our RT instances. Then if a spam message makes
it into the system, we make the ticket status Rejected and that triggers
a retrain within the DSPAM system. Maybe something like that would work
for you.

Regards,
Ken

PS What is your Spamassassin Bayesian accuracy? DSPAM always seemed much
more accurate in our situations.


[rt-users] Reporting SPAM From Within RT

2012-07-30 Thread Tim Gustafson
Hi,

One problem that I have fairly regularly is that SPAM makes its way
into my RT tickets.

I run SpamAssassin on my RT box, so I was thinking that it should be
easy-ish to connect RT to SpamAssassin's Bayesian learner to help weed
these messages out in the future.

I came across RT::Extension::ReportSpam but it seems that it is written for 3.6.

Does anyone have that module working in 4.x?  Does it integrate with
SpamAssassin, or does it handle SPAM some otherway?

If that module does not work with SpamAssassin, how hard would it be
to connect RT to SpamAssassin?

-- 

Tim Gustafson
t...@soe.ucsc.edu
831-459-5354
Baskin Engineering, Room 313A


Re: [rt-users] How to automatically disable user account

2012-07-30 Thread Joachim Thuau
This should get you started:

(&(objectClass=user)(!(objectClass=computer))(mail=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

That is:
* users, not computers, which are mail enabled, and which don't have the bit in 
userAccountControl set for "disabled account".

>From there, you can write a perl script that go over every user in your RT db, 
>and checks them against this filter via LDAP and updates the users that are 
>disabled in AD...

Thanks,
Jok
--
| Joachim Thuau | IT Systems Engineer - Linux / SpaceX |

From: Kriegers Horst mailto:horst.krieg...@loro.ch>>
Date: Monday, July 30, 2012 2:48 AM
To: 'ML - rt-users' 
mailto:rt-users@lists.bestpractical.com>>
Subject: [rt-users] How to automatically disable user account

Hi all,

Based on AD user properties “userAccountControl” , I need to automatically 
disable RT users (similar to unchecking the checkbox "Let User Access RT" in 
the rt web UI).
It is possible to do this ? With a Perl script ?

Thanks for your help.
Horst







Note Importante: Le contenu de ce courriel est uniquement réservé à la personne 
ou l'organisme à qui il est destiné. Si vous n'êtes pas le destinataire prévu, 
veuillez nous en informer au plus vite et détruire le présent courriel. Dans ce 
cas, il ne vous est pas permis de copier ce courriel, de le distribuer ou de 
l'utiliser de quelque manière que ce soit.


Important Notice: The content of this e-mail is intended only and solely for 
the use of the named recipient or organization. If you are not the named 
recipient, please inform us immediately and delete the present e-mail. In this 
case, you are not allowed to copy, distribute or use this e-mail in any way.




Re: [rt-users] EXTERNAL: Re: EXTERNAL: Re: Group not found

2012-07-30 Thread Betz, Gregory
To add to this, I'm positive that it is conflict with the old root account.

I just created another queue and the Roles section is there and watchers can be 
added.

Is there somewhere in the db that I can fix this or would it be best to just 
recreate the queues?

Thanks,
Greg

From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Betz, Gregory
Sent: Monday, July 30, 2012 10:00 AM
To: Paul Tomblin
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] EXTERNAL: Re: EXTERNAL: Re: Group not found

I came back to this issue this morning and am still at a loss.

I created a group Admin and added the root user to it. I added full rights for 
the Admin group and specifically for the user 'root' for one of the queues with 
the issue and I am still receiving the same error.


I failed to mention that I converted an old MySQL DB from another RT server to 
the current RT server with PostgreSQL DB.  I only imported specific fields from 
the old database to the new database but everything else appears to be 
functioning correctly.

The tables (along with their sequences) I imported were: attachments, 
cachedgroupmembers, groupmembers, groups, principals, tickets, topics, 
transactions, users.

Could this have been an issue?

Thanks,
Greg

From: ptomb...@gmail.com 
[mailto:ptomb...@gmail.com] On Behalf Of 
Paul Tomblin
Sent: Wednesday, July 25, 2012 1:19 PM
To: Betz, Gregory
Cc: rt-users@lists.bestpractical.com
Subject: EXTERNAL: Re: [rt-users] EXTERNAL: Re: Group not found

That's just a consequence of the other error:
%if ($Members->Count == 0 ) {

$Members->Count returns an undef because of the error, which leads to the 
second error.

On Wed, Jul 25, 2012 at 1:13 PM, Betz, Gregory 
mailto:gregory.b...@thesiorg.com>> wrote:
Also, I noticed the following message after the aforementioned warning message 
in the log.

Use of uninitialized value in numeric eq (==) at 
/opt/rt4/local/html/Admin/Elements/EditQueueWatchers line 3. 
(/opt/rt4/local/html/Admin/Elements/EditQueueWatchers:3)

Thanks,
Greg

From: 
rt-users-boun...@lists.bestpractical.com
 
[mailto:rt-users-boun...@lists.bestpractical.com]
 On Behalf Of Betz, Gregory
Sent: Wednesday, July 25, 2012 10:29 AM
To: Paul Tomblin
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] EXTERNAL: Re: Group not found

Hey Paul,

Thanks for the quick response.

I use the root account when attempting to put watchers on the queues, so I 
don't think this is the issue

Thanks,
Greg

From: ptomb...@gmail.com 
[mailto:ptomb...@gmail.com] On Behalf Of 
Paul Tomblin
Sent: Wednesday, July 25, 2012 10:25 AM
To: Betz, Gregory
Cc: rt-users@lists.bestpractical.com
Subject: EXTERNAL: Re: [rt-users] Group not found

I've seen this exact thing happen when the person trying to add the watchers 
didn't have permissions to the queues in question.  Rather than handling it 
properly, RT sticks a null queue name into the query, which the query doesn't 
like much.
On Wed, Jul 25, 2012 at 10:18 AM, Betz, Gregory 
mailto:gregory.b...@thesiorg.com>> wrote:
Hello all,

I am having issues trying to add watchers to most of my queues.  When I try to 
add a user or group I receive the error message "Group not found".

I can set watchers for 2 queues (one is the General queue) out of 9 total 
queues.

Also, I noticed that the 2 queues that I can set watchers has items under Roles 
in Group Rights while the queues that I cannot set the watchers does not.

The following error message is displayed in /var/log/httpd/error_log

==

[Wed Jul 25 12:05:06 2012] [warning]: DBD::Pg::st execute failed: ERROR:  
syntax error at or near ")"

LINE 1: ...nt(main.id) FROM GroupMembers main  WHERE 
(main.GroupId = )

 ^ at 
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 587. 
(/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:587)





[Wed Jul 25 12:05:06 2012] [warning]: RT::Handle=HASH(0x7fbc4de27b10) couldn't 
execute the query 'SELECT count(main.id) FROM GroupMembers main 
 WHERE (main.GroupId = ) ' at 
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 600.


DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH(0x7fbc4de27b10)', 
'SELECT count(main.id) FROM GroupMembers main  WHERE 
(main.Gro...') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 291

DBIx::SearchBuilder::_DoCount('RT::GroupMembers=

Re: [rt-users] EXTERNAL: Re: EXTERNAL: Re: Group not found

2012-07-30 Thread Betz, Gregory
I came back to this issue this morning and am still at a loss.

I created a group Admin and added the root user to it. I added full rights for 
the Admin group and specifically for the user 'root' for one of the queues with 
the issue and I am still receiving the same error.


I failed to mention that I converted an old MySQL DB from another RT server to 
the current RT server with PostgreSQL DB.  I only imported specific fields from 
the old database to the new database but everything else appears to be 
functioning correctly.

The tables (along with their sequences) I imported were: attachments, 
cachedgroupmembers, groupmembers, groups, principals, tickets, topics, 
transactions, users.

Could this have been an issue?

Thanks,
Greg

From: ptomb...@gmail.com [mailto:ptomb...@gmail.com] On Behalf Of Paul Tomblin
Sent: Wednesday, July 25, 2012 1:19 PM
To: Betz, Gregory
Cc: rt-users@lists.bestpractical.com
Subject: EXTERNAL: Re: [rt-users] EXTERNAL: Re: Group not found

That's just a consequence of the other error:
%if ($Members->Count == 0 ) {

$Members->Count returns an undef because of the error, which leads to the 
second error.

On Wed, Jul 25, 2012 at 1:13 PM, Betz, Gregory 
mailto:gregory.b...@thesiorg.com>> wrote:
Also, I noticed the following message after the aforementioned warning message 
in the log.

Use of uninitialized value in numeric eq (==) at 
/opt/rt4/local/html/Admin/Elements/EditQueueWatchers line 3. 
(/opt/rt4/local/html/Admin/Elements/EditQueueWatchers:3)

Thanks,
Greg

From: 
rt-users-boun...@lists.bestpractical.com
 
[mailto:rt-users-boun...@lists.bestpractical.com]
 On Behalf Of Betz, Gregory
Sent: Wednesday, July 25, 2012 10:29 AM
To: Paul Tomblin
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] EXTERNAL: Re: Group not found

Hey Paul,

Thanks for the quick response.

I use the root account when attempting to put watchers on the queues, so I 
don't think this is the issue

Thanks,
Greg

From: ptomb...@gmail.com 
[mailto:ptomb...@gmail.com] On Behalf Of 
Paul Tomblin
Sent: Wednesday, July 25, 2012 10:25 AM
To: Betz, Gregory
Cc: rt-users@lists.bestpractical.com
Subject: EXTERNAL: Re: [rt-users] Group not found

I've seen this exact thing happen when the person trying to add the watchers 
didn't have permissions to the queues in question.  Rather than handling it 
properly, RT sticks a null queue name into the query, which the query doesn't 
like much.
On Wed, Jul 25, 2012 at 10:18 AM, Betz, Gregory 
mailto:gregory.b...@thesiorg.com>> wrote:
Hello all,

I am having issues trying to add watchers to most of my queues.  When I try to 
add a user or group I receive the error message "Group not found".

I can set watchers for 2 queues (one is the General queue) out of 9 total 
queues.

Also, I noticed that the 2 queues that I can set watchers has items under Roles 
in Group Rights while the queues that I cannot set the watchers does not.

The following error message is displayed in /var/log/httpd/error_log

==

[Wed Jul 25 12:05:06 2012] [warning]: DBD::Pg::st execute failed: ERROR:  
syntax error at or near ")"

LINE 1: ...nt(main.id) FROM GroupMembers main  WHERE 
(main.GroupId = )

 ^ at 
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 587. 
(/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:587)





[Wed Jul 25 12:05:06 2012] [warning]: RT::Handle=HASH(0x7fbc4de27b10) couldn't 
execute the query 'SELECT count(main.id) FROM GroupMembers main 
 WHERE (main.GroupId = ) ' at 
/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 600.


DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH(0x7fbc4de27b10)', 
'SELECT count(main.id) FROM GroupMembers main  WHERE 
(main.Gro...') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 291

DBIx::SearchBuilder::_DoCount('RT::GroupMembers=HASH(0x7fbc4febdfb8)') 
called at /opt/rt4/sbin/../lib/RT/SearchBuilder.pm line 331

RT::SearchBuilder::_DoCount('RT::GroupMembers=HASH(0x7fbc4febdfb8)') 
called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 1407

DBIx::SearchBuilder::Count('RT::GroupMembers=HASH(0x7fbc4febdfb8)') 
called at /opt/rt4/local/html/Admin/Elements/EditQueueWatchers line 48

HTML::Mason::Commands::__ANON__('QueueObj', 
'RT::Queue=HASH(0x7fbc4feb6a28)', 'Watchers', 'RT::Group=HASH(0x7fbc5000f3f0)') 
called at /usr/local/share/perl5/HTML/Mason/Component.pm line 135


HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7fbc4febff68)

[rt-users] How to automatically disable user account

2012-07-30 Thread Kriegers Horst
Hi all,

Based on AD user properties “userAccountControl” , I need to automatically 
disable RT users (similar to unchecking the checkbox "Let User Access RT" in 
the rt web UI).
It is possible to do this ? With a Perl script ?

Thanks for your help.
Horst







Note Importante: Le contenu de ce courriel est uniquement réservé à la personne 
ou l'organisme à qui il est destiné. Si vous n'êtes pas le destinataire prévu, 
veuillez nous en informer au plus vite et détruire le présent courriel. Dans ce 
cas, il ne vous est pas permis de copier ce courriel, de le distribuer ou de 
l'utiliser de quelque manière que ce soit.


Important Notice: The content of this e-mail is intended only and solely for 
the use of the named recipient or organization. If you are not the named 
recipient, please inform us immediately and delete the present e-mail. In this 
case, you are not allowed to copy, distribute or use this e-mail in any way.