First remotly working version with IMAP

It still runst better than POP3 \o/