diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-12-21 16:17:42 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-12-21 17:17:31 +0000 |
commit | 12ed9e839f63ffd41d7f1d1dda478b9ebc6b3088 (patch) | |
tree | 7da9e185649c1ffd8526ae6a78118e374f23b87b /src | |
parent | 8ccbe58ae4ee8afa83f3c0e8e52e6a0f57dec015 (diff) | |
download | rspamd-12ed9e839f63ffd41d7f1d1dda478b9ebc6b3088.tar.gz rspamd-12ed9e839f63ffd41d7f1d1dda478b9ebc6b3088.zip |
[Minor] Add pkcs7 content type flag
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/content_type.c | 6 | ||||
-rw-r--r-- | src/libmime/content_type.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index 0c06f51fb..7b9c213ca 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -706,6 +706,12 @@ rspamd_content_type_parse (const gchar *in, res->flags |= RSPAMD_CONTENT_TYPE_BROKEN; RSPAMD_FTOK_ASSIGN (&res->subtype, "alternative"); } + + /* PKCS7 smime */ + RSPAMD_FTOK_ASSIGN (&srch, "x-pkcs7-mime"); + if (rspamd_ftok_casecmp (&res->subtype, &srch) == 0) { + res->flags |= RSPAMD_CONTENT_TYPE_SMIME; + } } RSPAMD_FTOK_ASSIGN (&srch, "multipart"); diff --git a/src/libmime/content_type.h b/src/libmime/content_type.h index 0f7b8e963..6bc7262e7 100644 --- a/src/libmime/content_type.h +++ b/src/libmime/content_type.h @@ -33,6 +33,7 @@ enum rspamd_content_type_flags { RSPAMD_CONTENT_TYPE_DSN = 1 << 4, RSPAMD_CONTENT_TYPE_MISSING = 1 << 5, RSPAMD_CONTENT_TYPE_ENCRYPTED = 1 << 6, + RSPAMD_CONTENT_TYPE_SMIME = 1 << 7, }; enum rspamd_content_param_flags { |