Rule sometimes not being run

I have set up my Gmail account to receive emails from several different addresses and I use a rule like this in em Client in order to assign all emails that were received via ‘some.one@some.place’ to the category ‘Some.Place’:

After message has been received
with ‘X-Gmail-Fetch-Info: some.one@some.place 4 some-mailer.some.place’ found in header
set categories ‘Some.Place’

This works well most of the time, however only most of the time. Occasionally emails won’t be correctly assigned to the category even though they have the above X-Gmail-Fetch-Info header field.

The Gmail account is also set up with my phone and I suspect that whenever a mail message has already been read on the phone (and as such marked as ‘seen’ on the IMAP server) em Client does not execute the rule when downloading the mail message. Is this indeed the problem?

Hi,
yes that is the problem indeed. Rules only apply for newly received email and thus if you read the email on a different device it won’t get sorted anymore.
Please try checking if this is really the behavior (if only read emails from your phone won’t get sorted), if there’s an issue with other emails as well,
let me know.

Thank you,
Paul.

Hello,

I see. Wouldn’t it make sense then to add some additional triggers for invoking rules? Like ‘After message has been downloaded’ or ‘After message headers have been fetched’? That would allow for alot more flexibility.

Hi, usually this is a standard behavior in all email clients. You could create the rule on your phone as well maybe (if it’s supported) and by that make it sort the email everywhere. Note that the synchronization is being done on your computer and once a new mail is downloaded from the server on a different device it’s also marked as a mail in inbox on your server online…

Other solution would be to apply the rule manually when you see the unsorted email.

Thank you for understanding, if you’d like to see some changes to rules make an idea topic and we might add it in future releases.

Thank you,
Paul.