Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!utah-cs!utah-gr!uplherc!nrc-ut!nrcvax!chris From: chris@nrcvax.UUCP (Chris Grevstad) Newsgroups: comp.unix.questions Subject: Re: How to prevent low-grade uucp work during daytime? Message-ID: <1119@nrcvax.UUCP> Date: Fri, 14-Aug-87 23:53:26 EDT Article-I.D.: nrcvax.1119 Posted: Fri Aug 14 23:53:26 1987 Date-Received: Mon, 17-Aug-87 04:37:30 EDT References: <3572@cit-vax.Caltech.Edu> Reply-To: chris@minnie.UUCP (Chris Grevstad) Organization: Frobozo Items Co. Inc. Ltd. Lines: 61 Keywords: uucico grade time-to-call restrictions mangler@cit-vax.Caltech.Edu (System Mangler) says: >[4.3 BSD] > >Our uucp gateway is overloaded during the daytime, so I want to >limit the times of day that low-grade work such as news can be >transferred, while still allowing mail at any time. Well, we have the same problem. We also had (still have, actually, but this helps) the problem of running out of disk space, especially when we feed news to multiple sites. My solution was to hack on 4.3BSD UUCP a little to have it check a file in /usr/lib/uucp called EXECFILE for a command to run when there is no more work to be found for the particular site. The command is run via system(). After the command is run and there is still no more work, then uucico exits. Sample file follows: sddmt1 Any /usr/lib/news/sendbatch -O -c -s80000 sddmt1 kosman Any /usr/lib/news/sendbatch -O -c -s60000 kosman marge Any /usr/lib/news/sendbatch -O -c -s60000 marge #mentat Any /usr/lib/news/sendbatch -O -s80000 mentat mutley Any /usr/lib/news/sendbatch -O -b12 -c -s50000 mutley As you can see, all we use it for is news batching. I had a problem with the =batch patch suggested in the news source. I felt it was a little insecure. As suggested by Carl, you might give each of your uucp sites their own home directory. The time field is parsed by the same code that parses the time field in L.sys so you can put all the appropriate/necessary flags that are available. You might note that there is an additional flag to the sendbatch command. That is a hack to sendbatch to make it batch up only one package. This solves one of our disk space problems. We no longer run sendbatch out of crontab since it is now run on demand, resulting in at most one news packet sitting around for any one site, in the event that the UUCP conversation fails or the site fails to call us up for some extended period of time. A couple of improvements that I would like to make (but don't have the time for) would be (1): exec() the command directly, avoiding the problems and time associated with starting up a subshell with system. Another thing I would like to do is to be able to pipe the command directly into uucico, rather than letting the resultant uux command go through the trouble of setting up the appropriate control files and spooling the data. The only problem I have seen with this setup is when the command takes an extraordinarily long to run, the calling UUCP sometines times out. This usually only happens when the calling site is REAL lax about picking up news and has somewhere on the order of 6000 articles to pick up. Usually not a problem, and can be solved by running sendbatch by hand. I would be interested in any security holes that I may have inadvertently opened up. If anyone is interested, please let me know and I will either mail diffs or post them to the net. -- Chris Grevstad hplabs!sdcrdcf!psivax!nrcvax!chris ihnp4!nrcvax!chris Refund? REFUND!? ..... REFUND!?!?!