Jelly Bean IMAP, Couldn't open connection to server
Ok, I tried restarting the IMAP server with no luck and then I decided to try a second factory reset, not that I was expecting it to work but apparently something changed because suddenly it worked and I have no idea why. Ah, the magic of user-friendliness.