diff --git a/.goxc.json b/.goxc.json index 918a9bb..296a88e 100644 --- a/.goxc.json +++ b/.goxc.json @@ -6,7 +6,7 @@ "Resources": { "Include": "README*,LICENSE*,bin,etc,themes" }, - "PackageVersion": "20131001", + "PackageVersion": "20131010", "PrereleaseInfo": "snapshot", "FormatVersion": "0.8" } diff --git a/bin/mailbox-list.sh b/bin/mailbox-list.sh new file mode 100755 index 0000000..da5ca4c --- /dev/null +++ b/bin/mailbox-list.sh @@ -0,0 +1 @@ +curl -i -H "Accept: application/json" --noproxy localhost http://localhost:9000/mailbox/$1 diff --git a/bin/message-delete.sh b/bin/message-delete.sh new file mode 100755 index 0000000..c3c8b86 --- /dev/null +++ b/bin/message-delete.sh @@ -0,0 +1 @@ +curl -i -H "Accept: application/json" --noproxy localhost -X DELETE http://localhost:9000/mailbox/$1/$2 diff --git a/bin/message-source.sh b/bin/message-source.sh new file mode 100755 index 0000000..21714cc --- /dev/null +++ b/bin/message-source.sh @@ -0,0 +1 @@ +curl -i -H "Accept: application/json" --noproxy localhost http://localhost:9000/mailbox/$1/$2/source diff --git a/config/config.go b/config/config.go index bfa1e5f..25b6030 100644 --- a/config/config.go +++ b/config/config.go @@ -25,7 +25,7 @@ type SmtpConfig struct { type Pop3Config struct { Ip4address net.IP Ip4port int - Domain string + Domain string MaxIdleSeconds int } @@ -35,6 +35,7 @@ type WebConfig struct { TemplateDir string TemplateCache bool PublicDir string + GreetingFile string } type DataStoreConfig struct { @@ -328,6 +329,13 @@ func parseWebConfig() error { } webConfig.PublicDir = str + option = "greeting.file" + str, err = Config.String(section, option) + if err != nil { + return fmt.Errorf("Failed to parse [%v]%v: '%v'", section, option, err) + } + webConfig.GreetingFile = str + return nil } diff --git a/etc/devel.conf b/etc/devel.conf index 2ce5c4b..56b5c04 100644 --- a/etc/devel.conf +++ b/etc/devel.conf @@ -81,6 +81,10 @@ template.cache=false # Path to the selected themes public (static) files public.dir=%(install.dir)s/themes/%(theme)s/public +# Path to the greeting HTML displayed on front page, can +# be moved out of installation dir for customization +greeting.file=%(install.dir)s/themes/greeting.html + ############################################################################# [datastore] diff --git a/etc/inbucket.conf b/etc/inbucket.conf index a6c9c81..2236f1c 100644 --- a/etc/inbucket.conf +++ b/etc/inbucket.conf @@ -81,6 +81,10 @@ template.cache=true # Path to the selected themes public (static) files public.dir=%(install.dir)s/themes/%(theme)s/public +# Path to the greeting HTML displayed on front page, can +# be moved out of installation dir for customization +greeting.file=%(install.dir)s/themes/greeting.html + ############################################################################# [datastore] diff --git a/etc/unix-sample.conf b/etc/unix-sample.conf index 17b7b9d..00061f8 100644 --- a/etc/unix-sample.conf +++ b/etc/unix-sample.conf @@ -81,6 +81,10 @@ template.cache=true # Path to the selected themes public (static) files public.dir=%(install.dir)s/themes/%(theme)s/public +# Path to the greeting HTML displayed on front page, can +# be moved out of installation dir for customization +greeting.file=%(install.dir)s/themes/greeting.html + ############################################################################# [datastore] diff --git a/etc/win-sample.conf b/etc/win-sample.conf index b0fcdcf..507336c 100644 --- a/etc/win-sample.conf +++ b/etc/win-sample.conf @@ -81,6 +81,10 @@ template.cache=true # Path to the selected themes public (static) files public.dir=%(install.dir)s\themes\%(theme)s\public +# Path to the greeting HTML displayed on front page, can +# be moved out of installation dir for customization +greeting.file=%(install.dir)s\themes\greeting.html + ############################################################################# [datastore] diff --git a/themes/greeting.html b/themes/greeting.html new file mode 100644 index 0000000..67f4794 --- /dev/null +++ b/themes/greeting.html @@ -0,0 +1,9 @@ +
Inbucket is an email testing service; it will accept email for any email +address and make it available to view without a password.
+ +To view email for a particular address, enter the username portion +of the address into the box on the upper right and click go.
+ +This message can be customized by editing greeting.html. Change the
+configuration option greeting.file if you'd like to move it
+outside of the Inbucket installation directory.