Skip to content

Commit

Permalink
Fixed Poodle bug issue for Ubuntu 12.04
Browse files Browse the repository at this point in the history
  • Loading branch information
gau1991 committed Nov 5, 2014
1 parent 8dd2535 commit 4060484
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/modules/stack/install/mail/ee_mod_setup_dovecot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function ee_mod_setup_dovecot()
# Configuring 10-mail.conf
sed -i "s/mail_location = mbox:~\/mail:INBOX=\/var\/mail\/%u/mail_location = maildir:\/var\/vmail\/%d\/%n/" /etc/dovecot/conf.d/10-mail.conf \
|| ee_lib_error "Unable to configure Dovecot mail_location, exit status = " $?

# Configuring 10-auth.conf
sed -i "s/#disable_plaintext_auth = yes/disable_plaintext_auth = no/" /etc/dovecot/conf.d/10-auth.conf && \
sed -i "s/auth_mechanisms = plain/auth_mechanisms = plain login/" /etc/dovecot/conf.d/10-auth.conf && \
Expand All @@ -31,7 +31,14 @@ function ee_mod_setup_dovecot()
|| ee_lib_error "Unable to setup 10-auth.conf file, exit status = " $?

# Configuring 10-ssl.conf, Disable SSLv2 and SSLv3, Fixes POODLE Bug
sed -i "s/#ssl_protocols =.*/ssl_protocols = \!SSLv2 \!SSLv3/" /etc/dovecot/conf.d/10-ssl.conf
grep ssl_protocols /etc/dovecot/conf.d/10-ssl.conf &>> $EE_COMMAND_LOG
if [ $? -eq 0 ]; then
# For Ubuntu 14.04, Debian 6 and Debian 7 10-ssl.conf file contains commented #ssl_protocol variable
sed -i "s/#ssl_protocols =.*/ssl_protocols = \!SSLv2 \!SSLv3/" /etc/dovecot/conf.d/10-ssl.conf
else
# For Ubuntu 12.04 10-ssl.conf file does not contain commented #ssl-protocols variable
echo 'ssl_protocols = !SSLv2 !SSLv3' >> /etc/dovecot/conf.d/10-ssl.conf
fi

# Configuring dovecot-sql.conf.ext
cp -v /usr/share/easyengine/mail/dovecot-sql.conf.ext /etc/dovecot/dovecot-sql.conf.ext &>> $EE_COMMAND_LOG \
Expand Down

0 comments on commit 4060484

Please sign in to comment.