[Mimedefang] re_match in filter_begin

David F. Skoll dfs at roaringpenguin.com
Fri Feb 29 13:38:02 EST 2008

renaud pascal wrote:

> 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.

>>   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?

That is correct.  It has to be done in filter(), not filter_begin().
The $entity passed to filter_begin is the top-level MIME container
and it won't have anything re_match can usefully process.



More information about the MIMEDefang mailing list