🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
9 messages
9 total messages Started by Grey Cloak Sun, 07 Dec 1997 00:00
SLRNPULL: Need info to crontab post
#37472
Author: Grey Cloak
Date: Sun, 07 Dec 1997 00:00
25 lines
1392 bytes
I am using slrnpull to read news off line. I need to be able to 
post a FAQ once a month. I planned on using crontab and a perl
script to do this.

I would like some info on the db needed to be updated so I can put
the file into out.going and have slrnpull post it.



-- 
Grey Cloak

         ---------------------------------------------
  .###########.   REMOVE the e from greycloak for faster responce
 ##'___   ___`##  Mailbot Auto sends
 ##  * > < *  ##    wizardfaq: wizardfaq@greycloak.access.one.net     
 ### ) | | ( ###    Docslist:   Docslist@greycloak.access.one.net
 ###\_-===-_/###  The above two addresses is a mailbot and will
   #  ~!!!~  #    always send you a file. Don't use it to email me. 

http://www.geocities.com/Area51/7614
http://w3.one.net/~grycloak/dreams/dream.htm

Re: [nevermind] SLRNPULL: Need info to crontab post
#37471
Author: Grey Cloak
Date: Sun, 07 Dec 1997 00:00
35 lines
1650 bytes

I figured it out. Just popped an 'X' in front of the filename. 
So it onto the editor to write the script. :)


On 7 Dec 1997 22:55:55 GMT,
Grey Cloak cause to appear:
>I am using slrnpull to read news off line. I need to be able to 
>post a FAQ once a month. I planned on using crontab and a perl
>script to do this.
>
>I would like some info on the db needed to be updated so I can put
>the file into out.going and have slrnpull post it.
>
>
>



-- 
Grey Cloak

         ---------------------------------------------
  .###########.   REMOVE the e from greycloak for faster responce
 ##'___   ___`##  Mailbot Auto sends
 ##  * > < *  ##    wizardfaq: wizardfaq@greycloak.access.one.net     
 ### ) | | ( ###    Docslist:   Docslist@greycloak.access.one.net
 ###\_-===-_/###  The above two addresses is a mailbot and will
   #  ~!!!~  #    always send you a file. Don't use it to email me. 

http://www.geocities.com/Area51/7614
http://w3.one.net/~grycloak/dreams/dream.htm

Re: SLRNPULL: Need info to crontab post
#37520
Author: David Gerard
Date: Tue, 09 Dec 1997 00:00
26 lines
1509 bytes
On 7 Dec 1997 22:55:55 GMT,
Grey Cloak <greycloak@greycloak.access.one.net> wrote:

:I am using slrnpull to read news off line. I need to be able to 
:post a FAQ once a month. I planned on using crontab and a perl
:script to do this.
:I would like some info on the db needed to be updated so I can put
:the file into out.going and have slrnpull post it.


I would suggest not using slrnpull - if you have crontab there
for the purpose, just use inews -h . That's what I do.

On the subject of slrnpull - how close to prime time is the Windows version?
Is there a Web page on the subject? (I started from JED's page but could
not find it.)


-- 
http://thingy.apana.org.au/~fun/scn/       http://www.suburbia.net/~fun/scn/

             Boycott amazon.com until they stop sending junk email.
"Study hard and do your homework/That's the way to fill your phonebook" - NW

Re: SLRNPULL: Need info to crontab post
#37539
Author: John E. Davis
Date: Thu, 11 Dec 1997 00:00
111 lines
3073 bytes
On 7 Dec 1997 22:55:55 GMT, Grey Cloak <greycloak@greycloak.access.one.net>
wrote:
>I am using slrnpull to read news off line. I need to be able to
>post a FAQ once a month. I planned on using crontab and a perl
>script to do this.
>
>I would like some info on the db needed to be updated so I can put
>the file into out.going and have slrnpull post it.

I am now posting the slrn-FAQ in the manner that you describe.  I use
a shell script that runs via cron.  Here is my shell script:

#! /bin/sh
cd /var/spool/news/news.mit.edu/out.going
new_msgid=`./genmsgid davis space.mit.edu`
old_msgid=`cat ./last_msgid.dat`
echo "Message-Id: $new_msgid" >  slrn-FAQ.x
echo "Supersedes: $old_msgid" >> slrn-FAQ.x
/bin/cat slrn-FAQ >> slrn-FAQ.x
/bin/mv slrn-FAQ.x X.slrn-FAQ
echo $new_msgid > ./last_msgid.dat
exit 0

The `genmsgid' program generates a message-id given two command line
parameters.  It is based on similar code I extracted from slrn:

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>

static char *create_message_id (char *username, char *host)
{
   unsigned long pid, now;
   static unsigned char baseid[64];
   unsigned char *b, *t, tmp[32];
   char *chars32 = "0123456789abcdefghijklmnopqrstuv";
   static unsigned long last_now;

   while (1)
     {
	if ((host == NULL)
	    || ((time_t) -1 == time ((time_t *)&now)))
	  return NULL;

	if (now != last_now) break;
	sleep (1);
     }
   last_now = now;

   pid = (unsigned long) getpid ();
   now -= 0x28000000;

   b = baseid;
   t = tmp;
   while (now)
     {
	*t++ = chars32[now & 0x1F];
	now = now >> 5;
     }
   while (t > tmp)
     {
	t--;
	*b++ = *t;
     }
   *b++ = '.';

   t = tmp;
   while (pid)
     {
	*t++ = chars32[pid & 0x1F];
	pid = pid >> 5;
     }
   while (t > tmp)
     {
	t--;
	*b++ = *t;
     }

   *b++ = '.';
   t = (unsigned char *) username;
   if (t != NULL)
     while ((*t != 0) && (b < baseid + sizeof(baseid) - 1)) *b++ = *t++;
   *b = 0;

   return (char *) baseid;
}

int main (int argc, char **argv)
{
   char *s;

   if (argc != 3)
     {
	fprintf (stderr, "Usage: %s username host\n", argv[0]);
	return 1;
     }

   s = create_message_id (argv[1], argv[2]);
   if (s == NULL)
     {
	fprintf (stderr, "%s: failed to generate msgid.\n", argv[0]);
	return 1;
     }
   fprintf (stdout, "<%s@%s>\n", s, argv[2]);
   return 0;
}

going to extremes to save 8 bytes in Message-ID: header (was Re: SLRNPULL: Need info to crontab post)
#37561
Author: Russell Schulz
Date: Fri, 12 Dec 1997 00:00
27 lines
1835 bytes
davis@space.mit.edu (John E. Davis) writes:

> The `genmsgid' program generates a message-id given two command line
> parameters.  It is based on similar code I extracted from slrn:

> [tons of not-C-at-its-clearest code deleted]

I used to use a system which played that let's-encode-the-date-time
game, and it was such a pain to decode a posting timestamp from
the Message-ID: (which people wanted to do) that I am now somewhat
staggered by people who bother to do it now.

I still find <yyyymmdd.hhmmss.random.address> to be a great Message-ID:
header (as before, adding the random element only in case you cross
time zones between two postings).  if you want to add `slrn' in front,
feel free.

  <slrn68ur83.8be.davis@mygir.davis.net>
  <slrn19971211.104820.x3.davis@mygir.davis.net>
                                        12345678

if I got rid of the random, and the 3 periods, it'd be only 3 chars.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c

Re: going to extremes to save 8 bytes in Message-ID: header (was Re: SLRNPULL: Need info to crontab post)
#37562
Author: Curtis [Jewell] Whalen
Date: Fri, 12 Dec 1997 00:00
58 lines
2824 bytes
On Fri, 12 Dec 1997 02:09:29 +0000, Russell Schulz
 <Russell_Schulz@locutus.ofB.ORG> wrote:
>
>I used to use a system which played that let's-encode-the-date-time
>game, and it was such a pain to decode a posting timestamp from
>the Message-ID: (which people wanted to do) that I am now somewhat
>staggered by people who bother to do it now.
>
>I still find <yyyymmdd.hhmmss.random.address> to be a great Message-ID:
>header (as before, adding the random element only in case you cross
>time zones between two postings).  if you want to add `slrn' in front,
>feel free.
>
>  <slrn68ur83.8be.davis@mygir.davis.net>
>  <slrn19971211.104820.x3.davis@mygir.davis.net>
>                                        12345678
>
>if I got rid of the random, and the 3 periods, it'd be only 3 chars.

No, you need at least one "random" or "counter" thing in there, just in
case two messages get sent out the same second.

May apply more to servers that create Message-ID:s for programs that
don't add them, but still a good idea.

But two of the periods can be gotten rid of. (Keep the one before the
e-mail address)

Personally, the way I write message-IDs in my programs is
  <time_t-in-hex.counter%address>.

Even for my long posting address, it ends up as
  <09ABCDEF.1%curtis_whalen+usenet@geocities.com>

And yes, the percent sign is legal in Message-ID:

Very little code needed. (practically all you need once you have the e-mail
addy is:
        time_t lTime = time(); // I think this is the right call
        sprintf(sMsgID, "<%8Xl.%i%%%s>", lTime, iCounter, sEMail);
        iCounter++;
)

Although I do have to admit, decoding a time_t by hand would not be my idea
of a fun time.

Message-ID isn't where a program should be advertised, anyway.
Add User-Agent: slrn/0.9.4.3 instead. (or X-Newsreader until Usefor's draft
gets anywhere)

I know, I'm gravitating away from about readers.

E-mail replies to curtis underline whalen plus email at geocities dot com.

--Curtis

Re: going to extremes to save 8 bytes in Message-ID: header (was Re: SLRNPULL: Need info to crontab post)
#37571
Author: Russell Schulz
Date: Sun, 14 Dec 1997 00:00
19 lines
1561 bytes
  [ overrode Followup-To: poster ]

curtis_whalen+usenet@geocities.com (Curtis [Jewell] Whalen) writes:

> Personally, the way I write message-IDs in my programs is
>   <time_t-in-hex.counter%address>.

> Although I do have to admit, decoding a time_t by hand would not be my
> idea of a fun time.

but the code to do it is trivial.  not as trivial as for my Message-ID:
headers :-) , but I like it a lot more than the highly encoded ones.

the MD5 Message-ID:s are cool, but I think I'll still give them a miss.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c

Re: Message-Id: and all that
#37586
Author: Sven Guckes
Date: Mon, 15 Dec 1997 00:00
48 lines
2774 bytes
Russell Schulz <Russell_Schulz@locutus.ofB.ORG> wrote:
> I find <yyyymmdd.hhmmss.random.address> to be a great Message-ID: header

curtis_whalen+usenet@geocities.com (Curtis [Jewell] Whalen):
> No, you need at least one "random" or "counter" thing in there,
> just in case two messages get sent out the same second.

I wonder how often there were collisions with the above id format.  ;-)

I think we can save some time with words here if we allow some definitions.

Definition:
"MID"  stands for "message id".  It is the value of an MIDH:
"MIDH" stands for "message id header", namely "Message-Id:".

Definition "DTRA":
"DTRA" is the abbreviation of the MIDH format as follows:

	Message-Id: <DAY.TIME.RND.ADDRESS>
	DAY	yyyymmdd	yyyy = year  mm = month  dd = day
	TIME	hhmmss		  hh = hour  mm = minute ss = seconds
	RND	nnnn		nnnn = number
	ADDRESS			email address (user@domain)

Suggestions:
YEAR:  The year should be in four digits - just for the heck of it, ok?!
TIME:  The time should be given for GMT - makes it easier to compare times.

Questions:
Should the message id be given from a server program on the same host?
Should the MID contain a hash value (or MD5 sum) instead of a random value?
What range should be given for the random number?  [1..10^4]?
Does ADDRESS have to be valid for posting?
(Which news servers check ADDRESS for validity?)

Checking the validity of an address can be impossible, of course,
eg when the user uses offline reading and posting.

> Message-ID isn't where a program should be advertised, anyway.
> Add User-Agent: slrn/0.9.4.3 instead.
> or X-Newsreader until Usefor's draft gets anywhere

What draft?  URL?

Sven

Re: SLRNPULL: Need info to crontab post
#39574
Author: John E. Davis
Date: Sun, 15 Mar 1998 00:00
34 lines
2067 bytes
On 9 Dec 1997 15:09:09 +1100, David Gerard <fun@thingy.apana.org.au>
wrote:
>On 7 Dec 1997 22:55:55 GMT,
>Grey Cloak <greycloak@greycloak.access.one.net> wrote:
>
>:I am using slrnpull to read news off line. I need to be able to 
>:post a FAQ once a month. I planned on using crontab and a perl
>:script to do this.
>:I would like some info on the db needed to be updated so I can put
>:the file into out.going and have slrnpull post it.

   To post a file using slrnpull, just place it in the out.going
directory and make sure that the first character of the name starts
with `X'.  slrnpull will ignore all other files whose name begins with
a different character.  I plan to automatically post the slrn FAQ via
slrnpull.

>On the subject of slrnpull - how close to prime time is the Windows version?
>Is there a Web page on the subject? (I started from JED's page but could
>not find it.)

   I have spent all my free time working on the next release of slang,
and very little time with slrn.  In particular, I integrated to the
best of my ability most of the Windows specific patches to slang that
were sent to me.  When I release slang 1.0, I will also make new
versions of slrn and jed available (because slang 1.0 is not backward
compatible with 0.99-xx), but slrn will have no new features
nor will it contain any windows patches.  Only then will I start
working on the next slrn release.

--John

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads