#!/usr/bin/env bash # Roundcube if [ ! -f /usr/share/webapps/roundcube/config/config.inc.php ] then echo "/dev/null # Password plugin roundcubepass_strength_drive=$(cat /dev/urandom | tr -d -c 'a-z' | fold -w 8 | head -n 1) sed -e "/^\$config\['password_db_dsn'\]/ s|=.*|= 'mysql://${MYVEMAIL_POSTFIXADMIN_DBUSER}:${MYVEMAIL_POSTFIXADMIN_DBPASS}@localhost/${MYVEMAIL_POSTFIXADMIN_DBNAME}';|" \ -e "/^\$config\['password_strength_driver'\]/ s/=.*/= '${roundcubepass_strength_drive}';\\ \$config['password_"${roundcubepass_strength_drive}"_min_score'] = 5;/" \ -i /usr/share/webapps/roundcube/plugins/password/config.inc.php fi # Permissions setfacl -R -m u:${MYVEMAIL_NGINX_USERGROUP}:rwx /usr/share/webapps/postfixadmin/templates_c/ chown ${MYVEMAIL_NGINX_USERGROUP}:${MYVEMAIL_NGINX_USERGROUP} /usr/share/webapps/roundcube/{temp,logs}/ -R chown ${MYVEMAIL_NGINX_USERGROUP}:${MYVEMAIL_NGINX_USERGROUP} /usr/share/webapps/roundcube/plugins/password/config.inc.php chmod 0600 /usr/share/webapps/roundcube/plugins/password/config.inc.php # Start services /usr/sbin/php-fpm* -D nginx # <<- ##appendix # \$config['imap_conn_options'] = array( # 'ssl' => array( # 'verify_peer' => true, # 'verify_peer_name' => true, # 'allow_self_signed' => true, # ), # ); # # \$config['smtp_conn_options'] = array( # 'ssl' => array( # 'verify_peer' => true, # 'verify_peer_name' => true, # 'allow_self_signed' => true, # ), # ); # ##appendix