🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #183867

Re: UseNet/MIME followup

#183867
From: Troy Piggins
Date: Wed, 19 Apr 2006 23:27
68 lines
3698 bytes
[crossposted to news.software.readers - prob more relevant there]
* Longfellow wrote:
> On 11 February of this year, I inquired (in a thread about AOL smoking
> crack...?) why I should be interested in a complaint that my news reader
> was not MIME compliant.  What I wanted to know was:  what was/am I
> missing?  The immediate response was surly and belligerent, so with
> amusement, I dropped out of the thread.
>
> And missed the rest of the show!  Too bad; more entertainment followed
> ;)
>
> But the point was entirely missed.  Why would *I* be interested in that
> sort of crypto/MIME addenda?  I've no interest in validating the sender
> of any post, and certainly no interest in getting a public key to open
> one!  Other's mileage may vary, of course.

Not a direct answer to your question, but I use slrn and got frustrated
with it not handling MIME/GPG correctly for one particular regular
posted in c.m.m (Hi Sam).  Not his fault, so been looking for a way to
make my newsreading more to my liking (ie not with all the boundary crap
displayed).

My current solution is to download 'demime' and pipe the message
through that.  Interpret this macro, but check paths first :

-----8<-----
% thanks to Christian Ebert from the slrn-user mailing list.
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);
  }
}
-----8<-----

It's still a bit sloppy at the moment, but it serves me ok.  When I get
some more time I'd like to tidy up a bit.

Benefit is it leaves the original post intact, it's just a display
filter.

You may not be interested, but others might.

-- 
Troy Piggins
  ,-o    Ubuntu v5.10 (Breezy Badger): kernel 2.6.12-9-386,
 o   )   postfix 2.2.4, procmail 3.22, mutt 1.5.11i,
  `-o    slrn 0.9.8.1/rt (score_color patch), vim 7.0d (beta)
Technical Details
Message-ID: <20060420091449@usenet.piggo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mail.misc.mbox.zip!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.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: <123ud5cgeiqlhd6@corp.supernews.com>

Show Full Headers
Complete Article Headers
Message-ID: <20060420091449@usenet.piggo.com>
Subject: Re: UseNet/MIME followup
Date: Wed, 19 Apr 2006 23:27:32 +0000
From: Troy Piggins <usenet-0604@piggo.com>
References: <123ud5cgeiqlhd6@corp.supernews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mail.misc.mbox.zip!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.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: comp.mail.misc,news.software.readers
Reply-To: usenet-0604@piggo.com
Followup-To: news.software.readers
User-Agent: slrn/0.9.8.1/rt (Linux)
Lines: 67
NNTP-Posting-Host: 203.206.74.180
X-Trace: 1145489252 per-qv1-newsreader-01.iinet.net.au 12159 203.206.74.180