1. Plan for some down time (sorry, it's gotta happen with a distribution upgrade, regardless of Virtualmin being involved).
2. Convert your apt Virtualmin source to point to the virtualmin-lenny repo, instead of virtualmin-etch. Also add a virtualmin-universal source (this is new for lenny and will make upgrades and some other stuff easier/faster in the future; both on my side as the maintainer of the repos and on your side as the user). The virtualmin-universal source line looks like:
deb http://SERIAL:KEY@software.virtualmin.com/debian/ virtualmin-universal
Or, if using Virtualmin GPL:
deb http://software.virtualmin.com/gpl/debian/ virtualmin-universal
3. Upgrade the apache2 package from lenny with:
apt-get install apache2
4. Upgrade virtualmin-base to the lenny version with:
apt-get install virtualmin-base
5. This will probably (hopefully) install apache2-suexec-custom. Configure it in /etc/apache2/suexec/www-data to point to /home instead of /var/www (this is the first line in the file).
6. Assuming upgrading virtualmin-base worked, you can then probably safely dist-upgrade. Let me know about any weird dependency issues that seem Virtualmin related.
I believe that'll probably get you most of the way there. There appear to be some new saslauthd issues on Debian 5.0, but I haven't looked at those deeply enough to know exactly how that'll effect upgrades. You'll probably want to test sending mail via authenticated SMTP immediately, and address whatever issues appear in the logs, though. You may need to add "postfix" to the "sasl" group in /etc/group.