rfc2045: relax MIME check

Some mails don't have MIME-Version: 1.0, having
Content-Transfer-Encoding shall be good enough either
pull/2/head
Christian Neukirchen 8 years ago
parent 09f3f66eb9
commit 01e4e942dd

@ -13,11 +13,16 @@ int
blaze822_check_mime(struct message *msg)
{
char *v = blaze822_hdr(msg, "mime-version");
return (v &&
if (v &&
v[0] && v[0] == '1' &&
v[1] && v[1] == '.' &&
v[2] && v[2] == '0' &&
(!v[3] || iswsp(v[3])));
(!v[3] || iswsp(v[3])))
return 1;
v = blaze822_hdr(msg, "content-transfer-encoding");
if (v)
return 1;
return 0;
}
int

Loading…
Cancel
Save