summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/JoeySites.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/JoeySites.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 0ed7a629..cde3c49e 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -400,23 +400,31 @@ podcatcher = Cron.niceJob "podcatcher run hourly" (Cron.Times "55 * * * *")
"xargs git-annex importfeed -c annex.genmetadata=true < feeds; mr --quiet update"
`requires` Apt.installed ["git-annex", "myrepos"]
-kiteMailServer :: Property (HasInfo + DebianLike)
-kiteMailServer = propertyList "kitenet.net mail server" $ props
- & Postfix.installed
- & Apt.installed ["postfix-pcre"]
- & Apt.serviceInstalledRunning "postgrey"
+spamdEnabled :: Property DebianLike
+spamdEnabled = tightenTargets $
+ cmdProperty "update-rc.d" ["spamassassin", "enable"]
+ `assume` MadeChange
+spamassassinConfigured :: Property DebianLike
+spamassassinConfigured = propertyList "spamassassin configured" $ props
& Apt.serviceInstalledRunning "spamassassin"
& "/etc/default/spamassassin" `File.containsLines`
[ "# Propellor deployed"
- , "ENABLED=1"
, "OPTIONS=\"--create-prefs --max-children 5 --helper-home-dir\""
, "CRON=1"
, "NICE=\"--nicelevel 15\""
- ] `onChange` Service.restarted "spamassassin"
- `describe` "spamd enabled"
+ ]
+ `describe` "spamd configured"
+ `onChange` spamdEnabled
+ `onChange` Service.restarted "spamassassin"
`requires` Apt.serviceInstalledRunning "cron"
+kiteMailServer :: Property (HasInfo + DebianLike)
+kiteMailServer = propertyList "kitenet.net mail server" $ props
+ & Postfix.installed
+ & Apt.installed ["postfix-pcre"]
+ & Apt.serviceInstalledRunning "postgrey"
+ & spamassassinConfigured
& Apt.serviceInstalledRunning "spamass-milter"
-- Add -m to prevent modifying messages Subject or body.
& "/etc/default/spamass-milter" `File.containsLine`