In this project you will configure a web mail MUA called Squirrelmail. This will first require configuring Apache web server. You will also configure the web server to enable your yum repository, created in an earlier project.
A web server accepts requests from clients (known as web browsers) for specific documents. Usually these are text documents with HTML formatting, but may be any type of document. In addition, a web server can generate documents dynamically, as the result of running separate (external) programs or performing database lookups.
The requests include a URL
which uniquely identifies a document on the internet.
A URL has several parts, including a protocol (such as
etc.), a web server (either an IP address or a
DNS name, such as
mail.example.com, etc.) and an optional
port number (by default “
a pathname, and optional other data.
A typical example might be
A URL can also point to a directory rather than
In this case it is up to the web server to determine what document
to return to the client.
Some possibilities include a (nicely formatted) directory listing,
an error message, or some default document.
For Apache the default document is called
index.html” (or some variation such as
A default web page for the top directory of the web server is called
the server's home page.
This is the page you get with a URL similar to
By default Apache ships with a default “test” homepage.
You will probably need to change that!
The requests and responses are sent via TCP using HTTP. A request packet may include form data that the user entered on some web page that allows user input (a form), and includes a submit button.
In many cases, the user needs both privacy (so no one can eavesdrop) and assurance that they are talking to your website and not some impostor. Both of these goals are met if you use HTTPS connections. (This will be done in a project for the Unix/Linux Security course.)
Squirrelmail is a collection of PHP generated HTML forms that can either directly access mailboxes (MBOX but not Maildir!), or more commonly use an MAA, typically IMAP. Thus you will need to have your mail service (including IMAP) setup and working before you can setup Squirrelmail.
Although Squirrelmail can be configured to use IMAPS, the user enters usernames and passwords (and composed email) in HTML 4.0 forms. The resulting HTTP packet is sent in plain text form to your MAA. This is clearly a security problem! In this assignment we will use the same server for webmail and the MAA, so no sensitive data is transmitted across a network. In general you should only configure webmail from secure HTTPS connections. (This will be done in a project for the Unix/Linux Security course.)
Fedora may not have correct SE Linux policy rules for
Dovecot or other servers.
It is strongly suggested you make sure SE Linux is run in
permissive mode for this project.
One way to always boot up in permissive mode is to edit
/etc/selinux/config, and follow the
comments to change the mode.
Unlike some previous projects, the steps will not include specific commands to run. At this point, you are expected to be able to locate relevant commands and documentation using the skills you have learned.
Perform the following tasks and answer the following questions
httpd.conf-original. Make any changes needed to the Apache web server configuration. While Apache will work “out of the box”, you may need to make some changes to turn on or off various features to suit your use as a webmail server. For example there is no need to support fancy indexing, UserDirs, etc. (In real life, you would have a static IP address and DNS name, and you may want to support “
https://webmail.servername/”.) What changes did you make, and to which files? (You should use
diffto record the changes made.)
httpd -S”. If any errors are reported, go back and change the incorrect statements. Repeat until no errors are detected. (Be sure to re-run
diffto record accurately the final set of changes made.)
localhost, port TCP/80 (and possibly TCP/443 for HTTPS). What changed (if any) did you need to make, and to which file(s)?
http://your-server-name/”. For now your server-name is just “
localhost”). If you don't see the Apache test page, examine the error and access logs to determine the problem(s). Once working, make sure your web server will start automatically at boot time. What changes did you make and /or commands did you issue, to have the web server start at boot time?
http://localhost/webmail/, which can be abbreviated as “
<a href="/webmail/">webmail</a>”. Be sure the page is legal HTML (or XHTML). You can save (with the correct name) and modify this Basic.htm web page to create a new default document for your website. What is the pathname of the default web page? What are the contents of your new homepage?
squirrelmailpackage. What other packages does this require?
cdto the Squirrelmail directory (
/usr/share/squirrelmail) Here you will find the Squirrelmail configuration program,
config/conf.pl. Run this program (from the Squirrelmail directory), and record the choices you make. (If you see a blank screen, it is likely the text color is the same as the background color. Use the command “
C” (and hit enter) to turn off colors.)
(You can use
localhost for server-name.)
That will run some tests, and at the bottom of the page will report
the results, hopefully that your configuration is working.
If not, re-run the configuration program and change the incorrect
Repeat until this works.
Don't forget to record all configuration changes as you
In a previous project, you created a
yum repository that was accessible with a
For this part of the project, you will configure apache to serve up this
repo, using a “
myhello” package. Verify the command
hellono longer is found.
myrepo.repofile, and change the URL to the repo from “
file:///” to “
http://localhost/myrepo/”. What is the output of
difffrom the previous version to the new version? (You are encouraged, but not required, to use RCS or some other versioning control system, and check in the original version, then check in the modified version. You can then use
rcsdiffto show the changes made.)
myrepo.conf” in the apache configuration directory,
/etc/httpd/conf.d/. This file needs one line in it, an
Aliasdirective to map the URL of
http://localhost/myrepo/to the directory containing your
yumrepository (should be
/var/myrepo/if you followed the directions in the Building and Installing Software project). You can look at some of the other configuration files in that directory to see how to use the
Aliasdirective, or look it up in the Apache on-line documentation. What is the name, permissions, and content of your
yum, it is customary to place a web page at your repo's URL, so those who type it in will not get an error message. Often this page will contain instructions for using the repo (or even a link for an RPM you can use to create the repo). Create a web page named
index.htmlin the root of your repo. What is the content of your web page? What permissions does that file need?
httpd -S”. What errors (if any) did this report? You should fix any serious errors and try again; note what you did to fix the errors in your journal.
myhellopackage from your new repo. What is the exact command you used? Verify the command
hellois now working.
A copy of your journal pages showing the changed made for this project, and the answers to the questions asked above. You can send as email to (preferred). If email is a problem for some reason, you may turn in a hard-copy. In this case the pages should be readable, dated, and stapled together. Your name should appear on the first page.
Don't turn in your whole journal, you will need to add to it every day in class! It is common in fact to keep the journal as a text file on the system (with a paper backup of course).
Please see your syllabus for more information about submitting projects.