From ea1598768c4c4b6b4f45148b0940641c5f9f85d2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 29 May 2015 22:52:46 -0400 Subject: Fix Postfix.satellite bug; the default relayhost was set to the domain, not to smtp.domain as documented. --- src/Propellor/Property/Postfix.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property/Postfix.hs') diff --git a/src/Propellor/Property/Postfix.hs b/src/Propellor/Property/Postfix.hs index 073d5dc8..b51f4df1 100644 --- a/src/Propellor/Property/Postfix.hs +++ b/src/Propellor/Property/Postfix.hs @@ -22,7 +22,8 @@ reloaded :: Property NoInfo reloaded = Service.reloaded "postfix" -- | 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" -- -- The smarthost may refuse to relay mail on to other domains, without -- futher coniguration/keys. But this should be enough to get cron job @@ -34,14 +35,14 @@ satellite = check (not <$> mainCfIsSet "relayhost") setup setup = trivial $ property "postfix satellite system" $ do hn <- asks hostName let (_, domain) = separate (== '.') hn - ensureProperties + ensureProperties [ Apt.reConfigure "postfix" [ ("postfix/main_mailer_type", "select", "Satellite system") , ("postfix/root_address", "string", "root") , ("postfix/destinations", "string", "localhost") , ("postfix/mailname", "string", hn) ] - , mainCf ("relayhost", domain) + , mainCf ("relayhost", "smtp." ++ domain) `onChange` reloaded ] -- cgit v1.2.3 From cfa236a04276a9c558be939a9c4c29dc3260589a Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sun, 28 Jun 2015 14:34:43 +0200 Subject: Fix a couple of trivial typos in Postfix docstring --- src/Propellor/Property/Postfix.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Postfix.hs') diff --git a/src/Propellor/Property/Postfix.hs b/src/Propellor/Property/Postfix.hs index b51f4df1..64a2004d 100644 --- a/src/Propellor/Property/Postfix.hs +++ b/src/Propellor/Property/Postfix.hs @@ -26,7 +26,7 @@ reloaded = Service.reloaded "postfix" -- but can be changed by mainCf "relayhost" -- -- 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. satellite :: Property NoInfo satellite = check (not <$> mainCfIsSet "relayhost") setup -- cgit v1.2.3 From 37a5c05aba1800a8ccf9a98a0bf3abd59ef1d140 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sun, 28 Jun 2015 14:39:05 +0200 Subject: Further docstring improvements. --- src/Propellor/Property/Postfix.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Propellor/Property/Postfix.hs') diff --git a/src/Propellor/Property/Postfix.hs b/src/Propellor/Property/Postfix.hs index 64a2004d..b062cbac 100644 --- a/src/Propellor/Property/Postfix.hs +++ b/src/Propellor/Property/Postfix.hs @@ -23,7 +23,7 @@ reloaded = Service.reloaded "postfix" -- | Configures postfix as a satellite system, which -- 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 -- further configuration/keys. But this should be enough to get cron job @@ -58,7 +58,7 @@ mappedFile f setup = setup f `onChange` cmdProperty "postmap" [f] -- | Run newaliases command, which should be done after changing --- . +-- @/etc/aliases@. newaliases :: Property NoInfo newaliases = trivial $ cmdProperty "newaliases" [] @@ -66,7 +66,7 @@ newaliases = trivial $ cmdProperty "newaliases" [] mainCfFile :: FilePath 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 (name, value) = check notset set `describe` ("postfix main.cf " ++ setting) @@ -75,7 +75,7 @@ mainCf (name, value) = check notset set notset = (/= Just value) <$> getMainCf name set = cmdProperty "postconf" ["-e", setting] --- | Gets a man.cf setting. +-- | Gets a main.cf setting. getMainCf :: String -> IO (Maybe String) getMainCf name = parse . lines <$> readProcess "postconf" [name] where @@ -131,9 +131,9 @@ dedupCf ls = -- | Installs saslauthd and configures it for postfix, authenticating -- 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 --- https://wiki.debian.org/PostfixAndSASL +-- . saslAuthdInstalled :: Property NoInfo saslAuthdInstalled = setupdaemon `requires` Service.running "saslauthd" -- cgit v1.2.3