• Re: Intercept articles with MIME attachments

    From Roberto CORRADO@i@secure.corradoroberto.it to news.admin.peering on Wed Feb 25 16:30:15 2026
    From Newsgroup: news.admin.peering

    "Ray Banana" wrote:
    Implementable, but not correct ;-)

    A MIME message contains both a Content-Type: header and one or more Content-Type: boundary markers in the body of the messages.
    I would have written this, do you think it's correct?
    my $data = "";
    if ($hdr{'Content-Type'} =~ /multipart\/mixed/i) {
    # $data="1";
    if ($body =~ /Content-Type:\stext\/plain/i && $body =~ /Content-Transfer-Encoding:\sbase64/i && $body =~ /Content-Disposition:\sattachment/i) {
    $data="Article contains Multipurpose Internet Mail Extensions MIME NOT allowed";
    } else {
    if ($body =~ /Content-Type:\stext\/plain/i && $body =~ /Content-Transfer-Encoding:\sbase64/i && $body =~ /Content-Base/i) {
    $data="Article contains Multipurpose Internet Mail Extensions MIME NOT allowed";
    }
    }
    $rval = $data;
    }
    Thank you all for your support.
    --
    Roberto.
    a simple web NR (without DB). https://secure.corradoroberto.it/m9/usenet2/newsgroups.php?art_group=news.admin.peering&article_id=36856
    --- Synchronet 3.21b-Linux NewsLink 1.2