From 580b700eec901369c846ee8e7a34095062e67f34 Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 3 Mar 2020 19:10:28 +0100 Subject: [PATCH] [Rspamd] Quarantine: Set sender to null@localhost when sender is missing --- data/conf/rspamd/meta_exporter/pipe.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/conf/rspamd/meta_exporter/pipe.php b/data/conf/rspamd/meta_exporter/pipe.php index 31f6037f3..fe1622465 100644 --- a/data/conf/rspamd/meta_exporter/pipe.php +++ b/data/conf/rspamd/meta_exporter/pipe.php @@ -62,6 +62,11 @@ $symbols = $headers['X-Rspamd-Symbols']; $raw_size = (int)$_SERVER['CONTENT_LENGTH']; +if (empty($sender)) { + error_log("QUARANTINE: Unknown sender, assuming null@localhost"); + $sender = 'null@localhost'; +} + try { $max_size = (int)$redis->Get('Q_MAX_SIZE'); if (($max_size * 1048576) < $raw_size) {