Result Quarantine emails are different between API and WEBGUI

azuza

Member
May 27, 2020
7
0
6
36
I made a script to export from API to CSV for Quarantine emails.
But I have checked the results from the API and from the GUI, in the API it does not display all quarantined emails. there are some emails displayed in the Gui, but from the API there are none.. please advise.

API Command
pmgsh get /quarantine/spam
only show around 15 quarantine emails for whole domain

but when i checked in webgui, 1 user have more than 10 quarantine emails and not listed in API Query.

I'm using pmg 7.3.3
 
Last edited:
by default the api only shows the last day, see the parameters 'starttime' and 'endtime'
Code:
pmgsh help /quarantine/spam --verbose
 
  • Like
Reactions: Stoiko Ivanov
Great.. thank you. but i still have problem
Please help with correct syntax

I want get all quarantine emails 30 days ago. Try using epoch time, but still not work.

pmgsh get /quarantine/spam endtime 1681204532
400 too many arguments
get quarantine/spam [OPTIONS]
 
you have to give the parameters like this:

Code:
pmgsh get /quarantine/spam --endtime xyz --starttime xyz
 
Ok great.. Case solved. Thank you Support

Get Quarantine list from 30 days ago until now.

pmgsh get /quarantine/spam -endtime $(date '+%s') -starttime $(date --date='-30 days' +'%s')
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!