48 lines
1.0 KiB

#!/bin/bash
set -eux # -x for verbose logging to juju debug-log
## XXXvlab: warning: had some dialog box poping out for postfix configuration despite the "-y" when testing this by hand
apt-get install -y postfix dovecot-sieve dovecot-postfix dovecot-imapd amavisd spamassassin fetchmail
apt-get install -y postfix-ldap dovecot-ldap
## SASL
apt-get install sasl2-bin
# edit /etc/saslauth
## SASL auth (if SASL authentication failure: cannot connect to saslauthd server: Permission denied)
adduser postfix sasl
## clamav
apt-get install -y clamav-daemon
adduser clamav amavis
## Add NFS server
#cat <<EOF >> /etc/fstab
#
### https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/1041377
## bootwait : forces the rest of the boot to wait this filesystem
## timeo : retest after this timeout
#172.128.0.1:/home /home nfs timeo=14,intr,bootwait,auto 0 0
#
#EOF
## fail2ban (DONT INSTALL ON LXC UNTIL IT SUPPORT IPTABLES)
#apt-get install -y fail2ban
# change ignoreip in /etc/fail2ban/jail.conf
# change mail
# disable ssh