Re: [rt-users] Forwarding an e-mail with an HTML alternative

2014-02-07 Thread Martin Drasar
On 6.2.2014 17:21, Kevin Falcone wrote:
 On Thu, Feb 06, 2014 at 01:07:26PM +0100, Martin Drasar wrote:
 4.2 does a much better job passing along multipart mails.
 You cannot easily force RT to send a custom alternative email,
 especially not in 4.0.

Thanks for your response. I am not necessarily looking for an easy way
to make RT do my bidding and upgrade is not an option right now. In a
way, I do not really need to use the template at all, incoming messages
are formated just as I want them to be.

I wanted to create a scrip that would just forward the mail to
requestors (that are set on ticket create via the REST interface). But I
have some problems with it.

This is my scrip:

*
package RT::Action::ForwardGatewayReport;

use strict;
use warnings;

use base qw(RT::Action::SendEmail);

use Email::Address;

sub Prepare {
my $self = shift;
# Set recipients to ticket requestors
$self-SetRecipients();
return 1;
}

sub Commit {
  my $self = shift;

  my $mail;

  # ???
  # What here?
  # ???

  my $rc = $self-SendMessage($mail);
  if ($rc  RT-Config-Get('RecordOutgoingEmail'))
  {
$self-RecordOutgoingMailTransaction($mail);
  }
  return $rc;
}
**

I have tried to recreate the $mail with transaction attachments read as
ContentAsMIME() but I have never managed to successfully extract the
original email.

The other thing I have in mind is to create a new mime object of type
multipart/alternative and insert those two text/plain and text/html
parts. But that seems to me a bit cumbersome, given that everything is
already there.

Other issue I am having is that using this script, the correspondence
gets recorded gazzilion times and not just once. Do you have any idea,
where the problem might be?

Thanks,
Martin


[rt-users] Forwarding an e-mail with an HTML alternative

2014-02-06 Thread Martin Drasar
Hi,

in our RT installation (4.0.6) we have a tool that sends e-mails to the
RT with Content-Type: multipart/alternative that I want to forward from
RT to all recipients. On the receiving end we have a scrip that
OnCorrespond notifies requestors, etc... I can make it send the
text/plain part easily, but I have troubles with the text/html part. I
have checked the templates.pod documentation where it states that if I
set the Content-Type inside the template to text/html, it will
autogenerate the multipart message and create the text/plain part by
itself. Which it does... but suboptimally at best. Is there a way to
just forward my handcrafted multipart message without much RT's
interference?

Thank you.

Martin


Re: [rt-users] Get the From: header of currently sent mail

2013-01-15 Thread Martin Drasar
On 10.1.2013 15:11, Martin Drasar wrote:
 Hello,
 
 in my setup I have patched lib/RT/Action/Notify.pm in such way that it
 adds some attachments to a mail. In some cases we send mails that have
 no-reply address in From: and Reply-To: and I would like to send these
 mails without those attachments. However, I have not found a way to
 query either From: or Reply-To:.
 
 Could you please tell me how to check these headers inside Notify.pm?
 And if it is not possible, could you please give me a hint on how to do
 it some other way?

Hi,

I am just bumping this mail as I was not yet able to come with a
solution. I know that I can't be the only one with such requirements
around here.

Thanks,
Martin


[rt-users] Get the From: header of currently sent mail

2013-01-10 Thread Martin Drasar
Hello,

in my setup I have patched lib/RT/Action/Notify.pm in such way that it
adds some attachments to a mail. In some cases we send mails that have
no-reply address in From: and Reply-To: and I would like to send these
mails without those attachments. However, I have not found a way to
query either From: or Reply-To:.

Could you please tell me how to check these headers inside Notify.pm?
And if it is not possible, could you please give me a hint on how to do
it some other way?

Regards,
Martin


Re: [rt-users] Lowercasing of message headers

2012-10-10 Thread Martin Drasar
On 9.10.2012 18:38, Thomas Sibley wrote:
 It's possible, yes.  I don't know where it may be happening in this
 particular case, and it may not even be in RT.  Mail headers, however,
 are case insensitive, so any change in case shouldn't be affecting your
 usage.  (And if it is, that sounds like a bug somewhere.)

Hi Thomas,

you are right... The lowercasing does not seem to be a problem. Right
now it seems that the problem is much more devious - RT not executing
the prepare action for a scrip. On my devel machine it was happening
about half the time (the action is stored in a separate file), but it
stopped after the restart (I was altering the file before the restart,
though). I have added some debug code and restarted the production
machine and will be monitoring it further...

Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] Lowercasing of message headers

2012-10-09 Thread Martin Drasar
Hi,

I have hit a strange problem with mail header casing. At our site, we
are preprocessing mails from various automatic reporting tools and
durign this preprocessing some headers are added and then the message is
sent via 'sendmail -oi -t' to RT.

One header that is causing us problems is 'X-RT-Incident-IP'. When the
message is leaving the preprocessor, i.e. before being printed to the
sendmail, the header looks as it should. However, when I look at it from
the RT web UI, I see 'X-RT-Incident-Ip' (notice the lowercase 'p' at the
end). Strange thing is that the header 'X-RT-Incident-ID' goes through
unaffected...

My question is - can RT somehow lowercase some of my headers? And if you
think that it cannot, could you give me a hint, how to convince sendmail
on the receiving end to print the headers that arrived? I need to find
who is causing it and so far it is either sendmail on the sending or
receiving end, or the RT.

Any help is really appreciated.

Best regards,
Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Can't fork at Mailer.pm

2012-10-08 Thread Martin Drasar
On 5.10.2012 19:05, Thomas Sibley wrote:
 On 10/05/2012 02:31 AM, Martin Drasar wrote:
 after upgrading to RT 4.0.6 I am having problems with mail sending. This
 line starts to appear in log:

 Scrip Commit 6 died. - Can't fork at /usr/share/perl5/Mail/Mailer.pm
 line 145

 and no mail can be sent until I restart the Apache.

 Do you have any idea why it is happening? And more importantly - how can
 I solve this so it does not happen again?
 
 Can't fork means your operating system is dangerously out of memory.
 You should tune Apache and anything else on the box (your database
 server?) to coexist peacefully.
 
 What MailCommand are you using in RT?

Hi Thomas,

I am using sendmail as a mail command, but you are most likely right
about insufficient memory. I have checked the logs and Apache processes
were dying of memory starvation. I have doubled the memory (it was only
1 gig) and will check if it keeps happening.

Thanks,
Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Can't fork at Mailer.pm

2012-10-08 Thread Martin Drasar
On 8.10.2012 10:53, Tim Cutts wrote:
 Make sure you have plenty of swap allocated; you may not need the memory as 
 physical.  I run the RT web server on a machine with only 2GB of RAM, and 
 it's fine.  I don't run the database on the same machine, though.  You have 
 to remember that when Apache/perl forks to exec the sendmail binary, 
 temporarily you double the virtual memory requirement of the Apache/perl 
 setup.  You either have to have virtual memory overcommit turned on (which I 
 think is the default on most Linux systems these days) or to have enough swap 
 allocated to cope.  
 
 vm.overcommit_memory = 0
 
 in /etc/sysctl.conf is probably what you want.  You probably actively don't 
 want it to be set to 2.
 
 Tim
 

Hi Tim,

thank you for the tips, I was not aware about doubling the virtual
memory requirements. I will look into it.

Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Can't fork at Mailer.pm

2012-10-08 Thread Martin Drasar
On 8.10.2012 11:29, Tim Cutts wrote:
 It's only for a split second, and the memory isn't used.  UNIX doesn't just 
 start an application in one go, it uses two steps:
 
 1)  fork
 
 This duplicates the current process, and both processes continue executing.
 UNIX does this with so-called copy-on-write, so the pages aren't actually 
 duplicated until they're modified, but nevertheless, the potential exists for 
 both copies to be completely required, so if you have vm.overcommit_memory 
 set to 2, you need all that virtual memory to be available just in case.
 
 2)  exec
 
 the newly forked process usually immediately executes the exec() system call, 
 which replaces the current process' virtual memory image with the desired 
 program.  At this point, the virtual memory requirements go back down again 
 (assuming the new process is something small, which in  the case of sendmail, 
 it is).
 
 Apologies if there are errors and oversimplifications in the above, I'm not 
 exactly a total UNIX beardy type.
 
 We've seen this bite us on some of our HPC clusters at work - there, we do 
 have vm.overcommit_memory set to 2, because we want programs allocating too 
 much memory to die immediately, without risk of the kernel's out of memory 
 killer zapping the wrong thing.  A common problem on such machines is very 
 large computational jobs trying to start sub-processes - as soon as they do, 
 their virtual memory requirement doubles and the fork() fails with an out of 
 memory error.
 
 It just seemed to me that it might be the case with your system.  Try the 
 output of:
 
 cat /proc/sys/vm/overcommit_memory
 
 if it's 2, then this is probably your problem.
 Tim

I have checked the overcommit settings and it is zero. It seems that the
problem was purely in RT and postgres running with mostly default
settings on one machine with not enough memory. It was good enough for
RT 3.8.7, but it is not for 4.0.6. Although now I remember a few times
when processes were killed because of insufficient memory back then. But
it happened so little that we did not pay attention. I will not be
making the same mistake again...

I will ask some greybeard to check the settings for me or throw memory
at it, until the problem goes away :-)

Anyway, thanks a lot for your help.

Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] Can't fork at Mailer.pm

2012-10-05 Thread Martin Drasar
Hi,

after upgrading to RT 4.0.6 I am having problems with mail sending. This
line starts to appear in log:

Scrip Commit 6 died. - Can't fork at /usr/share/perl5/Mail/Mailer.pm
line 145

and no mail can be sent until I restart the Apache.

Scrip 6 is On Correspond Notify Requestors and Ccs

Do you have any idea why it is happening? And more importantly - how can
I solve this so it does not happen again?

Thank you for your insights.

Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


[rt-users] Signing by default

2012-09-27 Thread Martin Drasar
Hi,

when a user responds to a ticket at our site, the message is forwarded
to all interested parties and the user's name and email is untouched
(i.e. no 'via RT', changed mail or anything else).

We would like to enable default signing, but there is a problem with
those mails. As they have an email address the RT does not have the
secret key for, they are not sent.

We in fact only need to enable default signing for messages created via
web interface. Is there some clean way to do it? I know that I can hack
the SignEncryptWidget and hardcode the Sign value there, thus forcing
the signing only in the web interface, but this does not seem like a
long-term solution.

Do you have any idea for clean solution?

Thanks,
Martin


Final RT training for 2012 in Atlanta, GA - October 23  24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] rt-mailgate problem - certificate verify failure ?

2012-08-21 Thread Martin Drasar
On 21.8.2012 15:59, Ethier, Michael wrote:
 Hello,
 
  
 
 The rt-mailgate program acts differently between v 3.8.8 and v 4.0.6.
 The v 3.8.8 version works
 
 fine using https, and even when I have v 4.0.6 running with the
 /etc/aliases point to the v 3.8.8 version of rtmailgate, email
 
 get sent to the queue. But the v 4.0.6 version fails with certificate
 verify failed, output from mailq:
 
  
 
 (temporary failure. Command output: An Error Occurred = 
 500 Can't connect to testrt.rc.fas.harvard.edu:443 (certificate verify
 failed))
 
  r...@testrt.rc.fas.harvard.edu
 
  
 
 Any ideas as to the verification of my RT/ssl setup,  on how to fix this
 ? Apparently the RT 4.0.6 is less forgiving about the ssl setup and config.
 
 I ran RT configure with the --enable-ssl-mailgate option and installed
 all perl modules required with “make fixdeps” in RT 4.0.6.
 
  
 
 Thanks,
 
 Mike
 
  
 
 This is in /etc/aliases:
 
 # rt3
 
 rt: |/opt/rt-3.8.8/bin/rt-mailgate --queue 'General' --action
 correspond --url https://testrt.rc.fas.harvard.edu/;
 
 rt-comment: |/opt/rt-3.8.8/bin/rt-mailgate --queue 'General' --action
 comment --url https://testrt.rc.fas.harvard.edu/;
 
  
 
 # rt4
 
 #rt: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file
 /etc/pki/tls/certs/ca-bundle.crt --action correspond --url
 https://testrt.rc.fas.harvard.edu/;
 
 #rt-comment: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file
 /etc/pki/tls/certs/ca-bundle.crt --action comment --url
 https://testrt.rc.fas.harvard.edu/;
 

Hi Mike,

add this option to your aliases if you want to bypass certificate
validation: --no-verify-ssl

So your rt entry in /etc/aliases would look like this:

#rt: |/opt/rt4/bin/rt-mailgate --queue 'General' --ca-file
/etc/pki/tls/certs/ca-bundle.crt --action correspond --url
https://testrt.rc.fas.harvard.edu/ --no-verify-ssl

Martin


Re: [rt-users] rt-mailgate problem - certificate verify failure ?

2012-08-21 Thread Martin Drasar
On 21.8.2012 16:16, Ethier, Michael wrote:
 Hi Martin,
 
 Thanks for the suggestion but if I enable --no-ssl I will be creating a 
 security
 vulnerability no ?
 
 Thanks,
 Mike

Hi,

that's for sure. This was a suggestion for a development machine (the
name testrt.rc.fas.harvard.edu suggest that it is).

If you want to avoid this step then you have to have a valid certificate
for testrt.rc.fas.harvard.edu signed by a certificate authority that is
in the ca bundle you are passing to rt-mailgate.

Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-17 Thread Martin Drasar
On 16.8.2012 18:48, Thomas Sibley wrote:
 403 is Forbidden.  RT denies direct requests to /Elements/ directories
 (among other internal components).  This denial happens in RT's normal
 request handling phase, which doesn't get called when you set inherit =
 undef.

Hi Thomas,
thank you, moving it outside of elements to custom directory did the
trick. It finally works!

 Please just remove the %flags section all together.  You also lose
 things like encoding handling, not to mention authentication, when you
 disable RT's request handling.

I have gladly thrown it away...

 If I keep it, I get back following error: syntax error at
 /home/RT/RT-4.0.6/local/html/Ticket/Elements/TestComponent line 15, at EOF
 
 I'm betting it's the semicolon in the %flags section.  Remove it.  The
 line number being off is Mason getting it wrong (I'll bet it's the line
 # of the Mason object file).

Heh, I am used to missing semicolon, not the other way round. Anyway
this was really the cause. Removing it made it worked, although it is no
longer necessary because of what was written before.

Still, I wonder how come that Paul could successfully run my scripts...

Anyway, big thanks to you.

Martin


[rt-users] Accessing Ticket from MakeClicky callback

2012-08-17 Thread Martin Drasar
Hi,

is it possible to access ticket object from MakeClicky callback? For
example, I have a callback that recognizes an IP and allows to perform
set of actions on click. And for one of that action, I need to have
current ticket subject. How can I get access to such information?

Thanks,
Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-16 Thread Martin Drasar
Hi,

it appears I've reached a dead end...

This is my javascript ajax call (practically identical to the one Paul
posted):

 jQuery.ajax
 (
   {
 type: 'POST',
 url:  'Elements/TestComponent',
 data:
 {
   'ip': ip
 },
 dataType: 'json',
 traditional: true,
 success: successCallback,
 error:   errorCallback
   }
 );

According to Tamper Data, it gets sent and it looks like it contains the
right data.

This is my component:

 % $r-content_type('application/json');
 % JSON( \@something ) |n %
 % $m-abort();
 
 %init
 my @something;
 push (@something, 'something');
 /%init
 
 %flags
 inherit = undef;
 /%flags

The problem is, when I remove the flags section, the ajax call fails
with 403. If I keep it, I get back following error: syntax error at
/home/RT/RT-4.0.6/local/html/Ticket/Elements/TestComponent line 15, at EOF

Anyone got any idea?

Thanks,
Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-16 Thread Martin Drasar
On 16.8.2012 13:15, Paul Tomblin wrote:
 
 
 On Thu, Aug 16, 2012 at 5:22 AM, Martin Drasar dra...@ics.muni.cz
 mailto:dra...@ics.muni.cz wrote:
 
 
 The problem is, when I remove the flags section, the ajax call fails
 with 403. If I keep it, I get back following error: syntax error at
 /home/RT/RT-4.0.6/local/html/Ticket/Elements/TestComponent line 15,
 at EOF
 
 
 Do you see anything in the logs?

Nope...

rt.log is empty, apache error log as well and the only thing I see in
access log is 'POST /Ticket/Elements/TestComponent HTTP/1.1 200 1322'

I can post the code stack, but I am afraid that there is not much that
can help...

Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-16 Thread Martin Drasar
On 16.8.2012 13:37, Paul Tomblin wrote:

 Unfortunately somewhere between RT and Mason and perl a lot of the
 errors go unreported - you just have to narrow down where the problem is
 with a lot of calls to $RT::Logger-debug.  But first things first, you
 need to turn up the logging in /opt/rt4/etc/RT_SiteConfig.pm
 Set( $LogToScreen, debug);
 Set( $LogToSyslog, debug);
 You also need to have a look at line 15 and before in your component.

When I said that I saw nothing in rt.log I meant nothing of importance.
I have the debug logging turned on.

As for the line 15 - I have posted the entire component two mails
before. It only has 12! lines and the reported error is at EOF. That
would indicate that there might be something unfinished like missing
bracket or such. However, by looking at the code, I can't see anything
wrong. First it was almost direct copy of the code you sent at first and
then when it did not work I used component from
share/html/Helpers/Autocomplete/ by Thomas advice as a template. But
nothing seems to work.

I have made even smaller component, in fact smallest that does not 403
on me:

 %flags
 inherit = undef;
 /%flags

Ajax request on this component fails with this error:
Error during compilation of
/home/RT/RT-4.0.6/local/html/Ticket/Elements/TestComponent:brsyntax
error at (eval 1164) line 12, at EOF

It is as before, the error should be at line 12, but the component
itself has only 3 lines.

There is something fishy going on...

Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-16 Thread Martin Drasar
On 16.8.2012 14:27, Paul Tomblin wrote:
 I copied your code into my web app, and it worked fine.  Firebug shows
 me that the ajax call returned [something]
 
 I'd go with Joe's suggestion, or maybe something in an autohandler or
 dhandler that is screwing things up.

Thank you both for suggestions...

I am editting the file via putty through ssh. As I don't use any special
characters, I don't think this could be the reason.

I have tried to move working script
./share/html/Helpers/Autocomplete/Groups to my local directory
local/html/Ticket/Elements/ and the symptoms are the same. Not having
inherit set to undef cause it to 403. Having it set results in the
typical compilation error.

I have also tried to move my component from local directory to
share/html/Ticket/Elements, but that did not change anything.

My question is - how can I diagnose, whether there is a problem with
(auto|d)handlers? I haven't touched any of them since the installation.

Martin


Re: [rt-users] Correct user email address

2012-08-16 Thread Martin Drasar
On 16.8.2012 15:35, Paul Roth wrote:
 I accidently set up a user and make a typo on the email address.  How do
 you correct it (RT-4.0.6) or delete the user so I can re-add him.  This
 user has not been associated with any tickets.

Hi,

Tools - Configuration - Users

Find all users whose [Name \/] [matches \/] [write_name_here]

Go!

Chose the user from the table below and just change the mail and save.

Cheers,
Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-16 Thread Martin Drasar
On 16.8.2012 16:04, Paul Tomblin wrote:
 
 
 On Thu, Aug 16, 2012 at 9:21 AM, Martin Drasar dra...@ics.muni.cz
 mailto:dra...@ics.muni.cz wrote:
 
 
 My question is - how can I diagnose, whether there is a problem with
 (auto|d)handlers? I haven't touched any of them since the installation.
 
 
 Ok, this is a real desperation measure, but I modified
 /opt/rt4/lib/RT.pm and added a call to Carp::cluck in both the
 $SIG{__WARN__} and $SIG{__DIE__} handlers.  It adds a tiny bit more
 information in a few cases that normally go unremarked by RT.  Also,
 make sure and restart your server after making changes, because the code
 that is supposed to pick up changes doesn't always do so.
 

Thank you for not giving up...

My first attempt - putting cluck outside the block in handler that
checks for being inside eval. Looking inside the log and finding
bazillion of stack traces. Thinking about switching careers...

My second attempt - putting it in correct place. Looking inside the log
and finding nothing. Thinking about switching careers...

I always restart the apache server and reload the page before trying
something new. Working in debug mode, mason cache is empty.

Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-16 Thread Martin Drasar
Just a quick update - Paul tried to run files from my machine on his and
the result was that everything was working ok.

So the situation is as follows:
- brand new installation of RT-4.0.6
- database moved from RT-3.8.7, upgrade went well
- only local changes are those mentioned in this thread, plus the
RT_SiteConfig.pm and an import of one css file via css/base/main.css/End
callback
- $ uname -a
 Linux rt-mirror 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686 GNU/Linux

Any ideas are welcome

Thanks,
Martin


[rt-users] Using Ajax with Mason in RT

2012-08-15 Thread Martin Drasar
Hi,

I have used MakeClicky actions to extend the RT UI and now I would like
my extensions to do some ajax stuff on click. I would like to know, how
I can create new Mason component and set it as a valid target for the
ajax request.

Any help is really appreciated.

Thanks,
Martin


Re: [rt-users] Using Ajax with Mason in RT

2012-08-15 Thread Martin Drasar
On 15.8.2012 17:44, Paul Tomblin wrote:
 If you want your AJAX to return JSON, you need to do the following:
 
 ...

Wow, thanks a lot for your superquick reply!

Martin


[rt-users] Extending the RT UI

2012-08-13 Thread Martin Drasar
Hi,

with the move from RT 3.8.7 to 4.0.6, I have decided (or was forced to
by changes in RT html code) to ditch onload scripts that extended RT
Ticket UI with some functionality (getting abuse contacts by clicking on
ip, etc.). I would, however, still like to have that functionality, but
this time in a saner manner as a server side perl script.

I have browsed the RT source and it seems to me, that the final
processing of ticket attachments to display is done in the
Ticket/Element/ShowMessageStanza component. There is a callback called
that passes a reference to an attachment content, so it seems to me that
providing my callback to alter it would be the best way to do it.

My questions are following:
- Is this the right approach to extend the UI?
- If not, what would you suggest?
- If so, how can I create/hook/use the callback?
According to the documentation of lib/RT/Interface/Web/Request.pm that
defines the callback function, all callbacks are in
/Callbacks/any_dir/CallbackPage/CallbackName. Should the /Callbacks
dir be in main RT directory or could it be somewhere in the
/rt_dir/local? Also what is the true purpose of any_dir? The
documentation uses MyExtension as an example, but the name 'MyExtension'
is apparently not used as a discriminator or anything...

Thank you,
Martin


Re: [rt-users] Extending the RT UI

2012-08-13 Thread Martin Drasar
On 13.8.2012 16:48, Kevin Falcone wrote:
 You're on the right track, you may find this useful:
 http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks
 
 In general, if you're not writing an extension, your callbacks go in
 /opt/rt4/local/html/Callbacks/YourUniqueCallbackName/path/to/callback
 
 As you've noted, YourUniqueCallbackName isn't tied to anything, it's
 just there because two extensions can use the same callback, but they
 need to be in distinct paths for mason to find them.
 
 -kevin

Hi Kevin,

thanks a lot. This is definitely what I was looking for.

Martin


[rt-users] GnuPG problems with message decryption

2012-02-21 Thread Martin Drasar
Hello,

I have a question for anyone experienced with using gpg with gpg agent.

My situation is as follows:
- I have configured the RT and GPG according to this manual:
http://wiki.rediris.es/rtirwg/Public_GPGConfig
- The RT is able to verify signatures on incoming mail and is able to
sign mails
- It is however not able to decrypt incoming mails, which is strange
considering the signing and the decryption are practically identical
processes

I have this in the log:
 [Tue Feb 21 15:34:09 2012] [debug]: Found encrypted inline part 
 (/home/RT/RT-4.0.5/sbin/../lib/RT/Crypt/GnuPG.pm:906)
 [Tue Feb 21 15:34:09 2012] [debug]: [GNUPG:] ENC_TO 26B34A0AE44C6E92 1 0
 [GNUPG:] USERID_HINT 26B34A0AE44C6E92 CSIRT-MU DEVEL 
 r...@rt-devel.ics.muni.cz
 [GNUPG:] NEED_PASSPHRASE 26B34A0AE44C6E92 023D741AB8EF2A3A 1 0
 [GNUPG:] MISSING_PASSPHRASE
 [GNUPG:] BAD_PASSPHRASE 26B34A0AE44C6E92
 [GNUPG:] ENC_TO 110B534B28C8D875 1 0
 [GNUPG:] NO_SECKEY 110B534B28C8D875
 [GNUPG:] BEGIN_DECRYPTION
 [GNUPG:] DECRYPTION_FAILED
 [GNUPG:] END_DECRYPTION (/home/RT/RT-4.0.5/sbin/../lib/RT/Crypt/GnuPG.pm:1417)
 [Tue Feb 21 15:34:09 2012] [error]: gpg: cancelled by user
 gpg: encrypted with 2048-bit RSA key, ID 28C8D875, created 2010-12-30
   Martin Drasar dra...@ics.muni.cz
 gpg: encrypted with 2048-bit RSA key, ID E44C6E92, created 2012-02-21
   CSIRT-MU DEVEL r...@rt-devel.ics.muni.cz
 gpg: public key decryption failed: bad passphrase
 gpg: decryption failed: secret key not available 
 (/home/RT/RT-4.0.5/sbin/../lib/RT/Crypt/GnuPG.pm:1419)
 [Tue Feb 21 15:34:09 2012] [debug]: Found GnuPG protected parts 
 (/home/RT/RT-4.0.5/sbin/../lib/RT/Interface/Email/Auth/GnuPG.pm:240)
 [Tue Feb 21 15:34:09 2012] [debug]: Error during verify/decrypt operation 
 (/home/RT/RT-4.0.5/sbin/../lib/RT/Interface/Email/Auth/GnuPG.pm:244)
 [Tue Feb 21 15:34:09 2012] [error]: Had a problem during decrypting and 
 verifying (/home/RT/RT-4.0.5/sbin/../lib/RT/Interface/Email/Auth/GnuPG.pm:102)

This is happening with RT-4.0.5 as well as 3.8.7.

Any thoughts?

Thank you,
Martin

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5  6, 2012


[rt-users] Two separate tickets for one mail

2011-01-20 Thread Martin Drasar
Hello everyone,

I would like to ask you how I can create two tickets from one mail.

The reason is that we often receive copyright infringment notices and
then follow this workflow:

- autoreply to complainant that we have taken care of it
- contact the administrator that is responsible for the part of network
the infringement took place in
- wait for the administrator to do his job
- close the ticket after receiving reply from administrator

Our network is part of a bigger network and many mails that end up in
our abuse inbox end up also in the abuse inbox for the bigger network.
We used to add them to CC of the mail that goes to complainant so that
they can close their ticket. However, they started in good faith to
reply to that mail and their reply is resent to the administrator
mentioned before, which is something we do not want.

We have figured that the most sytematic solution would be to create two
tickets in such cases. One ticket for communication with external
entities and one for internal communication.

I am not sure how exactly to do it and if it is really that good idea
though. Does anyone of you have simillar setup? What and how would you
suggest to do it?

Thanks,
Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0xB2761CDE


Re: [rt-users] Two separate tickets for one mail

2011-01-20 Thread Martin Drasar
Dne 20.1.2011 16:00, Steve Anderson napsal(a):
 One option is to use a scrip tied to the creation of a ticket.
 
 We've got a workflow on our advert management queue, which creates a child 
 ticket to remove an advert. It checks for Set-Removal: followed by a unix 
 timestamp, and if it exist, a child ticket is created. There's a snippet of 
 the code below. It's in Custom action preparation code. Condition on create, 
 action user defined.
 
 
 
 if( $content =~ m/^\QSet-Removal:\E\s*(\S+)\s*$/m ) {
 my $removaldate = RT::Date-new($RT::SystemUser);
   my $starts = RT::Date-new($RT::SystemUser);
   $removaldate-Set(Format='unix', Value=$1);
   my $rdate=$removaldate-ISO;
   $starts-Set(Format='unix', Value=$removaldate-AddDays(-7));
   my $childticket=new RT::Ticket($RT::SystemUser);
   $childticket-Create(Queue=WebChange,
Requestor=$self-TicketObj-RequestorAddresses,
Subject=Remove Advert,
Due=$rdate,
Starts=$starts-ISO
);
   $childticket-AddLink(Type=MemberOf,Target=$self-TicketObj-id)
 }
 
 
 Steve Anderson

Hi Steve,

thanks for the code, it looks good. I think that it should be pretty
straightforward from now.

Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0xB2761CDE


[rt-users] Create an attachment via template

2010-11-02 Thread Martin Drasar
Hi everyone,

is it somehow possible to create a text attachment from inside the
template? I would like to have some within the 'On Correspond Notify
Requestors and Ccs'.

And if it is not possible, is creating a custom action derived from the
RT::Action::SendMail my only option?

Thank you for your answers.

Regards,
Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925


Re: [rt-users] (no subject)

2010-09-02 Thread Martin Drasar
Hi,
this is an attepmt to bump one old thread. In case it does not work as
it should, here is the orginal post:

 This seems to be a rare occurrence, but our RT install sometimes stops
 sending email.  I have to restart Apache or kill the fastcgi processes
 and let them restart before it will resume.  RT 3.8.7, Apache 2,
 fastcgi, and I've changed it to use sendmail instead of the default
 sendmailpipe (happened more frequently with sendmailpipe, but still
 happens with sendmail)
 Set($MailCommand , 'sendmail');
 Set($SendmailArguments , -oi);
 
 I see this in the logs when RT attempts to send an email:
 Jan 13 13:18:28 rt mog_rt: Scrip Commit 10 died. - Can't fork at
 /usr/share/perl5/Mail/Mailer.pm line 137. Stack:
 [/usr/share/perl5/Mail/Mailer.pm:137]
 [/usr/share/perl5/Mail/Internet.pm:451]
 [/home/rt/mog_rt/bin/../lib/RT/Interface/Email.pm:503]
 [/home/rt/mog_rt/bin/../lib/RT/Action/SendEmail.pm:307]
 [/home/rt/mog_rt/bin/../lib/RT/Action/SendEmail.pm:129]
 [/home/rt/mog_rt/bin/../lib/RT/ScripAction_Overlay.pm:238]
 [/home/rt/mog_rt/bin/../lib/RT/Scrip_Overlay.pm:464]
 [/home/rt/mog_rt/bin/../lib/RT/Scrips_Overlay.pm:196]
 [/home/rt/mog_rt/bin/../local/lib/RT/Transaction_Overlay.pm:188]
 [/home/rt/mog_rt/bin/../lib/RT/Record.pm:1457]
 [/home/rt/mog_rt/bin/../lib/RT/Ticket_Overlay.pm:3323]
 [/home/rt/mog_rt/bin/../lib/RT/Ticket_Overlay.pm:2996]
 [/home/rt/mog_rt/bin/../lib/RT/Record.pm:898]
 [/home/rt/mog_rt/bin/../lib/RT/Interface/Web.pm:1340]
 [/home/rt/mog_rt/bin/../lib/RT/Interface/Web.pm:1450]
 [/home/rt/mog_rt/share/html/Ticket/Display.html:155]
 [/home/rt/mog_rt/share/html/Tick
 
 (the line appears to be truncated in the logs)
 
 Has anyone else seen this?

I am more or less in the same situation here. We are using cron scripts
that send to the RT once in a while some mails and these mails are then
sent from the RT to other recipients (via the Autoreply scrip).

Problem is that these cron scripts usually produce more than 10 mails at
a time and the RT obviously struggles with delivering that many mails in
such a small time frame.

Looking inside the Mailer.pm file, one can see that there is this call:
my $child = open $self, '|-';
which tries to fork a subprocess to do the mailing job. So what happens
is that the RT in fact attempts to create more than 10 subprocesses.

I thought that that might be a problem, but looking in the limits.conf I
have found that I have no limits set at all.

Do you think this might be a problem? And if so, do you have idea how to
fix it?

My system:
 Linux version 2.6.26-2-686 (Debian 2.6.26-24lenny1) (da...@debian.org) (gcc 
 version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Thu Aug 19 
 03:44:10 UTC 2010
 perl, v5.10.0 built for i486-linux-gnu-thread-multi
 Server version: Apache/2.2.9 (Debian)
 Server built:   Apr 19 2010 19:57:58
 RT 3.8.7

Thank you very much for your help

Regards,
Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] RT stops sending email

2010-09-02 Thread Martin Drasar
Oh boy, the subject should have of course be different...

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Prioritizing Scrips

2010-07-20 Thread Martin Drasar
Dne 20.7.2010 23:12, Greg Curiel napsal(a):
 
 Hello,
 
 Does anyone know of a way to prioritize which scrips get run first?  I'm
 having a problem with a scrip that relies on another scrip which sets a
 custom field value.  We'll call the scrips scrip A and scrip B.  Scrip B
 relies on scrip A, but scrip B is getting processed first so the data it
 needs from scrip A does not exist yet.  So I was wondering if there was a
 way to prioritize the scrips or perhaps someone knows a different work
 around?
 
 Thanks in advance,
 Greg Curiel

Hi Greg,
scrips should be execued in alphabetical order (at least in version
3.6 I think). For example scrips in our RT instance have four digit
prefix to specify execution order.

Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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


[rt-users] Passing parameters to mail and sending two different mails

2010-07-13 Thread Martin Drasar
Hi, everyone,
I have two questions for you. In our RT instance we want to
automatically process some incident reports with well defined structure.
Receiving and parsing is easy but I am lost on how to

1) pass the parsed data to mail template.
I know that I could create custom fields for each piece of data and then
retrieve it from template, but I find it quite cumbersome - more than
70% of tickets would have custom fields they are not going to use.
Unless I make it some generic custom field that can store any string and
keep the entire mail there, which would kind of defeat the purpose of a
template.

2) send two different mails
One mail is an automatic reply to the requestor and the other one is a
mail to an admin responsible for handling the incident. I could make two
scrips with the same condition to send mails or to use/extend
RT::Action::SendMail.
Which option would you prefer? Or is there a third or fourth one?

Thank you for your answers

Regards
Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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


Re: [rt-users] French Accent template issue

2010-07-09 Thread Martin Drasar
Dne 9.7.2010 10:31, Georghy napsal(a):
 Hi folks,
 I was trying to forward a ticket via forward command on the web GUI
 when I received the mail, accent are formated like this : é
 
 Ceci est un ticket transféré dont le numèro est : #60
 
 It seems that it is caused by wrong encoding somewhere
 we check out database, apache and encoding is UTF-8
 can you give me other ideas or config file to check out ?
 what should I expect in apache and database encoding ?
 

Hi Georghy,
we've had a same problem with Czech encoding but it got fixed once we
have switched to iso-8859-2 in RT_SiteConfig.pm

Set($EmailOutputEncoding , 'iso-8859-2');

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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


Re: [rt-users] View tickets created via email

2010-05-11 Thread Martin Drasar
Dne 11.5.2010 16:51, josé fernandez napsal(a):
 Hello All,
 
 Is it possible when an unprivileged user to create a ticket via email,
 as it appears in its interface  RT3 in open tickets?
 
 Thank you
 

Hello jose,
it is possible. You just need to allow 'Everyone' group to create tickets.
To do so go into: Configuration - Global - Group rights
And for system group 'Everyone' grant the 'CreateTicket' right.
I also suggest to grant 'ReplyToTicket' right as well.

Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
CSIRT-MU, Network Security Department  http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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

[rt-users] On correspond send mail to requestor only if explicitly selected

2010-04-30 Thread Martin Drasar
Hello everyone,
I have a question regarding ticket handling workflow. The situation
should be as follows:

1) Someone reports a security incident by sending an email to RT.
2) Autoreply confirming that the incident is accepted is sent to the
requestor.
3) The responsible person/administrator is contacted and the security
incident is taken care of. Correspondence flows between the security
team and responsible person/administrator only and is archived inside
RT. Other people can also join the conversation.
4) If it is necessary to contact the requestor for more details, mail is
sent to them. Responsible person/admin sees this correspondence.
5) Once the security incident is resolved, the requestor receives an
informational email.

I have a hard time finding how to do this. I have come up with a
solution, that makes it easy except for the point 4).

The idea is to add responisble person/administrator as a Cc, disable the
'On Correspond Notify Requestors and Ccs' and have only 'On Correspond
Notify Ccs'.
This way the correspondence is kept away from requestor that does not
need to know details and other people may join the conversation, because
there is also a scrip that adds Ccs from mail as Ticket Ccs.

Problem raises when I want to send an email to the requestor in the
meantime (not autoreply On Create and message On Resolve). I could have
a scrip 'On Correspond Notify Requestor' and then disable the requestor
from receiving the mail, anytime the correspondence is sent from RT, but
that would be very prone to mistakes and accidental sendings of an email.

I need it to work in the other way - exclude requestor from recieving
notification unless explicitly allowed. Is there a way to do it?

For this purpose the section 'Will not sent mail to' (I hope it is
correct translation - I have czech version) in the Ticket update page
seems like a best place. But I do not have an idea how to get the
requestor mail there. The section above has any allowed scrips with On
Correspond condition. But this one? I don't know...

Thank you for reading this and for eventual help.

Regards
Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
Network Security Department http://ics.muni.cz/
CSIRT-MU   http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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


Re: [rt-users] Can't locate object method _Accessible

2010-04-22 Thread Martin Drasar
Dne 22.4.2010 18:59, CLOSE Dave (DAE) napsal(a):
 No clues? Do I need to give up on RT?

Hi Dave,
I am not sure if this is going to help you, but I had the same problem
as you have now. I was trying to do a smooth upgrade from 3.6 to 3.8 and
my idea was to run two versions at once only on different ports.
For reasons that I cannot fathom, this was not possible - I could run
only one version at port 80, be it 3.6 or 3.8. After all it was not that
much of a problem for me, because our RT installation was kind of fresh
one, without many users...
I suggest that you try to set up environment for new version of RT on
different machine, read the docs about migrating DB, set it up and after
you have it running just move it to orginal server and replace the old
version.

Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
Network Security Department http://ics.muni.cz/
CSIRT-MU   http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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


Re: [rt-users] Can't locate object method _Accessible

2010-04-22 Thread Martin Drasar
Dne 22.4.2010 22:59, Jerrad Pierce napsal(a):
 First you say you tried different ports and then the the same port.
 Did you mean different names? I've successfully run 3.8.1 and 3.8.6
 concurrently on different virtual hosts (without doing the db upgrades).

I have tried two virtual hosts, one on port 80 and one on port 8080.
The port 80 had version 3.6.x and port 8080 had version 3.8.x
Because this setup was not working I have changed the configuration of
host on port 80 to point to RT 3.8.x directory (thus leaving me with
only one version). Suddenly I was able to run 3.8.x.
I admit that I have not done any deep testing, because I was happy to
see 3.8.x working. I have transitioned my scrips and left 3.6.x far
behind me.
Also note that I have tried version 3.6.x and 3.8.x concurrently and you
have different 3.8.x version - there may be a difference.

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
Network Security Department http://ics.muni.cz/
CSIRT-MU   http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925

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


[rt-users] Wide character in crypt generates stack trace with password revealed

2010-04-20 Thread Martin Drasar
Hi everyone,
when logging into RT having czech keyboard accidentaly set, wide
characters may be accidentally supplied to the password routine. (Czech
keyboard have letters with wedges in the same row as numbers).
This causes error shown in attached page, revealing password to
bystanders as well as needlessly showing RT path.

I am providing a quick patch that catches the exception generated by
crypt and makes RT behave like ordinary bad password was provided.

Martin

-- 
Mgr. Martin Drasar   dra...@ics.muni.cz
Network Security Department http://ics.muni.cz/
CSIRT-MU   http://www.muni.cz/csirt
Institute of Computer Science, Masaryk University, Brno, Czech Republic
   PGP Key ID: 0x944BC925





System error

 
  error:
  Wide character in crypt at /home/RT/RT-3.8.7/bin/../lib/RT/User_Overlay.pm line 1037.
 
 
  context:
  
   


 ...
 



 1033:
 return(1);



 1034:
 }



 1035:
 



 1036:
 #  if it's a historical password we say ok.



 1037:
 if ($self-__Value('Password') eq crypt($value, $self-__Value('Password'))



 1038:
 or $self-_GeneratePasswordBase64($value) eq $self-__Value('Password'))



 1039:
 {



 1040:
 # ...but upgrade the legacy password inplace.



 1041:
 $self-SUPER::SetPassword( $self-_GeneratePassword($value) );



 ...
 



   
  
 
 
  code stack:
  
/home/RT/RT-3.8.7/bin/../lib/RT/User_Overlay.pm:1037
/home/RT/RT-3.8.7/bin/../lib/RT/Interface/Web.pm:423
/home/RT/RT-3.8.7/bin/../lib/RT/Interface/Web.pm:208
/home/RT/RT-3.8.7/share/html/autohandler:53
  
 


raw error



































Wide character in crypt at /home/RT/RT-3.8.7/bin/../lib/RT/User_Overlay.pm line 1037.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Wide character in crypt at /home/RT/RT-3.8.7/bin/../lib/RT/User_Overlay.pm line 1037.^J') called at /home/RT/RT-3.8.7/bin/../lib/RT/User_Overlay.pm line 1037
RT::User::IsPassword('RT::CurrentUser=HASH(0x104466a0)', 'ěščřžM-}M-aM-m') called at /home/RT/RT-3.8.7/bin/../lib/RT/Interface/Web.pm line 423
RT::Interface::Web::AttemptPasswordAuthentication('HASH(0x1157dc98)') called at /home/RT/RT-3.8.7/bin/../lib/RT/Interface/Web.pm line 208
RT::Interface::Web::HandleRequest('HASH(0x1157dc98)') called at /home/RT/RT-3.8.7/share/html/autohandler line 53
HTML::Mason::Commands::__ANON__('pass', 'M-DM-^[M-EM-!M-DM-^MM-EM-^YM-EM-M-CM-=M-CM-!M-CM--', 'user', 'drasar') called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x105a11f8)', 'pass', 'M-DM-^[M-EM-!M-DM-^MM-EM-^YM-EM-M-CM-=M-CM-!M-CM--', 'user', 'drasar') called at /usr/share/perl5/HTML/Mason/Request.pm line 1273
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1268
HTML::Mason::Request::comp(undef, undef, undef, 'pass', 'M-DM-^[M-EM-!M-DM-^MM-EM-^YM-EM-M-CM-=M-CM-!M-CM--', 'user', 'drasar') called at /usr/share/perl5/HTML/Mason/Request.pm line 467
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 467
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 419
HTML::Mason::Request::exec('RT::Interface::Web::Request=HASH(0x113f97b8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('RT::Interface::Web::Request=HASH(0x113f97b8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x104462f0)', 'Apache2::RequestRec=SCALAR(0x113c1290)') called at /home/RT/RT-3.8.7/bin/webmux.pl line 166
eval {...} at /home/RT/RT-3.8.7/bin/webmux.pl line 166
RT::Mason::handler('Apache2::RequestRec=SCALAR(0x113c1290)') called at -e line 0
eval {...} at -e line 0



--- User_Overlay.pm.bak 2010-04-20 11:45:52.0 +0200
+++ User_Overlay.pm 2010-04-20 11:54:19.0 +0200
@@ -1034,12 +1034,19 @@
 }
 
 #  if it's a historical password we say ok.
-if ($self-__Value('Password') eq crypt($value, $self-__Value('Password'))
-or $self-_GeneratePasswordBase64($value) eq 
$self-__Value('Password'))
+eval
 {
-# ...but upgrade the legacy password inplace.
-$self-SUPER::SetPassword( $self-_GeneratePassword($value) );
-return(1);
+  if ($self-__Value('Password') eq crypt($value, 
$self-__Value('Password'))
+  or $self-_GeneratePasswordBase64($value) eq 
$self-__Value('Password'))
+  {
+  # ...but upgrade the legacy password inplace.
+  $self-SUPER::SetPassword( $self-_GeneratePassword($value) );
+  return(1);
+  }
+};
+if ($@) {
+  $RT::Logger-info(Caught

[rt-users] woooo

2010-03-09 Thread Martin Drasar
ooow
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

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


Re: [rt-users] woooo

2010-03-09 Thread Martin Drasar
I apologize for a spam...
This was supposed to go to my own RT :-)

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

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

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

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


Re: [rt-users] logging from scrips

2010-03-09 Thread Martin Drasar
Dne 9.3.2010 0:29, Martin Drasar napsal(a):
 Hi everyone,
 the issue from subject was discussed several times, but sadly I have not
 been able to find a solution that is working for me.
 
 I have a scrip that should launch after new ticket is created.
 
 Condition: On Create
 Action:User defined
 Template:  My own defined template
 Stage: Transaction create
 
 Inside the user condition I have this piece of code:
 
 $RT::Logger-info(Entering the scrip I have written);
 $RT::Logger-info($self-TicketObj-Status);
 $RT::Logger-info(Leaving the script I have written);
 return 1;
 
 I would expect this code to write three messages into log and send the
 message using given template (the template has everything hardcoded, so
 it should be ok). However no mail gets sent and nothing is in log.
 
 This scrip should be running because in rt.log I can see:
 
 [debug]: Found 1 scrips
 (/usr/share/request-tracker3.6/lib/RT/Scrips_Overlay.pm:365)
 
 which is changed to 0 when I disable the scrip.
 
 I have enabled the $DevelMode, and set $LogToFile to 'debug' (I have
 even tried to set $LogToSyslog to 'debug'), restarted the server, but
 nothing happened. There is nothing in rt.log, syslog, apache error.log,
 nowhere.
 
 Could you please help me finding where the problem can be?

Well it seems that the condition was to blame. Being set to 'On Create'
my user condition have not been evaluated.

I have changed it to 'User defined' and everything works as it should,
including the logging.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

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


[rt-users] logging from scrips

2010-03-08 Thread Martin Drasar
Hi everyone,
the issue from subject was discussed several times, but sadly I have not
been able to find a solution that is working for me.

I have a scrip that should launch after new ticket is created.

Condition: On Create
Action:User defined
Template:  My own defined template
Stage: Transaction create

Inside the user condition I have this piece of code:

$RT::Logger-info(Entering the scrip I have written);
$RT::Logger-info($self-TicketObj-Status);
$RT::Logger-info(Leaving the script I have written);
return 1;

I would expect this code to write three messages into log and send the
message using given template (the template has everything hardcoded, so
it should be ok). However no mail gets sent and nothing is in log.

This scrip should be running because in rt.log I can see:

[debug]: Found 1 scrips
(/usr/share/request-tracker3.6/lib/RT/Scrips_Overlay.pm:365)

which is changed to 0 when I disable the scrip.

I have enabled the $DevelMode, and set $LogToFile to 'debug' (I have
even tried to set $LogToSyslog to 'debug'), restarted the server, but
nothing happened. There is nothing in rt.log, syslog, apache error.log,
nowhere.

Could you please help me finding where the problem can be?

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

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

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

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