[rt-devel] Re: [rt-users] Bug in 'From' processing in 2.0.12?
Phil Oester
kernel at theoesters.com
Wed Mar 27 17:43:40 EST 2002
That doesn't help, as it appears to just fixup 'Real Name' fields which
have email addresses in them.
The problem here (I believe) is caused by Sendmail mangling the 'From'
field if it has quotes. It adds the name of the host. So, as shown
earlier, a real name of:
"Last, First"
Gets converted by SendEmail.pm to:
From: ""Last, First" via RT"
Then, once Sendmail gets ahold of it, it mangles it thusly:
From: ""Last at rthost.mydomain.com, First" via RT"
So - aside from trying to fix sendmail (hopeless), I think the following
snippet will work :
--- po.pm Wed Mar 27 12:01:49 2002
+++ SendEmail.pm Wed Mar 27 17:42:18 2002
@@ -291,8 +291,11 @@
unless ($self->TemplateObj->MIMEObj->head->get('From')) {
my $friendly_name=$self->TransactionObj->CreatorObj->RealName;
+ if ($friendly_name =~ /^\".*\"$/) { # Real Name is in quotes
+ $friendly_name =~ s/"//g;
+ }
# TODO: this "via RT" should really be site-configurable.
- $self->SetHeader('From', "\"$friendly_name via RT\" <$replyto>");
+ $self->SetHeader('From', "$friendly_name via RT <$replyto>");
}
unless ($self->TemplateObj->MIMEObj->head->get('Reply-To')) {
-Phil
-----Original Message-----
From: rt-users-admin at lists.fsck.com
[mailto:rt-users-admin at lists.fsck.com] On Behalf Of Jesse Vincent
Sent: Wednesday, March 27, 2002 3:24 AM
To: Jan Okrouhly
Cc: Phil Oester; rt-users at lists.fsck.com; rt-devel at lists.fsck.com
Subject: Re: [rt-devel] Re: [rt-users] Bug in 'From' processing in
2.0.12?
Simon Cozens submitted the following patch:
http://fsck.com/rt2/Ticket/Display.html?id=1348
(login as guest/guest)
Does this make things better?
On Wed, Mar 27, 2002 at 08:47:11AM +0100, Jan Okrouhly wrote:
> I'm sure there is the bug (somewhere on RealName handling).
> I use 2.0.9 and results are similar (RT sometimes generates wrong From
> column as desc. bellow. The reason is that is sometimes stores Real
Name
> into its database with " characters (I suppose derived from e-mail
> headers becaus I've seen/successfuly fixed the same bug on RT1).
>
> On Tue, 26 Mar 2002, Phil Oester wrote:
>
> > In version 2.0.11, line 294 of SendEmail.pm reads:
> >
> > $self->SetHeader('From', "$friendly_name via RT <$replyto>");
> >
> > In version 2.0.12, it now reads:
> >
> > $self->SetHeader('From', "\"$friendly_name via RT\"
<$replyto>");
> >
> > Users which were autocreated on ticket submission show a 'Real Name'
> > field of:
> >
> > "Last, First"
> >
> > Comments sent from these users now arrive with the following 'From'
> > header:
> >
> > From: ""Last at rthost.mydomain.com, First" via RT"
> > <rt at mydomain.com>
> >
> > Any ideas why???
> >
> > -Phil
> >
> >
> > _______________________________________________
> > rt-users mailing list
> > rt-users at lists.fsck.com
> > http://lists.fsck.com/mailman/listinfo/rt-users
> >
>
>
> Jan Okrouhly
>
---------------------------------------\-\-\+\-\-\---okrouhly at civ.zcu.cz
---
> Laboratory for Computer Science | phone: (420 19)
7491588
> University of West Bohemia | location: Univerzitni 22
> Americka 42, 306 14 Pilsen, Czech Republic | room: UI404
>
------------------------------------------73!-de-OK1INC at OK0PPL.#BOH.CZE.
EU-
>
>
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
>
--
http://www.bestpractical.com/products/rt -- Trouble Ticketing. Free.
_______________________________________________
rt-users mailing list
rt-users at lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users
More information about the rt-users
mailing list