diff --git a/scripts/webmail.sh b/scripts/webmail.sh index a0a02c7e..c19215a3 100755 --- a/scripts/webmail.sh +++ b/scripts/webmail.sh @@ -44,8 +44,22 @@ tools/editconf.py /etc/roundcube/main.inc.php \ "\$rcmail_config['message_sort_col']='arrival';" \ "\$rcmail_config['junk_mbox']='Spam';" \ "\$rcmail_config['default_folders']=array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');" \ - "\$rcmail_config['draft_autosave']=30;" + "\$rcmail_config['draft_autosave']=30;" \ + "\$rcmail_config['plugins']=array('password');" +# Password changing plugin settings +# The config comes empty by default, so we need the settings +# we're not planning to change in config.inc.dist... +cp /usr/share/roundcube/plugins/password/config.inc.php.dist \ + /etc/roundcube/plugins/password/config.inc.php + +tools/editconf.py /etc/roundcube/plugins/password/config.inc.php \ + "\$rcmail_config['password_minimum_length']=6;" \ + "\$rcmail_config['password_db_dsn']='sqlite:///$STORAGE_ROOT/mail/users.sqlite';" \ + "\$rcmail_config['password_query']='UPDATE users SET password=%D WHERE email=%u';" \ + "\$rcmail_config['password_dovecotpw']='/usr/bin/doveadm pw';" \ + "\$rcmail_config['password_dovecotpw_method']='SHA512-CRYPT';" \ + "\$rcmail_config['password_dovecotpw_with_method']=true;" # Configure storage of user preferences. mkdir -p $STORAGE_ROOT/mail/roundcube @@ -58,6 +72,16 @@ cat - > /etc/roundcube/debian-db.php <