*) The easiest way to upgrade from Debian 6 + Dovecot-1.2 to Debian 7 + Dovecot-2 is, setup a virtual machine with Debian 7 and the latest iRedMail-0.8.4, then copy its config files to your old server. Of course you must backup Dovecot config files first.
*) Be careful, you have to sync passwords in Dovecot config files, and addition modifications you did with Dovecot-1.2.
Reference:
*) Dovecot official upgrade tutorials: http://wiki2.dovecot.org/Upgrading
P.S. Since we add some new settings in Dovecot-2 config file, we suggest you try the way we mentioned above instead of following Dovecot official tutorial.