Mail keeps recreating 'Sent Messages' and 'Trash'
My the Mac keeps recreating folders that it does not even use: it is using 'Sent' for sent mail, but keeps recreating 'Sent Messages' whenever I delete it on my iPad or in webmail, and refuses to delete it itself.
I used to have set my Sent and Trash folders to 'Sent' and 'Deleted' on all of my devices, as that works with most things. After the iOS9 upgrade on my iPad, everything went bonkers. It seemed that the iPad is recreating 'Sent Messages' and 'Trash' on the computer (I see them annoyingly in my Mac mail folder list). Indeed, the iPad had decided to start using these folders, and in the settings, I could not change them back to 'Sent' and 'Deleted': Whenever I did this, they would immediately have been reset, when I returned to the settings to verify.
So I deleted my account on the iPad. I tried to delete the stray folders on the Mac. No luck. The Mac won't delete the folders. I deleted the account on the Mac. I removed ~/Library/Containers/com.apple.mail — which caused the Mac to delete all Sent messages on my other accounts. From the server! No luck. The Mac keeps recreating 'Sent Messages'. I gave up, and started using 'Sent Messages' and 'Trash'. No luck. Now the Mac creates 'Sent'. ('Deleted' it does not recreate.) Now my iPad, after recreating the account, will only use 'Sent'. There is no way to change to account used on the iPad: it always reverts back to what it discovers on first account creation, no matter what you tell it to use. And the Mac keeps recreating folders that it does not even use.
I did the whole rebuild and reindexing process as well, but nothing helps. Any more ideas?
Mac Pro, OS X Yosemite (10.10.5)