Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: blmayer (bleemayer@gmail.com)
Date: Wed Sep 6 22:12:10 2023 -0300
Added test script and example
diff --git a/example-1.mbox b/example-1.mbox new file mode 100644 index 0000000..4a177c3 --- /dev/null +++ b/example-1.mbox @@ -0,0 +1,9 @@ +From derp.herp@example.com Thu Jan 1 00:00:01 2015 +From: derp.herp@example.com (Derp Herp) +Date: Thu, 02 Jan 2015 00:00:01 +0100 +Subject: Another test + +This is another simple test. + +Bye. + diff --git a/receive-localhost b/receive-localhost new file mode 100755 index 0000000..80f1b0f --- /dev/null +++ b/receive-localhost @@ -0,0 +1,18 @@ +#!/bin/sh + +# first line is From email date: +read -r foo from date + +# read headers +while read -r k v +do + case "$k" in + "Subject:") subj="$v" ;; + "") break ;; + esac +done + +# now the rest is a body +echo "email: $from, date: $date, subject: $subj" +echo "body:" +cat