Sun awk does not like ~ syntax.  Also, the commands
need to be reordered otherwise /^$/ causes it to
bail out too early.

Index: quilt/mail.in
===================================================================
RCS file: /cvsroot/quilt/quilt/quilt/mail.in,v
retrieving revision 1.20
diff -u -r1.20 mail.in
--- quilt/mail.in	1 Feb 2006 12:50:31 -0000	1.20
+++ quilt/mail.in	3 Feb 2006 01:46:11 -0000
@@ -223,13 +223,10 @@
 		if [ ${#mh[@]} -eq 0 ]
 		then
 			if echo "$header" | awk '
+				/^[a-z]+:[ $\t]/ { mh=1 }
 				/^$/	{ exit (!mh || not_mh) }
-				END	{ exit (!mh || not_mh) }
-				{ if ($0 ~ /^[a-z]+:[ \t]/i)
-				    mh = 1
-				  else
-				    not_mh = 1
-				}'
+				!/^[a-z]+:[ $\t]/ { not_mh=1 }
+				END	{ exit (!mh || not_mh) }'
 			then
 				return 1
 			fi

