I believe Proxmox Mail Gateway uses postfix so you could use a command like:
mailq | awk ' /^[0-9A-F][0-9A-F]*[^*].*MAILER-DAEMON$/ {print $1}' | sed s/\*//g | xargs -rn1 postsuper -dTo remove, for example, all messages from MAILER-DAEMON. Can also customize the above command to pick out...