From: martin f. krafft Date: Fri, 29 Oct 2010 11:16:25 +0000 (+0200) Subject: only check for draft tags in main message header X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/afcbe3084d440952177900bd00a37cd27150d77e?hp=3f09e8595602999bcee9494ec4e94d60a04b2920 only check for draft tags in main message header --- diff --git a/.mutt/sendmail-checks.d/prevent-draft b/.mutt/sendmail-checks.d/prevent-draft index 9924260..4cfe23f 100755 --- a/.mutt/sendmail-checks.d/prevent-draft +++ b/.mutt/sendmail-checks.d/prevent-draft @@ -7,7 +7,7 @@ # set -eu -if egrep -iq '^(X-Draft:|Subject:.*[[(]?(Draft|Entwurf)[])]?)' $1; then +if sed -ne '1,/^$/' "$1" | egrep -iq '^(X-Draft:|Subject:.*[[(]?(Draft|Entwurf)[])]?)'; then echo >&2 "E: will not send this message while the X-Draft header or" echo >&2 "E: a subject draft tag is present." exit 1