Release
 

Extra Options - courier checkpassd and Squirrelmail's change_pass module

Do you want to allow your webmail users to be able to reset their passwords directly from the Squirrelmail interface? If so, then this page is for you. On this page I will outline the installation of the courierpassd package as well as the change_pass Squirremail module. Both of these items are needed in order to enable webmail users to change their passwords from the Squirrelmail interface. It's not too hard, but you'll need to pay close attention to detail. So let's get on with it!

Before we start, here are some important notes:

1. I am assuming that you have already installed courier-imap according the the install guide on this site. If you haven't, parts of this install will not make sense.

2. I am also assuming that you have Squirrelmail installed.

3. You will need to recompile and reinstall courier-imap. Dont' worry, I will go over this.

4. You will need to add a new service to your server's xinetd configuration. Dont' worry, I will cover this as well.

5. You will need to make sure port 106 is open to all local server traffic, or to whatever IP Squirrelmail is connecting to your IMAP server on.

Firstly, let'stop the IMAP server...

/etc/rc.d/init.d/imap stop

/etc/rc.d/init.d/imaps stop

Now we will unpack a fresh version of courier-imap, compile it and then install it. The new build will install right over your previous installation, so the whole process should be pretty smooth.

cd /downloads/qmailrocks

tar jxvf courier-imap-3.0.3.tar.bz2

cd courier-imap-3.0.3

./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat

make && make install-strip && make install-configure

Now make sure all the configs are up to date. On some of the copy commands below you may get warnings asking you if you want to overwrite the current file. Just answer yes (y).

cd /usr/local/etc

cp imapd.dist imapd

cp imapd-ssl.dist imapd-ssl

vi imapd-ssl

verify that IMAPDSSLSTART=YES

cp authdaemonrc.dist authdaemonrc

cp /usr/local/libexec/imapd.rc /etc/rc.d/init.d/imap

cp /usr/local/libexec/imapd-ssl.rc /etc/rc.d/init.d/imaps

We're all done with IMAP for now. So let's install courierpassd...

cd /downloads/qmailrocks

tar zxvf courierpassd-1.0.1.tar.gz

cd courierpassd-1.0.1

./configure --with-couriersrc=/downloads/qmailrocks/courier-imap-3.0.3

make && make install

Copy the authdaemon.passwd file to to correct location...

cp /downloads/qmailrocks/courier-imap-3.0.3/authlib/authdaemon.passwd /usr/local/libexec/authlib/

OK. Courierpassd is installed now. Next, we are going to configure xinetd to run courierpassd for the server...

cd /etc/xinetd.d

Here we create the xinetd script for courierpassd...

vi courierpassd

service courierpassd
{
port = 106
socket_type = stream
protocol = tcp
user = root
server = /usr/local/sbin/courierpassd
server_args = -s imap
wait = no
only_from = 127.0.0.1

instances = 4
disable = no
}

Note: You may want to add additional IP's to the "only_from" setting above, depending on your needs.

Save and exit.

vi /etc/services

Append to following line to the /etc/services file:

courierpassd 106/tcp #for /etc/xinetd.d/courierpasswd

And now we restart xinetd...

/etc/rc.d/init.d/xinetd restart

Alright. That's it for xinetd. Our last step is to installed the "change_pass" Squirrelmail module that will add a password changing tool to the webmail interface.

cd /path/to/squirrelmail_directory/plugins (example: cd /var/www/webmail/plugins)

Download the module...

wget http://squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fchange_pass-2.6-1.4.x.tar.gz

Unpack the module...

tar zxvf change_pass-2.6-1.4.x.tar.gz

Remove the tarball of the module...

rm -rf change_pass-2.6-1.4.x.tar.gz

Now let's go and add the module into Squirrelmail...

cd /path/to/squirrelmail_directory/config

Run the Squirrelmail configuration tool...

./conf.pl

Choose the option for "plugins". On my version of Squirrelmail, this was option 8. Once you are in the modules menu you should see the "change_pass" module on the list of available, but inactive, modules. You can add the "change_pass" module by simply typing the number associated with the module and then hitting enter. Once the module appears on the active module list, go ahead and save the configuration changes and then exit out of the configuration tool.

Alright! You should be all set now. All that's left to do is to restart courier-imap and then log in Squirrelmail and try out the password change tool!

/etc/rc.d/init.d/imap start

/etc/rc.d/init.d/imaps start

Now log into your Squirrelmail interface, go to the "options" area and attempt to reset your password. A successful password change will produce a message that says something along the lines of "Password successfully changed". If you get any errors, you can troubleshoot them by viewing the logs at /var/log/messages. Usually, any errors will be written there and you can then make any corrections or changes that are needed.

All done!

Home

 

 

Color Coded Qmail Installation Key
 
Regular Black Text 
 Qmail installation notes and summaries by the author. Me talking.
 
Bold Black Text 
 Commands to be run by you, the installer.
 
Bold Maroon Text 
 Special notes for Redhat 9 users.
 
Bold Red Text 
 Vital and/or critical information.
 
Regular/Bold Purple text 
 Denotes helpful tips and hints or hyperlinks.
 
Regular Orange Text 
 Command line output.
Cp

Regular green text 

 Denotes the contents of a file or script.
home | about | the installation | utilities | faq | contact | journal | mailing list | list archive | forum | links | donatemerchandise
modified
This mirror last modified: Thursday, August 9th, 2012 15:58:16 CEST
 
The Rocks Project