From: martin f. krafft Date: Mon, 21 Jun 2010 07:59:45 +0000 (+0200) Subject: case insensitive X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/dff60e00f801f70b89b10651d4a0fcdcdbed31d5?ds=sidebyside;hp=8c3e974f73be33a5d26a2e1bcc1377575f7900de case insensitive --- diff --git a/.mutt/sendmail-checks.d/check-attachments b/.mutt/sendmail-checks.d/check-attachments index 8f08f35..81ff561 100755 --- a/.mutt/sendmail-checks.d/check-attachments +++ b/.mutt/sendmail-checks.d/check-attachments @@ -18,9 +18,9 @@ set -eu RE_ENGLISH='attach(ing|ed|ment)?|included\W+(with|in)\W+th(is|e\W+(curr|pres)ent)\W+mail' RE_GERMAN='an(geh(ä|=E4|=C3=A4)ngt|h(ä|=E4|=C3=A4)ngsel|bei)|bei(gef(ü|=FC|=C3=BC)gt|lage)|(im|siehe)\W+(anhang|beilage)' RE_FRENCH='attach(e|er|(é|=E9|=C3=A9)e?s?|ement|ant)' -OVERRIDE_HEADER=X-No-Attachments +OVERRIDE_HEADER=X-No-Attach -if ! grep -q "^${OVERRIDE_HEADER}:" "$1" \ +if ! grep -qi "^${OVERRIDE_HEADER}:" "$1" \ && egrep -ziq "($RE_ENGLISH|$RE_GERMAN|$RE_FRENCH)" "$1"; then nr_attach=$(sed -rne 's/^Content-Type:[[:space:]]+//p' "$1" | diff --git a/.mutt/sendmail-checks.d/prevent-draft b/.mutt/sendmail-checks.d/prevent-draft index 5c83ceb..4c94803 100755 --- a/.mutt/sendmail-checks.d/prevent-draft +++ b/.mutt/sendmail-checks.d/prevent-draft @@ -7,7 +7,7 @@ # set -eu -if grep -q '^X-Draft:' $1; then +if grep -iq '^X-Draft:' $1; then echo >&2 "E: will not send this message while the X-Draft header is present" exit 1 fi diff --git a/.mutt/sendmail-checks.d/strip-offlineimap-header b/.mutt/sendmail-checks.d/strip-offlineimap-header index 5e6c7a4..017a9d4 100755 --- a/.mutt/sendmail-checks.d/strip-offlineimap-header +++ b/.mutt/sendmail-checks.d/strip-offlineimap-header @@ -9,4 +9,4 @@ # set -eu -sed -i -e /^X-OfflineIMAP-/d "$1" +sed -i -e /^X-OfflineIMAP-/id "$1"