by Pieterjan Heyse.
I would like to use imap auth. against Microsoft's Office365 IMAP server, but that will allow all the Office365 users into my Moodle install. Is there a way to use imap auth, but restrict the username to a certain regex, so I can validate the domain part of the username?