Safe Haskell | None |
---|---|
Language | Haskell98 |
- installed :: Property
- restarted :: Property
- reloaded :: Property
- satellite :: Property
- mappedFile :: FilePath -> (FilePath -> Property) -> Property
- newaliases :: Property
- mainCfFile :: FilePath
- mainCf :: (String, String) -> Property
- getMainCf :: String -> IO (Maybe String)
- mainCfIsSet :: String -> IO Bool
- dedupMainCf :: Property
- dedupCf :: [String] -> [String]
Documentation
Configures postfix as a satellite system, which relays all mail through a relay host, which defaults to smtp.domain.
The smarthost may refuse to relay mail on to other domains, without futher coniguration/keys. But this should be enough to get cron job mail flowing to a place where it will be seen.
mappedFile :: FilePath -> (FilePath -> Property) -> Property Source
Sets up a file by running a property (which the filename is passed to). If the setup property makes a change, postmap will be run on the file, and postfix will be reloaded.
Run newaliases command, which should be done after changing /etc/aliases.
The main config file for postfix.
mainCf :: (String, String) -> Property Source
Sets a main.cf name=value pair. Does not reload postfix immediately.
mainCfIsSet :: String -> IO Bool Source
Checks if a main.cf field is set. A field that is set to "" is considered not set.
dedupMainCf :: Property Source
Parses main.cf, and removes any initial configuration lines that are overridden to other values later in the file.
For example, to add some settings, removing any old settings:
mainCf `File.containsLines` [ "# I like bars." , "foo = bar" ] `onChange` dedupMainCf
Note that multiline configurations that continue onto the next line are not currently supported.