From a2ef8e6e61c125b017086b3097b4b7a90321df66 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 23 Jul 2016 01:29:19 +0200 Subject: [PATCH] add contrib/mhasatt --- contrib/mhasatt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 contrib/mhasatt 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 } +'