Permalink
Browse files

Better handling of <> in address comparisons

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@614 958fd67b-6ff1-0310-b445-bb7760255be9
  • Loading branch information...
1 parent 3361b73 commit 3574e75cd1de72541f95d04fadf5be2e1673b67a John Peacock committed Feb 7, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Qpsmtpd/Address.pm
View
@@ -308,8 +308,8 @@ sub _addr_cmp {
}
#invert the address so we can sort by domain then user
- $left = lc($left->host.'='.$left->user);
- $right = lc($right->host.'='.$right->user);
+ ($left = join( '=', reverse( split('@', $left->format))) ) =~ tr/[<>]//d;
+ ($right = join( '=', reverse( split('@',$right->format))) ) =~ tr/[<>]//d;
if ( $swap ) {
($right, $left) = ($left, $right);

0 comments on commit 3574e75

Please sign in to comment.