summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2015-01-08 23:02:06 -0400
committerJoey Hess2015-01-08 23:02:06 -0400
commit5585778e5476e6ae16f0e378a2c7a005fc13122c (patch)
treea81a4f1d72dda499c075ea0a42dafd1e6fc85633 /src/Propellor
parenta8ed898d72c3771e591c247e03af9f4697e32ee9 (diff)
propellor spin
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index cb80a21b..e425df8b 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -605,11 +605,25 @@ postfixClientRelay ctx = Postfix.mainCfFile `File.containsLines`
`requires` hasJoeyCAChain
`requires` hasPostfixCert ctx
+-- Configures postfix to have the dkim milter, and no other milters.
+dkimMilter :: Property
+dkimMilter = Postfix.mainCfFile `File.containsLines`
+ [ "inet:localhost:8891"
+ , "non_smtpd_milters = inet:localhost:8891"
+ , "milter_default_action = accept"
+ ]
+ `describe` "postfix dkim milter"
+ `onChange` Postfix.dedupMainCf
+ `onChange` Postfix.reloaded
+ `requires` dkimInstalled
+
-- This does not configure postfix to use the dkim milter,
-- nor does it set up domainkey DNS.
dkimInstalled :: Property
dkimInstalled = propertyList "opendkim installed"
[ Apt.serviceInstalledRunning "opendkim"
+ , File.hasPrivContent "/etc/mail/dkim.key" (Context "kitenet.net")
+ , File.ownerGroup "/etc/mail/dkim.key" "opendkim" "opendkim"
, "/etc/default/opendkim" `File.containsLine`
"SOCKET=\"inet:8891@localhost\""
, "/etc/opendkim.conf" `File.containsLines`
@@ -618,22 +632,9 @@ dkimInstalled = propertyList "opendkim installed"
, "Domain *"
, "Selector mail"
]
- , File.hasPrivContent "/etc/mail/dkim.key" (Context "kitenet.net")
- , File.ownerGroup "/etc/mail/dkim.key" "opendkim" "opendkim"
]
`onChange` Service.restarted "opendkim"
--- Configures postfix to have the dkim milter, and no other milters.
-dkimMilter :: Property
-dkimMilter = Postfix.mainCfFile `File.containsLines`
- [ "inet:localhost:8891"
- , "non_smtpd_milters = inet:localhost:8891"
- , "milter_default_action = accept"
- ]
- `describe` "postfix dkim milter"
- `onChange` Postfix.dedupMainCf
- `onChange` Postfix.reloaded
-
-- This is the dkim public key, corresponding with /etc/mail/dkim.key
-- This value can be included in a domain's additional records to make
-- it use this domainkey.