Tracking Center from command line

tuxevil

Member
Jul 5, 2021
19
0
6
41
Hi everyone, Im using PMG in a production enviroment since january, and im really happy with it.
Now im trying to improve (automate if posible) my daily workflow, about monitoring the tracking center, looking for quarentine mails and most important, rejected mails.
I have found several spoofing attemps, and I have being adding each IP to my firewall's source ip blacklist manually every time. But i would like to automate it somehow.
My first step would be to get the info, in the command line, not using the webui, that requires me to interact with it.

I found the pmgsh command, but there is little to no documentation about the options, and even checking by myself each option, I couldnt find where to look for the tracking center info.

Can someone give me a hint, where to start?

Thanks
 
if i do get /nodes/{node}/tracker
i get all the mails of the last 24h
but when i do get /nodes/{node}/tracker -starttime 3 or whatever number
i get a 200 OK [ ] in response
what im doing wrong?
i wanted to see all the mails from the last 3 days
 
Last edited:
'starttime' is a unix epoch, not the number of days.

setting it to '3' sets the starttime to '00:00:03 01.01.1970'
the default 'endtime' is the starttime +1 day

so for the last 3 days, you have to use the unix epoch of 3 days ago. e.g. the unix epoch of 7:36 29.03.2022 (CET) is '1648532160'
 
'starttime' is a unix epoch, not the number of days.

setting it to '3' sets the starttime to '00:00:03 01.01.1970'
the default 'endtime' is the starttime +1 day

so for the last 3 days, you have to use the unix epoch of 3 days ago. e.g. the unix epoch of 7:36 29.03.2022 (CET) is '1648532160'
Oh, ok, thanks for clarifing it
 

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!