The ISPmail tutorial is maintained since 2002. You may have followed former versions of the tutorial and now want to know how to upgrade your mail server to Lenny properly. It is hard to provide exact instructions on what steps to go through. Here are some issues:
Database schema change
I know you'll hate me for that. But the normalized database layout used in the Etch tutorial was overshooting. So this tutorial uses a more human-readable layout which isn't that much different actually. And it's lighter on the database because the former queries used string operations on a view which might get slow on mail servers with very many users. To migrate your database please first make a backup of it (you never know). Then issue these SQL queries which should migrate your database painlessly to the new schema:
-- Create an additional 'email' column in the virtual_users table
ALTER TABLE virtual_users ADD email VARCHAR(100) NOT NULL;
-- Fill the 'email' column with the complete email address.
UPDATE virtual_users LEFT JOIN virtual_domains ON virtual_users.domain_id=virtual_domains.id SET email=concat(virtual_users.user,'@',virtual_domains.name);
-- Remove the 'user' column
ALTER TABLE virtual_users DROP user;
-- Drop the 'view_users' view
DROP VIEW view_users;
-- Enlarge the email fields in the virtual_aliases view
ALTER TABLE virtual_aliases CHANGE source source VARCHAR(100);
ALTER TABLE virtual_aliases CHANGE destination destination VARCHAR(100);
-- Rewrite the source side of the virtual_aliases to the full email address
UPDATE virtual_aliases LEFT JOIN virtual_domains ON virtual_aliases.domain_id=virtual_domains.id SET source=concat(virtual_aliases.source,'@',virtual_domains.name);
-- Drop the 'view_aliases' view
DROP VIEW view_aliases;
You will also need to adjust the ".cf" configuration files as described in the respective chapter.
Mail directories now under /var/vmail
The FHS (file hierarchy standard) suggests to put mails under /var/mail. Previously the tutorial expected to put all mails under /home/vmail but the mail directories do not really belong there. So the new tutorial uses /var/vmail as a location. This issue is a bit nasty as you need to move your Maildirs. This tutorial introduces server-side filtering to allow users to apply pre-defined filters when an email arrives. Dovecot stores these filter files in the user's mail directory so the actual mails need to be moved one level deeper in your directory structure.
It's just cosmetics so you don't have to move your mails there. But if you do it then change the following files:
mail_location = maildir:/var/vmail/%d/%n/Maildir
(Early versions of the Etch tutorial didn't use a seperate "Maildir" subdirectory. So if you have an existing directory without that structure you have to create a Maildir folder right there and move all mail folders (cur, new, tmp and all folders starting with a dot there. Otherwise the "sieve"-based filtering described in this tutorial won't work.)
Check your "namespace private" section to change "/home/vmail" to "/var/vmail".
AMaViS configuration file
Previously the tutorial recommended to put your custom AMaViS configuration into the /etc/amavis/conf.d/20-debian_defaults file. This will make this file risk getting changed during an update. Please move your settings to the /etc/amavis/conf.d/50-user file instead.
Global Dovecot/Sieve config file
In recent Dovecot versions the configuration directory for the global sieve filter file has changed. Previously it was configured as the "global_script_path" in the "protocol lda" section. Now it's the "sieve_global_path" setting in the /etc/dovecot.conf "plugin" section. See also.
Dovecot now creates maildirs automatically
The Dovecot version used in Debian Etch threw errors if a user accessed a mailbox which had not received any email yet. The Debian Lenny version does not have this issue. So you don't have to send the user a "welcome mail" or even create the maildir manually.
Dovecot's configuration file
In the /etc/dovecot/dovecot-sql.conf file you need to change the line
password_query = SELECT email as user, password FROM view_users WHERE email='%u';
password_query = SELECT email,password FROM virtual_users WHERE email='%u';
Debian's release notes
Also you should read Debian Lenny's release notes before attempting to upgrade your system from Etch to Lenny.