Warning - the following post contains adult language.
Effectively blocking adult content is really really hard.
First there are simple examples
blocking 'cock' blocks 'John Hancock', and 'Sally Babcock'.
Whereas things like
'suc-my-kock'
will pass many a automated filter.
And these are some
Steve,
You might want to take a look at Mail::Audit and Mail::SpamAssassin. SpamAssassin
seems to work reasonable well but there are will always be a few false positives. On
the other hand if you want to re-invent the w to learn something you might want to
think about using just Mail::A