summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-07-18 15:58:05 -0400
committerJoey Hess2014-07-18 15:58:05 -0400
commitfd7d6907b82b0505584ff174ecee98d7e3d68493 (patch)
treed15f2fae01a87ef071f21f6b05561f320380a15c
parentef472be6a6e1270245ec50554d6d59c31e1e733d (diff)
propellor spin
-rw-r--r--config-joey.hs15
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs25
2 files changed, 32 insertions, 8 deletions
diff --git a/config-joey.hs b/config-joey.hs
index c3fb177f..a2c2554e 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -105,8 +105,9 @@ hosts = -- (o) `
& JoeySites.kiteMailServer
-- & alias "smtp.kitenet.net" -- not yet live!
+ -- & alias "imap.kitenet.net" -- not yet live!
- & Apt.installed ["mutt", "alpine", "git-annex", "myrepos"]
+ & Apt.installed ["git-annex", "myrepos"]
-- Since password authentication is allowed:
& Apt.serviceInstalledRunning "fail2ban"
@@ -400,14 +401,14 @@ monsters = -- but do want to track their public keys etc.
{- Remaining services on kite:
-
- mail
- - postfix
- - postgrey
+ - /postfix
+ - /postgrey
- mailman
- - spamassassin
+ - /spamassassin
- sqwebmail
- - courier
- - imap
- - tls
+ - /courier
+ - /imap
+ - /pop
- apache
- some static websites
- bitlbee
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 14cae614..52706d7e 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -508,11 +508,34 @@ kiteMailServer = propertyList "kitenet.net mail server"
, Apt.serviceInstalledRunning "dovecot-imapd"
, Apt.serviceInstalledRunning "dovecot-pop3d"
+ , "/etc/dovecot/conf.d/10-mail.conf" `File.containsLine`
+ "mail_location = maildir:~/Maildir"
+ `onChange` Service.reloaded "dovecot"
+ `describe` "dovecot configured"
- , Apt.installed ["bsd-mailx"]
+ , Apt.installed ["mutt", "bsd-mailx", "alpine"]
+
+ , pinescript `File.hasContent`
+ [ "#!/bin/sh"
+ , "# deployed with propellor"
+ , "set -e"
+ , "pass=$HOME/.pine-password"
+ , "if [ ! -e $pass ]; then"
+ , "\ttouch $pass"
+ , "fi"
+ , "chmod 600 pass"
+ , "exec alpine -passfile $pass \"$@\""
+ ]
+ `onChange` (pinescript `File.mode` combineModes (readModes ++ executeModes))
+ `describe` "pine wrapper script"
+ , "/etc/pine.conf" `File.containsLines`
+ [ "inbox-path={localhost/novalidate-cert}inbox"
+ ]
+ `describe` "pine configured to use local imap server"
]
where
ctx = Context "kitenet.net"
+ pinescript = "/usr/local/bin/pine"
hasJoeyCAChain :: Property
hasJoeyCAChain = "/etc/ssl/certs/joeyca.pem" `File.hasPrivContentExposed`