Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.