Chapter 19. Setting up E-Mail Part 3: Webmail

At this point, setting up webmail is pretty simple. We have already installed squirrelmail in the first chapter on e-mail. However, we need to configure the webserver for this VM (it still has the configuration for www.projreality.sam). Edit /etc/httpd/conf/httpd.conf and changed the Listen line to:

Listen 172.16.152.15:80

We will also need to regenerate an SSL certificate for this VM, since the one we have right now is for www.projreality.sam . First, delete /etc/httpd/conf/server*, then run

sudo openssl genrsa -des3 -out server.key 2048

sudo openssl req -new -key server.key -out server.csr

Make sure to enter "mail.isp.sam" as the Common Name

sudo cp -a server.key server.key.orig

sudo openssl rsa -in server.key.orig -out server.key

sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Restart Apache if it is currently running.

Next, change the ownership of all of the Squirrelmail files:

chown -R http.http /srv/http/squirrelmail

Next, go to the squirrelmail config directory and run the config:

cd /srv/http/squirrelmail/config

sudo ./conf.pl

Select option 4, then option 1. Enter /srv/http/squirrelmail/data, then save and quit.

As before, mod_unique_id in Apache needs to be able to look up the server's own address. Start up backbone1, backbone2, backbone3, rns, a.root-servers.sam, ns1.isp.sam, and dns1.isp.sam After all of the other VMs are up, start Apache on mail.isp.sam

Finally, go to the customer VM and navigate to https://mail.isp.sam . Log in as "sam@isp.sam" with password "sampassword", and you should see the test e-mails we sent earlier when testing the SMTP setup. As an additional test, send yourself an e-mail and make sure it shows up in the Inbox.