[SOLVED] Trying to use the API sendlink and getting no where

loclhst

New Member
May 6, 2022
2
0
1
Myself and a friend have been trying to wrap our brain around this.
I see in the PMG API docs, I can send a POST to /api2/json/quarantine/sendlink, with the "mail" attribute, and it should trigger the daily report.
I have tried to send this with curl via bash, php and even postman.
It does not trigger anything at all. With or without being authenticated.
In the log file, all I see entries similar to:
::ffff:x.x.x.x - - [05/05/2022:20:12:23 -0500] "POST /api2/json/quarantine/sendlink HTTP/1.1" 500 13

And nothing happens. Yes, I have verified I have pending quarantine for the account being issued.

The curl command I have been trying (unauthenticated) is
curl https://hostname:8006/api2/json/quarantine/sendlink -k -d 'mail=user@domain.com'
I have even tried with a -X POST. and also a -H 'Content-Type: application/json' to no avail.

All I want is for the system to trigger an email to the account in question. (or just return the link to the quarantine, but it does not sound like thats possible yet)
 

loclhst

New Member
May 6, 2022
2
0
1
This worked. Sad that I overlooked this, but then again its a single line option that is in the admin manual.
Perhaps a note in the API documentation should at least mention that it is off by default and to look at the admin page to turn it on?

Either way, thanks for the quick reply.
 

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 your own in 60 seconds.

Buy now!