🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #41615

Re: Perl-script which rejects articles with VCARDS included?

#41615
From: Jeremy
Date: Thu, 18 Nov 1999 00:00
21 lines
1150 bytes
Trond Kandal  <Spam.Trond.Kandal@itea.ntnu.no> wrote:

> Does anyone know of perl-scripts which rejects posting of articles with
> VCARDS included?

You mean, for INN filters?

You can do something like this:

  if ($hdr{'Content-Type'} =~ /multipart\/(?:mixed|related)/i
      and $hdr{'__BODY__'} =~ /^Content-Type:[\t ]text/x-vcard/i) {
         return "Stupid vcard";
  }

Case-insensitive pattern matches are slow, so this can be optimized,
but it's a start.

-- 
Jeremy  |  jeremy@exit109.com

Technical Details
Message-ID: <s383rst7hsq9@news.supernews.com>
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!not-for-mail
References: <942843040.858576@tornado.itea.ntnu.no>

Show Full Headers
Complete Article Headers
Message-ID: <s383rst7hsq9@news.supernews.com>
Subject: Re: Perl-script which rejects articles with VCARDS included?
Date: Thu, 18 Nov 1999 00:00:00 +0000
From: Jeremy <jeremy@exit109.com>
References: <942843040.858576@tornado.itea.ntnu.no>
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!not-for-mail
X-Deja-AN: 550137531
Organization: There Is No Organization
X-Meow: Meow
Newsgroups: news.software.nntp
X-Complaints-To: newsabuse@supernews.com