The IMAP module tests accounts against the IMAP service. This module supports
both imap (143) and imaps (993). The IMAP module asks for the server's capabilities
and then does either a LOGIN or an AUTHENTICATE PLAIN, depending on its response.
Medusa Documentation