Commit 443d5a43 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Make storage into outgoing spool more efficient: Sort recipients to be stored by domains.

parent a8016d99
......@@ -326,6 +326,15 @@ sub _get_recipient_tabs_by_domain {
return unless @rcpt;
# Sort by domain.
@rcpt = map {
join '@', grep { defined $_ } @$_;
} sort {
(($a->[1] // '') cmp ($b->[1] // '')) || ($a->[0] cmp $b->[0])
} map {
[split /\@/, $_, 2]
} @rcpt;
my ($i, $j, $nrcpt);
my $size = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment