Re: [rt-users] (RT::Authen::ExternalAuth) "email exists" problem authenticating trough AD

2013-07-29 Thread Maximilien Drouet
Hi,


Yes the user is found and data retrieved correctly (i.e address, zip, etc.
) .


Any other idea ?




On Tue, Jul 23, 2013 at 11:19 AM, Maximilien Drouet wrote:

> Hi,
>
>
> Let me try, i never used ldapsearch before so i need to check the syntax.
>
>
> On Tue, Jul 23, 2013 at 11:04 AM, Craig Ringer wrote:
>
>> On 07/04/2013 11:00 PM, Maximilien Drouet wrote:
>> > (&(&(ObjectCategory=User)(ObjectClass=Person))(sAMAccountName=myuser ))
>>
>> If you execute this LDAP search directly against your directory with the
>> same base dn as given in the logs, does it find the user?
>>
>> --
>>  Craig Ringer   http://www.2ndQuadrant.com/
>>  PostgreSQL Development, 24x7 Support, Training & Services
>
>

-- 
Cordialement,

Maximilien DROUET


[rt-users] New installation of 4.0.13 - performance problem viewing tickets.

2013-07-29 Thread Richard Colley
I am having a strange performance problem viewing tickets in a recent
installation of RT v4.0.13 on RHEL6.4.  DB is Postgres 9.2.

I think the problem is related to SearchBuilder.

I have only about 20 tickets in the db, and when viewing a ticket, it can
take up to 10+ secs to display the ticket.

The problem doesn't happen everytime, but when it does, I have hundreds (if
not thousands) of the following query being executed:

SELECT consrc FROM pg_catalog.pg_constraint WHERE contype = 'c' AND
conrelid = 75880 AND conkey = '{5}'

each query iwth different conrelid and conkey values.

A short time ago, I discovered that this problem doesn't *seem* to happen
if I log out and log back in.  But if I leave a user logged in overnight,
then re-use the same session, the problem seems to occur.

Grep'ping through code shows that this statement is in DBD:Pg
column_info().  That doesn't seem to be directly called from RT, but is
part from SearchBuilder.

I'm afraid that's all I've got to go on for now.  Any suggestions on how to
narrow down and eventually remove this issue?


Thanks,
Richard


Re: [rt-users] Sending notification / alert mails without creating comments

2013-07-29 Thread Jim Berry
Craig,

On the wiki there was a reference to an rt-remind script at  
http://www.cs.kent.ac.uk/people/staff/tdb/rt3/rt-remind, which we downloaded 
and modified for our purposes. We have several cron jobs which use it to 
nag/notify owners, requestors, and managers (hourly, daily, or weekly, 
depending on the situation).  Not optimal, but it has worked for us.

Jim

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Craig Ringer
Sent: Sunday, July 28, 2013 11:04 PM
To: RT users
Subject: [rt-users] Sending notification / alert mails without creating comments

Hi all

I've been trying to do something that I expected to be simple with RT:
Send reminders to subscribers on a ticket *without* creating any comment or 
correspondence on the ticket. Send an email silently, in other words.

It turns out that much of RT::Action::SendEmail expects to have a current 
transaction and crashes ungracefully if there isn't one - it doesn't test to 
see if it gets a value for TransactionObj, but it fails at several points if 
the transaction is undef. It doesn't really seem to provide a way to tell it 
what group(s) you want notified except by examining the transaction either.

I can write a completely separate action to do the job but I'll have to 
duplicate much of the code in RT::Action::SendEmail to do so, and that seems 
like a maintenance nightmare. The module isn't easily extended by a subclass in 
this way because many of the interesting bits are in the Prepare method anyway.

How do others handle sending reminders and alerts, like SLA reminders?
Do you just live with the annoying comment spam in tickets? Send mail directly, 
bypassing most of RT's mail handling code?


I'm trying to find a way to reduce the amount of code duplication I need to do 
to send mail that's consistent with how RT expects other outbound mail to look 
- appropriate headers, etc.

RT::Action::SendEmail::SendMessage(...) has the comment "TODO: Break this out 
to a separate module" in master and has had for a very long time. Willing to 
consider a patch that does so and tries to split RT::Action::SendEmail up into 
smaller, more easily wrapped/overridden methods too?
--
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Re: [rt-users] Sending notification / alert mails without creating comments

2013-07-29 Thread Jim Brandt
This draft documentation describes how to send notifications without 
logging a comment or reply:


https://github.com/bestpractical/rt/blob/4.0/add-rt-crontool-docs/docs/automating_rt.pod

On 7/29/13 8:51 AM, Jim Berry wrote:

Craig,

On the wiki there was a reference to an rt-remind script at
http://www.cs.kent.ac.uk/people/staff/tdb/rt3/rt-remind, which we
downloaded and modified for our purposes. We have several cron jobs
which use it to nag/notify owners, requestors, and managers (hourly,
daily, or weekly, depending on the situation). Not optimal, but it has
worked for us.

Jim

-Original Message-
From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Craig Ringer
Sent: Sunday, July 28, 2013 11:04 PM
To: RT users
Subject: [rt-users] Sending notification / alert mails without creating
comments

Hi all

I've been trying to do something that I expected to be simple with RT:
Send reminders to subscribers on a ticket *without* creating any comment
or correspondence on the ticket. Send an email silently, in other words.

It turns out that much of RT::Action::SendEmail expects to have a
current transaction and crashes ungracefully if there isn't one - it
doesn't test to see if it gets a value for TransactionObj, but it fails
at several points if the transaction is undef. It doesn't really seem to
provide a way to tell it what group(s) you want notified except by
examining the transaction either.

I can write a completely separate action to do the job but I'll have to
duplicate much of the code in RT::Action::SendEmail to do so, and that
seems like a maintenance nightmare. The module isn't easily extended by
a subclass in this way because many of the interesting bits are in the
Prepare method anyway.

How do others handle sending reminders and alerts, like SLA reminders?
Do you just live with the annoying comment spam in tickets? Send mail
directly, bypassing most of RT's mail handling code?


I'm trying to find a way to reduce the amount of code duplication I need
to do to send mail that's consistent with how RT expects other outbound
mail to look - appropriate headers, etc.

RT::Action::SendEmail::SendMessage(...) has the comment "TODO: Break
this out to a separate module" in master and has had for a very long
time. Willing to consider a patch that does so and tries to split
RT::Action::SendEmail up into smaller, more easily wrapped/overridden
methods too?
--
  Craig Ringer http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services



--



[rt-users] (RT::Authen::ExternalAuth) "email exists" problem authenticating trough AD

2013-07-29 Thread Nathan Cutler
> Any other idea ?

Yes. As Kevin indicated, I would start with your 'attr_match_list'. On
your testing/development RT instance, try running it with just:

'attr_match_list' => [ 'Name' ],

and see if the user can log in. Tell us what happens.

Also, judging from the "Couldn't create user myuser : Email address in
use" error I would guess some other user has that email address. Try
searching for users with that email address in RT and tell us what you find.

Good luck.

Nathan


Re: [rt-users] New installation of 4.0.13 - performance problem viewing tickets.

2013-07-29 Thread Kevin Falcone
On Mon, Jul 29, 2013 at 04:46:25PM +0800, Richard Colley wrote:
> I am having a strange performance problem viewing tickets in a recent
> installation of RT v4.0.13 on RHEL6.4.  DB is Postgres 9.2.

Which version of DBD::Pg are you using?  There were problems with
column_info on older versions of DBD::Pg when run against Pg 9.2  
While RT doesn't directly use that method (outside of upgrades) you may
be running into some other issue.

You can find your module versions on Tools -> Configuration -> Tools
-> System Configuration and searching for DBD::Pg.

-kevin

> I think the problem is related to SearchBuilder.
> 
> I have only about 20 tickets in the db, and when viewing a ticket, it can
> take up to 10+ secs to display the ticket.
> 
> The problem doesn't happen everytime, but when it does, I have hundreds (if
> not thousands) of the following query being executed:
> 
> SELECT consrc FROM pg_catalog.pg_constraint WHERE contype = 'c' AND
> conrelid = 75880 AND conkey = '{5}'
> 
> each query iwth different conrelid and conkey values.
> 
> A short time ago, I discovered that this problem doesn't *seem* to happen
> if I log out and log back in.  But if I leave a user logged in overnight,
> then re-use the same session, the problem seems to occur.
> 
> Grep'ping through code shows that this statement is in DBD:Pg
> column_info().  That doesn't seem to be directly called from RT, but is
> part from SearchBuilder.
> 
> I'm afraid that's all I've got to go on for now.  Any suggestions on how to
> narrow down and eventually remove this issue?


pgpnimdubAtYl.pgp
Description: PGP signature


Re: [rt-users] New installation of 4.0.13 - performance problem viewing tickets.

2013-07-29 Thread Richard Colley
On 29 July 2013 23:29, Kevin Falcone  wrote:

> On Mon, Jul 29, 2013 at 04:46:25PM +0800, Richard Colley wrote:
> > I am having a strange performance problem viewing tickets in a recent
> > installation of RT v4.0.13 on RHEL6.4.  DB is Postgres 9.2.
>
> Which version of DBD::Pg are you using?


DBD::Pg is version 2.19.3.


[rt-users] Scrip

2013-07-29 Thread Bryon Baker
Hello
I am using Version 4.0.13.

I would like to call a script when someone logs into the application. Is this 
possible?

What action or condition would I use?

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


Re: [rt-users] RT mysql upgrade

2013-07-29 Thread Asif Iqbal
On Sun, Jul 28, 2013 at 10:55 PM, Asif Iqbal  wrote:

> Hi All,
>
> I were able to test migrate RT 3.8.2 + mysql 5.0.75 on Solaris 10 sparc
> T100
> to RT 4.0.15 + mysql 5.0.77.
>
> All looks OK.
>
> What is the step to upgrade mysql to latest recommended by RT?
>


If I upgrade to 5.1 do I need to run  ``make upgrade-database'' everytime ?



>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
>


-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


[rt-users] Purposeful circumvention of loop prevention

2013-07-29 Thread Landon
We have two instances of RT.  One is RTIR and the other is a very
large-scale RT.  Tickets created in RTIR's Blocks queue cause an email to
be sent to an "ABUSE-BLOCKS" queue in RT.  This all works fine.  If someone
replies to the RT ticket the subject gets updated in RTIR to include the
ticket # so that future updates in RTIR will go to the right ticket in RT.

What I want to do is have RT sent an auto-reply when the ticket is created
from the email sent by RTIR but the loop prevention is preventing this.  I
set the From, Reply-To and Precedence headers in the template to override
this behaviour and although I'm not seeing the "RT-DetectedAutoGenerated:
true" or the "RT-Squelch-Replies-To:" header on the RT end anymore it still
doesn't send an autoreply.  I've even tried overriding the
"X-RT-Loop-Prevention:" header in the template but this is apparently added
anyway and cannot be overriden. The others were overridden without an issue
except not that one.

What else can I do to trigger an autoreply here?  I know the risks and I'm
sure it's safe to do so here in this case without causing a loop.

-- 
Landon Stewart 


[rt-users] [rt-announce] RT 4.0.16 released

2013-07-29 Thread Alex Vandiver
This release fixes an important regression in the Shredder tool included
in 4.0.14 and 4.0.15.  Attempting to run the Shredder tool from the
command line would fail with a compile-time error.

http://download.bestpractical.com/pub/rt/release/rt-4.0.16.tar.gz
http://download.bestpractical.com/pub/rt/release/rt-4.0.16.tar.gz.sig

SHA1 sums

72dec0d1a6ffbedcab1db2dc1a8aee358e4fe731  rt-4.0.16.tar.gz
3fd72d7d7458577d286be2361c6be23fd95ab7d8  rt-4.0.16.tar.gz.sig

A complete changelog is available from git by running:
git log rt-4.0.15..rt-4.0.16
or visiting
https://github.com/bestpractical/rt/compare/rt-4.0.15...rt-4.0.16



signature.asc
Description: This is a digitally signed message part
___
rt-announce mailing list
rt-annou...@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-announce


Re: [rt-users] Purposeful circumvention of loop prevention

2013-07-29 Thread Landon
Nevermind this.  It was working with the changes I made but the admin of
the other RT had to make some changes so the email would come back.  It was
being generated but wasn't getting to us.  Not RT related though.


On 29 July 2013 12:23, Landon  wrote:

> We have two instances of RT.  One is RTIR and the other is a very
> large-scale RT.  Tickets created in RTIR's Blocks queue cause an email to
> be sent to an "ABUSE-BLOCKS" queue in RT.  This all works fine.  If someone
> replies to the RT ticket the subject gets updated in RTIR to include the
> ticket # so that future updates in RTIR will go to the right ticket in RT.
>
> What I want to do is have RT sent an auto-reply when the ticket is created
> from the email sent by RTIR but the loop prevention is preventing this.  I
> set the From, Reply-To and Precedence headers in the template to override
> this behaviour and although I'm not seeing the "RT-DetectedAutoGenerated:
> true" or the "RT-Squelch-Replies-To:" header on the RT end anymore it still
> doesn't send an autoreply.  I've even tried overriding the
> "X-RT-Loop-Prevention:" header in the template but this is apparently added
> anyway and cannot be overriden. The others were overridden without an issue
> except not that one.
>
> What else can I do to trigger an autoreply here?  I know the risks and I'm
> sure it's safe to do so here in this case without causing a loop.
>
> --
> Landon Stewart 
>



-- 
Landon Stewart 


Re: [rt-users] Migration Prep

2013-07-29 Thread Paul O'Rorke

Thanks Kevin,

I'm going through that right now.  I must admit I'm a little confused by 
the whole LifeCycle thing.  I'm going through 
http://bestpractical.com/docs/rt/4.0/customizing/lifecycles.html now to 
see if I can swing this.


In the meanwhile I am finding that after running *make upgrade-database* 
(took me through all the upgrades from 3.8.4 to 4.0.15) and then trying 
to set up Apache again I'm running into a loop on the login page.  If I 
run Apache I don't get a login page at all.  If I stop Apache and start


/opt/rt4/sbin/rt-server

then I get:

Reason: your browser did not supply a Referrer header 
(/opt/rt4/sbin/../lib/RT/Interface/Web.pm:397)
[Mon Jul 29 21:25:46 2013] [notice]: Marking original destination as 
having side-effects before redirecting for login.

Request: /rt/NoAuth/Login.html?next=d820f5cbf943dfe116cbee257b840411
Reason: your browser did not supply a Referrer header 
(/opt/rt4/sbin/../lib/RT/Interface/Web.pm:397)
[Mon Jul 29 21:26:00 2013] [error]: FAILED LOGIN for root from 
192.168.0.254 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:753)
[Mon Jul 29 21:26:12 2013] [error]: FAILED LOGIN for rtuser from 
192.168.0.254 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:753)


I'm assuming I've not actually managed to get my database upgraded 
properly as I'm very confident of the credentials used (tried others as 
well that worked in 3.8.4).  After running *make upgrade-database* do I 
still need to do the individual upgrades in each of the README files for 
the various updates or does *make upgrade-database* effectively do the same?


Thanks


*Paul O'Rorke*
Tracker Software Products
p...@tracker-software.com 


On 7/26/2013 5:53 AM, Kevin Falcone wrote:

On Thu, Jul 25, 2013 at 01:47:07PM -0700, Paul O'Rorke wrote:

I meant the README Docs in the installer archive mostly.

My concern with the migration is that I used custom statuses for queues and 
I have to now use
the LifeCycle set up.  I wasn't sure how the DB restore would go because I 
imagine I'm going
to have different fields in my database than what 4.0.18 expects.  Anyway - 
installing 4.0.14
on my new server now and will get back I'm sure if I run into any 
troubles...

To start, just port your custom statuses to LifeCycles.  That should
be as easy as adding them to the active and inactive lists and
defining some transitions.

Once you're migrated, you can deal with tweaking them to be more
complicated.

-kevin




[rt-users] Cc'ing requestors on comments

2013-07-29 Thread Riggle, Kevin
Hi all,

I had an interesting issue crop up recently.  One of my users commented on
a ticket but Cc'd the requestor.  The requestor didn't have
CommentOnTicket privileges, so when they responded, RT silently dropped
the mail.  The only reason we noticed was because the requestor had also
Cc'd someone else.

This behavior surprised my user, and surprised the requestor.  I now
understand why it happened, but it also surprised me.

Is this behavior intentional?  Are there ways to reduce the surprise to
the users?  (Possibly by filtering the Cc list by users who have
CommentOnTicket, or sending mail to users who don't have CommentOnTicket
from the correspondence address, so that their replies get recorded?)

- Kevin



Re: [rt-users] Migration Prep

2013-07-29 Thread Paul O'Rorke
I guess I should add that although I cannot log into RT through the WEB 
I can confirm that both root and rtuser can access mysql locally via the 
command line.  I guess however that although the users that RT runs as 
can access MySQL that does not mean that the users defined in there are 
working...



*Paul O'Rorke*
Tracker Software Products
p...@tracker-software.com 

On 7/29/2013 2:30 PM, Paul O'Rorke wrote:

Thanks Kevin,

I'm going through that right now.  I must admit I'm a little confused 
by the whole LifeCycle thing.  I'm going through 
http://bestpractical.com/docs/rt/4.0/customizing/lifecycles.html now 
to see if I can swing this.


In the meanwhile I am finding that after running *make 
upgrade-database* (took me through all the upgrades from 3.8.4 to 
4.0.15) and then trying to set up Apache again I'm running into a loop 
on the login page.  If I run Apache I don't get a login page at all.  
If I stop Apache and start

/opt/rt4/sbin/rt-server
then I get:

Reason: your browser did not supply a Referrer header 
(/opt/rt4/sbin/../lib/RT/Interface/Web.pm:397)
[Mon Jul 29 21:25:46 2013] [notice]: Marking original destination as 
having side-effects before redirecting for login.

Request: /rt/NoAuth/Login.html?next=d820f5cbf943dfe116cbee257b840411
Reason: your browser did not supply a Referrer header 
(/opt/rt4/sbin/../lib/RT/Interface/Web.pm:397)
[Mon Jul 29 21:26:00 2013] [error]: FAILED LOGIN for root from 
192.168.0.254 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:753)
[Mon Jul 29 21:26:12 2013] [error]: FAILED LOGIN for rtuser from 
192.168.0.254 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:753)


I'm assuming I've not actually managed to get my database upgraded 
properly as I'm very confident of the credentials used (tried others 
as well that worked in 3.8.4).  After running *make upgrade-database* 
do I still need to do the individual upgrades in each of the README 
files for the various updates or does *make upgrade-database* 
effectively do the same?


Thanks


*Paul O'Rorke*
Tracker Software Products
p...@tracker-software.com 


On 7/26/2013 5:53 AM, Kevin Falcone wrote:

On Thu, Jul 25, 2013 at 01:47:07PM -0700, Paul O'Rorke wrote:

I meant the README Docs in the installer archive mostly.

My concern with the migration is that I used custom statuses for queues and 
I have to now use
the LifeCycle set up.  I wasn't sure how the DB restore would go because I 
imagine I'm going
to have different fields in my database than what 4.0.18 expects.  Anyway - 
installing 4.0.14
on my new server now and will get back I'm sure if I run into any 
troubles...

To start, just port your custom statuses to LifeCycles.  That should
be as easy as adding them to the active and inactive lists and
defining some transitions.

Once you're migrated, you can deal with tweaking them to be more
complicated.

-kevin






Re: [rt-users] Sending notification / alert mails without creating comments

2013-07-29 Thread Craig Ringer
On 07/29/2013 08:51 PM, Jim Berry wrote:
> Craig,
> 
> On the wiki there was a reference to an rt-remind script at 
> http://www.cs.kent.ac.uk/people/staff/tdb/rt3/rt-remind, which we
> downloaded and modified for our purposes. We have several cron jobs
> which use it to nag/notify owners, requestors, and managers (hourly,
> daily, or weekly, depending on the situation).  Not optimal, but it
> has worked for us. 

Thanks for the tip. That script doesn't fit my needs as I need
notifications on the order of minutes not hours, individual mails for
each ticket, and really want them triggered from rt-crontool via
TicketSQL searches. It's certainly interesting.

I haven't had the same issues with my SMS notifications because the code
for them _expects_ to have to collect its own recipient list, doesn't
care about the squashed recipient list, doesn't care about RT's custom
email headers, and knows how to deliver SMSes directly.

For email I'd rather avoid duplicating all the stuff RT already does in
these areas - correctly handling squashing, adding the RT specific
headers for loop control, ticket ID, appropriate Referer headers, etc.

I think I'm going to have to refactor RT::Action::SendEmail pretty
heavily. With luck the BestPractical team might accept a patch if I can
do it without breaking things that wrap it while still making it re-usable.

-- 
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Re: [rt-users] HTML attachment - transaction has no content

2013-07-29 Thread ALok
Mark Regensberg  yaxs.net> writes:

> 
> Hi List
> 
> We are running 3.8.8 on Debian/mod_perl/Perl v5.10
> 
> Our RT instance has been working for some time - we now have a queue where
HTML/rich text emails (outbound)
> are preferred for a variety of reasons. 
> 
> When an HTML /reply/ to correspondence is sent out with an attachment, the
correct scrip fires (On
> Correspond Notify Requestors and Ccs) however the requestor receives a
"This transaction appears to
> have no content" email with the attachment.
> 
> The ticket history shows the same, i.e. the HTML body portion has been
dropped. Excerpt below. Content type
> is text/plain, but I have no idea where this is set for outbound mails.
> 
> I have trawled the lists, docs and wiki and seen a few references to (what
appears to be a) this bug, but I can't
> work out if this is a current bug or if we aren't handling/configuring
something correctly.
> 
> any ideas appreciated.
> 
> --Mark
> 
> From the ticket history:
> 
> Managed-by: RT 3.8.8 (http://www.bestpractical.com/rt/)
> RT-Originator: **cut**
> To: **cut**
> MIME-Version: 1.0
> X-RT-Original-Encoding: utf-8
> Date: Fri, 28 Jan 2011 16:46:11 +0200
> RT-Attachment: 19739/277018/184165
> RT-Attachment: 19739/277018/184166
> Content-Type: text/plain; charset="utf-8"
> Content-Transfer-Encoding: 8bit
> 
> This transaction appears to have no content
> 
> From the logs:
> 
> [Fri Jan 28 14:46:11 2011] [info]:
 **cut**>
> #19739/277018 - Scrip 6 On Correspond Notify Requestors and Ccs
(/opt/rt3/bin/../lib/
> RT/Action/SendEmail.pm:300)
> [Fri Jan 28 14:46:11 2011] [info]:
 **cut**> sent  To:
> ***cut*** (/opt/rt3/bin/../lib/RT/Action/SendEmail.p
> m:331)
> 
> 


Dear Mark,

H ave you able to resolved the issue.Me also facing the same issue.Please
help me out in this .

Thanks 
Alok