restore mailgate functionality