Symptom
One or more mail rules may not be applied when you select a large number of messages at once. This may occur when using an IMAP mail server.
Note: This does not occur when mail rules are being applied automatically. This happens when you choose the Apply Rules to Selection command from the Message menu.
Solution
Select fewer than 256 messages at a time when applying mail rules. Larger numbers of messages may work, but this is the suggested amount.
A future version of the Mail application may address this issue.