[Mimedefang] Attachment filtering filename mismatches
Dan Tulovsky
dant at wetsnow.com
Thu Oct 17 10:37:02 EDT 2002
Hi.
I am having the same problem. Can you please tell me exactly where and
how I would add the $ to only check the end of the file, as opposed to
the entire file?
Thank you.
Dan
> -----Original Message-----
> From: mimedefang-admin at lists.roaringpenguin.com
> [mailto:mimedefang-admin at lists.roaringpenguin.com] On Behalf
> Of jmiller at purifieddata.net
> Sent: Thursday, October 10, 2002 3:45 PM
> To: MIMEDefang Mailing List
> Subject: Re: [Mimedefang] Attachment filtering filename mismatches
>
>
> On Thu, 10 Oct 2002, Stephane Lentz wrote:
>
> > On Thu, Oct 10, 2002 at 01:51:34PM -0400, David T Hollis wrote:
> > > We recently introduced filtering off bad attachment
> formats (small
> > > subset of the stock ones in the example filter) and have
> come across
> > > a small problem on the name matching. People are sending VCards
> > > (.vcf) which are not blocked, but the filter is matching in cases
> > > where the filename contains .com (as in
> joedomain.com.html, Joe User
> > > (juser at domain.com).vcf). Any workaround for this?
> > >
> >
> > David,
> > perl code is your friend :-)
> > MIMEDefang is very clean and clear (thanks David).
> >
> > Look at your mimedefang-filter filter, especially
> filter_bad_filename
> > You will have to
> > - add return 0 if (....) ; in filter_bad_filename for special
> > cases you want to allow or
> > - change the $re reg-exp
> >
> > SL/
> > ---
> > Stephane Lentz / Alcanet International - Internet Services
> > _______________________________________________
> > MIMEDefang mailing list
> > MIMEDefang at lists.roaringpenguin.com
> > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
> >
>
> You might want to move the "com" out of the default bad
> extension list, then add a line like: return 1 if
> re_match($entity, '\.com$');
>
> That'll match only when the filename ends in ".com", instead
> of just matching when it find ".com" anywhere in the
> filename. You could also just add the "$" to the end of the
> existing re_match if you only want to reject when the
> filename ends with one of those.
>
> --
> Josh I.
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
More information about the MIMEDefang
mailing list