Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.