Here is a code snippet that does the opposite of what you want. To achieve what you are looking for, just change the conditions around to mark the email messages as you desire.*
This one will mark any received emails that you have not responded with an "AwaitingReply" label.
As I mention in my Gist comment, I used this a lot to make sure we didn't have any emails slipping through the cracks.
https://gist.github.com/colinloretz/9299685
* I know you're volunteering first month "payment" but since I came across this somewhere on the web and can't find the original source (I'll keep looking), here it is. Hopefully it will help you or someone else.