[to what extent can] services be pro-active in keeping material off their sites which would be illegal for some reason (eg defamatory, obscene, or in contempt of court).
Ultimately, the only way you can
be sure is to have a moderator read each and every post and decide if it can or cannot be posted on the board. That approach still depends on the judgement of the moderator. You could, I suppose, have several who take a vote, but....
Short of that, there is in effect
nothing you can do to be sure that
no material that is 'unsuitable' makes it online. People have tried many things, from filtering words to guessing how much flesh colour should be in an image, but you can never get a computer to understand text or interpret an image.
HTH