Andrey Voropaev | 25 Sep 12:27 2014

KOI8-R in slrn


I have to use version of slrn that does not support 'charset' setting.
The version is not new, so it does not support
set_utf8_conversion_table function. As result, when I try to read news
in Russian, I get garbage on the screen. As far as I can see, slrn
simply treats KOI8-R text as Latin1 and converts it to UTF-8.

In the article view I was able to correct things. My macro gets the
raw text of the article, then converts KOI8-R to UTF-8 and then
replaces article. Works perfectly.

Now I would like to fix subject lines displayed in the "threads" view.
I didn't find any functions that could be used for fixing encodings in
the Subject of the article. Did I miss them, or they really don't

Best regards
Andrei Voropaev

Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer

J.B. Nicholson-Owens | 10 May 04:53 2014

Getting quote regular expressions from ignore_quotes via S-Lang?

How does one get the regular expression(s) used with ignore_quotes in an 
S-Lang slrn macro?

I can't use get_variable_value() because that function only works with 
slrn variables that are set with "set".

I'd like to read these strings for a macro I'm writing where I'd like to 
avoid giving the regular expressions more than once -- once with 
ignore_quotes and another time for the macro to use.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now

J.B. Nicholson-Owens | 17 Feb 02:52 2014

has_parent() oddity

has_parent() is a bit confusing to me. If one looks at the following two 
articles in with slrn v1.0.1:

<2424ed2d74d5139e22d17f1a40a5f1b0 <at>>
<2424ed2d74d5139e22d17f1a40a5f1b0 <at>>

they get threaded together. Neither article has a References: header.

Yet has_parent() returns 0 for the former article and has_parent() 
returns 1 for the latter article.

call("get_parent_header") on the latter article raises an exception -- 
"Article has no parent reference." -- which makes sense from the lack of 
a References: header but it remains unobvious why has_parent() ought to 
return 1 for 
<2424ed2d74d5139e22d17f1a40a5f1b0 <at>> (I'm 
talking about the intention behind has_parent() not necessarily its 
current implementation).

It seems to me that if has_parent() returns non-zero, one ought to be 
able to identify the article that is that article's parent, even if that 
article is not present on the server.

I'm not sure if I'm seeing a bug in the has_parent() implementation, a 
bug in the has_parent() documentation (maybe more explanation about how 
has_parent() can return 1 even if the parent is due to slrn grouping 
articles into threads by sorting?), or if I'm misunderstanding something 
about proper use of has_parent().

(Continue reading)

J.B. Nicholson-Owens | 16 Feb 19:00 2014

Get thread info slrn has in article mode?

In article mode, slrn can show the user a thread tree: a clear 
indication of which article is an article's parent, and which articles 
are that article's children (if any). I'd like to get at this thread 
information in an S-Lang macro for slrn.

I'd like to get at this information without:

- adding articles to the thread that aren't already in the visible 
thread tree. I don't want to reconstruct the whole thread nor do I want 
to add any articles to the thread display I'm not already seeing.

- requesting anything from the news server 
says that get_parent_header will download data from the server if 

- rebuilding thread information by reading References: header data 
because slrn has apparently already done that plus constructed threads 
from articles where References: header data is missing. We see the fruit 
of this work when slrn shows the user the thread tree.

Is there S-Lang API for slrn to let an S-Lang macro read this thread 
data? It would be okay if this were read-only data for the macro.

I need this information to show the relationships between articles in 
the same thread in a different way than slrn currently does this and I'd 
like to avoid rewriting code that already does this job.


(Continue reading)

Martin Trautmann | 23 Oct 10:41 2013

false configuration for utf8

Hi all,

is there some kind of mixed setup option for charset definitions?

My setup does create proper

Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

However, I sometimes observe error messages from slrn, telling me:

Can't convert utf8 -> UTF-8

Mime-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Message-ID: <slrnl6ecqe.ecm.als <at>>

The message itself is shown properly.

Personally, I have within my .slrnrc a line
	charset config "utf-8"


#if$LANG en_US.UTF-8
% fallback_charset patch from
set fallback_charset iso-8859-15
(Continue reading)

Preston Boyington | 15 Oct 18:43 2013

slrn directory trouble

Due to space issues I'm trying to get slrn to use a different drive for the "News" folder.

In my .slrnrc file I have the following:

set "/media/94bfab3d-134c-554a-a863-f7babe6644aa/slrn/News"

When I run slrn I get an error on the lines with that path.

Could someone please enlighten me on how my pathing should be?

Here's my slrn info:

$ slrn --version
slrn pre1.0.0-18
        * Note: This version is a developer preview.
S-Lang Library Version: 2.2.2
Compiled at: Aug  7 2010 11:37:49
Operating System: Linux

 Backends: +nntp +slrnpull +spool
 External programs / libs: +canlock +inews +ssl +uudeview +iconv
 Features: +decoding +emphasized_text +end_of_thread +fake_refs +gen_msgid
    -grouplens -msgid_cache +piping +rnlock +spoilers -strict_from
 Using 64 bit integers for article numbers.

 Default server object:     nntp
 Default posting mechanism: nntp

Thanks all,
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
Seebs | 20 Sep 03:28 2013

Rough draft patch: slrnpull configuration to immediately retry posts.

So, I have noticed a strange transient failure with one particular 
Usenet server, which is that after authentication, there is sometimes 
but not always a window during which any post submitted to it will be 
rejected with "441 436 <message-id>" and no other explanation.

Browsing around, I've found one claim that a server exists which does 
this for duplicate posts. In this case, though, it's definitely not 
duplicates, it's brand-new posts with suitably-unique message IDs. It 
may also occasionally show up for other reasons.

Solution: Retry failed posts. So I've produced a patch which will retry 
posts if configured to do so through a line in slrnpull.conf reading 
"nntp-retries 3 10". (3 being the number of retries, 10 being the number 
of seconds to delay before retrying).

This is probably inadequately tested, but it solved my immediate 
problem, so I figured I'd send it out for evaluation, in case it was 
useful to someone else.

commit a55e2fc12301e0694452af46e11f52d590b4ccff
Author: Seebs <seebs <at>>
Date:   Thu Sep 19 20:18:44 2013 -0500

    Allow retrying NNTP submissions

    One usenet server I occasionally interact with has the very
    curious trait that an article submission too early in a session
    will almost always result in a "441 436" response. Simply
    retrying once or twice will usually get a successful post.

    This patch adds an optional "nntp-retries" configuration
    hook for slrnpull.conf, which allows the user to request that
    NNTP submissions be retried a couple of times before giving

    Signed-off-by: Seebs <seebs <at>>

diff --git a/src/slrnpull.c b/src/slrnpull.c
index fb40a9a..f2669b8 100644
--- a/src/slrnpull.c
+++ b/src/slrnpull.c
 <at>  <at>  -142,6 +142,7  <at>  <at>  static int Use_Fetch_Score;
 static int Kill_Score;
 static char *Active_Groups_File;
 static time_t Start_Time;
+static int nntp_retries = 0, nntp_retry_interval = 0;


 <at>  <at>  -736,6 +737,14  <at>  <at>  static int read_active_groups (void) /*{{{*/

+        if (0 == strcmp (name, "nntp-retries"))
+	  {
+	     /* repurpose the first two fields */
+	     nntp_retries = max_to_get;
+	     nntp_retry_interval = expire_days;
+	     continue;
+	  }
 	if (NULL != find_group_type (name))
 	     log_error (_("%s: line %u: group duplicated."),
 <at>  <at>  -1795,21 +1804,12  <at>  <at>  static int pull_news (NNTP_Type *s, int marked_bodies) /*{{{*/


-static int post_file (NNTP_Type *s, char *file) /*{{{*/
+/* a single attempt to post an already-open file over NNTP */
+static int post_file_nntp (NNTP_Type *s, char *file, FILE *fp) /*{{{*/
-   FILE *fp;
    int status;
    char buf[8 * 1024];

-   log_message (_("Attempting to post %s..."), file);
-   fp = fopen (file, "r");
-   if (fp == NULL)
-     {
-	log_error (_("Unable to open file %s for posting."), file);
-	return -1;
-     }
    status = nntp_post_cmd (s);
    if (status != CONT_POST)
 <at>  <at>  -1840,9 +1840,6  <at>  <at>  static int post_file (NNTP_Type *s, char *file) /*{{{*/
 	     return -1;
-   fclose (fp);
    status = nntp_end_post (s);
    if (status == -1)
 <at>  <at>  -1852,11 +1849,54  <at>  <at>  static int post_file (NNTP_Type *s, char *file) /*{{{*/

    if (status != OK_POSTED)
+	log_error (_("Article %s rejected. status = %d: %s."), file, status, s->rspbuf);
+	return -1;
+     }
+   return 0;
+static int post_file (NNTP_Type *s, char *file) /*{{{*/
+   FILE *fp;
+   int status;
+   int retries = 0;
+   log_message (_("Attempting to post %s..."), file);
+   fp = fopen (file, "r");
+   if (fp == NULL)
+     {
+	/* this doesn't get a retry */
+	log_error (_("Unable to open file %s for posting."), file);
+	return -1;
+     }
+   /* some news servers will return a 436 if you try to post too soon
+    * after a session has started.
+    */
+   status = post_file_nntp (s, file, fp);
+   while (retries <= nntp_retries && 0 != status)
+     {
+       ++retries;
+       /* rewind the file to try again */
+       fseek(fp, 0, SEEK_SET);
+       slrn_sleep(nntp_retry_interval);
+       status = post_file_nntp (s, file, fp);
+     }
+   fclose(fp);
+   /* if status is -1, the posting failed (possibly multiple times) and
+    * we should move it to the rejects directory, then give up.
+    */
+   if (-1 == status)
+     {
 	char *name;
 	char bad_file [SLRN_MAX_PATH_LEN + 1];

-	log_error (_("Article %s rejected. status = %d: %s."), file, status, s->rspbuf);
 	name = slrn_basename (file);
 	if (-1 == slrn_dircat (Outgoing_Bad_Dir, name,
 			       bad_file, sizeof (bad_file)))
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
Uwe Premer | 1 Jun 23:05 2013

64-Bit Source Port?

I want to compile slrn to 64-bit-windows7-executable.
Is there any 64-Bit-Source port available?

Or alternatively any good guide to port the 32-bit source compatible for


Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.

Daniel | 11 Apr 09:09 2013

posting to gmane hangs indefinitely until abort & repost

I have some trouble posting to using slrn. The actualy
posting often hangs and I have to abort and choose Repost at the prompt.
It is then processed quickly, without hanging.

I get the feeling that there is some network connection that has timed
out (while I was writing the article?), and which isn't properly renewed
until the repost (retry) is done. That's a wild guess.

I have never used slrn before, or with another news server. Version is

Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!

Peter J Ross | 27 Mar 01:24 2013

Translation problem?

Hello, old friends!


slrn pre1.0.2-8
	* Note: This version is a developer preview.
S-Lang Library Version: 2.2.4
Compiled on: Mar 27 2013 00:13:10
Operating System: Linux

  Backends: +nntp -slrnpull -spool
  External programs / libs: -canlock -inews -ssl -uudeview +iconv
  Features: +decoding +emphasized_text +end_of_thread +fake_refs +gen_msgid
     -grouplens -msgid_cache +piping +rnlock +spoilers -strict_from
  Using 64 bit integers for article numbers.

  Default server object:     nntp


During "make install" the script seems to be looking for a translation 
that hasn't been created by "make".

make[3]: Entering directory `/home/pjr/slrn/po'
: --update be.po slrn.pot
rm -f && : -c --statistics -o be.po
mv: cannot stat `': No such file or directory
make[3]: *** [] Error 1
make[3]: Leaving directory `/home/pjr/slrn/po'
make[2]: *** [stamp-po] Error 2
make[2]: Leaving directory `/home/pjr/slrn/po'
make[1]: *** [installlocales] Error 2
make[1]: Leaving directory `/home/pjr/slrn/src'
make: *** [install] Error 2


The installation seems to be successful, despite the error messages, so 
it's not a huge problem.

ISTM that there's either a new translation that hasn't been completely 
added or an old translation that hasn't been completely removed.


PJR :-)

Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13.

n.radesh | 11 Mar 08:48 2013

downloading more headers from article mode

hi all,
i'm using "set query_read_group_cutoff -250" so that i don't have to
download a huge batch of headers all at once (which i probably do't
need) but sometimes i have unread articles that are beyond the 250
most recent articles. is it possible (maybe with a script) to download
even more aritcle headers from inside article mode?

Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report.