From 2d94e96bf5322849f87c49cd26cdff6f2e2ace4e Mon Sep 17 00:00:00 2001 From: Tobias Herre Date: Mon, 6 Nov 2023 22:43:10 +0100 Subject: [PATCH] Can change vimb password (call configure_password_plugin) --- roundcube.cf | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/roundcube.cf b/roundcube.cf index 24ca622..3c5b7c1 100644 --- a/roundcube.cf +++ b/roundcube.cf @@ -250,7 +250,6 @@ methods: files: "$(roundcube.config_file)" -#create => "true", perms => m("644"), copy_from => seed_cp("$(def.wmde_lib)/templates/roundcube-config.inc.php.mustache"), handle => "roundcube_config_created"; @@ -270,3 +269,31 @@ commands: reports: } + + +bundle agent configure_roundcube_password_plugin(cfg) +{ +vars: + "config_file" string => "$(roundcube.install_sub_dir)/plugins/password/config.inc.php"; + + + "settings[password_driver]" string => "'sql'"; + "settings[password_confirm_current]" string => "false"; + "settings[password_algorithm]" string => "'sha256-crypt'"; + "settings[password_db_dsn]" string => "'mysql://$(cfg[db_user]):$(cfg[db_pass])@$(cfg[db_host])/$(cfg[db_name])'"; + "settings[password_query]" string => "\"UPDATE mailbox SET password=%P WHERE username=%u;\""; + "settings[password_crypt_hash]" string => "'sha256'"; + +files: + "$(config_file)" + perms => m("644"), + copy_from => seed_cp("$(def.wmde_lib)/templates/roundcube-password-config.inc.php.mustache"), + handle => "roundcube_password_config_created"; + + "$(config_file)" + edit_line => rc_line_based("$(this.bundle).settings"), + handle => "roundcube_password_config_edited", + depends_on => {"roundcube_password_config_created"}; + + +}