Better API support for message filters


#1

(Originally posted here)

The Mail APIs all list under action:
[list]
[]move
[
]forward
[]delete
[
]add_subject
[]forward_shell
[
]and
[*]or
[/list]
There’s no add_header on this list; however, the web panel gives that option. Trying to set action=add_header gives an invalid_action error. What gives?

Also, rank is listed as optional, but not including it gives a no_rank_1 error.


#2

Ok, this is an old thread, but just today I stumbled upon this very same problem.
I build a program to create mail filters programatically, but there is no add_header action!

When I listed all my filters using the API, many of them had the add_header action.
Following that, I deleted all of them, and tried to rebuild them from the list.
And alas: I can’t because this action is not implemented!

Now I have a VERY broken filter list that I must reconstruct by hand.
And, even more important: add_header is the only way to flag messages in a compatible manner.
Without this option, the API for mail filters is way too restricted, and almost useless.

Am I typing the action correctly? Is there a workaround?
Will this be implemented?

Please, shed a light!
Thanks a lot!


#3

The lack of the “add_header” action in the API is probably a bug. I’ll take a look.


#4

Yep; looks like we forgot to expose that action in the API. I’ve got a fix on the way.


#5

That’s very good news!
Thanks a lot!


#6

And… done. :slight_smile:


#7

Tested and… it’s working!
Awesome!!
:slight_smile: