+ if (my $mm = $cur->mm) {
+ my $tmp_mid = $mid;
+ my $res = $mm->mid_prefixes($tmp_mid, 100);
+ if ($res && scalar(@$res)) {
+ $n_partial += scalar(@$res);
+ push @partial, [ $cur, $res ];
+ # fixup common errors:
+ } elsif ($tmp_mid =~ s,/[tTf],,) {
+ $res = $mm->mid_prefixes($tmp_mid, 100);
+ if ($res && scalar(@$res)) {
+ $n_partial += scalar(@$res);
+ push @partial, [ $cur, $res ];
+ }
+ }
+ }
+
+ # can't find a partial match in current inbox, try the others:
+ if (!$n_partial && length($mid) >= 16) {