CyberPanel Community

[TUTORIAL] How to allow your SnappyMail users to change their mailbox passwords

jo
josephgodwinke #1

CyberPanel uses Snappymail and the ChangePassword feature (now re-implemented as plugin) was removed from core.

However, you can install Change Password plugin which adds change password capability to webmail.

Install the Change Password plugin

  1. Run in SSH Terminal
$ cd /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins && wget https://github.com/josephgodwinkimani/cyberpanel-mods/raw/main/change-password.zip && unzip change-password.zip && rm -f change-password.zip 
  1. Login to SnappyMail as admin https://SERVER_URL/snappymail/?admin

  2. Go to https://SERVER_URL/snappymail/?admin#/packages activate Change Password plugin

  3. Press the gear icon besides the title of plugin and add the mariadb root and password from nano /usr/local/CyberCP/CyberCP/settings.py CTRL+W (search for) DATABASES =

  4. Change mysql statement to UPDATE e_users SET password = :newpass WHERE email = :email AND emailOwner_id = :domain

  5. Under Encrypt options In what way do you want the passwords to be encrypted? choose bcrypt and prefix as {CRYPT} (Optional encrypted password prefix, like {ARGON2I} or {BLF-CRYPT} or {SHA512-CRYPT})

  6. Change DSN from mysql:host=localhost;dbname=snappymail;charset=utf8 to mysql:host=localhost;dbname=cyberpanel;charset=utf8

Now the plugin is ready to activate. Activate it and test it will a mailbox user.

15 replies
le
leleu #5

Hi team
Is the right and last update version for Change Password is 2.17 ?
if it’s right one i don’t understand on tutirial this mention ; " add the mariadb root and password from nano /usr/local/CyberCP/CyberCP/settings.py CTRL+W (search for) DATABASES ="
WHERE i have to search ? not clear for me sorry ?

I do all change requested but it still not working
let me know
what i miss please
Thanks a lot for your effort

jo
josephgodwinke #6

Hello @Fraleu

Add mariadb root password you see on this file /usr/local/CyberCP/CyberCP/settings.py. If you have the Root File Manager addon then you can access it and search for DATABASES = directive you will see root password here in list of database connections/configurations

le
leleu #7

it’s done
i make change and get confirmation it’s done
below error when i perform test
Capture d’écran 2023-04-17 223235

I test with all one
i test with new one

jo
josephgodwinke #9

The encrypt prefix is wrong check the tutorial for the right option {CRYPT}

Co
Cookie #10

i followed the tutorial, but my users still cannot change their password

le
leleu #11

for me all working fine
thanks very much

ZA
Zinatullah Akrami #13

where we can set the username and password ?
or what are the default username and password ?

ZA
Zinatullah Akrami #14

I don’t see the MariaDB on the directory you mentioned!

jo
josephgodwinke #16

Hello @evonet

No I did not. You download it straight from official repo.

This is the version I used for this tutorial. Maybe try the new version and report back here if it works for you.

as
asedinfo #17

Hello, It works for me…

image

image

Tr
Trung #18

Tôi đã thiết lập nhưng ô Set New Password luôn bị mờ nên không thay đổi được mật khẩu. Xin hãy giúp tôi. Xin cảm ơn!

Sign in to reply