[comp.mail.uucp] A question about uucp and another about mail

bill@twwells.uucp (T. William Wells) (02/28/89)

What is the correct way to convince uucp to only perform transfers at
a single time? What I want is for it to not process all outgoing
requests until one particular time or until I manually initiate a
connection. The best I could come up with is to have a short window
where the transfer is allowed and manually edit my Systems file for
connections during other than during the window. Ugh.  Not to mention
that my newsfeed is likely to stomp over any short window.

Any suggestions?

The second question came from the following:

I set up a mail server which uses the "To: " field to decide how to
handle incoming mail.  What it does is call /usr/bin/mail to extract
one mail message from the mailbox, puts it into an in.<number> file,
and then, if the "To: " name matches any one of several local names,
changes the file name to something a little more informative.

The odd thing is that I received a message "To: archives" which got
to my mailbox. Much to my surprise, there was no information in the
message that could have got it to the right mailbox. "Archives" won't
do it because I have no alias or user name that matches that.

So what info did my mailer (smail 2.5 on Microport's V/386 3.0e) use
to figure out where to put the message?  And where did the info go?

---
Bill
{ uunet | novavax } !twwells!bill

rg@psgdc (Dick Gill) (03/05/89)

In article <414@twwells.uucp>, bill@twwells.uucp (T. William Wells) writes:
> What is the correct way to convince uucp to only perform transfers at
> a single time? What I want is for it to not process all outgoing
> requests until one particular time or until I manually initiate a
> connection....

Try uucp -r ......

On my HDB uucp the -r option queues the job without starting the
transfer.  Start the transfer using uucico, uucp without the -r
option or mail to the target site.

bill@twwells.uucp (T. William Wells) (03/05/89)

In article <138@psgdc> rg@psgdc (Dick Gill) writes:
: In article <414@twwells.uucp>, bill@twwells.uucp (T. William Wells) writes:
: > What is the correct way to convince uucp to only perform transfers at
: > a single time? What I want is for it to not process all outgoing
: > requests until one particular time or until I manually initiate a
: > connection....
:
: Try uucp -r ......
:
: On my HDB uucp the -r option queues the job without starting the
: transfer.  Start the transfer using uucico, uucp without the -r
: option or mail to the target site.

I know about uucp -r. But what you and several other respondents have
answered is the wrong question. I don't want the uucp *program* to
not initiate transfers, I want the uucp *system* to not do transfers.
As it happens, in this specific case, all the transfers are initiated
by a mailer; uucp -r won't help.  But in any case, I want a method
that doesn't depend on which program put the request into the queue.

Someone did tell me of a -S<system> option to uucico which made uucico
ignore the time in the Systems file. That, plus a simple shell script,
would do the trick, except for one minor problem: that option is not
supported by my uucp.

Sigh.

---
Bill
{ uunet | novavax } !twwells!bill
(BTW, I'm going to be looking for a new job sometime in the next
few months.  If you know of a good one, do send me e-mail.)

zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (03/06/89)

>: > What is the correct way to convince uucp to only perform transfers at
>: > a single time? What I want is for it to not process all outgoing
>: > requests until one particular time or until I manually initiate a
>: > connection....

I don't know about a correct way, but an easy way is to mv uucico to
uucico.x and then only run it when you want transfers to occur.  You may
need to create a dummy uucico to prevent some errors.













-- 
  Jon Zeeff			zeeff@b-tech.ann-arbor.mi.us
  Ann Arbor, MI			mailrus!b-tech!zeeff

bill@twwells.uucp (T. William Wells) (03/06/89)

In article <9059@b-tech.ann-arbor.mi.us> zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) writes:
: >: > What is the correct way to convince uucp to only perform transfers at
: >: > a single time? What I want is for it to not process all outgoing
: >: > requests until one particular time or until I manually initiate a
: >: > connection....
:
: I don't know about a correct way, but an easy way is to mv uucico to
: uucico.x and then only run it when you want transfers to occur.  You may
: need to create a dummy uucico to prevent some errors.

I've more or less come to the conclusion that something like this is
the only way.  I can't just rename uucico because I have several
systems I talk to and only one on which I want to control the timing
of requests.

However, I already run uucico from within a program; that program is
needed because of a bug in the Telebit firmware and a wierdness in my
DTR line. So all I have to do is to make sure that that program
doesn't call uucico for uunet except when I ask for it.

Sigh.

---
Bill
{ uunet | novavax } !twwells!bill
(BTW, I'm going to be looking for a new job sometime in the next
few months.  If you know of a good one, do send me e-mail.)

mml@srhqla.UUCP (Michael Levin) (03/07/89)

In article <753@twwells.uucp> bill@twwells.UUCP (T. William Wells) writes:
>In article <9059@b-tech.ann-arbor.mi.us> zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) writes:
>: >: > What is the correct way to convince uucp to only perform transfers at
>: >: > a single time? What I want is for it to not process all outgoing
>: >: > requests until one particular time or until I manually initiate a
>: >: > connection....
>:
>: I don't know about a correct way, but an easy way is to mv uucico to
>: uucico.x and then only run it when you want transfers to occur.  You may
>: need to create a dummy uucico to prevent some errors.
>
>I've more or less come to the conclusion that something like this is
>the only way.  I can't just rename uucico because I have several
>systems I talk to and only one on which I want to control the timing
>of requests.
>
>However, I already run uucico from within a program; that program is
>needed because of a bug in the Telebit firmware and a wierdness in my
>DTR line. So all I have to do is to make sure that that program
>doesn't call uucico for uunet except when I ask for it.


	I think that the best way to accomplish what you are trying to
do is to take advantage of the time-out that uucp systems use for failed
communications.  Assuming you are running HDB, there is a file for EACH
system that you talk to in /usr/spool/uucp/.Status   .  This file is of
the following form:


0 0 605256977 0 SUCCESSFUL magnus


	The first field indicates the last connection's exit status.  The
second field indicates the number of retries that have occurred (assuming
an error exit status indication).  The third field is the time of the last
uucico attempt to this system (unix standard- number of seconds since Jan 1,
1970).  The fourth field is the retry time.  The fifth field (which can
be multiple words) is simply an English version of what will be displayed if
you do a uustat -m command.  The final field is the system name.

	The following two .Status files illustrate error conditions:


6 2 605260346 600 LOGIN FAILED island

2 0 605267892 0 WRONG TIME TO CALL menolly

	The 'island' .Status file shows that that uucico exited with a code
'6', that it has already attempted 2 unsuccessful connections, that the last
time it tried was '605260346', that it will retry no sooner than the time
'605260346 + 600', the problem was a failure when attempting to log in.

	The 'menolly' case shows that the uucico exited with an error code of
'2', it hasn't retried, the last time was ... and that the reason was that
the Systems file entry showed that it wasn't supposed to call the last time that
uuxqt was started up.

	THE SOLUTION TO YOUR PROBLEM:  Use the already existing code which will
prevent retries from occurring (or even 'tries', if you have already created
a fake .Status file).  You can pick an error code such as '6', set the time
to whenever you like, the retry time to whatever, and the English message
DOES NOT need to jive with the error message.  It is completely ADVISORY and
has no bearing on the behavior.  So the error message could read something like
"MANUAL CONNECTION" if you'd like.  When you want to initiate a REAL connection,
have a script which either removes the .Status (the /usr/lib/uucp/Uutry script,
invoked with the -r option, will do the trick), or cats a .Status file with
no error indicated.  Then, to lock the connection back up, simply restore the
.Status to an erroneous one when you're done.  You could do something cute 
like having the .Status file removed, and when the transfer is completed the
uucico program will leave a new one there.  You could have a background
process wake up and replace the fake one.  Or, simply hack the script that
is called by cron which starts up the uusched/uuxqt, to FIRST replace a
.Status file for certain systems which contain a '0' exit code to the
faked one, and then proceed.  If there is NO .Status file, then do nothing
and uucico will magically start.

	IF you are NOT using HDB, *similar* features (albeit not as elegant)
are available with the OLD uucp system.  However, it's been so long since
I've played with any of the old stuff that I don't remember what the exact
structure of the STATUS file is.  But you could probably do something similar.
Please drop me a note and let me know how it turns out.

				Happy hacking!!
-- 
+----+         P L E A S E    R E S P O N D   T O:     +------+-*-*-*-*-*-*-*-*
| Mike Levin, Silent Radio HeadQuarters, Los Angeles (srhqla) | No room for a *
| Path:{aeras|csun|pacbell|pyramid|telebit}!srhqla!levin      |'snappy remark'*
+-------------------------------------------------------------+-*-*-*-*-*-*-*-*

mark@adec23.UUCP (Mark Salyzyn) (03/10/89)

In article <9059@b-tech.ann-arbor.mi.us>, zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) writes:
> >: > What is the correct way to convince uucp to only perform transfers at
> >: > a single time? What I want is for it to not process all outgoing
> >: > requests until one particular time or until I manually initiate a
> >: > connection....
> I don't know about a correct way, but an easy way is to mv uucico to
> uucico.x and then only run it when you want transfers to occur.  You may
> need to create a dummy uucico to prevent some errors.
Nope, why not set time limits in the L.sys file. The second field is used to
restrict the time of the calls to a particular system. I know that this may
not be what you want, however you could write a short script to edit the L.sys
file to change the time from `None' to `Any' when you want to perform the call.

If the problem is reducing the number of calls to a specific system, then
restrict the time before a re-call (eg: Any,60). I think this may work, but I
believe that some implementations treat this from last call, and some from
last unsuccessful call.

Ciao,
-- Mark Salyzyn

steve@ivaux.UUCP (Steve Lemke) (03/10/89)

In article <572@srhqla.UUCP> levin@srhqla.UUCP (Michael Levin) writes:
}
}	I think that the best way to accomplish what you are trying to
}do is to take advantage of the time-out that uucp systems use for failed
}communications.  Assuming you are running HDB, there is a file for EACH
}system that you talk to in /usr/spool/uucp/.Status

[details about how to do this under HDB deleted]

}	IF you are NOT using HDB, *similar* features (albeit not as elegant)
}are available with the OLD uucp system.  However, it's been so long since
}I've played with any of the old stuff that I don't remember what the exact
}structure of the STATUS file is.  But you could probably do something similar.
}Please drop me a note and let me know how it turns out.

Does anyone have any idea how to do this with the "OLD" uucp system?  I'm
running A/UX (Apple's UNIX on a Mac II -- SVR2 with a little BSD).  I have a
direct link to another system, and for every message I type in to my system,
it immediately calls the other machine, and sends it.  When I'm reading news,
(and actually any other time as well) I'd rather just batch stuff, and send
it all at once shortly before the other machine is due to make it's connec-
tions.  News Followups (like this one) don't go out instantly, only mail does.

I've tried faking it by having STST or LCK files, but apparrently the contents
of those files is important, and I don't know what they are.  I'd like to have
something around always preventing a call except when uucico gets called from
my cron file (say once/hour or whatever).  Any suggestions would be greatly
appreciated.
-- 
----- Steve Lemke ------------------- "MS-DOS (OS/2, etc.) - just say no!"
----- Internet: lemke@apple.ucsb.edu                 AppleLink:  Lemke    
----- Or try:   pyramid!nessus!ivucsb!ivaux!steve    CompuServe: 73627,570
----- Quote:    "What'd I go to college for?"   "You had fun, didn't you?"

bill@twwells.uucp (T. William Wells) (03/10/89)

In article <572@srhqla.UUCP> levin@srhqla.UUCP (Michael Levin) writes:
: [Long description of the stuff in .Status]

Thanks, I now have my answer. To summarize: diddle with the stuff that
UUCP uses to decide when to call; change it so that uucp does what
*I* want.

And on the other issue, which is how mail got to one user name when
the To: line had another, the answer was one which, had I thought
about it a little more, would have been obvious: the mailer does a uux
of rmail <path> and it this path that directs the transmission of the
mail, not the To: line.

Thanks all for the input.

---
Bill
{ uunet | novavax } !twwells!bill
(BTW, I'm going to be looking for a new job sometime in the next
few months.  If you know of a good one, do send me e-mail.)

rpw3@amdcad.AMD.COM (Rob Warnock) (03/10/89)

In article <750@twwells.uucp> bill@twwells.UUCP (T. William Wells) writes:
+---------------
| I know about uucp -r. But what you and several other respondents have
| answered is the wrong question. I don't want the uucp *program* to
| not initiate transfers, I want the uucp *system* to not do transfers.
| As it happens, in this specific case, all the transfers are initiated
| by a mailer; uucp -r won't help.
+---------------

Well, when I had this problem -- wanting mail to go out only at specific
times, when I ran a "polled" UUCP -- I looked to see how the mail got sent,
and observed that "mail somehost!foo" caused mail to execute (on my system):

	/usr/bin/uux -arpw3 - somehost!rmail '(foo)'

Since "uux" also obeys the "-r" flag, the solution is to write a tiny
C program which you install as "/usr/bin/uux", which calls the *real*
"uux" which you have squirreled away somewhere (like /usr/bin/uux.real),
but adds the "-r" option to whatever command string was passed. So the
above command causes the following:

	/usr/bin/uux.real -r -arpw3 - somehost!rmail '(foo)'

Try it; it may work for you too.


Rob Warnock
Systems Architecture Consultant

UUCP:	  {amdcad,fortune,sun}!redwood!rpw3
ATTmail:  !rpw3
DDD:	  (415)572-2607
USPS:	  627 26th Ave, San Mateo, CA  94403

pjh@mccc.UUCP (Pete Holsberg) (03/16/89)

I have the opposite problem.  Mail comes into my machine from a remote site,
say xyzvax, and the X and D files sit in /usr/spool/uucp/xyzvax directory --
and sit and sit and sit!  uudemon.hour runs every 30 minutes and invokes
uusched (this is a 3B2/400 running SysV R3.1), but the X files seem to be
ignored, so the mail never procedes to the designated recipient!


What is this?  What can I do?

Thanks,
Pete

-- 
Pete Holsberg                   UUCP: {...!rutgers!}princeton!mccc!pjh
Mercer College			CompuServe: 70240,334
1200 Old Trenton Road           GEnie: PJHOLSBERG
Trenton, NJ 08690               Voice: 1-609-586-4800

bill@twwells.uucp (T. William Wells) (03/16/89)

In article <646@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes:
: I have the opposite problem.  Mail comes into my machine from a remote site,
: say xyzvax, and the X and D files sit in /usr/spool/uucp/xyzvax directory --
: and sit and sit and sit!  uudemon.hour runs every 30 minutes and invokes
: uusched (this is a 3B2/400 running SysV R3.1), but the X files seem to be
: ignored, so the mail never procedes to the designated recipient!
:
: What is this?  What can I do?

Run uuxqt. Uusched starts outgoing jobs. Uuxqt runs jobs to be
processed on the local system.

---
Bill
{ uunet | novavax } !twwells!bill
(BTW, I'm going to be looking for a new job sometime in the next
few months.  If you know of a good one, do send me e-mail.)

wcf@psuhcx.psu.edu (Bill Fenner) (03/17/89)

In article <646@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes:
|I have the opposite problem.  Mail comes into my machine from a remote site,
|say xyzvax, and the X and D files sit in /usr/spool/uucp/xyzvax directory --
|and sit and sit and sit!  uudemon.hour runs every 30 minutes and invokes
|uusched (this is a 3B2/400 running SysV R3.1), but the X files seem to be
|ignored, so the mail never procedes to the designated recipient!

I have the same problem, but I know what the problem is, and am not sure
what to do about it.  The files are owned by nuucp, instead of uucp.  If
I chown uucp /usr/spool/uucp/* it works.  Should nuucp be executing
uudemon.hour instead of uucp?  Is this a common setup?  Should each uucp
login have the same UID as the uucp admin. login?

  Bill
-- 
   Bitnet: wcf@psuhcx.bitnet     Bill Fenner       | "You are the angel of
  Internet: wcf@hcx.psu.edu                        |  death, and I am the
 UUCP: {gatech,rutgers}!psuvax1!psuhcx!wcf         |  dead man's son."
Fido: Sysop at 1:129/87 (814/238 9633) \hogbbs!wcf |       -- Pink Floyd