Opera Mail default settings
If I try to change the default sorting (from "don't group" to "group by date"), it doesn't work.
When you switch to "group by date", you don't see the group headers Like "Today", "January", "2015" etc.? If so, for each view, click the "settings for this view" button on the message list toolbar and make sure you're not overriding the sorting for that view.
If things are fine there, you can close down Opera and edit operaprefs.ini in the preferences folder. Since you've messed with the grouping setting, under [Mail] in the file, you should see a "Mail Grouping Method=number" line. Remove that line, save and start Opera Mail back up. Then, it should be set to the default of "Group by date". Then, if you ever turn grouping off, setting it back to "group by date" should work fine.
The override setting and its options for each view are stored in index.ini in the mail folder under the index for each view, under the Model Flags line. If for some reason you think override is stuck on for a view, you can check the Model Flags for a view to 269 to turn it off (while Opera is closed).
See "Help -> about Opera Mail" for the location of the preferences file and the mail folder.
If needed, close down Opera and delete autosave.win in the sessions folder in the preferences folder. If needed, rename operaprefs.ini too so that Opera creates a new one (which will reset the global mail settings like the grouping option.
Thank you so much, burnout426!
The problem was in fact in the "setting for this view". I used to modify only the "default mail settings", but the box "Override default sorting" in the "setting for this view" was checked. After I unchecked it, all was fine.