[Mimedefang] Why is .js files being stopped.

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Thu Oct 6 12:10:09 EDT 2005

Andrew Watkins wrote:
> I am a bit confused why .js attachments (application/x-javascript)
> are being stripped out of e-mails, since I do not see any reference
> to the extension in the filters.


> $bad_exts =
> '(ade|adp|app|asd|asf|asx|bas|bat|cmd|com|cpl|crt|dll|exe|fxp|hlp|hta|hto|inf|in
> i|ins|isp|jse?|lib|lnk|mde|msc|msi|msp|mst|ocx|pcd|pif|prg|reg|scr|sct|shb|shs|s
> ys|vb|vbe|vbs|vcs|vxd|wmd|wms|wmz|wsc|wsf|wsh|\{[^\}]+\})';

It is perfectly acceptable to replace |jse?| with |js|jse| ... I don't believe there's any appreciable performance difference either way, and it's certainly more readable...
Though, perhaps, not as readable as

@bad_exts =
	"(" . join("|",
ade adp app asd asf asx bas bat cmd com cpl crt dll exe
fxp hlp hta hto inf ini ins isp js jse lib lnk mde msc
msi msp mst ocx pcd pif prg reg scr sct shb shs sys vb
vbe vbs vcs vxd wmd wms wmz wsc wsf wsh
	) . ")";

Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
Hispanic Business Inc./HireDiversity.com       Software Engineer

More information about the MIMEDefang mailing list