API2 Email::storefilter Question.
I've got it working so I can add filters however if there are already some filters created for user@domain.net, the new filter is added to the bottom. Is it possible to bump it to the top via API call?
This is what I'm processing using PHP. Works fine.
$args = array(
[account] => "user@domain.net",
[filtername] => "Whitelist",
[part1] => "\$header_from:",
[match1] => "matches",
[val1] => ".*@domain\.net",
[opt1] => "or",
[action1] => "save",
[dest1] => "/INBOX",
[action2] => "finish",
[dest2] => ""
)
$cp->api2_query( "CPUSER", "Email", "storefilter", $args );-
As far as I know, you can't do this with an API call. The cPanel interface basically loads up the filters, allows you to reorder them, then rewrites the vfilters file based on that order. I'd imagine that if you want to duplicate this functionality you'd need to do the same. Perhaps you can also open a feature request for this and they might add it in. 0 -
It's not possible to change the order through a parameter of the API function itself, but you could write that functionality yourself if necessary, as indicated in the previous post. Thanks. 0
Please sign in to leave a comment.
Comments
2 comments