main' :: Capacity -> PortID -> EventT -> IO ()
main' cap port eventT = do
  _ <- installHandler sigPIPE Ignore Nothing
  _ <- installHandler sigCHLD (Catch (return ())) Nothing
  whoami <- getHostName
  withSocketsDo $
    withSyslog "postmaster" [PID, PERROR] MAIL $
      initResolver [NoErrPrint,NoServerWarn] $ \dns ->
        withGlobalEnv whoami dns eventT $
          listener port . smtpdServer cap
main' :: Capacity -> PortID -> EventT -> IO ()
main' cap port eventT = do
  _ <- installHandler sigPIPE Ignore Nothing
  _ <- installHandler sigCHLD (Catch (return ())) Nothing
  whoami <- getHostName
  withSocketsDo $
    withSyslog "postmaster" [PID, PERROR] MAIL $
      initResolver [NoErrPrint,NoServerWarn] $ \dns ->
        withGlobalEnv whoami dns eventT $
          listener port . smtpdServer cap
main' cap port eventT = do
  _ <- installHandler sigPIPE Ignore Nothing
  _ <- installHandler sigCHLD (Catch (return ())) Nothing
  whoami <- getHostName
  withSocketsDo $
    withSyslog "postmaster" [PID, PERROR] MAIL $
      initResolver [NoErrPrint,NoServerWarn] $ \dns ->
        withGlobalEnv whoami dns eventT $
          listener port . smtpdServer cap