6 * C H _ B B O A R D S . C
8 * the new BBoards channel
26 * This is the channel that is used to handle Internet BBoard
27 * distribution in an intelligent fashion. In order to run it, you
28 * need the UCI BBoards facility installed. This requires the
29 * establishment of a special login called ``bboards'', and the
32 * The idea is simple. Distribution lists get aliased to go through
33 * this channel. Suppose that the relay (or site) using ch_bboards
34 * subscribes to UNIX-WIZARDS. The maintainer of the list is given
35 * the address ``dist-unix-wizards'' to send to for this relay and all
36 * sites that it serves. The site manager then defines the following
37 * alias in the aliases file:
39 * dist-unix-wizards: unix-wizards@bboards
41 * This channel (and this channel alone) is then defined to serve the
42 * ``bboards'' host. When it gets invoked, the channel does two
43 * things: First, if the relay itself subscribes to the BBoard (the
44 * bb_file entry in the BBoards file is non-empty), then it delivers
45 * the message to the file. Second, if other sites subscribe to the
46 * BBoard, then ch_bboards will enter the message back into the queue
47 * system using the ``bboards'' login as the sender.
49 * This achieves two goals: first, the incoming bandwidth of relays
50 * is not degraded by many sites subscribing to the same BBoard;
51 * second, if an address goes bad down the line, the relay's
52 * ``bboards'' login gets the message back (not the originator). Since
53 * the relay's PostMaster is assumed to monitor this mailbox, problems
54 * can be found and corrected.
56 * Finally, ch_bboards can be run by a site that does not relay for
57 * other sites. In this case, the bb_dist field is empty.
60 /* Unlike previous versions of ch_bboards, this version does not change
61 * the contents of the headers of the message being re-distributed.
62 * The following changes are made:
64 * Envelope: The failure address is changed to
65 bboards@locname.locdomain
66 * Headers: Another Received: is added
68 * The local copy going to the BBoard has two entries prepended to the
72 * BB-Posted: RFC822 date/time
78 * The POP channel is a subset of the BBoards channel, and just
79 * handles local mail delivery for remote users. As such, it
80 * only needs to know how to store a maildrop locally, and doesn't
81 * have to mess around with .cnt files and remote delivery.
93 LLog *logptr = &chanlog;
94 extern char *logdfldir;
114 signal (SIGINT, SIG_IGN);
116 if ((chanptr = ch_nm2struct (argv[0])) == (Chan *) NOTOK)
117 err_abrt (RP_PARM, "unknown channel name '%s'", argv[0]);
121 retval = ch_bboards (argc, argv, chanptr);
128 /* **************** (ch_) BBOARD DELIVERY **************** */
130 ch_bboards (argc, argv, chanptr)
136 ll_log (logptr, LLOGBTR, "ch_bboards(argc=%d,*argv='%s')", argc, *argv);
139 if (rp_isbad (qu_init (argc, argv)))
141 if (rp_isbad (bb_init (chanptr)))
144 phs_note (chanptr, PHS_WRSTRT);
146 if (rp_isbad (qu2bb_send (chanptr)))
149 phs_note (chanptr, PHS_WREND);
160 err_abrt (code, fmt, b, c, d)
167 char linebuf[LINESIZE];
172 sprintf (linebuf, "%s%s", "err [ ABEND (%s) ]\t", fmt);
173 ll_log (logptr, LLOGFAT, linebuf, rp_valstr (code), b, c, d);