K 10
svn:author
V 6
kondou
K 8
svn:date
V 27
1998-08-06T08:27:36.000000Z
K 7
svn:log
V 2160
nnrpd/perl.c:
nnrpd/post.c:
	- This code was written by Andrew Gierth <andrew@erlenstar.demon.co.uk>
	- As ported to INN 2.0 by John Payne.
	- This patch does several things:

	  1. Gives the Perl filter (filter_nnrpd.pl) access to message bodies,
	  in the $body variable.

	  2. Gives the Perl filter access to the poster's authinfo username,
	  in the $user variable.  Obviously this has no effect unless you use
	  authinfo.

	  3. Adds a returncode DROP to the Perl interface.  If the string
	  returned by the Perl subroutine begins with DROP, the post will be
	  discarded and success returned to the client.

	  4. Adds a returncode SPOOL to the Perl interface.  If the string
	  returned by the Perl subroutine begins with SPOOL, success will be
	  returned to the client and the post will be saved to in.coming/spam
	  for manual inspection.

	  Thus, doing something like this:

	  return "DROP spam" if ($body =~ /http:..dirty\.spammer\.com/);

	  will drop any post containing that URL while returning success to the

	  sting client, making the spammer think he is being successful and
	  keeping him from changing ISPs and starting over somewhere else.

	  return "SPOOL possible MMF" if ($hdr{"Subject"} =~ /Make Money Fast/);

	  will spool "suspect" posts in in.coming/spam so you can look at them
	  and decide whether they should go out.  They can be injected manually
	  with rnews.  Spooled posts to moderated groups will be placed in
	  in.coming/spam/mod; you *cannot* feed these to rnews, they must be
	  mailed to the moderation address.  This is somewhat inconvenient.

	  return "posting access denied" if ($user eq "badguy");

	  will return failure for anything posted by "badguy", removing his
	  Usenet posting ability while still allowing him to read.  (This
	  example requires authinfo).

	  return "SPOOL suspect post from $user" if ($user = "maybebadguy");

	  will spool posts from "maybebadguy" for manual inspection, while
	  returning success to the posting client.  They can be injected
	  manually with rnews after inspection (unless they are destined for
	  moderated newsgroups).  (This example requires authinfo.)

END
