Here's a script I use to quickly recompile dovecot with vpopmail support on Debian 6.0. I'm using the backports repository to get the 2.1 version of dovecot.
Now I'm using the following script every time I update and I get a new version of the dovecot packages.
- span style="color: #ff0000;">'s/with-sqlite \\/with-sqlite \\\n\t\t--with-vpopmail \\/'"--with-vpopmail""*.deb"'dbg'
The last line also installs all the dovecot packages except for the debug one. You might want to change it if you don't want all.