diff --git a/install-freedombone.sh b/install-freedombone.sh index 0c28d4af..b062b28a 100644 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -6,6 +6,8 @@ MY_USERNAME=$2 # Directory where source code is downloaded and compiled INSTALL_DIR=/root/build +export DEBIAN_FRONTEND=noninteractive + function initial_setup { apt-get -y update apt-get -y dist-upgrade @@ -525,6 +527,27 @@ function spam_filtering { service cron restart } +function configure_imap { + apt-get -y install dovecot-common dovecot-imapd + makecert dovecot + chown root:dovecot /etc/ssl/certs/dovecot.crt + chown root:dovecot /etc/ssl/private/dovecot.key + chown root:dovecot /etc/ssl/private/dovecot.dhparams + + sed -i 's|#ssl = yes|ssl = yes|g' /etc/dovecot/conf.d/10-ssl.conf + sed -i 's|ssl_cert = > /etc/dovecot/conf.d/10-ssl.conf + + + sed -i 's/#listen = *, ::/listen = */g' /etc/dovecot/dovecot.conf + sed -i 's/#disable_plaintext_auth = yes/disable_plaintext_auth = no/g' /etc/dovecot/conf.d/10-auth.conf + sed -i 's/auth_mechanisms = plain/auth_mechanisms = plain login/g' /etc/dovecot/conf.d/10-auth.conf + sed -i 's|# mail_location = maildir:~/Maildir| mail_location = maildir:~/Maildir:LAYOUT=fs|g' /etc/dovecot/conf.d/10-mail.conf +} + initial_setup install_editor enable_backports @@ -544,3 +567,4 @@ configure_internet_protocol script_to_make_self_signed_certificates configure_email spam_filtering +configure_imap