Separated code for IMAP into IMAP, POP3 and NNTP