1

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.

2 Answers 2

2

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

1

Postfix header_checks 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy