aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-27 12:17:41 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-27 12:17:41 +0000
commit87f9e5050002ba9cebbdd9e35d26caacad56b907 (patch)
treea447da37ba4d5cf350c05b3a5c6f1b708e33a19a /src/libmime
parentdbda775006d17786fe534a0adcb4df63dc560ab4 (diff)
downloadrspamd-87f9e5050002ba9cebbdd9e35d26caacad56b907.tar.gz
rspamd-87f9e5050002ba9cebbdd9e35d26caacad56b907.zip
[Minor] Move urls find in subject to task process stage
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/message.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 10de8ce53..99b84e385 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1330,7 +1330,6 @@ rspamd_message_parse (struct rspamd_task *task)
memcpy (MESSAGE_FIELD (task, digest), n, sizeof (n));
- /* Parse urls inside Subject header */
if (MESSAGE_FIELD (task, subject)) {
p = MESSAGE_FIELD (task, subject);
len = strlen (p);
@@ -1338,9 +1337,6 @@ rspamd_message_parse (struct rspamd_task *task)
p, len,
seed);
memcpy (MESSAGE_FIELD (task, digest), n, sizeof (n));
- rspamd_url_find_multiple (task->task_pool, p, len,
- RSPAMD_URL_FIND_STRICT, NULL,
- rspamd_url_task_subject_callback, task);
}
if (task->queue_id) {
@@ -1494,6 +1490,15 @@ rspamd_message_process (struct rspamd_task *task)
lua_settop (L, old_top);
}
+ /* Parse urls inside Subject header */
+ if (MESSAGE_FIELD (task, subject)) {
+ rspamd_url_find_multiple (task->task_pool, MESSAGE_FIELD (task, subject),
+ strlen (MESSAGE_FIELD (task, subject)),
+ RSPAMD_URL_FIND_STRICT, NULL,
+ rspamd_url_task_subject_callback,
+ task);
+ }
+
/* Calculate average words length and number of short words */
struct rspamd_mime_text_part *text_part;
gdouble *var;