Hmmm. On a mailing list, unless someone CCs you as well, there’s no indication in the headers or subject that the message is a reply to you specifically unless the mail client keeps track of message ids you’ve sent, which I don’t know of any that do. It’s just by convention in quoting in the message body. On a lot of mailing lists like Fedora devel list it’s common to reply to people without CC’ing them explicitly, so if you want to look for that you have to filter on message body contents.
From what I can see, Discourse is setting In-Reply-To: messages properly, so they should be threaded properly in your mail client if your mail client respects that. (I am a diehard mutt user, and it does.) But Discourse does know in a consistent way that someone replied directly to a specific message (whether by email or the web interface), and it seems like it could set headers based on that, or based on whether the email was sent because you are @-mentioned.
(Although: gmail doesn’t even let you set up filters based on arbitrary headers. Just… not an option. So for most email users, such a feature would be useless.)