diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-14 15:42:26 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-14 15:42:26 -0400 |
| commit | e8db2577a8e07deda5ad121f7a574e2f4d88c543 (patch) | |
| tree | ea0b9c497d862512e92f5ff86672427ffb2d5fce /Propellor/Property/Postfix.hs | |
| parent | 8bb029002e547f272e705d92dbc9c4fa53a63d78 (diff) | |
propellor spin
Diffstat (limited to 'Propellor/Property/Postfix.hs')
| -rw-r--r-- | Propellor/Property/Postfix.hs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Propellor/Property/Postfix.hs b/Propellor/Property/Postfix.hs index c253aac2..49676640 100644 --- a/Propellor/Property/Postfix.hs +++ b/Propellor/Property/Postfix.hs @@ -2,11 +2,6 @@ module Propellor.Property.Postfix where import Propellor import qualified Propellor.Property.Apt as Apt -import Propellor.Property.User -import Utility.SafeCommand -import Utility.FileMode - -import System.PosixCompat installed :: Property installed = Apt.serviceInstalledRunning "postfix" @@ -18,9 +13,13 @@ installed = Apt.serviceInstalledRunning "postfix" -- futher coniguration/keys. But this should be enough to get cron job -- mail flowing to a place where it will be seen. satellite :: Property -satellite = Apt.reConfigure "postfix" - [ ("postfix/main_mailer_type", "select", "Satellite system") - , ("postfix/destinations", "string", "") - ] - `describe` "postfix satellite system" - `requires` installed +satellite = setup `requires` installed + where + setup = Property "postfix satellite system" $ do + hn <- getHostName + ensureProperty $ Apt.reConfigure "postfix" + [ ("postfix/main_mailer_type", "select", "Satellite system") + , ("postfix/root_address", "string", "root") + , ("postfix/destinations", "string", " ") + , ("postfix/mailname", "string", hn) + ] |
