48 lines
1.0 KiB

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