The problem is in `nnimap-transform-headers', and I don't quite understand the logic at the moment... In GNU Emacs 26.0.50.5 (x86_64-pc-linux-gnu, GTK+ Version 3.20.9) of 2017-01-20 built on mouse Repository revision: 82a5e4dc889ecbfa35374616fe9c5edfa23f4504 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.10 -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no