[comp.unix.aux] uucp scripts

MATLEVAN@EKU (Jerry LeVan) (11/07/90)

Hello,
I am trying to write a script for my L.sys file that will allow me to
connect to our computer (3b2/1000) via the ISN using uucp. My script
looks like(at the beginning):
        "" ATD555-1212,\015  expect nothing send dial string
        2400 \r\r            expect 2400 send two carriage returns
This is where my confusion starts. The <cr>'s must be sent to
set the line characteristics (autobaud ). When I manually use cu
to connect, the two <cr>'s I type are not echoed but a 4 or 5 line banner
is sent back. When I call using uucico -r1 -sLAB -x9 the
chat dialog cranks up and the number is dialed, when the modem
answers the 2400 is picked up by the script. My modem then flashes the
TX light, I assume this is the <cr>'s being sent. However the RX light
never flashes and uucico hangs and eventually times out. I think the Welcome
header is not being sent. I have tried \r,,\r and several variations (ie
more <cr>'s and a variety of commas in various postitions. I have a feeling
that only 1 <cr> is being sent, this <cr> does not echo and the program
waits forever since the header will not be sent.
        Question 1) Does uucico send characters one at a time and wait
                    for the echo before sending the next one? This would
                    account for the hang since the first 2 <cr>s are munched
                    by the autobaud mechanism.
        Question 2) If the answer to the above is yes, is there any workaround?
                    I tried \e\r\r but got the same results
        Question 3) Assuming I can finally get the <cr>'s processed and cause th
e
                    header to be sent, do I have to process each line of the hea
der
                    with an "expect" "send" pair, or can I simply "expect" the
                    tail of the last line of the header?
Thanks
...Jerry
-----------------------------------------------------------------------------
| Jerry LeVan                           | Phone:(606)-622-1931              |
| Department of Computer Science        |                                   |
| Eastern Kentucky University           | Email:matlevan@eku.bitnet         |
| Richmond Ky 40475                     |                                   |
|---------------------------------------------------------------------------|
|      "The series converges so slowly that it actually diverges."          |
-----------------------------------------------------------------------------

MATLEVAN@EKU (Jerry LeVan) (11/07/90)

Hello,
Well I solved the problem of the autobaud not echoing
characters. Recall that I have to send several <cr>'s
to get the attention of the system after I get the
connect message from the modem. Instead of sending
\r\r\r (only one of the cr's evidently get sent I
now send \r\c "" \r\c "" \r\c
It looks like the above sends one cr and expects
nothing sends another cr and expects nothing and
sends one more cr. This seems
to do the trick, the header comes flying by and I can
then negociate into the nuucp login. UUCP seems to work
OK I can uuto files to the machine without any problem.

However mail does not seem to work! I have
tried
  mail name!user and
  mailx name!user and
  rmail name!user
After I exit the mail programs, nothing happens,
no log files are created in the spool area, The phone
never goes off hook etc. Seems like the letter drops
into a black hole!

If UUCP works why does mail not work? (I am using ksh)
Any help will be appreciated!
Jerry
-----------------------------------------------------------------------------
| Jerry LeVan                           | Phone:(606)-622-1931              |
| Department of Computer Science        |                                   |
| Eastern Kentucky University           | Email:matlevan@eku.bitnet         |
| Richmond Ky 40475                     |                                   |
|---------------------------------------------------------------------------|
|      "The series converges so slowly that it actually diverges."          |
-----------------------------------------------------------------------------

schnable@cbnewsc.att.com (andrew.schnable) (11/08/90)

From article <AUXPOST%90110710133097@PUCC.BITNET>, by MATLEVAN@EKU (Jerry LeVan):
> However mail does not seem to work! I have
> tried
>   mail name!user and
...
> After I exit the mail programs, nothing happens,
> no log files are created in the spool area, The phone
> never goes off hook etc. Seems like the letter drops
> into a black hole!

Now the fun really begins.  Its time to start looking at your sendmail
configuration file - are you using uucp exclusively to deliver your mail? 
Really fun if you don't have any documentation!  I don't know how -
but after some m4 script hacking I got mine going. 

I would think that a basic thing like getting mail and uucp going would 
be in the basic AUX documentation - but it isn't. Enjoy. 

a.schnable@att.com

alexis@panix.uucp (Alexis Rosen) (11/08/90)

In article <AUXPOST%90110710133097@PUCC.BITNET> MATLEVAN@EKU (Jerry LeVan) writes:
>However mail does not seem to work! I have
>tried
>  mail name!user and
>  mailx name!user and
>  rmail name!user
>After I exit the mail programs, nothing happens,
>no log files are created in the spool area, The phone
>never goes off hook etc. Seems like the letter drops
>into a black hole!
>
>If UUCP works why does mail not work? (I am using ksh)

This stuff is tricky. There are several points:

1) currently, Apple ships a sample /usr/lib/sendmail.cf which contains
information which would put bogus headers on out-system mail.

2) To avoid sending such mail, they also graciously supply you with a
zero byte long sendmail.fc. No wonder your mail goes nowhere...

3) They also supply the m4 stuff to build a real sendmail.cf but their
prototypes are very broken for uucp. Bang paths will work but internet-
style stuff fails.

The anser, fortunately, is simple. Scarf up the sendmail.cf file I posted
a few days ago, install it, and go. Shouldn't take more than five minutes.

Good luck,
---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis

ksand@Apple.COM (Kent Sandvik) (11/09/90)

In article <1990Nov8.120740.19410@panix.uucp> alexis@panix.uucp (Alexis Rosen) writes:

>This stuff is tricky. There are several points:
>
>1) currently, Apple ships a sample /usr/lib/sendmail.cf which contains
>information which would put bogus headers on out-system mail.
>
>2) To avoid sending such mail, they also graciously supply you with a
>zero byte long sendmail.fc. No wonder your mail goes nowhere...
>
>3) They also supply the m4 stuff to build a real sendmail.cf but their
>prototypes are very broken for uucp. Bang paths will work but internet-
>style stuff fails.
>
>The anser, fortunately, is simple. Scarf up the sendmail.cf file I posted
>a few days ago, install it, and go. Shouldn't take more than five minutes.

It's practically impossible to provide a sendmail.cf file that will work
for all sites and network configurations. To start with sendmail is a little
bit, eh, bohemian.

Anyway, back in Australia, where we got all kinds of aborginial network
solutions, I've got a working .cf file from a friendly neighbour on the
net, and after some small tweaking I had sendmail working OK.

So concerning sendmail you just got to trust on friendly people that 
provides working scripts, like Alexis Rosen.

Regards,
Kent Sandvik

-- 
Kent Sandvik, Apple Computer Inc, Developer Technical Support
NET:ksand@apple.com, AppleLink: KSAND
Zippy says: "C++ is perfect for cyberspace development - because it has
virtual defined as a keyword."

alexis@panix.uucp (Alexis Rosen) (11/09/90)

In article <46421@apple.Apple.COM> ksand@Apple.COM (Kent Sandvik) writes:
>In article <1990Nov8.120740.19410@panix.uucp> alexis@panix.uucp (Alexis Rosen) writes:
>>1) currently, Apple ships a sample /usr/lib/sendmail.cf which contains
>>information which would put bogus headers on out-system mail.
>>
>>2) To avoid sending such mail, they also graciously supply you with a
>>zero byte long sendmail.fc. No wonder your mail goes nowhere...
>>
>>3) They also supply the m4 stuff to build a real sendmail.cf but their
>>prototypes are very broken for uucp. Bang paths will work but internet-
>>style stuff fails.
>
>It's practically impossible to provide a sendmail.cf file that will work
>for all sites and network configurations. To start with sendmail is a little
>bit, eh, bohemian.

I disagree- The script I posted works well for (as far as I can tell) any
uucp-only Mac. If you hacked it to run TCP/IP as well (which I think I
managed, but I won't swear to it) you'd have a script that covers 99% of
A/UX users' needs.

>[...] So concerning sendmail you just got to trust on friendly people that 
>provides working scripts, like Alexis Rosen.

Well, thanks, but I don't buy this for a second. Even if you can't do a
useable sendmail.cf for 99% of the users (I'm not convinced of this), the
m4 prototypes ought to be in working order. They are _not_. A "sample" .cf
file is quite accecptable, but the m4 stuff smacks of the same shoddy (or
nonexistant) QA that went into uucp. I get the feeling that every A/UX
person in Apple was born with a Thinnet connector in their bellybutton.
They haven't shown much concern (through 2.0) for serial stuff.

The good news is that most of this will be fixed in 2.0.1.

---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis

ksand@Apple.COM (Kent Sandvik) (11/10/90)

In article <1990Nov9.132804.26574@panix.uucp> alexis@panix.uucp (Alexis Rosen) writes:

>>It's practically impossible to provide a sendmail.cf file that will work
>>for all sites and network configurations. To start with sendmail is a little
>>bit, eh, bohemian.
>
>I disagree- The script I posted works well for (as far as I can tell) any
>uucp-only Mac. If you hacked it to run TCP/IP as well (which I think I
>managed, but I won't swear to it) you'd have a script that covers 99% of
>A/UX users' needs.

You don't assume that the whole email world consists of bang and ampersand
email addresses (uucp and Internet). You have DECNET nodes, BITNET, 
soon X.400 sites, various local networks with totally different email
headers, Compuserve...

Then you place an A/UX machine in one place on the node tree, and voila
you need some time to configure your sendmail scripts in order to speak
to the rest of the world. 

It is true that you could make something that you believe that will work
for 99% of the cases, but you spend 99% of you time trying to fix the
last 1%.

>nonexistant) QA that went into uucp. I get the feeling that every A/UX
>person in Apple was born with a Thinnet connector in their bellybutton.
>They haven't shown much concern (through 2.0) for serial stuff.

Well, I do not have a Thinnet connector in my physical body, but I have 
used sendmail and A/UX 1.0 via modem since 1988.
I personally hardly belive that one should spend a lot of time fixing
sendmail so it's userfriendly, especially in the advent of new 
electronic mail networks and X.500 servers.


Regards,
Kent Sandvik

-- 
Kent Sandvik, Apple Computer Inc, Developer Technical Support
NET:ksand@apple.com, AppleLink: KSAND
Zippy says: "C++ is perfect for cyberspace development - because it has
virtual defined as a keyword."

alexis@panix.uucp (Alexis Rosen) (11/12/90)

In article <46455@apple.Apple.COM> ksand@Apple.COM (Kent Sandvik) writes:
>In article <1990Nov9.132804.26574@panix.uucp> alexis@panix.uucp (Alexis Rosen) writes:
>>Kent Sandvik wrote:
>>>It's practically impossible to provide a sendmail.cf file that will work
>>>for all sites and network configurations. To start with sendmail is a little
>>>bit, eh, bohemian.
>>
>>I disagree- The script I posted works well for (as far as I can tell) any
>>uucp-only Mac. If you hacked it to run TCP/IP as well (which I think I
>>managed, but I won't swear to it) you'd have a script that covers 99% of
>>A/UX users' needs.
>
>You don't assume that the whole email world consists of bang and ampersand
>email addresses (uucp and Internet). You have DECNET nodes, BITNET, 
>soon X.400 sites, various local networks with totally different email
>headers, Compuserve...

Unless you're a big-time mail admin (who knows sendmail as well as E.A.)
that's probably exactly what you can assume. Most people will set up their
mac to talk to either a few local-net hosts or a few uucp neighbors, and
a forwarding host (again either uucp or network).

BTW, don't you mean "at-sign," not "ampersand?" And don't forget percents...

>Then you place an A/UX machine in one place on the node tree, and voila
>you need some time to configure your sendmail scripts in order to speak
>to the rest of the world. 
>
>It is true that you could make something that you believe that will work
>for 99% of the cases, but you spend 99% of you time trying to fix the
>last 1%.

Exactly my point. So spend that 1% of the time to make 99% of us happy
(as opposed to the ~0% happy with sendmail now). The other 1% know better
than to expect you to set up a central mail hub for them anyway.

>>nonexistant) QA that went into uucp. I get the feeling that every A/UX
>>person in Apple was born with a Thinnet connector in their bellybutton.
>>They haven't shown much concern (through 2.0) for serial stuff.
>
>Well, I do not have a Thinnet connector in my physical body, but I have 
>used sendmail and A/UX 1.0 via modem since 1988.

So have I. You've got my sympathy.

>I personally hardly belive that one should spend a lot of time fixing
>sendmail so it's userfriendly, especially in the advent of new 
>electronic mail networks and X.500 servers.

User friendly? How about mail-friendly? I don't care how ugly it is. I just
want it to work the way it's supposed to. I can't wait five years for X.500
to get my mail across town, I can walk it over considerably faster than that.

>Regards,
>Kent Sandvik

A/UX 2.0 is a wonderful product. But I'm afraid you're defending one of its
weakest parts...

---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis

ksand@Apple.COM (Kent Sandvik) (11/13/90)

In article <1990Nov12.075943.2355@panix.uucp> alexis@panix.uucp (Alexis Rosen) writes:

>>I personally hardly belive that one should spend a lot of time fixing
>>sendmail so it's userfriendly, especially in the advent of new 
>>electronic mail networks and X.500 servers.
>
>User friendly? How about mail-friendly? I don't care how ugly it is. I just
>want it to work the way it's supposed to. I can't wait five years for X.500
>to get my mail across town, I can walk it over considerably faster than that.

>A/UX 2.0 is a wonderful product. But I'm afraid you're defending one of its
>weakest parts...

Note that sendmail is a universal mail switching UNIX application, and if you
think it's weak, don't complain on A/UX 2.0 then. Personally I think its
amusing that marketing people talk a lot about UNIX networking capabilitites.

...well, they have never done any sendmail.cf hacking... And I hope that
the UNIX community does not create such burdensome standards programs
in future.

Regards,
Kent 


-- 
Kent Sandvik, Apple Computer Inc, Developer Technical Support
NET:ksand@apple.com, AppleLink: KSAND
Zippy says: "C++ is perfect for cyberspace development - because it has
virtual defined as a keyword."

alexis@panix.uucp (Alexis Rosen) (11/14/90)

In article <46529@apple.Apple.COM> ksand@Apple.COM (Kent Sandvik) writes:
> [ I, Alexis Rosen, write about sendmail and its cf, as shipped with A/UX ]
>>User friendly? How about mail-friendly? I don't care how ugly it is. I just
>>want it to work the way it's supposed to. I can't wait five years for X.500
>>to get my mail across town, I can walk it over considerably faster than that.
>
>>A/UX 2.0 is a wonderful product. But I'm afraid you're defending one of its
>>weakest parts...
>
>Note that sendmail is a universal mail switching UNIX application, and if you
>think it's weak, don't complain on A/UX 2.0 then.

Sorry, but I think you're missing the point. Apple didn't _have_ to include
sendmail. It didn't _have_ to include NFS, job control, SLIP, or sh for that
matter. But if you want people to buy your unix, you have to provide all the
right tools. And further, if you're Apple, and you're selling A/UX as easy-
to-configure (which, mostly, it is), and a real solution to conectivity issues
in both Mac and Unix worlds, well, you've got to take that extra step. But
I'm not so sure that a facility to send mail between two machines on a LAN
is an "extra step." It's damn well required, by me, and by most others. Now
if you want to include something other than sendmail, which does enough of
the job for most people, then fine. But that's not what was done. So the tools
that _are_ provided must work. That means we need a working sendmail.cf, and
I don't care _who_ wrote it originally. Apple sold it to me, Apple has to
make sure it works.

(And if you think _that's_ grim, wait until you talk to a real business
customer, instead of a hacker who can give up enough sleep to make it work...)

>	Personally I think its
>amusing that marketing people talk a lot about UNIX networking capabilitites.
>
>...well, they have never done any sendmail.cf hacking... And I hope that
>the UNIX community does not create such burdensome standards programs
>in future.

Amen to that!

---
Alexis Rosen
Owner/Sysadmin, PANIX Public Access Unix, NY
{cmcl2,apple}!panix!alexis