[pmg-devel] [PATCH] fix #3164: api: quarantine: allow to return spam from all users

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Mar 22 17:38:22 CET 2021


On 22.03.21 15:06, Stoiko Ivanov wrote:
> Huge thanks for tackling this feature quite a few users have asked and
> have been waiting for!
> 
> 
> On Mon, 22 Mar 2021 10:00:44 +0100
> Thomas Lamprecht <t.lamprecht at proxmox.com> wrote:
> 
>> The pmail was only checked for the spam quarantine call, and there
>> mainly to ensure that the quarantine user only can check their own
>> mails. Make the pmail parameter also optional for this quarantine
>> related endpoint as long as one has a role other than quser.
>> This allows to query all spam quarantine entries from all pmails at
>> once, providing the backend side to address #3164.
>>
>> The main argument against this was performance, but postgres can
>> handle even hundreds of thousands of rows rather fine, it's a high
>> performant database after all and this is quite the simple query (no
>> joins, functions on columns or nested queries).
> agreed @postgres being a performant dbms - small nit - the quarantine
> query has a join (it's quering cmsreceivers and cmailstore in one query)
> 

you're naturally right, the psql explain even said so - but I did that one
only after writing above paragraph so forgot to adapt it.

> On my machine a 30k mail test-set even showed some room for improvement
> with the postgres parameters (sorting resorting to a temp-file for <
> 10Megs sounds like a bad tradeoff) - however this is a different topic and
> as you said - users with huge deployments using quarantine, hopefully know
> how to tweak a few postgres parameters.
> 
> 
> quickly gave your patches a spin - it works quite well on my test-setup
> (currently at 48k mails selecting 'all' takes 5s in the GUI (and yields
> 10.4MB of results)
> 
> The changes to pmg-api look good!
> The ones to pmg-gui and proxmox-widet-toolkit as well (but I'm not the
> best judge of java-script code)
> 
> with that said:
> Tested-By: Stoiko Ivanov <s.ivanov at proxmox.com>
> Reviewed-By: Stoiko Ivanov <s.ivanov at proxmox.com>
> 

Much thanks for looking at this, applied with above tags.




More information about the pmg-devel mailing list