Question: Is there a way to rewrite a subject of an Email on the receiving MTA (presumably at the Spam Filtering stage).

An example would be if giving Email accounts to young children where certain words need to be blocked/X'd out (Profanity, etc.).

Currently using postfix, sendmail, and spamassassin on Linux.

Thank you.

Answer: 
You could do that pretty easily with procmail (and formail.) You could also inspect the contents (message body) at that stage as well.

See: <http://john.ellingsworth.org/?p=16>
Postfix [header\_checks](http://www.postfix.org/header_checks.5.html) is what you need. For example, with this line you can replace every subject which contains a bad word of your choice:

> 
> /^Subject:.\*bad word.\*/ REPLACE Subject: Censored
> 
> 
> 

Moreover you can drop, redirect or filter bad letters.