about summary refs log tree commit diff
path: root/contrib/mhasatt
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-23 01:29:19 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-23 01:29:19 +0200
commita2ef8e6e61c125b017086b3097b4b7a90321df66 (patch)
treea430b1eb11c1432264708851165a920f011e1201 /contrib/mhasatt
parent50e2d1fc472217e1b83e8268c267443b625f1277 (diff)
downloadmblaze-a2ef8e6e61c125b017086b3097b4b7a90321df66.tar.gz
mblaze-a2ef8e6e61c125b017086b3097b4b7a90321df66.tar.xz
mblaze-a2ef8e6e61c125b017086b3097b4b7a90321df66.zip
add contrib/mhasatt
Diffstat (limited to 'contrib/mhasatt')
-rwxr-xr-xcontrib/mhasatt9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/mhasatt b/contrib/mhasatt
new file mode 100755
index 0000000..7ae2b68
--- /dev/null
+++ b/contrib/mhasatt
@@ -0,0 +1,9 @@
+#!/bin/sh
+# mhasatt [RANGE...] - print mails with real attachments
+
+mshow -t "${@:-:}" | awk '
+	/^[^ 0-9]/ && /\// { file = $0 }
+	/^.*[0-9]*: (application\/pkcs7-signature)/ { next }
+	/^.*[0-9]*: (application|image|video)\// || /^.*[0-9]*:.*name=/
+		{ if (file) print file; file = 0 }
+'