[Rt-commit] r10129 - in rt/branches/3.6-RELEASE: .
jesse at bestpractical.com
jesse at bestpractical.com
Wed Dec 26 16:01:12 EST 2007
Author: jesse
Date: Wed Dec 26 16:01:11 2007
New Revision: 10129
Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm
Log:
r74208 at pinglin: jesse | 2007-12-26 16:00:34 -0500
RT-Ticket: 8781
RT-Status: resolved
RT-Update: correspond
I've encountered a problem with sender identification in the mailgate. If
a user sends an e-mail where 'Reply-To' is present but empty (i.e there is
'Reply-To: ' in the e-mail headers), RT does not associate the e-mail
with a RT user even if the user exists in the system and the sender
address is specified in the 'Sender' or 'From' fields.
- Patch from ondrasej at centrum.cz
Modified: rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Interface/Email.pm Wed Dec 26 16:01:11 2007
@@ -396,12 +396,15 @@
my $head = shift;
#Figure out who's sending this message.
- my $From = $head->get('Reply-To')
- || $head->get('From')
- || $head->get('Sender');
- return ( ParseAddressFromHeader($From) );
-}
+ foreach my $header ('Reply-To', 'From', 'Sender') {
+ my $From = $head->get($header);
+ my ($addr, $name) = ParseAddressFromHeader($From);
+ # only return if the address is not empty
+ return ($addr, $name) if $addr;
+ }
+ return (undef, undef);
+}
# }}}
# {{{ ParseErrorsToAdddressFromHead
More information about the Rt-commit
mailing list