[Mimedefang] re_match in filter_begin

renaud pascal renaud.pascal at atosorigin.com
Fri Feb 29 13:33:15 EST 2008


Le vendredi 29 février 2008, Kevin A. McGrail a écrit :
> As a follow-up to my previous email, I'm wondering the best way to determine 
> if an email has an attachment that is a word document in filter_begin.
> 
> My current thoughts were:
> 
>   if (re_match($entity, '\.(doc|docx).*$')) {
> 
> However, this doesn't seem to work.

 I'd believe the "entity" has to be analyzed in MIME part
analysis time?

> Suggestions / Hints / Outright Answers  
> appreciated.

 What's wrong with using the function (called in 'filter')
filter_bad_filename, and diverting its return code?
 Or do you mean the attachment was not in a MIME part?
 Or what?-)



More information about the MIMEDefang mailing list