First, Dovecot must be compiled with option –with-libwrap , either add it to .spec file if you using RPM, or wherever you need. This option let you setup Dovecot to use TCP wrappers for login authentication. And allowing you to block it. If you get error “Can’t build with libwrap support: tcpd.h not found” – install tcp_wrappers-devel package to your system.

Second, you must add few lines into dovecot.conf – usually in /etc/dovecot (Im using Vpopmail/Qmail so group/user must be changed from default as per Wiki http://wiki2.dovecot.org/LoginProcess)