On Tuesday 08 June 2010 12:04:36 Ockleford Paul (NHS Connecting for Health) wrote: > I would be grateful if anybody is able to offer some assistance. > > mime_header_checks > > #!/^\s*Content-(Disposition|Type).*name\s*=\s*"{1,1}.+\.(ecf)"{1,1}\s*$/!/n >ame=[^>]*\.(ecf)/ WARN Would normally reject this message > #!/^[[:space:]]*content-(type|disposition):.*name[[:space:]]*=.*\.(ecf)/ > # WARN Bad attachment file name extension >
I have one scrounged from the list: regexp:headercheck /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(cpl|asd|hlp|ocx|reg|bat| c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|sh[mbs]|vb[esx]|ws[fh]|wav|mov|wmf|xl))"? \s*$/ REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3" Which is tested in battle. There is an example for pcre in the Postfix docs. http://www.postfix.org/header_checks.5.html Isn't immediately apparent why your regexp fails to me, but I'd suggest not reinventing regexp here. Be careful to distinguish if it is regexp: or pcre: Simon