[Rt-devel] [rt-users] need some explanation on rt.log data
Asif Iqbal
vadud3 at gmail.com
Fri Jul 16 11:20:40 EDT 2010
On Wed, Jul 14, 2010 at 11:55 AM, Asif Iqbal <vadud3 at gmail.com> wrote:
>> How do I modify this section of the file /opt/rt3/lib/RT/Action/SendEmail.pm
>>
>> sub SendMessage {
>>
>> # DO NOT SHIFT @_ in this subroutine. It breaks Hook::LexWrap's
>> # ability to pass @_ to a 'post' routine.
>> my ( $self, $MIMEObj ) = @_;
>>
>> my $msgid = $MIMEObj->head->get('Message-ID');
>> chomp $msgid;
>>
>> $self->ScripActionObj->{_Message_ID}++;
>>
>> $RT::Logger->info( $msgid . " #"
>> . $self->TicketObj->id . "/"
>> . $self->TransactionObj->id
>> . " - Scrip "
>> . ($self->ScripObj->id || '#rule'). " "
>> . ( $self->ScripObj->Description || '' ) );
>>
>> my $status = RT::Interface::Email::SendEmail(
>> Entity => $MIMEObj,
>> Ticket => $self->TicketObj,
>> Transaction => $self->TransactionObj,
>> );
>>
>> so to replace the msgid from
>>
>> rt-3.8.2-16248-1279122035-324.768607-185-0 at rt.example.net
>>
>> to this
>>
>> rt-3.8.2-16248-1279122035-324.768607-transactionid-185-0 at rt.qwestip.net
>>
>> so it has the transaction id in there as well ?
>
> looking further more in that file /opt/rt3/lib/RT/Action/SendEmail.pm, line 592
>
> if ( $msgid
> and $msgid
> =~ s/<(rt-.*?-\d+-\d+)\.(\d+)-\d+-\d+\@\QRT->Config->Get('Organization')\E>$/
> "<$1." . $self->TicketObj->id
> . "-" . $self->ScripObj->id
> . "-" . $self->ScripActionObj->{_Message_ID}
> . "@" . RT->Config->Get('Organization') . ">"/eg
> and $2 == $self->TicketObj->id
> )
>
> Looks like this is the code that creates the msgid.
>
> So should I just add the $self->TransactionObj in here to make sure
> msgid always have the transaction id as well?
So if I want to modify SendEmail.pm, do I suppose to copy
/opt/rt3/lib/RT/Action/SendEmail.pm
in here
/opt/rt3/local/lib/RT/Action
first and then modify it?
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
More information about the rt-devel
mailing list