diff --git a/precise/www/hooks/install b/precise/www/hooks/install index 475688e..709002e 100755 --- a/precise/www/hooks/install +++ b/precise/www/hooks/install @@ -35,3 +35,23 @@ a2enmod ssl rewrite /etc/init.d/apache2 restart + +## +## Install Mail utils (for php mail command and crond script mail) +## + +MAIL_DOMAINNAME=${MAIL_DOMAINNAME:-"localdomain"} +MAIL_SATTELITE_RELAYHOST=${MAIL_SATTELITE_RELAYHOST:-} + +debconf-set-selections <<< "postfix postfix/mailname string ${LXC_NAME}.${MAIL_DOMAINNAME}" +debconf-set-selections <<< "postfix postfix/main_mailer_type select 'Local only'" + + +apt-get install -y postfix mailutils + + +postconf inet_interfaces=loopback-only + +[ -z "$MAIL_SATTELITE_RELAYHOST" ] && postconf relayhost="$MAIL_SATTELITE_RELAYHOST" +postfix reload + diff --git a/precise/www/metadata.yaml b/precise/www/metadata.yaml index c50e20b..6c16602 100644 --- a/precise/www/metadata.yaml +++ b/precise/www/metadata.yaml @@ -6,5 +6,6 @@ description: | Installs a HTTP Apache server. config-resources: - /etc/apache2 + - /etc/postfix data-resources: - /var/www