diff --git a/mailbox/mailbox-lib.pl b/mailbox/mailbox-lib.pl index e73062ed..dff1c8c3 100755 --- a/mailbox/mailbox-lib.pl +++ b/mailbox/mailbox-lib.pl @@ -679,7 +679,7 @@ sub list_folders if ($file) { if ($config{'mail_system'} == 4) { # In IMAP mode, the first folder named spam is marked - my ($sf) = grep { lc($_->{'name'}) eq 'spam' } @rv; + my ($sf) = grep { $_->{'name'} =~ /^\.?spam$/i } @rv; if ($sf) { $sf->{'spam'} = 1; }