download courierpassd-1.1.2.tar.gz
# tar -zxvf courierpassd-1.1.2.tar.gz
# cd courierpassd-1.1.2
# ./configure
# make && make install
OK. Courierpassd is installed now. Next, we are going to configure Xinetd/Inetd to run courierpassd.
If your server uses Xinetd, here’s how you integrate Courierpassd into it:
# cd /etc/xinetd.d
Here we create the xinetd script for courierpassd…
# vi courierpassd
Add the following to the file you are creating:
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
}
Note: You may want to add additional IP’s to the “only_from” setting above, depending on your needs.
Save and exit.
OR
If your server uses Inetd, here’s how integrate Courierpassd into it:
# vi /etc/inetd.conf
Add the following line:
courierpassd stream tcp nowait root /usr/local/sbin/courierpassd -s imap
Save and exit.
Now let’s add the Courierpassd service to the system’s services file:
# vi /etc/services
Append to following line to the /etc/services file:
courierpassd 106/tcp #for /etc/xinetd.d/courierpassd
Now lets restart xinetd OR inetd (whichever you are using):
# /etc/init.d/xinetd restart
OR
# /etc/init.d/openbsd-inetd restart
Note: The daemon names on your system might be named differently. On Sarge and perhaps Ubuntu systems, the inetd command minght need to be /etc/init.d/inetd restart
Now let’s test Courierpassd by trying the reset the password for a mail account. Here’s what a successfull test should look like (change the bold items to your own information):
root@syngin:/# telnet localhost 106
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
200 courierpassd v1.1.0-RC1 hello, who are you?
user postmaster@syngin.com
200 Your password please.
pass my_password
200 Your new password please.
newpass my_new_password
200 Password changed, thank-you.
quit
200 Bye.
Connection closed by foreign host.
root@syngin:/#
Tidak ada komentar:
Posting Komentar