| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Description | |||||||||||||||||||||||||
| Postmaster's IO driver for System.IO.Driver and general initialization functions. | |||||||||||||||||||||||||
| Synopsis | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Speaking ESMTP | |||||||||||||||||||||||||
| smtpdHandler :: WriteHandle -> GlobalEnv -> BlockHandler SmtpdState | |||||||||||||||||||||||||
| This function ties it all together to build a BlockHandler for System.IO.Driver. | |||||||||||||||||||||||||
| smtpd :: Buffer -> Smtpd ([SmtpReply], Buffer) | |||||||||||||||||||||||||
| The unified interface to dialog and data section. This function relies on the fact that pipelining ends with DATA commands: dialog and payload must not come in a single buffer. See http://www.faqs.org/rfcs/rfc2920.html section 3.1. | |||||||||||||||||||||||||
| handleDialog :: String -> Smtpd SmtpReply | |||||||||||||||||||||||||
| Running Smtpd Computations | |||||||||||||||||||||||||
| runSmtpd' :: Logger -> Smtpd a -> GlobalEnv -> SmtpdState -> IO (a, SmtpdState) | |||||||||||||||||||||||||
| Run the given Smtpd computation and write the logging output via the given Logger. Use withGlobalEnv to create the global environment and emptyEnv to initialize the SmtpdState. | |||||||||||||||||||||||||
| runSmtpd :: Smtpd a -> GlobalEnv -> SmtpdState -> IO (a, SmtpdState) | |||||||||||||||||||||||||
| Convenience wrapper for runSmtpd' with Logger hard-coded to syslogger. | |||||||||||||||||||||||||
| withGlobalEnv | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| ESMTP Network Daemon | |||||||||||||||||||||||||
| smtpdServer :: Capacity -> GlobalEnv -> SocketHandler | |||||||||||||||||||||||||
| smtpdMain :: Capacity -> GlobalEnv -> ReadHandle -> WriteHandle -> SmtpdState -> IO SmtpdState | |||||||||||||||||||||||||
| main' :: Capacity -> PortID -> EventT -> IO () | |||||||||||||||||||||||||
| main :: IO () | |||||||||||||||||||||||||
| Logging | |||||||||||||||||||||||||
| type Logger = LogMsg -> IO () | |||||||||||||||||||||||||
| withLogger :: Logger -> Smtpd a -> GlobalEnv -> StateT SmtpdState IO a | |||||||||||||||||||||||||
| Bind the logging back-end to demote Smtpd to an ordinary StateT computation. | |||||||||||||||||||||||||
| syslogger :: Logger | |||||||||||||||||||||||||
| Our default logging back-end. | |||||||||||||||||||||||||
| Produced by Haddock version 2.1.0 | |||||||||||||||||||||||||