> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 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
}

[EMAIL PROTECTED]                      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,"
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to