Preventing spam is an important but also challenging task in maintaining quality in an online community.
Spam can be frustrating for community administratos, but also for the average community user.
You might already use some basic spam protection services, like a recaptcha or similar. But it's also important to check the content of your users' posts.
Of course you honor freedom of speech and censorship conflicts with your personal attitude. So what options do you have?
Your system may provide you a workflow that helps to prevent inappropriate content from being shown in the community.
If you notice, that certain users repeatedly submit inappropriate content, abuse detection by counting forbidden keywords would maybe a good place to start.
Some systems may call this feature "Forbidden Word Counts".
There is a possibility that your system may provide this and other helpful features in Administration > Moderation > Abuse Automation.