Commit 1ed7a713be9245843022bf19d48c10aa4cc72184

  • avatar
  • Peter Simons (Committer)
  • Thu Feb 21 00:31:43 CET 2008
  • avatar
  • Peter Simons <simons @cr…p.tyo> (Author)
  • Thu Feb 21 00:31:43 CET 2008
Updated files for publication on web site.
.gitignore
(1 / 0)
  
55/Setup.o
66/_darcs/*
77/dist
8/docs
89/index.html
910/notfound.html
1011/postmaster-*.tar.gz
GNUmakefile
(15 / 108)
  
1# GNUmakefile -- build Postmaster
1TOP=..
2include $(TOP)/mk/boilerplate.mk
23
3##### paths and programs
4# ---------------------------------------------------------------
45
5GHC := ghc
6OBJDIR := .objs
7HFLAGS := -threaded -O2 -funbox-strict-fields -Wall \
8 -odir $(OBJDIR) -hidir $(OBJDIR) \
9 -ihsdns -ignore-package hsdns \
10 '-\#include <adns.h>' \
11 '-\#include <errno.h>' \
12 -ihsemail -ignore-package hsemail \
13 -ihopenssl -ignore-package hopenssl \
14 '-\#include <openssl/evp.h>' \
15 -ihsyslog -ignore-package hsyslog \
6ALL_DIRS = \
7 ADNS \
168
17DOCDIR := docs
18HADDOCK := haddock
19HSC2HS := hsc2hs
20HDI_PATH := http://haskell.org/ghc/docs/latest/html/libraries
21HDI_FILE := /usr/local/ghc-current/share/ghc-6.7/html/libraries
22HDIFILES := \
23 -i $(HDI_PATH)/base,$(HDI_FILE)/base/base.haddock \
24 -i $(HDI_PATH)/network,$(HDI_FILE)/network/network.haddock \
25 -i $(HDI_PATH)/mtl,$(HDI_FILE)/mtl/mtl.haddock \
26 -i $(HDI_PATH)/unix,$(HDI_FILE)/unix/unix.haddock \
27 -i $(HDI_PATH)/parsec,$(HDI_FILE)/parsec/parsec.haddock
9PACKAGE := postmaster
10RELEASEDAY := 0.1
11VERSION := $(RELEASEDAY)
12PACKAGE_DEPS := base network
2813
29##### build postmaster binary
14SRC_HADDOCK_OPTS += -t "Postmaster ESMTP Server"
3015
31.PHONY: all
16# ---------------------------------------------------------------
3217
33SRCS := Postmaster.hs \
34 Postmaster/Base.hs \
35 Postmaster/FSM.hs \
36 Postmaster/FSM/Announce.hs \
37 Postmaster/FSM/DNSResolver.hs \
38 Postmaster/FSM/DataHandler.hs \
39 Postmaster/FSM/EhloPeer.hs \
40 Postmaster/FSM/EventHandler.hs \
41 Postmaster/FSM/HeloName.hs \
42 Postmaster/FSM/MailFrom.hs \
43 Postmaster/FSM/MailID.hs \
44 Postmaster/FSM/PeerAddr.hs \
45 Postmaster/FSM/PeerHelo.hs \
46 Postmaster/FSM/SessionState.hs \
47 Postmaster/FSM/Spooler.hs \
48 Postmaster/IO.hs \
49 Postmaster/Main.hs \
50 hsdns/ADNS.hs \
51 hsdns/ADNS/Base.hs \
52 hsdns/ADNS/Endian.hs \
53 hsdns/ADNS/Resolver.hs \
54 hsemail/Text/ParserCombinators/Parsec/Rfc2234.hs \
55 hsemail/Text/ParserCombinators/Parsec/Rfc2821.hs \
56 hopenssl/OpenSSL/Digest.hs \
57 hsyslog/System/Posix/Syslog.hs
18-include $(TOP)/mk/crypto.mk
19include $(TOP)/mk/target.mk
5820
59all:: postmaster
21haddock:: docs/tutorial.html
6022
61postmaster: $(SRCS) tutorial.lhs
62 @if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi
63 @rm -f $(OBJDIR)/Main.o $(OBJDIR)/Main.hi
64 $(GHC) --make $(HFLAGS) -o $@ tutorial.lhs -ladns -lcrypto
65
66%.hs : %.hsc
67 $(HSC2HS) $<
68
69##### documentation
70
71.PHONY: docs
72
73docs:: $(DOCDIR)/tutorial.html
74 @rm -f $(DOCDIR)/index.html
75 @$(MAKE) $(DOCDIR)/index.html
76
77$(DOCDIR)/index.html: $(SRCS)
78 @echo "Build documentation ..."
79 @if [ ! -d $(DOCDIR) ]; then mkdir $(DOCDIR); fi
80 @$(HADDOCK) $(HDIFILES) -s ../%F -t Postmaster -h \
81 -o $(DOCDIR) $(SRCS)
82
83$(DOCDIR)/tutorial.html: tutorial.lhs
23docs/tutorial.html: tutorial.lhs
8424 @lhs2html $<
8525 @mv tutorial.html $@
86
87NOTES: .todo
88 @devtodo -T -f all --date-format '%Y-%m-%d'
89 @mv TODO $@
90
91##### distribution
92
93.PHONY: dist mkdist
94
95dist: clean index.html $(DOCDIR)/index.html $(DOCDIR)/tutorial.html
96
97mkdist:
98 @darcs dist --dist-name postmaster-`date --iso-8601`
99
100index.html: README
101 @lhs2html $<
102 @sed -e 's%<p>\(.*Homepage\]</a></p>\)%<p class="title">\1%' <$<.html >$@
103 @rm -f README.html
104
105##### administrative targets
106
107.PHONY: clean distclean redate init-src
108
109clean::
110 @rm -rf $(OBJDIR)
111 @rm -f postmaster
112
113distclean:: clean
114 @rm -rf $(DOCDIR) index.html
115 @rm -f postmaster-*.tar.gz
116
117redate::
118 redate README
README
(3 / 5)
  
11Postmaster ESMTP Server
22=======================
33
4:Latest Release: postmaster-2006-04-06.tar.gz_
4:Latest Release: postmaster-0.1.tar.gz_
55:Darcs: darcs_ get http://postmaster.cryp.to/ postmaster
66
77.. contents::
5151 through a call-back function. Postmaster triggers an
5252 "event" every time a state change is required, and hopes
5353 that the call-back does whatever is necessary. Among the
54 `known events`_, this one is popular::
54 known events, this one is popular::
5555
5656 AddRcptTo Mailbox
5757
194194
195195.. _Sendmail: http://sendmail.org/
196196
197.. _postmaster-2006-04-06.tar.gz: http://postmaster.cryp.to/postmaster-2006-04-06.tar.gz
198
199.. _known events: docs/Text.ParserCombinators.Parsec.Rfc2821.html#t%3AEvent
197.. _postmaster-0.1.tar.gz: http://postmaster.cryp.to/postmaster-0.1.tar.gz
200198
201199.. _GHC: http://haskell.org/ghc/
202200
  
1Postmaster implements an ESMTP server. Given a configuration, it
2starts up and listens for incoming SMTP connections, handles
3them, and pipes the accepted e-mail messages into an arbitrary
4local mailer of your choice. A good local mailer is Procmail.
5Beyond that, you can configure and modify every little step of
6the SMTP transaction. All the real work is done through call-back
7functions.