CentOS 7.x Configure change password plugin for squirrelmail using poppassd
From Notes_Wiki
<yambe:breadcrumb>CentOS_7.x_migrate_CentOS_6.x_postfix,_dovecot,_squirrelmail_server|CentOS 7.x migrate CentOS 6.x postfix, dovecot, squirrelmail server</yambe:breadcrumb>
CentOS 7.x Configure change password plugin for squirrelmail using poppassd
Steps for configuration change password plugin for squirrelmail using poppassd are:
- Download change password plugin from https://squirrelmail.org/plugin_view.php?id=21 ( https://squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fchange_pass-3.1-1.4.0.tar.gz )
- Download compability plugin from https://squirrelmail.org/plugin_view.php?id=152 ( https://squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcompatibility-2.0.16-1.0.tar.gz )
- cd /usr/share/squirrelmail/plugins
- ls
- tar xzf /root/change_pass-3.1-1.4.0.tar.gz
- tar xzf /root/compatibility-2.0.16-1.0.tar.gz
- Download poppassd.c from https://netwinsite.com/poppassd/
- Look at poppassd.c and make sure it looks safe
- yum -y install gcc
- gcc poppassd.c -o poppassd -lcrypt
- mv poppassd /usr/local/bin/
- yum -y install xinetd
- cp /etc/xinetd.d/time-stream /etc/xinetd.d/poppassd
- vim /etc/xinetd.d/poppassd
- Update "service time" to "service poppassd"
- disable = no
- id = poppasswd
- type = UNLISTED
- user = root
- group = root
- server = /usr/local/bin/poppassd
- port = 106
- systemctl restart xinetd
- systemctl enable xinetd
- Test by doing "telnet localhost 106" that service is started properly or not
- cd /usr/share/squirrelmail/config
- ./conf.pl
- Plugins
- compatilibility
- change_pass
- S
- Q
- cd /usr/share/squirrelmail/plugins
- vim change_pass/functions.php
- Near line 54 comment "//if(!preg_match('/^2\d\d/', $result)) {" and insert another line "if(!preg_match('/Cha/', $result)) {"
- without this change is not detected as due to some bug poppassd is not sending proper 200 response on CentOS 7.0
- cd /etc/cron.hourly
- vim kill_poppassd.sh
- #!/bin/bash
- killall poppassd > /dev/null 2>&1
- chmod +x kill_poppassd.sh
- This is required to kill lingering poppassd processes who keep waiting for connection to close properly
- Test by changing a few passwords. Note that after every password change attempt you must logout and log back in before trying to change password again.
<yambe:breadcrumb>CentOS_7.x_migrate_CentOS_6.x_postfix,_dovecot,_squirrelmail_server|CentOS 7.x migrate CentOS 6.x postfix, dovecot, squirrelmail server</yambe:breadcrumb>