aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/composites.conf12
-rw-r--r--conf/modules.d/whitelist.conf2
-rw-r--r--src/libmime/mime_encoding.c13
-rw-r--r--src/lua/lua_tcp.c4
4 files changed, 12 insertions, 19 deletions
diff --git a/conf/composites.conf b/conf/composites.conf
index 9d204344c..2b4c57072 100644
--- a/conf/composites.conf
+++ b/conf/composites.conf
@@ -86,14 +86,14 @@ composites {
description = "Relayed through ZEN PBL IP without sufficient authentication (possible indicating an open relay)";
score = 2.0;
}
- RCVD_DKIM_DNSWL_MED {
- expression = "R_DKIM_ALLOW & RCVD_IN_DNSWL_MED";
- description = "Sufficiently DKIM signed and received from IP with medium trust at DNSWL";
+ RCVD_DKIM_ARC_DNSWL_MED {
+ expression = "(R_DKIM_ALLOW | ARC_ALLOW ) & RCVD_IN_DNSWL_MED";
+ description = "Sufficiently DKIM/ARC signed and received from IP with medium trust at DNSWL";
score = -1.5;
}
- RCVD_DKIM_DNSWL_HI {
- expression = "R_DKIM_ALLOW & RCVD_IN_DNSWL_HI";
- description = "Sufficiently DKIM signed and received from IP with high trust at DNSWL";
+ RCVD_DKIM_ARC_DNSWL_HI {
+ expression = "(R_DKIM_ALLOW | ARC_ALLOW ) & RCVD_IN_DNSWL_HI";
+ description = "Sufficiently DKIM/ARC signed and received from IP with high trust at DNSWL";
score = -3.5;
}
diff --git a/conf/modules.d/whitelist.conf b/conf/modules.d/whitelist.conf
index 96c9ed02e..0b19002c8 100644
--- a/conf/modules.d/whitelist.conf
+++ b/conf/modules.d/whitelist.conf
@@ -18,7 +18,6 @@ whitelist {
"WHITELIST_SPF" = {
valid_spf = true;
domains = [
- #"https://maps.rspamd.com/rspamd/spf_whitelist.inc.zst", # Missing now
"${DBDIR}/spf_whitelist.inc.local",
"fallback+file://${CONFDIR}/spf_whitelist.inc"
];
@@ -29,7 +28,6 @@ whitelist {
"WHITELIST_DKIM" = {
valid_dkim = true;
domains = [
- #"https://maps.rspamd.com/rspamd/dkim_whitelist.inc.zst", # Missing now
"${DBDIR}/dkim_whitelist.inc.local",
"fallback+file://${CONFDIR}/dkim_whitelist.inc"
];
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c
index 2f0df38eb..d3f255740 100644
--- a/src/libmime/mime_encoding.c
+++ b/src/libmime/mime_encoding.c
@@ -651,18 +651,17 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
GByteArray *part_content;
rspamd_ftok_t charset_tok;
struct rspamd_mime_part *part = text_part->mime_part;
- gdouble t1, t2;
- t1 = rspamd_get_ticks (TRUE);
if (rspamd_str_has_8bit (text_part->raw.begin, text_part->raw.len)) {
text_part->flags |= RSPAMD_MIME_TEXT_PART_FLAG_8BIT;
}
- part_content = rspamd_mempool_alloc0 (task->task_pool, sizeof (GByteArray));
- part_content->data = rspamd_mempool_alloc (task->task_pool,
- text_part->parsed.len);
+ /* Allocate copy storage */
+ part_content = g_byte_array_sized_new (text_part->parsed.len);
memcpy (part_content->data, text_part->parsed.begin, text_part->parsed.len);
part_content->len = text_part->parsed.len;
+ rspamd_mempool_add_destructor (task->task_pool,
+ (rspamd_mempool_destruct_t)g_byte_array_unref, part_content);
if (rspamd_str_has_8bit (text_part->parsed.begin, text_part->parsed.len)) {
text_part->flags |= RSPAMD_MIME_TEXT_PART_FLAG_8BIT_ENCODED;
@@ -729,8 +728,6 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
rspamd_mime_text_part_ucs_from_utf (task, text_part);
rspamd_mime_text_part_normalise (task, text_part);
rspamd_mime_text_part_maybe_renormalise (task, text_part);
- t2 = rspamd_get_ticks (TRUE);
- msg_err_task ("conversion time: %.0f ticks", t2 - t1);
return;
}
@@ -752,6 +749,4 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
}
SET_PART_UTF (text_part);
- t2 = rspamd_get_ticks (TRUE);
- msg_err_task ("conversion time: %.0f ticks", t2 - t1);
}
diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c
index 61a73acf8..ce91d7873 100644
--- a/src/lua/lua_tcp.c
+++ b/src/lua/lua_tcp.c
@@ -249,7 +249,7 @@ lua_tcp_shift_handler (struct lua_tcp_cbdata *cbd)
}
if (hdl->type == LUA_WANT_READ) {
- if (hdl->h.r.cbref) {
+ if (hdl->h.r.cbref && hdl->h.r.cbref != -1) {
luaL_unref (cbd->task->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.r.cbref);
}
@@ -258,7 +258,7 @@ lua_tcp_shift_handler (struct lua_tcp_cbdata *cbd)
}
}
else {
- if (hdl->h.w.cbref) {
+ if (hdl->h.w.cbref && hdl->h.w.cbref != -1) {
luaL_unref (cbd->task->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.w.cbref);
}