#!/bin/bash # +----+----+----+----+ # | | | | | # Author: Mark David Scott Cunningham | M | D | S | C | # +----+----+----+----+ # Created: 2016-05-14 # Updated: 2017-05-14 # # Purpose: Regenererate the dh-params file for Dovecot to desired bit length # # Set the configuration on cPanel sed -i 's/\(^.*ssl_param.*[0-9]$\)/\1\nssl_dh_parameters_length = 2048\n/' /var/cpanel/templates/dovecot[0-9]*/main.default # Check file size ls -lah /var/lib/dovecot/ssl-parameters.dat # Rebuild the Dovecot conf from the template /scripts/builddovecotconf # Run the regeneration program /usr/libexec/dovecot/ssl-params # Check file size ls -lah /var/lib/dovecot/ssl-parameters.dat # Restart Dovecot /scripts/restartsrv_dovecot