[Mimedefang] bad ext question
Matthew.van.Eerde at hbinc.com
Matthew.van.Eerde at hbinc.com
Tue Jun 8 12:31:56 EDT 2004
> From: marcospls at yahoo.com.br [mailto:marcospls at yahoo.com.br]
> How do i make invert of bad_exts.
> Ex.:
> $bad_exts =
> '(ade|adp|app|asd|asf|asx|avi|bas|bath|\{[^\}]+\})'
>
> to allow some files at:
> Ex.:
> $bad_exts !=
> '(zip|txt|htm|html|doc|xls|sdw|sdt|sxc|sxw|png|\{[^\}]+\})'
> # (!= exception)
>
>
> Very thanks for any help!!!
>
> Marcos Paulo
This is a very deep question that cuts to the heart of extension handling.
Whatever you do will require a healthy dose of Perl.
The first thing you should do is change the name of the variable to
$good_exts to match the purpose it serves.
I think the best of all possible worlds would be to have *both* $good_exts
*and* $bad_exts variables.
Then you could do things like (pseudocode follows)
if (good extension)
{ pass through unharmed
}
elsif (bad extension)
{ refuse delivery - send 500 series code to sending MTA
}
else
{ quarantine attachment, send rest of email through
}
Matthew.van.Eerde at hbinc.com 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"
More information about the MIMEDefang
mailing list