summaryrefslogtreecommitdiff
path: root/config-joey.hs
diff options
context:
space:
mode:
authorJoey Hess2014-07-17 20:01:21 -0400
committerJoey Hess2014-07-17 20:01:21 -0400
commit1aab98549e2fe7183fff6c054b261a277e2abf6a (patch)
tree7eb733cbf765d028c1e7fb135554a335fceea502 /config-joey.hs
parentb0fd7f0006546c856ab8d2d25e26dfbc8c030124 (diff)
propellor spin
Diffstat (limited to 'config-joey.hs')
-rw-r--r--config-joey.hs36
1 files changed, 36 insertions, 0 deletions
diff --git a/config-joey.hs b/config-joey.hs
index c05144b2..7f55b953 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -101,6 +101,16 @@ hosts = -- (o) `
`requires` Gpg.keyImported "98147487" "root"
`requires` Ssh.keyImported SshRsa "root"
(Context "kite.kitenet.net")
+
+ & Docker.configured
+ & Docker.garbageCollected `period` (Weekly (Just 1))
+
+ -- Mail server is in a docker container for stability.
+ & Docker.docked hosts "mail-server"
+ `requires` File.dirExists "/var/spool/postfix"
+ -- sstmp is used to relay mail on kite into the container's
+ -- mail server.
+ & Apt.installed ["ssmtp"]
, standardSystem "diatom.kitenet.net" Stable "amd64"
[ "Important stuff that needs not too much memory or CPU." ]
@@ -240,6 +250,32 @@ hosts = -- (o) `
& Docker.volume "/var/www:/var/www"
& Apt.serviceInstalledRunning "apache2"
+ -- Mail server (smtp, pop, imap) in a container.
+ -- Uses the host's /home, /var/mail and /var/spool/postfix directories,
+ -- which must exist on the host.
+ , standardContainer "mail-server" Stable "amd64"
+ & Docker.volume "/home"
+ & Docker.volume "/var/mail"
+ & Docker.volume "/var/spool/postfix"
+ & Docker.publish "25:25" -- smtp
+ & Docker.publish "110:110" -- pop3
+ & Docker.publish "220:220" -- imap3
+ & Docker.publish "465:465" -- smtps
+ & Docker.publish "993:993" -- imaps
+ & Docker.publish "995:995" -- pop3s
+ & Postfix.installed
+ & Apt.installed ["postgrey", "postfix-pcre"]
+ & Apt.installed ["spamass-milter", "spamassassin"]
+ & "/etc/default/spamassassin" `File.containsLines`
+ [ "ENABLED=1"
+ , "OPTIONS=\"--create-prefs --max-children 5 --helper-home-dir\""
+ , "CRON=1"
+ , "NICE=\"--nicelevel 15\""
+ ]
+ & Apt.installed ["maildrop"]
+ & Apt.serviceInstalledRunning "dovecot-imapd"
+ & Apt.serviceInstalledRunning "dovecot-pop3d"
+
-- My own openid provider. Uses php, so containerized for security
-- and administrative sanity.
, standardContainer "openid-provider" Stable "amd64"