thread-safe. This needs to be done for the mail server do, but major (unrelated) changes are pending.