About user black and white lists

SCM

Member
Aug 9, 2019
43
2
8
17
I know that these lists can be seen on the web page, but I want to export the blacklist and whitelist added by the user, where should I export the list in the background?
1612839584014.png
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
5,289
529
133
32
Vienna
you can do an api call to '/api2/json/quarantine/blacklist' with parameter 'pmail=EMAILOFUSER'

e.g. with pmgsh:
Code:
pmgsh get /quarantine/blacklist -pmail myemail@example.com

(analog for whitelist)
 

SCM

Member
Aug 9, 2019
43
2
8
17
you can do an api call to '/api2/json/quarantine/blacklist' with parameter 'pmail=EMAILOFUSER'

e.g. with pmgsh:
Code:
pmgsh get /quarantine/blacklist -pmail myemail@example.com

(analog for whitelist)
ok,thanks!
 

SCM

Member
Aug 9, 2019
43
2
8
17
you can do an api call to '/api2/json/quarantine/blacklist' with parameter 'pmail=EMAILOFUSER'

e.g. with pmgsh:
Code:
pmgsh get /quarantine/blacklist -pmail myemail@example.com

(analog for whitelist)
hi,team,I want to know if it is possible to export the information in the recipient list the same as the black and white list?
pmgsh get /quarantine/blacklist -pmail myemail@example.com

1613728124718.png
 

SCM

Member
Aug 9, 2019
43
2
8
17
you can do an api call to '/api2/json/quarantine/blacklist' with parameter 'pmail=EMAILOFUSER'

e.g. with pmgsh:
Code:
pmgsh get /quarantine/blacklist -pmail myemail@example.com

(analog for whitelist)
hi,team,I want to know if it is possible to export the information in the recipient list the same as the black and white list?
pmgsh get /quarantine/blacklist -pmail myemail@example.com
1613956744604.png
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
4,868
623
118
  • Like
Reactions: SCM

SCM

Member
Aug 9, 2019
43
2
8
17
yes - check the API-viewer to see all paths the PMG API offers:
https://pmg.proxmox.com/pmg-docs/api-viewer/index.html#/statistics/

Specifically for the sender/receiver/contact statistics there was a change recently - so you might want to use the new path - see:
https://git.proxmox.com/?p=pmg-api....;hpb=d865dfba11fe7a8a3a3f3ebb6ad7f08c1479c956

I hope this helps!

Thank you for the document. I see the commands written in the document are as follows. It is indeed possible to export, but the data exported is yesterday’s data. What if I want to search for statistics for this month or longer like a web page?
CLI:pmgsh get /statistics/receiver/{receiver}
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
4,868
623
118
check the parameters described below...
e.g. to get the statistics for a particular address for the complete year 2021:
Code:
pmgsh get /statistics/receiver/<address>  -year 2021
pmgsh get /statistics/detail --address <address> --type receiver --year 2021

the latter being the new api-endpoint which you should use in the future (the first will be removed with PMG 7.0
 
  • Like
Reactions: SCM

SCM

Member
Aug 9, 2019
43
2
8
17
check the parameters described below...
e.g. to get the statistics for a particular address for the complete year 2021:
Code:
pmgsh get /statistics/receiver/<address>  -year 2021
pmgsh get /statistics/detail --address <address> --type receiver --year 2021

the latter being the new api-endpoint which you should use in the future (the first will be removed with PMG 7.0
thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!