There's an option to do that, but it's not in-game (that I know of; well, kinda, just bear with me, please). You can go to the user control panel (the "My Account" button, next to "FAQ" and "Search" or use this link: http://forums.startrekonline.com/usercp.php), and go to the "Edit Options" tab to the left.
From there, scroll down to the "Messaging & Notification" section, and look for the "Receive Private Messages only from Buddies and Moderators" check box. Since forum mails and game mails are essentially one and the same, this *should* make it where you only receive mails from buddies and moderators.
Also, there is a command in-game that is /whitelist_email 1, which is supposed to do the same thing (I think). I've seen it suggested a couple times by coderanger.
Now, having said all that, it's not that simple lol. I've had these options and commands enabled since launch, and, unfortunately, I still get spam mails. I've even turned Private Messaging completely off and received spams. True, I don't receive nearly as many as I used to get (maybe 1-3 a day, instead of 5-10), but I still get them. I've kind of given up on the private message filters, really. Hopefully, some of this info will help you, though.
(Also, you can use the /anonymous command in-game to stop tells being sent by people, but I haven't found a way to undo that one. I don't advise using it unless you want to remain anonymous forever. )