2

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 Answers2

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

toppledwagon
  • 4,245
  • 25
  • 15
2

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.

sanmai
  • 531
  • 5
  • 19