From 1091034dc914e17c7ca8280f898204303046c9bf Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 4 Jan 2012 16:27:59 +0100 Subject: [PATCH] count attachments case-insensitively --- .mutt/sendmail-checks.d/check-attachments | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mutt/sendmail-checks.d/check-attachments b/.mutt/sendmail-checks.d/check-attachments index 5632f2e..8f01f85 100755 --- a/.mutt/sendmail-checks.d/check-attachments +++ b/.mutt/sendmail-checks.d/check-attachments @@ -23,8 +23,8 @@ OVERRIDE_HEADER=X-No-Attach if ! grep -qi "^${OVERRIDE_HEADER}:" "$1" \ && grep -v '^> ' "$1" | egrep -ziq "($RE_ENGLISH|$RE_GERMAN|$RE_FRENCH)"; then - nr_attach=$(sed -rne 's/^Content-Type:[[:space:]]+//p' "$1" | - egrep -cv '^(multipart/|application/pgp-signature)') + nr_attach=$(sed -rne 's/^Content-Type:[[:space:]]+//pi' "$1" | + egrep -civ '^(multipart/|application/pgp-signature)') if [ $nr_attach -lt 2 ]; then echo >&2 "E: the mail message likely references an attachment," -- 2.39.2