瀏覽代碼

[Minor] Fix config-less tests

tags/2.6
Vsevolod Stakhov 4 年之前
父節點
當前提交
2abae809e4
共有 1 個檔案被更改,包括 9 行新增4 行删除
  1. 9
    4
      src/libmime/mime_headers.c

+ 9
- 4
src/libmime/mime_headers.c 查看文件

struct rspamd_received_header *recv; struct rspamd_received_header *recv;
const gchar *p, *end; const gchar *p, *end;
gchar *id; gchar *id;
gint max_recipients = -1;

if (task->cfg) {
max_recipients = task->cfg->max_recipients;
}


h = rspamd_icase_hash (rh->name, strlen (rh->name), 0xdeadbabe); h = rspamd_icase_hash (rh->name, strlen (rh->name), 0xdeadbabe);


case 0x76F31A09F4352521ULL: /* to */ case 0x76F31A09F4352521ULL: /* to */
MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool, MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool,
rh->decoded, strlen (rh->decoded), rh->decoded, strlen (rh->decoded),
MESSAGE_FIELD (task, rcpt_mime), task->cfg->max_recipients);
MESSAGE_FIELD (task, rcpt_mime), max_recipients);
rh->flags |= RSPAMD_HEADER_TO|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE; rh->flags |= RSPAMD_HEADER_TO|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE;
break; break;
case 0x7EB117C1480B76ULL: /* cc */ case 0x7EB117C1480B76ULL: /* cc */
MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool, MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool,
rh->decoded, strlen (rh->decoded), rh->decoded, strlen (rh->decoded),
MESSAGE_FIELD (task, rcpt_mime), task->cfg->max_recipients);
MESSAGE_FIELD (task, rcpt_mime), max_recipients);
rh->flags |= RSPAMD_HEADER_CC|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE; rh->flags |= RSPAMD_HEADER_CC|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE;
break; break;
case 0xE4923E11C4989C8DULL: /* bcc */ case 0xE4923E11C4989C8DULL: /* bcc */
MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool, MESSAGE_FIELD (task, rcpt_mime) = rspamd_email_address_from_mime (task->task_pool,
rh->decoded, strlen (rh->decoded), rh->decoded, strlen (rh->decoded),
MESSAGE_FIELD (task, rcpt_mime), task->cfg->max_recipients);
MESSAGE_FIELD (task, rcpt_mime), max_recipients);
rh->flags |= RSPAMD_HEADER_BCC|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE; rh->flags |= RSPAMD_HEADER_BCC|RSPAMD_HEADER_RCPT|RSPAMD_HEADER_UNIQUE;
break; break;
case 0x41E1985EDC1CBDE4ULL: /* from */ case 0x41E1985EDC1CBDE4ULL: /* from */
MESSAGE_FIELD (task, from_mime) = rspamd_email_address_from_mime (task->task_pool, MESSAGE_FIELD (task, from_mime) = rspamd_email_address_from_mime (task->task_pool,
rh->decoded, strlen (rh->decoded), rh->decoded, strlen (rh->decoded),
MESSAGE_FIELD (task, from_mime), task->cfg->max_recipients);
MESSAGE_FIELD (task, from_mime), max_recipients);
rh->flags |= RSPAMD_HEADER_FROM|RSPAMD_HEADER_SENDER|RSPAMD_HEADER_UNIQUE; rh->flags |= RSPAMD_HEADER_FROM|RSPAMD_HEADER_SENDER|RSPAMD_HEADER_UNIQUE;
break; break;
case 0x43A558FC7C240226ULL: /* message-id */ { case 0x43A558FC7C240226ULL: /* message-id */ {

Loading…
取消
儲存