Add an option to create global mail rules

There should be an option in the mail rules to create global rules. Currently there is only the option for individual mail accounts.

(Originally posted by tigerstrikemedia on GitHub.)

This would definitely be nice. I think the range of actions might be a bit more limited (since Mailspring doesn’t move mail between accounts, you couldn’t create a rule to add a Gmail label to all messages matching a phrase across all accounts, for example). Will see if this can add this the next time mail rules are revisited!

(Originally posted by bengotow on GitHub.)

While contemplating the gold plated global mail rule solution, perhaps a more version 1 friendly feature, would be to enable sharing a rule between accounts of a similar type. So all gmail accounts can share a rule, and all exchange accounts can share a rule etc. - This would enable gmails “Move to label, apply label etc. feature to work” and Exchanges “Move to folder” to work as is today. The actual rules code would continue to operate on the individual accounts, but the user only has to maintain/administer one set of rules for all their gmail accounts?

If a rule could then “Create missing labels/folders” on accounts, that lack a given label - this would be awesome!

Version 2, could introduce variables, so I could create a single rule for all my gmail accounts, "For work, privat and public gmail-accounts, where ends with, apply label “from\{email-prefix}” and mailspring would create the labels for me, if they did not exists in the given account! (ie. the label “from\\john” and “from\\jane”)

(Originally posted by jenschurchill on GitHub.)