Mail backend fixes