diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-05 21:22:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-05 21:22:14 +0100 |
commit | 76a11f2feb1be9d7f8940ab6a77be04a222ee81d (patch) | |
tree | f013588b9289893465a89981c7bacf36c5d613c2 /src | |
parent | 16ff58e2e0d98799008e54b50d5a687ce40be833 (diff) | |
download | rspamd-76a11f2feb1be9d7f8940ab6a77be04a222ee81d.tar.gz rspamd-76a11f2feb1be9d7f8940ab6a77be04a222ee81d.zip |
[Fix] Try harder to find rfc822 notifications
Issue: #1731
Closes: #1731
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/content_type.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index 240e2fab5..f115bcb31 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -427,7 +427,16 @@ rspamd_content_type_parse (const gchar *in, res->flags |= RSPAMD_CONTENT_TYPE_TEXT|RSPAMD_CONTENT_TYPE_DSN; } else { - res->flags |= RSPAMD_CONTENT_TYPE_MESSAGE; + RSPAMD_FTOK_ASSIGN (&srch, "notification"); + + if (rspamd_substring_search_caseless (res->subtype.begin, + res->subtype.len, srch.begin, srch.len) != -1) { + res->flags |= RSPAMD_CONTENT_TYPE_TEXT| + RSPAMD_CONTENT_TYPE_DSN; + } + else { + res->flags |= RSPAMD_CONTENT_TYPE_MESSAGE; + } } } } |