Merge branch 'joeyconfig'

This commit is contained in:
Joey Hess 2015-06-29 16:24:54 -04:00
commit c0ba25ef87
1 changed files with 7 additions and 7 deletions

View File

@ -23,10 +23,10 @@ reloaded = Service.reloaded "postfix"
-- | Configures postfix as a satellite system, which -- | Configures postfix as a satellite system, which
-- relays all mail through a relay host, which defaults to smtp.domain, -- relays all mail through a relay host, which defaults to smtp.domain,
-- but can be changed by mainCf "relayhost" -- but can be changed by @mainCf "relayhost"@.
-- --
-- The smarthost may refuse to relay mail on to other domains, without -- The smarthost may refuse to relay mail on to other domains, without
-- futher coniguration/keys. But this should be enough to get cron job -- further configuration/keys. But this should be enough to get cron job
-- mail flowing to a place where it will be seen. -- mail flowing to a place where it will be seen.
satellite :: Property NoInfo satellite :: Property NoInfo
satellite = check (not <$> mainCfIsSet "relayhost") setup satellite = check (not <$> mainCfIsSet "relayhost") setup
@ -58,7 +58,7 @@ mappedFile f setup = setup f
`onChange` cmdProperty "postmap" [f] `onChange` cmdProperty "postmap" [f]
-- | Run newaliases command, which should be done after changing -- | Run newaliases command, which should be done after changing
-- </etc/aliases>. -- @/etc/aliases@.
newaliases :: Property NoInfo newaliases :: Property NoInfo
newaliases = trivial $ cmdProperty "newaliases" [] newaliases = trivial $ cmdProperty "newaliases" []
@ -66,7 +66,7 @@ newaliases = trivial $ cmdProperty "newaliases" []
mainCfFile :: FilePath mainCfFile :: FilePath
mainCfFile = "/etc/postfix/main.cf" mainCfFile = "/etc/postfix/main.cf"
-- | Sets a main.cf name=value pair. Does not reload postfix immediately. -- | Sets a main.cf @name=value@ pair. Does not reload postfix immediately.
mainCf :: (String, String) -> Property NoInfo mainCf :: (String, String) -> Property NoInfo
mainCf (name, value) = check notset set mainCf (name, value) = check notset set
`describe` ("postfix main.cf " ++ setting) `describe` ("postfix main.cf " ++ setting)
@ -75,7 +75,7 @@ mainCf (name, value) = check notset set
notset = (/= Just value) <$> getMainCf name notset = (/= Just value) <$> getMainCf name
set = cmdProperty "postconf" ["-e", setting] set = cmdProperty "postconf" ["-e", setting]
-- | Gets a man.cf setting. -- | Gets a main.cf setting.
getMainCf :: String -> IO (Maybe String) getMainCf :: String -> IO (Maybe String)
getMainCf name = parse . lines <$> readProcess "postconf" [name] getMainCf name = parse . lines <$> readProcess "postconf" [name]
where where
@ -131,9 +131,9 @@ dedupCf ls =
-- | Installs saslauthd and configures it for postfix, authenticating -- | Installs saslauthd and configures it for postfix, authenticating
-- against PAM. -- against PAM.
-- --
-- Does not configure postfix to use it; eg smtpd_sasl_auth_enable = yes -- Does not configure postfix to use it; eg @smtpd_sasl_auth_enable = yes@
-- needs to be set to enable use. See -- needs to be set to enable use. See
-- https://wiki.debian.org/PostfixAndSASL -- <https://wiki.debian.org/PostfixAndSASL>.
saslAuthdInstalled :: Property NoInfo saslAuthdInstalled :: Property NoInfo
saslAuthdInstalled = setupdaemon saslAuthdInstalled = setupdaemon
`requires` Service.running "saslauthd" `requires` Service.running "saslauthd"