I am trying to create a filter with cPanel API. The filter should redirect any email received to another email address.
I am using the cPanel API Email/store_filter function. And I am trying to follow the documentation at: https://api.docs.cpanel.net/openapi/cpanel/operation/store_filter/
I'm using F# and .NET Https.authorizedHttpGet. I think I have the authorization part working because I am getting a JSON string response from CPANEL. I think the problem is the URL that I am sending to CPANEL.
Here is the part after the question mark (?) but including the question mark that I am sending to cPanel API store_filter function:
And here is the JSON string response I get back:
I don't know what I am doing wrong. Where am I not following the documentation? Is there a simpler or better way to use store_filter to get all email sent to [email protected] to redirect to [email protected]?
I am using the cPanel API Email/store_filter function. And I am trying to follow the documentation at: https://api.docs.cpanel.net/openapi/cpanel/operation/store_filter/
I'm using F# and .NET Https.authorizedHttpGet. I think I have the authorization part working because I am getting a JSON string response from CPANEL. I think the problem is the URL that I am sending to CPANEL.
Here is the part after the question mark (?) but including the question mark that I am sending to cPanel API store_filter function:
?filtername=ToInbox&action*=deliver&match*=matches&part*=foranyaddress $h_to:, $h_cc:&val*=filter_acct-&dest*=inbox&[email protected]
And here is the JSON string response I get back:
{"metadata":{},"status":0,"messages":null,"warnings":null,"data":null,"errors":["No valid rules."]}
I don't know what I am doing wrong. Where am I not following the documentation? Is there a simpler or better way to use store_filter to get all email sent to [email protected] to redirect to [email protected]?