[rt-users] [rt-announce] Development Snapshot 3.0.2++
Dirk Pape
pape-rt at inf.fu-berlin.de
Tue Jun 10 04:02:36 EDT 2003
Hello,
I have to apologize. I cannot reproduce the described problem, if I remove
one patch I have done, which enables RT to write almost correct threading
headers into notification mails.
I did not try to remove this patch before testing, because I did not see
how it can be related to the problem.
And for now after looking several hours into the code and testing it, I
*still cannot see it*.
I tracked my (header encoding) problem down to the following situation:
1. Have my threading patch installed (I attached a light version, which
consists of only one file to be put in lib/RT/Action).
2. Send several emails with German Umlauts in subject and body to a queue,
*which has an Autoreply set up*.
3. refresh the Ticket Listing of the Queue in the web while Tickets arrives
4. After some (5-10) Tickets arrived try the Ticket Display of the Tickets.
The Subject header shown in the Ticket-Message-Display (not the Subject
shown in other fields) of some Tickets (it is fuzzy!) is mangled and so is
the Head-Field of those tickets in the mysql-database.
5. This then seems to be a "global apache switch" which can toggle after
some other messages arrive but will definitely be set to normal behaviour
if apache is restarted.
So I have a workaround now but I would greatly appreciate, if someone takes
a look into my code, which is fairly short and the problem is within 3
lines of code:
It happens, when I leave the patch installed and comment out all calls of
"$self->SetHeader" in my SetReferences subroutine, I cannot reproduce the
problem any more.
But why???? SetHeader is called multiple time everywhere in SendEmail.pm.
Dirk.
--Am Montag, 26. Mai 2003 18:41 Uhr +0200 schrieb Dirk Pape
<pape-rt at inf.fu-berlin.de>:
> Hello Jesse,
>
> --Am Freitag, 23. Mai 2003 16:24 Uhr -0400 schrieb Jesse Vincent
> <jesse at bestpractical.com>:
>
>> This isn't a formal pre-release of RT 3.0.3, but a snapshot that fixes
>> some of the utf8 issues in RT 3.0.2 that have been biting
>> western-european users. If you don't have utf8-issues that you need to
>> deal with ASAP, hold off a bit.
>>
>
> I have still the same issues as decribed earlier and I can now fuzzily
> reproduce them (see below)
>
>>> From an earlier posting of mine:
>
>> So I start with my config:
>>
>> RT: Version 3.0.2++
>> OS: Debian Linux Woody
>> Apache: 1.3.26 with SSL
>> Modperl: 1
>> DBS. mysql 3.23
>> Perl: 5.8.0
>> sbin/rt-testdepedencies happy with all installed perl-libs
>>
>> my issues (please add your's and your comments):
>>
>> 2. from time to time incoming (non-utf8) Email will not be converted any
>> more to utf8. It will though be marked as being converted, but in real
>> contain ISO-character-encodings. I have to be vague here, because I
>> cannot reproduce any trigger of this behaviour. But if this happens, it
>> seems to stick for one apache process.
>
> httpd.conf:
>
> ...
> SSLEnable
> AddDefaultCharset UTF-8
>
> <Location /rt>
> order allow,deny
> allow from all
> PerlRequire /export/rt3/bin/webmux.pl
> SetHandler perl-script
> PerlHandler RT::Mason
> ...
> </Location>
>
>
> RT_Siteconfig:
>
> ...
> @EmailInputEncodings = qw(utf-8 iso-8859-1 us-ascii) unless
> (@EmailInputEncodings); Set($EmailOutputEncoding , 'iso-8859-15');
> ...
>
> REPRODUCTION OF PROBLEM:
>
> I attach a digest with mails I send one after another to the rt-system
> and they get queued into one queue, each as a new ticket.
>
> The first two tickets are displayed correctly.
>
> After the third or fourth ticket arrived, the subject field in the web
> display (ticket history is garbled and shows "Subject: test
> �ö������� " (The concrete garbage depend on the browser you use
> to display.
>
> BUT: If you go to the "The Basics" panel, the subject shows ok. So does
> the subject of the Auto-Reply the user receives per Email.
>
> If I do further send the same message (I sometimes varied the number of
> line breaks at the end of the message), I arrive to different states, in
> arbitrary order:
>
> A) Some of the messages arrive intact
> B) Some of the messages have garbled subjects
> C) Some of the messages have garbled bodies (This then also applies to
> the autoreplies which cite the body by including Transaction->Content
> into the message.
>
> I even observed the case that there was an alternation (Ticket 2n =>
> garbled Subject, Ticket 2n+1 => garbled body)
>
> So you might be able to reprduce the thing at your site.
>
> If not I will be glad to provide you with further infos you need (queue
> config, scrips a.s.o)
>
> Regards,
> Dirk.
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
>
> Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
-------------- next part --------------
use strict;
no warnings qw(redefine);
sub SetReferences {
my $self = shift;
# default is: no references at all
my %refs=();
my $inMessageId = undef;
my $inMessageReplyTo = undef;
my @references = ();
# if a Transaction is quoted, get its headers
my $QuotedTransaction = $self->TransactionObj;
if ( $QuotedTransaction
&& $QuotedTransaction->Attachments
&& ( my $inMessage = $QuotedTransaction->Attachments->First ) ) {
# get the references of the quoted mail
@references = split (/\s+/,$inMessage->GetHeader( 'References'));
# and put them into a hash to later avoid doublets
map { $refs{$_}=1 } @references;
# save the message id and the In-Reply-To header of the quoted message
$inMessageId = $inMessage->GetHeader( 'Message-ID');
$inMessageReplyTo = $inMessage->GetHeader( 'In-Reply-To');
}
# add the In-Reply-To header, for notification we want a copy from the original mail
if ( $inMessageReplyTo ) {
$self->SetHeader( 'In-Reply-To', $inMessageReplyTo );
} else {
if ( $inMessageId ) {
$self->SetHeader( 'In-Reply-To', $inMessageId );
}
}
# add a reference to the message id of the inMessage
# and one to the In-Reply-To id of the inMessage
if ( $inMessageReplyTo && ! $refs{$inMessageReplyTo} ) { $refs{$inMessageReplyTo}=1; push @references, $inMessageReplyTo; }
if ( $inMessageId && ! $refs{$inMessageId}) { $refs{$inMessageId}=1; push @references, $inMessageId; }
# always add a reference to the first message of the Ticket
my $ThreadId = undef;
my $firstTransaction = undef;
if ( $self->TicketObj->Transactions
&& ($firstTransaction = $self->TicketObj->Transactions->First)
&& $firstTransaction->Attachments
&& $firstTransaction->Attachments->First
&& (my $initialMessageId = $firstTransaction->Attachments->First->GetHeader( 'Message-ID') ) ) {
$ThreadId = $initialMessageId;
} else {
$ThreadId = "<rt-" . $self->id() . "\@" . $RT::rtname . ">";
}
if ( ! $refs{$ThreadId} ) { @references = (@references, $ThreadId) };
# copy the collected references into the header of the outgoing message
$self->SetHeader( 'References', join(" ", at references) );
}
1;
More information about the rt-users
mailing list