File: node37.html

package info (click to toggle)
rutebook 1.0-1
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 9,476 kB
  • ctags: 1,112
  • sloc: makefile: 47
file content (1135 lines) | stat: -rw-r--r-- 47,661 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>34. uucp and uux</TITLE>
<META NAME="description" CONTENT="34. uucp and uux">
<META NAME="keywords" CONTENT="rute">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="rute.css">

<LINK REL="next" HREF="node38.html">
<LINK REL="previous" HREF="node36.html">
<LINK REL="up" HREF="rute.html">
<LINK REL="next" HREF="node38.html">
</HEAD>

<BODY BGCOLOR=#FFFFFF >
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TR><TD align=left bgcolor="#000000">
<FONT COLOR=white>
&nbsp;<A HREF="http://www.icon.co.za/~psheer/rute-purchase.html"><FONT COLOR=white>Purchase</FONT></A>&nbsp;
</FONT>
</TD><TD align=center bgcolor="#000000">
<FONT COLOR=white>
Copyright&nbsp;&#169;&nbsp;2002&nbsp;Paul Sheer. <A HREF="copying.html"><FONT COLOR=white>Click here for copying permissions.</FONT></A>
</FONT>
</TD><TD align=right bgcolor="#000000">
<FONT COLOR=white>
&nbsp;<A HREF="http://www.icon.co.za/~psheer/rute-home.html"><FONT COLOR=white>Home</FONT></A>&nbsp;
</FONT>
</TD></TR>
<TR><TD colspan=2 align=left bgcolor="#ECEBF4">
<IMG SRC="va-btn-small-light-60.png">
</TD><TD align=right bgcolor="#ECEBF4">
<IMG SRC="sflogo2-steel-60.png">
</TD></TR>
</TABLE><BR>

<!--Navigation Panel-->
<A NAME="tex2html2470"
  HREF="node38.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html2466"
  HREF="rute.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html2460"
  HREF="node36.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html2468"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html2471"
  HREF="node38.html">35. The LINUX File</A>
<B> Up:</B> <A NAME="tex2html2467"
  HREF="rute.html">rute</A>
<B> Previous:</B> <A NAME="tex2html2461"
  HREF="node36.html">33. Sending Faxes</A>
 &nbsp <B>  <A NAME="tex2html2469"
  HREF="node1.html">Contents</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html2472"
  HREF="#SECTION003710000000000000000">34.1 Command-Line Operation</A>
<LI><A NAME="tex2html2473"
  HREF="#SECTION003720000000000000000">34.2 Configuration</A>
<UL>
<LI><A NAME="tex2html2474"
  HREF="#SECTION003721000000000000000"><TT>
<FONT COLOR="#0000ff">uucico</FONT></TT></A>
</UL>
<LI><A NAME="tex2html2475"
  HREF="#SECTION003730000000000000000">34.3 Modem Dial</A>
<LI><A NAME="tex2html2476"
  HREF="#SECTION003740000000000000000">34.4 <TT>
<FONT COLOR="#0000ff">tty</FONT></TT>/UUCP Lock Files</A>
<LI><A NAME="tex2html2477"
  HREF="#SECTION003750000000000000000">34.5 Debugging <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT></A>
<LI><A NAME="tex2html2478"
  HREF="#SECTION003760000000000000000">34.6 Using <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> with <TT>
<FONT COLOR="#0000ff">exim</FONT></TT></A>
<LI><A NAME="tex2html2479"
  HREF="#SECTION003770000000000000000">34.7 Scheduling Dialouts</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION003700000000000000000">
34. <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> and <TT>
<FONT COLOR="#0000ff">uux</FONT></TT></A>
</H1>

<P>
<A NAME="chap:uucp"></A>
<P>
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> is a command to copy a file from one U<SMALL>NIX</SMALL> system to another.
<TT>
<FONT COLOR="#0000ff">uux</FONT></TT> executes a command on another U<SMALL>NIX</SMALL> system, even if that
command is receiving data through stdin on the local system. <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> is
extremely useful for automating many kinds of distributed functions,
like mail and news.

<P>
The <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> and <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> commands both come as part of the
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> (<I>Unix-to-Unix Copy</I>) package.
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> may sound ridiculous considering the availability of modern
commands like <TT>
<FONT COLOR="#0000ff">rcp</FONT></TT>,
<TT>
<FONT COLOR="#0000ff">rsh</FONT></TT>, or even FTP transfers
(which accomplish the same thing), but <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> has features that
these do not, making it an essential, albeit antiquated, utility. For
instance, <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> never executes jobs immediately. It will, for
example, queue a file copy for later processing and then dial the
remote machine during the night to complete the operation.

<P>
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> predates the Internet: It was originally
used to implement a mail system, using only modems and
telephone lines. It hence has sophisticated protocols for ensuring that
your file/command <I>really does get there</I>, with the
maximum possible fault tolerance and the minimum of
retransmission. This is why it should always be used for
automated tasks wherever there are unreliable (i.e., modem)
connections. The <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> version that comes with most L<SMALL>INUX</SMALL>
distributions is called Taylor UUCP after its author.

<P>
Especially important is that when a <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> operation is interrupted
by a line break, the connection time is not wasted: <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> will
not have discarded any partially transmitted data. This means that no
matter how slow or error prone the connection, progress is always made.
Compare this to an SMTP or POP3/IMAP
connection: Any line break halfway
through a large mail message will necessitate that the entire operation to be
restarted from scratch.

<P>

<H1><A NAME="SECTION003710000000000000000">
34.1 Command-Line Operation</A>
</H1>

<P>
To copy a file from one machine to another, simply enter

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>uucp&nbsp;&#060;filename&#062;&nbsp;&#060;machine&#062;!&#060;path&#062;</code><br>
</FONT></TD></TR></TABLE><P>

<P>
You can also run commands on the remote system, like

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>echo&nbsp;-n&nbsp;'Hi,&nbsp;this&nbsp;is&nbsp;a&nbsp;short&nbsp;message\n\n-paul'&nbsp;|&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uux&nbsp;-&nbsp;'cericon!rmail'&nbsp;'john'</code><br>
</FONT></TD></TR></TABLE><P>
which runs <TT>
<FONT COLOR="#0000ff">rmail</FONT></TT> on the remote system <TT>
<FONT COLOR="#0000ff">cericon</FONT></TT>,
feeding some text to the <TT>
<FONT COLOR="#0000ff">rmail</FONT></TT> program. Note how you should quote
the <TT>
<FONT COLOR="#0000ff">&nbsp;!&nbsp;</FONT></TT> character to prevent it from being interpreted by the shell.
(These commands will almost always fail with
<TT>
<FONT COLOR="#0000ff">permission denied by remote</FONT></TT>.
The error will come in a mail message to the user
that ran the command.)

<P>

<H1><A NAME="SECTION003720000000000000000">
34.2 Configuration</A>
</H1>

<P>
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> comes  with  comprehensive  documentation
in HTML format
(<TT>
<FONT COLOR="#0000ff">/usr/doc/uucp-</FONT></TT><I>version</I><TT>
<FONT COLOR="#0000ff">/uucp.html</FONT></TT>
or <TT>
<FONT COLOR="#0000ff">/usr/share/</FONT></TT>...) on RedHat, and
<TT>
<FONT COLOR="#0000ff">info</FONT></TT> format on Debian and RedHat. Here, I sketch
a basic and typical configuration.

<P>
The <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> package has a long history of revisions, beginning with
the first modem-based mail networks. The latest GNU editions that
come with L<SMALL>INUX</SMALL> distributions have a configuration file format that
will probably differ from that which old <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> hands are used to.

<P>
Dialup networks today typically use <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> in
combination with normal PPP dialup, probably not using <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT>'s
dial-in facilities at all. For example, if you are deploying a number of remote
hosts that are using modems, these hosts should always use <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> to
upload and retrieve mail, rather than POP3/IMAP or straight
SMTP, because of the retransmission problem discussed above.
In other words, <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> is really working as an ordinary TCP service,
albeit with far more fault tolerance.

<P>
To make <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> into a TCP server, place it into
<TT>
<FONT COLOR="#0000ff">/etc/inetd.conf</FONT></TT> as follows

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>uucp&nbsp;&nbsp;stream&nbsp;tcp&nbsp;&nbsp;nowait&nbsp;uucp&nbsp;&nbsp;/usr/sbin/tcpd&nbsp;/usr/lib/uucp/uucico&nbsp;-l</code><br>
</FONT></TD></TR></TABLE><P>
being also <I>very</I> careful to limit the hosts that can connect
by using the techniques discussed in Chapter <A HREF="node32.html#chap:xinetd">29</A>.
Similarly for <TT>
<FONT COLOR="#0000ff">xinetd</FONT></TT>, create a file <TT>
<FONT COLOR="#0000ff">/etc/xinetd.d/uucp</FONT></TT> containing,

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>10</code></font><code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>service&nbsp;uucp</code><br>
<code>{</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;only_from&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;127.0.0.1&nbsp;192.168.0.0/16</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;socket_type&nbsp;&nbsp;&nbsp;=&nbsp;stream</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;wait&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;no</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;uucp</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;/usr/lib/uucp/uucico</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;server_args&nbsp;&nbsp;&nbsp;=&nbsp;-l</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;disable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;no</code><br>
<code>}</code><br>
</FONT></TD></TR></TABLE><P>

<P>
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> configuration files are stored under <TT>
<FONT COLOR="#0000ff">/etc/uucp/</FONT></TT>.
Now we configure a client machine,
<TT>
<FONT COLOR="#0000ff">machine1.cranzgot.co.za</FONT></TT>, to send mail through <TT>
<FONT COLOR="#0000ff">server1.cranzgot.co.za</FONT></TT>,
where <TT>
<FONT COLOR="#0000ff">server1.cranzgot.co.za</FONT></TT> is running the <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> service
above.

<P>
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> has an antiquated authentication
mechanism that uses its own
list of users and passwords completely distinct from those of ordinary U<SMALL>NIX</SMALL>
accounts. We must first add a common ``user'' and password to both machines
for authentication purposes. For <TT>
<FONT COLOR="#0000ff">machine1.cranzgot.co.za</FONT></TT>, we can add to
the file <TT>
<FONT COLOR="#0000ff">/etc/uucp/call</FONT></TT> the line

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>server1&nbsp;&nbsp;&nbsp;machine1login&nbsp;&nbsp;&nbsp;pAsSwOrD123</code><br>
</FONT></TD></TR></TABLE><P>
which tells <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> to use the login <TT>
<FONT COLOR="#0000ff">machine1login</FONT></TT>
whenever trying to speak to <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>. On
<TT>
<FONT COLOR="#0000ff">server1.cranzgot.co.za</FONT></TT> we can add to the file
<TT>
<FONT COLOR="#0000ff">/etc/uucp/passwd</FONT></TT> the line,

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>machine1login&nbsp;&nbsp;&nbsp;pAsSwOrD123</code><br>
</FONT></TD></TR></TABLE><P>
Note that the <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> name <TT>
<FONT COLOR="#0000ff">server1</FONT></TT> was chosen for the
machine <TT>
<FONT COLOR="#0000ff">server1.cranzgot.co.za</FONT></TT> for convenience. <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> names,
however, have nothing to do with domain names.

<P>
Next, we need to tell <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> about the intentions of
<TT>
<FONT COLOR="#0000ff">machine1</FONT></TT>. Any machine that you might connect to or from
must be listed in the <TT>
<FONT COLOR="#0000ff">/etc/uucp/sys</FONT></TT> file.
Our entry looks like

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>system&nbsp;machine1</code><br>
<code>call-login&nbsp;*</code><br>
<code>call-password&nbsp;*</code><br>
<code>commands&nbsp;rmail</code><br>
<code>protocol&nbsp;t</code><br>
</FONT></TD></TR></TABLE><P>
and can have as many entries as we like. The only things
<TT>
<FONT COLOR="#0000ff">server1</FONT></TT> has to know about <TT>
<FONT COLOR="#0000ff">machine1</FONT></TT> are the user and password
and the preferred protocol. The <TT>
<FONT COLOR="#0000ff">*</FONT></TT>'s mean to look up the user and
password in the <TT>
<FONT COLOR="#0000ff">/etc/uucp/passwd</FONT></TT> file, and
<TT>
<FONT COLOR="#0000ff">protocol&nbsp;t</FONT></TT>
means to use a simple non-error, correcting protocol (as appropriate for
use over TCP). The <TT>
<FONT COLOR="#0000ff">commands</FONT></TT> option takes a space-separated list
of permitted commands--for security reasons, commands not in
this list cannot be executed. (This is why I stated above that commands
will almost always fail with
<TT>
<FONT COLOR="#0000ff">permission denied by remote</FONT></TT>--they
are usually not listed under <TT>
<FONT COLOR="#0000ff">commands</FONT></TT>.)

<P>
The <TT>
<FONT COLOR="#0000ff">/etc/uucp/sys</FONT></TT> file on <TT>
<FONT COLOR="#0000ff">machine1</FONT></TT> will contain:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>system&nbsp;server1</code><br>
<code>call-login&nbsp;*</code><br>
<code>call-password&nbsp;*</code><br>
<code>time&nbsp;any</code><br>
<code>port&nbsp;TCP</code><br>
<code>address&nbsp;192.168.3.2</code><br>
<code>protocol&nbsp;t</code><br>
</FONT></TD></TR></TABLE><P>
Here <TT>
<FONT COLOR="#0000ff">time&nbsp;any</FONT></TT> specifies which times of the day <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> may make calls
to <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>. The default is <TT>
<FONT COLOR="#0000ff">time&nbsp;Never</FONT></TT>. <FONT COLOR="#ffa500">[See the <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT>
documentation under <B>Time Strings</B> for more info.]</FONT> The option <TT>
<FONT COLOR="#0000ff">port&nbsp;TCP</FONT></TT>
means that we are using a <I>modem</I> named <TT>
<FONT COLOR="#0000ff">TCP</FONT></TT> to execute the dialout. All
modems are defined in the file <TT>
<FONT COLOR="#0000ff">/etc/uucp/port</FONT></TT>. We can add our modem entry 
to <TT>
<FONT COLOR="#0000ff">/etc/uucp/port</FONT></TT> as follows,

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>port&nbsp;TCP</code><br>
<code>type&nbsp;tcp</code><br>
</FONT></TD></TR></TABLE><P>
which clearly is not really a modem at all.

<P>
Finally, we can queue a mail transfer job with

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>echo&nbsp;-e&nbsp;'Hi&nbsp;Jack\n\nHow&nbsp;are&nbsp;you?\n\n-jill"&nbsp;|&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uux&nbsp;-&nbsp;--nouucico&nbsp;'server1!rmail'&nbsp;'jack@beanstalk.com'</code><br>
</FONT></TD></TR></TABLE><P>
and copy a file with

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>uucp&nbsp;--nouucico&nbsp;README&nbsp;'cericon!/var/spool/uucppublic'</code><br>
</FONT></TD></TR></TABLE><P>
Note that <TT>
<FONT COLOR="#0000ff">/var/spool/uucppublic/</FONT></TT> is the only directory
you are allowed access to by default. You should probably keep it this
way for security.

<P>

<H2><A NAME="SECTION003721000000000000000">
<TT>
<FONT COLOR="#0000ff">uucico</FONT></TT></A>
</H2>

<P>
Although we have queued a job for processing, nothing will transfer until
the program <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> (which stands for <I>Unix-to-Unix
copy in copy out</I>) is run. The idea is that both <TT>
<FONT COLOR="#0000ff">server1</FONT></TT> and
<TT>
<FONT COLOR="#0000ff">machine1</FONT></TT> may have queued a number of jobs; then when
<TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> is running on both machines and talking to each other,
all jobs on both machines are processed in turn, regardless of which
machine initiated the connection. 

<P>
Usually <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> is run from a <TT>
<FONT COLOR="#0000ff">crond</FONT></TT> script every hour.
(Even having run <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT>, nothing will transfer if the time
of day does not come within the ranges specified under <TT>
<FONT COLOR="#0000ff">time&nbsp;...</FONT></TT>.)
Here we can run <TT>
<FONT COLOR="#0000ff">tail&nbsp;-f&nbsp;/var/log/uucp/Log</FONT></TT>
while running <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> manually as follows:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>uucico&nbsp;--debug&nbsp;3&nbsp;--force&nbsp;--system&nbsp;server1</code><br>
</FONT></TD></TR></TABLE><P>
The higher the debug level, the more verbose output you will
see in the <TT>
<FONT COLOR="#0000ff">Log</FONT></TT> file. This will <TT>
<FONT COLOR="#0000ff">&#45;&#45;force</FONT></TT>ably dial the
<TT>
<FONT COLOR="#0000ff">&#45;&#45;system</FONT></TT> <TT>
<FONT COLOR="#0000ff">server1</FONT></TT> regardless of when it last dialed
(usually there are constraints on calling soon after a failed call:
<TT>
<FONT COLOR="#0000ff">&#45;&#45;force</FONT></TT> overrides this).

<P>
If your mail server on <TT>
<FONT COLOR="#0000ff">server1</FONT></TT> is configured correctly, it
should now have queued the message on the remote side.

<P>

<H1><A NAME="SECTION003730000000000000000">
34.3 Modem Dial</A>
</H1>

<P>
<A NAME="sec:dialinuucp"></A>
<P>
If you are really going to use <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> the old-fashioned way,
you can use <TT>
<FONT COLOR="#0000ff">mgetty</FONT></TT>
to answer <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> calls on <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>
by adding the following to your <TT>
<FONT COLOR="#0000ff">/etc/inittab</FONT></TT> file:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>S0:2345:respawn:/sbin/mgetty&nbsp;-s&nbsp;57600&nbsp;ttyS0</code><br>
</FONT></TD></TR></TABLE><P>
And then add the line

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>machine1login&nbsp;&nbsp;uucp&nbsp;&nbsp;machine1login&nbsp;&nbsp;/usr/sbin/uucico&nbsp;-l&nbsp;-u&nbsp;machine1login</code><br>
</FONT></TD></TR></TABLE><P>
to the file <TT>
<FONT COLOR="#0000ff">/etc/mgetty+sendfax/login.config</FONT></TT>
(<TT>
<FONT COLOR="#0000ff">/etc/mgetty/login.config</FONT></TT> for Debian). You will then also
have to add a U<SMALL>NIX</SMALL> account <TT>
<FONT COLOR="#0000ff">machine1login</FONT></TT> with
password <TT>
<FONT COLOR="#0000ff">pAsSwOrD123</FONT></TT>. This approach works is because
<TT>
<FONT COLOR="#0000ff">mgetty</FONT></TT> and <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> have the same login prompt
and password prompt, but <TT>
<FONT COLOR="#0000ff">mgetty</FONT></TT> uses <TT>
<FONT COLOR="#0000ff">/etc/passwd</FONT></TT>
instead of <TT>
<FONT COLOR="#0000ff">/etc/uucp/passwd</FONT></TT> to authenticate. Also, for
a modem connection, <TT>
<FONT COLOR="#0000ff">protocol&nbsp;t</FONT></TT> is error prone:
change it to <TT>
<FONT COLOR="#0000ff">protocol&nbsp;g</FONT></TT>,
which has small packet sizes
and error correction.

<P>
Note that the above configuration also supports faxes, logins, voice, and PPP
(see Section <A HREF="node44.html#sec:dialinppp">41.4</A>) on the same modem, because
<TT>
<FONT COLOR="#0000ff">mgetty</FONT></TT> only starts <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> if the user name is
<TT>
<FONT COLOR="#0000ff">machine1login</FONT></TT>.

<P>
To dial out from <TT>
<FONT COLOR="#0000ff">machine1</FONT></TT>, you first need to add a
modem device (besides <TT>
<FONT COLOR="#0000ff">TCP</FONT></TT>) to your <TT>
<FONT COLOR="#0000ff">/etc/uucp/port</FONT></TT> file:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>port&nbsp;ACU</code><br>
<code>type&nbsp;modem</code><br>
<code>device&nbsp;/dev/ttyS0</code><br>
<code>dialer&nbsp;mymodem</code><br>
<code>speed&nbsp;57600</code><br>
</FONT></TD></TR></TABLE><P>
<TT>
<FONT COLOR="#0000ff">ACU</FONT></TT> is antiquated terminology
and stands for <I>Automatic Calling Unit</I> (i.e., a
modem). We have to specify the usual types of things for serial ports,
like the device (<TT>
<FONT COLOR="#0000ff">/dev/ttyS0</FONT></TT> for a modem on COM1) and speed of
the serial line. We also must specify a means to initialize the modem:
the <TT>
<FONT COLOR="#0000ff">dialer&nbsp;mymodem</FONT></TT> option. A file <TT>
<FONT COLOR="#0000ff">/etc/uucp/dial</FONT></TT> should
then contain an entry for our type of modem matching ``<TT>
<FONT COLOR="#0000ff">mymodem</FONT></TT>''
as follows: <FONT COLOR="#ffa500">[This example
assumes that an initialization string
of <TT>
<FONT COLOR="#0000ff">AT&#38;F1</FONT></TT> is
sufficient. See Section <A HREF="node6.html#sec:hardwaremodem">3.5</A>.]</FONT>
<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>10</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>dialer&nbsp;mymodem</code><br>
<code>chat&nbsp;""&nbsp;AT&#038;F1\r\d\c&nbsp;OK\r&nbsp;ATDT\D&nbsp;CONNECT</code><br>
<code>chat-fail&nbsp;RING</code><br>
<code>chat-fail&nbsp;NO\sCARRIER</code><br>
<code>chat-fail&nbsp;ERROR</code><br>
<code>chat-fail&nbsp;NO\sDIALTONE</code><br>
<code>chat-fail&nbsp;BUSY</code><br>
<code>chat-fail&nbsp;NO\sANSWER</code><br>
<code>chat-fail&nbsp;VOICE</code><br>
<code>complete&nbsp;\d\d+++\d\dATH\r\c</code><br>
<code>abort&nbsp;\d\d+++\d\dATH\r\c</code><br>
</FONT></TD></TR></TABLE><P>
More about modems and dialing is covered with <TT>
<FONT COLOR="#0000ff">pppd</FONT></TT> in
Chapter <A HREF="node44.html#chap:pppdialup">41</A>.

<P>
With the modem properly specified, we can change our
entry in the <TT>
<FONT COLOR="#0000ff">sys</FONT></TT> file to

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>system&nbsp;server1</code><br>
<code>call-login&nbsp;*</code><br>
<code>call-password&nbsp;*</code><br>
<code>time&nbsp;any</code><br>
<code>port&nbsp;ACU</code><br>
<code>phone&nbsp;555-6789</code><br>
<code>protocol&nbsp;g</code><br>
</FONT></TD></TR></TABLE><P>
The same <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> commands should now work over dialup.

<P>

<H1><A NAME="SECTION003740000000000000000">
34.4 <TT>
<FONT COLOR="#0000ff">tty</FONT></TT>/UUCP Lock Files</A>
</H1>

<P>
<A NAME="sec:ttylockfile"></A>I hinted about lock files in Section <A HREF="node36.html#sec:faxsetuidbin">33.2</A>. A more detailed
explanation follows.

<P>
You will have noticed by now that several services use serial devices,
and many of them can use the same device at different times. This creates
a possible conflict should two services wish to use the same device at the same
time. For instance, what if someone wants to send a fax, while another person is
dialing in?

<P>
The solution is the <I>UUCP lock file</I>. This is a file created by a process
in <TT>
<FONT COLOR="#0000ff">/var/lock/</FONT></TT> of the
form <TT>
<FONT COLOR="#0000ff">LCK..</FONT></TT><I>device</I> that indicates
the serial port is being used by that process. For instance, when running
<TT>
<FONT COLOR="#0000ff">sendfax</FONT></TT> through a modem connected on
<TT>
<FONT COLOR="#0000ff">/dev/ttyS0</FONT></TT>, a file <TT>
<FONT COLOR="#0000ff">/var/lock/LCK..ttyS0</FONT></TT> suddenly appears.
This is because <TT>
<FONT COLOR="#0000ff">sendfax</FONT></TT>, along with all other <TT>
<FONT COLOR="#0000ff">mgetty</FONT></TT>
programs, obeys the UUCP lock file convention. The contents
of this file actually contain the process ID of the program using the
serial device, so it is easy to check whether the lock file is bogus. A lock
file of such a dead process is called a <I>stale lock file</I> and
can be removed manually.

<P>

<H1><A NAME="SECTION003750000000000000000">
34.5 Debugging <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT></A>
</H1>

<P>
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> implementations rarely run smoothly the first time.
Fortunately, you have available a variety of verbose debugging options. <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> takes
the <TT>
<FONT COLOR="#0000ff">&#45;&#45;debug</FONT></TT> option to specify the level of debug output. You
should examine the files <TT>
<FONT COLOR="#0000ff">/var/log/uucp/Log</FONT></TT>,
<TT>
<FONT COLOR="#0000ff">/var/log/uucp/Debug</FONT></TT>,
and <TT>
<FONT COLOR="#0000ff">/var/log/uucp/Stats</FONT></TT> to get an idea
about what is going on in the background. Also important
is the spool directory <TT>
<FONT COLOR="#0000ff">/var/spool/uucp/</FONT></TT>. You can
specify
the debugging level with <TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;</FONT></TT><I>level</I> where <I>level</I>
is in the range of <TT>
<FONT COLOR="#0000ff">0</FONT></TT> through <TT>
<FONT COLOR="#0000ff">11</FONT></TT>. You can also use
<TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;chat</FONT></TT> to only see modem communication details. A full description
of other options follows <FONT COLOR="#ffa500">[Credits to the <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> documentation.]</FONT>:

<DL COMPACT>
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;abnormal</FONT></TT></B>
<DD>Output debugging messages for abnormal situations, such as recoverable errors.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;chat</FONT></TT></B>
<DD>Output debugging messages for chat scripts.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;handshake</FONT></TT></B>
<DD>Output debugging messages for the initial handshake.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;uucp</FONT></TT></B>
<DD>protocol Output debugging messages for the UUCP session protocol.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;proto</FONT></TT></B>
<DD>Output debugging messages for the individual link protocols.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;port</FONT></TT></B>
<DD>Output debugging messages for actions on the communication port.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;config</FONT></TT></B>
<DD>Output debugging messages while reading the configuration files.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;spooldir</FONT></TT></B>
<DD>Output debugging messages for actions in the spool directory.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;execute</FONT></TT></B>
<DD>Output debugging messages whenever another program is executed.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;incoming</FONT></TT></B>
<DD>List all incoming data in the debugging file.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;outgoing</FONT></TT></B>
<DD>List all outgoing data in the debugging file.
<DT><B><TT>
<FONT COLOR="#0000ff">&#45;&#45;debug&nbsp;all</FONT></TT></B>
<DD>All of the above.
</DD>
</DL>

<P>

<H1><A NAME="SECTION003760000000000000000">
34.6 Using <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> with <TT>
<FONT COLOR="#0000ff">exim</FONT></TT></A>
</H1>

<P>
On <TT>
<FONT COLOR="#0000ff">machine1</FONT></TT> we would like <TT>
<FONT COLOR="#0000ff">exim</FONT></TT> to spool all mail through
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT>. Using <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> requires a pipe transport (<TT>
<FONT COLOR="#0000ff">exim</FONT></TT>
transports are
discussed in Section <A HREF="node33.html#sec:eximtransports">30.3.2</A>). <TT>
<FONT COLOR="#0000ff">exim</FONT></TT>
merely sends mail through stdin of the <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> command and then forgets
about it. <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> is then responsible for executing <TT>
<FONT COLOR="#0000ff">rmail</FONT></TT>
on <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>. The complete <TT>
<FONT COLOR="#0000ff">exim.conf</FONT></TT> file is simply as follows.

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>10</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>15</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>20</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>25</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>30</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>35</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>40</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>####################&nbsp;MAIN&nbsp;CONFIGURATION&nbsp;SETTINGS&nbsp;#####################</code><br>
<code>log_subject</code><br>
<code>errors_address&nbsp;=&nbsp;admin</code><br>
<code>local_domains&nbsp;=&nbsp;localhost&nbsp;:&nbsp;${primary_hostname}&nbsp;:&nbsp;machine1&nbsp;:&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine1.cranzgot.co.za</code><br>
<code>host_accept_relay&nbsp;=&nbsp;127.0.0.1&nbsp;:&nbsp;localhost&nbsp;:&nbsp;${primary_hostname}&nbsp;:&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine1&nbsp;:&nbsp;machine1.cranzgot.co.za</code><br>
<code>never_users&nbsp;=&nbsp;root</code><br>
<code>exim_user&nbsp;=&nbsp;mail</code><br>
<code>exim_group&nbsp;=&nbsp;mail</code><br>
<code>end</code><br>
<code>######################&nbsp;TRANSPORTS&nbsp;CONFIGURATION&nbsp;######################</code><br>
<code>uucp:</code><br>
<code>&nbsp;&nbsp;driver&nbsp;=&nbsp;pipe</code><br>
<code>&nbsp;&nbsp;user&nbsp;=&nbsp;nobody</code><br>
<code>&nbsp;&nbsp;command&nbsp;=&nbsp;"/usr/bin/uux&nbsp;-&nbsp;--nouucico&nbsp;${host}!rmail&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${local_part}@${domain}"</code><br>
<code>&nbsp;&nbsp;return_fail_output&nbsp;=&nbsp;true</code><br>
<code>local_delivery:</code><br>
<code>&nbsp;&nbsp;driver&nbsp;=&nbsp;appendfile</code><br>
<code>&nbsp;&nbsp;file&nbsp;=&nbsp;/var/spool/mail/${local_part}</code><br>
<code>&nbsp;&nbsp;delivery_date_add</code><br>
<code>&nbsp;&nbsp;envelope_to_add</code><br>
<code>&nbsp;&nbsp;return_path_add</code><br>
<code>&nbsp;&nbsp;group&nbsp;=&nbsp;mail</code><br>
<code>&nbsp;&nbsp;mode_fail_narrower&nbsp;=</code><br>
<code>&nbsp;&nbsp;mode&nbsp;=&nbsp;0660</code><br>
<code>end</code><br>
<code>######################&nbsp;DIRECTORS&nbsp;CONFIGURATION&nbsp;#######################</code><br>
<code>localuser:</code><br>
<code>&nbsp;&nbsp;driver&nbsp;=&nbsp;localuser</code><br>
<code>&nbsp;&nbsp;transport&nbsp;=&nbsp;local_delivery</code><br>
<code>end</code><br>
<code>######################&nbsp;ROUTERS&nbsp;CONFIGURATION&nbsp;#########################</code><br>
<code>touucp:</code><br>
<code>&nbsp;&nbsp;driver&nbsp;=&nbsp;domainlist</code><br>
<code>&nbsp;&nbsp;route_list&nbsp;=&nbsp;"*&nbsp;server1"</code><br>
<code>&nbsp;&nbsp;transport&nbsp;=&nbsp;uucp</code><br>
<code>end</code><br>
<code>######################&nbsp;RETRY&nbsp;CONFIGURATION&nbsp;###########################</code><br>
<code>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F,2m,1m</code><br>
<code>end</code><br>
</FONT></TD></TR></TABLE><P>

<P>
On machine <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>, <TT>
<FONT COLOR="#0000ff">exim</FONT></TT> must however be running
as a full-blown mail server to properly route the mail elsewhere. Of
course, on <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>, <TT>
<FONT COLOR="#0000ff">rmail</FONT></TT> is the sender; hence, it appears to
<TT>
<FONT COLOR="#0000ff">exim</FONT></TT> that the mail is coming from the local machine. This means
that no extra configuration is required to support mail coming
<I>from</I> a <TT>
<FONT COLOR="#0000ff">uux</FONT></TT> command.

<P>
Note that you can add further domains to your
<TT>
<FONT COLOR="#0000ff">route_list</FONT></TT>
so that your dialouts occur directly to the recipient's machine.
For instance:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>&nbsp;&nbsp;route_list&nbsp;=&nbsp;"machine2.cranzgot.co.za&nbsp;machine2&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine2&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine3.cranzgot.co.za&nbsp;machine3&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine3&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server1"</code><br>
</FONT></TD></TR></TABLE><P>

<P>
You can then add further entries to your <TT>
<FONT COLOR="#0000ff">/etc/uucp/sys</FONT></TT>
file as follows:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>10</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>15</code></font><code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>system&nbsp;machine2</code><br>
<code>call-login&nbsp;*</code><br>
<code>call-password&nbsp;*</code><br>
<code>time&nbsp;any</code><br>
<code>port&nbsp;ACU</code><br>
<code>phone&nbsp;555-6789</code><br>
<code>protocol&nbsp;g</code><br>
<code>&nbsp;</code><br>
<code>system&nbsp;machine3</code><br>
<code>call-login&nbsp;*</code><br>
<code>call-password&nbsp;*</code><br>
<code>time&nbsp;any</code><br>
<code>port&nbsp;ACU</code><br>
<code>phone&nbsp;554-3210</code><br>
<code>protocol&nbsp;g</code><br>
</FONT></TD></TR></TABLE><P>

<P>
The <TT>
<FONT COLOR="#0000ff">exim.conf</FONT></TT> file on <TT>
<FONT COLOR="#0000ff">server1</FONT></TT> must also have a
router to get mail back to <TT>
<FONT COLOR="#0000ff">machine1</FONT></TT>. The router will look like this:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>5</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<font size="-1"><code>10</code></font><code>&nbsp;</code><br>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>######################&nbsp;ROUTERS&nbsp;CONFIGURATION&nbsp;#########################</code><br>
<code>touucp:</code><br>
<code>&nbsp;&nbsp;driver&nbsp;=&nbsp;domainlist</code><br>
<code>&nbsp;&nbsp;route_list&nbsp;=&nbsp;"machine2.cranzgot.co.za&nbsp;machine2&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine2&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine3.cranzgot.co.za&nbsp;machine3&nbsp;&#059;&nbsp;\</code><br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine3"</code><br>
<code>&nbsp;&nbsp;transport&nbsp;=&nbsp;uucp</code><br>
<code>lookuphost:</code><br>
<code>&nbsp;&nbsp;driver&nbsp;=&nbsp;lookuphost</code><br>
<code>&nbsp;&nbsp;transport&nbsp;=&nbsp;remote_smtp</code><br>
<code>end</code><br>
</FONT></TD></TR></TABLE><P>
This router sends all mail matching our dial-in hosts through the
<TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> transport while all other mail (destined for the Internet)
falls through to the <TT>
<FONT COLOR="#0000ff">lookuphost</FONT></TT> router.

<P>

<H1><A NAME="SECTION003770000000000000000">
34.7 Scheduling Dialouts</A>
</H1>

<P>
Above, we used <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> only manually. <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> does not operate
as a daemon process on its own and must be invoked by <TT>
<FONT COLOR="#0000ff">crond</FONT></TT>.
All systems that use <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> have a <TT>
<FONT COLOR="#0000ff">/etc/crontab</FONT></TT> entry
or a script under <TT>
<FONT COLOR="#0000ff">/etc/cron.hourly</FONT></TT>.

<P>
A typical <TT>
<FONT COLOR="#0000ff">/etc/crontab</FONT></TT> for <TT>
<FONT COLOR="#0000ff">machine1</FONT></TT> might contain:

<P><TABLE nowrap="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD valign="top" class="source" width="2%"><FONT color=red>
<code>&nbsp;</code><br>
<code>&nbsp;</code><br>
</FONT></TD><TD valign="top" class="source" bgcolor="#FFE0C0"><FONT color=blue>
<code>45&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;*&nbsp;uucp&nbsp;/usr/lib/uucp/uucico&nbsp;--master</code><br>
<code>40&nbsp;8,13,18&nbsp;*&nbsp;*&nbsp;*&nbsp;root&nbsp;/usr/bin/uux&nbsp;-r&nbsp;server1!</code><br>
</FONT></TD></TR></TABLE><P>
The option <TT>
<FONT COLOR="#0000ff">&#45;&#45;master</FONT></TT> tells <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> to loop through
all pending jobs and call any machines for which jobs are queued. It
does this every hour. The second line queues a null command three times
daily for the machine <TT>
<FONT COLOR="#0000ff">server1</FONT></TT>. This will force <TT>
<FONT COLOR="#0000ff">uucico</FONT></TT> to
dial out to <TT>
<FONT COLOR="#0000ff">server1</FONT></TT> at least three times a day on the appearance
of real work to be done. The point of this to pick up any jobs coming
the other way. This process is known as creating a <I>poll file</I>.

<P>
Clearly, you can use <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> over a TCP link initiated by
<TT>
<FONT COLOR="#0000ff">pppd</FONT></TT>. If a dial link is running in demand mode, a <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT>
call will trigger a dialout and make a straight TCP connection through
to the remote host. A common situation occurs when a number of satellite
systems are dialing an ISP that has no <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> facility.
To service the satellite machines, a separate <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> server is
deployed that has no modems of its own. The server will have a permanent
Internet connection and listen on TCP for <TT>
<FONT COLOR="#0000ff">uucp</FONT></TT> transfers.

<P>

<HR>
<!--Navigation Panel-->
<A NAME="tex2html2470"
  HREF="node38.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html2466"
  HREF="rute.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html2460"
  HREF="node36.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html2468"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html2471"
  HREF="node38.html">35. The LINUX File</A>
<B> Up:</B> <A NAME="tex2html2467"
  HREF="rute.html">rute</A>
<B> Previous:</B> <A NAME="tex2html2461"
  HREF="node36.html">33. Sending Faxes</A>
 &nbsp <B>  <A NAME="tex2html2469"
  HREF="node1.html">Contents</A></B> 
<!--End of Navigation Panel-->

</BODY>
</HTML>