propellor spin

This commit is contained in:
Joey Hess 2014-07-18 15:58:05 -04:00
parent ef472be6a6
commit fd7d6907b8
Failed to extract signature
2 changed files with 32 additions and 8 deletions

View File

@ -105,8 +105,9 @@ hosts = -- (o) `
& JoeySites.kiteMailServer & JoeySites.kiteMailServer
-- & alias "smtp.kitenet.net" -- not yet live! -- & 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: -- Since password authentication is allowed:
& Apt.serviceInstalledRunning "fail2ban" & Apt.serviceInstalledRunning "fail2ban"
@ -400,14 +401,14 @@ monsters = -- but do want to track their public keys etc.
{- Remaining services on kite: {- Remaining services on kite:
- -
- mail - mail
- postfix - /postfix
- postgrey - /postgrey
- mailman - mailman
- spamassassin - /spamassassin
- sqwebmail - sqwebmail
- courier - /courier
- imap - /imap
- tls - /pop
- apache - apache
- some static websites - some static websites
- bitlbee - bitlbee

View File

@ -508,11 +508,34 @@ kiteMailServer = propertyList "kitenet.net mail server"
, Apt.serviceInstalledRunning "dovecot-imapd" , Apt.serviceInstalledRunning "dovecot-imapd"
, Apt.serviceInstalledRunning "dovecot-pop3d" , 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 where
ctx = Context "kitenet.net" ctx = Context "kitenet.net"
pinescript = "/usr/local/bin/pine"
hasJoeyCAChain :: Property hasJoeyCAChain :: Property
hasJoeyCAChain = "/etc/ssl/certs/joeyca.pem" `File.hasPrivContentExposed` hasJoeyCAChain = "/etc/ssl/certs/joeyca.pem" `File.hasPrivContentExposed`