[rt-users] What do you do against spaming?

2010-01-05 Thread Michelle Konzack
Hello *,

In some days I get a new FTTH line and have setup RT to  handel  abuse
and postmaster but since yesterday, my abuse account  is  spamed  by
more then 5 messages per second.  It seems to be a DOS against my domain
tdwave.net.

How do you handel spam on abuse and postmaster?

Do you use CR ürgs on those E-Mail addresses?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
http://www.tamay-dogan.net/ Michelle Konzack
http://www.can4linux.org/   Apt. 917
http://www.flexray4linux.org/   50, rue de Soultz
Jabber linux4miche...@jabber.ccc.de   67100 Strabourg/France
IRC#Debian (irc.icq.com)  Tel. DE: +49 177 9351947
ICQ#328449886 Tel. FR: +33  6  61925193


signature.pgp
Description: Digital signature
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Exporting tickets for management viewing

2010-01-05 Thread Raed El-Hames
I might be wrong , but the forward function will only forward a 
particular reply or comment ..
As I understand it what you need is a report on a ticket(s) including 
ticket status etc, if this is the case, there is nothing to do  this 
within RT by default; however its fairly easy to do in a perl script 
using the RT api.
I have done few of those in the past if you need to, I can dig one up 
and mail you.

Regards;
Roy


Tyler Hall wrote:
 William -


   
 I am assuming that you want the contents of the replies and comments to go
 to the men upstairs.

 

 You are correct.  I'll upgrade and see if that will meet my needs.

 Thanks
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
   
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Custom commands by Email

2010-01-05 Thread Francisco Gómez Marín
Niki Serakiotou escribió:
 If the CommandByEmail plugin worked for setting Custom Fields, you could
 create a custom fields and set it. But I have not been able to set custom
 fields by mail! 
 
 Has anybody tried
 CustomField.{CFName}: custom field value
 Or
 CF.{CFName}: custom field value
 
 Or the AddCF versions? And can someone point the difference between
 CF.{CFName} and AddCF.{CFName}? There is one instance of someone claiming he
 looked at the code and found out how to use them, but he did not say how.
 They sure don't work like the wiki claims they should...
 
 
Thanks Niki, but I'm not sure how to make CommandByMail to recognize 
them as commands, and even how to handle them later.

I just want to make something easier I believe, like a 'command alias': 
redirect a custom command like 'Asunto: something' - 'Subject: 
something', maybe through a scrip?

-- 
Francisco Gómez Marín
Depatamento de Seguridad
Centro Informático Científico de Andalucía (CICA)
Avda. Reina Mercedes s/n - 41012 - Sevilla (Spain)
Tfno.: +34 955 056 600 / FAX: +34 955 056 650
Consejería de Innovación, Ciencia y Empresa
Junta de Andalucía
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Custom commands by Email

2010-01-05 Thread Mike Johnson
There is an extension available to do field assignment by email Extract
Custom Field Value Extension is the name... Best Practical coded it and
offers support on it...

maybe this is what you are looking for?

Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: (807) 766-7331
Email: mike.john...@normed.ca
Technology assistance: email nosmhelpd...@normed.ca 
Technology Emergency Contact (TEC) Mon-Fri, 8am to 5pm excluding stat
holidays: 
Off campus toll free 1 (800) 461-8777, option 8, or locally either 
(705) 662-7120 or (807) 766-7500


 Francisco Gómez Marín fgo...@cica.es 05/01/2010 5:45 am 
Niki Serakiotou escribió:
 If the CommandByEmail plugin worked for setting Custom Fields, you
could
 create a custom fields and set it. But I have not been able to set
custom
 fields by mail! 
 
 Has anybody tried
 CustomField.{CFName}: custom field value
 Or
 CF.{CFName}: custom field value
 
 Or the AddCF versions? And can someone point the difference between
 CF.{CFName} and AddCF.{CFName}? There is one instance of someone
claiming he
 looked at the code and found out how to use them, but he did not say
how.
 They sure don't work like the wiki claims they should...
 
 
Thanks Niki, but I'm not sure how to make CommandByMail to recognize 
them as commands, and even how to handle them later.

I just want to make something easier I believe, like a 'command alias':

redirect a custom command like 'Asunto: something' - 'Subject: 
something', maybe through a scrip?

-- 
Francisco Gómez Marín
Depatamento de Seguridad
Centro Informático Científico de Andalucía (CICA)
Avda. Reina Mercedes s/n - 41012 - Sevilla (Spain)
Tfno.: +34 955 056 600 / FAX: +34 955 056 650
Consejería de Innovación, Ciencia y Empresa
Junta de Andalucía
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users 

Community help: http://wiki.bestpractical.com 
Commercial support: sa...@bestpractical.com 


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Custom commands by Email

2010-01-05 Thread Kenneth Marshall
On Tue, Jan 05, 2010 at 11:45:47AM +0100, Francisco G?mez Mar?n wrote:
 Niki Serakiotou escribi?:
  If the CommandByEmail plugin worked for setting Custom Fields, you could
  create a custom fields and set it. But I have not been able to set custom
  fields by mail! 
  
  Has anybody tried
  CustomField.{CFName}: custom field value
  Or
  CF.{CFName}: custom field value
  
  Or the AddCF versions? And can someone point the difference between
  CF.{CFName} and AddCF.{CFName}? There is one instance of someone claiming he
  looked at the code and found out how to use them, but he did not say how.
  They sure don't work like the wiki claims they should...
  
  
 Thanks Niki, but I'm not sure how to make CommandByMail to recognize 
 them as commands, and even how to handle them later.
 
 I just want to make something easier I believe, like a 'command alias': 
 redirect a custom command like 'Asunto: something' - 'Subject: 
 something', maybe through a scrip?
 
 -- 
 Francisco G?mez Mar?n

There is a documentation problem on the wiki page in the description
for Custom field management. It describes the syntax as:

Custom field values
Manage custom field values. Could be used multiple times.

CustomField.{CFName}: custom field value
AddCustomField.{CFName}: custom field value
DelCustomField.{CFName}: custom field value

Short forms:

CF.{CFName}: custom field value
AddCF.{CFName}: custom field value
DelCF.{CFName}: custom field value

But the '.' is used in the perl code and is incorrect for the actual
use which should be:

Custom field values
Manage custom field values. Could be used multiple times.

CustomField{CFName}: custom field value
AddCustomField{CFName}: custom field value
DelCustomField{CFName}: custom field value

Short forms:

CF{CFName}: custom field value
AddCF{CFName}: custom field value
DelCF{CFName}: custom field value

As far as creating your own commands, you will need to make a
local version of the TakeAction.pm file that comes with the Extension.
It looks straightforward enough using the original as a guide. It would
be nice if the extension supported several different languages by default
like the RT system itself.

Regards,
Ken
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Exporting tickets for management viewing

2010-01-05 Thread Kevin Falcone
On Tue, Jan 05, 2010 at 10:35:42AM +, Raed El-Hames wrote:
 I might be wrong , but the forward function will only forward a 
 particular reply or comment ..

Newer versions of RT include a forward that applies to the whole
ticket.

-kevin

 As I understand it what you need is a report on a ticket(s) including 
 ticket status etc, if this is the case, there is nothing to do  this 
 within RT by default; however its fairly easy to do in a perl script 
 using the RT api.
 I have done few of those in the past if you need to, I can dig one up 
 and mail you.
 
 Regards;
 Roy
 
 
 Tyler Hall wrote:
  William -
 
 

  I am assuming that you want the contents of the replies and comments to go
  to the men upstairs.
 
  
 
  You are correct.  I'll upgrade and see if that will meet my needs.
 
  Thanks
  ___
  http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
  Community help: http://wiki.bestpractical.com
  Commercial support: sa...@bestpractical.com
 
 
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
  Buy a copy at http://rtbook.bestpractical.com

 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
 


pgpZM17QkJlBe.pgp
Description: PGP signature
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Custom commands by Email

2010-01-05 Thread Kevin Falcone
On Tue, Jan 05, 2010 at 08:04:21AM -0600, Kenneth Marshall wrote:
 There is a documentation problem on the wiki page in the description
 for Custom field management. It describes the syntax as:

There are tests (t/03update.t for example) that use the
CustomField.{CFName} syntax, and a canonicalize command that cleans
CustomField.{CFName} into CustomField{CFName} so they should both
work.

If there is really a bug here, I'd appreciate something in the
rt.cpan.org queue for RT-Extension-CommandByMail, which is the easiest
place to track things.

This reminds me that the 0.08_01 should become 0.08 this week

-kevin

 Custom field values
 Manage custom field values. Could be used multiple times.
 
 CustomField.{CFName}: custom field value
 AddCustomField.{CFName}: custom field value
 DelCustomField.{CFName}: custom field value
 
 Short forms:
 
 CF.{CFName}: custom field value
 AddCF.{CFName}: custom field value
 DelCF.{CFName}: custom field value
 
 But the '.' is used in the perl code and is incorrect for the actual
 use which should be:
 
 Custom field values
 Manage custom field values. Could be used multiple times.
 
 CustomField{CFName}: custom field value
 AddCustomField{CFName}: custom field value
 DelCustomField{CFName}: custom field value
 
 Short forms:
 
 CF{CFName}: custom field value
 AddCF{CFName}: custom field value
 DelCF{CFName}: custom field value
 
 As far as creating your own commands, you will need to make a
 local version of the TakeAction.pm file that comes with the Extension.
 It looks straightforward enough using the original as a guide. It would
 be nice if the extension supported several different languages by default
 like the RT system itself.


pgp9ZJ3hCGw7O.pgp
Description: PGP signature
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Custom commands by Email

2010-01-05 Thread Kenneth Marshall
Sorry about that. You are correct. I only looked briefly at the
code and the version without the '.' is the common format, which
I tested. The versions with the '.' also work for me. The docs
are correct as written.

Regards,
Ken

On Tue, Jan 05, 2010 at 10:34:42AM -0500, Kevin Falcone wrote:
 On Tue, Jan 05, 2010 at 08:04:21AM -0600, Kenneth Marshall wrote:
  There is a documentation problem on the wiki page in the description
  for Custom field management. It describes the syntax as:
 
 There are tests (t/03update.t for example) that use the
 CustomField.{CFName} syntax, and a canonicalize command that cleans
 CustomField.{CFName} into CustomField{CFName} so they should both
 work.
 
 If there is really a bug here, I'd appreciate something in the
 rt.cpan.org queue for RT-Extension-CommandByMail, which is the easiest
 place to track things.
 
 This reminds me that the 0.08_01 should become 0.08 this week
 
 -kevin
 
  Custom field values
  Manage custom field values. Could be used multiple times.
  
  CustomField.{CFName}: custom field value
  AddCustomField.{CFName}: custom field value
  DelCustomField.{CFName}: custom field value
  
  Short forms:
  
  CF.{CFName}: custom field value
  AddCF.{CFName}: custom field value
  DelCF.{CFName}: custom field value
  
  But the '.' is used in the perl code and is incorrect for the actual
  use which should be:
  
  Custom field values
  Manage custom field values. Could be used multiple times.
  
  CustomField{CFName}: custom field value
  AddCustomField{CFName}: custom field value
  DelCustomField{CFName}: custom field value
  
  Short forms:
  
  CF{CFName}: custom field value
  AddCF{CFName}: custom field value
  DelCF{CFName}: custom field value
  
  As far as creating your own commands, you will need to make a
  local version of the TakeAction.pm file that comes with the Extension.
  It looks straightforward enough using the original as a guide. It would
  be nice if the extension supported several different languages by default
  like the RT system itself.



 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Custom commands by Email

2010-01-05 Thread Kevin Falcone
On Tue, Jan 05, 2010 at 10:25:09AM -0600, Kenneth Marshall wrote:
 Sorry about that. You are correct. I only looked briefly at the
 code and the version without the '.' is the common format, which
 I tested. The versions with the '.' also work for me. The docs
 are correct as written.

Thanks for the confirmation Ken, I was worried that our tests were
insufficient in some way.

-kevin

 On Tue, Jan 05, 2010 at 10:34:42AM -0500, Kevin Falcone wrote:
  On Tue, Jan 05, 2010 at 08:04:21AM -0600, Kenneth Marshall wrote:
   There is a documentation problem on the wiki page in the description
   for Custom field management. It describes the syntax as:
  
  There are tests (t/03update.t for example) that use the
  CustomField.{CFName} syntax, and a canonicalize command that cleans
  CustomField.{CFName} into CustomField{CFName} so they should both
  work.
  
  If there is really a bug here, I'd appreciate something in the
  rt.cpan.org queue for RT-Extension-CommandByMail, which is the easiest
  place to track things.
  
  This reminds me that the 0.08_01 should become 0.08 this week
  
  -kevin
  
   Custom field values
   Manage custom field values. Could be used multiple times.
   
   CustomField.{CFName}: custom field value
   AddCustomField.{CFName}: custom field value
   DelCustomField.{CFName}: custom field value
   
   Short forms:
   
   CF.{CFName}: custom field value
   AddCF.{CFName}: custom field value
   DelCF.{CFName}: custom field value
   
   But the '.' is used in the perl code and is incorrect for the actual
   use which should be:
   
   Custom field values
   Manage custom field values. Could be used multiple times.
   
   CustomField{CFName}: custom field value
   AddCustomField{CFName}: custom field value
   DelCustomField{CFName}: custom field value
   
   Short forms:
   
   CF{CFName}: custom field value
   AddCF{CFName}: custom field value
   DelCF{CFName}: custom field value
   
   As far as creating your own commands, you will need to make a
   local version of the TakeAction.pm file that comes with the Extension.
   It looks straightforward enough using the original as a guide. It would
   be nice if the extension supported several different languages by default
   like the RT system itself.
 
 
 
  ___
  http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
  
  Community help: http://wiki.bestpractical.com
  Commercial support: sa...@bestpractical.com
  
  
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
  Buy a copy at http://rtbook.bestpractical.com
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
 


pgp9UB2nyKdRc.pgp
Description: PGP signature
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Custom commands by Email

2010-01-05 Thread Kevin Falcone
On Tue, Jan 05, 2010 at 08:04:21AM -0600, Kenneth Marshall wrote:
 As far as creating your own commands, you will need to make a
 local version of the TakeAction.pm file that comes with the Extension.
 It looks straightforward enough using the original as a guide. It would
 be nice if the extension supported several different languages by default
 like the RT system itself.

Unfortunately, the extension would have a really hard time knowing if
a mail written in latin1 should be parsed with the french, spanish,
portugues or british translations.  It would also really complicate
the parsing engine.

It may be easier to follow the previous suggestion of
RT-Extension-ExtractCustomFieldValues to implement something that is
language specific (depending on coding skills and what needs doing)

-kevin


pgpQXv1ONQQrK.pgp
Description: PGP signature
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

[rt-users] Offline Edit Set Resolved Date

2010-01-05 Thread Jason Ledford
I am trying to import data into RT from an older system and the existing 
template shows a Resolved field, but nothing I put in there will actually get 
the date in the system, it also sets to the current time.  I have tried going 
through the archives and wasn't able to find what I was looking for.  I can set 
 the other fields like started, but it never lets me set Resolved.  An 
alternative I thought about is to import it into an unused field (like starts) 
and then use sql to copy over to resolved.  I did that and experienced some 
weirdness that may or may not have been related to the db copy.  So I would 
rather import it correctly.

Help is appreciated.  Also, if anyone has a better method to import tickets I 
am open to suggestions.

Thanks.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] CustomField with Link values to doesn't link correctly

2010-01-05 Thread Kai Storbeck
Hi Kevin,

Thanks for your initial answer in October. Other issues took my attention for a 
while, but I found interest again after someone contacted me describing exactly 
the same problem.

After a small learning curve with the perl debugger, I came to the conclusion 
that the 2 customfields aren't initialized the same way, so I dug around a 
little more, and found that most CustomFields get a call to SetContextObject() 
after initialize. In Ticket-CustomFields this happens, but called from the 
ObjectCustomFieldValue not:

# diff -ruN ~/rt-3.8.7/lib/RT/ObjectCustomFieldValue.pm 
/opt/rt3/lib/RT/ObjectCustomFieldValue.pm 
--- /usr/home/kai/rt-3.8.7/lib/RT/ObjectCustomFieldValue.pm 2009-12-11 
18:27:20.0 +0100
+++ /opt/rt3/lib/RT/ObjectCustomFieldValue.pm   2010-01-05 20:49:32.0 
+0100
@@ -173,6 +173,7 @@
 sub CustomFieldObj {
my $self = shift;
my $CustomField =  RT::CustomField-new($self-CurrentUser);
+   $CustomField-SetContextObject( $self-Object );
$CustomField-Load($self-__Value('CustomField'));
return($CustomField);
 }

This patch seems to work around _my_ problem, but... since you guys are the 
experts: Is this the correct way of resolving this issue? Are there large 
performance penalties or other side effects?

Regards,
Kai

On Oct 1, 2009, at 5:28 PM, Kevin Falcone wrote:

 On Thu, Oct 01, 2009 at 11:36:57AM +0200, Kai wrote:
 Hi,
 
 I'm using RT 3.8.4, patched to 3.8.5 to see if that fixed it (since
 that was CF related) on a debian system.
 
 One of my coworkers wasn't able to click on a customfield that had a
 Link values to setting, while I am. The main difference: He has
 the right to SeeCustomField, and I have the SuperUser right.
 
 He gets an empty
  a href= target=_new512178/a
 Me:
a href=https://someurl/fubar?id=512178;
 target=_new512178/a
 
 Attached is a perlscript that immitate
 html/Elements/ShowCustomFields. You need a ticket with a customfield
 containing 1 value with a Link value To-setting, and a user thats
 permitted the necessary rights (SeeQueue, ShowTicket,
 SeeCustomField).
 
 Somewhere after the calls from a $customfield's value back to its
 CustomFieldObj() it loses its permission for the 'SeeCustomField'
 right. I'm stupified after looking at this code too long; I can't
 see where or why it fails for this user.
 
 How is the marcelv user getting the SeeCustomField right?
 Is it from being in a group, direct user assignment, being a Requestor
 or AdminCc of the ticket?
 
 Just making a test user in a copy of 3.8.5 that has SeeQueue,
 ShowTicket and SeeCustomField granted to privileged users lets a test
 user see the link as expected and runs your test script with:
 
 Found ticket: 1
 customfield-LinkValueTo():
 http://foo.com/id=__id__value=__CustomField__
 value-LinkValueTo(): http://foo.com/id=1value=asdf
 value-Content(): asdf
 value-CustomFieldObj-CurrentUserHasRight(SeeCustomField): 1
 value-CustomFieldObj-id(): 1
 CustomField-CurrentUserHasRight(SeeCustomField): 1
 CustomField-id(): 1
 
 If you have local lib mods, I suggest checking to make sure that
 they're up-to-date with 3.8.5, there are a lot of new calls to
 ContextObject and SetContextObject that could break CF permissions if
 they're lost.
 
 -kevin
 
 Could someone assist me in solving this? I sincerely doubt it is a
 missing right?
 This user has: SeeQueue, SeeCustomField, ModifyCustomField,
 AssignCustomField, ShowTicket, ShowTicketComments, CreateTicket,
 ReplyToTicket, CommentOnTicket, OwnTicket, ModifyTicket,
 DeleteTicket, TakeTicket, StealTicket.
 
 
 My output:
 
 Found ticket: 2047497
 customfield-LinkValueTo(): http://someurl.com/search?id=__CustomField__
 value-LinkValueTo():
 value-Content(): 512178
 value-CustomFieldObj-CurrentUserHasRight(SeeCustomField):
 value-CustomFieldObj-id(): 40
 CustomField-CurrentUserHasRight(SeeCustomField): 1
 CustomField-id(): 40
 
 
 
 
 #!/usr/bin/perl -w
 
 use strict;
 # debian locations:
 use lib '/usr/share/request-tracker3.8/lib';
 use lib '/etc/request-tracker3.8';
 use RT;
 use RT::User;
 RT::LoadConfig();
 RT::Init;
 
 $| = 1;
 my $username = shift || 'marcelv';
 my $ticketno = shift || 2047497;
 my $canonicalright = 'SeeCustomField';
 
 my $user = RT::User-new($RT::SystemUser);
 $user-Load($username);
 my $ticket = RT::Ticket-new($user);
 $ticket-Load($ticketno);
 print Found ticket:  . $ticket-Id . \n;
 
 my $allcustomfields = $ticket-CustomFields;
 # These snippets are taken from html/Elements/ShowCustomFields
 while (my $cf = $allcustomfields-Next ) {
my $values = $ticket-CustomFieldValues( $cf-Id );
 
# I'm assuming a single value customfield, with a template.
my $linked = $cf-LinkValueTo;
my $v = $values-First();
 
if ( $linked ) {
  print customfield-LinkValueTo(): $linked\n;
  print value-LinkValueTo():  , $v-LinkValueTo , \n;
  print value-Content():  , $v-Content , \n;
 
  print value-CustomFieldObj-CurrentUserHasRight($canonicalright): ,
 

Re: [rt-users] rt-3.8.6 is already installed... Error code 1

2010-01-05 Thread Zach Boettner
Thanks for the detailed instructions, Matthew. I really appreciate it.
However, my RT is still not quite working. Yes, mysql is running, I even
have phpMyAdmin functional. I ran the following command, it created schema
and populated tables, etc. perl rt-setup-database --action init --dba root
--dba-password

Now I can uncomment PerlRequire /usr/local/bin/webmux.pl in my httpd.conf
file without killing apache, but I still get the following page when I go to
http://myserver/rt/

You're almost there!
You haven't yet configured your webserver to run RT. You appear to have
installed RT's web interface correctly, but haven't yet configured your web
server to run the RT server which powers the web interface. The next step
is to edit your webserver's configuration file to instruct it to use RT's
mod_perl, FastCGI or SpeedyCGI handler. If you need commercial support,
please contact us at sa...@bestpractical.com.

What must I do next? Below is my rt-specific code in my httpd.conf file. Do
I need to change something in my RT_SiteConfig.pm file???:

Alias /rt /usr/local/share/rt38/html

Directory /usr/local/share/rt38/html
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order deny,allow
/Directory

PerlRequire /usr/local/bin/webmux.pl

Thanks,

Zach

-Original Message-
From: Matthew Seaman [mailto:m.sea...@infracaninophile.co.uk] 
Sent: Wednesday, December 30, 2009 12:17 PM
To: Zach Boettner
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] rt-3.8.6 is already installed... Error code 1

Zach Boettner wrote:
 Can anyone explain a bit more the steps I need to take to resolve this
 issue? Matthew, what 'command' are you talking about to run from the mysql
 client? How do I create the sql structure required by RT? I have the
 database, rt3, created, but no structure in it. I'm fairly new to FreeBSD
 and a bit lost with this RT installation/config. It's a crash course.
 Thanks, Zach

I showed you a transcript of what you'ld need to type into mysql client, and
what sort of output you should expect.  However, here it is spelled out:

  1) You should have installed mysql server.  You can tell by running
 this command:

% pkg_info -Ix mysql-server

 If there's no output from that command, then become root and do this:

# cd /usr/ports/databases/mysql50-server
# make install clean

  2) Mysql server should be running.  As root do:

# /usr/local/etc/rc.d/mysql-server status

 Now, if all is well you will see something like this:

mysql is running as pid 23757.

 There are two failure modes.  Firstly, if you see a message

mysql is not running

 then mysql is configured to start up, but isn't currently running.
 In that case, just run:

   # /usr/local/etc/rc.d/mysql-server start

 and try the status command again.  If mysql won't start, look at
 the logfile in /var/db/mysql/${hostname}.err for clues.  (ie. 
 replace ${hostname} with the hostname of your machine...)

 Secondly, if you see no output at all, then mysql has not been
 configured to start up at all.  In that case, edit the file 
 /etc/rc.conf and add the following line:

   mysql_enable=YES

 Then try starting mysql-server again.

  3) If you have not already done so, you should set a root password 
 inside mysql.  Without this, anyone with access to port 3306 on
 your server can control your database.  To set a new mysql root
 password, run this command as root:

# mysqladmin password VafugOrmup

 where 'VafugOrmup' is replaced by your own secret password.  Make a
 record of the new MySQL root password and keep it in a safe place, as
 you'll need it later.  For day to day use, you can set up /root/.my.cnf
 so that you don't need to type in the password every time you go into
 mysql client.

 Simply edit the /root/.my.cnf file to have the following contents:

 # cat /root/.my.cnf 
[client]
user = root
password = VafugOrmup

 (replacing the password with your own one).  Then make that file
accessible
 only by root:

 # chown root:wheel /root/.my.cnf
 # chmod 0600 /root/.my.cnf

 Now, when you run the command mysql as root, you should get to
 the 'mysql' prompt straight away.  Verify that this works.

  4) Note that mysql is a very complex program and has a wealth of
configuration
 and tuning settings which may need adjustment to give you good
performance 
 according to your workload and the available hardware.  This is a good
point
 to make those settings. Unfortunately, this is not something I can give
you a
 potted set of directions that you can just run through because what you
need
 to do depends very much on what sort of hardware you have, what sort of
workload 
 your RT installation will need to cope with and other considerations
like if 
 you're running any other 

[rt-users] stripping HTML : redo as RT::Action::Archive?

2010-01-05 Thread Eleanor J. Evans [Panix Staff]
On Thu, Dec 24, 2009 at 12:34:44PM -0500, Eleanor J. Evans [Panix Staff] wrote:
 I've got a scrip  template that saves comments or correspondence to a
 customer's e-mail archive.  I'd like to save the messages as
 text/plain instead of text/html.  I'm working in a 3.8.5 installation
 that's been patched to 3.8.7.

 I want to strip the HTML from messages posted via the web.  There must
 be an elegant RT way to do it, since that's how RT sends its e-mail
 for those transactions.

So I was about to write again and ask for more help, now that I've
gotten much further but am still stuck.  But the process of composing
the mail clarified my error, and now it works!  So, thanks, guys.  I
really appreciate the brainstorming.  :-).

In case anyone is tackling a similar problem, I'll share my solution
for the archives, and also ask a question -- should I redo this as an
RT::Action subclass?  As you can see, I've stuffed a lot of code in
these templates, and I seem to recall having read somewhere that is
not a recommended practice.

There are 2 scrips  associated templates, one for archiving messages
as they come in to a ticket where the customer id custom field has
already been set, and a second one for archiving past messages on a
ticket when the customer id field is updated.

Description: On Correspond or Comment Archive
Condition: User Defined
Action: Notify Other Recipients
Template: Global template: Archive
Stage: TransactionCreate

Condition:

return 0 unless ($self-TransactionObj-Type eq 'Correspond') or 
($self-TransactionObj-Type eq 'Comment') or ($self-TransactionObj-Type eq 
'Create');
return 1 if $self-TicketObj-CustomFieldValues('CustIDs')-Count;
return 0;

Global template: Archive

To: e...@panix.com
RT-Attach-Message: yes
X-Archive-Custids: {my $custids; 
my $CFV = $Ticket-CustomFieldValues('CustIDs');
while (my $CID = $CFV-Next) {
  $custids .= $CID-Content . ' ';
}
$custids}

Please archive me in CustIDs: {my $custids; 
my $CFV = $Ticket-CustomFieldValues('CustIDs');
while (my $CID = $CFV-Next) {
  $custids .= $CID-Content . ' ';
}
$custids}

{my $content = $Transaction-ContentObj;
my $headers = $content-Headers();
$headers .= \nFrom:  . $Transaction-CreatorObj-EmailAddress unless $headers 
=~ m/^From: /m;
$headers .= \nTo:  . ($Transaction-Type eq 'Comment' ? 
$Ticket-QueueObj-CommentAddress : $Ticket-QueueObj-CorrespondAddress) 
unless $headers =~ m/^To: /m;
$headers .= \nDate:  . $Transaction-Created unless $headers =~ m/^Date: /m;
$headers .= \nSubject:  . $Transaction-Subject || $Ticket-Subject unless 
$headers =~ m/^Subject: /m;
$headers}

{$Transaction-Content()}


Description: On CustID Change Archive
Condition: User Defined
Action: Notify Other Recipients
Template: Global template: Back Archive
Stage: TransactionCreate

Condition:

return 0 unless (($self-TransactionObj-Type eq CustomField   
$self-TransactionObj-Field == 2) and
 ($self-TransactionObj-OldValue ne $self-TransactionObj-NewValue));
return 1 if $self-TransactionObj-NewValue;
return 0;

Global template: Back Archive

To: e...@panix.com
RT-Attach-Message: yes
X-Archive-Custids: {$Transaction-NewValue}

Please archive me in CustID: {$Transaction-NewValue}

{ my $resolved_message; 
 my $transactions = $Ticket-Transactions;
 $transactions-Limit( FIELD = 'Type', VALUE = 'Correspond' );
 $transactions-Limit( FIELD = 'Type', VALUE = 'Comment' );
 $transactions-Limit( FIELD = 'Type', VALUE = 'Create' );
 while (my $transaction = $transactions-Next) {
   my $attachment = $transaction-ContentObj;
   my $mime = $attachment-ContentAsMIME-dup;
   $mime-head-mime_attr(content-type = text/plain);
   RT::I18N::SetMIMEEntityToEncoding( $mime,
RT-Config-Get('EmailOutputEncoding'),
'mime_words_ok', );

   $headers = $mime-header_as_string();
   chomp($headers);
   $headers .= \nFrom:  . $attachment-CreatorObj-EmailAddress unless 
$headers =~ m/^From: /m;
   $headers .= \nTo:  . ($transaction-Type eq 'Comment' ? 
$Ticket-QueueObj-CommentAddress : $Ticket-QueueObj-CorrespondAddress) 
unless $headers =~ m/^To: /m;
   $headers .= \nDate:  . $transaction-Created unless $headers =~ m/^Date: 
/m;
   $headers .= \nSubject:  . $transaction-Subject || $Ticket-Subject unless 
$headers =~ m/^Subject: /m;
   $resolved_message .= $headers;
   $resolved_message .= \n\n;
   $resolved_message .= $transaction-Content();
   $resolved_message .= \n\n\n;
 }
 $resolved_message;
}

There's a procmail recipe at the receiving end that splits the
forwarded messages, discarding the first part:

:0:
* ^X-Archive-Custids: \/[0-9]+
| formail +1 -ds /path/to/archives/${MATCH}


-- 
Eleanor J. (Piglet) Evans, e...@panix.com
Customer Support, (212) 741-4400
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at 

Re: [rt-users] CustomField with Link values to doesn't link correctly

2010-01-05 Thread Kevin Falcone
On Tue, Jan 05, 2010 at 09:10:13PM +0100, Kai Storbeck wrote:

Hi Kai

Thanks for digging more into this

 Thanks for your initial answer in October. Other issues took my
 attention for a while, but I found interest again after someone
 contacted me describing exactly the same problem.
 
 After a small learning curve with the perl debugger, I came to the
 conclusion that the 2 customfields aren't initialized the same way,
 so I dug around a little more, and found that most CustomFields get
 a call to SetContextObject() after initialize. In
 Ticket-CustomFields this happens, but called from the
 ObjectCustomFieldValue not:

This is correct, without a call to SetContextObject some rights cannot
be found.

This is why I was curious about how your coworker gets the
SeeCustomField right (is he an admincc, requestor, owner, etc)
since it changes the way the right is searched for.

Your fix looks mostly correct, except that the function you're
modifying should live in ObjectCustomFieldValue_Overlay.pm, but that
isn't your fault, it is code from 5+ years ago.

-kevin

 # diff -ruN ~/rt-3.8.7/lib/RT/ObjectCustomFieldValue.pm 
 /opt/rt3/lib/RT/ObjectCustomFieldValue.pm 
 --- /usr/home/kai/rt-3.8.7/lib/RT/ObjectCustomFieldValue.pm   2009-12-11 
 18:27:20.0 +0100
 +++ /opt/rt3/lib/RT/ObjectCustomFieldValue.pm 2010-01-05 20:49:32.0 
 +0100
 @@ -173,6 +173,7 @@
  sub CustomFieldObj {
   my $self = shift;
   my $CustomField =  RT::CustomField-new($self-CurrentUser);
 + $CustomField-SetContextObject( $self-Object );
   $CustomField-Load($self-__Value('CustomField'));
   return($CustomField);
  }
 
 This patch seems to work around _my_ problem, but... since you guys are the 
 experts: Is this the correct way of resolving this issue? Are there large 
 performance penalties or other side effects?
 
 Regards,
 Kai
 
 On Oct 1, 2009, at 5:28 PM, Kevin Falcone wrote:
 
  On Thu, Oct 01, 2009 at 11:36:57AM +0200, Kai wrote:
  Hi,
  
  I'm using RT 3.8.4, patched to 3.8.5 to see if that fixed it (since
  that was CF related) on a debian system.
  
  One of my coworkers wasn't able to click on a customfield that had a
  Link values to setting, while I am. The main difference: He has
  the right to SeeCustomField, and I have the SuperUser right.
  
  He gets an empty
 a href= target=_new512178/a
  Me:
 a href=https://someurl/fubar?id=512178;
  target=_new512178/a
  
  Attached is a perlscript that immitate
  html/Elements/ShowCustomFields. You need a ticket with a customfield
  containing 1 value with a Link value To-setting, and a user thats
  permitted the necessary rights (SeeQueue, ShowTicket,
  SeeCustomField).
  
  Somewhere after the calls from a $customfield's value back to its
  CustomFieldObj() it loses its permission for the 'SeeCustomField'
  right. I'm stupified after looking at this code too long; I can't
  see where or why it fails for this user.
  
  How is the marcelv user getting the SeeCustomField right?
  Is it from being in a group, direct user assignment, being a Requestor
  or AdminCc of the ticket?
  
  Just making a test user in a copy of 3.8.5 that has SeeQueue,
  ShowTicket and SeeCustomField granted to privileged users lets a test
  user see the link as expected and runs your test script with:
  
  Found ticket: 1
  customfield-LinkValueTo():
  http://foo.com/id=__id__value=__CustomField__
  value-LinkValueTo(): http://foo.com/id=1value=asdf
  value-Content(): asdf
  value-CustomFieldObj-CurrentUserHasRight(SeeCustomField): 1
  value-CustomFieldObj-id(): 1
  CustomField-CurrentUserHasRight(SeeCustomField): 1
  CustomField-id(): 1
  
  If you have local lib mods, I suggest checking to make sure that
  they're up-to-date with 3.8.5, there are a lot of new calls to
  ContextObject and SetContextObject that could break CF permissions if
  they're lost.
  
  -kevin
  
  Could someone assist me in solving this? I sincerely doubt it is a
  missing right?
  This user has: SeeQueue, SeeCustomField, ModifyCustomField,
  AssignCustomField, ShowTicket, ShowTicketComments, CreateTicket,
  ReplyToTicket, CommentOnTicket, OwnTicket, ModifyTicket,
  DeleteTicket, TakeTicket, StealTicket.
  
  
  My output:
  
  Found ticket: 2047497
  customfield-LinkValueTo(): http://someurl.com/search?id=__CustomField__
  value-LinkValueTo():
  value-Content(): 512178
  value-CustomFieldObj-CurrentUserHasRight(SeeCustomField):
  value-CustomFieldObj-id(): 40
  CustomField-CurrentUserHasRight(SeeCustomField): 1
  CustomField-id(): 40
  
  
  
  
  #!/usr/bin/perl -w
  
  use strict;
  # debian locations:
  use lib '/usr/share/request-tracker3.8/lib';
  use lib '/etc/request-tracker3.8';
  use RT;
  use RT::User;
  RT::LoadConfig();
  RT::Init;
  
  $| = 1;
  my $username = shift || 'marcelv';
  my $ticketno = shift || 2047497;
  my $canonicalright = 'SeeCustomField';
  
  my $user = RT::User-new($RT::SystemUser);
  $user-Load($username);
  my $ticket = RT::Ticket-new($user);
  

[rt-users] Passing through values in a scrip

2010-01-05 Thread Jonathan Rummel

Hi all,

I have a scrip to auto-create a dependent (child) ticket that I have
posted below.  The newly created ticket will have the same custom field
('Progress') as the ticket it depends on.  I would like the newly created
ticket's 'Progress' custom field to have the same value as it's parent
ticket has in the same custom field.  Essentially, I want to pass a value
from the parent ticket to the child ticket.  Can anyone help me out with
this and tell me how to incorporate it into the below code?  I'm really
stuck here!  Thanks so much!

Custom condition:
if ($self-TicketObj-FirstCustomFieldValue('Progress') eq 'Request Data') {
 return 1;
}
return 0; 

Custom action preparation code:
return 1;

Custom action cleanup code:
my $trans = $self-TransactionObj;
my $tkt = $self-TicketObj;

my $requestors = [ $tkt-Requestors-MemberEmailAddresses];
my $new_tkt = RT::Ticket-new($RT::SystemUser); my ($id, $msg) =
$new_tkt-Create(
 Queue = Data Analysis,
 Subject = $tkt-Subject .  (child ticket),
 Owner = test,
 Status = 'new',
 Requestor = $requestors,
 DependedOnBy = $tkt-Id);

return 1; 
-- 
View this message in context: 
http://old.nabble.com/Passing-through-values-in-a-scrip-tp27026744p27026744.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] RT Integration with Twitter?

2010-01-05 Thread steven
Boss wants to know if RT can interface directly with Twitter. I think he
wants the server to send tweets, instead of paging someone. Has anyone done
anything like this?

thanks!

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Problems installing MergeUsers

2010-01-05 Thread Aaron Guise
Hi Everyone,

I have just tried to install the Extension RT::Extension::MergeUsers from
CPAN on our instance of RT 3.8.6.

Unfortunately trouble soon surfaced as shown below,  bad make test.  Any
ideas what may contribute to this?

cpan[7] install RT::Extension::MergeUsers
Running install for module 'RT::Extension::MergeUsers'
Running make for F/FA/FALCONE/RT-Extension-MergeUsers-0.03.tar.gz
  Has already been unwrapped into directory
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm
  Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e
test_harness(0, 'inc', 'blib/lib', 'blib/arch') t/*.t
t/01merge_usersCan't locate RT/Test.pm in @INC (@INC contains:
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm/inc
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm/blib/lib
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm/blib/arch /etc/perl
/usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl . /etc/perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
t/01merge_users.t line 5.
BEGIN failed--compilation aborted at t/01merge_users.t line 5.
# Looks like your test died before it could output anything.
t/01merge_usersdubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-16
Failed 16/16 tests, 0.00% okay
t/change_email.Can't locate RT/Test.pm in @INC (@INC contains:
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm/inc
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm/blib/lib
/root/.cpan/build/RT-Extension-MergeUsers-0.03-c7kJsm/blib/arch /etc/perl
/usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl . /etc/perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
t/change_email.t line 6.
BEGIN failed--compilation aborted at t/change_email.t line 6.
# Looks like your test died before it could output anything.
t/change_email.dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-8
Failed 8/8 tests, 0.00% okay
Failed Test   Stat Wstat Total Fail  List of Failed
---
t/01merge_users.t  255 6528016   32  1-16
t/change_email.t   255 65280 8   16  1-8
Failed 2/2 test scripts. 24/24 subtests failed.
Files=2, Tests=24,  0 wallclock secs ( 0.04 cusr +  0.01 csys =  0.05 CPU)
Failed 2/2 test programs. 24/24 subtests failed.
make: *** [test_dynamic] Error 255
  FALCONE/RT-Extension-MergeUsers-0.03.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports FALCONE/RT-Extension-MergeUsers-0.03.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 FALCONE/RT-Extension-MergeUsers-0.03.tar.gz  : make_test NO
*
Regards,*

*Aaron Guise

  07 838 7793
027 212 6638
aa...@guise.net.nz
 *


MSN: gui...@hotmail.com
 [image: Facebook] http://www.facebook.com/shadysandman
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Problems installing MergeUsers

2010-01-05 Thread Jerrad Pierce
 Unfortunately trouble soon surfaced as shown below,  bad make test.  Any 
 ideas what may contribute to this?
Your RT installation isn't @INC so cpan can't access RT::Test.

Note that the README says nothing about make test,
and few if any other extensions seem to include tests because
of this and other headaches.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com