Configuring And Administrating Mail - Lab
Exercises
Exercise 1: Installing and configuring sendmail
- Retrieve the sendmail binary distribution and a
gunzip binary for your platform from <URL:ftp://ftp.uwsg.indiana.edu/>.
gunzip the distribution with ./gunzip
sendmail-8.7.5.tar.gz and untar the distribution.
- Kill the running sendmail daemon, if any.
- Install the executable and manual files according to directions in
the distribution.
- Install the iu-standalone.cf configuration file according
to directions in the distribution.
Exercise 2: Aliasing
- If needed, modify the aliases file so that the appropriate
aliases are pointing to the postmaster alias
(MAILER-DAEMON, and any of the pseudo-users in the
passwd file). Point the postmaster alias to a human.
(Normally, you would point it to the administrator of the machine, but
in this case, point it to root and make sure there is not
already an alias for root).
- Set up an alias for keeping track of system changes called
admin-log. This alias should append mail to the file
/usr/local/adm/admin-log. Create any directories and files
needed with the appropriate permissions. Note: Remember that if
you choose setuid but not executable for the permissions of
/usr/local/adm/admin-log, it cannot be owned by root. In this
case, use an existing user, or create one to own the file.
- Re-build the aliases database after your changes have been
made.
Exercise 3: Invoking sendmail
- Start the newly installed sendmail as a daemon which
process the mail queue every thirty minutes.
Exercise 4: Debugging sendmail
- Verify that mail sent to postmaster will be re-directed to
root using sendmail in verify mode.
- Verify that mail sent to admin-log is appended to the file,
/usr/local/adm/admin-log.
- Using sendmail in test mode, verify that mail sent to root
will be delivered locally, by displaying how rulesets 3 and 0 will
rewrite the address root.
Cleanup
- Remove the admin-log alias from the aliases file
and rebuild the database.
- Remove the /usr/local/adm/admin-log file and any of the
directories you created to get there.
Setting Up Mailing Lists
Exercise 1: Creating a simple mailing list
- Create three user accounts on your machine.
- Using sendmail aliases, create a mailing list
with root as the -request and owner-
address, containing the addresses of the three accounts
you created.
- Send mail to the list request address, and verify that it
is properly delivered.
- Send mail to the list itself, and verify that the message
gets to all of the recipients
- Remove one of the users from the list and rebuild the database.
Send mail to the list again, and verify that the removed user
does not receive the message
- If you created the list by putting the list members in
/etc/aliases, move the list to a file instead.
Rebuild the database and repeat step 4.
- Remove the mailing list entirely, and rebuild the database.
- Remove the user accounts you created.