[FIX] mail: forward-port of rev 245bb4ebdfeccb05134b3ff943c9fd0fb01173c2