From ec0823b4520c73ab61aed1bbb5637e6cecf1b021 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Sat, 20 Oct 2012 17:30:32 -0700 Subject: [PATCH] mime & util unit tests pass added a sample of what the config should look like, may need tweaking once I actually try to parse & use it. --- conf/inbucket.conf | 44 ++++++++++++++++++++++++++++++++++++++++++++ mime_test.go | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 conf/inbucket.conf diff --git a/conf/inbucket.conf b/conf/inbucket.conf new file mode 100644 index 0000000..0aed6ac --- /dev/null +++ b/conf/inbucket.conf @@ -0,0 +1,44 @@ +# inbucket.conf +# Sample inbucket configuration + +############################################################################# +[DEFAULT] + +# Not used by directly, but is typically referenced below in %()s format. +install.dir=. + +############################################################################# +[smtp] + +# IPv4 address to listen for SMTP connections on. +ip4.address=0.0.0.0 + +# IPv4 port to listen for SMTP connections on. +ip4.port=2500 + +# used in SMTP greeting +domain=skynet + +############################################################################# +[web] + +# IPv4 address to serve HTTP web interface on +ip4.address=0.0.0.0 + +# IPv4 port to serve HTTP web interface on +ip4.port=9000 + +# Name of web theme to use +theme=integral + +# Path to the selected themes template files +templates.dir=%(install.dir)s/themes/%(theme)/templates + +# Path to the selected themes public (static) files +public.dir=%(install.dir)s/themes/%(theme)/public + +############################################################################# +[datastore] + +# Path to the datastore, mail will be written into subdirectories +path=/tmp/inbucket diff --git a/mime_test.go b/mime_test.go index b2e1e4a..f1def09 100644 --- a/mime_test.go +++ b/mime_test.go @@ -79,7 +79,7 @@ func TestParseInlineHtml(t *testing.T) { // readMessage is a test utility function to fetch a mail.Message object. func readMessage(filename string) *mail.Message { // Open test email for parsing - raw, err := os.Open(filepath.Join("..", "..", "test-data", filename)) + raw, err := os.Open(filepath.Join("test-data", filename)) if err != nil { panic(fmt.Sprintf("Failed to open test data: %v", err)) }