My mid-2011 iMac was running OS X Mavericks for years, and I decided over the weekend that it was time to see about upgrading to Sierra (not High Sierra). So I cloned my boot drive to another partition, and upgraded to Sierra on it. For the most part everything is fine, but there's an issue with Mail.app that is really frustrating me.
In Mail I have rules, based on the send address from different people/places, that move those emails into specific folders (mailboxes, in Mail terminology). For instance emails from my bank go into my "Finance" mailbox.
Then I have a separate smart mailbox labeled "Finance" with a single rule - "Messages is in mailbox 'Finance'". This allows me to organize all my different frequently used mailboxes into one area "Smart Mailboxes" which I can move to the top of the sidebar for ease of access.
In Mavericks, this works great and I have a couple of mailboxes set up this same way. But in Sierra, this doesn't work at all. The rules work fine for moving the emails into the separate folder/mailbox, but the smart mailbox rule fails to save. I can set it as desired, but on subsequent editing it will always read "Message is in mailbox 'No mailbox selected'" and therefore will show me all emails in my inbox, rather than just those in the Finance mailbox.
The issue appears to only be with using mailboxes that are in my iCloud account. I can select a folder in a Gmail or self-hosted mailbox for example, and the Smart Mailbox rule works fine.
Why does this work fine in Mavericks but not Sierra, and how can I get it to work once more? I have already tried a Rebuild but it did nothing.