Why: This facility allows a person to specify users on an email server in a
.htaccess file. Our application for this is in class websites at Southern Adventist
University. Advantages include:
- Class website contents can be restricted to students of the classes.
- The teacher doesn't have to maintain a separate password set for students.
- Students do not have to handle passwords for their classes.
- Students may change passwords using protocols set up by IS, without any
teacher intervention (or even knowledge).
- The teacher can manage the list of individuals on the authorized list easily.
If you are a user (e.g. teacher) and not the system administrator, skip to the User Implementationsection of this document.
(assuming Debian Sarge)
- In order to install mod_auth_imap, you must first have apxs available. This
is part of the apache_dev module. You'll need the C++ compiler too. Don't
worry about the kernel compability error message when you install gcc:
# apt-get install
# apt-get install gcc
- Next you need to obtain mod_auth_imap. It's at http://freshmeat.net/mod_auth_imap
or you can get it here. That means
copy it to your PC, then use SSH file transfer to send it to the LINUX box.
- Uncompress the archive: (Note: After typing mod_ you can use a tab to fill
out the rest of the filename)
# gunzip mod_auth_imap-current.tar.gz
- That leaves you with a .tar file. Now you need to unpack that into the pieces
that will be needed for installation..
# tar -xvf mod_auth_imap-current.tar.gz
- Now for the actual install. First cd into the directory created by the previous command, then::
# apxs -i -a -c
- (If this line is already in httpd.conf, you don't have to add it.) You are
given suggested configuration files. Ignore the file intended for appending
to httpd.conf. Instead, insert the following line at the end of the LoadModule
section (just before the string "ExtendedStatus").
- Restart Apache:
# apachectl restart
You'll be creating a .htaccess file to place in the directory you wish to protect. Here is an example that allows any user at SAU in:
#Turn on IMAP Authentication
#Give a name to the authentication domain, whatever you want:
AuthName "SAU Email username and password"
#Only basic authentication is supported for now:
#If you feel like it, restrict the users or allow all valid users:
#Make IMAP Authentication authoritative for this .htaccess file:
#Set the IMAP Server to which you want to connect (default=localhost):
#Set the port on which the imap server is running (default=143):
#Turn on some extra logging (login attempts, etc.) in Apache's Error Log
If you want a specific user list to apply, change the "require" line to start with "require user" then a list of space-delimited email usernames. Don't forget to include
your own. For example:
|require user jbeckett
bruckner urbina wmunger haltermn tyson dwilliam |