- /* abort if draft has Mime-Version or C-T-E header field */
- if (strcasecmp (name, VRSN_FIELD) == 0 ||
- strcasecmp (name, ENCODING_FIELD) == 0) {
+ /*
+ * If we are running with autobuild set, then silently
+ * exit if we find a MIME-Version header. For any other MIME
+ * header, return an error.
+ *
+ * RFC 2045, Section 9 says that any valid MIME header should
+ * start with "Content-", so we will match on that rather than
+ * enumerate all current MIME headers.
+ *
+ * Because the headers could be in any order, just check for
+ * MIME-Version here; check for Content-* later.
+ */
+
+ if (strcasecmp (name, VRSN_FIELD) == 0) {