From: martin f. krafft Date: Thu, 8 May 2014 07:07:35 +0000 (+0200) Subject: improve attachment check X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/bc34884ff0ed694d66e2dbd66465abd9743b1f01?ds=sidebyside;hp=db5ee3cf542920369a7ff73308c7949c0c42e8ea improve attachment check --- diff --git a/.mutt/sendmail-checks.d/check-attachments b/.mutt/sendmail-checks.d/check-attachments index 8f01f85..6ecbb24 100755 --- a/.mutt/sendmail-checks.d/check-attachments +++ b/.mutt/sendmail-checks.d/check-attachments @@ -21,7 +21,7 @@ RE_FRENCH='attach(e|er|(é|=E9|=C3=A9)e?s?|ement|ant)' OVERRIDE_HEADER=X-No-Attach if ! grep -qi "^${OVERRIDE_HEADER}:" "$1" \ - && grep -v '^> ' "$1" | egrep -ziq "($RE_ENGLISH|$RE_GERMAN|$RE_FRENCH)"; then + && egrep -v '^(> |Content-Disposition:)' "$1" | egrep -zi "($RE_ENGLISH|$RE_GERMAN|$RE_FRENCH)"; then nr_attach=$(sed -rne 's/^Content-Type:[[:space:]]+//pi' "$1" | egrep -civ '^(multipart/|application/pgp-signature)')