From 3574e75cd1de72541f95d04fadf5be2e1673b67a Mon Sep 17 00:00:00 2001 From: John Peacock Date: Tue, 7 Feb 2006 18:42:16 +0000 Subject: [PATCH] Better handling of <> in address comparisons git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@614 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/Address.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd/Address.pm b/lib/Qpsmtpd/Address.pm index 6a8f28a..9d68c7c 100644 --- a/lib/Qpsmtpd/Address.pm +++ b/lib/Qpsmtpd/Address.pm @@ -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);