Suppose you host several different domains names that may or may not change over time. Wouldn't you like them all to access webmail the same way, automatically? This step by step guide will set up your Ubuntu 10.04 machine to do just that.
Prerequisites: A working IMAP/POP3 server, a working MTA (Mail Transfer Agent), Apache2, PHP
Ubuntu's repository has a squirrelmail package -- so first install squirrelmail:
sudo apt-get install squirrelmail
Now rather than following squirrelmail tutorials and including squirrelmail's apache.conf, go in to /etc/apache2/sites-available and create a file called webmail.
cd /etc/apache2/sites-available
sudo nano webmail
Once in the text editor, paste the following configurations in to the file: