mail: minor optimizations