MacMail failes while receiving mail using imap from courier mail
As usually there might be a lot of reasons for that. In my case the reason became clear when I checked /var/log/messages:
imapd-ssl: /etc/courier-imap/shared/index: No such file or directory problem. The quick and dirty solution appeared to be really quick.