I've got exactly the same problem. The problem is, that fail2ban tries to block the service imap3 which is not defined. In /etc/services only imap2 is defined... So add the entry imap3 143/tcp to /etc/services and it will work. I'm not sure if it's also necessary to fill a bug against netbase, or only fail2ban...

