[pmg-devel] [PATCH pmg-api v3 10/10] purge attachment quarantine with spamlifetime

Dominik Csapak d.csapak at proxmox.com
Thu Oct 10 11:22:01 CEST 2019


so that they get removed with the same lifetime as the spam quarantine

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
new in v3
 src/PMG/CLI/pmgqm.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PMG/CLI/pmgqm.pm b/src/PMG/CLI/pmgqm.pm
index c9fd59f..981dd96 100755
--- a/src/PMG/CLI/pmgqm.pm
+++ b/src/PMG/CLI/pmgqm.pm
@@ -434,6 +434,10 @@ __PACKAGE__->register_method ({
 	    if (my $count = PMG::DBTools::purge_quarantine_database($dbh, 'V', $viruslifetime)) {
 		print STDERR "removed $count virus quarantine files\n";
 	    }
+
+	    if (my $count = PMG::DBTools::purge_quarantine_database($dbh, 'A', $spamlifetime)) {
+		print STDERR "removed $count attachment quarantine files\n";
+	    }
 	}
 
 	test_quarantine_files($spamlifetime, $viruslifetime, $purge);
-- 
2.20.1




More information about the pmg-devel mailing list