Not sure I understand correctly:
Apple Mail is a desktop email client; Yahoo is an online email service.
Is your problem that Apple Mail does not filter junk mail well enough? And you want to open your Apple Mail in Yahoo Mail?
Or are you currently getting your Yahoo mail forwarded to Apple Mail and opening it on Apple Mail?