[WIP] Add support for user-provided IMAP settings.