I was having a weird issue with the Mail app where, when an email was received, I would get the notification sound and banner as expected and the unread badge appeared until the banner rose back up off screen. Once the banner had gone the unread badge disappeared and the notification no longer available.
I wondered if it was a glitch with the mail getting marked as read due to having previews showing when the phone was unlocked but the same thing happened when previews were set to never.
Then I remembered that I still had Edison Mail installed so wondered if this might be conflicting. Theoretically it shouldn't as nothing was being read and multiple clients can access IMAP and stay in sync.
I've uninstalled Edison Mail and haven't had the problem since.