Better handling of <> in address comparisons

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@614 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
John Peacock 2006-02-07 18:42:16 +00:00
parent 3361b73e50
commit 3574e75cd1

View File

@ -308,8 +308,8 @@ sub _addr_cmp {
} }
#invert the address so we can sort by domain then user #invert the address so we can sort by domain then user
$left = lc($left->host.'='.$left->user); ($left = join( '=', reverse( split('@', $left->format))) ) =~ tr/[<>]//d;
$right = lc($right->host.'='.$right->user); ($right = join( '=', reverse( split('@',$right->format))) ) =~ tr/[<>]//d;
if ( $swap ) { if ( $swap ) {
($right, $left) = ($left, $right); ($right, $left) = ($left, $right);