[Mimedefang] Defanging MS Office docs

Graham Dunn gdunn at inscriber.com
Tue Jun 4 10:18:05 EDT 2002


Just to make the end recipient "save as ...", then launch.

Is this even close to what I want?

sub filter_office_filename {
	my($entity) = @_;
	return re_match($entity, '\.(html?|exe|com|cmd|bat|pif|sc[rt]|lnk|dll|ocx|do[ct]|xl[swt]|p[po]t|rtf|vb[se]?|hta|p[lm]|sh[bs]|hlp|chm|eml|ws[cfh]|ad[ep]|jse?|md[abew]|ms[ip]|reg|as[dfx]|cil|pps|wm[avszd]|vcf|nws|\{[-0-9a-f]+\}');
}

and then in sub filter {

[...]

if (filter_office_filename($entity)) {
	return action_defang($entity, "", "", text/plain)
}

[...]

Graham



More information about the MIMEDefang mailing list