🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #187506

Re: PGP/MIME and slrn [WAS Re: [OT] Usenet Beavis Blacklisted]

#187506
From: Troy Piggins
Date: Fri, 07 Jul 2006 08:33
61 lines
3343 bytes
* TwistyCreek wrote:
> Sam <sam@email-scan.com> wrote:
>
>>This is a MIME GnuPG-signed message.  If you see this text, it means
>>that your E-mail or Usenet software does not support MIME signed
>>messages. The Internet standard for MIME PGP messages, RFC 2015, was
>>published in 1996.  To open this message correctly you will need to
>>install E-mail or Usenet software that supports modern Internet
>>standards.
>>
>>--=_mimegpg-commodore.email-scan.com-12513-1152240524-0001
>>Content-Type: text/plain; format=flowed; charset="US-ASCII"
>>Content-Disposition: inline
>>Content-Transfer-Encoding: 7bit
>
> Ok, I've got to know, is there a script or somesuch for slrn that will 
> correctly deal with the above?
>
> I've googled my ass off and have found a few possible solutions, all of 
> which either don't work, or in one case, succeeded in making the message 
> text invisible

Install 'demime' then put this in your macro file or whatever.

#v+

define demime_pgp ()
{
  variable xcharset = extract_displayed_article_header("Content-Type");
  if (string_match(xcharset,"\\Cmultipart/signed",1))
  {
    variable demime_tmp, raw_art, fp, art_demime;
    variable macro_sig =
               "\n-- \n[demime_pgp macro removed MIME PGP signature]";
    demime_tmp = "/tmp/slrn_demime."+ string (getpid () );
    raw_art = raw_article_as_string ();
    fp = fopen (demime_tmp, "w");
    if (fp == NULL)
      error (_function_name () +": could not open "+demime_tmp);
    fputs (raw_art, fp);
    fclose (fp);
    fp = popen ("/usr/local/bin/demime --quiet - < "+demime_tmp, "r");
    if (fp == NULL)
      error (_function_name () +": demime pipe failed" );
    art_demime = strjoin (fgetslines (fp), "");
    pclose (fp);
    if (art_demime != "") replace_article (art_demime+macro_sig);
    else error (_function_name () +": failed");
    system ("rm "+demime_tmp);
  }
}

() = register_hook ("read_article_hook", "demime_pgp");

#v-

-- 
Troy Piggins :                            "My karma just ran over my dogma"
 ,-o  slrn 0.9.8.1pl1/rt (score_color patch)
o   ) Ubuntu linux 6.06 http://ubuntu.com  RLU#415538 http://counter.li.org
 `-o  uptime: 18:30:36 up 2 days,21:13,2 users,load average:0.00,0.00,0.00
Technical Details
Message-ID: <20060707183036@usenet.piggo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp.waia.asn.au!203.59.27.186.MISMATCH!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
References: <cone.1152240524.960074.12513.500@commodore.email-scan.com> <ARVP4JMG38905.0989351852@twistycreek.com>

Show Full Headers
Complete Article Headers
Message-ID: <20060707183036@usenet.piggo.com>
Subject: Re: PGP/MIME and slrn [WAS Re: [OT] Usenet Beavis Blacklisted]
Date: Fri, 07 Jul 2006 18:33:50 +1000
From: Troy Piggins <usenet-0607@piggo.com>
References: <cone.1152240524.960074.12513.500@commodore.email-scan.com> <ARVP4JMG38905.0989351852@twistycreek.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nntp.waia.asn.au!203.59.27.186.MISMATCH!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
Newsgroups: news.software.readers
Reply-To: usenet-0607@piggo.com
User-Agent: slrn/0.9.8.1pl1/rt (Linux)
Lines: 61
NNTP-Posting-Host: 203.206.109.220
X-Trace: 1152261328 per-qv1-newsreader-01.iinet.net.au 14117 203.206.109.220