[fsck.com #1594] Re: [rt-users] change in "From" line

Phil Homewood pdh at snapgear.com
Sun Aug 11 21:03:54 EDT 2002


Rich Lafferty wrote:
> >  From: "" address at example.com " via RT" <queue at mydomain.com>
> > before they looked much better:
> >  From: address at example.com via RT <queue at mydomain.com>
> 
> Well, your "much better" example will break the MTA. :-) That's not an
> email address in front, it's a realname. (It will also break with
> commas, etc.)

Actually, the code in SendEmail.pm to deal with quotes looks
decidedly bogus to me.

The sanitisation of $friendly_name around line 290 in particular
seems to 
a) be within an inappropriate conditional, and
b) add quotes that should not be there.

Possible patch attached.
-- 
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh at snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances
-------------- next part --------------
Index: SendEmail.pm
===================================================================
RCS file: /cvs/local/rt/lib/RT/Action/SendEmail.pm,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 SendEmail.pm
--- SendEmail.pm	15 Jul 2002 01:25:46 -0000	1.1.1.4
+++ SendEmail.pm	12 Aug 2002 00:44:56 -0000
@@ -286,12 +286,7 @@
     
   unless ($self->TemplateObj->MIMEObj->head->get('From')) {
       my $friendly_name=$self->TransactionObj->CreatorObj->RealName;
-
-      if ($friendly_name =~ /^\S+\@\S+$/) { # A "bare" mail address
-          $friendly_name =~ s/"/\\"/g;
-          $friendly_name = qq|"$friendly_name"|;
-      }
-
+      $friendly_name =~ s/"/\\"/g;
 
       # TODO: this "via RT" should really be site-configurable.
       $self->SetHeader('From', "\"$friendly_name via RT\" <$replyto>");


More information about the rt-users mailing list