Article View: alt.free.newsservers
Article #38920Re: mail news gateway
From: Jean-Louis Noel
Date: Mon, 15 Dec 2003 20:01
Date: Mon, 15 Dec 2003 20:01
8594 lines
430831 bytes
430831 bytes
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C3C34E.8D6640E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Bonjour Lupo,
Lupo écrivait le Mon, 15 Dec 2003 19:25:00 GMT:
L> I can open
L> other .tar archives, but not that one! :(
Bye,
Jean-Louis
------=_NextPart_000_0008_01C3C34E.8D6640E0
Content-Type: application/x-tar;
name="Gateway-0.42.tar"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="Gateway-0.42.tar"
Gateway-0.42/=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00 40755 =00 764 =00 =
0 =00 0 6515062265 11204=00 =
5=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00 40755 =00 764 =00 0 =00 0 =
6515062266 11767=00 =
5=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/wh=
itelist.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=001=
00444 =00 764 =00 0 =00 2310 6447342247 14602=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 whitelist=0A=
=0A=
Checks to make sure that the incoming message is from a poster in a file=0A=
of valid posters. The most common use of this module is in conjunction=0A=
with human moderation; all messages from pre-approved posters are sent=0A=
straight through via the robomoderator and the rest are relayed to a =
human=0A=
moderator for hand checking.=0A=
=0A=
This module takes one configuration directive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem whitelist FILE=0A=
=0A=
C<FILE> is a list of poster addresses, one per line. Only the address=0A=
should be included in this file, not the name or other comments. Files=0A=
ending in C<.db> are reserved for future implementations (eventually,=0A=
these will automatically be recognized as Berkeley db files for handling=0A=
large lists of posters).=0A=
=0A=
=3Dback=0A=
=0A=
There is one possible failure message:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Unknown poster %s=0A=
=0A=
The message is from a poster address which isn't in the whitelist of =
known=0A=
addresses.=0A=
=0A=
=3Dback=0A=
=0A=
In addition, during parsing of the configuration directives, one fatal=0A=
error, which would be passed to error(), is possible:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Can't open whitelist file %s: %s=0A=
=0A=
An error occurred while trying to open a file given as a C<FILE> argument=0A=
to a configuration directive.=0A=
=0A=
=3Dback=0A=
=0A=
This module takes no arguments.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/newsgroups.pod=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 =
0 =00 16573 6514623561 15036=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 newsgroups=0A=
=0A=
Construct the Newsgroups header for a message. This is the general =
module=0A=
for this purpose, and is considerably more flexible than the simple=0A=
handling built into the mailtonews module.=0A=
=0A=
The guiding purpose of this module is to attempt to deal with =
crossposting=0A=
correctly in the context of a generic mail to news gateway (where =
incoming=0A=
mail messages may not, unlike submissions for moderated groups, already=0A=
have Newsgroups headers in them). We're ambitious, though, and try to=0A=
also handle the case where we do have an incoming Newsgroups header.=0A=
=0A=
All of the gory details of what this module does in every circumstance =
are=0A=
documented in the comment block at the beginning of the code. If you're=0A=
really curious, I'd recommend reading that. It's far more information=0A=
than most people are going to want to know. Here's the briefer summary:=0A=
=0A=
The program tells this module what the primary newsgroup is. This should=0A=
be the group to which we should post by default. In other words, suppose=0A=
you have several different mail to news gateway addresses for several=0A=
different groups which all feed into the same program. To use this=0A=
module, configure such a system so that the program knows what address a=0A=
given message arrived via (either by having access to the envelope=0A=
recipient through using qmail, using procmail as a delivery agent, or =
some=0A=
other method, or by having each mail to news gateway alias give the=0A=
program the name of its primary newsgroup on the command line). The=0A=
program tells this module what group that is by providing it as an=0A=
argument to the module.=0A=
=0A=
We also have a list of associations between addresses and newsgroups =
given=0A=
to us in configuration directives. An address can either be a literal=0A=
address (which will be matched exactly, albeit without regard to case) or=0A=
a regex. Note that although this module wants to know about as many of=0A=
those associations as possible, it can deal with not knowing about them=0A=
all and will generally do the right thing. It will just tend to =
multipost=0A=
when it could have crossposted unless it knows which addresses correspond=0A=
to which newsgroups.=0A=
=0A=
If the incoming message doesn't have a Newsgroups header, this module =
will=0A=
construct one by inspecting the To and Cc headers and seeing where the=0A=
message was sent. If the primary group corresponds to one of the=0A=
addresses in the To and Cc headers, then it will crosspost between the=0A=
groups corresponding to the recognized addresses in the To and Cc headers=0A=
(with the caveat given below). Otherwise, it assumes that the address =
via=0A=
which we received the message either is one we don't know about or was=0A=
Bcc'd and posts only to the primary group.=0A=
=0A=
There is one problem with this. If a message is addressed to a number of=0A=
different addresses, all of which eventually gate to a newsgroup, if all=0A=
of those gateways do this analysis and crosspost, the article ends up=0A=
multiposted (one copy for each group crossposted to). The solution to=0A=
this problem is for one of the instances of the gateway program decide to=0A=
post and all of the other ones exit quietly. We support this by =
returning=0A=
the error "Not primary instance" if the primary group is in the list=0A=
formed from the To and Cc headers but isn't the first group in that list.=0A=
We assume that we'll also get the mail going to the address corresponding=0A=
to the first group in that list, and that instance will do the=0A=
crossposting. A program using this module should probably exit silently=0A=
if we return "Not primary instance".=0A=
=0A=
If the message does contain a Newsgroups header, then what we do depends=0A=
on whether our primary group is among the groups in that header, and=0A=
whether any of the addresses in the To or Cc headers correspond to groups=0A=
in that header. The exact rules are very complicated (see the source=0A=
comments), but we ignore the Newsgroups header entirely if neither the=0A=
primary group nor the groups corresponding to addresses in the To and Cc=0A=
headers occur in it, honor it if the primary group is in it, and post =
only=0A=
to the groups corresponding to addreses in the To and Cc headers that=0A=
aren't in the Newsgroups header if some addresses in the To and Cc =
headers=0A=
correspond to groups in the Newsgroups header but our primary group isn't=0A=
in that header. We also return "Not primary instance" where appropriate=0A=
to ensure that a post to a given set of newsgroups is only done once.=0A=
=0A=
(Yes, this is a simplification. See the source comments for the B<real>=0A=
complexity.)=0A=
=0A=
We also rename Message-ID to X-Original-Message-ID if we have some=0A=
expectation that otherwise we'll clash with another post (either made by=0A=
another instance of the same program or posted elsewhere). We also =
rename=0A=
Newsgroups to X-Original-Newsgroups if we don't honor the supplied =
header.=0A=
Note that this module goes to some length to avoid renaming Message-ID=0A=
unless necessary; if you want to drop all incoming message IDs and=0A=
generate new ones, you should do that using the headers module.=0A=
=0A=
We take an argument specifying the primary group, and we take one=0A=
configuration directive in one of three forms:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem group NEWSGROUP [ ADDRESS | /PATTERN/ ]=0A=
=0A=
Adds C<NEWSGROUP> to the list of valid newsgroups and optionally=0A=
associates it with either C<ADDRESS> or C<PATTERN>. C<ADDRESS> is a=0A=
literal string that (case-insensitively) exactly matches the address=0A=
associated with C<NEWSGROUP>. C<PATTERN> is a Perl regex that matches=0A=
addresses associated with C<NEWSGROUP>.=0A=
=0A=
=3Ditem group /PATTERN/=0A=
=0A=
Tells this module to consider any newsgroup matching C<PATTERN> to be=0A=
valid to crosspost to. Note that this directive doesn't set up any=0A=
address to group mappings, just changes what groups are allowed in a=0A=
pre-existing Newsgroups header.=0A=
=0A=
=3Ditem group FILE /PATTERN/=0A=
=0A=
Tells this module to add all newsgroups matching C<PATTERN> in the file=0A=
C<FILE> to the list of valid newsgroups for crossposts. Note that this=0A=
directive doesn't set up any address to group mappings, just changes what=0A=
groups are allowed in a pre-existing Newsgroups header. C<FILE> must=0A=
be an absolute path (i.e., it must begin with /).=0A=
=0A=
=3Dback=0A=
=0A=
In all of the above, the /s around C<PATTERN> arguments are required, as=0A=
they allow unambiguous parsing of the configuration file directives.=0A=
=0A=
There are three possible failure messages returned by this module:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Invalid crossposted group %s=0A=
=0A=
The incoming message already had a Newsgroups header which included a=0A=
group that wasn't on the list of allowable newsgroups for crossposting.=0A=
=0A=
=3Ditem Not primary instance=0A=
=0A=
Although the primary group is among the groups we would normally post to,=0A=
it isn't the "first" such group. This probably means that multiple =
copies=0A=
of the message were received by different gateways and this instance=0A=
should exit silently since another instance will be doing the posting.=0A=
=0A=
=3Dback=0A=
=0A=
In addition to that, there are two possible fatal errors that can occur=0A=
during the parsing of the configuration file and a third at the time of=0A=
parsing the incoming message. These errors are passed to the=0A=
News::Gateway error() method.=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Invalid regex /%s/: %s=0A=
=0A=
An error occurred while compiling the given regex from a C<PATTERN>=0A=
argument to a configuration directive.=0A=
=0A=
=3Ditem Can't open group file %s: %s=0A=
=0A=
An error occurred while attempting to open a file from a C<FILE> argument=0A=
to a configuration directive.=0A=
=0A=
=3Ditem newsgroups module missing required argument=0A=
=0A=
The newsgroups module requires an argument giving the primary newsgroup,=0A=
or all of the tricks we use to figure out crossposting and where to post=0A=
won't work correctly.=0A=
=0A=
=3Dback=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00Gateway-0.42/pod/hash.pod=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 =
0 =00 2345 6514453224 13512=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 hash=0A=
=0A=
B<THIS MODULE IS EXPERIMENTAL>. The interface to this module is pretty=0A=
much guaranteed to change in later versions of News::Gateway. Don't rely=0A=
on the current interface.=0A=
=0A=
This module provides a generic interface for loading hashes from disk=0A=
files. It can transparently handle either regular files (which are =
loaded=0A=
into a memory hash) or Berkeley db files (which are tied to a hash=0A=
directly). The following method is included:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem hash_open (FILE [, SPLIT])=0A=
=0A=
If C<FILE> ends in F<.db>, then it will be tied directly to a hash.=0A=
Otherwise, it will be opened and its contents read into memory. C<SPLIT>=0A=
is an anonymous code reference that will be called with each line and is=0A=
expected to return a list consisting of the key and then the value (or=0A=
values, if there are more than one associated with a key). If C<SPLIT>=0A=
isn't provided, each line minus the trailing newline will be taken as a=0A=
key and the value will always be 1.=0A=
=0A=
If C<SPLIT> returns more than one value for a key, the key will be=0A=
associated with an anonymous array containing all the values. Otherwise,=0A=
the key will be associated with the value directly.=0A=
=0A=
This method returns a reference to the resulting hash, or undef if the=0A=
file could not be opened.=0A=
=0A=
=3Dback=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00Gateway-0.42/pod/nobinaries.pod=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 =
3300 6450503203 14700=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 nobinaries=0A=
=0A=
Checks the message to see if it is or contains a binary and rejects it if=0A=
it is. The following checks are performed: Ensure that no Content-Type=0A=
header in the headers or the body contains the strings "application",=0A=
"image", "audio", or "video"; ensure that no Content-Transfer-Encoding=0A=
header in the headers or the body is equal to "base64", and ensure that=0A=
encoded lines do not exceed 50% of the number of lines in the body for =
any=0A=
article with at least 40 lines.=0A=
=0A=
An encoded line is defined as a line beginning with an M (with optional=0A=
leading whitespace or quoting characters) and exactly 60 or 61 characters=0A=
in length, or a line containing no spaces, not starting with M or ~, and=0A=
between 59 and 80 characters in length.=0A=
=0A=
Lines meeting those criteria are counted separately (the first as=0A=
potential uuencoding, the second as potential base64 encoding), and if =
the=0A=
count of lines in any one category is over half of the total body lines,=0A=
the message is rejected.=0A=
=0A=
The rejection messages are:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem base64 encoded=0A=
=0A=
The message contains a Content-Transfer-Encoding header with a value of=0A=
"base64".=0A=
=0A=
=3Ditem Invalid content type=0A=
=0A=
The message contains a Content-Type header that contains one of the=0A=
strings "application", "image", "audio", or "video".=0A=
=0A=
=3Ditem Apparently uuencoded=0A=
=0A=
The message body is at least 40 lines and more than 50% of those lines=0A=
start with M (modulo whitespace and quoting) and are exactly 60 or 61=0A=
characters long.=0A=
=0A=
=3Ditem Apparently base64-encoded=0A=
=0A=
The message body is at least 40 lines and more than 50% of those lines=0A=
contain no spaces, do not begin with M or ~, and are between 59 and 80=0A=
characters long.=0A=
=0A=
=3Dback=0A=
=0A=
This article takes no arguments or configuration directives.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/=
pod/anykeyword.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
100444 =00 764 =00 0 =00 1000 6444716577 14765=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 anykeyword=0A=
=0A=
This module requires that every incoming message have at least one =
keyword=0A=
on the subject line. For the purposes of this check, a keyword is =
defined=0A=
as anything that matches:=0A=
=0A=
/^(?:Re:\s+)?\[\S+\]/=0A=
=0A=
(in other words, something without spaces enclosed in square brackets at=0A=
the beginning of the subject line modulo any Re:). If no keyword is =
found=0A=
in the incoming message, this module returns the message:=0A=
=0A=
No keyword found=0A=
=0A=
This module takes no arguments or configuration directives.=0A=
Gateway-0.42/pod/mailpath.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00100444 =00 764 =00 0 =00 1413 6444744046 =
14370=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 mailpath=0A=
=0A=
Generates an X-Mail-Path header from the Received headers of a mail=0A=
message. It attempts to figure out the real name of each host that the=0A=
mail passed through based on the standard comment syntax used by most=0A=
mailers, but this problem is inherently impossible to solve completely.=0A=
=0A=
X-Mail-Path is set to a !-separated list of hosts that the mail has =
passed=0A=
through. If from the Received headers the name of a host appears to be=0A=
trusted, it's given; otherwise the name followed by the IP address in=0A=
brackets is given. If the IP address isn't available, "[UNTRUSTED]" is=0A=
appended.=0A=
=0A=
The envelope sender is added to the end of the X-Mail-Path if known; if=0A=
not, "UNKNOWN" is added instead.=0A=
=0A=
mailpath takes no arguments or configuration directives and cannot fail.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/=
pod/cleanbody.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00100444 =00 764 =00 0 =00 1730 6444717653 14537=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 cleanbody=0A=
=0A=
This module checks the body of an incoming article and cleans it up,=0A=
attempting to enforce standard ISO 8859-1 text. If it's encoded in=0A=
quoted-printable, that encoding is undone. Microsoft Word SmartQuotes =
are=0A=
converted into their ASCII equivalents, any Ctrl-Ms are removed, and the=0A=
module checks to make sure that the message contains no invalid =
characters=0A=
(outside of the standard ISO 8859-1 range) and that no lines are longer=0A=
than 79 characters.=0A=
=0A=
The messages returned by the checks in the event of failure are:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Invalid characters in body=0A=
=0A=
The body contains characters outside the range [\s!-~\xa0-\xff].=0A=
=0A=
=3Ditem Line over 79 characters=0A=
=0A=
One or more lines in the body are over 79 characters long.=0A=
=0A=
=3Dback=0A=
=0A=
This module takes no arguments or configuration directives. If the=0A=
original message was in quoted-printable, it will change the=0A=
Content-Transfer-Encoding header to be "8bit". It recognizes=0A=
quoted-printable from the MIME encoding headers.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/moosesign.p=
od=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =
=00 764 =00 0 =00 2047 6446760612 14577=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 moosesign=0A=
=0A=
Does simple PGPMoose signing of messages. This module is B<not> a full=0A=
implementation of PGPMoose; in particular, it doesn't support all of the=0A=
crosspost handling. It looks through the groups in the Newsgroups header=0A=
and adds a PGPMoose X-Auth header for every group in the Newsgroups =
header=0A=
for which a PGP key has been given.=0A=
=0A=
This module takes one configuration directive, which associates a PGP key=0A=
ID and passphrase with a newsgroup:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem pgpkey NEWSGROUP PASSPHRASE KEYID=0A=
=0A=
Associates the given C<KEYID> and C<PASSPHRASE> with C<NEWSGROUP>.=0A=
C<KEYID> is optional and will default to the name of the newsgroup=0A=
surrounded by spaces if not given. (This default will allow PGP to find=0A=
the key correctly if the key ID is something like "Moderator for=0A=
group.name <address>" while avoiding confusing group.name and=0A=
group.name.other.)=0A=
=0A=
=3Dback=0A=
=0A=
Note that using this module means putting the PGP passphrases for the=0A=
moderation keys in cleartext in the configuration file or in the script.=0A=
=0A=
This module takes no arguments and cannot fail.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gate=
way-0.42/pod/keywords.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00100444 =00 764 =00 0 =00 2100 6444740401 =
14421=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 keywords=0A=
=0A=
This module checks the Subject header of a message and ensures that it=0A=
starts (modulo an initial Re:) with a valid keyword. By default, the=0A=
following keyword formats are supported:=0A=
=0A=
KEYWORD:=0A=
KEYWORD/KEYWORD:=0A=
[KEYWORD]=0A=
[KEYWORD/KEYWORD]=0A=
[KEYWORD][KEYWORD]=0A=
=0A=
If multiple keywords are given, they all have to be valid. Keywords are=0A=
checked against a list given in a file and are case-insensitive.=0A=
=0A=
This module takes one optional argument, a reference to a sub which, if=0A=
given a subject line, returns a list of all the keywords present. This=0A=
can be used to override the default patterns listed above.=0A=
=0A=
There is one required configuration file directive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem keywords FILENAME=0A=
=0A=
Specifies the file from which the list of valid keywords will be read.=0A=
The file should list all valid keywords, one per line.=0A=
=0A=
=3Dback=0A=
=0A=
Two failure messages are possible:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem No keywords found=0A=
=0A=
There were no keywords in the subject header of the message.=0A=
=0A=
=3Ditem Invalid keyword '%s'=0A=
=0A=
A keyword was found that wasn't in the list of valid keywords.=0A=
=0A=
=3Dback=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gate=
way-0.42/pod/mungeids.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00100444 =00 764 =00 0 =00 4455 6514446672 =
14417=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 mungeids=0A=
=0A=
Programmatically munges the message IDs in the Message-ID and References=0A=
headers by adding a slash-separated list of newsgroups to which the=0A=
article is going to be posted, followed by a slash, to the beginning of=0A=
them. We also strip off any prefix that looks like a prefix we'd =
generate=0A=
(any number of strings that could be a newsgroup name, separated by=0A=
slashes) to prevent threads with replies from readers of multiple=0A=
mungeid'd groups from generating constantly-growing message IDs and to=0A=
hopefully still get threading right. For the purposes of this check, we=0A=
assume newsgroup names will contain at least one period; this module may=0A=
not work correctly for newsgroup names that do not.=0A=
=0A=
The purpose of this is for use with mailing list to newsgroup gateways.=0A=
Since messages to multiple mailing lists may all have the same message =
ID,=0A=
and since the same mailing list may be gated to Usenet in multiple =
places,=0A=
the message IDs of incoming mailing list messages need to be munged in=0A=
some fashion before being passed on to Usenet. Ideally, however,=0A=
threading should be preserved, and replies to mailing list messages from=0A=
other people on the mailing list won't refer to the munged message ID.=0A=
This module therefore applies the same munge to all of the message IDs in=0A=
the References header as well, in the hope of maintaining threading and=0A=
still getting message ID uniqueness.=0A=
=0A=
If the message doesn't already have a Message-ID header, this module will=0A=
generate one.=0A=
=0A=
Since an accurate Newsgroups header is needed to correctly munge the IDs,=0A=
this module should run after any modules responsible for generating that.=0A=
It also needs the final Message-ID and References header, so it should =
run=0A=
after the mailtonews module since that module may promote message IDs =
from=0A=
In-Reply-To into References and discard existing Message-ID headers.=0A=
=0A=
This module takes one optional configuration directive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem mungeids REGEX [REGEX ...]=0A=
=0A=
C<REGEX> is a regex matching newsgroups which should be used to make up=0A=
the prefix that we'll be adding to message IDs. If this configuration=0A=
directive is supplied, then only newsgroups matching one of the supplied=0A=
regexes will be used to construct the prefix. By default, all newsgroups=0A=
in the Newsgroups header will be used in the prefix.=0A=
=0A=
=3Dback=0A=
=0A=
mungeids takes no arguments and cannot fail.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/newstomail.pod=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 =
0 =00 2775 6506375303 14762=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 newstomail=0A=
=0A=
Rewrites a news article into a mail message, using a set of newsgroup to=0A=
e-mail address mappings to determine which addresses to mail the =
resulting=0A=
message to.=0A=
=0A=
This module does the following: Checks to make sure there's a Newsgroups=0A=
header; drops Bcc and Resent-Bcc headers in the message; renames To, Cc,=0A=
Apparently-To, Resent-To, Resent-Cc, Return-Path, and Sender headers (if=0A=
present) to the same name prefixed by X-Original- since they may be=0A=
misinterpreted by e-mail software, and sets a new To header consisting of=0A=
the e-mail addresses corresponding to all the groups in the Newsgroups=0A=
header that have defined mappings. Duplicate addresses are stripped out.=0A=
=0A=
This module takes one configuration file directive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem newstomail FILENAME=0A=
=0A=
Specifies the file from which the list of newsgroup to address mappings=0A=
should be read, in the form newsgroup, whitespace, address. If the=0A=
filename ends in .db, then the file will be assumed to be a Berkeley=0A=
database instead, with newsgroups as the keys and addresses as the =
values.=0A=
=0A=
=3Dback=0A=
=0A=
Two failure messages are possible:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Missing required Newsgroups header=0A=
=0A=
The incoming message doesn't have a Newsgroups header. This module only=0A=
handles posts and needs the Newsgroups header to determine what addresses=0A=
to which to send the message.=0A=
=0A=
=3Ditem No newsgroup with a mapping=0A=
=0A=
None of the newsgroups in the Newsgroups header had a mapping to an =
e-mail=0A=
address, so there's nowhere to send the message.=0A=
=0A=
=3Dback=0A=
=0A=
This module takes no arguments.=0A=
=00=00=00Gateway-0.42/pod/UTILITY=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00100644 =00 764 =00 0 =00 =
21 6472677365 13121=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00config=0A=
mail=0A=
post=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/=
pod/mail.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00100444 =00 764 =00 0 =00 5151 6506167244 =
13514=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 mail=0A=
=0A=
This module separates out various functions related to sending mail into=0A=
their own module so that it can be autoloaded on demand rather than =
always=0A=
compiled. The following methods are included:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem mail ([ ADDRESS [, ADDRESS ...]])=0A=
=0A=
The message in its current form will be mailed to C<ADDRESS>, and the=0A=
method will return true on success, false on failure. If C<ADDRESS> is=0A=
not supplied, the message is mailed to the addresses in the standard mail=0A=
headers (To, Cc, Bcc, and the Resent-* varients depending on your MTA), =
so=0A=
this method should also be used after news to mail rewrites have taken=0A=
place.=0A=
=0A=
B<NOTE: The old mail_forward() method is DEPRECATED.>=0A=
=0A=
=3Ditem mail_bounce (ERROR)=0A=
=0A=
Bounces the message by printing C<ERROR> to stderr and then exiting with=0A=
the permanent failure status code (as defined in the beginning of the=0A=
News::Gateway source). This should only be used as a last resort,=0A=
particularly for robomoderators, since the bounces will go to the =
envelope=0A=
sender address which is often not the same as the poster.=0A=
=0A=
=3Ditem mail_error (ERROR)=0A=
=0A=
Attempts to send an error message to the sender of the original message,=0A=
cc'd to the maintainer address. Replies will be set to the maintainer=0A=
address, the subject will be "failure notice," and a Precedence header of=0A=
"junk" will be added, which can be used to avoid loops.=0A=
=0A=
If no From or Reply-To header has been seen, or if sending the mail =
fails,=0A=
this method will call mail_bounce() with the same error message instead.=0A=
=0A=
The message sent will be:=0A=
=0A=
Hi. I'm afraid that I was unable to post your message. This=0A=
is a fatal error; I've given up. A copy of this report is=0A=
being sent to my maintainer. The error message I received was:=0A=
=0A=
ERROR=0A=
=0A=
--- Below this line is a copy of the message.=0A=
=0A=
followed by the original article headers and the body, with ERROR =
replaced=0A=
by C<ERROR>. Note that if C<ERROR> should be word-wrapped in the =
message,=0A=
this must be done by the caller.=0A=
=0A=
=3Ditem mail_filereply (FILENAME [, SOURCES])=0A=
=0A=
Mails a News::FormReply-style message to the author of the incoming=0A=
message. See L<News::FormReply> for more information. C<FILENAME> is =
the=0A=
path to the file to use to construct the reply, and C<SOURCES> for=0A=
News::FormReply variables can optionally be provided. The following=0A=
variables are exposed to the form message by default:=0A=
=0A=
@BODY Message body, possibly munged by previous modules.=0A=
@HEADERS Current message headers.=0A=
@OLDHEADERS Original message headers.=0A=
$SUBJECT Original subject line.=0A=
$MAINTAINER Maintainer of this gateway.=0A=
=0A=
Returns true if sending the mail succeeded, false if it failed.=0A=
=0A=
=3Dback=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00Gateway-0.42/pod/mailtonews.pod=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 =
6167 6515057206 14760=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 mailtonews=0A=
=0A=
Performs a variety of rewrites, changes, and checks necessary to do the=0A=
basic conversion of a mail message into a news message. Most of this=0A=
involves deleting or renaming headers that a news server will not accept=0A=
or would overwrite and making sure that the required news headers are=0A=
present.=0A=
=0A=
This module does the following: Checks to ensure there is a From header;=0A=
compacts the From header down to one line if it contained any =
continuation=0A=
lines since INN can't deal with continuation lines in a From header; adds=0A=
a Newsgroups header with the default group if none is present, or checks=0A=
the Newsgroups header for validity and removes duplicate groups if one is=0A=
present; drop the headers Lines, Received, Relay-Version, and Xref which=0A=
will be rejected or overwritten by the news server; renames the headers=0A=
NNTP-Posting-Host and Sender to be prefixed with X-Original- since new=0A=
ones will be generated; adds a new Sender header pointing to the=0A=
maintainer (set in the News::Gateway constructor); renames the Message-ID=0A=
header to X-Original-Message-ID if the message ID is syntactically =
invalid=0A=
for a news message (this will cause a new message ID to be generated by=0A=
the server); checks the In-Reply-To header if present to see if it=0A=
contains something that looks like a message ID and if so adds it to the=0A=
end of the References header if and only if it doesn't duplicate the=0A=
message ID on the end of the References header; and sets the subject of=0A=
the article to the value "(none)" if there is no Subject header.=0A=
=0A=
This module takes one argument, the default newsgroup to post to. A=0A=
Newsgroups header containing this group will be added if no Newsgroups=0A=
header is present in the incoming message. This argument is optional, =
but=0A=
if you're gating mail messages to news messages you'll pretty much always=0A=
want to supply it. While it's tempting to assume that all submissions to=0A=
a moderated group will already have a Newsgroups header added by the news=0A=
server, you'll find in practice that people will often mail submissions=0A=
directly to the submission address, or that news servers won't handle=0A=
things in the way that you would expect.=0A=
=0A=
This module (possibly combined with the headers module) may be sufficient=0A=
for generating the Newsgroups header if the program only handles one=0A=
newsgroup, but any more complicated situation will probably require that =
a=0A=
module (such as the newsgroups module) be run before this one to generate=0A=
the Newsgroups header.=0A=
=0A=
There are three possible failure messages which may be returned;=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Empty body=0A=
=0A=
The body of the message was empty. Most news servers will reject =
messages=0A=
with an empty body.=0A=
=0A=
=3Ditem Missing required From header=0A=
=0A=
The incoming message doesn't have a From header. A From header is=0A=
required for all messages.=0A=
=0A=
=3Ditem No Newsgroups header or default group=0A=
=0A=
The incoming message didn't have a Newsgroups header and no argument was=0A=
supplied to the module. If you don't supply an argument specifying the=0A=
default newsgroup, all incoming messages must have a Newsgroups header=0A=
before this module is run, since a Newsgroups header is mandatory in a=0A=
news article.=0A=
=0A=
=3Dback=0A=
=0A=
This module takes no configuration directives.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/pr=
evioushop.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=001004=
44 =00 764 =00 0 =00 2213 6451704665 15154=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 =
previoushop=0A=
=0A=
Adds the previous host through which a mail message passed to the Path=0A=
header of the message. It does this by looking through the raw Received=0A=
headers, finding the first Received header that specifies a host from=0A=
which the message was received, and prepending it to the Path header (or=0A=
creating a new Path header if none already exists).=0A=
=0A=
If no Received headers that contain a "from" clause are found (which may=0A=
be the case for mail originating locally), nothing is done.=0A=
=0A=
The reason for this module is to support news to mail and mail to news=0A=
gateways for the same unmoderated newsgroup. If the mail to news address=0A=
is subscribed to a mailing list and posts to the newsgroup are sent back=0A=
to the mailing list, a loop will be created unless something is done to=0A=
stop it. One method of stopping such loops is to alias the hostname of=0A=
the mailing list machine out of the feed to the news to mail gateway in=0A=
the news server and then use this module to put the hostname of the=0A=
mailing list machine in the Path of all articles posted through the mail=0A=
to news gateway.=0A=
=0A=
This module takes no arguments or configuration directives and cannot=0A=
fail.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gate=
way-0.42/pod/post.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 4066 =
6472701665 13566=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 post=0A=
=0A=
Implements all methods related to posting articles. The following =
methods=0A=
are included:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem post ([ SERVER ])=0A=
=0A=
Posts the article using the NNTP POST command. Under most circumstances,=0A=
this is how you want to post an article. SERVER, if specified, may be=0A=
either the name or IP address of a news server to use for posting or a=0A=
reference to an open Net::NNTP connection to be used. undef is returned=0A=
on success; the error message is returned on failure.=0A=
=0A=
Before this method is called, the message headers should be rewritten =
into=0A=
ones appropriate for a news message; this is one of the purposes of the=0A=
modules.=0A=
=0A=
=3Ditem post_ihave ([ SERVER ])=0A=
=0A=
Posts the article using the NNTP IHAVE command. This connects to a news=0A=
server as a transfer server rather than as a client; under most=0A=
circumstances this is not what you want. Unless you already know what=0A=
IHAVE is, you may not want to use this. In order to use this posting=0A=
method, the article already has to have all necessary headers to be a=0A=
properly formatted news article, including Path and Message-ID; unlike=0A=
POST, IHAVE will not automatically fill in missing headers.=0A=
=0A=
As above, SERVER if specified may be either the name or IP address of a=0A=
news server to use for posting or a reference to an open Net::NNTP=0A=
connection. undef is returned on success; the error message is returned=0A=
on failure.=0A=
=0A=
=3Ditem post_program (COMMAND [, ARGUMENT ... ])=0A=
=0A=
Posts the article by running a program and passing the article to it on=0A=
stdin. This can be used to post via inews or rnews if you so wish,=0A=
although using the post() method is recommended under most circumstances.=0A=
The arguments to the command should be a list of strings; this command=0A=
does not fork a shell so shell metacharacters will not be interpreted as=0A=
such.=0A=
=0A=
If the program exits with status 0, success is assumed and this method=0A=
returns undef. If the program exits with non-zero status or some other=0A=
error occurs, this method returns the output of the program (both stdout=0A=
and stderr) and an error message. The output and error message will be=0A=
newline-terminated.=0A=
=0A=
=3Dback=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00Gateway-0.42/pod/bodyheaders.pod=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 =
3104 6450663765 15066=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 =
bodyheaders=0A=
=0A=
Extracts headers from the beginning of a message body and lifts them up=0A=
into the message headers. This is to assist posters whose software makes=0A=
it difficult for them to edit the headers of their posts or mail.=0A=
=0A=
This module looks for recognized headers at the beginning of the article=0A=
body. As long as it's seen only blank lines (possibly containing=0A=
whitespace) and recognized headers, it adds all of those headers to the=0A=
main message headers. As soon as it finds a line that isn't a recognized=0A=
header, it stops, and if it found any headers it removes everything up to=0A=
the first non-header line from the body.=0A=
=0A=
This module takes one configuration directive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem bodyheaders HEADER [HEADER ...]=0A=
=0A=
A list of headers to look for in the beginning of the body. The headers=0A=
are not case sensitive, and any amount of whitespace (including none) is=0A=
allowed after the colon.=0A=
=0A=
=3Dback=0A=
=0A=
For example, with the directive:=0A=
=0A=
bodyheaders x-no-archive=0A=
=0A=
and a message beginning with:=0A=
=0A=
x-no-archive:yes=0A=
=0A=
Comment: hello=0A=
=0A=
an X-No-Archive header with content "yes" will be added to the message=0A=
headers and the first line of the message body after this module runs =
will=0A=
be the line starting with "Comment:". Had "comment" also been listed in=0A=
the configuration directive, that header would have been lifted into the=0A=
article headers as well and this module would have continued looking.=0A=
=0A=
Whitespace on the line before the header is not allowed, and such a line=0A=
would not be recognized as a header to be lifted to the message headers.=0A=
=0A=
This module takes no arguments and cannot fail.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod=
/master.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00100444 =00 764 =00 0 =00 23525 6514447253 14112=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead1 NAME=0A=
=0A=
News::Gateway - Tools for gatewaying messages between news and mail.=0A=
=0A=
=3Dhead1 SYNOPSIS=0A=
=0A=
use News::Gateway;=0A=
my $gateway =3D News::Gateway->new (1, 'user@example.com');=0A=
$gateway->modules ('headers', mailtonews =3D> ['misc.test']);=0A=
$gateway->config_file ('/path/to/config/file');=0A=
$gateway->read (\*STDIN);=0A=
my $error =3D $gateway->apply ();=0A=
if ($error) { $gateway->error ($error) }=0A=
$error =3D $gateway->post ();=0A=
if ($error) { $gateway->error ($error) }=0A=
=0A=
=3Dhead1 DESCRIPTION=0A=
=0A=
This module is a collection of tools to allow gatewaying of mail messages=0A=
into newsgroups or vice versa. It's written to be extremely modular and=0A=
extendable, so that any modification or check of incoming messages can be=0A=
dropped in. It's intended to be usable for both a straight gateway or a=0A=
robomoderator, or even as the front end and supporting tool set for human=0A=
moderation.=0A=
=0A=
The module is intended to take input from three different sources: an=0A=
incoming message, a set of modules that contain checks or modifications =
to=0A=
be performed to that message, and a configuration file that affects the=0A=
behavior of the modules. Each module can list one or more configuration=0A=
directives that it takes, and then when those directives are encountered=0A=
in the configuration file, they're parsed and and handed off to the=0A=
module. Then, after the message has been read in, its headers and body=0A=
are given to each module in turn, so that they can perform whatever tests=0A=
and make whatever modifications they were designed to do.=0A=
=0A=
A message is represented internally as a News::Article object that each=0A=
module has access to, allowing the headers or body to be read and=0A=
manipulated.=0A=
=0A=
=3Dhead1 CONSTRUCTOR=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem new (INTERACTIVE [, MAINTAINER [, SENDER]])=0A=
=0A=
This builds a new News::Gateway object. C<INTERACTIVE> is a true/false=0A=
flag specifying whether the program is running interactively. If true,=0A=
the C<error()> method will call C<die> in the event of an error;=0A=
otherwise, it will attempt to send mail to the maintainer and the sender=0A=
of the message. C<MAINTAINER> is the e-mail address of the maintainer of=0A=
the gateway, defaulting to the user the program is running as if not=0A=
supplied. C<SENDER> is the envelope sender which should be used for all=0A=
mail sent through News::Gateway, defaulting to C<MAINTAINER> if not=0A=
supplied.=0A=
=0A=
=3Dback=0A=
=0A=
=3Dhead1 METHODS=0A=
=0A=
First, the standard methods in the order in which they are normally=0A=
called. Some of these methods, like C<modules()>, are normally called=0A=
only once, while others, like C<read()>, may be called multiple times for=0A=
multiple incoming messages. You'll almost certainly also want to read=0A=
about the C<config()>, C<config_file()>, and C<post()> directives below =
in=0A=
L<"UTILITY MODULES">.=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem modules (MODULE [ =3D> ARGUMENTS ] [, ...])=0A=
=0A=
Sets the list of modules that should be applied to each incoming message.=0A=
The list of modules is cumulative; in other words, C<modules()> can be=0A=
called multiple times to add more modules to the list of ones which will=0A=
be applied. This method both adds each supplied module name to the list=0A=
of modules that will be run if C<apply()> is called with no arguments and=0A=
sets up callbacks so that any configuration directives that C<MODULE> is=0A=
interested in will be passed along to it when configuration directives =
are=0A=
processed.=0A=
=0A=
Some modules may take arguments; if so, they can be passed in as an=0A=
anonymous array associated with the module. For example:=0A=
=0A=
$gateway->modules (mailtonews =3D> ['misc.test']);=0A=
=0A=
adds C<mailtonews> to the list of modules and passes in C<misc.test> as =
an=0A=
argument to it.=0A=
=0A=
Modules will be run in the order they are given to C<modules()>.=0A=
=0A=
C<modules()> should always be called before any call to C<apply()>,=0A=
C<config()>, or C<config_file()> that those modules are supposed to=0A=
affect.=0A=
=0A=
=3Ditem read (SOURCE [, MAXSIZE [, MAXHEAD]])=0A=
=0A=
Reads in a new message from the supplied source, which can be a file =
name,=0A=
a file handle, or even an anonymous sub which will be called repeatedly=0A=
for each line of the message until it returns undef. C<MAXSIZE>, if=0A=
given, specifies the maximum size in bytes of the article body, and=0A=
C<MAXHEAD>, if given, specifies the maximum size in bytes of the article=0A=
headers. C<MAXSIZE> defaults to 256KB and C<MAXHEAD> defaults to 8KB.=0A=
=0A=
This method returns the total number of bytes read if successful, or =
undef=0A=
in the case of an error.=0A=
=0A=
This method constructs a new News::Article object and calls its method, =
so=0A=
it will always support essentially the same arguments as the =
corresponding=0A=
News::Article C<read()> method.=0A=
=0A=
=3Ditem apply (MODULES)=0A=
=0A=
This method hands the message off to each module given (if no modules are=0A=
given, the message is given to each module registered by C<modules()> in=0A=
the order in which they were given to C<modules()>) and lets them do=0A=
whatever they wish with the article. If a module returns undef, it's=0A=
presumed to be successful and the message is given to the next module. =
If=0A=
a module returns a string, it's considered to be a failure message and=0A=
C<apply()> stops.=0A=
=0A=
If all modules succeed, C<apply()> returns undef or the empty list. If a=0A=
module fails, C<apply()> returns a list consisting of the module which=0A=
failed and the message it failed with in a list context; or a string=0A=
consisting of the name of the module, a colon, a space, and the message =
it=0A=
failed with in a scalar context.=0A=
=0A=
The calling script should then look at the failure message and take the=0A=
appropriate action.=0A=
=0A=
=3Dback=0A=
=0A=
The following additional methods are also supplied, some of which are=0A=
mostly intended for internal use.=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem error (ERROR)=0A=
=0A=
Handles a fatal error. If the C<INTERACTIVE> flag passed to C<new()> was=0A=
true, this method just calls C<die> with the error message. Otherwise, =
it=0A=
calls C<mail_error()> (part of the standard C<mail> module), which=0A=
attempts to mail the maintainer and the sender of the message. If that=0A=
fails, for whatever reason, News::Gateway calls C<exit> with the right=0A=
status code for a mail bounce.=0A=
=0A=
This method should be used B<only> for fatal, unrecoverable errors,=0A=
particularly when C<INTERACTIVE> isn't true, since it could bounce mail =
or=0A=
notify the wrong person of problems. It's a last resort that goes to=0A=
great lengths to try to keep the message from being lost.=0A=
=0A=
=3Ditem get_article ()=0A=
=0A=
An accessor method that returns the underlying News::Article object.=0A=
=0A=
=3Ditem set_article (ARTICLE)=0A=
=0A=
Takes a News::Article object and makes that the underlying message in =
that=0A=
instance of News::Gateway, discarding the old one if any.=0A=
=0A=
=3Dback=0A=
=0A=
=3Dhead1 REWRITE MODULES=0A=
=0A=
The following modules to perform checks or rewrites of messages are part=0A=
of the standard distribution. To use them with a News::Gateway object,=0A=
pass them (along with anonymous arrays for their options, if any) to the=0A=
C<modules()> method.=0A=
=0A=
@@ rewrite: This section is automatically generated from pod/*.pod=0A=
=0A=
=3Dhead1 UTILITY MODULES=0A=
=0A=
The following modules are also part of the standard distribution. Rather=0A=
than rewrite or check messages, they provide additional methods that can=0A=
be used by programs, other modules, even or the News::Gateway core code.=0A=
Methods supplied by utility modules can be called like any other=0A=
News::Gateway method.=0A=
=0A=
@@ utility: This section is automatically generated from pod/*.pod=0A=
=0A=
=3Dhead1 DIAGNOSTICS=0A=
=0A=
In addition to the failure messages generated by modules (listed above),=0A=
the following messages may be generated by the News::Gateway core code =
and=0A=
would be passed to the C<error()> method.=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Autoload of %s failed: %s=0A=
=0A=
A method was called that doesn't exist in the core code and was unable to=0A=
be loaded from a module. Chances are you made a typo when referring to a=0A=
News::Gateway method.=0A=
=0A=
=3Ditem Cannot open file %s: %s=0A=
=0A=
News::Gateway attempted to open a file (probably the configuration file)=0A=
and failed for the given reason.=0A=
=0A=
=3Ditem Unable to load %s: %s=0A=
=0A=
One of the modules (either rewrite or utility) you used requires an=0A=
external Perl module and was unable to load it.=0A=
=0A=
=3Ditem Unknown module %s=0A=
=0A=
You told C<modules()> to load a module that has no hooks registered.=0A=
News::Gateway has to know about every module that it can use; you can't=0A=
just copy in a new module with the others and have it work. Instead, put=0A=
the module in the F<modules> directory before the build process.=0A=
=0A=
=3Dback=0A=
=0A=
=3Dhead1 BUGS=0A=
=0A=
Many. This is an B<alpha> release, with all that's implied by that in=0A=
terms of bugs, interface instability, and other such concerns. Use at=0A=
your own risk, but if you encounter a bug please let me know. Patches in=0A=
particular are gratefully accepted.=0A=
=0A=
=3Dhead1 NOTES=0A=
=0A=
If you are interested in being notified of new releases, helping with=0A=
development, developing, testing, or using new modules, or even just=0A=
getting tips on how to use this module, there is a mailing list =
available.=0A=
To subscribe, send mail to majordomo@eyrie.org with:=0A=
=0A=
subscribe gateway-users=0A=
=0A=
in the body.=0A=
=0A=
New patches and modules are always welcome, whether from people on the=0A=
list or not, and can be mailed to the address listed below.=0A=
=0A=
=3Dhead1 SEE ALSO=0A=
=0A=
L<News::Article>=0A=
=0A=
=3Dhead1 AUTHOR=0A=
=0A=
Russ Allbery E<lt>rra@stanford.eduE<gt>.=0A=
=0A=
=3Dhead1 HISTORY=0A=
=0A=
News::Gateway started as a simple mail to news Perl script, written right=0A=
after the cs.utexas.edu mail to news gateway closed and just a quick hack=0A=
for the use of people who had previously used that gateway to post to=0A=
rec.arts.comics.creative and alt.comics.lnh. Over time, it became a=0A=
general mail to news gateway with a fairly broad set of features.=0A=
=0A=
Eventually, it became obvious that it really B<should> have been a module=0A=
rather than a script, and it also became clear that it could be used as=0A=
the core of a robomoderator. Since there was no real general-purpose=0A=
robomoderation software around that was nearly as flexible as I thought a=0A=
package B<should> be, I decided to be ambitious and try to solve the=0A=
general problem.=0A=
=0A=
Then I took a complete detour to rewrite the entire thing again to use=0A=
Andrew Gierth's News::Article class, which is what I should have been=0A=
doing from the beginning. And now, finally, it's getting closer to what=0A=
I'd envisioned.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.=
42/pod/crosspost.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00100444 =00 764 =00 0 =00 5044 6450652124 14624=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 crosspost=0A=
=0A=
Limits crossposting and followups. This module takes, in some ways, the=0A=
opposite approach from the newsgroups module; rather than listing=0A=
newsgroups which are allowed, it allows one to set a limit on the number=0A=
of groups crossposted, on the number of groups to which followups would=0A=
go, and on which groups can be crossposted to or to which followups can =
be=0A=
directed.=0A=
=0A=
A group can be excluded from the Newsgroups header or from the =
Followup-To=0A=
header in one of two ways; either messages posted to that group or=0A=
messages that direct followups to a set of newsgroups including that =
group=0A=
can be rejected, or that group can be silently removed from the =
Newsgroups=0A=
and/or Followup-To headers. The latter behavior is generally not=0A=
recommended for robomoderators, since moderators are generally =
discouraged=0A=
to make decisions about where posts should be posted for the poster.=0A=
Returning the post and asking the poster to choose a more appropriate set=0A=
of groups is generally a better approach.=0A=
=0A=
This module will remove a Followup-To header (and not add one) if its=0A=
content is/would be identical to the Newsgroups header.=0A=
=0A=
This module takes the following configuration directives:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem crosspost max COUNT=0A=
=0A=
Reject any message crossposted to more than C<COUNT> newsgroups.=0A=
=0A=
=3Ditem crosspost remove|reject GROUP=0A=
=0A=
Either remove C<GROUP> silently from the Newsgroups header if present or=0A=
reject all articles crossposted to C<GROUP>.=0A=
=0A=
=3Ditem followup max COUNT=0A=
=0A=
Reject any messages that would direct followups to more than C<COUNT>=0A=
newsgroups, bearing in mind that if no Followup-To header is present,=0A=
followups would go to all groups in the Newsgroups header.=0A=
=0A=
=3Ditem followup remove|reject GROUP=0A=
=0A=
Either remove C<GROUP> silently from the followups if present or reject=0A=
all articles crossposted to C<GROUP>.=0A=
=0A=
=3Dback=0A=
=0A=
This module may return one of the following failure messages:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Invalid crosspost to %s=0A=
=0A=
The message was crossposted to a group mentioned in a C<crosspost reject>=0A=
directive.=0A=
=0A=
=3Ditem Followups would go to %s=0A=
=0A=
Followups to the message would go to a group mentioned in a C<followup=0A=
reject> directive.=0A=
=0A=
=3Ditem Excessively crossposted=0A=
=0A=
The message was crossposted to more groups than allowed by a C<crosspost=0A=
max> directive.=0A=
=0A=
=3Ditem Followups would go to too many groups=0A=
=0A=
Followups to the message would go to more groups than allowed by a=0A=
C<followup max> directive.=0A=
=0A=
=3Dback=0A=
=0A=
This module works with a Newsgroups header, so if other modules need to =
be=0A=
applied to construct the Newsgroups header, they should run before this=0A=
one. This module takes no arguments.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00Gateway-0.42/pod/REWRITE=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00100644 =00 764 =00 0 =00 232 =
6506375365 13114=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00anykeyword=0A=
bodyheaders=0A=
cleanbody=0A=
crosspost=0A=
headers=0A=
keywords=0A=
mailpath=0A=
mailtonews=0A=
moosesign=0A=
mungeids=0A=
newsgroups=0A=
newstomail=0A=
nobinaries=0A=
previoushop=0A=
whitelist=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00Gateway-0.42/pod/config.pod=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =
=00 6763 6514447703 14051=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 config=0A=
=0A=
This module contains the code for reading and parsing configuration=0A=
directives and calling the appropriate module callback hooks. Nearly all=0A=
News::Gateway programs will make use of this module.=0A=
=0A=
B<WARNING>: Information in configuration directives is B<trusted> by=0A=
modules, and modules may go so far as to eval things from configuration=0A=
directives as Perl code. This means that anyone who has access to the=0A=
configuration directives read by this module has as much control over =
what=0A=
a program does as someone who can edit the source. Any necessary sanity=0A=
or security checking on the content of configuration directives must be=0A=
done B<before> they are passed off to modules, and C<config_file()> does=0A=
no such checking.=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem config (DIRECTIVE, ARGUMENT [, ARGUMENT ...])=0A=
=0A=
Calls the registered module callbacks for all modules who have expressed=0A=
an interest in C<DIRECTIVE>. This bypasses any parsing, and the =
arguments=0A=
are given to the callbacks exactly as passed in. C<DIRECTIVE> is=0A=
case-insensitive.=0A=
=0A=
=3Ditem config_file (FILE | HANDLE)=0A=
=0A=
Reads in configuration directives from the supplied file name or file=0A=
handle (which can be either an object reference or a reference to a=0A=
typeglob) until end of file is reached.=0A=
=0A=
Blank lines and lines beginning with a C<#> are ignored. All other lines=0A=
are parsed into a directive (the first whitespace-separated word) and =
some=0A=
number of arguments, and then the parse results are passed along to the=0A=
module which has registered interest in that directive. If an argument=0A=
contains embedded whitespace, it can be enclosed in double quotes. A=0A=
backslash will escape the next character, whatever it is. A line is=0A=
considered to be continued on the next line if it ends in a backslash, =
and=0A=
if the line continuation occurs inside double quotes, a literal newline=0A=
will be part of the string.=0A=
=0A=
For example, the following configuration directive tells the C<headers>=0A=
module to add a new header named X-Comment with the content "This is a=0A=
long comment about this newsgroup":=0A=
=0A=
header x-comment add \=0A=
"This is a long comment about this newsgroup"=0A=
=0A=
Multiple configuration files can be read by calling C<config_file()>=0A=
multiple times. One handy trick for simple scripts using News::Gateway =
is=0A=
to put the configuration lines at the end of the script after an __END__=0A=
and then pass them to News::Gateway with:=0A=
=0A=
$gateway->config_file (\*DATA);=0A=
=0A=
C<config_file()> should be called before any C<apply()> it is supposed to=0A=
affect.=0A=
=0A=
=3Ditem config_line (LINE)=0A=
=0A=
Parses and handles a single configuration line, just as if it were read=0A=
from a file (in fact, C<config_file()> calls this method for each=0A=
non-blank, non-comment line). This can be used to feed individual=0A=
configuration lines to the News::Gateway object without having to give it=0A=
a file or file handle.=0A=
=0A=
=3Ditem config_parse (LINE)=0A=
=0A=
Parses a configuration file line, returning the results as an array. =
This=0A=
is the method used by C<config_file()> and C<config_line()> to parse=0A=
configuration files. This probably isn't generally useful.=0A=
=0A=
=3Dback=0A=
=0A=
These methods adds two additional fatal error messages, which may be=0A=
passed to C<error()>.=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Parse error in %s=0A=
=0A=
A configuration line was unable to be parsed. The most likely cause is=0A=
unbalanced double quotes.=0A=
=0A=
=3Ditem Unknown configuration directive %s=0A=
=0A=
News::Gateway encountered a configuration directive that no module had=0A=
expressed interest in. Chances are you made a typo in your configuration=0A=
file or forgot to register a module with C<modules()> that you were=0A=
planning on using.=0A=
=0A=
=3Dback=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/pod/headers.pod=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 =
764 =00 0 =00 5754 6514454201 14205=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead2 headers=0A=
=0A=
This module implements some general header rewriting functions, including=0A=
adding, dropping, and renaming headers and replacing header contents. It=0A=
takes one configuration directive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem header HEADER FUNCTION [ CONTENT ]=0A=
=0A=
Specify an action on the header C<HEADER>. C<FUNCTION> can be any of the=0A=
following: drop deletes a header, rename renames the original header to=0A=
X-Original-HEADER retaining the same value, ifempty adds a header with=0A=
content C<CONTENT> if and only if the message doesn't already contain a=0A=
header C<HEADER>, replace replaces all existing C<HEADER> headers with =
one=0A=
containing C<CONTENT>, prepend adds C<CONTENT> to the beginning of the=0A=
first header C<HEADER> or creates a new header C<HEADER> with content=0A=
C<CONTENT> if none already exists, and reject returns an error if=0A=
C<HEADER> is present in the incoming message.=0A=
=0A=
C<CONTENT> can contain various special variables: C<$n> will be replaced=0A=
with the name of the running program, C<$v> will be replaced with the=0A=
version of News::Gateway, and C<$i> will be replaced with a unique=0A=
identifier formed from the current time and the process ID. C<$$> will =
be=0A=
replaced with C<$>, so to put a literal dollar sign in a header, you=0A=
should use C<$$>.=0A=
=0A=
=3Dback=0A=
=0A=
For example, suppose you have a configuration file with the following=0A=
directives:=0A=
=0A=
header organization add SNAP=0A=
header message-id rename=0A=
header sender drop=0A=
header comment replace $n $v=0A=
header subject ifempty no subject (thread id $i)=0A=
=0A=
and suppose you have an incoming message with the headers:=0A=
=0A=
Organization: Restaurant Reviews=0A=
Message-ID: <123142@bar.org>=0A=
Sender: foo@bar.org=0A=
Comment: Hello=0A=
Comment: Hello again=0A=
=0A=
After the headers module runs, the message will have a header of:=0A=
=0A=
Organization: Restaurant Reviews=0A=
Organization: SNAP=0A=
X-Original-Message-ID: <123142@bar.org>=0A=
Comment: PROGRAM VERSION=0A=
Subject: no subject (thread id ID)=0A=
=0A=
where C<PROGRAM> is the name of the running program (ie, C<$0>),=0A=
C<VERSION> is the version of News::Gateway, and C<ID> is a unique=0A=
identifier as described above.=0A=
=0A=
This module may fail and call error() with the following message while=0A=
reading the configuration directives:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Unknown header rewrite action %s=0A=
=0A=
A rewrite action was specified that isn't among those that are supported.=0A=
This probably indicates a typo.=0A=
=0A=
=3Dback=0A=
=0A=
This module may fail in one way:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem Invalid header %s=0A=
=0A=
A header that was associated with a reject action in a configuration=0A=
directive was present in the incoming message. Note that the header will=0A=
be given in all lowercase.=0A=
=0A=
=3Dback=0A=
=0A=
As a side note, if you're constructing a robomoderator for a newsgroup,=0A=
dropping or renaming the Path header in incoming messages is highly=0A=
recommended. It turns out that some news servers will add a Path header=0A=
with their hostname B<before> remailing the message to a moderator, and =
if=0A=
you keep that Path header when you post, the article will never propagate=0A=
back to the site of the original poster.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/=
modules/=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00 40755 =00 764 =00 0 =00 0 =
6515062266 12655=00 =
5=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/module=
s/newstomail.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =
=00 764 =00 0 =00 5406 6506354436 15460=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# newstomail.al -- =
Translate news articles into e-mail. -*- perl -*-=0A=
# $Id: newstomail.al,v 0.1 1998/03/26 04:27:10 eagle Exp $=0A=
#=0A=
# Copyright 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['newstomail']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# Takes one argument, which specifies a file of newsgroup to e-mail =
address=0A=
# mappings.=0A=
sub newstomail_conf {=0A=
my ($self, $directive, $mapping) =3D @_;=0A=
my $split =3D sub { split (' ', $_[0], 2) };=0A=
$$self{newstomail} =3D $self->hash_open ($mapping, $split)=0A=
or $self->error ("Can't open mapping file $mapping: $!");=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Take the incoming news article and rewrite it into a mail message,=0A=
# removing or renaming those headers that may cause a problem in a mail=0A=
# system.=0A=
sub newstomail_mesg {=0A=
my $self =3D shift;=0A=
my $article =3D $$self{article};=0A=
=0A=
# Make sure that we have a Newsgroups header. If not, we reject.=0A=
my $newsgroups =3D $article->header ('newsgroups');=0A=
unless ($newsgroups) { return 'Missing required Newsgroups header' }=0A=
=0A=
# Now, pass through the Newsgroups header, adding addresses to which=0A=
# we're going to send this post. If we don't end up finding any=0A=
# mappings, we reject the message.=0A=
my @newsgroups =3D split (/\s*,\s*/, $newsgroups);=0A=
my @addresses;=0A=
for (@newsgroups) {=0A=
my $address =3D $$self{newstomail}{$_};=0A=
push (@addresses, $address) if $address;=0A=
}=0A=
unless (@addresses) { return 'No newsgroup with a mapping' }=0A=
my %seen;=0A=
@addresses =3D grep { !$seen{$_}++ } @addresses;=0A=
=0A=
# We need to rename any header that could possibly be taken to be a=0A=
# recipient address, so as not to confuse our mailer. qmail also=0A=
# assigns special meaning to Return-Path, and we're going to insert =
our=0A=
# own Sender header. We drop the Bcc lines instead of renaming them,=0A=
# since that seems more consistent with the Bcc semantics.=0A=
$article->drop_headers (qw(bcc resent-bcc));=0A=
for (qw(to cc apparently-to resent-to resent-cc return-path sender)) =
{=0A=
$article->rename_header ($_, "x-original-$_", 'add');=0A=
}=0A=
$article->set_headers (sender =3D> $$self{maintainer});=0A=
=0A=
# Add a To header pointing to our addresses.=0A=
$article->set_headers (to =3D> join (', ', @addresses));=0A=
=0A=
# All done, return success.=0A=
return undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
Gateway-0.42/modules/mailtonews.al=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00100444 =00 764 =00 0 =00 11605 6515057112 15465=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# mailtonews.al -- =
Translate e-mail into a news article. -*- perl -*-=0A=
# $Id: mailtonews.al,v 0.13 1998/04/15 07:14:18 eagle Exp $=0A=
#=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: []=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Option settings=0A=
#########################################################################=
###=0A=
=0A=
# We take one option, the newsgroup to post to if there is no Newsgroups=0A=
# header in the original message.=0A=
sub mailtonews_init {=0A=
my $self =3D shift;=0A=
$$self{mailtonews} =3D shift;=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Munge a mail message into a news article. This involves making a =
variety=0A=
# of header changes, dropping headers that the news server won't accept =
in=0A=
# posts, adding a Newsgroups header if one doesn't exist, and ensuring =
that=0A=
# all required headers are present. Note that we *don't* enforce RFC =
1036=0A=
# compliance in the From header; this is a conscious design decision =
since=0A=
# some groups may not want this. It should be done in another module.=0A=
sub mailtonews_mesg {=0A=
my $self =3D shift;=0A=
my $article =3D $$self{article};=0A=
=0A=
# Make sure that we have a From header. If not, we reject this =
article.=0A=
# We also turn any newlines in the From header into spaces, since=0A=
# otherwise INN may reject the article incorrectly.=0A=
my $from =3D $article->header ('from')=0A=
or return 'Missing required From header';=0A=
if ($from =3D~ tr/\n/ /) { $article->set_headers (from =3D> $from) }=0A=
=0A=
# Make sure the body isn't empty. If it is, we reject this article.=0A=
if ($article->lines () =3D=3D 0) { return 'Empty body' }=0A=
=0A=
# Ensure that we have a valid Newsgroups header. If we don't have =
one,=0A=
# add one with the default group; otherwise, strip out whitespace and=0A=
# extra commas from the one we have and remove any duplicate groups =
or=0A=
# groups that don't match /^[\w.+-]+$/.=0A=
my $newsgroups =3D $article->header ('newsgroups');=0A=
if ($newsgroups) {=0A=
my %seen;=0A=
my @groups =3D split (/(?:\s*,\s*)+/, $newsgroups);=0A=
@groups =3D grep { not $seen{$_}++ } grep { /^[\w.+-]+$/ } =
@groups;=0A=
$newsgroups =3D join (',', @groups);=0A=
}=0A=
unless ($newsgroups) {=0A=
$newsgroups =3D $$self{mailtonews} if defined $$self{mailtonews};=0A=
}=0A=
return 'No Newsgroups header or default group' unless $newsgroups;=0A=
$article->set_headers (newsgroups =3D> $newsgroups);=0A=
=0A=
# Drop headers that the news server would refuse rename a few others=0A=
# which are worth saving.=0A=
$article->drop_headers (qw(lines received relay-version xref));=0A=
for (qw(nntp-posting-host sender)) {=0A=
$article->rename_header ($_, "x-original-$_", 'add');=0A=
}=0A=
=0A=
# Add a sender header giving the maintainer address, since this is =
the=0A=
# entity responsible for introducing the message into the news =
system.=0A=
$article->set_headers (sender =3D> $$self{maintainer});=0A=
=0A=
# Check the mail message ID and see if it looks reasonable. If not,=0A=
# rename it so that we'll generate our own. Note that news servers =
may=0A=
# reject message IDs with a trailing period, so don't allow them. =
This=0A=
# is not a complete check; a complete check should really use the =
code=0A=
# from INN and needs more than a simple regex.=0A=
my $id =3D $article->header ('message-id');=0A=
$article->rename_header ('message-id', 'x-original-message-id', =
'add')=0A=
if ($id && $id !~ /^<[^\s\@>]+\@[^\s.>]+(\.[^.\s>]+)+>$/);=0A=
=0A=
# Many mail clients put the message ID of the message being replied =
to=0A=
# in the In-Reply-To header and just carry References over. We=0A=
# therefore try to extract a message ID out of the In-Reply-To header=0A=
# and append it to the References line if it isn't already there. =
This=0A=
# is a hack, but I think it's a necessary one. This regex probably=0A=
# still isn't quite what we want. We don't refold the References =
header=0A=
# here. We probably should.=0A=
$id =3D $article->header ('in-reply-to');=0A=
if ($id && $id =3D~ /(<[^\s\@>]+\@[^\s.>]+(\.[^.\s>]+)+>)/) {=0A=
$id =3D $1;=0A=
my $references =3D $article->header ('references');=0A=
if (!$references) {=0A=
$article->set_headers (references =3D> $id);=0A=
} elsif ((split (' ', $references))[-1] ne $id) {=0A=
$references .=3D ' ' . $id;=0A=
$article->set_headers (references =3D> $references);=0A=
}=0A=
}=0A=
=0A=
# Make sure we have a subject line; if the message didn't have one, =
we=0A=
# add a default one of "(none)" and special-case this later on.=0A=
$article->set_headers (subject =3D> '(none)')=0A=
unless ($article->header ('subject'));=0A=
=0A=
# We succeeded, so return undef.=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gate=
way-0.42/modules/mail.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00100444 =00 764 =00 0 =00 7642 6514175304 =
14216=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# mail.al -- =
Forward or reply to a submission. -*- perl -*-=0A=
# $Id: mail.al,v 0.4 1998/04/12 17:32:51 eagle Exp $=0A=
#=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Methods=0A=
#########################################################################=
###=0A=
=0A=
# Mail the article to someone. If no address is supplied, we use the=0A=
# addresses given in the message. This is just a wrapper around a=0A=
# News::Article method. Returns true on success, false on failure.=0A=
sub mail {=0A=
my ($self, @addresses) =3D @_;=0A=
if (@addresses) {=0A=
$$self{article}->mail (@addresses);=0A=
} else {=0A=
$$self{article}->mail ();=0A=
}=0A=
}=0A=
=0A=
# The old way. THIS IS DEPRECATED!!=0A=
sub mail_forward {=0A=
my $self =3D shift;=0A=
$self->mail (@_);=0A=
}=0A=
=0A=
# Actually bounces the message. Don't do this except as a last resort.=0A=
sub mail_bounce {=0A=
my ($self, $error) =3D @_;=0A=
warn "$error\n";=0A=
exit $FAILCODE;=0A=
}=0A=
=0A=
# Used to handle some sort of fatal internal error. This should *not* be=0A=
# used for errors in a post; rather, this is for local configuration =
errors,=0A=
# local system errors, and the like. We attempt to generate a reply, =
giving=0A=
# them back their original message and the error message, and if we're=0A=
# unable to we bounce their message.=0A=
sub mail_error {=0A=
my ($self, $error) =3D @_;=0A=
my $article =3D $$self{article} or $self->mail_bounce ($error);=0A=
my $to =3D $article->header ('reply-to') || $article->header ('from')=0A=
or $self->mail_bounce ($error);=0A=
my $reply =3D new News::Article;=0A=
$reply->set_headers (to =3D> $to,=0A=
cc =3D> $$self{maintainer},=0A=
'reply-to' =3D> $$self{maintainer},=0A=
subject =3D> 'failure notice',=0A=
precedence =3D> 'junk');=0A=
$reply->envelope ($$self{envelope}) if defined $$self{envelope};=0A=
$reply->set_body (split (/\n/, <<"EOR"), '');=0A=
Hi. I'm afraid that I was unable to post your message. This is a fatal=0A=
error; I've given up. A copy of this report is being sent to my=0A=
maintainer. The error message I received was:=0A=
=0A=
$error=0A=
=0A=
--- Below this line is a copy of the message.=0A=
EOR=0A=
$reply->add_body ("Return-Path: <$ENV{SENDER}>") if $ENV{SENDER};=0A=
$reply->add_body (scalar ($$self{article}->rawheaders ()), '');=0A=
$reply->add_body (scalar $$self{article}->body ());=0A=
$reply->mail ();=0A=
exit 0;=0A=
}=0A=
=0A=
# Generates a reply from a template in a file. Takes the file name as an=0A=
# argument and then a list of sources of variables (either references to=0A=
# hashes or references to code). In addition, the following variables =
will=0A=
# be made available to the template:=0A=
#=0A=
# @BODY The message body, possibly munged by previous modules.=0A=
# @HEADERS The current message headers.=0A=
# @OLDHEADERS The original message headers.=0A=
# $SUBJECT The original subject line.=0A=
# $MAINTAINER The maintainer of this gateway.=0A=
#=0A=
# Returns true if sending the mail succeeded, undef on failure.=0A=
sub mail_filereply {=0A=
my $self =3D shift;=0A=
my $filename =3D shift;=0A=
eval { require News::FormReply };=0A=
if ($@) { $self->error ("Unable to load News::FormReply: $@") }=0A=
my $article =3D $$self{article};=0A=
my $source =3D {=0A=
BODY =3D> scalar ($article->body ()),=0A=
HEADERS =3D> [ $article->headers () ],=0A=
OLDHEADERS =3D> scalar ($article->rawheaders ()),=0A=
SUBJECT =3D> $article->header ('subject'),=0A=
MAINTAINER =3D> $$self{maintainer}=0A=
};=0A=
my $reply =3D News::FormReply->new ($article, $filename, $source, @_)=0A=
or $self->error ("Unable to generate reply from $filename");=0A=
$reply->envelope ($$self{envelope}) if defined $$self{envelope};=0A=
$reply->set_headers (precedence =3D> 'junk');=0A=
$reply->mail ();=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/mod=
ules/hash.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00100444 =00 764 =00 0 =00 3444 6506377744 14230=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# hash.al -- =
Methods to read hashes from files. -*- perl -*-=0A=
# $Id: hash.al,v 0.1 1998/03/26 07:12:36 eagle Exp $=0A=
#=0A=
# Copyright 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Methods=0A=
#########################################################################=
###=0A=
=0A=
# Opens a hash file, returning a reference to a hash. Takes in a file =
name=0A=
# as an argument. If this file name ends in .db, we load DB_File and =
tie a=0A=
# hash to the file. Otherwise, we take the file to be a text file and =
read=0A=
# it in a line at a time. In this case, we use our second argument; if=0A=
# defined, it's taken to be an anonymous sub that will split each line =
apart=0A=
# into a key and then a list of values. Otherwise, the entire line is =
taken=0A=
# to be the key and the value will be the number of times that key is =
seen.=0A=
# We return undef if we're unable to open the file, and the error will =
be in=0A=
# $!.=0A=
sub hash_open {=0A=
my ($self, $file, $split) =3D @_;=0A=
my %hash;=0A=
if ($file =3D~ /\.db$/) {=0A=
eval { require DB_File };=0A=
if ($@) { $self->error ("Unable to load DB_File: $@") }=0A=
tie (%hash, 'DB_File', $file) or return undef;=0A=
} else {=0A=
open (HASH, "< $file") or return undef;=0A=
local $_;=0A=
my ($key, @rest);=0A=
while (<HASH>) {=0A=
chomp;=0A=
if (defined $split) {=0A=
($key, @rest) =3D &$split ($_);=0A=
$hash{$key} =3D (@rest =3D=3D 1) ? $rest[0] : [ @rest ];=0A=
} else {=0A=
$hash{$_}++;=0A=
}=0A=
}=0A=
close HASH;=0A=
}=0A=
return \%hash;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/=
modules/nobinaries.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=001004=
44 =00 764 =00 0 =00 5504 6450503403 15412=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# nobinaries.al -- =
Detect and reject binary files. -*- perl -*-=0A=
# $Id: nobinaries.al,v 0.2 1997/12/25 16:17:07 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: []=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Attempt to detect and reject all binaries. This code is derived from=0A=
# George Theall's purge-binaries script. The following metrics are used =
in=0A=
# making this determination:=0A=
#=0A=
# * Any message with a Content-Type containing the strings =
"application",=0A=
# "audio", "image", or "video" is rejected, whether the header is in =
the=0A=
# headers or in the body of the message.=0A=
# * Any message with a Content-Transfer-Encoding of "base64" is =
rejected,=0A=
# whether the header is in the headers or in the body.=0A=
# * Any message with at least 50% encoded lines and at least 40 lines,=0A=
# where encoded lines are defined as lines beginning with M and =
either=0A=
# 60 or 61 characters long (optionally indented or quoted) or lines=0A=
# containing no spaces and between 59 and 80 characters long.=0A=
#=0A=
# Eventually, this really should be smarter about multipart posts....=0A=
sub nobinaries_mesg {=0A=
my $self =3D shift;=0A=
my $article =3D $$self{article};=0A=
=0A=
# Check the transfer encoding.=0A=
return 'base64 encoded'=0A=
if (lc $article->header ('content-transfer-encoding') eq =
'base64');=0A=
=0A=
# Check the content type in the main article headers.=0A=
my $type =3D $article->header ('content-type');=0A=
return 'Invalid content type'=0A=
if ($type =3D~ /(application|audio|image|video)/i);=0A=
=0A=
# Now, scan the body line by line, counting possibly encoded lines, =
and=0A=
# reject the message if they exceed the above parameters or if we=0A=
# encounter a Content-Type header in the body with a bad type (or a=0A=
# Content-Transfer-Encoding header with a bad type).=0A=
my ($lines, $uulines, $mimelines) =3D (0, 0, 0);=0A=
for (@{scalar $$self{article}->body ()}) {=0A=
$lines++;=0A=
if (/^Content-Type:\s+(application|audio|image|video)/i) {=0A=
return 'Invalid content type';=0A=
} elsif (/^Content-Transfer-Encoding:\s+base64/i) {=0A=
return 'base64 encoded';=0A=
} elsif (/^(\s|>|:)*M.{60,61}\s*$/) {=0A=
$uulines++;=0A=
} elsif (/^[^M~]\S{59,80}\s*$/) {=0A=
$mimelines++;=0A=
}=0A=
}=0A=
if ($lines >=3D 40 && $uulines / $lines > 0.5) {=0A=
return 'Apparently uuencoded';=0A=
} elsif ($lines >=3D 40 && $mimelines / $lines > 0.5) {=0A=
return 'Apparently base64-encoded';=0A=
}=0A=
=0A=
# Looks like it isn't a binary! Yay!=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/modules/mailpath.al=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 =
0 =00 10340 6473234421 15100=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# mailpath.al -- =
Generates an X-Mail-Path from Received. -*- perl -*-=0A=
# $Id: mailpath.al,v 0.6 1998/02/20 08:04:33 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
# Based heavily on code by Andrew Gierth <andrew@erlenstar.demon.co.uk>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: []=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Munge the received lines of the original message into an X-Mail-Path=0A=
# header and then remove them from the final article. This is probably=0A=
# always going to be a work in progess since no RFC specifies the precise=0A=
# syntax for relaying comments and sites would probably ignore them =
anyway.=0A=
#=0A=
# Needs to be able to cope with:=0A=
#=0A=
# Received: from foobar (really [1.2.3.4]) by...=0A=
# Received: from foobar (foobar.baz.com [1.2.3.4]) by...=0A=
# Received: from foobar ([1.2.3.4]) by...=0A=
# Received: from foobar by...=0A=
# (peer crosschecked as: foobar.baz.com [1.2.3.4])=0A=
# Received: from foobar by...=0A=
# (peer crosschecked as: [1.2.3.4])=0A=
# Received: from foobar.baz.com (1.2.3.4) by...=0A=
# Received: from foobar.baz.com (@1.2.3.4) by...=0A=
# Received: from foobar.baz.com (something@1.2.3.4) by...=0A=
# Received: from foobar.baz.com (HELO foobar) (1.2.3.4) by...=0A=
# Received: from unknown (HELO foobar) (1.2.3.4) by...=0A=
# Received: from foobar.baz.com [1.2.3.4] by...=0A=
# Received: from foobar by...=0A=
#=0A=
# The above headers would be transformed respectively to:=0A=
#=0A=
# foobar[1.2.3.4]=0A=
# foobar.baz.com=0A=
# foobar[1.2.3.4]=0A=
# foobar.baz.com=0A=
# foobar[1.2.3.4]=0A=
# foobar.baz.com=0A=
# foobar.baz.com=0A=
# something@foobar.baz.com=0A=
# foobar.baz.com=0A=
# foobar[1.2.3.4]=0A=
# foobar.baz.com[1.2.3.4]=0A=
# foobar[UNTRUSTED]=0A=
#=0A=
# The envelope sender is then added as the rightmost element.=0A=
sub mailpath_mesg {=0A=
my $self =3D shift;=0A=
my (@path, $element);=0A=
=0A=
# Build the list of path elements from the Received headers using =
lots=0A=
# of black magic regexes.=0A=
for (@{scalar $$self{article}->rawheaders ()}) {=0A=
undef $element;=0A=
/^Received: \s+ from \s+ # Required token=0A=
([\w.@-]+)? \s* # Identified host name =
(1)=0A=
(?:=0A=
(?:\(HELO\ (\S+)\) \s*)? # qmail HELO argument (2)=0A=
\((?: # First comment after =
host=0A=
(?:=0A=
(?:(\S*)\@)? # ident information (3)=0A=
(\d+\.\d+\.\d+\.\d+) # qmail IP address (4)=0A=
) |=0A=
(?:=0A=
really | # No real host name=0A=
([\w.@-]+) # The real host name (5)=0A=
\ )?=0A=
\[(\d+\.\d+\.\d+\.\d+)\] # The IP address (6)=0A=
)=0A=
| # Alternately....=0A=
\[(\d+\.\d+\.\d+\.\d+)\] # The IP address (7)=0A=
|=0A=
.* \(peer\ crosschecked\ as: \s+ # UUNet relay machines=0A=
(?:([\w.@-]+)\s+)? # The real host name (8)=0A=
\[(\d+\.\d+\.\d+\.\d+)\] # The IP address (9)=0A=
)?=0A=
/ixs or next;=0A=
$element =3D $8, next if $8;=0A=
$element =3D $1 . "[$9]", next if $9;=0A=
$element =3D $3 . '@' . $1, next if ($4 and $3 and $1 ne =
'unknown');=0A=
$element =3D $1, next if ($4 and $1 ne 'unknown');=0A=
$element =3D $2 . "[$4]", next if ($4 and $2);=0A=
$element =3D $4, next if $4;=0A=
$element =3D $5, next if ($5 and index ($5, '.') > 0);=0A=
$element =3D $1 . "[$6]", next if $6;=0A=
$element =3D $1 . "[$7]", next if $7;=0A=
$element =3D $1 . '[UNTRUSTED]' if $1;=0A=
} continue {=0A=
push (@path, $element) if $element;=0A=
}=0A=
=0A=
# Add the envelope sender to the end of the path if there is one,=0A=
# otherwise add a note that we don't know.=0A=
push (@path, $$self{article}->envelope () || 'UNKNOWN');=0A=
=0A=
# Add the X-Mail-Path header.=0A=
$$self{article}->add_headers ('x-mail-path' =3D> join ('!', @path));=0A=
=0A=
# Return success.=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/modules/moosesign.al=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 =
0 =00 3001 6447727272 15274=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# moosesign.al -- =
Sign a post with PGPMoose. -*- perl -*-=0A=
# $Id: moosesign.al,v 0.2 1997/12/23 12:29:46 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['pgpkey']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directive=0A=
#########################################################################=
###=0A=
=0A=
# We support a pgpkey directive giving the name of the newsgroup, the=0A=
# passphrase, to use for signing posts to that newsgroup, and the key ID=0A=
# (which is optional and defaults to the name of the newsgroup =
surrounded by=0A=
# spaces).=0A=
sub moosesign_conf {=0A=
my ($self, $direct, $newsgroup, @args) =3D @_;=0A=
$$self{moosesign}{$newsgroup} =3D [ @args ];=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# This is a simple implementation of PGPMoose, which only signs the post =
for=0A=
# every group we have a key for and doesn't attempt to do anything =
regarding=0A=
# crossposts.=0A=
sub moosesign_mesg {=0A=
my $self =3D shift;=0A=
for (split (/,/, $$self{article}->header ('newsgroups'))) {=0A=
if ($$self{moosesign}{$_}) {=0A=
$$self{article}->sign_pgpmoose ($_, =
@{$$self{moosesign}{$_}});=0A=
}=0A=
}=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/modules/keywords.al=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =
=00 5422 6424161304 15130=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# keywords.al -- =
Check for required subject line keywords. -*- perl -*-=0A=
# $Id: keywords.al,v 0.4 1997/10/24 18:02:44 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['keywords']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Option settings=0A=
#########################################################################=
###=0A=
=0A=
# We take a single optional argument which, if present, is a reference =
to an=0A=
# anonymous sub that, when given a subject line, returns a list of all of=0A=
# the keywords present. This allows the user of this module to write=0A=
# arbitrary code to define what a keyword is.=0A=
sub keywords_init {=0A=
my $self =3D shift;=0A=
$$self{keywords}{code} =3D shift;=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# Our single directive takes a file of acceptable keywords.=0A=
sub keywords_conf {=0A=
my ($self, $directive, $keywords) =3D @_;=0A=
open (KEYWORDS, $keywords)=0A=
or $self->error ("Can't open keywords file $keywords: $!");=0A=
local $_;=0A=
while (<KEYWORDS>) {=0A=
chomp;=0A=
$$self{keywords}{valid}{lc $_} =3D 1;=0A=
}=0A=
close KEYWORDS;=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post checks=0A=
#########################################################################=
###=0A=
=0A=
# The default routine to extract keywords from a subject line. We =
support=0A=
# the forms:=0A=
#=0A=
# KEYWORD:=0A=
# KEYWORD/KEYWORD:=0A=
# [KEYWORD]=0A=
# [KEYWORD/KEYWORD]=0A=
# [KEYWORD][KEYWORD]=0A=
#=0A=
# by default.=0A=
sub keywords_parse {=0A=
my $subject =3D shift;=0A=
($subject) =3D ($subject =3D~ /^(?:Re: )*(\S+)/);=0A=
my @keywords;=0A=
my ($keywords) =3D ($subject =3D~ /^\[(\S+)\]$/);=0A=
if ($keywords) {=0A=
@keywords =3D split (/\/|\]\[/, $keywords);=0A=
} else {=0A=
($keywords) =3D ($subject =3D~ /^(\S+):$/);=0A=
return () unless $keywords;=0A=
@keywords =3D split ('/', $keywords);=0A=
}=0A=
@keywords;=0A=
}=0A=
=0A=
# Check the subject line of the article to make sure it contains one of =
the=0A=
# acceptable keywords.=0A=
sub keywords_mesg {=0A=
my ($self) =3D @_;=0A=
my $subject =3D $$self{article}->header ('subject');=0A=
my @keywords;=0A=
if ($$self{keywords}{code}) {=0A=
@keywords =3D &{$$self{keywords}{code}} ($subject);=0A=
} else {=0A=
@keywords =3D keywords_parse ($subject);=0A=
}=0A=
unless (@keywords) { return "No keywords found" }=0A=
for (@keywords) {=0A=
unless ($$self{keywords}{valid}{lc $_}) {=0A=
return "Invalid keyword '$_'";=0A=
}=0A=
}=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/modules/mungeids.al=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 =
0 =00 7724 6514450124 15104=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# mungeids.al -- =
Munge message IDs for better threading. -*- perl -*-=0A=
# $Id: mungeids.al,v 0.5 1998/04/13 17:50:12 eagle Exp $=0A=
#=0A=
# Copyright 1998 by Russ Allbery <rra@stanford.edu>=0A=
# Based on code by Christopher Davis <ckd@loiosh.kei.com>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['mungeids']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# We take a single optional directive that gives a list of regexes of =
groups=0A=
# to used in the message ID munge. Regexes are expected to begin and end=0A=
# with / (to be consistent with how we specify regexes elsewhere), and =
they=0A=
# can have the standard regex flags. This means that *we trust supplied=0A=
# regexes to be used as Perl code*!=0A=
sub mungeids_conf {=0A=
my ($self, $directive, @masks) =3D @_;=0A=
for (@masks) {=0A=
my $glob =3D eval "sub { \$_[0] =3D~ $_ }";=0A=
if ($@) { $self->error ("Invalid regex $_: $@") }=0A=
push (@{$$self{mungeids}}, $glob);=0A=
}=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Munge the Message-ID header and all message IDs in the References =
header=0A=
# to begin with the newsgroup name to which they were posted and a /. =
This=0A=
# is so that the same message sent to multiple lists won't cause =
collisions,=0A=
# so that two gateways of the same list to different groups won't =
collide,=0A=
# and so that despite the fact that we're changing the incoming message =
IDs=0A=
# from what other people on the list will see, messages should hopefully=0A=
# still thread.=0A=
#=0A=
# Since the mailtonews module does magic with In-Reply-To to migrate =
things=0A=
# into References, it should run first; we don't deal with In-Reply-To =
here.=0A=
# We also want to already have the Newsgroups header.=0A=
sub mungeids_mesg {=0A=
my $self =3D shift;=0A=
=0A=
# Figure out what prefix to use, filtering the groups through the=0A=
# patterns set in our configuration directive if any.=0A=
my @prefix =3D split (/,/, $$self{article}->header ('newsgroups'));=0A=
if ($$self{mungeids}) {=0A=
@prefix =3D grep {=0A=
my $group =3D $_;=0A=
(grep { &$_ ($group) } @{$$self{mungeids}}) ? $group : ()=0A=
} @prefix;=0A=
}=0A=
return undef unless @prefix;=0A=
my $prefix =3D join ('/', (sort @prefix), '');=0A=
=0A=
# Fix up the message ID, generating one if we don't have one.=0A=
my $messageid =3D $$self{article}->header ('message-id');=0A=
if ($messageid) {=0A=
$messageid =3D~ s%^<(?:[a-z0-9_+-]+\.[a-z0-9_+.-]+/)*%<$prefix%;=0A=
$$self{article}->set_headers ('message-id' =3D> $messageid);=0A=
} else {=0A=
$$self{article}->add_message_id ($prefix);=0A=
}=0A=
=0A=
# Munge all message IDs in the References header which weren't =
already=0A=
# munged, if there is such a header. Note that we have to then fold =
the=0A=
# References header since there is often a line length limit on =
headers=0A=
# in the news server.=0A=
#=0A=
# When adding our prefix, we also strip away anything that looks =
like a=0A=
# prefix (anything that looks like a newsgroup name followed by a =
slash)=0A=
# to prevent a thread posted separately to several groups both using =
ID=0A=
# munging from acquiring more prefixes each followup.=0A=
my $references =3D $$self{article}->header ('references');=0A=
if ($references) {=0A=
my @references =3D split (' ', $references);=0A=
my $length =3D 4;=0A=
$references =3D '';=0A=
for (@references) {=0A=
s%^<(?:[a-z0-9_+-]+\.[a-z0-9_+.-]+/)*%<$prefix%;=0A=
$length +=3D 1 + length $_;=0A=
$references .=3D ($length < 72 ? ' ' : "\n\t") . $_;=0A=
$length =3D length $_ if ($length >=3D 72);=0A=
}=0A=
$references =3D~ s/^\s+//;=0A=
$$self{article}->set_headers (references =3D> $references);=0A=
}=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/mod=
ules/newsgroups.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =
=00 764 =00 0 =00 60350 6514623626 15530=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# newsgroups.al -- =
Logic to build Newsgroups header. -*- perl -*-=0A=
# $Id: newsgroups.al,v 0.12 1998/04/14 09:08:37 eagle Exp $=0A=
#=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
#=0A=
# You don't want to understand what this module does. You really don't.=0A=
# Trust me. It will make your head explode. Just go happily along with=0A=
# your life, tell this module what group your script is gatewaying for, =
tell=0A=
# it as much as you can about what addresses correspond to what groups =
your=0A=
# script should be posting to, let it work its magic, and try not to =
think=0A=
# about it too hard.=0A=
#=0A=
# Really. I'm serious.=0A=
#=0A=
# You're still reading? You poor, doomed fool....=0A=
#=0A=
# The problem that this module is trying to solve is hard. In fact, =
it's a=0A=
# good bit harder than one would expect on first inspection.=0A=
#=0A=
# We have an incoming mail message and we have to decide what newsgroups =
to=0A=
# post it too. We want to crosspost the message between multiple groups =
if=0A=
# we can figure out how to do so from the mail headers (this is an=0A=
# insolvable problem in the general case, but we can handle several =
specific=0A=
# cases of it). We also, however, have to deal with messages that have a=0A=
# Newsgroups header already in them, and the various things that could =
mean.=0A=
#=0A=
# So.=0A=
#=0A=
# We have the following pieces of information at our disposal:=0A=
#=0A=
# * The group for which we in particular are a mail to news gateway or=0A=
# robomoderator. We get that information from the argument we're =
given,=0A=
# since our script should know that information. Knowing this is=0A=
# fundamental to the design of this algorithm; the theory is that we =
will=0A=
# figure out in our script, either from a command line argument passed =
to=0A=
# us by sendmail or from the envelope recipient, what specific group =
this=0A=
# invocation of the script corresponds to, and this module will receive=0A=
# that information through its required argument.=0A=
#=0A=
# * The visible addressees of the message (the To and Cc headers) and=0A=
# mappings between addresses and newsgroups we've been told about in =
our=0A=
# configuration file directives.=0A=
#=0A=
# * The Newsgroups header of the incoming message, which can mean various=0A=
# things (see the discussion below).=0A=
#=0A=
# The design goals of the following approach are two-fold: To crosspost=0A=
# whenever possible rather than multiposting, and to try to never =
generate=0A=
# duplicate posts even though we may get duplicate mail messages.=0A=
#=0A=
# We start by building a list of newsgroups to which we think the message=0A=
# should go, based on the To and Cc headers. The order of this list is=0A=
# significant; we always iterate through the addresses in the To header =
and=0A=
# then through the addresses in the Cc header (and rely on the assumption=0A=
# that MTAs won't be changing the order of those fields, a hopefully good=0A=
# assumption).=0A=
#=0A=
# If that list is non-empty, there is no Newsgroups header already, and =
the=0A=
# group for which we are a mail to news gateway is the first group on =
that=0A=
# list, then we use that list as our Newsgroups header. This handles the=0A=
# simple case of a message sent directly to the mail to news gateway=0A=
# address, and it also handles crossposting.=0A=
#=0A=
# If instead the group with which we're specifically associated occurs in=0A=
# that list but *isn't* the first newsgroup, then we return an error.=0A=
# Specifically, we return "Not primary instance", and a script using this=0A=
# module will probably want to exit silently if we return that message.=0A=
# This is because we assume that all of the mail to news gateways that we=0A=
# have been told about are going to be handled by us, and in particular =
some=0A=
# instance of our script will get the mail sent to the address that =
resolves=0A=
# to the first newsgroup in the list we built. That instance of the =
script=0A=
# will do the crossposting, so all other instances of the script that get=0A=
# the mail sent to the other addresses we recognized need to exit =
silently=0A=
# to avoid multiposting.=0A=
#=0A=
# If there's no Newsgroups header and the group for which we're a mail to=0A=
# news gateway isn't in that list (either because the list is empty or=0A=
# because it's composed only of other groups), then either we didn't=0A=
# recognize its address (because it's hidden behind an alias or mailing =
list=0A=
# or what have you) or it was Bcc'd. In either case, we should post the=0A=
# message just to the group we're associated with.=0A=
#=0A=
# If there is a Newsgroups header in the article, it could mean several=0A=
# different things. It could mean that the article was posted to a=0A=
# moderated group and was therefore never actually posted but instead was=0A=
# sent by mail to the moderator (which may be us). It could mean that =
the=0A=
# article was posted to those newsgroups and cc'd to a mail to news =
gateway=0A=
# (us). It could also mean that the original message was just a reply =
to a=0A=
# news posting sent via e-mail to a mail to news gateway with a client =
that=0A=
# includes the Newsgroups header on e-mail replies to posted articles, =
and=0A=
# that it was never posted anywhere and the Newsgroups header was=0A=
# meaningless.=0A=
#=0A=
# Unfortunately, disambiguating these reasons is very hard, and in one =
case=0A=
# impossible.=0A=
#=0A=
# If the Newsgroups header contains only one group and that group is the=0A=
# group for which we are a mail to news gateway or if the groups in the=0A=
# Newsgroups header are a (possibly improper) subset of the list of=0A=
# newsgroups built from the To and Cc headers and our address/newsgroup=0A=
# correspondances, then we ignore the supplied Newsgroups header and =
follow=0A=
# the exact same logic as we would if a Newsgroups header weren't present=0A=
# (see above for the details).=0A=
#=0A=
# If our associated group is in neither the Newsgroups header nor the =
list=0A=
# built from the To and Cc headers, post only to it.=0A=
#=0A=
# Now we come to the hard cases; the Newsgroups header is either a =
superset=0A=
# of the groups found from To and Cc addresses or those two sets have=0A=
# neither a subset nor a superset relationship. In general, there are=0A=
# multiple possible interpretations in these cases and we aren't going =
to be=0A=
# able to unambiguously decide. We have to take our best guess.=0A=
#=0A=
# The most common case here is where someone crossposted to a moderated=0A=
# group without doing anything odd with e-mail Cc's; in that case, our=0A=
# associated group will be the only group in the list built from the To =
and=0A=
# Cc headers, and we should use the supplied Newsgroups header. We also =
use=0A=
# the supplied Newsgroups header if we don't recognize any of the =
addresses=0A=
# in the To and Cc headers, or if the newsgroup we're associated with is =
in=0A=
# the Newsgroups header and doesn't occur in the list of groups built =
from=0A=
# the To and Cc headers.=0A=
#=0A=
# If the To and Cc headers contain addresses corresponding to groups in =
the=0A=
# Newsgroups header, but none of them correspond to our associated group,=0A=
# then we actually want to return the "Not primary instance" error. The=0A=
# reason for this is that obviously our address was either Bcc'd or =
hidden=0A=
# behind an address that we didn't recognize, but we're going to get=0A=
# multiple copies (since we're going to get copies from those To and Cc=0A=
# addresses that we recognize). So we're going to step back and let one =
of=0A=
# those other addresses do the posting, since otherwise we'd end up doing=0A=
# the same thing in both cases and have a duplicate posting. Note that =
this=0A=
# assumes that each address in the To and Cc headers will get a copy of =
the=0A=
# message *which is not necessarily true*. But we're screwed any way we =
try=0A=
# to disambiguate this, and hopefully we won't bite anyone who's not =
trying=0A=
# to be strange.=0A=
#=0A=
# Finally, if none of the above cases apply, split the newsgroups found =
from=0A=
# mappings of addresses in the To and Cc headers into two sections; the=0A=
# newsgroups also present in the Newsgroups header and the ones not also=0A=
# present. If our associated group is the first group in the first =
section=0A=
# (the groups also found in the Newsgroups header), post using the =
supplied=0A=
# Newsgroups header. If our associated group is the first group in the=0A=
# second section (the groups not found in the Newsgroups header), post to=0A=
# the list of groups in the second group. Otherwise, return "Not primary=0A=
# instance."=0A=
#=0A=
# Implicit in that last paragraph is a trust of the Newsgroups header =
over=0A=
# the list of groups built from recognizing the To and Cc headers. This =
is=0A=
# because we have to deal with moderation, where the Newsgroups header=0A=
# preserves the original intended crosspost if one of the groups posted =
to=0A=
# was moderated. If we eventually use a different method of =
encapsulating=0A=
# messages sent to moderated groups, we can stop paying any attention at =
all=0A=
# to a supplied Newsgroups header in a mail message. (Thank heaven, and =
may=0A=
# that day come soon.)=0A=
#=0A=
# If a Newsgroups header is supplied and we don't post to those groups, =
we=0A=
# rename it to X-Original-Newsgroups to preserve that information in case=0A=
# someone cares.=0A=
#=0A=
# Now, finally, we have one more issue to deal with. The message ID.=0A=
# (What, you thought we were done? Ah, innocence....)=0A=
#=0A=
# We want to preserve the message ID if at all possible, since it =
contains=0A=
# information that people find valuable. (People may score up their own=0A=
# posts, want to killfile any followups to posts by a particular person, =
and=0A=
# similar sorts of things, and maintaining message IDs allows this to be=0A=
# done with *much* less overhead and maintenance of state.) On the other=0A=
# hand, despite the lengths to which we're going to try to crosspost=0A=
# properly, there are still several cases in which we're going to be=0A=
# multiposting. If we do multipost, each post except one is going to =
have=0A=
# to have a new message ID generated for it, since otherwise the news =
server=0A=
# is going to reject our posts as duplicates.=0A=
#=0A=
# The rule is this: Rename the Message-ID header (causing a new message =
ID=0A=
# to be generated) if there's a Newsgroups header the groups in it and =
the=0A=
# groups to which we're posting are disjoint sets, or if there is no=0A=
# Newsgroups header and the groups to which we're posting and the set of=0A=
# groups formed from analyzing the To and Cc headers are disjoint sets. =
The=0A=
# former will catch those cases where the message was both posted and=0A=
# e-mailed to a mail to news gateway or where we're splitting the message=0A=
# into two posts. The latter means that the crosspost between the =
groups in=0A=
# the To and Cc headers gets the original message ID and new message IDs =
are=0A=
# generated for any other posts generated by the same message.=0A=
#=0A=
# After all of that analysis, we're still not handling several obvious=0A=
# cases. For example, if all of the copies of a given message don't go =
to=0A=
# the identical same script using this module, the message ID renaming =
can=0A=
# break down badly (the obvious case is where the same message was sent =
via=0A=
# e-mail to the moderation submission addresses of two different =
moderated=0A=
# groups, neither of which know of each other, and both of them attempt =
to=0A=
# preserve the message ID). E-mail clients that include the Newsgroups=0A=
# header of the message to which they are responding can cause the =
response=0A=
# (if gated back through a mail to news gateway) to be much more widely=0A=
# crossposted than the author intended, since the Newsgroups header is=0A=
# trusted due to the needs of moderation. If someone both posts and =
mails=0A=
# their post to a mail to news gateway for one of the groups they posted =
to,=0A=
# we're probably going to end up with a duplicate message.=0A=
#=0A=
# It's worth bearing in mind that attempting to retain the message ID is =
a=0A=
# very controversial decision, and the subject for quite a bit of debate =
in=0A=
# the past on the moderators' mailing list. I'm one of those people who=0A=
# sets score rules based on the message IDs generated by my newsreader =
when=0A=
# I post, and therefore I'm a strong proponent of preserving the message =
ID.=0A=
# Preserving the message ID is *not* the correct *technical* decision,=0A=
# however; mail message IDs do not have the uniqueness guarantee =
required by=0A=
# the news RFCs, and they can lead to collisions in cases such as that=0A=
# described above. Caveat emptor; if you wish to take the more =
technically=0A=
# correct approach and always generate new message IDs, use the headers=0A=
# module and rename or drop the Message-ID header on all incoming =
articles.=0A=
#=0A=
# Note that the mailtonews module, which should be used in conjunction =
with=0A=
# this module, handles renaming the Message-ID header if the mail message=0A=
# ID is invalid for news.=0A=
#=0A=
# Oh, and if any MTAs along the way drop or change the order of the =
headers=0A=
# we're worried about (To, Cc, and Newsgroups), or if the addresses in =
the=0A=
# To and Cc headers aren't actually getting copies of the message, we're=0A=
# doomed. None of our assumptions are valid, all of this could break, =
and I=0A=
# wash my hands of the entire situation.=0A=
#=0A=
# And if that weren't enough, this module *also*, if using a supplied=0A=
# Newsgroups header, checks the groups contained in it to make sure that=0A=
# they're all groups we're allowed to crosspost to. This is why, in=0A=
# addition to having directives to associate addresses or address =
patterns=0A=
# with groups, we also have directives just listing newsgroups or =
newsgroup=0A=
# patterns, which indicate that it's permitted to crosspost to those =
groups=0A=
# but that we don't handle an address associated with them.=0A=
=0A=
# @@ Interface: ['group']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Option settings=0A=
#########################################################################=
###=0A=
=0A=
# We take one argument, the newsgroup this instance of the gateway is=0A=
# associated with. Note that it will be necessary to set this argument=0A=
# differently according to the address via which the message arrived. =
This=0A=
# means that either the envelope recipient has to be available to and=0A=
# analyzed by the script, or each separate mail-to-news address will =
have to=0A=
# pass the script a command line argument specifying what newsgroup that=0A=
# instance of the script should be associated with.=0A=
sub newsgroups_init {=0A=
my $self =3D shift;=0A=
$$self{newsgroups}{main} =3D shift;=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# Takes a pattern in the form /<regex>/ and transforms it into an =
anonymous=0A=
# sub that takes one argument and returns true in a scalar context if the=0A=
# regex matches that argument and false otherwise. In an array context, =
the=0A=
# anonymous sub returns the list of substrings matched by parens, just =
like=0A=
# with a normal match, so this can potentially be used to extract =
newsgroups=0A=
# out of an address eventually. This is not currently implemented in the=0A=
# rest of this module. Returns a ref to the anonymous sub. We will be =
able=0A=
# to get rid of this sub once we require a version of Perl with compiled=0A=
# regex support.=0A=
sub newsgroups_glob {=0A=
my ($self, $regex) =3D @_;=0A=
$regex =3D substr ($regex, 1, -1);=0A=
my $glob =3D eval "sub { \$_[0] =3D~ /$regex/ }";=0A=
if ($@) { $self->error ("Invalid regex /$regex/: $@") }=0A=
$glob;=0A=
}=0A=
=0A=
# We take four forms of group directives designating which groups we are=0A=
# allowed to crosspost to:=0A=
#=0A=
# group <newsgroup> [<address> | /<pattern>/]=0A=
# group /<pattern>/=0A=
# group <file> /<pattern>/=0A=
#=0A=
# The first adds just that particular group and associates any address =
found=0A=
# in the To or Cc headers that matches <address> or <pattern> with that=0A=
# group. The second allows crossposts from all groups matching <pattern>=0A=
# and the third allows crossposts to all groups listed in the file <file>=0A=
# that match <pattern>. The newsgroup is presumed to be the first=0A=
# whitespace-separated word on each line of <file>, so <file> can be an=0A=
# active file or newsgroups file (for example).=0A=
sub newsgroups_conf {=0A=
my ($self, @args);=0A=
($self, undef, @args) =3D @_;=0A=
=0A=
# If we haven't already initialized our data structure, do so now.=0A=
# groups is a hash with each group to which crossposting is allowed=0A=
# entered as a key. addresses is a hash associating literal =
addresses=0A=
# with groups. patterns and grouplist are parallel arrays; patterns =
are=0A=
# anonymous pattern match subs associated with the corresponding =
group=0A=
# in grouplist. Finally, masks are anonymous pattern match subs=0A=
# specifying newsgroups to which we can crosspost. patterns can't =
be a=0A=
# hash because a pattern is a code ref.=0A=
unless (exists $$self{newsgroups}{groups}) {=0A=
$$self{newsgroups}{groups} =3D {};=0A=
$$self{newsgroups}{addresses} =3D {};=0A=
$$self{newsgroups}{patterns} =3D [];=0A=
$$self{newsgroups}{grouplist} =3D [];=0A=
$$self{newsgroups}{masks} =3D [];=0A=
}=0A=
=0A=
# Now we have to figure out what sort of argument we've been given. =
If=0A=
# the first argument ends with a /, we assume it's a pattern.=0A=
# Otherwise, if the first argument starts with a /, we assume it's a=0A=
# file containing a list of groups. If neither of those is true, but=0A=
# the second argument begins with a /, we assume it's a single =
newsgroup=0A=
# associated with an address pattern. Finally, if none of the above =
are=0A=
# true, we assume it's a newsgroup, possibly associated with a =
literal=0A=
# address. For all mail addresses, we standardize on lowercase.=0A=
if ($args[0] =3D~ m%/$%) {=0A=
my $glob =3D $self->newsgroups_glob ($args[0]);=0A=
push (@{$$self{newsgroups}{masks}}, $glob);=0A=
} elsif ($args[0] =3D~ m%^/%) {=0A=
my $groups =3D $$self{newsgroups}{groups};=0A=
my $glob =3D $self->newsgroups_glob ($args[1]);=0A=
open (GROUPS, "$args[0]")=0A=
or $self->error ("Can't open group file $args[0]: $!");=0A=
local $_;=0A=
while (<GROUPS>) {=0A=
my ($group) =3D split (' ', $_);=0A=
$$self{newsgroups}{groups}{$_} =3D 1 if &$glob ($group);=0A=
}=0A=
close GROUPS;=0A=
} else {=0A=
my $group =3D $args[0];=0A=
if (index ($args[1], '/') =3D=3D 0) {=0A=
my $glob =3D $self->newsgroups_glob (lc $args[1]);=0A=
push (@{$$self{newsgroups}{patterns}}, $glob);=0A=
push (@{$$self{newsgroups}{grouplist}}, $group);=0A=
} elsif ($args[1]) {=0A=
$$self{newsgroups}{addresses}{lc $args[1]} =3D $group;=0A=
}=0A=
$$self{newsgroups}{groups}{$group} =3D 1;=0A=
}=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post checks=0A=
#########################################################################=
###=0A=
=0A=
# Rename both the Newsgroups and the Message-ID headers to=0A=
# X-Original-<header>.=0A=
sub newsgroups_orig {=0A=
my $article =3D $_[0]{article};=0A=
$article->rename_header ('message-id', 'x-original-message-id');=0A=
$article->rename_header ('newsgroups', 'x-original-newsgroups');=0A=
}=0A=
=0A=
# Now, we try to implement the logic described in the comment at the=0A=
# beginning of this file, which I won't repeat here.=0A=
sub newsgroups_mesg {=0A=
my $self =3D shift;=0A=
=0A=
# If they didn't tell us a primary newsgroup, bitch at them.=0A=
$self->error ('newsgroups module missing required argument')=0A=
unless $$self{newsgroups}{main};=0A=
=0A=
# In the following, @newsgroups are the groups in the existing=0A=
# Newsgroups header, if any; @mailgroups are the groups from the To =
and=0A=
# Cc headers; and @groups are the groups we're actually going to post=0A=
# to.=0A=
my (@newsgroups, @mailgroups, @groups);=0A=
my $article =3D $$self{article};=0A=
my $main =3D $$self{newsgroups}{main};=0A=
=0A=
# What newsgroups did we get on an incoming Newsgroups line?=0A=
@newsgroups =3D split (/(?:\s*,\s*)+/, $article->header =
('newsgroups'));=0A=
=0A=
# What newsgroups did we get in the mail To/Cc headers? This code =
is a=0A=
# bit hard to read unless you're a LISP person. The second map =
breaks=0A=
# things up so that we're dealing with one address at a time, and the=0A=
# first map tries to find an associated group. This code has a =
*lot* of=0A=
# problems still; it breaks down massively given the presence of =
commas=0A=
# in comment fields in addresses. We badly need real RFC 822 =
parsing,=0A=
# not only for this but for lots of other things too.=0A=
@mailgroups =3D map {=0A=
my ($address) =3D /<(\S+)>/;=0A=
($address) =3D split unless $address;=0A=
my $group =3D ($$self{newsgroups}{addresses}{lc $address});=0A=
unless (defined $group) {=0A=
my $patterns =3D $$self{newsgroups}{patterns};=0A=
my $grouplist =3D $$self{newsgroups}{grouplist};=0A=
my $index;=0A=
for ($index =3D 0; $index < @$patterns; $index++) {=0A=
if (&{$$patterns[$index]} (lc $address)) {=0A=
$group =3D $$grouplist[$index];=0A=
last;=0A=
}=0A=
}=0A=
}=0A=
defined $group ? ($group) : ();=0A=
} map {=0A=
split /(?:\s*,\s*)+/=0A=
} $article->header ('to'), $article->header ('cc');=0A=
=0A=
# Now we start on the hard work. Let's deal with the most =
pathological=0A=
# case first, namely the case where we have a Newsgroups header.=0A=
if (@newsgroups) {=0A=
my %newsgroups =3D map { $_ =3D> 1 } @newsgroups;=0A=
=0A=
# This is *really* confusing.=0A=
#=0A=
# After the first loop below, we'll have two more arrays. =
@common=0A=
# will contain all the newsgroups in common between @mailgroups =
and=0A=
# @newsgroups, and @extra will contain all the groups in =
@mailgroups=0A=
# and not in @newsgroups. $seen will be true if $main was found =
in=0A=
# @mailgroups and will contain the index into either @common or=0A=
# @extra where $main can be found.=0A=
#=0A=
# If $main is in neither @mailgroups nor @newsgroups, the first=0A=
# case, then rename Message-ID and Newsgroups and post to $main.=0A=
#=0A=
# If $main is in @mailgroups but isn't the first element of the=0A=
# array it's in, then we aren't the primary instance.=0A=
#=0A=
# @newsgroups =3D=3D @common is the case where @newsgroups is a =
subset=0A=
# of @mailgroups. If this is the case, we post to @mailgroups =
iff=0A=
# $main is the first entry. (Note that !$seen && =
$newsgroups{$main}=0A=
# implies @newsgroups !=3D @common, so we know $seen must be =
true in=0A=
# this case.)=0A=
#=0A=
# Finally, if @newsgroups is not a subset of @mailgroups, we =
post to=0A=
# either @newsgroups or @extra depending on which set $main is =
in,=0A=
# and we rename Message-ID and Newsgroups if posting to @extra.=0A=
# (Unless our associated group isn't in @mailgroups but there are=0A=
# other groups in @mailgroups that are in @newsgroups, in which =
case=0A=
# we let the instance that receives mail at one of the addresses =
we=0A=
# recognize handle the posting.)=0A=
my (@common, @extra, $seen);=0A=
for (@mailgroups) {=0A=
my $array =3D $newsgroups{$_} ? \@common : \@extra;=0A=
push (@$array, $_);=0A=
$seen =3D @$array if ($_ eq $main && !$seen);=0A=
}=0A=
if (!$seen && !$newsgroups{$main}) {=0A=
@groups =3D ($main);=0A=
$self->newsgroups_orig ();=0A=
} elsif ($seen > 1 || (!$seen && @common)) {=0A=
return 'Not primary instance';=0A=
} elsif (@newsgroups !=3D @common) {=0A=
@groups =3D $newsgroups{$main} ? @newsgroups : @extra;=0A=
$self->newsgroups_orig () unless $newsgroups{$main};=0A=
} elsif ($main eq $mailgroups[0]) {=0A=
@groups =3D @mailgroups;=0A=
} else {=0A=
return 'Not primary instance';=0A=
}=0A=
} else {=0A=
my %mailgroups =3D map { $_ =3D> 1 } @mailgroups;=0A=
=0A=
# Now for the case where we don't have a Newsgroups header. =
This is=0A=
# thankfully simpler. If $main isn't in @mailgroups, post only =
to=0A=
# it and rename headers. Otherwise, post to @mailgroups iff =
$main=0A=
# is the first element.=0A=
if ($mailgroups{$main}) {=0A=
return 'Not primary instance' unless ($mailgroups[0] eq =
$main);=0A=
@groups =3D @mailgroups;=0A=
} else {=0A=
@groups =3D ($main);=0A=
$self->newsgroups_orig ();=0A=
}=0A=
}=0A=
=0A=
# We have the list of groups to which we want to post. Now we need =
to=0A=
# make sure we're allowed to post to them all. (We could save =
ourselves=0A=
# some work here under some circumstances if we could keep track of=0A=
# whether @groups came just from @mailgroups or not, but it's too =
much=0A=
# hassle and doesn't take long here to just check again.)=0A=
GROUP:=0A=
for (@groups) {=0A=
next if $$self{newsgroups}{groups}{$_};=0A=
my $mask;=0A=
for $mask (@{$$self{newsgroups}{masks}}) {=0A=
next GROUP if &$mask ($_);=0A=
}=0A=
return "Invalid crossposted group $_";=0A=
}=0A=
=0A=
# All done. Set the Newsgroups header and return success.=0A=
$article->set_headers (newsgroups =3D> join (',', @groups));=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00Gateway-0.42/modules/whitelist.al=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 2772 =
6407121041 15275=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# whitelist.al -- =
Check the From line against valid posters. -*- perl -*-=0A=
# $Id: whitelist.al,v 0.4 1997/09/15 02:49:05 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['whitelist']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# Our single directive takes a file that contains a list of acceptable=0A=
# posters.=0A=
sub whitelist_conf {=0A=
my ($self, $directive, $whitelist) =3D @_;=0A=
open (WHITELIST, $whitelist)=0A=
or $self->error ("Can't open whitelist file $whitelist: $!");=0A=
local $_;=0A=
while (<WHITELIST>) {=0A=
chomp;=0A=
$$self{whitelist}{lc $_} =3D 1;=0A=
}=0A=
close WHITELIST;=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post checks=0A=
#########################################################################=
###=0A=
=0A=
# Check the address in the From line of the article against the list of=0A=
# valid posters.=0A=
sub whitelist_mesg {=0A=
my ($self) =3D @_;=0A=
my $from =3D $$self{article}->header ('from');=0A=
my ($address) =3D ($from =3D~ /<(\S+)>/);=0A=
($address) =3D split (' ', $from) unless $address;=0A=
unless ($$self{whitelist}{lc $address}) {=0A=
return "Unknown poster $address";=0A=
}=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00Gateway-0.42/modules/previoushop.al=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 2407 =
6451704145 15652=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# previoushop.al =
-- Adds the previous mail hop to the Path. -*- perl -*-=0A=
# $Id: previoushop.al,v 0.1 1997/12/29 11:24:21 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: []=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Message rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Troll through the raw Received headers and find the first one that=0A=
# specifies a hostname (in the form "from hostname"). Extract hostname =
and=0A=
# add it to the Path header. This is for unmoderated groups that have =
both=0A=
# news to mail and mail to news gateways, to avoid creating loops.=0A=
sub previoushop_mesg {=0A=
my $self =3D shift;=0A=
my $host;=0A=
for (@{scalar $$self{article}->rawheaders ()}) {=0A=
/^Received: \s+ from \s+ ([\w.@-]+)/ixs or next;=0A=
$host =3D $1;=0A=
last;=0A=
}=0A=
if ($host) {=0A=
my $path =3D $$self{article}->header ('path');=0A=
$path =3D $path ? "$host!$path" : $host;=0A=
$$self{article}->set_headers (path =3D> $path);=0A=
}=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00G=
ateway-0.42/modules/post.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00100444 =00 764 =00 0 =00 6324 6472676661 =
14274=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# post.al -- =
Methods to post articles. -*- perl -*-=0A=
# $Id: post.al,v 0.1 1998/02/19 00:32:49 eagle Exp $=0A=
#=0A=
# Copyright 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Methods=0A=
#########################################################################=
###=0A=
=0A=
# Post the message through NNTP. Returns undef if posting succeeds and =
the=0A=
# error message if it fails.=0A=
sub post {=0A=
my ($self, $server) =3D @_;=0A=
=0A=
# If a server is provided and isn't a Net::NNTP connection, open one.=0A=
if ($server && !ref $server) {=0A=
eval { require Net::NNTP };=0A=
if ($@) { $self->error ("Unable to load Net::NNTP: $@") }=0A=
$server =3D Net::NNTP->new ($server);=0A=
unless ($server) { return "Unable to connect to server $server" }=0A=
}=0A=
=0A=
# Actually do the POST and return any resulting error messages.=0A=
eval { $$self{article}->post () };=0A=
if ($@) {=0A=
my $error =3D $@;=0A=
chomp $error;=0A=
return $error;=0A=
} else {=0A=
return undef;=0A=
}=0A=
}=0A=
=0A=
# Post the message through IHAVE. We take a Net::NNTP connection or a=0A=
# machine name or IP address as an optional argument and pass an open=0A=
# Net::NNTP connection into News::Article::ihave() if one is provided.=0A=
# Returns undef on success or the error message on failure. Note that =
the=0A=
# article must already have a Path and Message-ID to use this posting=0A=
# method.=0A=
sub post_ihave {=0A=
my ($self, $server) =3D @_;=0A=
=0A=
# If a server is provided and isn't a Net::NNTP connection, open one.=0A=
if ($server && !ref $server) {=0A=
eval { require Net::NNTP };=0A=
if ($@) { $self->error ("Unable to load Net::NNTP: $@") }=0A=
$server =3D Net::NNTP->new ($server);=0A=
unless ($server) { return "Unable to connect to server $server" }=0A=
}=0A=
=0A=
# Actually do the IHAVE and return any resulting error messages.=0A=
eval { $$self{article}->ihave ($server) };=0A=
if ($@) {=0A=
my $error =3D $@;=0A=
chomp $error;=0A=
return $error;=0A=
} else {=0A=
return undef;=0A=
}=0A=
}=0A=
=0A=
# Post the message through a program, returning undef on success and the=0A=
# output of the program on failure.=0A=
sub post_program {=0A=
my ($self, @program) =3D @_;=0A=
=0A=
# Load in the modules we require to do this and then try to run the=0A=
# program we were told to use.=0A=
eval { require IPC::Open3 };=0A=
if ($@) { $self->error ("Unable to load IPC::Open3: $@") }=0A=
eval { require FileHandle };=0A=
if ($@) { $self->error ("Unable to load FileHandle: $@") }=0A=
my $input =3D new FileHandle;=0A=
my $output =3D new FileHandle;=0A=
eval { IPC::Open3::open3 ($input, $output, $output, @program) };=0A=
if ($@) { return "Cannot execute @program: $!\n" }=0A=
=0A=
# Okay, that was successful. Feed the post to the program.=0A=
$$self{article}->write ($input);=0A=
close $input;=0A=
=0A=
# Now check our error status and our output.=0A=
if ($? !=3D 0) {=0A=
my @error =3D <$output>;=0A=
push (@error, "@program exited with status $?\n");=0A=
return (wantarray ? @error : join ('', @error));=0A=
} else {=0A=
return undef;=0A=
}=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
Gateway-0.42/modules/bodyheaders.al=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00100444 =00 764 =00 0 =00 4234 6450663040 15555=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# bodyheaders.al =
-- Extracts headers from the message body. -*- perl -*-=0A=
# $Id: bodyheaders.al,v 0.1 1997/12/26 08:09:04 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['bodyheaders']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# Our single directive gives a list of (case-insensitive) headers that we=0A=
# should look for and elevate out of the beginning of the article body.=0A=
sub bodyheaders_conf {=0A=
my $self =3D shift;=0A=
$$self{bodyheaders} =3D [ map { lc $_ } @_ ];=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Message rewrites=0A=
#########################################################################=
###=0A=
=0A=
# We examine the beginning of the body up to the first non-blank, =
non-header=0A=
# line looking for headers that match the ones we're suppoesd to look =
for.=0A=
# If we find any, we splice the headers and any blank lines preceeding or=0A=
# following them out of the body and add the headers to the article =
headers=0A=
# (non-destructively). Headers in the body override actual headers in =
the=0A=
# case of unique headers.=0A=
sub bodyheaders_mesg {=0A=
my $self =3D shift;=0A=
my ($lines, $found) =3D (0, 0);=0A=
my $body =3D $$self{article}->body ();=0A=
for (@$body) {=0A=
$lines++;=0A=
next if (/^\s*$/);=0A=
if (/^(\S+):\s*(.*)$/) {=0A=
my ($header, $value) =3D (lc $1, $2);=0A=
if (grep { $_ eq $header } @{$$self{bodyheaders}}) {=0A=
unless ($$self{article}->add_headers ($header =3D> =
$value)) {=0A=
$$self{article}->drop_headers ($header);=0A=
$$self{article}->add_headers ($header =3D> $value);=0A=
}=0A=
$found++;=0A=
} else {=0A=
last;=0A=
}=0A=
} else {=0A=
last;=0A=
}=0A=
}=0A=
$lines--;=0A=
if ($found) { splice (@$body, 0, $lines) }=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00Gateway-0.42/modules/anykeyword.al=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 1677 =
6444716324 15477=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# anykeyword.al -- =
Require articles to have some keyword. -*- perl -*-=0A=
# $Id: anykeyword.al,v 0.2 1997/12/14 08:46:11 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: []=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Make sure that the post has a keyword (any keyword is acceptable).=0A=
# Keywords are in the form of [\S+] at the beginning of the subject line.=0A=
sub anykeyword_mesg {=0A=
my $self =3D shift;=0A=
my $subject =3D $$self{article}->header ('subject');=0A=
if ($subject =3D~ /^(?:Re:\s+)?\[\S+\]/) {=0A=
return undef;=0A=
} else {=0A=
return "No keyword found";=0A=
}=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=0
=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/modules/crosspo=
st.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 =
764 =00 0 =00 7166 6450647537 15347=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# crosspost.al -- =
Limit crossposts and followups. -*- perl -*-=0A=
# $Id: crosspost.al,v 0.1 1997/12/26 06:31:59 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['crosspost', 'followup']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# We take two directives, crosspost and followup. The former sets =
limits on=0A=
# crossposting, the latter sets limits on where followups can go. Each=0A=
# directive takes one of three keywords: "max" followed by a number=0A=
# specifying a maximum number of groups, "remove" followed by a group =
name=0A=
# that is removed from the crosspost or followups, and "reject" followed =
by=0A=
# a group name that causes the message to be rejected if that group is=0A=
# crossposted to or if followups would go to it.=0A=
sub crosspost_conf {=0A=
my ($self, $directive, $command, $argument) =3D @_;=0A=
if ($command eq 'max') {=0A=
$$self{crosspost}{$directive . $command} =3D $argument;=0A=
} else {=0A=
push (@{$$self{crosspost}{$directive . $command}}, $argument);=0A=
}=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Message rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Check the message to make sure that it complies with the various limits=0A=
# and group exclusions, and possibly trim out groups if so instructed.=0A=
sub crosspost_mesg {=0A=
my $self =3D shift;=0A=
my $info =3D $$self{crosspost};=0A=
my @newsgroups =3D split (/,/, $$self{article}->header =
('newsgroups'));=0A=
=0A=
# Check the newsgroups list for anything that should be removed or =
which=0A=
# would cause a rejection.=0A=
@newsgroups =3D map {=0A=
my $group =3D $_;=0A=
for (@{$$info{crosspostreject}}) {=0A=
return "Invalid crosspost to $group" if ($_ eq $group);=0A=
}=0A=
(grep { $group eq $_ } @{$$info{crosspostremove}}) ? () : $group;=0A=
} @newsgroups;=0A=
=0A=
# Now get our followups. We do this afterwards, since it may just =
be a=0A=
# copy of the Newsgroups header, which we could have just modified.=0A=
my $followups =3D $$self{article}->header ('followup-to');=0A=
my @followups;=0A=
if ($followups) {=0A=
@followups =3D split (/,/, $followups);=0A=
} else {=0A=
@followups =3D @newsgroups;=0A=
}=0A=
=0A=
# Check the followups for the same thing.=0A=
@followups =3D map {=0A=
my $group =3D $_;=0A=
for (@{$$info{followupreject}}) {=0A=
return "Followups would go to $group" if ($_ eq $group);=0A=
}=0A=
(grep { $group eq $_ } @{$$info{followupremove}}) ? () : $group;=0A=
} @followups;=0A=
=0A=
# Check the maximum crosspost and followup restrictions, if there are=0A=
# any.=0A=
if ($$info{crosspostmax} && $$info{crosspostmax} < @newsgroups) {=0A=
return 'Excessively crossposted';=0A=
} elsif ($$info{followupmax} && $$info{followupmax} < @followups) {=0A=
return 'Followups would go to too many groups';=0A=
}=0A=
=0A=
# Now, set the headers to the new value. We suppress the Followup-To=0A=
# header if it has the same content as the Newsgroups header.=0A=
my $newsgroups =3D join (',', @newsgroups);=0A=
$followups =3D join (',', @followups);=0A=
$$self{article}->set_headers (newsgroups =3D> $newsgroups);=0A=
if ($followups eq $newsgroups) {=0A=
$$self{article}->drop_headers ('followup-to');=0A=
} else {=0A=
$$self{article}->set_headers ('followup-to' =3D> $followups);=0A=
}=0A=
=0A=
# Return success.=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/mod=
ules/cleanbody.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=001004=
44 =00 764 =00 0 =00 5473 6452725445 15244=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# cleanbody.al -- =
Various standard article body cleaning. -*- perl -*-=0A=
# $Id: cleanbody.al,v 0.4 1998/01/01 14:41:41 eagle Exp $=0A=
#=0A=
# Copyright 1997 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
#=0A=
# @@ Interface: []=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Post checks=0A=
#########################################################################=
###=0A=
=0A=
# We perform the following tests and munging to the body of the post:=0A=
#=0A=
# * Undo quoted-printable.=0A=
# * Smart quote undoing: 0221 -> ` 0222 -> ' 0223 -> " 0224 -> "=0A=
# 0205 -> --=0A=
# * Strip out any Ctrl-Ms or literal deletes.=0A=
# * Reject if the body contains invalid characters.=0A=
# * Reject if any line is longer than 79 characters.=0A=
sub cleanbody_mesg {=0A=
my $self =3D shift;=0A=
my $quoted =3D lc $$self{article}->header =
('content-transfer-encoding');=0A=
$quoted =3D ($quoted eq 'quoted-printable');=0A=
local $_;=0A=
=0A=
# First pass. We'll only need two passes if there were =
quoted-printable=0A=
# continuation lines.=0A=
my ($save, $splice);=0A=
for (@{scalar $$self{article}->body ()}) {=0A=
# Fix quoted-printable, which is annoying to have to deal with.=0A=
if ($quoted) {=0A=
if ($save) {=0A=
$_ =3D $save . $_;=0A=
undef $save;=0A=
}=0A=
s/=3D([0-9A-F]{2})/chr (hex $1)/eg;=0A=
s/=3D\n//g;=0A=
if (s/=3D$//) {=0A=
# Continuation line. Ugh. Replace line with a =
disallowed=0A=
# character and save this line; we'll need to splice this=0A=
# line out later on another pass.=0A=
$save =3D $_;=0A=
$_ =3D "\0";=0A=
$splice =3D 1;=0A=
next;=0A=
}=0A=
}=0A=
=0A=
# Convert Microsoft smart quotes to their real counterparts.=0A=
tr/\x91\x92\x93\x94/\`\'\"\"/;=0A=
s/\x85/--/g;=0A=
=0A=
# Remove CRs (DOS line endings, most likely) and delete =
characters.=0A=
tr/\r\x7f//d;=0A=
=0A=
# Check for validity. We allow any ISO 8859-1 characters.=0A=
return "Invalid characters in body" if (!/^[\s!-~\xa0-\xff]*$/);=0A=
return "Line over 79 characters" if (length $_ > 80);=0A=
}=0A=
=0A=
# Second pass if there were continuation lines to splice out the =
removed=0A=
# lines of body text.=0A=
if ($splice) {=0A=
my $body =3D $$self{article}->body ();=0A=
my $i;=0A=
for ($i =3D 0; $i < @$body; $i++) {=0A=
splice (@$body, $i, 1) if ($$body[$i] eq "\0");=0A=
}=0A=
}=0A=
=0A=
# Fix Content-Transfer-Encoding header if we decoded =
quoted-printable.=0A=
$$self{article}->set_headers ('content-transfer-encoding' =3D> =
'8bit')=0A=
if $quoted;=0A=
=0A=
# Return success.=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway=
-0.42/modules/config.al=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00100444 =00 764 =00 0 =00 6535 6514174665 14552=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# config.al -- =
Configuration file parsing. -*- perl -*-=0A=
# $Id: config.al,v 0.4 1998/04/12 17:28:20 eagle Exp $=0A=
#=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Methods=0A=
#########################################################################=
###=0A=
=0A=
# The core method. Takes a configuration directive and a list of =
arguments=0A=
# and calls the appropriate module callbacks with those directives and=0A=
# arguments. We fail with an error if no hooks are registered. =
Directives=0A=
# are case-insensitive.=0A=
sub config {=0A=
my ($self, $directive, @arguments) =3D @_;=0A=
my $methods =3D $$self{confhooks}{lc $directive}=0A=
or $self->error ("Unknown configuration directive $directive");=0A=
for (@$methods) {=0A=
my $method =3D $_ . '_conf';=0A=
$self->$method (lc $directive, @arguments);=0A=
}=0A=
}=0A=
=0A=
# Parses a single line, splitting it on whitespace, and returns the=0A=
# resulting array. Double quotes are supported for arguments that have=0A=
# embedded whitespace, and backslashes escape the next character =
(whatever=0A=
# it is). Any text outside of double quotes is automatically lowercased,=0A=
# but anything inside quotes is left alone. We can't use =
Text::ParseWords=0A=
# because it's too smart for its own good.=0A=
sub config_parse {=0A=
my ($self, $line) =3D @_;=0A=
my (@args, $snippet);=0A=
while ($line ne '') {=0A=
$line =3D~ s/^\s+//;=0A=
$snippet =3D '';=0A=
while ($line !~ /^\s/ && $line ne '') {=0A=
my $tmp;=0A=
if (index ($line, '"') =3D=3D 0) {=0A=
$line =3D~ s/^\"((?:[^\"\\]|\\.)+)\"//s=0A=
or $self->error ("Parse error in '$line'");=0A=
$tmp =3D $1;=0A=
} else {=0A=
$line =3D~ s/^((?:[^\\\"\s]|\\.)+)//s;=0A=
$tmp =3D lc $1;=0A=
}=0A=
$tmp =3D~ s/\\(.)/$1/g;=0A=
$snippet .=3D $tmp;=0A=
}=0A=
push (@args, $snippet);=0A=
}=0A=
@args;=0A=
}=0A=
=0A=
# Parses a single configuration line, breaking up the arguments using=0A=
# config_parse() and then passing them on to config().=0A=
sub config_line {=0A=
my ($self, $line) =3D @_;=0A=
my @line =3D $self->config_parse ($line);=0A=
$self->config (@line);=0A=
}=0A=
=0A=
# Reads in a configuration file, taking either a scalar or a reference =
to a=0A=
# file glob or file handle. Blank lines and lines beginning with # are=0A=
# ignored. Each valid directive is passed to config_line for processing=0A=
# (this separation is so that other programs can call config_line =
separately=0A=
# and just pass it a line of text). A line ending in a backslash is=0A=
# considered to be continued on the next line, but note that the newline =
is=0A=
# passed along to the parser (which means that newlines inside double =
quotes=0A=
# will be preserved).=0A=
sub config_file {=0A=
my ($self, $config) =3D @_;=0A=
unless (ref $config) {=0A=
open (CONFIG, $config)=0A=
or $self->error ("Cannot open file $config: $!");=0A=
$config =3D \*CONFIG;=0A=
}=0A=
local $_;=0A=
while (<$config>) {=0A=
s/^\s+//;=0A=
next if (/^\#/ || /^$/);=0A=
s/\s+$//;=0A=
while (/\\$/) {=0A=
my $next =3D <$config>;=0A=
$next =3D~ s/\s+$//;=0A=
s/\\$/\n$next/;=0A=
}=0A=
$self->config_line ($_);=0A=
}=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/modules/headers.al=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =
=00 0 =00 7406 6514121024 14673=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# headers.al -- =
Rewrite and trim mail headers. -*- perl -*-=0A=
# $Id: headers.al,v 0.5 1998/04/12 11:14:28 eagle Exp $=0A=
#=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you may redistribute it and/or modify it=0A=
# under the same terms as Perl itself. This is a News::Gateway module =
and=0A=
# requires News::Gateway to be used.=0A=
=0A=
# @@ Interface: ['header']=0A=
=0A=
package News::Gateway;=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# Add a single header rewrite rule. We check to make sure the action is =
one=0A=
# that we support and then do variable substitution; $n becomes the name =
of=0A=
# the running program, $v becomes the version, and $i becomes a =
(hopefully=0A=
# unique) identifier built from the time and the process ID. We also =
allow=0A=
# $$ to mean $ just in case.=0A=
sub headers_conf {=0A=
my ($self, $directive, $header, $action, $replacement) =3D @_;=0A=
my $actions =3D 'add|rename|ifempty|drop|replace|prepend|reject';=0A=
unless ($action =3D~ /^($actions)$/o) {=0A=
$self->error ("Unknown header rewrite action $action");=0A=
}=0A=
if (defined $replacement) {=0A=
$replacement =3D~ s/((?:^|[^\$])(?:\$\$)*)\$n/$1$0/g;=0A=
$replacement =3D~ s/((?:^|[^\$])(?:\$\$)*)\$v/$1$VERSION/g;=0A=
$replacement =3D~ s%((?:^|[^\$])(?:\$\$)*)\$i%$1@{[time]}/$$%g;=0A=
$replacement =3D~ s/\$\$/\$/g;=0A=
}=0A=
push (@{$$self{headers}{lc $header}}, [ $action, $replacement ]);=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Post rewrites=0A=
#########################################################################=
###=0A=
=0A=
# Apply all transformations to the headers requested by header lines in =
the=0A=
# configuration file. We support six directives: drop deletes a header,=0A=
# rename renames the original header to X-Original-<header>, add adds a =
new=0A=
# header with the given content, ifempty sets a value for a header iff =
the=0A=
# header is empty, replace replaces the current header contents with the=0A=
# given new content, prepend adds the new content to the beginning of the=0A=
# current header (or creates a new header if none exists), and reject=0A=
# returns an error message if that header is present.=0A=
sub headers_mesg {=0A=
my $self =3D shift;=0A=
=0A=
# Iterate through all rewrite rules we have saved and apply each one =
of=0A=
# them individually. Note that for each header we have an anonymous=0A=
# array of anonymous arrays, where each anonymous array contains the=0A=
# action and the replacement if any.=0A=
my $fixes =3D $$self{headers};=0A=
my $article =3D $$self{article};=0A=
for (keys %$fixes) {=0A=
my $fix;=0A=
for $fix (@{$$fixes{$_}}) {=0A=
my ($action, $content) =3D @$fix;=0A=
if ($action eq 'drop') {=0A=
$article->drop_headers ($_);=0A=
} elsif ($action eq 'rename') {=0A=
$article->rename_header ($_, "x-original-$_", 'add');=0A=
} elsif ($action eq 'add') {=0A=
$article->add_headers ($_, $content);=0A=
} elsif ($action eq 'ifempty') {=0A=
my $current =3D $article->header ($_);=0A=
undef $current if ($_ eq 'subject' && $current eq =
'(none)');=0A=
if (!$current) {=0A=
$article->set_headers ($_, $content);=0A=
}=0A=
} elsif ($action eq 'replace') {=0A=
$article->set_headers ($_, $content);=0A=
} elsif ($action eq 'prepend') {=0A=
my @current =3D $article->header ($_);=0A=
$current[0] =3D $content . ($current[0] ? $current[0] : =
"");=0A=
$article->set_headers ($_, [ @current ]);=0A=
} elsif ($action eq 'reject' && $article->header ($_)) {=0A=
return "Invalid header $_";=0A=
}=0A=
}=0A=
}=0A=
undef;=0A=
}=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
Gateway-0.42/examples/=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00 40755 =00 764 =00 0 =00 =
0 6515062265 13022=00 =
5=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/exampl=
es/raccmod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
100555 =00 764 =00 0 =00 14247 6514127061 14476=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00#!/usr/bin/perl=0A=
$version =3D q$Id: raccmod,v 0.8 1998/04/12 12:06:09 eagle Exp $;=0A=
#=0A=
# raccmod -- Robomoderator script for rec.arts.comics.creative.=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you can redistribute it and/or modify it=0A=
# under the same terms as Perl itself.=0A=
#=0A=
# This program is provided as an example of the use of News::Gateway, =
but is=0A=
# also the actual front-end robomoderator used for =
rec.arts.comics.creative,=0A=
# with only minor modifications to hide confidential information. All=0A=
# incoming messages are fed directly to this script, which either posts =
them=0A=
# automatically or forwards them to the hand moderation address.=0A=
#=0A=
# This is part of two programs, both using News::Gateway, which are used =
in=0A=
# moderating rec.arts.comics.creative. The other is raccpost, the script=0A=
# that hand-approved articles are piped through for posting. It performs=0A=
# significantly fewer checks (for obvious reasons).=0A=
#=0A=
# This script also gets submissions for alt.comics.lnh, possibly=0A=
# crossposted, possibly not. (alt.comics.lnh isn't moderated, but it =
has a=0A=
# mail to news gateway implemented via this robomoderation script.)=0A=
# Crossposting and multiple executions of the script therefore have to be=0A=
# dealt with correctly.=0A=
#=0A=
# All messages successfully posted to rec.arts.comics.creative are also =
sent=0A=
# to a mailing list, and that's also done here.=0A=
=0A=
#########################################################################=
###=0A=
# Configuration=0A=
#########################################################################=
###=0A=
=0A=
# The address to which any bounces or rejection messages should be cc'd.=0A=
$maintainer =3D 'XXX';=0A=
=0A=
# The address to which posts that fail any check should be relayed.=0A=
$moderator =3D 'XXX';=0A=
=0A=
# The mailing list address, to which all successful posts should be sent.=0A=
$list =3D 'XXX';=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Implementation=0A=
#########################################################################=
###=0A=
=0A=
use News::Gateway qw();=0A=
=0A=
use strict;=0A=
use vars qw($list $maintainer $moderator $version);=0A=
=0A=
# Create our gateway object, non-interactive, setting the maintainer=0A=
# address, and then load in the hooks for the modules that we're going to=0A=
# need. Note that the default group for the purposes of mailtonews is=0A=
# pretty much irrelevant, since newsgroups always adds a Newsgroups =
header.=0A=
# newsgroups looks at either $ARGV[0] or falls back to RACC, since posts =
to=0A=
# alt.comics.lnh get $ARGV[0] set to that.=0A=
my $gateway =3D News::Gateway->new (0, $maintainer);=0A=
$gateway->modules ('mailpath', =0A=
newsgroups =3D> [$ARGV[0] || =
'rec.arts.comics.creative'],=0A=
mailtonews =3D> ['rec.arts.comics.creative'],=0A=
'headers',=0A=
'keywords',=0A=
'whitelist',=0A=
'nobinaries',=0A=
'cleanbody');=0A=
=0A=
# Read our configuration information from the end of this script. This =
is a=0A=
# handy way to feed News::Gateway configuration information if you have a=0A=
# fairly simple script and don't want to bother with multiple files.=0A=
$gateway->config_file (\*DATA);=0A=
=0A=
# Since we're using qmail, create a source for the message data that will=0A=
# automatically add the envelope From header. We could use preline, but=0A=
# this way we don't have an extra fork. This is needed for qmail systems=0A=
# since qmail doesn't automatically add an envelope From line; sendmail=0A=
# systems can eliminate this part in favor of giving read_message() STDIN=0A=
# directly.=0A=
my $sentenvelope;=0A=
my $source =3D sub {=0A=
unless ($sentenvelope) {=0A=
$sentenvelope =3D 1;=0A=
return "From $ENV{SENDER} " . scalar localtime() . "\n";=0A=
}=0A=
scalar <STDIN>;=0A=
};=0A=
=0A=
# Read in the message, and then run our various checks against it. If =
none=0A=
# of the checks failed, post the message.=0A=
$gateway->read ($source);=0A=
my $error =3D $gateway->apply ();=0A=
unless ($error) { $error =3D $gateway->post () }=0A=
=0A=
# If we got some sort of error message, we need to resend the post to the=0A=
# moderation address. We also need to add a header saying why the post =
was=0A=
# rejected. Otherwise, we succeded in posting the message and want to=0A=
# resend it to the group mailing list. Note that we just silently exit =
if=0A=
# given the "Not primary instance" message; that means the message was=0A=
# crossposted via e-mail and another instance of us is doing the posting.=0A=
# We have to use the News::Article methods for adding a header and use =
the=0A=
# accessor function to get the actual News::Article object.=0A=
if ($error) {=0A=
exit if ($error eq 'newsgroups: Not primary instance');=0A=
my $article =3D $gateway->get_article ();=0A=
$article->add_headers ('x-rejected-for' =3D> $error);=0A=
$gateway->mail ($moderator)=0A=
or $gateway->error ('Unable to resend to moderator');=0A=
} else {=0A=
# Only resend to the mailing list if we actually posted to RACC.=0A=
my $article =3D $gateway->get_article ();=0A=
my @groups =3D split (',', $article->header ('newsgroups'));=0A=
exit unless (grep { $_ eq 'rec.arts.comics.creative' } @groups);=0A=
=0A=
# Add a To header, since otherwise the article looks weird on the =
list.=0A=
$article->add_headers (to =3D> 'racc@eyrie.org');=0A=
=0A=
# We need to drop the Approved header, or majordomo gets confused.=0A=
$article->drop_headers ('approved');=0A=
=0A=
# Forward the article to the list.=0A=
$gateway->mail ($list);=0A=
# Silently ignore errors since there isn't much we can do about them.=0A=
}=0A=
__END__=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
header approved replace racc-request@eyrie.org=0A=
header cc drop=0A=
header date rename=0A=
header delivered-to drop=0A=
header path drop=0A=
header to drop=0A=
header x-previous-hop drop=0A=
keywords /home/eagle/usenet/racc/keywords=0A=
whitelist /home/eagle/usenet/racc/posters=0A=
group rec.arts.comics.creative /^rec-arts-comics-creative\@/=0A=
group rec.arts.comics.creative rec.arts.comics.creative@eyrie.org=0A=
group rec.arts.comics.creative racc@eyrie.org=0A=
group rec.arts.comics.creative eagle-racc@windlord.stanford.edu=0A=
group alt.comics.lnh alt.comics.lnh@eyrie.org=0A=
group alt.comics.lnh aclnh@eyrie.org=0A=
group alt.comics.lnh eagle-aclnh@windlord.stanford.edu=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/=
examples/listgate.readme=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =
=00 764 =00 0 =00 3432 6472767500 16120=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00How to use =
listgate with sendmail 8=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
Christopher Davis <ckd@loiosh.kei.com>=0A=
=0A=
$Revision: 1.1 $, $Date: 1998/02/19 08:37:20 $=0A=
=0A=
It is actually quite easy to set up sendmail 8 to work with listgate for=0A=
arbitrary mailing lists, assuming you're using sendmail's m4 system for=0A=
your configuration file building instead of editing cf files by hand. =
(If=0A=
you are editing cf files by hand, you shouldn't need this file.)=0A=
=0A=
1. Put listgate.m4 in the cf/mailer directory of sendmail's source tree.=0A=
=0A=
2. Add any necessary define()s to your .mc file to override the=0A=
following defaults:=0A=
=0A=
LISTGATE_MAILER_PATH [/usr/local/bin/listgate]=0A=
LISTGATE_MAILER_USER [news:news]=0A=
=0A=
You should not need to override LISTGATE_MAILER_FLAGS.=0A=
=0A=
3. After the define()s (if any), add the following line:=0A=
=0A=
MAILER(listgate)=0A=
=0A=
4. If you do not already have it in your .mc file, add the line:=0A=
=0A=
FEATURE(mailertable)=0A=
=0A=
Depending on the database formats available in your sendmail binary,=0A=
you may need to include an argument. See cf/README in the sendmail=0A=
distribution.=0A=
=0A=
5. Create your .cf file in the usual manner.=0A=
=0A=
6. Add an entry to mailertable (see "USING MAILERTABLES" in cf/README in=0A=
the sendmail distribution for details) such as:=0A=
=0A=
listgate.example.com listgate:newshost.example.com=0A=
=0A=
7. Add one or more MX records for "listgate.example.com" to the DNS.=0A=
The lowest-preference MX should be the host running listgate.=0A=
=0A=
8. Create newsgroups for the mailing lists you want to gateway, as well=0A=
as a "postmaster" newsgroup; the latter is useful for testing, and is=0A=
necessary to comply with RFC 822.=0A=
=0A=
9. Subscribe "listname@listgate.example.com" to a mailing list to have=0A=
its mail posted to "example.mail.listname". Mail for groups which=0A=
don't exist will be silently dropped.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00Gateway-0.42/examples/listgate=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00100555 =00 764 =00 0 =00 16161 =
6474136213 14703=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00#!/usr/bin/perl=0A=
$version =3D q$Id: listgate,v 0.6 1998/02/23 00:02:09 eagle Exp $;=0A=
#=0A=
# listgate -- Gateway incoming mailing lists to local newsgroups.=0A=
# Copyright 1998 by Russ Allbery <rra@stanford.edu>=0A=
# Based on code by Christopher Davis <ckd@loiosh.kei.com>=0A=
#=0A=
# This program is free software; you can redistribute it and/or modify it=0A=
# under the same terms as Perl itself.=0A=
#=0A=
# This program is designed to take incoming mail messages from mailing =
lists=0A=
# and post them to local newsgroups. It takes the name of the mailing =
list=0A=
# on the command line and adds a prefix (see the settings below) to come =
up=0A=
# with the name of the newsgroup to post to.=0A=
#=0A=
# There are a variety of ways that one could convince your MTA to call =
this=0A=
# program with the right syntax. One of which would be to set up this=0A=
# program as a sendmail mailer definition as follows:=0A=
#=0A=
# Mlistgate, P=3D/usr/local/bin/listgate, F=3DDFMlmnS, U=3Dnews:news, =
S=3D10,=0A=
# R=3D20/40, A=3Dlistgate $u=0A=
#=0A=
# and then set up a virtual domain that delivers all mail to that mailer =
and=0A=
# subscribe addresses in that virtual domain to the mailing lists. See=0A=
# listgate.readme and listgate.m4 for more information.=0A=
=0A=
# Another way, if you're using qmail, is to (using either ~alias .qmail=0A=
# files, virtual domains, or the qmail-users mapping method) make sure=0A=
# that all incoming mailing list mail is delivered to=0A=
# .qmail-gateway-LIST where LIST is the name of the mailing list and=0A=
# then create .qmail-gateway-default with the content:=0A=
#=0A=
# |/usr/local/bin/listgate "$EXT2"=0A=
#=0A=
# Please note that it's considered antisocial in the extreme to gateway=0A=
# mailing lists to public newsgroups without the explicit permission of =
the=0A=
# users and owner of the mailing list. If you use this program, make =
sure=0A=
# to gateway the mailing lists into a private hierarchy. This program =
will=0A=
# set the distribution of all articles posted to a value of your choice; =
I=0A=
# recommend using that feature to make sure the articles remain local.=0A=
=0A=
#########################################################################=
###=0A=
# Site configuration=0A=
#########################################################################=
###=0A=
=0A=
# This is the newsgroup hierarchy into which messages should be posted. =
For=0A=
# example, if this is set to "example.mail" and the list name given on =
the=0A=
# commandline is "list", the article will be posted to local.mail.list.=0A=
$hierarchy =3D 'example.mail';=0A=
=0A=
# The distribution to be added to all articles posted. This should be=0A=
# something that will keep the articles on your local server and not=0A=
# redistribute them to the world, even if they end up accidentally =
posted to=0A=
# the wrong group.=0A=
$distribution =3D 'example';=0A=
=0A=
# What to put in the Approved header. It's recommended that you make all=0A=
# local mailing list gateway groups moderated with the submission address=0A=
# pointing to the mailing list submission address so that your users can=0A=
# post to the groups normally. If that's done, all posted articles have =
to=0A=
# have an Approved header. Since having an Approved header does no harm=0A=
# even if the group is unmoderated, and since not having an Approved =
header=0A=
# when the local group is moderated can create loops, this program always=0A=
# adds one.=0A=
$approved =3D 'usenet@example.com';=0A=
=0A=
# What to put in the Organization header. It's probably best to include =
a=0A=
# contact address, just in case of problems.=0A=
$organization =3D "Local Mail/News Gateway <$approved>";=0A=
=0A=
# What to put in the Path header. This is needed if you use rnews or =
ihave=0A=
# injection. Something that clearly marks the message as originating =
from a=0A=
# mail-to-news gateway is recommended.=0A=
$path =3D 'listgate.example.com!mail-to-news';=0A=
=0A=
# How to inject the articles into the news stream. There are three =
options:=0A=
# rnews - feed the article directly into rnews=0A=
# ihave - post to a news server using IHAVE=0A=
# post - post to a news server using POST=0A=
# Use rnews if the host listgate runs on is the news server; use ihave=0A=
# if the host listgate runs on is in hosts.nntp (or the equivalent); use=0A=
# post if you absolutely must (but not otherwise).=0A=
$inject =3D 'rnews';=0A=
=0A=
# Full path to your rnews or workalike; include arguments if needed. =
This=0A=
# needs to be a list, so if arguments are needed, you should set @rnews =
to=0A=
# something like ('/bin/rnews', '-S', 'server').=0A=
@rnews =3D ('/bin/rnews');=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Implementation=0A=
#########################################################################=
###=0A=
=0A=
# Set this; we may run with special uid/gid, and we may exec rnews.=0A=
$ENV{'PATH'} =3D '/bin:/usr/bin';=0A=
=0A=
use News::Gateway qw();=0A=
=0A=
use strict;=0A=
use vars qw($approved $distribution $hierarchy $organization $version=0A=
$path $inject @rnews);=0A=
=0A=
# Use this to report fatal error messages. The exit code should work =
under=0A=
# both qmail and sendmail, but under qmail it's more technically correct =
to=0A=
# use 100.=0A=
sub bounce { warn @_, "\n"; exit 64 }=0A=
=0A=
# Figure out what groups we'll be posting to from our command-line=0A=
# arguments.=0A=
my $newsgroups =3D join (',', map { $hierarchy . '.' . $_ } @ARGV);=0A=
unless ($newsgroups) { bounce 'No newsgroups specified' }=0A=
=0A=
# Create our gateway object, non-interactive, setting the maintainer =
address=0A=
# to $approved, and load the hooks for our modules.=0A=
my $gateway =3D News::Gateway->new (0, $approved);=0A=
$gateway->modules ('mailpath',=0A=
'headers',=0A=
mailtonews =3D> [$newsgroups],=0A=
'mungeids');=0A=
=0A=
# Read the configuration information at the end of this script.=0A=
$gateway->config_file (\*DATA);=0A=
=0A=
# Initialize a couple more things from our site configuration.=0A=
$gateway->config ('header', 'organization', 'replace', $organization);=0A=
$gateway->config ('header', 'approved', 'replace', $approved);=0A=
$gateway->config ('header', 'distribution', 'replace', $distribution);=0A=
$gateway->config ('header', 'path', 'replace', $path);=0A=
=0A=
# Read in the message (moved up so we can do the rewrites).=0A=
$gateway->read (\*STDIN);=0A=
=0A=
# Run our rewrites. If nothing fails, post the message. Otherwise, drop=0A=
# the message on the floor, since if we're gating mailing list traffic,=0A=
# there really isn't anything reasonable we can do with failed posts. =
This=0A=
# is why using rnews if possible is recommended, since it has a fallback=0A=
# mechanism for posting failure.=0A=
my $error =3D $gateway->apply ();=0A=
unless ($error) {=0A=
# If any injection fails, we drop the article.=0A=
if ($inject eq 'post') { $error =3D $gateway->post () =
}=0A=
elsif ($inject eq 'ihave') { $error =3D $gateway->post_ihave () =
}=0A=
elsif ($inject eq 'rnews') { $error =3D $gateway->post_program =
(@rnews) }=0A=
else { bounce "Unknown injection method $inject" }=0A=
}=0A=
=0A=
__END__=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
# These renames could probably be changed to drops if you feel like it=0A=
# and don't need the additional information. We rename the To and Cc=0A=
# headers just in case because some news servers don't cope well with=0A=
# messages in moderated groups containing To and Cc headers. We drop=0A=
# the Newsgroups header because it may cause conflicts.=0A=
header cc rename=0A=
header to rename=0A=
header newsgroups drop=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00G=
ateway-0.42/examples/raccpost=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00100555 =00 764 =00 0 =00 7127 6514623005 =
14662=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00#!/usr/bin/perl=0A=
$version =3D q$Id: raccpost,v 0.6 1998/04/14 09:01:57 eagle Exp $;=0A=
#=0A=
# raccpost -- Posting script for rec.arts.comics.creative.=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you can redistribute it and/or modify it=0A=
# under the same terms as Perl itself.=0A=
#=0A=
# This program is provided as an example of the use of News::Gateway, =
but is=0A=
# also the actual posting script used for rec.arts.comics.creative, with=0A=
# only minor modifications to hide confidential information. This is=0A=
# basically just a stripped down version of raccmod, so if you're curious=0A=
# about what's happening and the documentation here isn't sufficient, see=0A=
# that example.=0A=
=0A=
#########################################################################=
###=0A=
# Configuration=0A=
#########################################################################=
###=0A=
=0A=
# The address to which any bounces or rejection messages should be cc'd.=0A=
$maintainer =3D 'XXX';=0A=
=0A=
# The mailing list address, to which all successful posts should be sent.=0A=
$list =3D 'XXX';=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Implementation=0A=
#########################################################################=
###=0A=
=0A=
use News::Gateway qw();=0A=
=0A=
use strict;=0A=
use vars qw($list $maintainer $version);=0A=
=0A=
# Pull a -f flag off the command line if one is supplied.=0A=
my $force =3D shift if ($ARGV[0] eq '-f');=0A=
=0A=
# Create our News::Gateway object, setting it interactive, and initialize=0A=
# the modules we're going to use. Note that all posts which reach this=0A=
# point have gone through raccmod and already have a Newsgroups header.=0A=
my $gateway =3D News::Gateway->new (1, $maintainer);=0A=
$gateway->modules (newsgroups =3D> [$ARGV[0] || =
'rec.arts.comics.creative'],=0A=
'headers',=0A=
mailtonews =3D> ['rec.arts.comics.creative'],=0A=
'cleanbody');=0A=
=0A=
# Read in our configuration details from the end of this script.=0A=
$gateway->config_file (\*DATA);=0A=
=0A=
# If we were given a command-line argument of -f, that means to allow=0A=
# crossposts to any groups.=0A=
$gateway->config ('group', '/./') if $force;=0A=
=0A=
# Read the message in and try to post it. If we get any errors from the=0A=
# rewrites, just send them through the normal error handling (which will=0A=
# cause a message to be sent to stderr).=0A=
$gateway->read (\*STDIN);=0A=
my $error =3D $gateway->apply ();=0A=
if ($error) { $gateway->error ($error) }=0A=
$error =3D $gateway->post ();=0A=
=0A=
# If posting failed, report that error. Otherwise, we need to resend the=0A=
# article to the mailing list as well.=0A=
if ($error) {=0A=
$gateway->error ("$error");=0A=
} else {=0A=
exit if $ARGV[0];=0A=
my $article =3D $gateway->get_article ();=0A=
$article->add_headers (to =3D> 'racc@eyrie.org');=0A=
$article->drop_headers ('approved');=0A=
$gateway->mail ($list);=0A=
} =0A=
=0A=
__END__=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
header approved replace eagle@eyrie.org=0A=
header cc drop=0A=
header date drop=0A=
header delivered-to drop=0A=
header path drop=0A=
header return-path drop=0A=
header sender drop=0A=
header to drop=0A=
header x-from-line drop=0A=
header x-rejected-for drop=0A=
group rec.arts.comics.creative /^rec-arts-comics-creative\@/=0A=
group rec.arts.comics.creative rec.arts.comics.creative@eyrie.org=0A=
group rec.arts.comics.creative racc@eyrie.org=0A=
group rec.arts.comics.creative eagle-racc@windlord.stanford.edu=0A=
group alt.comics.lnh alt.comics.lnh@eyrie.org=0A=
group alt.comics.lnh aclnh@eyrie.org=0A=
group alt.comics.lnh eagle-aclnh@windlord.stanford.edu=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
Gateway-0.42/examples/racrmod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00100555 =00 764 =00 0 =00 5611 6514127764 =
14502=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00#!/usr/bin/perl=0A=
$version =3D q$Id: racrmod,v 0.3 1998/04/12 12:13:39 eagle Exp $;=0A=
#=0A=
# racrmod -- Robomoderator script for rec.arts.comics.reviews.=0A=
# Copyright 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you can redistribute it and/or modify it=0A=
# under the same terms as Perl itself.=0A=
#=0A=
# This is a front-end robomoderator used for rec.arts.comics.reviews. =
All=0A=
# incoming messages can be fed directly to this script, which either =
posts=0A=
# them automatically or forwards them to the hand moderation address.=0A=
=0A=
#########################################################################=
###=0A=
# Configuration=0A=
#########################################################################=
###=0A=
=0A=
# The address to which any bounces or rejection messages should be cc'd.=0A=
$maintainer =3D 'XXX';=0A=
=0A=
# The address to which posts that fail any check should be relayed.=0A=
$moderator =3D 'XXX';=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Implementation=0A=
#########################################################################=
###=0A=
=0A=
use News::Gateway qw();=0A=
=0A=
use strict;=0A=
use vars qw($maintainer $moderator $version);=0A=
=0A=
# Create our gateway object, non-interactive, setting the maintainer=0A=
# address, and then load in the hooks for the modules that we're going to=0A=
# need.=0A=
my $gateway =3D News::Gateway->new (0, $maintainer);=0A=
$gateway->modules ('mailpath',=0A=
'bodyheaders',=0A=
newsgroups =3D> ['rec.arts.comics.reviews'],=0A=
mailtonews =3D> ['rec.arts.comics.reviews'],=0A=
'crosspost',=0A=
'headers',=0A=
keywords =3D> [ sub { $_[0] =3D~ /^(\S+):/ } ],=0A=
'nobinaries',=0A=
'cleanbody');=0A=
=0A=
# Read our configuration information from the end of this script.=0A=
$gateway->config_file (\*DATA);=0A=
=0A=
# Read in the message, and then run our various checks against it. If =
none=0A=
# of the checks failed, post the message.=0A=
$gateway->read (\*STDIN);=0A=
my $error =3D $gateway->apply ();=0A=
unless ($error) {=0A=
$error =3D $gateway->post ();=0A=
}=0A=
=0A=
# If we got some sort of error message, we need to resend the post to the=0A=
# moderation address. We also need to add a header saying why the post =
was=0A=
# rejected.=0A=
if ($error) {=0A=
my $article =3D $gateway->get_article ();=0A=
$article->add_headers ('x-rejected-for' =3D> $error);=0A=
$gateway->mail ($moderator)=0A=
or $gateway->error ('Unable to resend to moderator');=0A=
}=0A=
__END__=0A=
=0A=
#########################################################################=
###=0A=
# Configuration directives=0A=
#########################################################################=
###=0A=
=0A=
header approved replace XXX=0A=
header cc drop=0A=
header date rename=0A=
header path drop=0A=
header to drop=0A=
keywords XXX/racr/keywords=0A=
group /^rec.arts.comics\..*/=0A=
crosspost max 2=0A=
crosspost reject rec.arts.comics.info=0A=
followup remove rec.arts.comics.reviews=0A=
followup max 3=0A=
bodyheaders "newsgroups" "x-no-archive"=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/exa=
mples/listgate.m4=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=001004=
44 =00 764 =00 0 =00 5007 6472767536 15214=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00PUSHDIVERT(-1)=0A=
#=0A=
# Copyright (c) 1983 Eric P. Allman=0A=
# Copyright (c) 1988, 1993=0A=
# The Regents of the University of California. All rights reserved.=0A=
# Copyright 1998 Christopher Davis <ckd@loiosh.kei.com>=0A=
#=0A=
# Redistribution and use in source and binary forms, with or without=0A=
# modification, are permitted provided that the following conditions=0A=
# are met:=0A=
# 1. Redistributions of source code must retain the above copyright=0A=
# notice, this list of conditions and the following disclaimer.=0A=
# 2. Redistributions in binary form must reproduce the above copyright=0A=
# notice, this list of conditions and the following disclaimer in the=0A=
# documentation and/or other materials provided with the distribution.=0A=
# 3. All advertising materials mentioning features or use of this =
software=0A=
# must display the following acknowledgement:=0A=
# This product includes software developed by the University of=0A=
# California, Berkeley and its contributors.=0A=
# 4. Neither the name of the University nor the names of its contributors=0A=
# may be used to endorse or promote products derived from this =
software=0A=
# without specific prior written permission.=0A=
#=0A=
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND=0A=
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE=0A=
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR =
PURPOSE=0A=
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE =
LIABLE=0A=
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR =
CONSEQUENTIAL=0A=
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS=0A=
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A=
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, =
STRICT=0A=
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY =
WAY=0A=
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF=0A=
# SUCH DAMAGE.=0A=
#=0A=
=0A=
ifdef(`LISTGATE_MAILER_PATH',, `define(`LISTGATE_MAILER_PATH', =
/usr/local/bin/listgate)')=0A=
ifdef(`LISTGATE_MAILER_FLAGS',, `define(`LISTGATE_MAILER_FLAGS', =
`DFMlmnS')')=0A=
ifdef(`LISTGATE_MAILER_USER',, `define(`LISTGATE_MAILER_USER', =
`news:news')')=0A=
POPDIVERT=0A=
######################################=0A=
### LISTGATE Mailer specification ###=0A=
######################################=0A=
=0A=
VERSIONID(`$Id: listgate.m4,v 1.2 1998/02/19 08:37:50 eagle Exp $ based =
on usenet.m4 version 8.5')=0A=
=0A=
Mlistgate, P=3DLISTGATE_MAILER_PATH, F=3DLISTGATE_MAILER_FLAGS, S=3D10, =
R=3D20/40,=0A=
_OPTINS(`LISTGATE_MAILER_MAX', `M=3D', `, =
')T=3DX-Usenet/X-Usenet/X-Unix,=0A=
U=3DLISTGATE_MAILER_USER, A=3Dlistgate $u=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00Gateway-0.42/doc/=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00 40755 =00 =
764 =00 0 =00 0 6515062263 11747=00 =
5=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/doc/mo=
derate.pod=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
100444 =00 764 =00 0 =00 34561 6460370251 14375=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=3Dhead1 SYNOPSIS=0A=
=0A=
This is a basic specification for a human moderation support package =
using=0A=
News::Gateway, including design concerns and a draft of the interface=0A=
between a front end and the back-end package.=0A=
=0A=
If you are reading this from some other source, the canonical version of=0A=
this document is doc/moderate.pod in the News::Gateway distribution.=0A=
=0A=
=3Dhead1 OVERVIEW=0A=
=0A=
The role of the core News::Gateway module is to provide an interface to =
do=0A=
article rewrites and checks, leaving what to do about failing checks up =
to=0A=
the program using it. As such, a full implementation of human moderation=0A=
support is beyond the scope of the core module and should be implemented=0A=
separately. This is a specification for how that could be done, using =
the=0A=
News::Gateway core to do the rewriting.=0A=
=0A=
Human moderation has an inherently more complex data path than=0A=
robomoderation, since the article has to be stored until a human =
moderator=0A=
can look at it, the moderator should be able to approve or reject it=0A=
easily, the moderator needs to be able to edit the stored article, and a=0A=
variety of interfaces (including e-mail and web) need to be supported,=0A=
each with its own implementation and security concerns.=0A=
=0A=
This implementation is designed to allow for easy separation of the front=0A=
end that the moderator talks to and the back end that actually =
manipulates=0A=
the article spool. This is crucial to being able to cleanly implement a=0A=
variety of front ends. This implementation also seeks to impose no =
policy=0A=
limitations on what the moderator can do to articles, as things=0A=
inappropriate for one group may be appropriate for others.=0A=
=0A=
=3Dhead1 INTERFACE=0A=
=0A=
The core of such a specification is therefore the interface between a=0A=
front end and the common back end. The following set of commands would=0A=
seem to be comprehensive:=0A=
=0A=
=3Dover 4=0A=
=0A=
=3Ditem authenticate USERNAME PASSWORD=0A=
=0A=
Authenticate to the back end using a given username and password. Note=0A=
that depending on implementation, the password may be in a form other =
than=0A=
plain text -- encrypted text, or possibly even a PGP signature may be =
used=0A=
instead. This is necessary to allow actions to be associated with a=0A=
particular moderator, and possibly even have different moderators be able=0A=
to do different things.=0A=
=0A=
Depending on the C<USERNAME> specified, the availability of further=0A=
commands may differ, or things may work slightly differently (timeouts on=0A=
locks, etc.).=0A=
=0A=
=3Ditem next=0A=
=0A=
Return the unique identifier for the next pending article in the incoming=0A=
moderation queue. The returned identifier may differ depending on the=0A=
moderator (for example, each moderator could have their own queue if=0A=
moderators specialize by topic).=0A=
=0A=
This command establishes a short-term lock on that message. This lock=0A=
should expire in a reasonably short period of time (an hour or less), and=0A=
if a longer term lock is needed, it should be set up separately. This=0A=
lock is solely to prevent two moderators from working on the same message=0A=
at the same time.=0A=
=0A=
=3Ditem article IDENTIFIER=0A=
=0A=
Return the headers and body of the article C<IDENTIFIER>. This command=0A=
should fail unless we have a lock on that article, since otherwise =
someone=0A=
else may be locking it, modifying it, or otherwise manipulating it.=0A=
=0A=
=3Ditem approve IDENTIFIER=0A=
=0A=
Approve the article C<IDENTIFIER>. This means attempt to complete any=0A=
pending article rewrites and then post the article. Any resulting error=0A=
messages should be returned; in the absence of error messages, it should=0A=
be possible to assume the article was posted (but see the note about=0A=
queuing for downed servers below).=0A=
=0A=
This command requires a lock on article C<IDENTIFIER>.=0A=
=0A=
=3Ditem reject IDENTIFIER MESSAGE [ VARIABLE ... ]=0A=
=0A=
Reject the article C<IDENTIFIER>, sending the rejection message back to=0A=
the author. C<MESSAGE> should be the file name of a News::FormReply=0A=
template, and C<VARIABLE>, if present, are variable bindings for that=0A=
module. There should be some way for the moderator to specify what =
e-mail=0A=
address to send the rejection message to; the easiest way to handle that=0A=
is probably to provide a default value for the To line but allow it to be=0A=
overridden.=0A=
=0A=
Alternately, one can let rejections sent to spam blocked addresses =
bounce,=0A=
and then resend from the bounce, or just dump the bounces and let spam=0A=
blocked posters deal with it themselves.=0A=
=0A=
This command requires a lock on article C<IDENTIFIER>.=0A=
=0A=
=3Ditem checkout IDENTIFIER=0A=
=0A=
Checks out (establishes a long-term lock) on the article C<IDENTIFIER>.=0A=
The article will be mailed to the moderator (addresses will need to be on=0A=
file). This is how editing of articles is supported, as editing via a =
web=0A=
interface would be far too unwieldy to be easily usable.=0A=
=0A=
These locks should be checked periodically, and an upper limit on the=0A=
amount of time an article can be locked before it's recycled back into =
the=0A=
pending queue should be established by policy.=0A=
=0A=
This command requires a short-term lock on article C<IDENTIFIER>.=0A=
=0A=
=3Ditem replace IDENTIFIER SOURCE=0A=
=0A=
Replace the article C<IDENTIFIER> with the given article (passed in as a=0A=
source, so either a file name, a file handle, a string, etc.). This is=0A=
the other half of how article editing is supported; after the editing is=0A=
complete, the moderator can send the message back and have it replace the=0A=
original copy in the queue.=0A=
=0A=
How to log this is implementation-dependent; some groups may wish to save=0A=
a copy of the original article, and some groups may not care.=0A=
=0A=
This command requires a long-term lock (obtained via checkout) on article=0A=
C<IDENTIFIER>.=0A=
=0A=
=3Ditem release IDENTIFIER=0A=
=0A=
Releases either a short-term or a long-term lock on a message. =
Obviously,=0A=
this requires the existence of a lock. This should be used after a next=0A=
or checkout command when the moderator decides they don't want to deal=0A=
with this message right now.=0A=
=0A=
=3Ditem quit=0A=
=0A=
Closes the connection to the back end. May be unnecessary for most=0A=
implementations.=0A=
=0A=
=3Dback=0A=
=0A=
Looking over this interface, there are a variety of obvious issues which=0A=
are raised:=0A=
=0A=
=3Dover 2=0A=
=0A=
=3Ditem *=0A=
=0A=
What do we do about PGP signatures? Incoming mail from moderators should=0A=
be able to be signed via a PGP signature, and that signature should be=0A=
checked by the moderation software. On the other hand, that's definitely=0A=
a front-end problem and the signature check shouldn't have to be done by=0A=
the back end. How do we pass that sort of authentication to the back =
end?=0A=
Bear in mind that due to the requirements of a web interface, the=0A=
interface to the back end may have to be world-writeable, and therefore=0A=
some sort of password protection is necessary.=0A=
=0A=
=3Ditem *=0A=
=0A=
Different front ends are going to have different requirements for=0A=
communicating with the back end. In particular, implementing a web front=0A=
end is *very* problematic.=0A=
=0A=
=3Ditem *=0A=
=0A=
We need to be able to deal with a news server being down, thus causing an=0A=
approve to not succeed right away. Furthermore, the front end should not=0A=
have to handle this. The solution, I think, is to provide a queue=0A=
separate from the moderation incoming queue for articles ready to be=0A=
posted, and on temporary posting failure, put the article in that queue.=0A=
A cron job should then attempt to repost the messages on a periodic =
basis,=0A=
and send error reports to the moderators if a message sits in the queue=0A=
for too long without being posted.=0A=
=0A=
=3Dback=0A=
=0A=
There are also several supporting processes separate from the standard=0A=
backend (at least conceptually) that have to be written, including=0A=
something to go through and look at the locked messages and release them=0A=
(with error mail) if they've been locked for too long.=0A=
=0A=
=3Dhead1 BACKEND DESIGN=0A=
=0A=
Behind the scenes, the obvious storage model for the incoming moderation=0A=
queue would appear to be a maildir. For those who are not familiar with=0A=
that format (a native delivery format for qmail and possibly other MTAs),=0A=
it consists of three subdirectories (which have to be on the same file=0A=
system to allow atomic rename), one of which is used for temporary=0A=
storage, one of which contains new incoming messages, and one of which=0A=
contains messages that have been read. Messages are given a unique file=0A=
name consisting of a timestamp, PID, and hostname.=0A=
=0A=
The obvious mapping to a moderation queue is to have the new directory be=0A=
the incoming moderation queue, the cur directory be the messages which =
are=0A=
locked, and the filename of a message be the unique identifier. This=0A=
gives us a consistent method for generating unique identifiers, allows =
the=0A=
MTA to deliver messages directly into the moderation queue if desired, =
and=0A=
gains all of the locking benefits of maildirs (such as the fact that=0A=
locking is clean and atomic even on file systems without flock support =
and=0A=
is even mostly safe across NFS). It also allows trivial unique ID to=0A=
message mapping.=0A=
=0A=
The standard maildir method of storing message status is to encode it in=0A=
the filename of messages in the cur directory (by appending a : and then=0A=
arbitrary text). We can encode the username of the locking moderator and=0A=
the length of the lock that way, making it trivial to check the lock=0A=
policy.=0A=
=0A=
We will need some sort of logging system that logs all actions taken by a=0A=
moderator on a message. We also need to support archiving of posted=0A=
messages, archiving of rejected messages, generation of message traces=0A=
through the system from the logs, and so forth.=0A=
=0A=
The backend should be implemented as a module that does most of the above=0A=
work, and the program using that module can determine how to link the=0A=
back end to the front end. A variety of methods are possible, from=0A=
straight method calls from the front end to a Unix domain socket to a =
file=0A=
containing commands that's periodically read, to actually running the=0A=
moderation back end on a network port.=0A=
=0A=
=3Dhead1 FRONT END DESIGN=0A=
=0A=
=3Dhead2 E-mail Interface=0A=
=0A=
This is by far the simplest to deal with, since the security model=0A=
problems should be dealt with for us by the MTA if we run the front-end=0A=
out of a .forward file or the moral equivalent. If the front-end is =
being=0A=
run from sendmail aliases directly, some of the same issues apply as with=0A=
the web front end; see below for further discussion.=0A=
=0A=
The e-mail front end in the simplest case could just authenticate by=0A=
incoming e-mail address, but it would probably be best to at least =
require=0A=
a password (a la majordomo or similar such systems). Ideally, the=0A=
incoming mail should be PGP-signed and the signature verified. That=0A=
causes some problems with the authentication mechanism with the back end;=0A=
see above for the details.=0A=
=0A=
This is probably the most workable system for low-volume and possibly =
even=0A=
high-volume newsgroups. Incoming messages are put into the queue,=0A=
assigned to a moderator via some mechanism, locked to that moderator, and=0A=
mailed out. If the moderator approves the message as is, they can just=0A=
send back the approve command and the unique ID (probably encoded on the=0A=
subject line). If they need to edit the article for whatever reason, =
they=0A=
can send back a replace and an approve.=0A=
=0A=
The front end is going to need to be lenient about how it gets the =
article=0A=
back for a replace operation, as different e-mail clients are going to=0A=
vary on how they can handle such things. It should ideally support both=0A=
attachments and straight forwarded messages, and possibly some quoting=0A=
syntaxes. Whenever possible, moderators should be supplied with a small=0A=
Perl script that does the work of mailing the commands back for them, but=0A=
depending on what e-mail clients they're using, this won't always be=0A=
possible.=0A=
=0A=
The final implementation of this is going to look a lot like STUMP, I=0A=
think, out of necessity. There are some significant differences, though,=0A=
such as supporting article editing by moderators.=0A=
=0A=
=3Dhead2 Web Interface=0A=
=0A=
This is a lot harder to make work correctly. The major problem here is=0A=
the security model. The web server runs CGI scripts as nobody, but we=0A=
need to act as the moderator user (whoever owns the moderation spool) in=0A=
order to lock, delete, edit, and move messages.=0A=
=0A=
I consider it to be an absolute requirement that any web front end work=0A=
across a wide variety of browsers. That means no requirement of frames,=0A=
no Java, no JavaScript, and no plug-ins. It's possible to get around =
some=0A=
of the below concerns by using those tools, but at a severe degredation =
of=0A=
portability and an increase in the number of different languages things=0A=
have to be written in.=0A=
=0A=
This also won't be as portable in terms of setup, as most anyone with=0A=
procmail and a reasonably cooperative ISP should be able to set up the=0A=
e-mail interface, but the web interface requires CGI script support and=0A=
quite probably either a long-running daemon or a setuid program.=0A=
=0A=
There are three basic ways to allow the web server, running CGI scripts,=0A=
to access and manipulate the moderation queue:=0A=
=0A=
=3Dover 2=0A=
=0A=
=3Ditem *=0A=
=0A=
Have the web server run the CGI scripts as the moderator user. This in=0A=
practice will require a setuid program to change users from nobody to the=0A=
moderator user. I'm extremely reluctant to use setuid programs, as are=0A=
many other system administrators, so it may be difficult in practice to=0A=
take this course of action. This would probably be ideal if the process=0A=
of dropping priviledges were totally secure, but it's difficult to ensure=0A=
that.=0A=
=0A=
=3Ditem *=0A=
=0A=
Have the moderation queue be owned by the web server user. I think this=0A=
is a bad idea, as then any security compromise anywhere in the web system=0A=
results in a compromise of moderation queue. It's probably safe in=0A=
practice, under most cases, but like setuid programs I'd rather avoid=0A=
doing things like this.=0A=
=0A=
=3Ditem *=0A=
=0A=
There can be some sort of interface between programs that run as the=0A=
moderator user and programs that run unauthenticated. Two ways in which=0A=
this can be done is to create a file of commands which is read=0A=
periodically or to have a local Unix domain socket that accepts commands=0A=
from unauthenticated users. (The Unix domain socket idea can be expanded=0A=
to accepting network connections if desired.) The disadvantage of this=0A=
approach is that it requires a long-running daemon which is difficult to=0A=
write correctly (as it would probably have to fork) and which may have to=0A=
be written in C until Perl has reliable signal handling.=0A=
=0A=
=3Dback=0A=
=0A=
All of these solutions have their advantages and disadvantages; it would=0A=
probably be a good idea to support all three. I'd be very interested in=0A=
other alternatives as well, particularly designs that avoid the drawbacks=0A=
of these.=0A=
=0A=
One possibility that has come to mind is that the web interface could =
send=0A=
e-mail, which would allow the web interface to leverage off of the=0A=
existing e-mail interface. The difficulty there is lack of immediate=0A=
response; the mail message is sent, and then the CGI script has no real=0A=
way of knowing whether and when it has been acted upon.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/THANKS=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00100644 =00 764 =00 0 =00 14373 6514434404 =
12241=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00This file is =
ordered roughly chronologically (meaning that I add new=0A=
entries to the bottom of the file and don't change the order of existing=0A=
ones except to go back and add to already existing entries). I =
considered=0A=
breaking things up between major and minor contributions, but that's=0A=
obvious from the text, and no contribution is too minor to be greatly=0A=
appreciated.=0A=
=0A=
The (growing) length of this file is a testimony to the efficacy of the=0A=
free software community, which is a community in action as well as name=0A=
and includes some of the most helpful, intelligent, patient, and gracious=0A=
people I have had the honor of dealing with.=0A=
=0A=
Larry Wall, et. al.=0A=
For Perl, without which this program would be at least twice as long=0A=
and probably wouldn't be finished yet; for the infrastructure that=0A=
made the modular concept both possible and easy to implemen; and for=0A=
the inspiration to everyone who writes free software.=0A=
=0A=
The rec.arts.comics.creative community=0A=
My alpha testers at every phase of the development of this package,=0A=
they've seen more versions and more bugs than anyone else other than=0A=
me. Their excellent problem reports and gracious tolerance for the=0A=
inevitable problems made this project possible.=0A=
=0A=
Daniel P. Faigin <faigin@shamash.org>=0A=
Provided the starting point for the list of mail headers to drop from=0A=
a news post. The code I wrote from this information has long since=0A=
migrated out of this module and been rethought from scratch, but it=0A=
was greatly appreciated at the time.=0A=
=0A=
Betty Lee <bettylee@leland.stanford.edu>=0A=
Provided the initial idea for the header rewrite rules and who helped=0A=
with early testing by using gateway as Stanford's mail to news =
gateway=0A=
for internal newsgroups. Also implemented the original code that=0A=
became the previoushop module (but relying on a sendmail rewrite hack=0A=
to do it) and gave me the idea of how to do it. Provided the news=0A=
error status codes that indicated temporary errors for me early on,=0A=
and requested the prepend directive for the headers module. Also the=0A=
source of the idea behind the previoushop module.=0A=
=0A=
Larry Schwimmer <schwim@cs.stanford.edu>=0A=
Suggested the autoreply feature, which now exists in a much altered=0A=
form, served as a sounding board, and gave advice on numerous aspects=0A=
of the program and documentation.=0A=
=0A=
Matt Petach <mpetach@netflight.com>=0A=
Prompted me to add support for wildcards in group directives, which=0A=
now needs more work *again*, requested the nntpserver directive which=0A=
has disappeared again and will be showing up in the form of the=0A=
example mail to news gateway, and pointed out that not all vendor=0A=
versions of cp have the -f flag. This is one of the few areas where=0A=
switching to ExtUtils::MakeMaker actually created *fewer* problems.=0A=
=0A=
Andrew Gierth <andrew@erlenstar.demon.co.uk>=0A=
When told that I was writing a module to handle robomoderation and=0A=
mail to news gatewaying, Andrew mentioned that he'd already written a=0A=
News::Article class to encapsulate manipulation of articles for a=0A=
similar application. At which point, I asked myself why I didn't do=0A=
that in the first place and took an extended break from working on=0A=
this module to send him patches and suggestions for his. Most of the=0A=
low-level manipulations of articles is now handled seamlessly by his=0A=
module and I don't even have to think about it. It's wonderful. The=0A=
mailpath code is also based on Andrew's original work, and many of =
the=0A=
improvements and additions to News::Gateway have been inspired by his=0A=
comments.=0A=
=0A=
Jeremy Billones <billones@primenet.com>=0A=
Needed the ability to give the keywords module a regex to specify how=0A=
to obtain keywords from the Subject line. Also needed a way of=0A=
limiting and controlling crossposting for rec.arts.comics.reviews,=0A=
which served as the inspiration for the crosspost module, and wanted=0A=
the ability to have posters include headers at the beginnings of=0A=
messages, which prompted the bodyheaders module.=0A=
=0A=
Chris Meadows <robotech@eyrie.org>=0A=
The rec.games.mecha charter requires some keyword, but doesn't have a=0A=
set list of keywords, thus requiring the anykeyword module. It also=0A=
requires banning of binaries, which provided the motivation for=0A=
writing the nobinaries module.=0A=
=0A=
George A. Theall <george.a.theall@mail.tju.edu>=0A=
Wrote the program purge-binaries, which takes a channel feed from a=0A=
news server and removes binaries from the spool. The isBinary()=0A=
method of this program provides the heart of the binary detection=0A=
logic in the nobinaries module.=0A=
=0A=
Tim Skirvin <tskirvin@uiuc.edu>=0A=
First person to use my original gateway script as a robomoderator=0A=
(with modifications). Also gave me the idea to check for base64 in=0A=
Content-Transfer-Encoding when checking for binaries.=0A=
=0A=
Christopher Davis <ckd@loiosh.kei.com>=0A=
Provided the original script on which listgate was based, as well as=0A=
motivation for writing the listgate example, and let me use his ideas=0A=
and his code for it. Also provided the m4 file and the =
documentation,=0A=
and provided the initial implementation of the mungeids module and =
the=0A=
post_ihave() and post_program() methods.=0A=
=0A=
Ollivier Robert <roberto@keltia.freenix.fr>=0A=
Found a bug in the newsgroups module (addresses not being downcased=0A=
before being checked against regex patterns that were downcased).=0A=
=0A=
Jeff Garzik <jeff.garzik@spinne.com>=0A=
Found a bug in the documentation of how to call the News::Gateway=0A=
constructor and also pointed out that post() should take a hostname =
or=0A=
Net::NNTP connection as an optional argument.=0A=
=0A=
Tom Hughes <tom@compton.demon.co.uk>=0A=
Found various bugs in mailtonews' extraction of message IDs from the=0A=
In-Reply-To header.=0A=
=0A=
Jon Lennox <lennox@cs.columbia.edu>=0A=
Noticed that backslashes didn't work as expected outside of double=0A=
quotes in configuration directives and that line continuation in=0A=
config files wasn't handled as neatly as it could be. Both problems=0A=
have now been fixed.=0A=
=0A=
Curtis (Jewell) Whalen <curtis_whalen@geocities.com>=0A=
Provided a *lot* of new ideas and new modules that I still need to =
add=0A=
into the standard distribution. Also tested News::Gateway on Windows=0A=
95 and confirmed that it worked correctly there (with some tweaks to=0A=
News::Article).=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/VERSION.pm=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100644 =
=00 764 =00 0 =00 50 6514123274 12714=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00package =
News::Gateway;=0A=
$VERSION =3D 0.42;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway=
-0.42/MANIFEST=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00100644 =00 764 =00 0 =00 1727 =
6514123600 12427=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00ChangeLog=0A=
MANIFEST=0A=
Makefile.PL=0A=
News/Gateway.in=0A=
README=0A=
THANKS=0A=
TODO=0A=
VERSION.pm=0A=
doc/moderate.pod=0A=
examples/listgate=0A=
examples/listgate.m4=0A=
examples/listgate.readme=0A=
examples/raccmod=0A=
examples/raccpost=0A=
examples/racrmod=0A=
makepm.PL=0A=
makepod.PL=0A=
modules/anykeyword.al=0A=
modules/bodyheaders.al=0A=
modules/cleanbody.al=0A=
modules/config.al=0A=
modules/crosspost.al=0A=
modules/hash.al=0A=
modules/headers.al=0A=
modules/keywords.al=0A=
modules/mail.al=0A=
modules/mailpath.al=0A=
modules/mailtonews.al=0A=
modules/moosesign.al=0A=
modules/mungeids.al=0A=
modules/newsgroups.al=0A=
modules/newstomail.al=0A=
modules/nobinaries.al=0A=
modules/post.al=0A=
modules/previoushop.al=0A=
modules/whitelist.al=0A=
pod/REWRITE=0A=
pod/UTILITY=0A=
pod/anykeyword.pod=0A=
pod/bodyheaders.pod=0A=
pod/cleanbody.pod=0A=
pod/config.pod=0A=
pod/crosspost.pod=0A=
pod/hash.pod=0A=
pod/headers.pod=0A=
pod/keywords.pod=0A=
pod/mail.pod=0A=
pod/mailpath.pod=0A=
pod/mailtonews.pod=0A=
pod/master.pod=0A=
pod/moosesign.pod=0A=
pod/mungeids.pod=0A=
pod/newsgroups.pod=0A=
pod/newstomail.pod=0A=
pod/nobinaries.pod=0A=
pod/post.pod=0A=
pod/previoushop.pod=0A=
pod/whitelist.pod=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/News/=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00 40755 =00 764 =00 0 =00 0 6515062264 =
12117=00 =
5=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.42/News/G=
ateway.in=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
100444 =00 764 =00 0 =00 22267 6514174527 14201=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# News::Gateway -- =
Mail and news gatewaying toolkit. -*- perl -*-=0A=
# $Id: Gateway.in,v 0.43 1998/04/12 17:26:47 eagle Exp $=0A=
#=0A=
# Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>=0A=
#=0A=
# This program is free software; you can redistribute it and/or modify it=0A=
# under the same terms as Perl itself.=0A=
#=0A=
# "Obviously unlike you people, I don't have time to edit the newsgroups=0A=
# line for every single article I post."=0A=
# -- markl@cs.yale.edu, in the midst of a huge=0A=
# flamewar about COBOL crossposted to too many=0A=
# newsgroups including alt.folklore.computers.=0A=
=0A=
#########################################################################=
###=0A=
# Modules, declarations, and site configuration=0A=
#########################################################################=
###=0A=
=0A=
package News::Gateway;=0A=
require 5.003;=0A=
=0A=
use News::Article ();=0A=
=0A=
use strict;=0A=
use vars qw($AUTOLOAD $FAILCODE %HOOKS $VERSION);=0A=
=0A=
# The current News::Gateway version number, which is not the same as the =
RCS=0A=
# revision of this file. Picked up during build time.=0A=
# @@ VERSION=0A=
=0A=
# Exit code that should be used to indicate permanent failure. This =
should=0A=
# be 100 for qmail and probably be 64 for sendmail (EX_USAGE), although =
you=0A=
# may want to pick some other sendmail status (there are so many to =
choose=0A=
# from....).=0A=
$FAILCODE =3D 64;=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Gateway module hooks=0A=
#########################################################################=
###=0A=
=0A=
# News::Gateway implements a generic robomoderation framework that =
provides=0A=
# a series of setup and utility functions and the means for various =
modules=0A=
# to be easily plugged into a generic framework. All article checks and=0A=
# rewrites are performed by modules, not this core code. The following=0A=
# table is used to associate modules with configuration file directives =
so=0A=
# that configuration information can be passed to the modules, as well =
as to=0A=
# tell News::Gateway what modules exist.=0A=
#=0A=
# The general syntax is as follows:=0A=
#=0A=
# module1 =3D> ['config1', 'config2'],=0A=
# module2 =3D> ['config3'],=0A=
# module3 =3D> [],=0A=
#=0A=
# This registers message mangling hooks for module1, module2, and =
module3,=0A=
# and also sets up a callback module1_conf that's called for =
configuration=0A=
# lines starting with 'config1' or 'config2' and a callback module2_conf=0A=
# that's called for configuration lines starting with 'config3'.=0A=
=0A=
# @@ Begin automatically generated section -- do not edit.=0A=
# @@ End automatically generated section -- do not edit.=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Gateway module loading=0A=
#########################################################################=
###=0A=
=0A=
# We can't quite use AutoLoader, although we're going to do something =
very=0A=
# similar, because the name of the file to be imported isn't going to be =
the=0A=
# same as the called sub. We're being very strange, tricky, and subtle.=0A=
# The name of the module to load will be the sub we tried to call, with =
any=0A=
# trailing underscore and letters after an underscore stripped off and a =
.al=0A=
# appended. We'll look in the standard autoload directory for it. Most =
of=0A=
# this code is derived from AutoLoader.pm.=0A=
sub AUTOLOAD {=0A=
my ($package, $module) =3D ($AUTOLOAD =3D~ /(.*)::([^:]+)$/);=0A=
$package =3D~ s%::%/%;=0A=
$module =3D~ s/_[^_]+$//;=0A=
=0A=
# If our package has been loaded, which it should have been, we can=0A=
# derive the name of the directory our modules are in from it.=0A=
# Otherwise, we'll do a full @INC search for the module we're looking=0A=
# for.=0A=
my $name =3D $INC{"$package.pm"};=0A=
if ($name) {=0A=
$name =3D~ s%^(.*)$package\.pm$%$1auto/$package/$module.al%;=0A=
undef $name unless (-r $name);=0A=
}=0A=
unless ($name) { $name =3D "auto/$package/$module.al" }=0A=
=0A=
# Now comes the fun. We try to load the module. If the routine =
trying=0A=
# to be autoloaded is DESTROY or import, we generate a null one on =
the=0A=
# fly to avoid annoying error messages at shutdown or use time.=0A=
#=0A=
# We have to handle a few things specially here. First, if the sub =
that=0A=
# we're trying and failing to autoload is mail_error() (which may be=0A=
# called by error()), then we have a major problem and need to avoid=0A=
# calling more methods. Second, if the first argument to the sub =
isn't=0A=
# a reference (meaning that they're not calling a method), we can't =
then=0A=
# call our error() method since we don't have an object. (This =
should=0A=
# really be fixed by making error() robust in that case....)=0A=
my $save =3D $@;=0A=
eval { require $name };=0A=
if ($@) {=0A=
$@ =3D~ s/ at .*\n//;=0A=
if (substr ($AUTOLOAD, -9) eq '::DESTROY'=0A=
|| substr ($AUTOLOAD, -8) eq '::import') {=0A=
*$AUTOLOAD =3D sub {};=0A=
} elsif (substr ($AUTOLOAD, -12) eq '::mail_error') {=0A=
warn "Autoload of $AUTOLOAD failed: $@\n";=0A=
warn "Unable to autoload error methods, aborting\n";=0A=
exit $FAILCODE;=0A=
} elsif (not ref $_[0]) {=0A=
warn "Autoload of $AUTOLOAD failed: $@\n";=0A=
warn "Attempted to autoload non-method, aborting\n";=0A=
exit $FAILCODE;=0A=
} else {=0A=
$_[0]->error ("Autoload of $AUTOLOAD failed: $@");=0A=
}=0A=
}=0A=
$@ =3D $save;=0A=
goto &$AUTOLOAD;=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Creation and initialization of a new gateway=0A=
#########################################################################=
###=0A=
=0A=
# This method creates a new gateway object. It takes arguments =
specifying=0A=
# whether we're running interactively (if we are, errors can be dealt =
with=0A=
# by dying; otherwise, we need to send mail), the maintainer =
(administrative=0A=
# contact address) which defaults to the user we're running as if none is=0A=
# given, and the envelope sender that should be used for any and all =
replies=0A=
# to articles.=0A=
sub new {=0A=
my $that =3D shift;=0A=
my $class =3D ref $that || $that;=0A=
my ($interactive, $maintainer, $envelope) =3D @_;=0A=
unless ($maintainer) { $maintainer =3D (getpwuid ($<))[0] }=0A=
unless ($envelope) { $envelope =3D $maintainer }=0A=
my $self =3D {=0A=
confhooks =3D> {},=0A=
mesghooks =3D> [],=0A=
envelope =3D> $envelope,=0A=
interactive =3D> $interactive,=0A=
maintainer =3D> $maintainer=0A=
};=0A=
bless ($self, $class);=0A=
}=0A=
=0A=
# Takes a list of modules as arguments and installs all of the callbacks =
for=0A=
# those modules (as determined by the %HOOKS hash defined above). The=0A=
# arguments to this constructor can just be a list of modules, or can be =
an=0A=
# intermixed list of modules and module/argument pairs. Arguments must =
be=0A=
# anonymous arrays, and if arguments are present for a module, they're=0A=
# passed in to the _init method of the module.=0A=
sub modules {=0A=
my $self =3D shift;=0A=
my $module;=0A=
while (defined ($module =3D shift)) {=0A=
unless (defined $HOOKS{$module}) {=0A=
$self->error ("Unknown module $module");=0A=
}=0A=
my @hook =3D @{$HOOKS{$module}};=0A=
if (ref $_[0]) {=0A=
my $method =3D $module . '_init';=0A=
$self->$method (@{+shift});=0A=
}=0A=
push (@{$$self{mesghooks}}, $module);=0A=
for (@hook) { push (@{$$self{confhooks}{$_}}, $module) }=0A=
}=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Message handling=0A=
#########################################################################=
###=0A=
=0A=
# Read in the article from a source, returning undef if this fails =
(either=0A=
# because no data is available or because the size limits are exceeded) =
and=0A=
# the number of bytes read if it succeeds. This is mostly just a wrapper=0A=
# around the News::Article constructor.=0A=
sub read {=0A=
my $self =3D shift;=0A=
$$self{article} =3D News::Article->new (@_);=0A=
}=0A=
=0A=
# Apply the given modules, or if none are given, apply all of the ones we=0A=
# have pending. Each hook should return undef on success and a string=0A=
# indicating the error message on failure; as soon as any hook fails, =
this=0A=
# method aborts and returns a list consisting of the name of the module =
that=0A=
# failed and the error message in an array context or the message =
prepended=0A=
# with the name of the module in a scalar context.=0A=
sub apply {=0A=
my $self =3D shift;=0A=
my @modules =3D @_ ? @_ : @{$$self{mesghooks}};=0A=
for (@modules) {=0A=
my $module =3D $_ . '_mesg';=0A=
my $error =3D $self->$module ();=0A=
if ($error) { return wantarray ? ($_, $error) : "$_: $error" }=0A=
}=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Error handling=0A=
#########################################################################=
###=0A=
=0A=
# Handle a fatal script error. This shouldn't be used for article=0A=
# rejections, only for syntax errors, fatal system problems, and the =
like.=0A=
# If we're interactive, we just die with the error message; otherwise, we=0A=
# call mail_error().=0A=
sub error {=0A=
my ($self, $error) =3D @_;=0A=
if ($$self{interactive}) {=0A=
die $error . "\n";=0A=
} else {=0A=
$self->mail_error ($error);=0A=
}=0A=
}=0A=
=0A=
=0A=
#########################################################################=
###=0A=
# Accessors=0A=
#########################################################################=
###=0A=
=0A=
# Return a reference to the underlying article.=0A=
sub get_article { $_[0]{article} }=0A=
=0A=
# Replace the current article with a new News::Article reference.=0A=
sub set_article { $_[0]{article} =3D $_[1] }=0A=
=0A=
1;=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00Gateway-0.42/makepm.PL=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =
=00 4605 6514123416 13006=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# makepm.PL -- =
Builds News/Gateway.pm from News/Gateway.in.=0A=
# $Id: makepm.PL,v 0.3 1998/04/12 11:35:42 eagle Exp $=0A=
=0A=
# First, grab the line to set the version number, since we'll need to=0A=
# substitute that in to News/Gateway.pm when we build it. It's the =
second=0A=
# line of VERSION.pm.=0A=
open (VERSION, 'VERSION.pm') or die "Cannot open VERSION.pm: $!\n";=0A=
<VERSION>;=0A=
my $version =3D <VERSION>;=0A=
close VERSION;=0A=
=0A=
# Build a list of all of the available modules and their exported =
interface=0A=
# by trolling through the .al files in the modules directory and looking =
for=0A=
# a line that looks like:=0A=
#=0A=
# @@ Interface: ['directive', 'directive']=0A=
#=0A=
# .al files without a line like that will be presumed to be utility =
modules=0A=
# and won't be added to the hooks in News::Gateway proper.=0A=
opendir (MODULES, 'modules') or die "Cannot open directory modules: =
$!\n";=0A=
my ($module, %interfaces);=0A=
for $file (grep { /\.al$/ && !/^\./ } readdir MODULES) {=0A=
open (MODULE, "modules/$file")=0A=
or die "Cannot open module modules/$file: $!\n";=0A=
while (<MODULE>) {=0A=
chomp;=0A=
if (/^\# \@\@ Interface:\s+(.*)/) {=0A=
my $interface =3D $1;=0A=
my $module =3D $file;=0A=
$module =3D~ s/\.al$//;=0A=
$interfaces{$module} =3D $interface;=0A=
last;=0A=
}=0A=
}=0A=
close MODULE;=0A=
}=0A=
closedir MODULES;=0A=
=0A=
# For nice printing, figure out how long the longest module name is.=0A=
my $max =3D 0;=0A=
for (keys %interfaces) {=0A=
if (length $_ > $max) { $max =3D length $_ }=0A=
}=0A=
=0A=
# We now have a complete hash of the modules and their interfaces in=0A=
# %interfaces. Open up our input file (News/Gateway.in) and our output=0A=
# file, the final module (News/Gateway.pm) and replace the interface =
section=0A=
# with our generated interface. We also replace the marker for the =
version=0A=
# number with the version string read in from VERSION above.=0A=
open (IN, 'News/Gateway.in') or die "Cannot open News/Gateway.in: $!\n";=0A=
open (OUT, '>News/Gateway.pm') or die "Cannot create News/Gateway.pm: =
$!\n";=0A=
while (<IN>) {=0A=
if (/^\# @@ VERSION/) { print OUT $version; next }=0A=
print OUT;=0A=
if (/^\# \@\@ Begin automatically generated section/) {=0A=
print OUT '%HOOKS =3D (';=0A=
my $first =3D 1;=0A=
my $module;=0A=
for $module (sort keys %interfaces) {=0A=
if ($first) { $first =3D 0 } else { print OUT ",\n =
" }=0A=
printf OUT ("%-${max}s =3D> %s", $module, =
$interfaces{$module});=0A=
}=0A=
print OUT ");\n";=0A=
}=0A=
}=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gate=
way-0.42/Makefile.PL=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 2546 =
6514123471 13254=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# Makefile.PL for =
News::Gateway module=0A=
# $Id: Makefile.PL,v 0.10 1998/04/12 11:36:24 eagle Exp $=0A=
use ExtUtils::MakeMaker;=0A=
=0A=
# We want to automatically detect and make a list of all add-on modules =
in=0A=
# the modules directory at the time of installation. That's what this =
sub=0A=
# does. It returns a list of module and install location pairs, where =
the=0A=
# install location is relative to $(INST_LIBDIR).=0A=
sub find_modules {=0A=
opendir (MODULES, 'modules')=0A=
or die "Cannot find modules directory: $!\n";=0A=
map { 'modules/' . $_, '$(INST_AUTODIR)/' . $_ }=0A=
grep { !/^\./ && $_ ne 'RCS' }=0A=
readdir MODULES;=0A=
}=0A=
=0A=
# Now write out the actual Makefile using that information.=0A=
my $modules =3D {=0A=
'News/Gateway.pm' =3D> '$(INST_LIBDIR)/Gateway.pm',=0A=
'News/Gateway.pod' =3D> '$(INST_LIBDIR)/Gateway.pod',=0A=
find_modules=0A=
};=0A=
WriteMakefile (=0A=
NAME =3D> 'News::Gateway',=0A=
DISTNAME =3D> 'Gateway',=0A=
MAN3PODS =3D> { 'News/Gateway.pod' =3D>=0A=
'$(INST_MAN3DIR)/News::Gateway.3' },=0A=
PL_FILES =3D> { 'makepod.PL' =3D> 'News/Gateway.pod',=0A=
'makepm.PL' =3D> 'News/Gateway.pm' },=0A=
PM =3D> $modules,=0A=
PREREQ_PM =3D> { 'News::Article' =3D> 1.07 },=0A=
VERSION_FROM =3D> 'VERSION.pm',=0A=
dist =3D> { COMPRESS =3D> 'gzip', SUFFIX =3D> 'gz' },=0A=
realclean =3D> { FILES =3D> 'News/Gateway.pod News/Gateway.pm' }=0A=
);=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00Gateway-0.42/ChangeLog=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00100644 =00 764 =00 0 =
=00 110357 6515062253 13117=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Wed Apr 15 =
00:14:20 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* News/Gateway.in: Version 0.42 released.=0A=
=0A=
* pod/mailtonews.pod: Document compaction of continuation lines =
in=0A=
the From header.=0A=
=0A=
* modules/mailtonews.al: Replace all newlines in the From header=0A=
with spaces, since INN doesn't support addresses on continuation=0A=
lines of the From header.=0A=
=0A=
Tue Apr 14 02:01:59 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/newsgroups.pod: Document the new fatal error message.=0A=
=0A=
* modules/newsgroups.al: Throw a fatal error if no primary=0A=
newsgroup was specified.=0A=
=0A=
* examples/raccpost: newsgroups requires an argument, so pull =
that=0A=
off the command line or default to rec.arts.comics.creative and=0A=
modify the handling of -f accordingly.=0A=
=0A=
Mon Apr 13 10:28:07 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/newsgroups.al: Fixed an obvious bug in extraction of=0A=
newsgroups from To and Cc addresses.=0A=
=0A=
* pod/headers.pod: Incorrectly said the module couldn't fail.=0A=
=0A=
* pod/hash.pod: Added a warning that the interface of this module=0A=
will be changing.=0A=
=0A=
* modules/mungeids.al: If, after filtering the Newsgroups header=0A=
through our regexes, we have no groups left, then just exit=0A=
quietly and don't munge anything.=0A=
=0A=
* pod/config.pod: Added a large security warning about the =
dangers=0A=
of untrusted access to configuration directives and the =
importance=0A=
of doing security checking before modules have access to them.=0A=
=0A=
* pod/master.pod: Cleaned up more of the old refereneces to=0A=
config_file(), adding in references to config(), and tweaked some=0A=
of the documentation to reflect that apply() can now take=0A=
arguments.=0A=
=0A=
* pod/mungeids.pod: Added documentation of the new configuration=0A=
directive and the new stripping behavior, cleaned up some of the=0A=
documentation of how this module behaves with crossposted=0A=
articles.=0A=
=0A=
* modules/mungeids.al: Added a configuration directive giving=0A=
regexes specifying which newsgroups should be used in =
constructing=0A=
the munge. Also tweaked the regex used to match existing munges=0A=
(we now no longer support newsgroup names not containing a =
period,=0A=
but that's a small price to pay to avoid false positives on =
nearly=0A=
all news.answers articles) and modified to strip prefixes from =
the=0A=
message ID too (since followups will get that stripped anyway, we=0A=
should do it with the first post). Fixed a few compiler =
warnings.=0A=
=0A=
Sun Apr 12 02:12:38 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mail.al: Don't assume that News::FormReply is already=0A=
loaded, since we no longer load it by default.=0A=
=0A=
* modules/config.al: Added the necessary support for allowing=0A=
several modules to register interest in a given configuration=0A=
directive. We now pass the parsed directive along to every =
module=0A=
that was interested in it.=0A=
=0A=
* News/Gateway.in: Don't load News::FormReply by default, set the=0A=
envelope sender to the maintainer by default, allow multiple=0A=
modules to register interest in the same configuration directive=0A=
by storing an anonymous array of interested modules for each=0A=
directive, just call the News::Article constructor directly in=0A=
read(), reformatted code a bit and reworked some comments.=0A=
=0A=
* pod/config.pod: Tweaked the wording a bit to reflect the fact=0A=
that backslashes now work outside of double quotes, and added a=0A=
note that continuation lines inside double quotes will result in =
a=0A=
literal newline being part of the string.=0A=
=0A=
* modules/config.al: Cleaned up config_parse() to allow embedded=0A=
newlines in strings, to support backslashes outside of double=0A=
quotes, and to remove duplicate code. Also cleaned up=0A=
config_file() a bit and caused it to pass the embedded newlines=0A=
from continued lines directly along to the parser (the=0A=
implications of which are that a continued line inside double=0A=
quotes results in an embedded newline in the string).=0A=
=0A=
* pod/mungeids.pod: Document the stripping of things that look=0A=
like prefixes.=0A=
=0A=
* modules/mungeids.al: Strip off anything that looks like a=0A=
mungeids prefix from the message IDs in the References header=0A=
before adding our prefix, to prevent message threads in multiple=0A=
mungeid'd groups from acquiring new prefixes in the References=0A=
message IDs every round of replies.=0A=
=0A=
* examples/racrmod: Use mail() rather than mail_forward(), =
cleaned=0A=
up some formatting.=0A=
=0A=
* examples/raccpost: Support a -f flag that means to allow=0A=
crossposts to any groups, use mail() rather than mail_forward().=0A=
=0A=
* examples/raccmod: Use mail() rather than the now-deprecated=0A=
mail_forward().=0A=
=0A=
* Makefile.PL: Version information is now stored in VERSION.pm.=0A=
=0A=
* makepm.PL: Grab the version number from the second line of=0A=
VERSION.pm instead of the first line of VERSION (since we're=0A=
renaming VERSION to VERSION.pm and including package information=0A=
so that PAUSE will put this module in the right place).=0A=
=0A=
* pod/headers.pod: Added documentation of the Invalid header=0A=
failure message.=0A=
=0A=
* modules/headers.al: Added support for multiple directives=0A=
affecting the same header (they'll all be applied in order), =
added=0A=
a "reject" action that will return an error if the given header =
is=0A=
present in the incoming message, fixed ifempty (typo in the name=0A=
of the directive), special-cased a Subject of (none) due to the=0A=
way that mailtonews works to be equivalent to an empty subject.=0A=
=0A=
* pod/mailtonews.pod: Added documentation of the "Empty body"=0A=
failure message and tweaked the documentation of In-Reply-To=0A=
lifting.=0A=
=0A=
* modules/mailtonews.al: Added a check for messages with an empty=0A=
body, tweaked the regex for matching valid message IDs some more=0A=
(both where we check the existing Message-ID header and where we=0A=
look at the In-Reply-To header to see if we want to lift anything=0A=
up to the References header).=0A=
=0A=
* pod/newsgroups.pod: Rewrote the documentation of what we do in=0A=
an attempt to make it clearer and to add some details about the=0A=
new complexity of how we handle supplied Newsgroups headers. =
This=0A=
isn't nearly as complete as the source code comments, but should=0A=
provide most of the relevant details.=0A=
=0A=
* modules/newsgroups.al: *Heavily* reworked the actual message=0A=
rewriting rules and included a *lot* of comments about what we're=0A=
doing here, how, and why. We should now correctly handle quite a=0A=
few more cases, including addressing the whole issue of what to =
do=0A=
when we have an incoming Newsgroups header rather than simply=0A=
always using it. The code is much cleaner, and much more heavily=0A=
commented. We also rename the Newsgroups header and the=0A=
Message-ID header when we think we should to reduce the chance of=0A=
duplicate errors when posting. Did I mention comments?=0A=
=0A=
Wed Mar 25 03:38:10 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/hash.pod: New file.=0A=
=0A=
* modules/hash.al: New file.=0A=
=0A=
* pod/newstomail.pod: New file.=0A=
=0A=
* modules/newstomail.al: New file.=0A=
=0A=
* pod/mail.pod: Removed documentation of mail_forward(), added=0A=
documentation of mail() and expanded the documentation to include=0A=
the no address and multiple address cases. Added a note that=0A=
mail_forward() is deprecated.=0A=
=0A=
* modules/mail.al: Added mail() with the same functionality as =
the=0A=
old mail_forward() except that null address lists actually work=0A=
now. Deprecated mail_forward().=0A=
=0A=
Mon Feb 23 16:03:55 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailtonews.al: Move the In-Reply-To into References =
even=0A=
if there is no existing References header.=0A=
=0A=
Sun Feb 22 16:09:25 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* News/Gateway.in: Version 0.41 released.=0A=
=0A=
* modules/mailtonews.al: The extraction of message IDs from=0A=
In-Reply-To was pretty severely broken. Match our regex against=0A=
the In-Reply-To header, not against $_, don't anchor it as many=0A=
mailers surround it with other text, and make sure that a=0A=
References header exists before we split it.=0A=
=0A=
Fri Feb 20 00:04:35 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailpath.al: Need to allow space after the Received:=0A=
part of the header or this will never match.=0A=
=0A=
Thu Feb 19 00:36:12 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mungeids.al: Make the munge in the case of crossposting=0A=
independent of the order of the groups on the Newsgroups line.=0A=
=0A=
* examples/listgate.m4: New file.=0A=
=0A=
* examples/listgate.readme: New file.=0A=
=0A=
* examples/listgate: Reworked to use the new post_*() methods =
from=0A=
News::Gateway and to use the new mungeids module rather than=0A=
rolling our own, some comment and default tweaks, changed @rnews=0A=
to an array rather than a scalar to allow safe exec, changed to=0A=
use config() rather than config_line().=0A=
=0A=
Wed Feb 18 13:50:41 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* makepm.PL: Obtain the version number from VERSION and =
substitute=0A=
it into News/Gateway.pm.=0A=
=0A=
* Makefile.PL: Obtain the version number from VERSION rather than=0A=
News/Gateway.in.=0A=
=0A=
* pod/master.pod: Removed the documentation for post(), as this =
is=0A=
now in its own module, added a reference to it at the top of the=0A=
list of methods, and added the diagnostic for attempting to load =
a=0A=
Perl module and failing.=0A=
=0A=
* pod/post.pod: New file.=0A=
=0A=
* modules/post.al: New file.=0A=
=0A=
* News/Gateway.in: Removed the post() method, as this is now in =
an=0A=
autoloaded module. Also removed the version number, so that it=0A=
can be added automatically during the build process. Starting=0A=
with this revision, the version number of the News::Gateway=0A=
package as a whole is not the same as the RCS revision of this=0A=
file.=0A=
=0A=
* pod/mungeids.pod: New file.=0A=
=0A=
* modules/mungeids.al: New file.=0A=
=0A=
Fri Feb 13 22:12:09 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/master.pod: News::Gateway->new, not News::Gateway::new.=0A=
D'oh.=0A=
=0A=
Mon Jan 19 01:58:38 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/newsgroups.al: Downcase an e-mail address before=0A=
checking it against a pattern associated with a group, since we=0A=
already downcased the pattern and since case in addresses is=0A=
nearly always insignificant.=0A=
=0A=
* modules/mailpath.al: Updated to handle qmail Received headers=0A=
with ident responses (including the null response) and the =
headers=0A=
qmail generates when host lookup fails. Also added support for=0A=
"from hostname [1.2.3.4]", which is generated by a few places=0A=
despite the fact that it's invalid under RFC 822.=0A=
=0A=
* pod/master.pod: Added documentation of the new apply() =
behavior.=0A=
=0A=
* pod/config.pod: Added documentation of the new config() method.=0A=
=0A=
* modules/config.al: Added a config() method that can be called=0A=
directly and which just passes an argument list along to the=0A=
callbacks, modified config_line() to call it, cleaned up some=0A=
comments.=0A=
=0A=
* News/Gateway.in: Modified apply() so that it can take a list of=0A=
modules to apply, changed mesghooks so that it now contains a =
list=0A=
of modules rather than a list of methods to call, and removed $ID=0A=
from use vars as we no longer use it.=0A=
=0A=
Sun Jan 18 13:57:24 1998 Christopher Davis <ckd@loiosh.kei.com>=0A=
=0A=
* examples/listgate: Added the ability to post via IHAVE, added=0A=
message ID munging, added rnews injection capability, changed=0A=
various bits of documentation.=0A=
=0A=
Sun Jan 18 04:08:47 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* doc/moderate.pod: New file.=0A=
=0A=
Thu Jan 8 00:21:42 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* examples/listgate: Added a temporary failure exit on posting=0A=
problems, documented the reasoning behind that decision.=0A=
=0A=
Wed Jan 7 19:53:41 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* examples/listgate: New file.=0A=
=0A=
Tue Jan 6 18:56:52 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailtonews.al: When pulling message IDs out of=0A=
In-Reply-To for References, don't require that the message ID be=0A=
the only thing in In-Reply-To; sometimes it's followed by a space=0A=
and other text.=0A=
=0A=
Thu Jan 1 06:41:45 1998 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* examples/racrmod: New file.=0A=
=0A=
* News/Gateway.in: Revision 0.40 released.=0A=
=0A=
* News/Gateway.in: [Revision 0.40] Took out all of the config =
file=0A=
parsing and reading code, as this now belongs in the config=0A=
module. (Yay, the core is even smaller!) Also renamed=0A=
read_message() to read() and parse_message() to apply(), which=0A=
should make much more sense down the road. This should hopefully=0A=
be the last backwardsly-incompatible major interface change.=0A=
=0A=
* examples/raccpost: Modified for new News::Gateway calling=0A=
syntax.=0A=
=0A=
* examples/raccmod: Modified for new News::Gateway calling =
syntax,=0A=
added nobinaries to the list of modules that are applied.=0A=
=0A=
* modules/cleanbody.al: Added mapping of octal 0205 to --, =
another=0A=
one of Microsoft Word's annoyances, and added automatic stripping=0A=
of literal delete characters. (Gary's stories keep getting =
posted=0A=
containing them....)=0A=
=0A=
Tue Dec 30 08:45:23 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/config.pod: Added another error message from master.pod=0A=
that's config-specific.=0A=
=0A=
* pod/master.pod: Removed the config file stuff, which is now =
spun=0A=
off into config.pod, and changed the references to those routines=0A=
to use the new names. Also renamed read_message() to read() and=0A=
parse_message() to apply() throughout (hopefully), and moved the=0A=
error messages that are only generated by the config code out =
into=0A=
that documentation.=0A=
=0A=
* pod/config.pod: Added documentation of the fatal error message=0A=
from line parsing. Hopefully eventually we'll phase this out.=0A=
=0A=
* pod/config.pod: New file.=0A=
=0A=
* modules/config.al: New file.=0A=
=0A=
Mon Dec 29 03:24:26 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/headers.al: Added the prepend directive, which prepends=0A=
the given content to the first occurance of the given header.=0A=
This is mostly intended for use with Path headers, but may have=0A=
other applications (Subject comes to mind).=0A=
=0A=
* pod/headers.pod: Added documentation of the new prepend header=0A=
rewrite directive, and added documentation of the possible fatal=0A=
configuration error (which previously wasn't documented).=0A=
=0A=
* pod/previoushop.pod: New file.=0A=
=0A=
* modules/previoushop.al: New file.=0A=
=0A=
Fri Dec 26 00:09:09 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* News/Gateway.in: [Revision 0.39] Cleaned up some of the =
AUTOLOAD=0A=
handling, explicitly catching now the cases of failure to =
autoload=0A=
the mail_error() method and attempting to autoload a non-method =
so=0A=
that they don't attempt to call error() again. Also cleaned up=0A=
the comments for post(), which still referred to the excised=0A=
spooling code.=0A=
=0A=
* pod/bodyheaders.pod: New file.=0A=
=0A=
* modules/bodyheaders.al: New file.=0A=
=0A=
Thu Dec 25 10:27:57 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/crosspost.pod: New file.=0A=
=0A=
* modules/crosspost.al: New file.=0A=
=0A=
* examples/raccmod: Fixed the calling syntax for the constructor.=0A=
=0A=
* examples/raccpost: Fixed the calling syntax for the =
constructor,=0A=
added the additional global variables into use vars.=0A=
=0A=
* modules/nobinaries.al: Added in the check to ensure the body =
was=0A=
at least 40 lines when looking for encoded text, and changed the=0A=
message for base64 encoding detected by the body scan to use the=0A=
term base64 rather than the term MIME.=0A=
=0A=
* pod/nobinaries.pod: New file.=0A=
=0A=
* modules/nobinaries.al: New file.=0A=
=0A=
* examples/raccpost: Broken out a bit and commented considerably,=0A=
the maintainer address and list submission address moved to the=0A=
top and X'd out just in case.=0A=
=0A=
* examples/raccmod: Removed the unnecessary require line, since =
we=0A=
really don't care about a Perl version here.=0A=
=0A=
* examples/raccmod: Added lots of documentation and lots more=0A=
comments, removed the addresses of a few things just in case,=0A=
fixed the bug where some crossposted articles wouldn't get resent=0A=
to the mailing list by pulling out the Newsgroups header and=0A=
actually looking at it rather than relying on ARGV, added=0A=
eagle-aclnh@windlord.stanford.edu to the list of alt.comics.lnh=0A=
addresses.=0A=
=0A=
* News/Gateway.in: [Revision 0.38] Modified to be Gateway.in,=0A=
changed the default exit code to something compatible with=0A=
sendmail, removed the hooks in favor of building them in=0A=
makepm.PL, removed the local spooling code in post() since this =
is=0A=
the job of the calling program, cleaned up a few comments.=0A=
=0A=
* Makefile.PL: Added the POD file to the list of files to =
install,=0A=
added News::Article to the module prerequisites list, fixed a bug=0A=
in how I was specifying which files generated man pages, added =
the=0A=
PL file to generate the .pm to the list of things to run and =
added=0A=
the POD file and the .pm to the list of things to delete on make=0A=
realclean.=0A=
=0A=
Tue Dec 23 12:43:17 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* makepod.PL: Modified to use all-caps list files to find =
sub-PODs=0A=
to incorporate, since files beginning with . aren't included in=0A=
the distribution.=0A=
=0A=
* makepm.PL: New file.=0A=
=0A=
* modules/moosesign.al: Changed the interface line, since under=0A=
the new method we no longer require the initial 1 for message=0A=
rewrites.=0A=
=0A=
* Makefile.PL: Added instructions for how to build the POD=0A=
documentation.=0A=
=0A=
* makepod.PL: New file.=0A=
=0A=
* pod/master.pod: New file.=0A=
=0A=
* pod/mail.pod: New file.=0A=
=0A=
Mon Dec 22 01:38:47 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/whitelist.pod: New file.=0A=
=0A=
* pod/newsgroups.pod: New file.=0A=
=0A=
Sun Dec 21 23:25:20 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/headers.pod: New file.=0A=
=0A=
* pod/mailtonews.pod: New file.=0A=
=0A=
Sat Dec 20 15:17:30 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/moosesign.pod: New file.=0A=
=0A=
Sun Dec 14 08:46:11 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* pod/mailpath.pod: New file.=0A=
=0A=
* pod/keywords.pod: New file.=0A=
=0A=
* pod/cleanbody.pod: New file.=0A=
=0A=
* pod/anykeyword.pod: New file.=0A=
=0A=
* modules/anykeyword.al: Allow for Re: at the beginning of the=0A=
subject as well.=0A=
=0A=
Mon Nov 10 13:29:02 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* examples/raccmod: Added more comments for our envelope sender=0A=
hack, changed the keywords and whitelist files to point to their=0A=
new permanent locations.=0A=
=0A=
Sun Nov 9 10:06:47 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* examples/raccpost: New file.=0A=
=0A=
* examples/raccmod: Added forwarding of all successful posts to a=0A=
mailing list as well.=0A=
=0A=
* News/Gateway.pm: [Revision 0.37] Added hooks for anykeyword and=0A=
cleanbody, added accessor functions so that one can get at the=0A=
underlying News::Article object inside the Gateway object.=0A=
=0A=
* Makefile.PL: We now build the list of modules dynamically by=0A=
reading the module directory and don't need to play with either=0A=
special make rules or with external scripts. Much cleaner.=0A=
(Didn't need an external script after all.)=0A=
=0A=
* Makefile.PL: First pass at using an external script to build =
the=0A=
list of modules.=0A=
=0A=
* examples/raccmod: New file.=0A=
=0A=
Fri Oct 24 18:02:44 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/keywords.al: Added the ability to pass in an anonymous=0A=
sub that does the work of extracting keywords from the subject=0A=
line.=0A=
=0A=
* modules/newsgroups.al: Added the ability to fail automatically=0A=
if we aren't the primary addressee of the mail, so that=0A=
crossposting can be handled correctly without resulting in=0A=
multiposting. Note that this module is complicated and still=0A=
needs considerably more commenting and documentation.=0A=
=0A=
Mon Oct 20 01:29:50 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailtonews.al: Pass through Approved headers and only=0A=
drop headers that the news server would croak on. This forces=0A=
robomod scripts to be careful about Approved headers, but it also=0A=
allows the headers module to be run before the mailtonews module.=0A=
=0A=
Sun Oct 19 12:21:59 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailtonews.al: INN rejects Relay-Version headers, so=0A=
drop them.=0A=
=0A=
* modules/newsgroups.al: Fixed bugs that were preventing multiple=0A=
patterns from working and that were preventing patterns from=0A=
working with commented addresses.=0A=
=0A=
Tue Sep 16 10:00:45 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/anykeyword.al: New file.=0A=
=0A=
* modules/newsgroups.al: Added error checking for invalid regexes=0A=
and a correct error report.=0A=
=0A=
Mon Sep 15 10:37:22 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* Makefile.PL: Makefiles need literal tabs.=0A=
=0A=
* Makefile.PL: Moved Gateway.pm into the subdirectory News/.=0A=
=0A=
* Makefile.PL: Untabified, changed to take the version directly=0A=
out of Gateway.pm.=0A=
=0A=
* modules/cleanbody.al: Cleaned up a few comments.=0A=
=0A=
* modules/newsgroups.al: Fixed a minor but fatal typo.=0A=
=0A=
* modules/newsgroups.al: Make sure we only initialize our data=0A=
structures once, call header() correctly to get an array rather=0A=
than a scalar.=0A=
=0A=
* Gateway.pm: [Revision 0.36] Cleaned up to use an internal=0A=
error() method rather which may call mail_error(). Now takes a=0A=
flag to the constructor which specifies whether or not we are=0A=
running interactively (and therefore may not want to generate=0A=
rejection messages for internal errors). Also cleaned up the=0A=
interface for the current names of modules.=0A=
=0A=
* modules/whitelist.al, modules/mail.al, modules/keywords.al,=0A=
modules/headers.al: Fixed interface, changed to use error() =
rather=0A=
than mail_error().=0A=
=0A=
* modules/newsgroups.al: Completely rewritten from scratch to =
take=0A=
a much wider variety of ways of specifying groups, to clean up =
the=0A=
handling of them, and to speed things up considerably. Probably=0A=
needs to be cleaned up further and commented.=0A=
=0A=
Sun Aug 31 05:04:15 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/cleanbody.al: Added undoing of quoted-printable, checks=0A=
for invalid characters in the body, and stripping of Ctrl-Ms.=0A=
=0A=
Sat Aug 30 23:29:34 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/whitelist.al: Changed to whitelist from posters,=0A=
modified to use News::Article, the new rejection method, the new=0A=
error reporting syntax, and the new interface, cleaned up=0A=
comments, and generally cleaned up the code.=0A=
=0A=
* modules/moosesign.al: New file.=0A=
=0A=
* modules/mailtonews.al: Don't worry about the envelope, since=0A=
it's passed to the mail program in a safe fashion. Add a Sender=0A=
header, drop Received headers because the news server rejects=0A=
them, and attempt to extract a message ID from the In-Reply-To=0A=
header if present. Also added more comments, cleaned things up a=0A=
bit, and fixed the interface line.=0A=
=0A=
* modules/mailpath.al: Fixed interface line, changed to use the=0A=
raw headers instead of the post headers (so that we do the right=0A=
thing for C News submissions), no longer delete the old Received=0A=
headers (that's mailtonews.al's job).=0A=
=0A=
* modules/mailpath.al: Always return success from the munging.=0A=
=0A=
* modules/mailpath.al: Fixed a few comments (forgot one of the=0A=
additional cases that we had to handle and actually do).=0A=
=0A=
* modules/mailpath.al: New file.=0A=
=0A=
* modules/mail.al: New file.=0A=
=0A=
* modules/keywords.al: Modified to use News::Article, to use the=0A=
new mail_error() method to report fatal errors, and modified for=0A=
the new rejection scheme. Also generally cleaned up.=0A=
=0A=
* modules/headers.al: Completely rewritten to use the new=0A=
News::Article header munging shortcuts that make our job much,=0A=
much easier. Added a new "add" directive that just adds a new=0A=
header (possibly duplicating an existing one). Also untabified=0A=
all of the source and fixed to not use lexical variables.=0A=
=0A=
* modules/newsgroups.al: New file.=0A=
=0A=
* modules/cleanbody.al: New file.=0A=
=0A=
* Gateway.pm: [Revision 0.35] *Extensive* modifications. All of=0A=
the hard and tedious work is now being done for us by Andrew=0A=
Gierth's News::Article and associated modules, so we don't have =
to=0A=
do it any more. In particular, all of the posting code has been=0A=
ripped out, as well as all of the article reading and munging=0A=
code. The hook structure has been reworked and rethought a=0A=
little, and _mesg message mangling hooks are now installed for =
all=0A=
modules with defined interfaces. We use the mail_error() method=0A=
everywhere to report fatal errors. We no longer attempt to=0A=
declare all of our modules in the constructor; instead, the=0A=
constructor takes the address of the maintainer and the envelope=0A=
address for auto-replies instead, and we have to call the=0A=
modules() method to initialize modules. parse_line() has been=0A=
fixed up a little to make backslashing more general, and=0A=
read_config() now supports continuation lines and being passed=0A=
file handles rather than filenames. (So one can do read_config=0A=
(\*DATA), which is useful.) post() no longer implicitly runs the=0A=
article munging hooks; instead, a separate method that has to be=0A=
called directly (parse_message()) does that.=0A=
=0A=
Tue Aug 19 03:55:26 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailtonews.al: Disallow message IDs with a trailing=0A=
period.=0A=
=0A=
Mon Aug 18 21:57:40 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* modules/mailtonews.al: Changed to do a variety of standard=0A=
article munging necessary for turning a mail message into a news=0A=
post, and untabified. We no longer take a configuration file=0A=
directive, just an argument when the module is loaded specifying=0A=
the default newsgroup for articles.=0A=
=0A=
* modules/whitelist.al: Tweaked the way we get the address=0A=
slightly to allow for the cases where there was no comment.=0A=
=0A=
* Gateway.pm: [Revision 0.34] Cleaned up the RCS version =
handling,=0A=
cleaned up the AUTOLOAD routine, documented the operation of the=0A=
constructor some more, untabified the entire source. This is a=0A=
checkpoint version prior to the complete rewrite to use Andrew's=0A=
News::Article and associated modules.=0A=
=0A=
Fri May 23 10:25:19 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* Makefile.PL: New file.=0A=
=0A=
* modules/whitelist.al: New file.=0A=
=0A=
* modules/mailtonews.al: New file.=0A=
=0A=
* modules/keywords.al: New file.=0A=
=0A=
* modules/headers.al: New file.=0A=
=0A=
* Gateway.pm: [Revision 0.33] Rewritten from scratch as a module=0A=
rather than a script, major core functionality factored out into=0A=
modules, rewritten for modern Perl and better programming habits,=0A=
and generally massively improved.=0A=
=0A=
Sat Feb 15 09:26:38 1997 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.32] Completely rewritten using my=0A=
current Perl programming style and using modules better, fixed a=0A=
lot of the documentation, cleaned up and made various parts of =
the=0A=
code a *lot* shorter, uses a global configuration information =
hash=0A=
rather than a bunch of global variables. Note that this version=0A=
was part of a rewrite which was later abandoned, so it in and of=0A=
itself is probably not entirely functional. This is the last=0A=
stand-alone script version of gateway before the rewrite as a=0A=
module.=0A=
=0A=
Sun Jun 2 14:50:33 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.31] Added nntpserver configuration file=0A=
directive.=0A=
=0A=
* gateway.in: [Revision 0.30] Added support for sending=0A=
autoreplies. So far, you can only list one autoreply per group=0A=
and wildcards aren't supported yet; all that's likely to=0A=
eventually change.=0A=
=0A=
Fri May 10 20:55:31 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.29] Added the ability to use wildcards=0A=
in a group directive. Crossposting is still done correctly, but=0A=
$d cannot be used since there is no way of mapping hyphens to=0A=
periods correctly.=0A=
=0A=
Sun Apr 28 11:45:45 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.28] When pulling the message ID out of=0A=
the In-Reply-To: header and appending it to References:, we need=0A=
to make sure there's a space between it and the previous contents=0A=
of References:.=0A=
=0A=
Sat Apr 27 22:26:45 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.27] Added support for the standard=0A=
"convert all .s to -s for the gateway address" convention for=0A=
posting gateways (dumb convention).=0A=
=0A=
* gateway.in: [Revision 0.26] Added support for reading in valid=0A=
newsgroups from a file given in a group configuration directive=0A=
and adding all newsgroups matching a mask. Changed return of -v=0A=
to use the current program name and not put v before the version=0A=
number. Improved From: line parsing to allow for more weird=0A=
cases, and improved To: and Cc: parsing to correctly deal with=0A=
comments and local addresses. Should now return the correct =
error=0A=
code if the news server is throttled.=0A=
=0A=
Mon Apr 22 05:18:49 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.25] Added an empty keyword to the =
header=0A=
conf lines to allow specification in the case of an empty header.=0A=
We also now grab the message id from elm-style In-Reply-To lines=0A=
and add it to References to make threading work better.=0A=
=0A=
Fri Apr 19 05:21:06 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.24] Changed the posting method so that=0A=
it writes the post to a temporary file and then pipes that file=0A=
into inews so that we can capture the output of inews. Reads the=0A=
output of inews and returns TEMPFAIL for any error messages=0A=
related to inability to contact the server (chances are, we'll=0A=
need to modify this later to deal with throttled servers). Added=0A=
a -d flag to get the old posting behavior if wanted. Wrote a=0A=
generic &error routine using the error codes from the sendmail=0A=
source and changed all exit calls to use that routine. Rewrote=0A=
the fix_headers routine to make it clearer.=0A=
=0A=
Thu Apr 18 11:24:26 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.23] Support for header rewriting made=0A=
considerably more generic, special cases for header =
capitalization=0A=
added, Sender removed from header drops and X-UIDL added,=0A=
messageid and organization configuration lines removed since=0A=
they've been superseded by the new generic header support.=0A=
=0A=
Thu Apr 4 20:42:09 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.22] Better handling of configuration=0A=
file parsing errors added, better handling of fallback for cases=0A=
where -s isn't used.=0A=
=0A=
* gateway.in: [Revision 0.21] path directive for adding=0A=
directories to the PATH changed to inewspath, new path directive=0A=
added to set the end of the Path: header on the posted article.=0A=
=0A=
* gateway.in: [Revision 0.20] Added support for a messageid=0A=
directive, allowing renaming of Message-ID to X-Message-ID or =
just=0A=
dropping the incoming one and creating a new one.=0A=
=0A=
* gateway.in: [Revision 0.19] Better configuration file parsing=0A=
(allow space before directives, give error messages for invalid=0A=
directives including line numbers), allow the organization line =
to=0A=
be missing in which case organization is passed, study for header=0A=
matching removed due to bug in Perl 5.002, $pattern processing=0A=
modified to allow quoting of metacharacters.=0A=
=0A=
Wed Apr 3 21:51:38 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway.in: [Revision 0.18] Added -f option to change=0A=
configuration file, added magic emacs marker to make sure we edit=0A=
gateway.in in Perl mode, rewrote some of the usage explanation.=0A=
=0A=
* gateway.in: [Revision 0.17] Modified to be gateway.in, so that=0A=
configuration-time options can be handled with sed in the =
Makefile=0A=
(or eventually maybe a configure script).=0A=
=0A=
* gateway: [Revision 0.16] sender configuration option and header=0A=
support removed (dumb idea anyway, since inews just does that=0A=
itself). Extensive comments added.=0A=
=0A=
Tue Apr 2 23:48:45 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway: [Revision 0.15] Added Control: to the list of ignored=0A=
headers. Posting gateways should not be used to post control=0A=
messages. Also added Newsgroups.=0A=
=0A=
* gateway: [Revision 0.14] Added automatic qualification of an=0A=
unqualified sender line.=0A=
=0A=
* gateway: [Revision 0.13] Moved organization and pattern into=0A=
configuration file, support for different patterns added, made=0A=
sure more matches against configuration file directives were=0A=
case-insensitive.=0A=
=0A=
* gateway: [Revision 0.12] Increased configuration file support,=0A=
adding host, sender, and path entries. Still need to move =
pattern=0A=
and organization off to the config file. Also made sure matches=0A=
were being made on a case-insensitive basis.=0A=
=0A=
* gateway: [Revision 0.11] Added configuration file to list valid=0A=
newsgroups, fixed bug in recognizing crossposts and exiting=0A=
correctly.=0A=
=0A=
Mon Apr 1 23:15:24 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway: [Revision 0.10] Added support for standard sendmail=0A=
error exit codes, removed -c option, changed -s to mean "spam" =
and=0A=
analyze the from line by default, changed the way repeated =
headers=0A=
are handled, reformatted site options section.=0A=
=0A=
Wed Feb 28 13:33:20 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway: [Revision 0.9] Fixed major, obvious bug in recognition=0A=
of address@host (name) type From: lines.=0A=
=0A=
Mon Feb 26 07:38:18 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway: [Revision 0.8] Added explicit PATH addition to handle=0A=
inews in /usr/pubsw/bin.=0A=
=0A=
Fri Feb 2 22:07:53 1996 Russ Allbery <eagle@windlord.Stanford.EDU>=0A=
=0A=
* gateway: [Revision 0.7] Handling of additional Cc's fixed.=0A=
=0A=
* gateway: [Revision 0.6] Continuation line support fixed.=0A=
=0A=
* gateway: [Revision 0.5] Support for Bcc: posting added.=0A=
=0A=
* gateway: [Revision 0.4] $sender moved up as one of the site=0A=
customizable variables (sendmail runs programs as bin?? WTF??).=0A=
=0A=
* gateway: [Revision 0.3] Pattern for mailing addresses built =
into=0A=
the program, bug with detecting unqualified From: addresses =
fixed.=0A=
=0A=
* gateway: [Revision 0.2] Bug fixes with slave status, Sender =
line=0A=
added.=0A=
=0A=
* gateway: Initial revision.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gate=
way-0.42/makepod.PL=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00100444 =00 764 =00 0 =00 2051 =
6447730745 13163=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00# makepod.PL -- =
Generates News/Gateway.pod from individual POD files.=0A=
# $Id: makepod.PL,v 0.2 1997/12/23 12:43:17 eagle Exp $=0A=
=0A=
# Assuming that paths are relative to the root of the installation tree,=0A=
# create News/Gateway.pod, which will be where we write out our output.=0A=
open (POD, '>News/Gateway.pod')=0A=
or die "Cannot create News/Gateway.pod: $!\n";=0A=
=0A=
# We're going to use pod/master.pod as the template, and then insert the=0A=
# other POD files in the pod directory at the appropriate place.=0A=
open (MASTER, 'pod/master.pod') or die "Cannot open pod/master.pod: =
$!\n";=0A=
while (<MASTER>) {=0A=
if (/^\@\@ (\w+):/) {=0A=
my $list =3D uc $1;=0A=
open (LIST, "pod/$list") or die "Cannot open pod/.$list: $!\n";=0A=
local $_;=0A=
while (<LIST>) {=0A=
chomp ($pod =3D $_);=0A=
open (SOURCE, "pod/$pod.pod")=0A=
or die "Cannot open pod/$pod.pod: $!\n";=0A=
print POD while (<SOURCE>);=0A=
close SOURCE;=0A=
print POD "\n" unless eof LIST;=0A=
}=0A=
close LIST;=0A=
} else {=0A=
print POD;=0A=
}=0A=
}=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00Gateway-0.=
42/README=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00100644 =00 764 =00 0 =00 21407 =
6514124401 12173=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00 =
News::Gateway version 0.42=0A=
(Robomoderation and mail to news gatewaying toolkit)=0A=
=0A=
Copyright 1997, 1998 by Russ Allbery <rra@stanford.edu>. This program=0A=
is free software; you may redistribute it and/or modify it under the=0A=
same terms as Perl itself.=0A=
=0A=
Individual modules and examples may be written by other authors; if so,=0A=
they will have their own copyright information at the beginning of the=0A=
code.=0A=
=0A=
=0A=
INTRODUCTION=0A=
=0A=
Welcome to my attempt to do robomoderation, moderation support, mail to=0A=
news gatewaying, and news to mail gatewaying right.=0A=
=0A=
Essentially, robomoderators, moderation support programs, and mail to=0A=
news gateways are all the same thing. They take an incoming message,=0A=
from either an MTA or from a user filtering program like procmail, or=0A=
perhaps even directly from a user's MUA, perform a variety of rewrites=0A=
required to turn an RFC 822 message into an RFC 1036 message, possibly=0A=
perform a variety of checks and additional rewrites suited to the=0A=
particular application, and then hand the message off to a news server.=0A=
News to mail gateways just do exactly the same thing in reverse.=0A=
=0A=
From extremely simple procmail hacks through Rich Salz's newsgate=0A=
program to the variety of robomoderators and moderation support =
packages=0A=
written (most notably, Igor Chudov's STUMP), a variety of people have=0A=
tackled different aspects of this problem, but nearly every effort was=0A=
aimed at a particular view or hard-coded various assumptions, and as a=0A=
result the wheel has been reinvented a ridiculous number of times.=0A=
=0A=
This is an attempt to generalize out the framework, so that people =
don't=0A=
have to keep writing the same code to read e-mail messages, post=0A=
messages, send e-mail messages, and do the common rewrites, and instead=0A=
can concentrate on the *interesting* parts, namely the checks and=0A=
rewrites they need for their specific application. News::Gateway is=0A=
*not* a robomoderator or gateway in and of itself. Rather, it's a=0A=
toolkit for *building* robomoderators and gateways that attempts to =
take=0A=
care of all of the nitpicking details for you and drastically decrease=0A=
the amount of code you have to write. And if your problem happens to=0A=
coincide with one of the supplied example programs, you may not have to=0A=
write any code at all.=0A=
=0A=
It furthermore sets up a consistent interface for those additional=0A=
checks and rewrites, so once they're done they can be generalized and=0A=
included in the News::Gateway distribution and someone else who is=0A=
trying to solve the same problem can just use (or work with) the=0A=
existing code. This concept of News::Gateway as a library of reusable=0A=
modules is inherent in its design.=0A=
=0A=
=0A=
REQUIREMENTS=0A=
=0A=
News::Gateway being a Perl module, it obviously requires Perl. With=0A=
great restraint, I've kept myself from requiring Perl 5.004. But=0A=
version 5.003 is probably required; earlier versions have some fairly=0A=
severe bugs. I highly recommend you upgrade to 5.004 if at all =
possible=0A=
since there are very significant bug fixes over 5.003.=0A=
=0A=
News::Gateway also requires Andrew Gierth's excellent News::Article=0A=
module (and in fact can be viewed largely as a wrapper around that=0A=
module). It may require Net::NNTP depending on what you're doing, and=0A=
News::Article also requires Net::NNTP and PGP::Sign, both of which are=0A=
on CPAN. All required modules are available from CPAN. News::Article=0A=
is also at <URL:http://www.erlenstar.demon.co.uk/perl/index.html>, and=0A=
both the latest version of this module and PGP::Sign can be obtained=0A=
from <URL:ftp://ftp.eyrie.org/pub/software/modules/>.=0A=
=0A=
=0A=
OVERVIEW=0A=
=0A=
I view the process of constructing a robomoderator or mail to news=0A=
gateway as having fundamentally three levels. First, there's the basic=0A=
framework that reads in the incoming message, reads any implementation-=0A=
specific information, runs a variety of checks and rewrites, and posts=0A=
the result. Next, there is the implementation of the checks and=0A=
rewrites. Finally, there's the code that specifies what checks and=0A=
rewrites to apply in any given case, provides implementation-specific=0A=
(or even invocation-specific) arguments to them, and takes fallback=0A=
actions based on the outcome.=0A=
=0A=
This package implements the first level, and provides a framework for=0A=
collecting implementations of the second level (along with providing a=0A=
bunch of standard second-level modules). So far, the only third-level=0A=
support provided is a few examples.=0A=
=0A=
News::Gateway takes its information on what to do to incoming articles=0A=
from three basic sources. First, one tells it what what modules to=0A=
apply to incoming articles. Some modules take no additional =
information=0A=
and just do one simple thing the same way to every message. Second, =
for=0A=
those modules that do require additional information, News::Gateway can=0A=
read and parse a configuration file and pass directives along to=0A=
individual modules, or you can give it configuration directives=0A=
directly. Each module registers an interface that tells the=0A=
News::Gateway core code which directives it's interested in. Third,=0A=
there are some pieces of information modules need to know which may be=0A=
invocation-specific. For example, for a mail to news gateway, the same=0A=
script and configuration file may be usable for every newsgroup being=0A=
gatewayed, but each particular invocation of the program will want to=0A=
tell the mailtonews module what default newsgroup to use. To allow for=0A=
passing that information in, News::Gateway can take module arguments=0A=
when told what modules to apply, and will pass those arguments along to=0A=
the modules.=0A=
=0A=
For complete information on using News::Gateway, including =
documentation=0A=
of all available modules, follow the below installation instructions to=0A=
the point of typing make and then read News/Gateway.pod (which is=0A=
generated from all of the documentation in the pod directory). The=0A=
documentation is in POD format and can therefore either be read =
straight=0A=
or (preferably) by running perldoc on the POD file.=0A=
=0A=
Some additional documentation is also available in the doc directory.=0A=
=0A=
=0A=
INSTALLATION=0A=
=0A=
If you want to install News::Gateway in the system site_perl directory=0A=
and have the privileges necessary to do so, follow the standard=0A=
installation procedure for Perl modules, which is to type the following=0A=
commands:=0A=
=0A=
perl Makefile.PL=0A=
make=0A=
make install=0A=
=0A=
(There is no test suite for this module yet, but it's high on the list=0A=
of things to be added in the future.) You will probably have to do the=0A=
last step as root.=0A=
=0A=
If you would instead like to install News::Gateway in your own account,=0A=
you can use the standard Perl module facility for doing so. Just=0A=
specify a LIB value to Makefile.PL when you run it. For example, if =
you=0A=
want to put all of your personal Perl modules in ~/perl, instead of the=0A=
first command given above, type:=0A=
=0A=
perl Makefile.PL LIB=3D~/perl=0A=
=0A=
and then continue as normal. (The man pages may not be installed if =
you=0A=
use this method, but the POD documentation will be and you can run=0A=
perldoc on it directly.)=0A=
=0A=
You can do exactly the same to install News::Article, PGP::Sign, and=0A=
other required modules in your home directory, and in fact this method=0A=
should work with nearly any Perl module.=0A=
=0A=
To use modules installed in this fashion, you'll need to put the line:=0A=
=0A=
use lib "$ENV{HOME}/perl";=0A=
=0A=
at the beginning of your Perl scripts (replace $ENV{HOME} with the=0A=
actual path to your home directory if you wish).=0A=
=0A=
=0A=
SUPPORT=0A=
=0A=
THIS IS AN ALPHA RELEASE. Translated, that means many features are=0A=
missing or not fully implemented, and there are known bugs which have=0A=
not yet been fixed. When using this release, please realize that the=0A=
interface may still be unstable and that there are some outstanding=0A=
problems. I welcome any bug reports or requests for new features; any=0A=
bug reports that lead to solving a problem or feature suggestions that=0A=
are included in later versions will result in having your name featured=0A=
prominently in the THANKS file.=0A=
=0A=
See the TODO file for a list of known bugs and outstanding feature=0A=
requests.=0A=
=0A=
If you are interested in being notified of new releases, helping with=0A=
development, developing, testing, or using new modules, or even just=0A=
getting tips on how to use this module, there is a mailing list=0A=
available. To subscribe, send mail to majordomo@eyrie.org with:=0A=
=0A=
subscribe gateway-users=0A=
=0A=
in the body. New patches and modules are always welcome, whether from=0A=
people on the list or not, and can be mailed to the address listed=0A=
below.=0A=
=0A=
See the THANKS file for credits.=0A=
=0A=
The latest version of this module will always be available from=0A=
<URL:ftp://ftp.eyrie.org/pub/software/modules/>.=0A=
=0A=
Russ Allbery=0A=
rra@stanford.edu=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00G=
ateway-0.42/TODO=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00100644 =00 764 =00 0 =00 =
22331 6514624056 12013=00 =
0=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00ustar =
=00eagle=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00root=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00This is a list of =
things that need to be done to this distribution,=0A=
features which have been requested, bugs that I've noticed and haven't=0A=
fixed yet, and similar such things. It's not in any particular order, =
and=0A=
definitely isn't in order of priority or severity or any other such =
useful=0A=
thing. Some elementary effort has gone into organizing it by type, but=0A=
even that may not be all that thorough.=0A=
=0A=
Patches, suggestions, comments, and additions based on anything on this=0A=
list are *greatly appreciated* and will result in entries in the THANKS=0A=
file. Additions to this file are also greatly appreciated.=0A=
=0A=
People requesting things are listed in brackets after the points (mostly=0A=
for my own information for future THANKS entries).=0A=
=0A=
CORE=0A=
=0A=
* Look at the whole issue of what happens when a module rejects and how=0A=
to restart the checks. Many modules are currently not restartable;=0A=
should that change? What should be done instead? Should there be=0A=
some additional interface that says to run the checks of just module=0A=
X, or replace the module list with something else? Thought: What we=0A=
have is an array of modules to call plus a pointer to our current=0A=
location in that array. Perl has tons of array handling already =
built=0A=
in. Can we just use it?=0A=
* We need a way of accumulating error messages so that all checks can =
be=0A=
ran even if some failed. Otherwise, the iterative process can get=0A=
annoying. [Yusaf Pisan]=0A=
* If arguments are passed to a module that doesn't take any arguments,=0A=
currently that generates an autoloader error complaining about the=0A=
missing _init sub. AUTOLOAD() should catch that case and so =
something=0A=
more interesting with it.=0A=
* An interface to the %HOOKS hash so that a user can add their own=0A=
modules and have things work correctly. Where to put user modules=0A=
should also be documented. [Yusaf Pisan]=0A=
* Look into providing some way for a rewrite module to be run and told=0A=
to ignore all errors. This may or may not be useful in all cases.=0A=
* Contemplate ways of merging or working with Majordomo 2, which has a=0A=
lot of the same hooks as we do.=0A=
* Would it be possible to ever support underlying article models other=0A=
than News::Article?=0A=
* Can we work out some way for modules to specify that they take or=0A=
require arguments, so that the core code can do the syntax checking?=0A=
=0A=
BUILD PROCESS=0A=
=0A=
* Find a better way to figure out what the correct permanent failure=0A=
code is than hardcoding it and expecting the user to change it on=0A=
install.=0A=
* Do we want to build a file of stubs the way AutoLoader usually has?=0A=
use strict 'methods' may require it in 5.005. We may also have to=0A=
have it to do anything sane about missing methods in the AUTOLOAD=0A=
sub. Need to look into how one can tell if a sub has been loaded.=0A=
(Upon further investigation, defined *{$sub}{CODE} appears to do it.)=0A=
* Put together a real test suite. We should be able to do this for at=0A=
least the rewrite modules by reading in an article, applying the=0A=
modules, and then writing the article back out again and comparing it=0A=
with the expected output.=0A=
=0A=
DOCUMENTATION=0A=
=0A=
* Add documentation of the additional fatal AUTOLOAD errors that can=0A=
occur.=0A=
* Write some more generic front-ends or otherwise provide documentation=0A=
or ideally a robomoderator constructor for those people who don't=0A=
like doing the Perl programming themselves.=0A=
* Check the documentation for references that are too focused on the=0A=
mail to news direction of gatewaying.=0A=
* Migrate the extensive comments currently in the source out into a=0A=
separate INTERNALS file to decrease the source code comment size?=0A=
Should we also be doing the same thing for the modules? How would we=0A=
handle module-specific internals documentation? What formatting=0A=
language should we use for all this stuff?=0A=
* Write a guide to writing robomoderators that both includes a step by=0A=
step guide of what people should be thinking about and something =
about=0A=
general philosophy, accumulated wisdom, what's a good idea, what=0A=
isn't, and so forth. It occurs to me that quite a bit of this isn't=0A=
News::Gateway-specific and would make a good Usenet FAQ.=0A=
* Write a guide to writing modules.=0A=
* Build local queuing and message logging into an example so that =
people=0A=
can see how to do it.=0A=
* Reimplement newsgate using this module.=0A=
* Combine the listgate documentation with the comments at the beginning=0A=
of the source and rewrite in POD.=0A=
* Write documentation on the issues involved in mail to news =
gatewaying.=0A=
* Consider including the Stanford local gateways as examples.=0A=
* Rip the comments out of the beginning of the newsgroups module and =
put=0A=
them in a general document about mail to news gatewaying where they=0A=
belong so that font-lock won't take so long to colorize that file.=0A=
=0A=
REWRITE MODULES=0A=
=0A=
* Do full PGPMoose including sending posts on to other moderated =
groups.=0A=
* Modify the cleanbody module to finish its scan even if it finds =
invalid=0A=
characters, and have it return the line number on which it found an=0A=
invalid character.=0A=
* Add support to the newsgroups module for automatically figuring out=0A=
the group name from the address.=0A=
* Consider keeping a message ID cache and using that to reject=0A=
duplicates. This may be much more robust than the current attempt to=0A=
reject duplicates in the newsgroups module. [Igor Chudov]=0A=
* The whitelist module (and perhaps the keywords module) should really=0A=
allow comments to be added after the address and keyword.=0A=
* Allow the whitelist and keyword modules to take db files instead of=0A=
just flat files.=0A=
* The fact that the keyword module takes an argument rather than a=0A=
configuration directive specifying the keyword regex violates the=0A=
standard distinction between arguments and configuration file=0A=
directives.=0A=
* The anykeyword module should take the same directive to specify the=0A=
regex for keywords as the keyword module.=0A=
* Expand the headers module to be able to do more manipulations of=0A=
headers and behave properly in cases of existence of multiple =
headers.=0A=
It should really provide an interface to all of the header=0A=
manipulations News::Article supports.=0A=
* Authenticate posts via checking signatures with PGP against a keyring=0A=
for known authors.=0A=
* Work out how to handle multiline header additions.=0A=
* The keywords module should really allow for some keywords which are=0A=
usable only in conjuction with other keywords.=0A=
* The nobinaries module should actually understand multipart posts and=0A=
delimiters and know where to look for other headers so as not to use=0A=
the hack body searching it uses right now.=0A=
* Fix the nobinaries module to take in the various tunable parameters=0A=
as configuration directives.=0A=
* cleanbody should only do the ISO 8859-1 check if there's no charset=0A=
specified or if iso-8859-1 is given as the charset. Should probably=0A=
special-case us-ascii too....=0A=
* The various things that cleanbody does should ideally be deselectable=0A=
by configuration directives. [Yusaf Pisan]=0A=
* Add a way to detect the case where followups are set to a different=0A=
set of groups than the article was posted to and do something about=0A=
this. [Yusaf Pisan]=0A=
* A module to run an MD5 checksum on the message body and cache the =
last=0A=
several, to use to suppress duplicate postings. [Yusaf Pisan]=0A=
* Modify the header module to take action based on the content of a=0A=
header. (Just add support for :/regex/ when the header name is=0A=
specified for an action and only take action if the regex matches.)=0A=
* A module to drop all headers in an incoming message *except* for a=0A=
given list. [Randal Schwartz]=0A=
* Do real RFC 822 address parsing in a lot of places (most notably the=0A=
whitelist module and the newsgroups module, but possibly including =
the=0A=
error module). Can we use Graham's Mail::Internet module?=0A=
* Modify the various rewrite modules that use disk files to use the new=0A=
hash module and support configuration directives listing individual=0A=
items as well.=0A=
* Detect crossposts to other moderated groups. [Chris Meadows]=0A=
* Include a module to detect overquoted text. [Tom Christiansen]=0A=
* Remove variable substitution from the headers module and revisit how=0A=
we're storing information from configuration directives, since I'm=0A=
fairly sure there are much better ways.=0A=
* Include all of the new modules Curtis Whalen sent me. [Curtis =
Whalen]=0A=
=0A=
UTILITY MODULES=0A=
=0A=
* Consider having config_parse() do something other than call error() =
for=0A=
syntax errors.=0A=
* The mail_error() message is mail to news specific and has a variety =
of=0A=
other problems (may be partially qmail-specific, although not in a=0A=
harmful way).=0A=
* Possibly write a regex utility module for the use of keywords and=0A=
anykeyword (for starters). newsgroups and mungeids could also use=0A=
this. We won't need this when we have Perl support for compiled=0A=
regexes.=0A=
* Add the ability to associate a given server with a given group, for=0A=
use when posting? [Ernie Longmire <elongmi@basis.com>]=0A=
* Write a module to do generic handling of hashes, both tied and =
untied,=0A=
both read-only and read-write. This may be something we can =
eventually=0A=
spin off into another full module. May only want to handle the=0A=
read-only case at first.=0A=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=
=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00
------=_NextPart_000_0008_01C3C34E.8D6640E0--
Technical Details
Message-ID:
<3fde1311$1@news.stben.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mailReferences:
<wa3Db.185020$vO5.7377823@twister1.libero.it> <3fdccf54$1@news.stben.net> <gUnDb.191699$e6.7224643@twister2.libero.it>Show Full Headers
Complete Article Headers
Message-ID: <3fde1311$1@news.stben.net> Subject: Re: mail news gateway Date: Mon, 15 Dec 2003 21:01:04 +0100 From: "Jean-Louis Noel" <jln@stben.net> References: <wa3Db.185020$vO5.7377823@twister1.libero.it> <3fdccf54$1@news.stben.net> <gUnDb.191699$e6.7224643@twister2.libero.it> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail Newsgroups: alt.free.newsservers Lines: 8595 MIME-Version: 1.0 Content-Type: multipart/mixed; X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 FL-Build: Fidolook 2002 (SL) 6.0.2600.78 - 24/10/2002 21:18:29 X-Comment-To: Lupo NNTP-Posting-Host: news.stben.net Organization: C.S. Saint-benoit Habay (be) X-Complaints-To: abuse@stben.net