Here is how I have Mac mail configured for my me.com mail account:
account type: iCloud IMAP
incoming server: p04-imap.mail.me.com (this is greyed out, so must have been supplied by me.com)
Outgoing server: .Mac(iCloud)
TLS certificate: none
Port 993 Use SSL
Authentication Apple Token
This works fine for me.
Thanks Michael, I managed to get a step closer by creating a new icloud imap account using my @icloud address which skipped the Incoming mail server panel. But when mail tried to verify it asked for my password. The only password i have is my original from @mac which it wouldnt accept. This is frustrating....
Alright, finally got it sussed. It seems that the username i used for my @mac acount was given to someone else for @icloud. Which is kinda rude since ive been using apple products for almost 10 years. Anyway, i created a new @icloud address via system preferences > mail & notes. Then in Mail i deleted the old IMAP account and created a new with the new icloud address. All working.