/* Check for ical */
rspamd_ftok_t cal_ct;
+ /*
+ * TODO: If we want to process more than that, we need
+ * to create some generic framework that accepts a part
+ * and returns a processed data
+ */
RSPAMD_FTOK_ASSIGN (&cal_ct, "calendar");
if (rspamd_ftok_casecmp (&cal_ct, &text_part->mime_part->ct->subtype) == 0) {
static enum rspamd_cte
rspamd_mime_parse_cte (const gchar *in, gsize len)
{
- guint64 h = rspamd_cryptobox_fast_hash_specific (RSPAMD_CRYPTOBOX_XXHASH64,
- in, len, 0xdeadbabe);
+ guint64 h;
enum rspamd_cte ret = RSPAMD_CTE_UNKNOWN;
+ in = rspamd_string_len_strip (in, &len, " \t;,.+-#!`~'");
+ h = rspamd_cryptobox_fast_hash_specific (RSPAMD_CRYPTOBOX_XXHASH64,
+ in, len, 0xdeadbabe);
+
switch (h) {
case 0xCEDAA7056B4753F7ULL: /* 7bit */
ret = RSPAMD_CTE_7BIT;