This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new dd8cabe Match at start of line only and allow for missing dest
dd8cabe is described below
commit dd8cabefdc8e2ab674ee9bb1c932086cac1681bb
Author: Sebb <[email protected]>
AuthorDate: Sat Oct 20 16:46:52 2018 +0100
Match at start of line only and allow for missing dest
---
tools/deliver.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/deliver.rb b/tools/deliver.rb
index 2ff4f37..e78f144 100644
--- a/tools/deliver.rb
+++ b/tools/deliver.rb
@@ -11,7 +11,7 @@ MAIL_ROOT = '/srv/mail'
mail = STDIN.read.force_encoding('binary')
# extract info
-dest = mail[/List-Id: <(.*)>/, 1] || mail[/Delivered-To.* (\S+)\s*$/, 1]
+dest = mail[/^List-Id: <(.*)>/, 1] || mail[/^Delivered-To.* (\S+)\s*$/, 1] ||
'unknown'
time = Time.parse(mail[/^Date: (.*)/, 1]) rescue Time.now
hash = Digest::SHA1.hexdigest(mail[/^Message-ID:.*/i] || mail)[0..9]