mbsync: a little refactoring