Postfix Server Strip HTML Content?

Carlosinfl

Loves the juice
Joined
Sep 25, 2002
Messages
6,633
Well, I have a Postfix server running at work. Currently SPAM is kicking my butt so I wanted to basically force the server to reject sending and receiving all HTML email. Well, I became extremely unpopular today :p

Needless to say I had to disable this rule and again allow HTML email to pass through my email server. My question is if there is a way to foce Postfix to remove / strip out all HTML content embedded into the message and then pass the message plain text through the server? Is this even possible? i know Exchange will strip the data however I have no clue how this is achieved or possible in Postfix.

Thanks for any suggestions.

If it makes any difference I edited /etc/postfix/mime_header_checks.regexp

And in that file I had the folowing to reject "ALL" HTML embedded email:

Code:
/^[C,c]ontent-[T,t]ype: text\/html/   REJECT We don't allow HTML email - Please resend in plain text
 
I don't think this is something postfix itself will do. I mean, it really only sends/gets mail. For filtering you need to pass messages to something to do the content filtering. I use amavisd for filtering my mail. So it goes into postfix, off to amavis, and then amavis hands it back to postfix for delivery.

So I'd do some searches on a mail ftering system that you can tie into postfix.
 
Back
Top