Products Downloads Prices Support Company
Index FAQ Configs Feeds In Feeds Out Feeds Out  

Sending News Out of Your Server

 

Sending LOCAL posts upstream using a POSTING feed

With the posting mechanism DNews pretends to be a news reader and sends items into the upstream news server as if it was itself a news reader. The only tricky bit is setting the exclude parameter correctly. In newsfeeds.conf

site me
   groups *
site $nntp_feeder
   type builtin
   posting
   groups *
   exclude news.pbi.net

The variable $nntp_feeder is replaced by the name you have used in dnews.conf as your nntp_feeder. A posting feed is not entirely legitimate although perfectly workable. You should use an IHAVE feed to send articles upstream if your provider will allow it. The main advantage of the posting feed is that it works when you only have normal news reader access to your provider.

Note: NEVER remove the 'me' feed from the top of the newsfeeds.conf file, it MUST be the first feed in the file.

To allow DNews to 'mark' all local posts so you will have some chance of figuring out who posted a 'spam' message you should add this line to DNEWS.CONF:

nntp_xposting true

If you have an incoming 'ihave' feed from a downstream site, the messages will not be sent to this posting feed normally as this is considered unusual and dangerous (you should use outgoing ihave feeds if you are a 'news router' i.e. if your system is supposed to route posts upstream for other systems).  You can force DNews to do this by adding 'post_route true' to dnews.conf, if you do this please ensure your exclude setting are correct as a posting feed will not deal with sending a full news feed as will happen if your exclude settings are wrong.

Sending LOCAL posts upstream using an IHAVE feed

The IHAVE feed is the normal way to send articles upstream. To convert a posting feed to an ihave feed simply remove the 'posting' keyword from the entry in your newsfeeds.conf, e.g.

...
site $nntp_feeder
   type builtin
   groups *
   exclude news.pbi.net
   onlyposts #only send local posts to this site

The variable $nntp_feeder is replaced by the name you have used in dnews.conf as your nntp_feeder. Again you MUST get your exclude parameter correct or use an option to only allow local posts to be sent to this feed.

Note: NEVER remove the 'me' feed from the top of the newsfeeds.conf file, it MUST be the first feed in the file.

Sending a full feed onto someone else - DFeed

DNews 5.2 and later includes 'DFEED'.  This is a separeate module which is intended for sending out many full feeds to other news servers, it is 'very' efficient and reliable and easy to use, if you were using the old 'live' feed mechanism you should change to DFeed feeds.

Here is a simple DFeed example (in newsfeeds.conf):

...
site downstream.site.name
   type DFeed
   groups *

Here is an example of a more complex DFeed using all the options.

...
site downstream.site.name
   type DFeed
   nchan 3
   maxsize 100000
   maxcross 5
   groups comp.*,rec.*,news.*,alt.*,biz.*
   delay 120
   to 2.3.4.5 # (The downstream sites ip number or name)

In newsfeeds.conf all 'site' names must be unique, so you can use the 'to' setting to send more than one feed to the same destination site, normally this is not necessary except to make the 'site' names easier to read as they can be any word rather than having to be valid ip addresses.

Routing news between other news servers

If you want to route news articles between your system and other news servers then it is important to use the 'dfeed' system rather than the 'builtin ihave or posting' feeds. A DFeed feed can process hundreds of thousands of articles every day. A builtin feed is only intended to process a few thousand every day at most.

If you have a local incoming ihave feed (from a local bulletin board for example) which you wish to send out thru a posting feed then you must use this setting in dnews.conf.

post_route true

Shotgun posting

Some providers are not very good at getting posts out to the rest of the world, or even if they do get out it takes many hours or even days to reach other major news systems. Shotgun posting is another innovation unique to DNews, basically it is where you send local posts out to several distant servers to make sure it gets around the world fast. To get posting access to a server somewhere else you might offer posting access to your system in return.

...
site main.feeding.site
   type builtin
   posting
   groups *
   exclude main.feeding.site
site distant.news.server
   type builtin
   posting
   groups *
   exclude main.feeding.site

Note the exclude parameter to prevent your system from routing items across to the distant site which is not your intention.

Writing uucp bag files

You can write rnews uucp bag files to a directory with a feed like this.

site uucp1
   groups *
   type uucp
   uucp_dir c:\uucp_bbs
   uucp_size 4000000
   uucp_n 500

Setting your exclude parameter correctly

In newsfeeds.conf you must set your exclude parameter to stop DNews from sending incoming messages back to your feed site. Let's assume your feed site is called fastfeed.world.net. You need to find out what it stamps onto news articles, to do this read a news article (and show all headers so you can see the PATH header) e.g.

Newsgroups: alt.winsock.trumpet
Subject: Sportster Si does not seem to work with TRUMPET
Date: Thu, 26 Oct 1995 22:44:08
Organization: Personal
Lines: 8
Message-ID:
NNTP-Posting-Host: eagle28.sasknet.sk.ca
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
Path: fast1.world.net!world.net!news.icix.net!esol.intermedia.com

Look thru the path, left to right, and find the first or most generic name for your feed site, in this case 'world.net' looks like the best name to choose.

So here is the entry you should put in newsfeeds.conf, you may need the builtin and posting settings as well but that is up to you.

site fastfeed.world.net
   groups *
   exclude world.net
   builtin

You may need to delete your .feed and .sending files from the spool directory to clear out the backlog of articles queued.

The option 'onlyposts' is often easier to use than the exclude setting, but this can only be used when you aren't sending full feeds out as it stops everything except 'local' posts.

Sending a replicating feed to a slave system.

A replicating feed is one in which the slave news server is forced to number news articles identically to the master server.  This allows users to move randomly between the servers without upsetting their news clients.  We don't particularly recommend this model as there are inherent problems in the concept we feel two servers which don't run in 'replicate' mode are more robust than two running in replicate mode but this is just a personal preference.  If you want to do it, here's the details.

    On the master use a feed entry like this to send to the slave:
        ...
        site slave.server
            groups *
            type DFeed

    On the slave, add to dnews.conf
        postonly true
replicate true
    And in newsfeeds.conf on the slave
        ...
        site master.server
            builtin
            posting
            groups *

Sending a feed to another port

A feed can be sent to a port other than the default as follows -

site news.domain.net:1119

This may be necessary if sending to another DNews system that is running DMulti, or if firewall or other restrictions prevent access to port 119 on the upstream host.

Sending a feed to a program

site prog1
   groups local.*
   type program
   prog_name \dnews\darchiv.exe
   prog_args \dnews\darchiv.log

When items arrive a pipe will be opened to the darchiv program, which must read articles from stdin and do something with them. The articles are sent in the following format:

ARTICLE group:item_number <messageid>
(Actual header and body of article)
. (single full stop is end of article)

ARTICLE group:item_number
(Actual header and body of article)
. (single full stop is end of article)

A sample 'c' program is provided in this file to assist you in writing or modifying existing software. The program must not block or die, it must continue running between each message.

/* ------------------- Example code darchiv.c ----------------- */
/* This sample archiver just writes all the articles to a single file */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE (!FALSE)
#endif

#define MAX_LINE 20000
void main(int argc, char *argv[])
{
   FILE *f;
    char bf[MAX_LINE];
    int inarticle= FALSE;
    f = fopen(argv[1],"a");
    if (f==NULL) {perror(argv[1]); return;}

    for (;!feof(stdin);) {
      if (fgets(bf,MAX_LINE-1,stdin)==NULL) break;
      if (!inarticle) {
         if (strncmp(bf,"ARTICLE",7)==0) {
            inarticle = TRUE;
            continue;
         } else if (strncmp(bf,"EXIT",4)==0) {
            fprintf(f,"--- DNews asked us to exit\n");
            break;
         } else {
            fprintf(f,"--- Unknown Command {%s} \n",bf);
            continue;
         }
      } else {
         if (strcmp(bf,".\n")==0) { /* single full stop is end of message */
            fflush(f);
            fprintf(f,"------------ - Next Message----\n");
            inarticle = FALSE;
            continue;
         }
         if (strcmp(bf,"..\n")==0) strcpy(bf,".\n"); /* message contained a full stop so it was translated */
         fwrite(bf,1,strlen(bf),f); /* Write message to archive */
      }
   }
   fclose(f);
}
/*------------ End of sample program --------*/

Help! my local posts aren't going upstream

Type in:

tellnews update_clear

Then post a message to a test news group "e.g. alt.test"

Then examine dnews.log, look for the following lines, first here is an example of a post going upstream successfully:

21 15:37:19 0:info: cmd: Do cmdx[0:161.29.2.7] {POST} {post}
21 15:37:19 0:info: Processing local post
21 15:37:20 0:info: feed: Queued outgoing NNTP {161.29.2.5}
21 15:37:20 0:info: feed: Queued outgoing feed {161.29.2.5}
21 15:37:20 :warn: feed: Starting NNTP-feed to {161.29.2.5}
21 15:37:22 :info: chan: chan_open {161.29.2.5}
21 15:37:22 :info: suck: upstream name 161.29.2.5 ( )
21 15:37:22 :info: suck: feed_out item 19479 5
21 15:37:23 :out: ok: {<33d2cb5f.0@cplap.netwin.co.nz>} {test@netwinsite.com (Chris Jones)}
21 15:37:23 :warn: suck: Confirmation to {test@netwinsite.com}

The key line is the second from last ":out: ok:" this means the upstream site accepted the article so if you see this line and your posts are still not working then the fault lies with your upstream site. Possibly you should investigate sending posts to some other news server - see the description of 'shot gun posting' above.

21 15:32:51 0:info: feed: Queued outgoing NNTP {161.29.2.55}
21 15:32:51 :warn: feed: Starting NNTP-feed to {161.29.2.55}
21 15:32:53 :info: chan: chan_open {161.29.2.55}
21 15:32:54 :info: suck: upstream name 161.29.2.55 ( )
21 15:33:41 1:error: nntp: Channel closed or didn't open [1] 25 {161.29.2.55}
21 15:33:41 :info: suck: Drat channel closed or failed to open properly or timed out

The above example is typical of sending posts to a site that is not 'alive' or if your network is not working.

If you see this in the log file: "Sorry I can't talk to you" then you probably haven't been granted access to the news server that you are trying to send news to, or possibly you are sending to the wrong news server. Call up the admin of that server and ask him to add your 'ipnumber' to his access file.

If you see "Transfer permission denied" then you don't have 'ihave' access to the server you are trying to send posts to. Try adding the 'posting' keyword to the newsfeeds.conf file for that feed, or call up the admin and ask for 'ihave' access to his server.