diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/SiteSpecific/JoeySites.hs | 27 |
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. |
