Support `deliveredto` rule
Opened this issue · 3 comments
Similar to to
, bcc
etc.
See https://webapps.stackexchange.com/a/5729.
Surprisingly it doesn't work with workspace aliases, but works well with + aliases (e.g. me+tag@domain.com).
But it's still pretty useful for filters to deal with forwarding proxies e.g. simplelogin.io.
This seems still second class in Gmail, as there's no dedicated option in the UI (as opposed to e.g. has-attachments
which we still don't have).
I think we need to decide which operators to support natively. I do see the value of providing all of these (including deliveredto
) natively, but I haven't really decided yet.
At a minimum we need to first support the obvious and visible ones though (e.g #115).
What would you think about a generic operator that would help with escaping etc, instead of query.
Currently one has to write { query: 'deliveredto: %s' % std.escapeStringJson(alias) }
, probably. This is pretty ugly in my opinion.
Maybe if we supported { custom_op: { op: 'deliveredto', query: alias } }
, or something similar, it would make writing simple wrappers for these 2nd class rarely used operators easier, without explicit need to support them natively?
Maybe gmail comes up later with something new and whoever wants to use it can just make their own
local newgmailop(query) =
{ custom_op: { op: 'newgmailop', query: query } };
What that be more palpable?
I think this might be a good idea.
I'm curious though. What would be the difference with having this in your config?
local newgmailop(query) = {
query: 'newgmailop:%s' % std.escapeStringJson(query),
};
You would use it the same way it seems?
{ filter: newgmailop('foo'), actions: { archive: true } },