Article View: news.software.nntp
Article #60798Re: Reminder to filter misplaced yEnc with other binaries
From: Miquel van Smoorenburg
Date: Mon, 30 Sep 2002 09:57
Date: Mon, 30 Sep 2002 09:57
28 lines
2049 bytes
2049 bytes
In article <ylu1k8my0e.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
>This is just a reminder to all of you who are using filters to filter out
>misplaced binaries that you should update them to filter out yEnc binaries
>as well, since the standard checks don't notice them. For the time being,
>after consulting with the current Cleanfeed code, I'm using:
>
> if ($hdr{__BODY__} =~ m%^=ybegin (.+)$%m) {
> local $_ = $1;
> if (/line=/ && /size=/ && /name=/) {
> return 1;
> }
> }
I've tested several yenc detection methods and the one below
is the fastest, and seems reasonably correct:
# Yenc
sub is_yenc {
$hdr{__BODY__} =~ m/^=ybegin[^\n]+\n(?>(:?=ypart[^\n]+\n)?)(?>[^\r\n]{62,999}\r?\n){40}/mo;
}
I think I sent it to Marco for inclusion in cleanfeed a few months ago.
Mike.
--
Computers are useless, they only give answers. --Pablo Picasso
Technical Details
Message-ID:
<an9773$o8t$2@ncc1701.cistron.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!62.216.30.27!newsgate.cistron.nl!news.cistron.nl!not-for-mailReferences:
<ylu1k8my0e.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <an9773$o8t$2@ncc1701.cistron.net> Subject: Re: Reminder to filter misplaced yEnc with other binaries Date: Mon, 30 Sep 2002 09:57:55 +0000 From: "Miquel van Smoorenburg" <miquels.at.cistron.nl.spamtrap@netscum.nl> References: <ylu1k8my0e.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!62.216.30.27!newsgate.cistron.nl!news.cistron.nl!not-for-mail Newsgroups: news.software.nntp Organization: Cistron Lines: 27 NNTP-Posting-Host: traveler.cistron-office.nl Content-Type: text/plain; charset=iso-8859-15 X-Trace: ncc1701.cistron.net 1033379875 24861 62.216.29.67 (30 Sep 2002 09:57:55 GMT) X-Complaints-To: abuse@cistron.nl NNTP-Posting-Date: Mon, 30 Sep 2002 09:57:55 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: miquels@cistron-office.nl (Miquel van Smoorenburg)