[Mimedefang] action_bounce html mail
Joseph Brennan
brennan at columbia.edu
Fri Jul 9 09:16:57 EDT 2010
tonj <tonj at freeuk.com> wrote:
> I'm trying to get mimedefang to reject any mail containing html.
Is
> mimedefang capable of what I want or do I need to install some other
> 'helper' program? If md can do this on its own can anyone advise the
> correct
> command for mimedfeng to reject any and all mail where the message body
> contains html?
Assuming...
sub filter {
my($entity, $fname, $ext, $type) = @_;
... then $type contains the value of the Content-Type header, and
you could so something like...
if ($type =~ /text.html/i) {
return action_bounce("HTML mail not accepted");
}
You're going to reject a lot of mail. I wouldn't do this even just
for myself.
Joseph Brennan
Columbia University Information Technology
More information about the MIMEDefang
mailing list