Selecting emails by headers

I have a site where members can private message each other, but lets
just say that I’m kind of lazy, and conservative about my Db, so I just
used email from private messaging; basically, messages are sent to
[email protected] with a header specifying the member. Is there any
way to use mails.select to only retrieve messages with a certain header?
Thanks. I’m new to rails, and this topic doesn’t seem to b edocumented
in the Ruby/Rails examples. Thansk for your help and time.
best Regards,
Ben