summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin/sendmail/doc/op/op.me
blob: 3c5efb96e7274d580033ee0646fab591fa55acf9 (plain)
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
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
.\" Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
.\"	All rights reserved.
.\" Copyright (c) 1983, 1995 Eric P. Allman.  All rights reserved.
.\" Copyright (c) 1983, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" By using this file, you agree to the terms and conditions set
.\" forth in the LICENSE file which can be found at the top level of
.\" the sendmail distribution.
.\"
.\"
.\"	$Sendmail: op.me,v 8.317.4.47 2000/12/17 00:54:56 gshapiro Exp $
.\"
.\" eqn op.me | pic | troff -me
.eh 'SMM:08-%''Sendmail Installation and Operation Guide'
.oh 'Sendmail Installation and Operation Guide''SMM:08-%'
.\" SD is lib if sendmail is installed in /usr/lib, sbin if in /usr/sbin
.ds SD sbin
.\" SB is bin if newaliases/mailq are installed in /usr/bin, ucb if in /usr/ucb
.ds SB bin
.nr si 3n
.de $0
.(x
.in \\$3u*3n
.ti -3n
\\$2.  \\$1
.)x
..
.de $C
.(x
.in 0
\\$1 \\$2.  \\$3
.)x
..
.+c
.(l C
.sz 16
.b SENDMAIL\u\s-6TM\s0\d
.sz 12
.sp
.b "INSTALLATION AND OPERATION GUIDE"
.(f
.b DISCLAIMER:
This documentation is under modification.
.)f
.sz 10
.sp
.r
Eric Allman
Sendmail, Inc.
eric@Sendmail.COM
.sp
.de Ve
Version \\$2
..
.Ve $Revision: 1.4 $
.rm Ve
.sp
For Sendmail Version 8.11
.)l
.(f
Sendmail is a trademark of Sendmail, Inc.
.)f
.sp 2
.pp
.i Sendmail \u\s-2TM\s0\d
implements a general purpose internetwork mail routing facility
under the UNIX\(rg
operating system.
It is not tied to any one transport protocol \*-
its function may be likened to a crossbar switch,
relaying messages from one domain into another.
In the process,
it can do a limited amount of message header editing
to put the message into a format that is appropriate
for the receiving domain.
All of this is done under the control of a configuration file.
.pp
Due to the requirements of flexibility
for
.i sendmail ,
the configuration file can seem somewhat unapproachable.
However, there are only a few basic configurations
for most sites,
for which standard configuration files have been supplied.
Most other configurations
can be built by adjusting an existing configuration file
incrementally.
.pp
.i Sendmail
is based on
RFC821 (Simple Mail Transport Protocol),
RFC822 (Internet Mail Headers Format),
RFC974 (MX routing),
RFC1123 (Internet Host Requirements),
RFC2045 (MIME),
RFC1869 (SMTP Service Extensions),
RFC1652 (SMTP 8BITMIME Extension),
RFC1870 (SMTP SIZE Extension),
RFC1891 (SMTP Delivery Status Notifications),
RFC1892 (Multipart/Report),
RFC1893 (Mail System Status Codes),
RFC1894 (Delivery Status Notifications),
RFC1985 (SMTP Service Extension for Remote Message Queue Starting),
RFC2033 (Local Message Transmission Protocol),
RFC2034 (SMTP Service Extension for Returning Enhanced Error Codes),
RFC2476 (Message Submission),
RFC2487 (SMTP Service Extension for Secure SMTP over TLS),
and
RFC2554 (SMTP Service Extension for Authentication).
However, since
.i sendmail
is designed to work in a wider world,
in many cases it can be configured to exceed these protocols.
These cases are described herein.
.pp
Although
.i sendmail
is intended to run
without the need for monitoring,
it has a number of features
that may be used to monitor or adjust the operation
under unusual circumstances.
These features are described.
.pp
Section one describes how to do a basic
.i sendmail
installation.
Section two
explains the day-to-day information you should know
to maintain your mail system.
If you have a relatively normal site,
these two sections should contain sufficient information
for you to install
.i sendmail
and keep it happy.
Section three
describes some parameters that may be safely tweaked.
Section four
has information regarding the command line arguments.
Section five
contains the nitty-gritty information about the configuration
file.
This section is for masochists
and people who must write their own configuration file.
Section six
describes configuration that can be done at compile time.
The appendixes give a brief
but detailed explanation of a number of features
not described in the rest of the paper.
.bp 7
.sh 1 "BASIC INSTALLATION"
.pp
There are two basic steps to installing
.i sendmail .
First, you have to compile and install the binary.
If
.i sendmail
has already been ported to your operating system
that should be simple.
Second, you must build a run-time configuration file.
This is a file that
.i sendmail
reads when it starts up
that describes the mailers it knows about,
how to parse addresses,
how to rewrite the message header,
and the settings of various options.
Although the configuration file can be quite complex,
a configuration can usually be built
using an M4-based configuration language.
.pp
The remainder of this section will describe the installation of
.i sendmail
assuming you can use one of the existing configurations
and that the standard installation parameters are acceptable.
All pathnames and examples
are given from the root of the
.i sendmail
subtree,
normally
.i /usr/src/usr.\*(SD/sendmail
on 4.4BSD.
.pp
If you are loading this off the tape,
continue with the next section.
If you have a running binary already on your system,
you should probably skip to section 1.2.
.sh 2 "Compiling Sendmail"
.pp
All
.i sendmail
source is in the
.i sendmail
subdirectory.
To compile sendmail,
.q cd
into the
.i sendmail
directory and type
.(b
\&./Build
.)b
This will leave the binary in an appropriately named subdirectory,
e.g.,
obj.BSD-OS.2.1.i386.
It works for multiple object versions
compiled out of the same directory.
.sh 3 "Tweaking the Build Invocation"
.pp
You can give parameters on the
.i Build
command.
In most cases these are only used when the
.i obj.*
directory is first created.
These commands include:
.nr ii 0.5i
.ip "\-L \fIlibdirs\fP"
A list of directories to search for libraries.
.ip "\-I \fIincdirs\fP"
A list of directories to search for include files.
.ip "\-E \fIenvar\fP=\fIvalue\fP"
Set an environment variable to an indicated
.i value
before compiling.
.ip "\-c"
Create a new
.i obj.*
tree before running.
.ip "\-f \fIsiteconfig\fP"
Read the indicated site configuration file.
If this parameter is not specified,
.i Build
includes
.i all
of the files
.i $BUILDTOOLS/Site/site.$oscf.m4
and
.i $BUILDTOOLS/Site/site.config.m4 ,
where $BUILDTOOLS is normally
.i \&../devtools
and $oscf is the same name as used on the
.i obj.*
directory.
See below for a description of the site configuration file.
.ip "\-S"
Skip auto-configuration.
.i Build
will avoid auto-detecting libraries if this is set.
All libraries and map definitions must be specified
in the site configuration file.
.lp
Any other parameters are passed to the
.i make
program.
.sh 3 "Creating a Site Configuration File"
.\"XXX
.pp
(This section is not yet complete.
For now, see the file devtools/README for details.)
See sendmail/README for various compilation flags that can be set.
.sh 3 "Tweaking the Makefile"
.pp
.\" .b "XXX This should all be in the Site Configuration File section."
.i Sendmail
supports two different formats
for the local (on disk) version of databases,
notably the
.i aliases
database.
At least one of these should be defined if at all possible.
.nr ii 1i
.ip NDBM
The ``new DBM'' format,
available on nearly all systems around today.
This was the preferred format prior to 4.4BSD.
It allows such complex things as multiple databases
and closing a currently open database.
.ip NEWDB
The Berkeley DB package.
If you have this, use it.
It allows
long records,
multiple open databases,
real in-memory caching,
and so forth.
You can define this in conjunction with
.sm NDBM ;
if you do,
old alias databases are read,
but when a new database is created it will be in NEWDB format.
As a nasty hack,
if you have NEWDB, NDBM, and NIS defined,
and if the alias file name includes the substring
.q /yp/ ,
.i sendmail
will create both new and old versions of the alias file
during a
.i newalias
command.
This is required because the Sun NIS/YP system
reads the DBM version of the alias file.
It's ugly as sin,
but it works.
.lp
If neither of these are defined,
.i sendmail
reads the alias file into memory on every invocation.
This can be slow and should be avoided.
There are also several methods for remote database access:
.ip NIS
Sun's Network Information Services (formerly YP).
.ip NISPLUS
Sun's NIS+ services.
.ip NETINFO
NeXT's NetInfo service.
.ip HESIOD
Hesiod service (from Athena).
.lp
Other compilation flags are set in conf.h
and should be predefined for you
unless you are porting to a new environment.
.sh 3 "Compilation and installation"
.pp
After making the local system configuration described above,
You should be able to compile and install the system.
The script
.q Build
is the best approach on most systems:
.(b
\&./Build
.)b
This will use
.i uname (1)
to create a custom Makefile for your environment.
.pp
If you are installing in the standard places,
you should be able to install using
.(b
\&./Build install
.)b
This should install the binary in
/usr/\*(SD
and create links from
/usr/\*(SB/newaliases
and
/usr/\*(SB/mailq
to
/usr/\*(SD/sendmail.
On 4.4BSD systems it will also format and install man pages.
.sh 2 "Configuration Files"
.pp
.i Sendmail
cannot operate without a configuration file.
The configuration defines the mail delivery mechanisms understood at this site,
how to access them,
how to forward email to remote mail systems,
and a number of tuning parameters.
This configuration file is detailed
in the later portion of this document.
.pp
The
.i sendmail
configuration can be daunting at first.
The world is complex,
and the mail configuration reflects that.
The distribution includes an m4-based configuration package
that hides a lot of the complexity.
.pp
These configuration files are simpler than old versions
largely because the world has become simpler;
in particular,
text-based host files are officially eliminated,
obviating the need to
.q hide
hosts behind a registered internet gateway.
.pp
These files also assume that most of your neighbors
use domain-based UUCP addressing;
that is,
instead of naming hosts as
.q host!user
they will use
.q host.domain!user .
The configuration files can be customized to work around this,
but it is more complex.
.pp
Our configuration files are processed by
.i m4
to facilitate local customization;
the directory
.i cf
of the
.i sendmail
distribution directory
contains the source files.
This directory contains several subdirectories:
.nr ii 1i
.ip cf
Both site-dependent and site-independent descriptions of hosts.
These can be literal host names
(e.g.,
.q ucbvax.mc )
when the hosts are gateways
or more general descriptions
(such as
.q "generic-solaris2.mc"
as a general description of an SMTP-connected host
running Solaris 2.x.
Files ending
.b \&.mc
(``Master Configuration'')
are the input descriptions;
the output is in the corresponding
.b \&.cf
file.
The general structure of these files is described below.
.ip domain
Site-dependent subdomain descriptions.
These are tied to the way your organization wants to do addressing.
For example,
.b domain/CS.Berkeley.EDU.m4
is our description for hosts in the CS.Berkeley.EDU subdomain.
These are referenced using the
.sm DOMAIN
.b m4
macro in the
.b \&.mc
file.
.ip feature
Definitions of specific features that some particular host in your site
might want.
These are referenced using the
.sm FEATURE
.b m4
macro.
An example feature is
use_cw_file
(which tells
.i sendmail
to read an /etc/mail/local-host-names file on startup
to find the set of local names).
.ip hack
Local hacks, referenced using the
.sm HACK
.b m4
macro.
Try to avoid these.
The point of having them here is to make it clear that they smell.
.ip m4
Site-independent
.i m4 (1)
include files that have information common to all configuration files.
This can be thought of as a
.q #include
directory.
.ip mailer
Definitions of mailers,
referenced using the
.sm MAILER
.b m4
macro.
The mailer types that are known in this distribution are
fax,
local,
smtp,
uucp,
and usenet.
For example, to include support for the UUCP-based mailers,
use
.q MAILER(uucp) .
.ip ostype
Definitions describing various operating system environments
(such as the location of support files).
These are referenced using the
.sm OSTYPE
.b m4
macro.
.ip sh
Shell files used by the
.b m4
build process.
You shouldn't have to mess with these.
.ip siteconfig
Local UUCP connectivity information.
This directory has been supplanted by the mailertable feature;
any new configurations should use that feature to do UUCP
(and other) routing.
.pp
If you are in a new domain
(e.g., a company),
you will probably want to create a
cf/domain
file for your domain.
This consists primarily of relay definitions
and features you want enabled site-wide:
for example, Berkeley's domain definition
defines relays for
BitNET
and UUCP.
These are specific to Berkeley,
and should be fully-qualified internet-style domain names.
Please check to make certain they are reasonable for your domain.
.pp
Subdomains at Berkeley are also represented in the
cf/domain
directory.
For example,
the domain
CS.Berkeley.EDU
is the Computer Science subdomain,
EECS.Berkeley.EDU
is the Electrical Engineering and Computer Sciences subdomain,
and
S2K.Berkeley.EDU
is the Sequoia 2000 subdomain.
You will probably have to add an entry to this directory
to be appropriate for your domain.
.pp
You will have to use or create
.b \&.mc
files in the
.i cf/cf
subdirectory for your hosts.
This is detailed in the
cf/README
file.
.sh 2 "Details of Installation Files"
.pp
This subsection describes the files that
comprise the
.i sendmail
installation.
.sh 3 "/usr/\*(SD/sendmail"
.pp
The binary for
.i sendmail
is located in /usr/\*(SD\**.
.(f
\**This is usually
/usr/sbin
on 4.4BSD and newer systems;
many systems install it in
/usr/lib.
I understand it is in /usr/ucblib
on System V Release 4.
.)f
It should be setuid root.
For security reasons,
/, /usr, and /usr/\*(SD
should be owned by root, mode 755\**.
.(f
\**Some vendors ship them owned by bin;
this creates a security hole that is not actually related to
.i sendmail .
Other important directories that should have restrictive ownerships
and permissions are
/bin, /usr/bin, /etc, /etc/mail, /usr/etc, /lib, and /usr/lib.
.)f
.sh 3 "/etc/mail/sendmail.cf"
.pp
This is the configuration file for
.i sendmail \**.
.(f
\**Actually, the pathname varies depending on the operating system;
/etc/mail is the preferred directory.
Some older systems install it in
.b /usr/lib/sendmail.cf ,
and I've also seen it in
.b /usr/ucblib .
If you want to move this file,
add -D_PATH_SENDMAILCF=\e"/file/name\e"
to the flags passed to the C compiler.
Moving this file is not recommended:
other programs and scripts know of this location.
.)f
This is the only non-library file name compiled into
.i sendmail \**.
.(f
\**The system libraries can reference other files;
in particular, system library subroutines that
.i sendmail
calls probably reference
.i /etc/passwd
and
.i /etc/resolv.conf .
.)f
.pp
The configuration file is normally created
using the distribution files described above.
If you have a particularly unusual system configuration
you may need to create a special version.
The format of this file is detailed in later sections
of this document.
.sh 3 "/usr/\*(SB/newaliases"
.pp
The
.i newaliases
command should just be a link to
.i sendmail :
.(b
rm \-f /usr/\*(SB/newaliases
ln \-s /usr/\*(SD/sendmail /usr/\*(SB/newaliases
.)b
This can be installed in whatever search path you prefer
for your system.
.sh 3 "/usr/\*(SB/hoststat"
.pp
The
.i hoststat
command should just be a link to
.i sendmail ,
in a fashion similar to
.i newaliases .
This command lists the status of the last mail transaction
with all remote hosts.  The
.b \-v
flag will prevent the status display from being truncated.
It functions only when the
.b HostStatusDirectory
option is set.
.sh 3 "/usr/\*(SB/purgestat"
.pp
This command is also a link to
.i sendmail .
It flushes all information that is stored in the
.b HostStatusDirectory
tree.
.sh 3 "/var/spool/mqueue"
.pp
The directory
.i /var/spool/mqueue
should be created to hold the mail queue.
This directory should be mode 700
and owned by root.
.pp
The actual path of this directory
is defined in the
.b Q
option of the
.i sendmail.cf
file.
To use multiple queues,
supply a value ending with an asterisk.
For example,
.i /var/spool/mqueue/q*
will use all of the directories or symbolic links to directories
beginning with `q' in
.i /var/spool/mqueue
as queue directories.
Do not change the queue directory structure
while sendmail is running.
.pp
If these directories have subdirectories or symbolic links to directories
named `qf', `df', and `xf', then these will be used for the different
queue file types.
That is, the data files are stored in the `df' subdirectory,
the transcript files are stored in the `xf' subdirectory, and
all others are stored in the `qf' subdirectory.
.sh 3 "/var/spool/mqueue/.hoststat"
.pp
This is a typical value for the
.b HostStatusDirectory
option,
containing one file per host
that this sendmail has chatted with recently.
It is normally a subdirectory of
.i mqueue .
.sh 3 "/etc/mail/aliases*"
.pp
The system aliases are held in
.q /etc/mail/aliases .
A sample is given in
.q sendmail/aliases
which includes some aliases which
.i must
be defined:
.(b
cp lib/aliases /etc/mail/aliases
.i "edit /etc/mail/aliases"
.)b
You should extend this file with any aliases that are apropos to your system.
.pp
Normally
.i sendmail
looks at a database version of the files,
stored either in
.q /etc/mail/aliases.dir
and
.q /etc/mail/aliases.pag
or
.q /etc/mail/aliases.db
depending on which database package you are using.
The actual path of this file
is defined in the
.b AliasFile
option of the
.i sendmail.cf
file.
.sh 3 "/etc/rc or /etc/init.d/sendmail"
.pp
It will be necessary to start up the
.i sendmail
daemon when your system reboots.
This daemon performs two functions:
it listens on the SMTP socket for connections
(to receive mail from a remote system)
and it processes the queue periodically
to insure that mail gets delivered when hosts come up.
.pp
Add the following lines to
.q /etc/rc
(or
.q /etc/rc.local
as appropriate)
in the area where it is starting up the daemons
on a BSD-base system,
or on a System-V-based system
in one of the startup files, typically
.q /etc/init.d/sendmail :
.(b
if [ \-f /usr/\*(SD/sendmail \-a \-f /etc/mail/sendmail.cf ]; then
	(cd /var/spool/mqueue; rm \-f [lnx]f*)
	/usr/\*(SD/sendmail \-bd \-q30m &
	echo \-n ' sendmail' >/dev/console
fi
.)b
The
.q cd
and
.q rm
commands insure that all lock files have been removed;
extraneous lock files may be left around
if the system goes down in the middle of processing a message.
The line that actually invokes
.i sendmail
has two flags:
.q \-bd
causes it to listen on the SMTP port,
and
.q \-q30m
causes it to run the queue every half hour.
.pp
Some people use a more complex startup script,
removing zero length qf files and df files for which there is no qf file.
For example, see Figure 1
for an example of a complex script which does this clean up.
.(z
.hl
#!/bin/sh
# remove zero length qf files
for qffile in qf*
do
	if [ \-r $qffile ]
	then
		if [ ! \-s $qffile ]
		then
			echo \-n " <zero: $qffile>" > /dev/console
			rm \-f $qffile
		fi
	fi
done
# rename tf files to be qf if the qf does not exist
for tffile in tf*
do
	qffile=`echo $tffile | sed 's/t/q/'`
	if [ \-r $tffile \-a ! \-f $qffile ]
	then
		echo \-n " <recovering: $tffile>" > /dev/console
		mv $tffile $qffile
	else
		if [ \-f $tffile ]
		then
			echo \-n " <extra: $tffile>" > /dev/console
			rm \-f $tffile
		fi
	fi
done
# remove df files with no corresponding qf files
for dffile in df*
do
	qffile=`echo $dffile | sed 's/d/q/'`
	if [ \-r $dffile \-a ! \-f $qffile ]
	then
		echo \-n " <incomplete: $dffile>" > /dev/console
		mv $dffile `echo $dffile | sed 's/d/D/'`
	fi
done
# announce files that have been saved during disaster recovery
for xffile in [A-Z]f*
do
	if [ \-f $xffile ]
	then
		echo \-n " <panic: $xffile>" > /dev/console
	fi
done
.sp
.ce
Figure 1 \(em A complex startup script
.hl
.)z
.pp
If you are not running a version of UNIX
that supports Berkeley TCP/IP,
do not include the
.b \-bd
flag.
.sh 3 "/etc/mail/helpfile"
.pp
This is the help file used by the SMTP
.b HELP
command.
It should be copied from
.q sendmail/helpfile :
.(b
cp sendmail/helpfile /etc/mail/helpfile
.)b
The actual path of this file
is defined in the
.b HelpFile
option of the
.i sendmail.cf
file.
.sh 3 "/etc/mail/statistics"
.pp
If you wish to collect statistics
about your mail traffic,
you should create the file
.q /etc/mail/statistics :
.(b
cp /dev/null /etc/mail/statistics
chmod 644 /etc/mail/statistics
.)b
This file does not grow.
It is printed with the program
.q mailstats/mailstats.c.
The actual path of this file
is defined in the
.b S
option of the
.i sendmail.cf
file.
.sh 3 "/usr/\*(SB/mailq"
.pp
If
.i sendmail
is invoked as
.q mailq,
it will simulate the
.b \-bp
flag
(i.e.,
.i sendmail
will print the contents of the mail queue;
see below).
This should be a link to /usr/\*(SD/sendmail.
.sh 1 "NORMAL OPERATIONS"
.sh 2 "The System Log"
.pp
The system log is supported by the
.i syslogd \|(8)
program.
All messages from
.i sendmail
are logged under the
.sm LOG_MAIL
facility\**.
.(f
\**Except on Ultrix,
which does not support facilities in the syslog.
.)f
.sh 3 "Format"
.pp
Each line in the system log
consists of a timestamp,
the name of the machine that generated it
(for logging from several machines
over the local area network),
the word
.q sendmail: ,
and a message\**.
.(f
\**This format may vary slightly if your vendor has changed
the syntax.
.)f
Most messages are a sequence of
.i name \c
=\c
.i value
pairs.
.pp
The two most common lines are logged when a message is processed.
The first logs the receipt of a message;
there will be exactly one of these per message.
Some fields may be omitted if they do not contain interesting information.
Fields are:
.ip from
The envelope sender address.
.ip size
The size of the message in bytes.
.ip class
The class (i.e., numeric precedence) of the message.
.ip pri
The initial message priority (used for queue sorting).
.ip nrcpts
The number of envelope recipients for this message
(after aliasing and forwarding).
.ip msgid
The message id of the message (from the header).
.ip proto
The protocol used to receive this message (e.g., ESMTP or UUCP)
.ip daemon
The daemon name from the
.b DaemonPortOptions
setting.
.ip relay
The machine from which it was received.
.lp
There is also one line logged per delivery attempt
(so there can be several per message if delivery is deferred
or there are multiple recipients).
Fields are:
.ip to
A comma-separated list of the recipients to this mailer.
.ip ctladdr
The ``controlling user'', that is, the name of the user
whose credentials we use for delivery.
.ip delay
The total delay between the time this message was received
and the current delivery attempt.
.ip xdelay
The amount of time needed in this delivery attempt
(normally indicative of the speed of the connection).
.ip mailer
The name of the mailer used to deliver to this recipient.
.ip relay
The name of the host that actually accepted (or rejected) this recipient.
.ip dsn
The enhanced error code (RFC2034) if available.
.ip stat
The delivery status.
.lp
Not all fields are present in all messages;
for example, the relay is not listed for local deliveries.
.sh 3 "Levels"
.pp
If you have
.i syslogd \|(8)
or an equivalent installed,
you will be able to do logging.
There is a large amount of information that can be logged.
The log is arranged as a succession of levels.
At the lowest level
only extremely strange situations are logged.
At the highest level,
even the most mundane and uninteresting events
are recorded for posterity.
As a convention,
log levels under ten
are considered generally
.q useful;
log levels above 64
are reserved for debugging purposes.
Levels from 11\-64 are reserved for verbose information
that some sites might want.
.pp
A complete description of the log levels
is given in section
.\" XREF
4.6.
.sh 2 "Dumping State"
.pp
You can ask
.i sendmail
to log a dump of the open files
and the connection cache
by sending it a
.sm SIGUSR1
signal.
The results are logged at
.sm LOG_DEBUG
priority.
.sh 2 "The Mail Queue"
.pp
Sometimes a host cannot handle a message immediately.
For example, it may be down or overloaded, causing it to refuse connections.
The sending host is then expected to save this message in
its mail queue
and attempt to deliver it later.
.pp
Under normal conditions the mail queue will be processed transparently.
However, you may find that manual intervention is sometimes necessary.
For example,
if a major host is down for a period of time
the queue may become clogged.
Although
.i sendmail
ought to recover gracefully when the host comes up,
you may find performance unacceptably bad in the meantime.
.sh 3 "Printing the queue"
.pp
The contents of the queue can be printed
using the
.i mailq
command
(or by specifying the
.b \-bp
flag to
.i sendmail ):
.(b
mailq
.)b
This will produce a listing of the queue id's,
the size of the message,
the date the message entered the queue,
and the sender and recipients.
.sh 3 "Forcing the queue"
.pp
.i Sendmail
should run the queue automatically
at intervals.
When using multiple queues,
a separate process will be created to
run each of the queues
unless the queue run is initiated by a user
with the verbose flag.
The algorithm is to read and sort the queue,
and then to attempt to process all jobs in order.
When it attempts to run the job,
.i sendmail
first checks to see if the job is locked.
If so, it ignores the job.
.pp
There is no attempt to insure that only one queue processor
exists at any time,
since there is no guarantee that a job cannot take forever
to process
(however,
.i sendmail
does include heuristics to try to abort jobs
that are taking absurd amounts of time;
technically, this violates RFC 821, but is blessed by RFC 1123).
Due to the locking algorithm,
it is impossible for one job to freeze the entire queue.
However,
an uncooperative recipient host
or a program recipient
that never returns
can accumulate many processes in your system.
Unfortunately,
there is no completely general way to solve this.
.pp
In some cases,
you may find that a major host going down
for a couple of days
may create a prohibitively large queue.
This will result in
.i sendmail
spending an inordinate amount of time
sorting the queue.
This situation can be fixed by moving the queue to a temporary place
and creating a new queue.
The old queue can be run later when the offending host returns to service.
.pp
To do this,
it is acceptable to move the entire queue directory:
.(b
cd /var/spool
mv mqueue omqueue; mkdir mqueue; chmod 700 mqueue
.)b
You should then kill the existing daemon
(since it will still be processing in the old queue directory)
and create a new daemon.
.pp
To run the old mail queue,
run the following command:
.(b
/usr/\*(SD/sendmail \-oQ/var/spool/omqueue \-q
.)b
The
.b \-oQ
flag specifies an alternate queue directory
and the
.b \-q
flag says to just run every job in the queue.
If you have a tendency toward voyeurism,
you can use the
.b \-v
flag to watch what is going on.
.pp
When the queue is finally emptied,
you can remove the directory:
.(b
rmdir /var/spool/omqueue
.)b
.sh 2 "Disk Based Connection Information"
.pp
.i Sendmail
stores a large amount of information about each remote system it
has connected to in memory. It is now possible to preserve some
of this information on disk as well, by using the
.b HostStatusDirectory
option, so that it may be shared between several invocations of
.i sendmail .
This allows mail to be queued immediately or skipped during a queue run if
there has been a recent failure in connecting to a remote machine.
.pp
Additionally enabling
.b SingleThreadDelivery
has the added effect of single-threading mail delivery to a destination.
This can be quite helpful
if the remote machine is running an SMTP server that is easily overloaded
or cannot accept more than a single connection at a time,
but can cause some messages to be punted to a future queue run.
It also applies to
.i all
hosts, so setting this because you have one machine on site
that runs some software that is easily overrun
can cause mail to other hosts to be slowed down.
If this option is set,
you probably want to set the
.b MinQueueAge
option as well and run the queue fairly frequently;
this way jobs that are skipped because another
.i sendmail
is talking to the same host will be tried again quickly
rather than being delayed for a long time.
.pp
The disk based host information is stored in a subdirectory of the
.b mqueue
directory called
.b \&.hoststat \**.
.(f
\**This is the usual value of the
.b HostStatusDirectory
option;
it can, of course, go anywhere you like in your filesystem.
.)f
Removing this directory and its subdirectories has an effect similar to
the
.i purgestat
command and is completely safe.
The information in these directories can
be perused with the
.i hoststat
command, which will indicate the host name, the last access, and the
status of that access.
An asterisk in the left most column indicates that a
.i sendmail
process currently has the host locked for mail delivery.
.pp
The disk based connection information is treated the same way as memory based
connection information for the purpose of timeouts.
By default, information about host failures is valid for 30 minutes.
This can be adjusted with
the
.b Timeout.hoststatus
option.
.pp
The connection information stored on disk may be purged at any time
with the
.i purgestat
command or by invoking sendmail with the
.b \-bH
switch.
The connection information may be viewed with the
.i hoststat
command or by invoking sendmail with the
.b \-bh
switch.
.sh 2 "The Service Switch"
.pp
The implementation of certain system services
such as host and user name lookup
is controlled by the service switch.
If the host operating system supports such a switch
.i sendmail
will use the native version.
Ultrix, Solaris, and DEC OSF/1 are examples of such systems\**.
.(f
\**HP-UX 10 has service switch support,
but since the APIs are apparently not available in the libraries
.i sendmail
does not use the native service switch in this release.
.)f
.pp
If the underlying operating system does not support a service switch
(e.g., SunOS 4.X, HP-UX, BSD)
then
.i sendmail
will provide a stub implementation.
The
.b ServiceSwitchFile
option points to the name of a file that has the service definitions.
Each line has the name of a service
and the possible implementations of that service.
For example, the file:
.(b
hosts	dns files nis
aliases	files nis
.)b
will ask
.i sendmail
to look for hosts in the Domain Name System first.
If the requested host name is not found,
it tries local files,
and if that fails it tries NIS.
Similarly,
when looking for aliases
it will try the local files first
followed by NIS.
.pp
Service switches are not completely integrated.
For example, despite the fact that the host entry listed in the above example
specifies to look in NIS,
on SunOS this won't happen because the system implementation of
.i gethostbyname \|(3)
doesn't understand this.
If there is enough demand
.i sendmail
may reimplement
.i gethostbyname \|(3),
.i gethostbyaddr \|(3),
.i getpwent \|(3),
and the other system routines that would be necessary
to make this work seamlessly.
.sh 2 "The Alias Database"
.pp
After recipient addresses are read from the SMTP connection
or command line
they are parsed by ruleset 0,
which must resolve to a
{\c
.i mailer ,
.i host ,
.i address }
triple.
If the flags selected by the
.i mailer
include the
.b A
(aliasable) flag,
the
.i address
part of the triple is looked up as the key
(i.e., the left hand side)
into the alias database.
If there is a match, the address is deleted from the send queue
and all addresses on the right hand side of the alias
are added in place of the alias that was found.
This is a recursive operation,
so aliases found in the right hand side of the alias
are similarly expanded.
.pp
The alias database exists in two forms.
One is a text form,
maintained in the file
.i /etc/mail/aliases.
The aliases are of the form
.(b
name: name1, name2, ...
.)b
Only local names may be aliased;
e.g.,
.(b
eric@prep.ai.MIT.EDU: eric@CS.Berkeley.EDU
.)b
will not have the desired effect
(except on prep.ai.MIT.EDU,
and they probably don't want me)\**.
.(f
\**Actually, any mailer that has the `A' mailer flag set
will permit aliasing;
this is normally limited to the local mailer.
.)f
Aliases may be continued by starting any continuation lines
with a space or a tab or by putting a backslash directly before
the newline.
Blank lines and lines beginning with a sharp sign
(\c
.q # )
are comments.
.pp
The second form is processed by the
.i ndbm \|(3)\**
.(f
\**The
.i gdbm
package does not work.
.)f
or the Berkeley DB library.
This form is in the file
.i /etc/mail/aliases.db
(if using NEWDB)
or
.i /etc/mail/aliases.dir
and
.i /etc/mail/aliases.pag
(if using NDBM).
This is the form that
.i sendmail
actually uses to resolve aliases.
This technique is used to improve performance.
.pp
The control of search order is actually set by the service switch.
Essentially, the entry
.(b
O AliasFile=switch:aliases
.)b
is always added as the first alias entry;
also, the first alias file name without a class
(e.g., without
.q nis:
on the front)
will be used as the name of the file for a ``files'' entry
in the aliases switch.
For example, if the configuration file contains
.(b
O AliasFile=/etc/mail/aliases
.)b
and the service switch contains
.(b
aliases	nis files nisplus
.)b
then aliases will first be searched in the NIS database,
then in /etc/mail/aliases,
then in the NIS+ database.
.pp
You can also use
.sm NIS -based
alias files.
For example, the specification:
.(b
O AliasFile=/etc/mail/aliases
O AliasFile=nis:mail.aliases@my.nis.domain
.)b
will first search the /etc/mail/aliases file
and then the map named
.q mail.aliases
in
.q my.nis.domain .
Warning: if you build your own
.sm NIS -based
alias files,
be sure to provide the
.b \-l
flag to
.i makedbm (8)
to map upper case letters in the keys to lower case;
otherwise, aliases with upper case letters in their names
won't match incoming addresses.
.pp
Additional flags can be added after the colon
exactly like a
.b K
line \(em for example:
.(b
O AliasFile=nis:\-N mail.aliases@my.nis.domain
.)b
will search the appropriate NIS map and always include null bytes in the key.
Also:
.(b
O AliasFile=nis:\-f mail.aliases@my.nis.domain
.)b
will prevent sendmail from downcasing the key before the alias lookup.
.sh 3 "Rebuilding the alias database"
.pp
The
.i hash
or
.i dbm
version of the database
may be rebuilt explicitly by executing the command
.(b
newaliases
.)b
This is equivalent to giving
.i sendmail
the
.b \-bi
flag:
.(b
/usr/\*(SD/sendmail \-bi
.)b
.pp
If the
.b RebuildAliases
(old
.b D )
option is specified in the configuration,
.i sendmail
will rebuild the alias database automatically
if possible
when it is out of date.
Auto-rebuild can be dangerous
on heavily loaded machines
with large alias files;
if it might take more than the rebuild timeout
(option
.b AliasWait ,
old
.b a ,
which is normally five minutes)
to rebuild the database,
there is a chance that several processes will start the rebuild process
simultaneously.
.pp
If you have multiple aliases databases specified,
the
.b \-bi
flag rebuilds all the database types it understands
(for example, it can rebuild NDBM databases but not NIS databases).
.sh 3 "Potential problems"
.pp
There are a number of problems that can occur
with the alias database.
They all result from a
.i sendmail
process accessing the DBM version
while it is only partially built.
This can happen under two circumstances:
One process accesses the database
while another process is rebuilding it,
or the process rebuilding the database dies
(due to being killed or a system crash)
before completing the rebuild.
.pp
Sendmail has three techniques to try to relieve these problems.
First, it ignores interrupts while rebuilding the database;
this avoids the problem of someone aborting the process
leaving a partially rebuilt database.
Second,
it locks the database source file during the rebuild \(em
but that may not work over NFS or if the file is unwritable.
Third,
at the end of the rebuild
it adds an alias of the form
.(b
@: @
.)b
(which is not normally legal).
Before
.i sendmail
will access the database,
it checks to insure that this entry exists\**.
.(f
\**The
.b AliasWait
option is required in the configuration
for this action to occur.
This should normally be specified.
.)f
.sh 3 "List owners"
.pp
If an error occurs on sending to a certain address,
say
.q \fIx\fP ,
.i sendmail
will look for an alias
of the form
.q owner-\fIx\fP
to receive the errors.
This is typically useful
for a mailing list
where the submitter of the list
has no control over the maintenance of the list itself;
in this case the list maintainer would be the owner of the list.
For example:
.(b
unix-wizards: eric@ucbarpa, wnj@monet, nosuchuser,
	sam@matisse
owner-unix-wizards: unix-wizards-request
unix-wizards-request: eric@ucbarpa
.)b
would cause
.q eric@ucbarpa
to get the error that will occur
when someone sends to
unix-wizards
due to the inclusion of
.q nosuchuser
on the list.
.pp
List owners also cause the envelope sender address to be modified.
The contents of the owner alias are used if they point to a single user,
otherwise the name of the alias itself is used.
For this reason, and to obey Internet conventions,
the
.q owner-
address normally points at the
.q -request
address; this causes messages to go out with the typical Internet convention
of using ``\c
.i list -request''
as the return address.
.sh 2 "User Information Database"
.pp
If you have a version of
.i sendmail
with the user information database
compiled in,
and you have specified one or more databases using the
.b U
option,
the databases will be searched for a
.i user :maildrop
entry.
If found, the mail will be sent to the specified address.
.sh 2 "Per-User Forwarding (.forward Files)"
.pp
As an alternative to the alias database,
any user may put a file with the name
.q .forward
in his or her home directory.
If this file exists,
.i sendmail
redirects mail for that user
to the list of addresses listed in the .forward file.
Note that aliases are fully expanded before forward files are referenced.
For example, if the home directory for user
.q mckusick
has a .forward file with contents:
.(b
mckusick@ernie
kirk@calder
.)b
then any mail arriving for
.q mckusick
will be redirected to the specified accounts.
.pp
Actually, the configuration file defines a sequence of filenames to check.
By default, this is the user's .forward file,
but can be defined to be more generally using the
.b ForwardPath
option.
If you change this,
you will have to inform your user base of the change;
\&.forward is pretty well incorporated into the collective subconscious.
.sh 2 "Special Header Lines"
.pp
Several header lines have special interpretations
defined by the configuration file.
Others have interpretations built into
.i sendmail
that cannot be changed without changing the code.
These builtins are described here.
.sh 3 "Errors-To:"
.pp
If errors occur anywhere during processing,
this header will cause error messages to go to
the listed addresses.
This is intended for mailing lists.
.pp
The Errors-To: header was created in the bad old days
when UUCP didn't understand the distinction between an envelope and a header;
this was a hack to provide what should now be passed
as the envelope sender address.
It should go away.
It is only used if the
.b UseErrorsTo
option is set.
.pp
The Errors-To: header is officially deprecated
and will go away in a future release.
.sh 3 "Apparently-To:"
.pp
RFC 822 requires at least one recipient field
(To:, Cc:, or Bcc: line)
in every message.
If a message comes in with no recipients listed in the message
then
.i sendmail
will adjust the header based on the
.q NoRecipientAction
option.
One of the possible actions is to add an
.q "Apparently-To:"
header line for any recipients it is aware of.
.pp
The Apparently-To: header is non-standard
and is deprecated.
.sh 3 "Precedence"
.pp
The Precedence: header can be used as a crude control of message priority.
It tweaks the sort order in the queue
and can be configured to change the message timeout values.
The precedence of a message also controls how
delivery status notifications (DSNs)
are processed for that message.
.sh 2 "IDENT Protocol Support"
.pp
.i Sendmail
supports the IDENT protocol as defined in RFC 1413.
Note that the RFC states
a client should wait at least 30 seconds for a response.
The default Timeout.ident is 5 seconds
as many sites have adopted the practice of dropping IDENT queries.
This has lead to delays processing mail.
Although this enhances identification
of the author of an email message
by doing a ``call back'' to the originating system to include
the owner of a particular TCP connection
in the audit trail
it is in no sense perfect;
a determined forger can easily spoof the IDENT protocol.
The following description is excerpted from RFC 1413:
.ba +5
.lp
6.  Security Considerations
.lp
The information returned by this protocol is at most as trustworthy
as the host providing it OR the organization operating the host.  For
example, a PC in an open lab has few if any controls on it to prevent
a user from having this protocol return any identifier the user
wants.  Likewise, if the host has been compromised the information
returned may be completely erroneous and misleading.
.lp
The Identification Protocol is not intended as an authorization or
access control protocol.  At best, it provides some additional
auditing information with respect to TCP connections.  At worst, it
can provide misleading, incorrect, or maliciously incorrect
information.
.lp
The use of the information returned by this protocol for other than
auditing is strongly discouraged.  Specifically, using Identification
Protocol information to make access control decisions - either as the
primary method (i.e., no other checks) or as an adjunct to other
methods may result in a weakening of normal host security.
.lp
An Identification server may reveal information about users,
entities, objects or processes which might normally be considered
private.  An Identification server provides service which is a rough
analog of the CallerID services provided by some phone companies and
many of the same privacy considerations and arguments that apply to
the CallerID service apply to Identification.  If you wouldn't run a
"finger" server due to privacy considerations you may not want to run
this protocol.
.ba
.lp
In some cases your system may not work properly with IDENT support
due to a bug in the TCP/IP implementation.
The symptoms will be that for some hosts
the SMTP connection will be closed
almost immediately.
If this is true or if you do not want to use IDENT,
you should set the IDENT timeout to zero;
this will disable the IDENT protocol.
.sh 1 "ARGUMENTS"
.pp
The complete list of arguments to
.i sendmail
is described in detail in Appendix A.
Some important arguments are described here.
.sh 2 "Queue Interval"
.pp
The amount of time between forking a process
to run through the queue
is defined by the
.b \-q
flag.
If you run with delivery mode set to
.b i
or
.b b
this can be relatively large,
since it will only be relevant
when a host that was down comes back up.
If you run in
.b q
mode
it should be relatively short,
since it defines the maximum amount of time that a message
may sit in the queue.
(See also the MinQueueAge option.)
.pp
RFC 1123 section 5.3.1.1 says that this value should be at least 30 minutes
(although that probably doesn't make sense if you use ``queue-only'' mode).
.sh 2 "Daemon Mode"
.pp
If you allow incoming mail over an IPC connection,
you should have a daemon running.
This should be set by your
.i /etc/rc
file using the
.b \-bd
flag.
The
.b \-bd
flag and the
.b \-q
flag may be combined in one call:
.(b
/usr/\*(SD/sendmail \-bd \-q30m
.)b
.pp
An alternative approach is to invoke sendmail from
.i inetd (8)
(use the
.b \-bs
flag to ask sendmail to speak SMTP on its standard input and output).
This works and allows you to wrap
.i sendmail
in a TCP wrapper program,
but may be a bit slower since the configuration file
has to be re-read on every message that comes in.
If you do this, you still need to have a
.i sendmail
running to flush the queue:
.(b
/usr/\*(SD/sendmail \-q30m
.)b
.sh 2 "Forcing the Queue"
.pp
In some cases you may find that the queue has gotten clogged for some reason.
You can force a queue run
using the
.b \-q
flag (with no value).
It is entertaining to use the
.b \-v
flag (verbose)
when this is done to watch what happens:
.(b
/usr/\*(SD/sendmail \-q \-v
.)b
.pp
You can also limit the jobs to those with a particular queue identifier,
sender, or recipient
using one of the queue modifiers.
For example,
.q \-qRberkeley
restricts the queue run to jobs that have the string
.q berkeley
somewhere in one of the recipient addresses.
Similarly,
.q \-qSstring
limits the run to particular senders and
.q \-qIstring
limits it to particular queue identifiers.
.sh 2 "Debugging"
.pp
There are a fairly large number of debug flags
built into
.i sendmail .
Each debug flag has a number and a level,
where higher levels means to print out more information.
The convention is that levels greater than nine are
.q absurd,
i.e.,
they print out so much information that you wouldn't normally
want to see them except for debugging that particular piece of code.
Debug flags are set using the
.b \-d
option;
the syntax is:
.(b
.ta \w'debug-option  'u
debug-flag:	\fB\-d\fP debug-list
debug-list:	debug-option [ , debug-option ]*
debug-option:	debug-range [ . debug-level ]
debug-range:	integer | integer \- integer
debug-level:	integer
.)b
where spaces are for reading ease only.
For example,
.(b
\-d12	Set flag 12 to level 1
\-d12.3	Set flag 12 to level 3
\-d3\-17	Set flags 3 through 17 to level 1
\-d3\-17.4	Set flags 3 through 17 to level 4
.)b
For a complete list of the available debug flags
you will have to look at the code
and the
.i TRACEFLAGS
file in the sendmail distribution
(they are too dynamic to keep this document up to date).
.sh 2 "Changing the Values of Options"
.pp
Options can be overridden using the
.b \-o
or
.b \-O
command line flags.
For example,
.(b
/usr/\*(SD/sendmail \-oT2m
.)b
sets the
.b T
(timeout) option to two minutes
for this run only;
the equivalent line using the long option name is
.(b
/usr/\*(SD/sendmail -OTimeout.queuereturn=2m
.)b
.pp
Some options have security implications.
Sendmail allows you to set these,
but relinquishes its setuid root permissions thereafter\**.
.(f
\**That is, it sets its effective uid to the real uid;
thus, if you are executing as root,
as from root's crontab file or during system startup
the root permissions will still be honored.
.)f
.sh 2 "Trying a Different Configuration File"
.pp
An alternative configuration file
can be specified using the
.b \-C
flag; for example,
.(b
/usr/\*(SD/sendmail \-Ctest.cf \-oQ/tmp/mqueue
.)b
uses the configuration file
.i test.cf
instead of the default
.i /etc/mail/sendmail.cf.
If the
.b \-C
flag has no value
it defaults to
.i sendmail.cf
in the current directory.
.pp
.i Sendmail
gives up its setuid root permissions
when you use this flag, so it is common to use a publicly writable directory
(such as /tmp)
as the queue directory (QueueDirectory or Q option) while testing.
.sh 2 "Logging Traffic"
.pp
Many SMTP implementations do not fully implement the protocol.
For example, some personal computer based SMTPs
do not understand continuation lines in reply codes.
These can be very hard to trace.
If you suspect such a problem, you can set traffic logging using the
.b \-X
flag.
For example,
.(b
/usr/\*(SD/sendmail \-X /tmp/traffic \-bd
.)b
will log all traffic in the file
.i /tmp/traffic .
.pp
This logs a lot of data very quickly and should
.b NEVER
be used
during normal operations.
After starting up such a daemon,
force the errant implementation to send a message to your host.
All message traffic in and out of
.i sendmail ,
including the incoming SMTP traffic,
will be logged in this file.
.sh 2 "Testing Configuration Files"
.pp
When you build a configuration table,
you can do a certain amount of testing
using the
.q "test mode"
of
.i sendmail .
For example,
you could invoke
.i sendmail
as:
.(b
sendmail \-bt \-Ctest.cf
.)b
which would read the configuration file
.q test.cf
and enter test mode.
In this mode,
you enter lines of the form:
.(b
rwset address
.)b
where
.i rwset
is the rewriting set you want to use
and
.i address
is an address to apply the set to.
Test mode shows you the steps it takes
as it proceeds,
finally showing you the address it ends up with.
You may use a comma separated list of rwsets
for sequential application of rules to an input.
For example:
.(b
3,1,21,4 monet:bollard
.)b
first applies ruleset three to the input
.q monet:bollard.
Ruleset one is then applied to the output of ruleset three,
followed similarly by rulesets twenty-one and four.
.pp
If you need more detail,
you can also use the
.q \-d21
flag to turn on more debugging.
For example,
.(b
sendmail \-bt \-d21.99
.)b
turns on an incredible amount of information;
a single word address
is probably going to print out several pages worth of information.
.pp
You should be warned that internally,
.i sendmail
applies ruleset 3 to all addresses.
In test mode
you will have to do that manually.
For example, older versions allowed you to use
.(b
0 bruce@broadcast.sony.com
.)b
This version requires that you use:
.(b
3,0 bruce@broadcast.sony.com
.)b
.pp
As of version 8.7,
some other syntaxes are available in test mode:
.bu
\&.D\|x\|value
defines macro
.i x
to have the indicated
.i value .
This is useful when debugging rules that use the
.b $& \c
.i x
syntax.
.bu
\&.C\|c\|value
adds the indicated
.i value
to class
.i c .
.bu
\&.S\|ruleset
dumps the contents of the indicated ruleset.
.bu
\-d\|debug-spec
is equivalent to the command-line flag.
.sh 2 "Persistent Host Status Information"
.pp
When
.b HostStatusDirectory
is enabled,
information about the status of hosts is maintained on disk
and can thus be shared between different instantiations of
.i sendmail .
The status of the last connection with each remote host
may be viewed with the command:
.(b
sendmail \-bh
.)b
This information may be flushed with the command:
.(b
sendmail \-bH
.)b
Flushing the information prevents new
.i sendmail
processes from loading it,
but does not prevent existing processes from using the status information
that they already have.
.sh 1 "TUNING"
.pp
There are a number of configuration parameters
you may want to change,
depending on the requirements of your site.
Most of these are set
using an option in the configuration file.
For example,
the line
.q "O Timeout.queuereturn=5d"
sets option
.q Timeout.queuereturn
to the value
.q 5d
(five days).
.pp
Most of these options have appropriate defaults for most sites.
However,
sites having very high mail loads may find they need to tune them
as appropriate for their mail load.
In particular,
sites experiencing a large number of small messages,
many of which are delivered to many recipients,
may find that they need to adjust the parameters
dealing with queue priorities.
.pp
All versions of
.i sendmail
prior to 8.7
had single character option names.
As of 8.7,
options have long (multi-character names).
Although old short names are still accepted,
most new options do not have short equivalents.
.pp
This section only describes the options you are most likely
to want to tweak;
read section
.\"XREF
5
for more details.
.sh 2 "Timeouts"
.pp
All time intervals are set
using a scaled syntax.
For example,
.q 10m
represents ten minutes, whereas
.q 2h30m
represents two and a half hours.
The full set of scales is:
.(b
.ta 4n
s	seconds
m	minutes
h	hours
d	days
w	weeks
.)b
.sh 3 "Queue interval"
.pp
The argument to the
.b \-q
flag
specifies how often a sub-daemon will run the queue.
This is typically set to between fifteen minutes
and one hour.
If not set,
or set to zero,
the queue will not be run automatically.
RFC 1123 section 5.3.1.1 recommends that this be at least 30 minutes.
.sh 3 "Read timeouts"
.pp
Timeouts all have option names
.q Timeout.\fIsuboption\fP .
The recognized
.i suboption s,
their default values, and the minimum values
allowed by RFC 1123 section 5.3.2 are:
.nr ii 1i
.ip connect
The time to wait for an SMTP connection to open
(the
.i connect (2)
system call)
[0, unspecified].
If zero, uses the kernel default.
In no case can this option extend the timeout
longer than the kernel provides, but it can shorten it.
This is to get around kernels that provide an absurdly long connection timeout
(90 minutes in one case).
.ip iconnect
The same as
.i connect,
except it applies only to the initial attempt to connect to a host
for a given message
[0, unspecified].
The concept is that this should be very short (a few seconds);
hosts that are well connected and responsive will thus be serviced immediately.
Hosts that are slow will not hold up other deliveries in the initial
delivery attempt.
.ip initial
The wait for the initial 220 greeting message
[5m, 5m].
.ip helo
The wait for a reply from a HELO or EHLO command
[5m, unspecified].
This may require a host name lookup, so
five minutes is probably a reasonable minimum.
.ip mail\(dg
The wait for a reply from a MAIL command
[10m, 5m].
.ip rcpt\(dg
The wait for a reply from a RCPT command
[1h, 5m].
This should be long
because it could be pointing at a list
that takes a long time to expand
(see below).
.ip datainit\(dg
The wait for a reply from a DATA command
[5m, 2m].
.ip datablock\(dg\(dd
The wait for reading a data block
(that is, the body of the message).
[1h, 3m].
This should be long because it also applies to programs
piping input to
.i sendmail
which have no guarantee of promptness.
.ip datafinal\(dg
The wait for a reply from the dot terminating a message.
[1h, 10m].
If this is shorter than the time actually needed
for the receiver to deliver the message,
duplicates will be generated.
This is discussed in RFC 1047.
.ip rset
The wait for a reply from a RSET command
[5m, unspecified].
.ip quit
The wait for a reply from a QUIT command
[2m, unspecified].
.ip misc
The wait for a reply from miscellaneous (but short) commands
such as NOOP (no-operation) and VERB (go into verbose mode).
[2m, unspecified].
.ip command\(dg\(dd
In server SMTP,
the time to wait for another command.
[1h, 5m].
.ip ident\(dd
The timeout waiting for a reply to an IDENT query
[30s\**, unspecified].
.(f
\**On some systems the default is zero to turn the protocol off entirely.
.)f
.ip fileopen\(dd
The timeout for opening .forward and :include: files [60s, none].
.ip control\(dd
The timeout for a complete control socket transaction to complete [2m, none].
.ip hoststatus\(dd
How long status information about a host
(e.g., host down)
will be cached before it is considered stale
[30m, unspecified].
.ip resolver.retrans
The resolver's
retransmission time interval
(in seconds)
[varies].
Sets both
.i Timeout.resolver.retrans.first
and
.i Timeout.resolver.retrans.normal .
.ip resolver.retrans.first
The resolver's
retransmission time interval
(in seconds)
for the first attempt to
deliver a message
[varies].
.ip resolver.retrans.normal
The resolver's
retransmission time interval
(in seconds)
for all resolver lookups
except the first delivery attempt
[varies].
.ip resolver.retry
The number of times
to retransmit a resolver query.
Sets both
.i Timeout.resolver.retry.first
and
.i Timeout.resolver.retry.normal
[varies].
.ip resolver.retry.first
The number of times
to retransmit a resolver query
for the first attempt
to deliver a message
[varies].
.ip resolver.retry.normal
The number of times
to retransmit a resolver query
for all resolver lookups
 except the first delivery attempt
[varies].
.lp
For compatibility with old configuration files,
if no
.i suboption
is specified,
all the timeouts marked with a dagger (\(dg) are set to the indicated value.
All but those marked with a double dagger (\(dd) apply to client SMTP.
.pp
Many of the RFC 1123 minimum values
may well be too short.
.i Sendmail
was designed to the RFC 822 protocols,
which did not specify read timeouts;
hence, versions of
.i sendmail
prior to version 8.1 did not guarantee to reply to messages promptly.
In particular, a
.q RCPT
command specifying a mailing list
will expand and verify the entire list;
a large list on a slow system
may easily take more than five minutes\**.
.(f
\**This verification includes looking up every address
with the name server;
this involves network delays,
and can in some cases can be considerable.
.)f
I recommend a one hour timeout \*-
since a communications failure during the RCPT phase is rare,
a long timeout is not onerous
and may ultimately help reduce network load
and duplicated messages.
.pp
For example, the lines:
.(b
O Timeout.command=25m
O Timeout.datablock=3h
.)b
sets the server SMTP command timeout to 25 minutes
and the input data block timeout to three hours.
.sh 3 "Message timeouts"
.pp
After sitting in the queue for a few days,
a message will time out.
This is to insure that at least the sender is aware
of the inability to send a message.
The timeout is typically set to five days.
It is sometimes considered convenient to also send a warning message
if the message is in the queue longer than a few hours
(assuming you normally have good connectivity;
if your messages normally took several hours to send
you wouldn't want to do this because it wouldn't be an unusual event).
These timeouts are set using the
.b Timeout.queuereturn
and
.b Timeout.queuewarn
options in the configuration file
(previously both were set using the
.b T
option).
.pp
If the message is submitted using the
.sm NOTIFY
.sm SMTP
extension,
warning messages will only be sent if
.sm NOTIFY=DELAY
is specified.
The queuereturn and queuewarn timeouts
can be further qualified with a tag based on the Precedence: field
in the message;
they must be one of
.q urgent
(indicating a positive non-zero precedence)
.q normal
(indicating a zero precedence), or
.q non-urgent
(indicating negative precedences).
For example, setting
.q Timeout.queuewarn.urgent=1h
sets the warning timeout for urgent messages only
to one hour.
The default if no precedence is indicated
is to set the timeout for all precedences.
The value "now" can be used for
-O Timeout.queuereturn
to return entries immediately during a queue run,
e.g., to bounce messages independent of their time in the queue.
.pp
Since these options are global,
and since you can not know
.i "a priori"
how long another host outside your domain will be down,
a five day timeout is recommended.
This allows a recipient to fix the problem even if it occurs
at the beginning of a long weekend.
RFC 1123 section 5.3.1.1 says that this parameter
should be ``at least 4\-5 days''.
.pp
The
.b Timeout.queuewarn
value can be piggybacked on the
.b T
option by indicating a time after which
a warning message should be sent;
the two timeouts are separated by a slash.
For example, the line
.(b
OT5d/4h
.)b
causes email to fail after five days,
but a warning message will be sent after four hours.
This should be large enough that the message will have been tried
several times.
.sh 2 "Forking During Queue Runs"
.pp
By setting the
.b ForkEachJob
(\c
.b Y )
option,
.i sendmail
will fork before each individual message
while running the queue.
This will prevent
.i sendmail
from consuming large amounts of memory,
so it may be useful in memory-poor environments.
However, if the
.b ForkEachJob
option is not set,
.i sendmail
will keep track of hosts that are down during a queue run,
which can improve performance dramatically.
.pp
If the
.b ForkEachJob
option is set,
.i sendmail
can not use connection caching.
.sh 2 "Queue Priorities"
.pp
Every message is assigned a priority when it is first instantiated,
consisting of the message size (in bytes)
offset by the message class
(which is determined from the Precedence: header)
times the
.q "work class factor"
and the number of recipients times the
.q "work recipient factor."
The priority is used to order the queue.
Higher numbers for the priority mean that the message will be processed later
when running the queue.
.pp
The message size is included so that large messages are penalized
relative to small messages.
The message class allows users to send
.q "high priority"
messages by including a
.q Precedence:
field in their message;
the value of this field is looked up in the
.b P
lines of the configuration file.
Since the number of recipients affects the amount of load a message presents
to the system,
this is also included into the priority.
.pp
The recipient and class factors
can be set in the configuration file using the
.b RecipientFactor
(\c
.b y )
and
.b ClassFactor
(\c
.b z )
options respectively.
They default to 30000 (for the recipient factor)
and 1800
(for the class factor).
The initial priority is:
.EQ
pri = msgsize - (class times bold ClassFactor) + (nrcpt times bold RecipientFactor)
.EN
(Remember, higher values for this parameter actually mean
that the job will be treated with lower priority.)
.pp
The priority of a job can also be adjusted each time it is processed
(that is, each time an attempt is made to deliver it)
using the
.q "work time factor,"
set by the
.b RetryFactor
(\c
.b Z )
option.
This is added to the priority,
so it normally decreases the precedence of the job,
on the grounds that jobs that have failed many times
will tend to fail again in the future.
The
.b RetryFactor
option defaults to 90000.
.sh 2 "Load Limiting"
.pp
.i Sendmail
can be asked to queue (but not deliver)
mail if the system load average gets too high
using the
.b QueueLA
(\c
.b x )
option.
When the load average exceeds the value of the
.b QueueLA
option,
the delivery mode is set to
.b q
(queue only)
if the
.b QueueFactor
(\c
.b q )
option divided by the difference in the current load average and the
.b QueueLA
option
plus one
exceeds the priority of the message \(em
that is, the message is queued iff:
.EQ
pri > { bold QueueFactor } over { LA - { bold QueueLA } + 1 }
.EN
The
.b QueueFactor
option defaults to 600000,
so each point of load average is worth 600000
priority points
(as described above).
.pp
For drastic cases,
the
.b RefuseLA
(\c
.b X )
option defines a load average at which
.i sendmail
will refuse
to accept network connections.
Locally generated mail
(including incoming UUCP mail)
is still accepted.
.sh 2 "Delivery Mode"
.pp
There are a number of delivery modes that
.i sendmail
can operate in,
set by the
.b DeliveryMode
(\c
.b d )
configuration option.
These modes
specify how quickly mail will be delivered.
Legal modes are:
.(b
.ta 4n
i	deliver interactively (synchronously)
b	deliver in background (asynchronously)
q	queue only (don't deliver)
d	defer delvery attempts (don't deliver)
.)b
There are tradeoffs.
Mode
.q i
gives the sender the quickest feedback,
but may slow down some mailers and
is hardly ever necessary.
Mode
.q b
delivers promptly but
can cause large numbers of processes
if you have a mailer that takes a long time to deliver a message.
Mode
.q q
minimizes the load on your machine,
but means that delivery may be delayed for up to the queue interval.
Mode
.q d
is identical to mode
.q q
except that it also prevents all the early map lookups from working;
it is intended for ``dial on demand'' sites where DNS lookups
might cost real money.
Some simple error messages
(e.g., host unknown during the SMTP protocol)
will be delayed using this mode.
Mode
.q b
is the usual default.
.pp
If you run in mode
.q q
(queue only),
.q d
(defer),
or
.q b
(deliver in background)
.i sendmail
will not expand aliases and follow .forward files
upon initial receipt of the mail.
This speeds up the response to RCPT commands.
Mode
.q i
cannot be used by the SMTP server.
.sh 2 "Log Level"
.pp
The level of logging can be set for
.i sendmail .
The default using a standard configuration table is level 9.
The levels are as follows:
.nr ii 0.5i
.ip 0
Minimal logging.
.ip 1
Serious system failures and potential security problems.
.ip 2
Lost communications (network problems) and protocol failures.
.ip 3
Other serious failures, malformed addresses, transient forward/include
errors, connection timeouts.
.ip 4
Minor failures, out of date alias databases, connection rejections
via check_ rulesets.
.ip 5
Message collection statistics.
.ip 6
Creation of error messages,
VRFY and EXPN commands.
.ip 7
Delivery failures (host or user unknown, etc.).
.ip 8
Successful deliveries and alias database rebuilds.
.ip 9
Messages being deferred
(due to a host being down, etc.).
.ip 10
Database expansion (alias, forward, and userdb lookups)
and authentication information.
.ip 11
NIS errors and end of job processing.
.ip 12
Logs all SMTP connections.
.ip 13
Log bad user shells, files with improper permissions, and other
questionable situations.
.ip 14
Logs refused connections.
.ip 15
Log all incoming and outgoing SMTP commands.
.ip 20
Logs attempts to run locked queue files.
These are not errors,
but can be useful to note if your queue appears to be clogged.
.ip 30
Lost locks (only if using lockf instead of flock).
.lp
Additionally,
values above 64 are reserved for extremely verbose debugging output.
No normal site would ever set these.
.sh 2 "File Modes"
.pp
The modes used for files depend on what functionality you want
and the level of security you require.
In many cases
.i sendmail
does careful checking of the modes
of files and directories
to avoid accidental compromise;
if you want to make it possible to have group-writable support files
you may need to use the
.b DontBlameSendmail
option to turn off some of these checks.
.sh 3 "To suid or not to suid?"
.pp
.i Sendmail
is normally installed
setuid to root.
At the point where it is about to
.i exec \|(2)
a mailer,
it checks to see if the userid is zero (root);
if so,
it resets the userid and groupid to a default
(set by the
.b U=
equate in the mailer line;
if that is not set, the
.b DefaultUser
option is used).
This can be overridden
by setting the
.b S
flag to the mailer
for mailers that are trusted
and must be called as root.
However,
this will cause mail processing
to be accounted
(using
.i sa \|(8))
to root
rather than to the user sending the mail.
.pp
If you don't make
.i sendmail
setuid to root, it will still run but you lose a lot of functionality
and a lot of privacy, since you'll have to make the queue directory
world readable.
You could also make
.i sendmail
setuid to some pseudo-user
(e.g., create a user called
.q sendmail
and make
.i sendmail
setuid to that)
which will fix the privacy problems
but not the functionality issues.
It also introduces problems on some operating systems
if sendmail needs to give up the setuid special privileges.
Also, this isn't a guarantee of security:
for example,
root occasionally sends mail,
and the daemon often runs as root.
Note however that
.i sendmail
must run as root or the trusted user in order to create the SMTP listener
socket.
.pp
A middle ground is to make
.i sendmail
setuid to root,
but set the
.b RunAsUser
option.
This causes
.i sendmail
to become the indicated user as soon as it has done the startup
that requires root privileges
(primarily, opening the
.sm SMTP
socket).
If you use
.b RunAsUser ,
the queue directory
(normally
.i /var/spool/mqueue )
should be owned by that user,
and all files and databases
(including user
.i \&.forward
files,
alias files,
:include: files,
and external databases)
must be readable by that user.
Also, since sendmail will not be able to change it's uid,
delivery to programs or files will be marked as unsafe, 
e.g., undeliverable,
in
.i \&.forward ,
aliases,
and :include: files.
Administrators can override this by setting the
.b DontBlameSendmail
option to the setting
.b NonRootSafeAddr .
.b RunAsUser
is probably best suited for firewall configurations
that don't have regular user logins.
.sh 3 "Turning off security checks"
.pp
.i Sendmail
is very particular about the modes of files that it reads or writes.
For example, by default it will refuse to read most files
that are group writable
on the grounds that they might have been tampered with
by someone other than the owner;
it will even refuse to read files in group writable directories.
.pp
If you are
.i quite
sure that your configuration is safe and you want
.i sendmail
to avoid these security checks,
you can turn off certain checks using the
.b DontBlameSendmail
option.
This option takes one or more names that disable checks.
In the descriptions that follow,
.q "unsafe directory"
means a directory that is writable by anyone other than the owner.
The values are:
.nr ii 0.5i
.ip Safe
No special handling.
.ip AssumeSafeChown
Assume that the
.i chown
system call is restricted to root.
Since some versions of UNIX permit regular users
to give away their files to other users on some filesystems,
.i sendmail
often cannot assume that a given file was created by the owner,
particularly when it is in a writable directory.
You can set this flag if you know that file giveaway is restricted
on your system.
.ip ClassFileInUnsafeDirPath
When reading class files (using the
.b F
line in the configuration file),
allow files that are in unsafe directories.
.ip DontWarnForwardFileInUnsafeDirPath
Prevent logging of
unsafe directory path warnings
for non-existent forward files.
.ip ErrorHeaderInUnsafeDirPath
Allow the file named in the
.b ErrorHeader
option to be in an unsafe directory.
.ip FileDeliveryToHardLink
Allow delivery to files that are hard links.
.ip FileDeliveryToSymLink
Allow delivery to files that are symbolic links.
.ip ForwardFileInGroupWritableDirPath
Allow
.i \&.forward
files in group writable directories.
.ip ForwardFileInUnsafeDirPath
Allow
.i \&.forward
files in unsafe directories.
.ip ForwardFileInUnsafeDirPathSafe
Allow a
.i \&.forward
file that is in an unsafe directory to include references
to program and files.
.ip GroupWritableAliasFile
Allow group-writable alias files.
.ip GroupWritableDirPathSafe
Change the definition of
.q "unsafe directory"
to consider group-writable directories to be safe.
World-writable directories are always unsafe.
.ip GroupWritableForwardFileSafe
Accept group-writable
.i \&.forward
files as safe for program and file delivery.
.ip GroupWritableIncludeFileSafe
Accept group-writable
.i :include:
files as safe for program and file delivery.
.ip HelpFileInUnsafeDirPath
Allow the file named in the
.b HelpFile
option to be in an unsafe directory.
.ip IncludeFileInGroupWritableDirPath
Allow
.i :include:
files in group writable directories.
.ip IncludeFileInUnsafeDirPath
Allow
.i :include:
files in unsafe directories.
.ip IncludeFileInUnsafeDirPathSafe
Allow a
.i :include:
file that is in an unsafe directory to include references
to program and files.
.ip InsufficientEntropy
Try to use STARTTLS even if the PRNG for OpenSSL is not properly seeded
despite the security problems.
.ip LinkedAliasFileInWritableDir
Allow an alias file that is a link in a writable directory.
.ip LinkedClassFileInWritableDir
Allow class files that are links in writable directories.
.ip LinkedForwardFileInWritableDir
Allow
.i \&.forward
files that are links in writable directories.
.ip LinkedIncludeFileInWritableDir
Allow
.i :include:
files that are links in writable directories.
.ip LinkedMapInWritableDir
Allow map files that are links in writable directories.
.ip LinkedServiceSwitchFileInWritableDir
Allow the service switch file to be a link
even if the directory is writable.
.ip MapInUnsafeDirPath
Allow maps (e.g.,
.i hash ,
.i btree ,
and
.i dbm
files)
in unsafe directories.
.ip NonRootSafeAddr
Do not mark file and program deliveries as unsafe
if sendmail is not running with root privileges.
.ip RunProgramInUnsafeDirPath
Go ahead and run programs that are in writable directories.
.ip RunWritableProgram
Go ahead and run programs that are group- or world-writable.
.ip TrustStickyBit
Allow group or world writable directories
if the sticky bit is set on the directory.
Do not set this on systems which do not honor
the sticky bit on directories.
.ip WorldWritableAliasFile
Accept world-writable alias files.
.ip WriteMapToHardLink
Allow writes to maps that are hard links.
.ip WriteMapToSymLink
Allow writes to maps that are symbolic links.
.ip WriteStatsToHardLink
Allow the status file to be a hard link.
.ip WriteStatsToSymLink
Allow the status file to be a symbolic link.
.sh 2 "Connection Caching"
.pp
When processing the queue,
.i sendmail
will try to keep the last few open connections open
to avoid startup and shutdown costs.
This only applies to IPC connections.
.pp
When trying to open a connection
the cache is first searched.
If an open connection is found, it is probed to see if it is still active
by sending a
.sm RSET
command.
It is not an error if this fails;
instead, the connection is closed and reopened.
.pp
Two parameters control the connection cache.
The
.b ConnectionCacheSize
(\c
.b k )
option defines the number of simultaneous open connections
that will be permitted.
If it is set to zero,
connections will be closed as quickly as possible.
The default is one.
This should be set as appropriate for your system size;
it will limit the amount of system resources that
.i sendmail
will use during queue runs.
Never set this higher than 4.
.pp
The
.b ConnectionCacheTimeout
(\c
.b K )
option specifies the maximum time that any cached connection
will be permitted to idle.
When the idle time exceeds this value
the connection is closed.
This number should be small
(under ten minutes)
to prevent you from grabbing too many resources
from other hosts.
The default is five minutes.
.sh 2 "Name Server Access"
.pp
Control of host address lookups is set by the
.b hosts
service entry in your service switch file.
If you are on a system that has built-in service switch support
(e.g., Ultrix, Solaris, or DEC OSF/1)
then your system is probably configured properly already.
Otherwise,
.i sendmail
will consult the file
.b /etc/mail/service.switch ,
which should be created.
.i Sendmail
only uses two entries:
.b hosts
and
.b aliases ,
although system routines may use other services
(notably the
.b passwd
service for user name lookups by
.i getpwname ).
.pp
However, some systems (such as SunOS 4.X)
will do DNS lookups
regardless of the setting of the service switch entry.
In particular, the system routine
.i gethostbyname (3)
is used to look up host names,
and many vendor versions try some combination of DNS, NIS,
and file lookup in /etc/hosts
without consulting a service switch.
.i Sendmail
makes no attempt to work around this problem,
and the DNS lookup will be done anyway.
If you do not have a nameserver configured at all,
such as at a UUCP-only site,
.i sendmail
will get a
.q "connection refused"
message when it tries to connect to the name server.
If the
.b hosts
switch entry has the service
.q dns
listed somewhere in the list,
.i sendmail
will interpret this to mean a temporary failure
and will queue the mail for later processing;
otherwise, it ignores the name server data.
.pp
The same technique is used to decide whether to do MX lookups.
If you want MX support, you
.i must
have
.q dns
listed as a service in the
.b hosts
switch entry.
.pp
The
.b ResolverOptions
(\c
.b I )
option allows you to tweak name server options.
The command line takes a series of flags as documented in
.i resolver (3)
(with the leading
.q RES_
deleted).
Each can be preceded by an optional `+' or `\(mi'.
For example, the line
.(b
O ResolverOptions=+AAONLY \(miDNSRCH
.)b
turns on the AAONLY (accept authoritative answers only)
and turns off the DNSRCH (search the domain path) options.
Most resolver libraries default DNSRCH, DEFNAMES, and RECURSE
flags on and all others off.
You can also include
.q HasWildcardMX
to specify that there is a wildcard MX record matching your domain;
this turns off MX matching when canonifying names,
which can lead to inappropriate canonifications.
.pp
Version level 1 configurations
turn DNSRCH and DEFNAMES off when doing delivery lookups,
but leave them on everywhere else.
Version 8 of
.i sendmail
ignores them when doing canonification lookups
(that is, when using $[ ... $]),
and always does the search.
If you don't want to do automatic name extension,
don't call $[ ... $].
.pp
The search rules for $[ ... $] are somewhat different than usual.
If the name being looked up
has at least one dot, it always tries the unmodified name first.
If that fails, it tries the reduced search path,
and lastly tries the unmodified name
(but only for names without a dot,
since names with a dot have already been tried).
This allows names such as
``utc.CS''
to match the site in Czechoslovakia
rather than the site in your local Computer Science department.
It also prefers A and CNAME records over MX records \*-
that is, if it finds an MX record it makes note of it,
but keeps looking.
This way, if you have a wildcard MX record matching your domain,
it will not assume that all names match.
.pp
To completely turn off all name server access
on systems without service switch support
(such as SunOS 4.X)
you will have to recompile with
\-DNAMED_BIND=0
and remove \-lresolv from the list of libraries to be searched
when linking.
.sh 2 "Moving the Per-User Forward Files"
.pp
Some sites mount each user's home directory
from a local disk on their workstation,
so that local access is fast.
However, the result is that .forward file lookups are slow.
In some cases,
mail can even be delivered on machines inappropriately
because of a file server being down.
The performance can be especially bad if you run the automounter.
.pp
The
.b ForwardPath
(\c
.b J )
option allows you to set a path of forward files.
For example, the config file line
.(b
O ForwardPath=/var/forward/$u:$z/.forward.$w
.)b
would first look for a file with the same name as the user's login
in /var/forward;
if that is not found (or is inaccessible)
the file
``.forward.\c
.i machinename ''
in the user's home directory is searched.
A truly perverse site could also search by sender
by using $r, $s, or $f.
.pp
If you create a directory such as /var/forward,
it should be mode 1777
(that is, the sticky bit should be set).
Users should create the files mode 644.
Note that you must use the
forwardfileinunsafedirpath and
forwardfileinunsafedirpathsafe
flags with the DontBlameSendmail option
to allow forward files in a world
writable directory.
This might also be used as a
denial of service
attack (users could create forward files for other users);
a better approach might be to create
/var/forward
mode 755
and create empty files for each user,
owned by that user,
mode 644.
If you do this, you don't have to set the DontBlameSendmail options
indicated above.
.sh 2 "Free Space"
.pp
On systems that have one of the system calls in the
.i statfs (2)
family
(including
.i statvfs
and
.i ustat ),
you can specify a minimum number of free blocks on the queue filesystem
using the
.b MinFreeBlocks
(\c
.b b )
option.
If there are fewer than the indicated number of blocks free
on the filesystem on which the queue is mounted
the SMTP server will reject mail
with the
452 error code.
This invites the SMTP client to try again later.
.pp
Beware of setting this option too high;
it can cause rejection of email
when that mail would be processed without difficulty.
.sh 2 "Maximum Message Size"
.pp
To avoid overflowing your system with a large message,
the
.b MaxMessageSize
option can be set to set an absolute limit
on the size of any one message.
This will be advertised in the ESMTP dialogue
and checked during message collection.
.sh 2 "Privacy Flags"
.pp
The
.b PrivacyOptions
(\c
.b p )
option allows you to set certain
``privacy''
flags.
Actually, many of them don't give you any extra privacy,
rather just insisting that client SMTP servers
use the HELO command
before using certain commands
or adding extra headers to indicate possible spoof attempts.
.pp
The option takes a series of flag names;
the final privacy is the inclusive or of those flags.
For example:
.(b
O PrivacyOptions=needmailhelo, noexpn
.)b
insists that the HELO or EHLO command be used before a MAIL command is accepted
and disables the EXPN command.
.pp
The flags are detailed in section
.\"XREF
5.6.
.sh 2 "Send to Me Too"
.pp
Beginning with version 8.10,
.i sendmail
includes by default the (envelope) sender in any list expansions.
For example, if
.q matt
sends to a list that contains
.q matt
as one of the members he will get a copy of the message.
If the
.b MeToo
option is set to
.sm FALSE
(in the configuration file or via the command line),
this behavior is changed, i.e.,
the (envelope) sender is excluded in list expansions.
.sh 1 "THE WHOLE SCOOP ON THE CONFIGURATION FILE"
.pp
This section describes the configuration file
in detail.
.pp
There is one point that should be made clear immediately:
the syntax of the configuration file
is designed to be reasonably easy to parse,
since this is done every time
.i sendmail
starts up,
rather than easy for a human to read or write.
On the
.q "future project"
list is a
configuration-file compiler.
.pp
The configuration file is organized as a series of lines,
each of which begins with a single character
defining the semantics for the rest of the line.
Lines beginning with a space or a tab
are continuation lines
(although the semantics are not well defined in many places).
Blank lines and lines beginning with a sharp symbol
(`#')
are comments.
.sh 2 "R and S \*- Rewriting Rules"
.pp
The core of address parsing
are the rewriting rules.
These are an ordered production system.
.i Sendmail
scans through the set of rewriting rules
looking for a match on the left hand side
(LHS)
of the rule.
When a rule matches,
the address is replaced by the right hand side
(RHS)
of the rule.
.pp
There are several sets of rewriting rules.
Some of the rewriting sets are used internally
and must have specific semantics.
Other rewriting sets
do not have specifically assigned semantics,
and may be referenced by the mailer definitions
or by other rewriting sets.
.pp
The syntax of these two commands are:
.(b F
.b S \c
.i n
.)b
Sets the current ruleset being collected to
.i n .
If you begin a ruleset more than once
it appends to the old definition.
.(b F
.b R \c
.i lhs
.i rhs
.i comments
.)b
The
fields must be separated
by at least one tab character;
there may be embedded spaces
in the fields.
The
.i lhs
is a pattern that is applied to the input.
If it matches,
the input is rewritten to the
.i rhs .
The
.i comments
are ignored.
.pp
Macro expansions of the form
.b $ \c
.i x
are performed when the configuration file is read.
A literal
.b $
can be included using
.b $$ .
Expansions of the form
.b $& \c
.i x
are performed at run time using a somewhat less general algorithm.
This is intended only for referencing internally defined macros
such as
.b $h
that are changed at runtime.
.sh 3 "The left hand side"
.pp
The left hand side of rewriting rules contains a pattern.
Normal words are simply matched directly.
Metasyntax is introduced using a dollar sign.
The metasymbols are:
.(b
.ta \w'\fB$=\fP\fIx\fP  'u
\fB$*\fP	Match zero or more tokens
\fB$+\fP	Match one or more tokens
\fB$\-\fP	Match exactly one token
\fB$=\fP\fIx\fP	Match any phrase in class \fIx\fP
\fB$~\fP\fIx\fP	Match any word not in class \fIx\fP
.)b
If any of these match,
they are assigned to the symbol
.b $ \c
.i n
for replacement on the right hand side,
where
.i n
is the index in the LHS.
For example,
if the LHS:
.(b
$\-:$+
.)b
is applied to the input:
.(b
UCBARPA:eric
.)b
the rule will match, and the values passed to the RHS will be:
.(b
.ta 4n
$1	UCBARPA
$2	eric
.)b
.pp
Additionally, the LHS can include
.b $@
to match zero tokens.
This is
.i not
bound to a
.b $ \c
.i n
on the RHS, and is normally only used when it stands alone
in order to match the null input.
.sh 3 "The right hand side"
.pp
When the left hand side of a rewriting rule matches,
the input is deleted and replaced by the right hand side.
Tokens are copied directly from the RHS
unless they begin with a dollar sign.
Metasymbols are:
.(b
.ta \w'$#mailer\0\0\0'u
\fB$\fP\fIn\fP	Substitute indefinite token \fIn\fP from LHS
\fB$[\fP\fIname\fP\fB$]\fP	Canonicalize \fIname\fP
\fB$(\fP\fImap key\fP \fB$@\fP\fIarguments\fP \fB$:\fP\fIdefault\fP \fB$)\fP
	Generalized keyed mapping function
\fB$>\fP\fIn\fP	\*(lqCall\*(rq ruleset \fIn\fP
\fB$#\fP\fImailer\fP	Resolve to \fImailer\fP
\fB$@\fP\fIhost\fP	Specify \fIhost\fP
\fB$:\fP\fIuser\fP	Specify \fIuser\fP
.)b
.pp
The
.b $ \c
.i n
syntax substitutes the corresponding value from a
.b $+ ,
.b $\- ,
.b $* ,
.b $= ,
or
.b $~
match on the LHS.
It may be used anywhere.
.pp
A host name enclosed between
.b $[
and
.b $]
is looked up in the host database(s)
and replaced by the canonical name\**.
.(f
\**This is actually
completely equivalent
to $(host \fIhostname\fP$).
In particular, a
.b $:
default can be used.
.)f
For example,
.q $[ftp$]
might become
.q ftp.CS.Berkeley.EDU
and
.q $[[128.32.130.2]$]
would become
.q vangogh.CS.Berkeley.EDU.
.i Sendmail
recognizes its numeric IP address
without calling the name server
and replaces it with its canonical name.
.pp
The
.b $(
\&...
.b $)
syntax is a more general form of lookup;
it uses a named map instead of an implicit map.
If no lookup is found, the indicated
.i default
is inserted;
if no default is specified and no lookup matches,
the value is left unchanged.
The
.i arguments
are passed to the map for possible use.
.pp
The
.b $> \c
.i n
syntax
causes the remainder of the line to be substituted as usual
and then passed as the argument to ruleset
.i n .
The final value of ruleset
.i n
then becomes
the substitution for this rule.
The
.b $>
syntax expands everything after the ruleset name
to the end of the replacement string
and then passes that as the initial input to the ruleset.
Recursive calls are allowed.
For example,
.(b
$>0 $>3 $1
.)b
expands $1, passes that to ruleset 3, and then passes the result
of ruleset 3 to ruleset 0.
.pp
The
.b $#
syntax should
.i only
be used in ruleset zero
or a subroutine of ruleset zero.
It causes evaluation of the ruleset to terminate immediately,
and signals to
.i sendmail
that the address has completely resolved.
The complete syntax is:
.(b
\fB$#\fP\fImailer\fP \fB$@\fP\fIhost\fP \fB$:\fP\fIuser\fP
.)b
This specifies the
{mailer, host, user}
3-tuple necessary to direct the mailer.
If the mailer is local
the host part may be omitted\**.
.(f
\**You may want to use it for special
.q "per user"
extensions.
For example, in the address
.q jgm+foo@CMU.EDU ;
the
.q +foo
part is not part of the user name,
and is passed to the local mailer for local use.
.)f
The
.i mailer
must be a single word,
but the
.i host
and
.i user
may be multi-part.
If the
.i mailer
is the builtin IPC mailer,
the
.i host
may be a colon-separated list of hosts
that are searched in order for the first working address
(exactly like MX records).
The
.i user
is later rewritten by the mailer-specific envelope rewriting set
and assigned to the
.b $u
macro.
As a special case, if the mailer specified has the
.b F=@
flag specified
and the first character of the
.b $:
value is
.q @ ,
the
.q @
is stripped off, and a flag is set in the address descriptor
that causes sendmail to not do ruleset 5 processing.
.pp
Normally, a rule that matches is retried,
that is,
the rule loops until it fails.
A RHS may also be preceded by a
.b $@
or a
.b $:
to change this behavior.
A
.b $@
prefix causes the ruleset to return with the remainder of the RHS
as the value.
A
.b $:
prefix causes the rule to terminate immediately,
but the ruleset to continue;
this can be used to avoid continued application of a rule.
The prefix is stripped before continuing.
.pp
The
.b $@
and
.b $:
prefixes may precede a
.b $>
spec;
for example:
.(b
.ta 8n
R$+	$: $>7 $1
.)b
matches anything,
passes that to ruleset seven,
and continues;
the
.b $:
is necessary to avoid an infinite loop.
.pp
Substitution occurs in the order described,
that is,
parameters from the LHS are substituted,
hostnames are canonicalized,
.q subroutines
are called,
and finally
.b $# ,
.b $@ ,
and
.b $:
are processed.
.sh 3 "Semantics of rewriting rule sets"
.pp
There are six rewriting sets
that have specific semantics.
Five of these are related as depicted by figure 1.
.(z
.hl
.ie n \{\
.(c
                    +---+
                 -->| 0 |-->resolved address
                /   +---+
               /            +---+   +---+
              /        ---->| 1 |-->| S |--
       +---+ / +---+  /     +---+   +---+  \e    +---+
addr-->| 3 |-->| D |--                      --->| 4 |-->msg
       +---+   +---+  \e     +---+   +---+  /    +---+
                        --->| 2 |-->| R |--
                            +---+   +---+
.)c

.\}
.el \{\
.ie !"\*(.T"" \{\
.PS
boxwid = 0.3i
boxht = 0.3i
movewid = 0.3i
moveht = 0.3i
linewid = 0.3i
lineht = 0.3i

	box invis "addr"; arrow
Box3:	box "3"
A1:	arrow
BoxD:	box "D"; line; L1: Here
C:	[
	C1:	arrow; box "1"; arrow; box "S"; line; E1: Here
		move to C1 down 0.5; right
	C2:	arrow; box "2"; arrow; box "R"; line; E2: Here
	] with .w at L1 + (0.5, 0)
	move to C.e right 0.5
L4:	arrow; box "4"; arrow; box invis "msg"
	line from L1 to C.C1
	line from L1 to C.C2
	line from C.E1 to L4
	line from C.E2 to L4
	move to BoxD.n up 0.6; right
Box0:	arrow; box "0"
	arrow; box invis "resolved address" width 1.3
	line from 1/3 of the way between A1 and BoxD.w to Box0
.PE
.\}
.el .sp 2i
.\}
.ce
Figure 1 \*- Rewriting set semantics
.(c
D \*- sender domain addition
S \*- mailer-specific sender rewriting
R \*- mailer-specific recipient rewriting
.)c
.hl
.)z
.pp
Ruleset three
should turn the address into
.q "canonical form."
This form should have the basic syntax:
.(b
local-part@host-domain-spec
.)b
Ruleset three
is applied by
.i sendmail
before doing anything with any address.
.pp
If no
.q @
sign is specified,
then the
host-domain-spec
.i may
be appended (box
.q D
in Figure 1)
from the
sender address
(if the
.b C
flag is set in the mailer definition
corresponding to the
.i sending
mailer).
.pp
Ruleset zero
is applied after ruleset three
to addresses that are going to actually specify recipients.
It must resolve to a
.i "{mailer, host, address}"
triple.
The
.i mailer
must be defined in the mailer definitions
from the configuration file.
The
.i host
is defined into the
.b $h
macro
for use in the argv expansion of the specified mailer.
.pp
Rulesets one and two
are applied to all sender and recipient addresses respectively.
They are applied before any specification
in the mailer definition.
They must never resolve.
.pp
Ruleset four is applied to all addresses
in the message.
It is typically used
to translate internal to external form.
.pp
In addition,
ruleset 5 is applied to all local addresses
(specifically, those that resolve to a mailer with the `F=5'
flag set)
that do not have aliases.
This allows a last minute hook for local names.
.sh 3 "Ruleset hooks"
.pp
A few extra rulesets are defined as
.q hooks
that can be defined to get special features.
They are all named rulesets.
The
.q check_*
forms all give accept/reject status;
falling off the end or returning normally is an accept,
and resolving to
.b $#error
is a reject.
Many of these can also resolve to the special mailer name
.b $#discard ;
this accepts the message as though it were successful
but then discards it without delivery.
Note,
this mailer can not be chosen as a mailer in ruleset 0.
.sh 4 "check_relay"
.pp
The
.i check_relay
ruleset is called after a connection is accepted by the daemon.
It is not called when sendmail is started using the
.b \-bs
option.
It is passed
.(b
client.host.name $| client.host.address
.)b
where
.b $|
is a metacharacter separating the two parts.
This ruleset can reject connections from various locations.
.sh 4 "check_mail"
.pp
The
.i check_mail
ruleset is passed the user name parameter of the
.sm "SMTP MAIL"
command.
It can accept or reject the address.
.sh 4 "check_rcpt"
.pp
The
.i check_rcpt
ruleset is passed the user name parameter of the
.sm "SMTP RCPT"
command.
It can accept or reject the address.
.sh 4 "check_compat"
.pp
The
.i check_compat
ruleset is passed
.(b
sender-address $| recipient-address
.)b
where
.b $|
is a metacharacter separating the addresses.
It can accept or reject mail transfer between these two addresses
much like the
.i checkcompat()
function.
.sh 4 "check_eoh"
.pp
The
.i check_eoh
ruleset is passed
.(b
number-of-headers $| size-of-headers
.)b
where
.b $|
is a metacharacter separating the numbers.
These numbers can be used for size comparisons with the
.b arith
map.
The ruleset is triggered after
all of the headers have been read.
It can be used to correlate information gathered
from those headers using the
.b macro
storage map.
One possible use is to check for a missing header.
For example:
.(b
.ta 1.5i
Kstorage macro
HMessage-Id: $>CheckMessageId

SCheckMessageId
# Record the presence of the header
R$*			$: $(storage {MessageIdCheck} $@ OK $) $1
R< $+ @ $+ >		$@ OK
R$*			$#error $: 553 Header Error

Scheck_eoh
# Check the macro
R$*			$: < $&{MessageIdCheck} >
# Clear the macro for the next message
R$*			$: $(storage {MessageIdCheck} $) $1
# Has a Message-Id: header
R< $+ >			$@ OK
# Allow missing Message-Id: from local mail
R$*			$: < $&{client_name} >
R< >			$@ OK
R< $=w >		$@ OK
# Otherwise, reject the mail
R$*			$#error $: 553 Header Error
.)b
Keep in mind the Message-Id: header is not a required header and
is not a guaranteed spam indicator.
This ruleset is an example and
should probably not be used in production.
.sh 4 "check_etrn"
.pp
The
.i check_etrn
ruleset is passed the parameter of the
.sm "SMTP ETRN"
command.
It can accept or reject the command.
.sh 4 "check_expn"
.pp
The
.i check_expn
ruleset is passed the user name parameter of the
.sm "SMTP EXPN"
command.
It can accept or reject the address.
.sh 4 "check_vrfy"
.pp
The
.i check_vrfy
ruleset is passed the user name parameter of the
.sm "SMTP VRFY"
command.
It can accept or reject the command.
.sh 4 "trust_auth"
.pp
The
.i trust_auth
ruleset is passed the AUTH= parameter of the
.sm "SMTP MAIL"
command.
It is used to determine whether this value should be
trusted. In order to make this decision, the ruleset
may make use of the various
.b ${auth_*}
macros.
If the ruleset does resolve to the
.q error
mailer the AUTH= parameter is not trusted and hence
not passed on to the next relay.
.sh 4 "tls_client"
.pp
The
.i tls_client
ruleset is called when sendmail acts as server, after a STARTTLS command
has been issued, and from
.i check_mail.
The parameter is the value of
.b ${verify}
and STARTTLS or MAIL, respectively.
If the ruleset does resolve to the
.q error
mailer, the appropriate error code is returned to the client.
.sh 4 "tls_server"
.pp
The
.i tls_server
ruleset is called when sendmail acts as client after a STARTTLS command
(should) have been issued.
The parameter is the value of
.b ${verify} .
If the ruleset does resolve to the
.q error
mailer, the connection is aborted
(treated as non-deliverable with a permanent or temporary error).
.sh 3 "IPC mailers"
.pp
Some special processing occurs
if the ruleset zero resolves to an IPC mailer
(that is, a mailer that has
.q [IPC]
listed as the Path in the
.b M
configuration line.
The host name passed after
.q $@
has MX expansion performed if not delivering via a named socket;
this looks the name up in DNS to find alternate delivery sites.
.pp
The host name can also be provided as a dotted quad in square brackets;
for example:
.(b
[128.32.149.78]
.)b
This causes direct conversion of the numeric value
to an IP host address.
.pp
The host name passed in after the
.q $@
may also be a colon-separated list of hosts.
Each is separately MX expanded and the results are concatenated
to make (essentially) one long MX list.
The intent here is to create
.q fake
MX records that are not published in DNS
for private internal networks.
.pp
As a final special case, the host name can be passed in
as a text string
in square brackets:
.(b
[ucbvax.berkeley.edu]
.)b
This form avoids the MX mapping.
.b N.B.:
.i
This is intended only for situations where you have a network firewall
or other host that will do special processing for all your mail,
so that your MX record points to a gateway machine;
this machine could then do direct delivery to machines
within your local domain.
Use of this feature directly violates RFC 1123 section 5.3.5:
it should not be used lightly.
.r
.sh 2 "D \*- Define Macro"
.pp
Macros are named with a single character
or with a word in {braces}.
The names ``x'' and ``{x}'' denote the same macro
for every single character ``x''.
Single character names may be selected from the entire ASCII set,
but user-defined macros
should be selected from the set of upper case letters only.
Lower case letters
and special symbols
are used internally.
Long names beginning with a lower case letter or a punctuation character
are reserved for use by sendmail,
so user-defined long macro names should begin with an upper case letter.
.pp
The syntax for macro definitions is:
.(b F
.b D \c
.i x\|val
.)b
where
.i x
is the name of the macro
(which may be a single character
or a word in braces)
and
.i val
is the value it should have.
There should be no spaces given
that do not actually belong in the macro value.
.pp
Macros are interpolated
using the construct
.b $ \c
.i x ,
where
.i x
is the name of the macro to be interpolated.
This interpolation is done when the configuration file is read,
except in
.b M
lines.
The special construct
.b $& \c
.i x
can be used in
.b R
lines to get deferred interpolation.
.pp
Conditionals can be specified using the syntax:
.(b
$?x text1 $| text2 $.
.)b
This interpolates
.i text1
if the macro
.b $x
is set and non-null,
and
.i text2
otherwise.
The
.q else
(\c
.b $| )
clause may be omitted.
.pp
Lower case macro names are reserved to have
special semantics,
used to pass information in or out of
.i sendmail ,
and special characters are reserved to
provide conditionals, etc.
Upper case names
(that is,
.b $A
through
.b $Z )
are specifically reserved for configuration file authors.
.pp
The following macros are defined and/or used internally by
.i sendmail
for interpolation into argv's for mailers
or for other contexts.
The ones marked \(dg are information passed into sendmail\**,
.(f
\**As of version 8.6,
all of these macros have reasonable defaults.
Previous versions required that they be defined.
.)f
the ones marked \(dd are information passed both in and out of sendmail,
and the unmarked macros are passed out of sendmail
but are not otherwise used internally.
These macros are:
.nr ii 5n
.ip $a
The origination date in RFC 822 format.
This is extracted from the Date: line.
.ip $b
The current date in RFC 822 format.
.ip $c
The hop count.
This is a count of the number of Received: lines
plus the value of the
.b \-h
command line flag.
.ip $d
The current date in UNIX (ctime) format.
.ip $e\(dg
(Obsolete; use SmtpGreetingMessage option instead.)
The SMTP entry message.
This is printed out when SMTP starts up.
The first word must be the
.b $j
macro as specified by RFC821.
Defaults to
.q "$j Sendmail $v ready at $b" .
Commonly redefined to include the configuration version number, e.g.,
.q "$j Sendmail $v/$Z ready at $b"
.ip $f
The envelope sender (from) address.
.ip $g
The sender address relative to the recipient.
For example, if
.b $f
is
.q foo ,
.b $g
will be
.q host!foo ,
.q foo@host.domain ,
or whatever is appropriate for the receiving mailer.
.ip $h
The recipient host.
This is set in ruleset 0 from the $@ field of a parsed address.
.ip $i
The queue id,
e.g.,
.q HAA12345 .
.ip $j\(dd
The \*(lqofficial\*(rq domain name for this site.
This is fully qualified if the full qualification can be found.
It
.i must
be redefined to be the fully qualified domain name
if your system is not configured so that information can find
it automatically.
.ip $k
The UUCP node name (from the uname system call).
.ip $l\(dg
(Obsolete; use UnixFromLine option instead.)
The format of the UNIX from line.
Unless you have changed the UNIX mailbox format,
you should not change the default,
which is
.q "From $g $d" .
.ip $m
The domain part of the \fIgethostname\fP return value.
Under normal circumstances,
.b $j
is equivalent to
.b $w.$m .
.ip $n\(dg
The name of the daemon (for error messages).
Defaults to
.q MAILER-DAEMON .
.ip $o\(dg
(Obsolete: use OperatorChars option instead.)
The set of \*(lqoperators\*(rq in addresses.
A list of characters
which will be considered tokens
and which will separate tokens
when doing parsing.
For example, if
.q @
were in the
.b $o
macro, then the input
.q a@b
would be scanned as three tokens:
.q a,
.q @,
and
.q b.
Defaults to
.q ".:@[]" ,
which is the minimum set necessary to do RFC 822 parsing;
a richer set of operators is
.q ".:%@!/[]" ,
which adds support for UUCP, the %-hack, and X.400 addresses.
.ip $p
Sendmail's process id.
.ip $q\(dg
Default format of sender address.
The
.b $q
macro specifies how an address should appear in a message
when it is defaulted.
Defaults to
.q "<$g>" .
It is commonly redefined to be
.q "$?x$x <$g>$|$g$."
or
.q "$g$?x ($x)$." ,
corresponding to the following two formats:
.(b
Eric Allman <eric@CS.Berkeley.EDU>
eric@CS.Berkeley.EDU (Eric Allman)
.)b
.i Sendmail
properly quotes names that have special characters
if the first form is used.
.ip $r
Protocol used to receive the message.
Set from the
.b \-p
command line flag or by the SMTP server code.
.ip $s
Sender's host name.
Set from the
.b \-p
command line flag or by the SMTP server code.
.ip $t
A numeric representation of the current time.
.ip $u
The recipient user.
.ip $v
The version number of the
.i sendmail
binary.
.ip $w\(dd
The hostname of this site.
This is the root name of this host (but see below for caveats).
.ip $x
The full name of the sender.
.ip $z
The home directory of the recipient.
.ip $_
The validated sender address.
.ip ${auth_authen}
The client's authentication credentials as determined by authentication
(only set if successful).
.ip ${auth_author}
The authorization identity, i.e. the AUTH= parameter of the
.sm "SMTP MAIL"
command if supplied.
.ip ${auth_type}
The mechanism used for authentication
(only set if successful).
.ip ${auth_ssf}
The keylength (in bits) of the symmetric encryption algorithm
used for the security layer of a SASL mechanism.
.ip ${bodytype}
The message body type
(7BIT or 8BITMIME),
as determined from the envelope.
.ip ${cert_issuer}
The DN (distinguished name) of the CA (certificate authority)
that signed the presented certificate (the cert issuer).
.ip ${cert_subject}
The DN of the presented certificate (called the cert subject).
.ip ${cipher}
The cipher suite used for the connection, e.g., EDH-DSS-DES-CBC3-SHA,
EDH-RSA-DES-CBC-SHA, DES-CBC-MD5, DES-CBC3-SHA.
.ip ${cipher_bits}
The keylength (in bits) of the symmetric encryption algorithm
used for a TLS connection.
.ip ${client_addr}
The IP address of the SMTP client.
Defined in the SMTP server only.
.ip ${client_name}
The host name of the SMTP client.
This may be the client's bracketed IP address
in the form [ nnn.nnn.nnn.nnn ] if the client's
IP address is not resolvable, or if it is resolvable
but the IP address of the resolved hostname
doesn't match the original IP address.
Defined in the SMTP server only.
.ip ${client_port}
The port number of the SMTP client.
Defined in the SMTP server only.
.ip ${client_resolve}
Holds the result of the resolve call for
.b ${client_name}
: OK, FAIL, FORGED, TEMP.
Defined in the SMTP server only.
.ip ${currHeader}
Header value as quoted string
(possibly truncated to
.b MAXNAME ).
.ip ${daemon_addr}
The IP address the daemon is listening on for connections.
Unless
.b DaemonPortOptions
is set, this will be
.q 0.0.0.0 .
.ip ${daemon_family}
The network family
if the daemon is accepting network connections.
Possible values include
.q inet ,
.q inet6 ,
.q iso ,
.q ns ,
.q x.25
.ip ${daemon_flags}
The flags for the daemon as specified by the
Modifier= part of
.b DaemonPortOptions
whereby the flags are separated from each other by spaces,
and upper case flags are doubled.
That is,
Modifier=Ea
will be represented as
"EE a" in
.b ${daemon_flags} ,
which is required for testing the flags in rulesets.
.ip ${daemon_info}
Some information about a daemon as a text string.
For example,
.q SMTP+queueing@00:30:00 .
.ip ${daemon_name}
The name of the daemon from
.b DaemonPortOptions
Name= suboption.
If this suboption is not set,
"Daemon#",
where # is the daemon number,
is used.
.ip ${daemon_port}
The port the daemon is accepting connection on.
Unless
.b DaemonPortOptions
is set, this will most likely be
.q 25 .
.ip ${deliveryMode}
The current delivery mode sendmail is using.
It is initially set to the value of the
.b DeliveryMode
option.
.ip ${envid}
The envelope id passed to sendmail as part of the envelope.
.ip ${hdrlen}
The length of the header value which is stored in
${currHeader} (before possible truncation).
If this value is greater than or equal
.b MAXNAME
the header has been truncated.
.ip ${hdr_name}
The name of the header field for which the current header
check ruleset has been called.
This is useful for a default header check ruleset to get
the name of the header.
.ip ${if_addr}
The IP address of the interface of an incoming connection
unless it is in the loopback net.
.ip ${if_family}
The IP family of the interface of an incoming connection
unless it is in the loopback net.
.ip ${if_name}
The name of the interface of an incoming connection.
This macro can be used for
SmtpGreetingMessage and HReceived for virtual hosting.
For example:
.(b
O SmtpGreetingMessage=$?{if_name}${if_name}$|$j$. MTA
.)b
.ip ${mail_addr}
The address part of the resolved triple of the address given for the
.sm "SMTP MAIL"
command.
Defined in the SMTP server only.
.ip ${mail_host}
The host from the resolved triple of the address given for the
.sm "SMTP MAIL"
command.
Defined in the SMTP server only.
.ip ${mail_mailer}
The mailer from the resolved triple of the address given for the
.sm "SMTP MAIL"
command.
Defined in the SMTP server only.
.ip ${msg_size}
The value of the SIZE= parameter,
i.e., usually the size of the message (in an ESMTP dialogue),
before the message has been collected, thereafter
the message size as computed by
.i sendmail 
(and can be used in check_compat).
.ip ${ntries}
The number of delivery attempts.
.ip ${opMode}
The current operation mode (from the
.b \-b
flag).
.ip ${queue_interval}
The queue run interval given by the
.b \-q
flag.
For example,
.b \-q30m
would set
.b ${queue_interval}
to
.q 00:30:00 .
.ip ${rcpt_addr}
The address part of the resolved triple of the address given for the
.sm "SMTP RCPT"
command.
Defined in the SMTP server only.
.ip ${rcpt_host}
The host from the resolved triple of the address given for the
.sm "SMTP RCPT"
command.
Defined in the SMTP server only.
.ip ${rcpt_mailer}
The mailer from the resolved triple of the address given for the
.sm "SMTP RCPT"
command.
Defined in the SMTP server only.
.ip ${server_addr}
The address of the server of the current outgoing SMTP connection.
.ip ${server_name}
The name of the server of the current outgoing SMTP connection.
.ip ${tls_version}
The TLS/SSL version used for the connection, e.g., TLSv1, SSLv3, SSLv2.
.ip ${verify}
The result of the verification of the presented cert.
Possible values are:
.(b
.ta 9n
OK	verification succeeded.
NO	no cert presented.
FAIL	cert presented but could not be verified,
	e.g., the signing CA is missing.
NONE	STARTTLS has not been performed.
TEMP	temporary error occurred.
PROTOCOL some protocol error occurred.
SOFTWARE STARTTLS handshake failed.
.)b
.pp
There are three types of dates that can be used.
The
.b $a
and
.b $b
macros are in RFC 822 format;
.b $a
is the time as extracted from the
.q Date:
line of the message
(if there was one),
and
.b $b
is the current date and time
(used for postmarks).
If no
.q Date:
line is found in the incoming message,
.b $a
is set to the current time also.
The
.b $d
macro is equivalent to the
.b $b
macro in UNIX
(ctime)
format.
.pp
The macros
.b $w ,
.b $j ,
and
.b $m
are set to the identity of this host.
.i Sendmail
tries to find the fully qualified name of the host
if at all possible;
it does this by calling
.i gethostname (2)
to get the current hostname
and then passing that to
.i gethostbyname (3)
which is supposed to return the canonical version of that host name.\**
.(f
\**For example, on some systems
.i gethostname
might return
.q foo
which would be mapped to
.q foo.bar.com
by
.i gethostbyname .
.)f
Assuming this is successful,
.b $j
is set to the fully qualified name
and
.b $m
is set to the domain part of the name
(everything after the first dot).
The
.b $w
macro is set to the first word
(everything before the first dot)
if you have a level 5 or higher configuration file;
otherwise, it is set to the same value as
.b $j .
If the canonification is not successful,
it is imperative that the config file set
.b $j
to the fully qualified domain name\**.
.(f
\**Older versions of sendmail didn't pre-define
.b $j
at all, so up until 8.6,
config files
.i always
had to define
.b $j .
.)f
.pp
The
.b $f
macro is the id of the sender
as originally determined;
when mailing to a specific host
the
.b $g
macro is set to the address of the sender
.ul
relative to the recipient.
For example,
if I send to
.q bollard@matisse.CS.Berkeley.EDU
from the machine
.q vangogh.CS.Berkeley.EDU
the
.b $f
macro will be
.q eric
and the
.b $g
macro will be
.q eric@vangogh.CS.Berkeley.EDU.
.pp
The
.b $x
macro is set to the full name of the sender.
This can be determined in several ways.
It can be passed as flag to
.i sendmail .
It can be defined in the
.sm NAME
environment variable.
The third choice is the value of the
.q Full-Name:
line in the header if it exists,
and the fourth choice is the comment field
of a
.q From:
line.
If all of these fail,
and if the message is being originated locally,
the full name is looked up in the
.i /etc/passwd
file.
.pp
When sending,
the
.b $h ,
.b $u ,
and
.b $z
macros get set to the host, user, and home directory
(if local)
of the recipient.
The first two are set from the
.b $@
and
.b $:
part of the rewriting rules, respectively.
.pp
The
.b $p
and
.b $t
macros are used to create unique strings
(e.g., for the
.q Message-Id:
field).
The
.b $i
macro is set to the queue id on this host;
if put into the timestamp line
it can be extremely useful for tracking messages.
The
.b $v
macro is set to be the version number of
.i sendmail ;
this is normally put in timestamps
and has been proven extremely useful for debugging.
.pp
The
.b $c
field is set to the
.q "hop count,"
i.e., the number of times this message has been processed.
This can be determined
by the
.b \-h
flag on the command line
or by counting the timestamps in the message.
.pp
The
.b $r
and
.b $s
fields are set to the protocol used to communicate with
.i sendmail
and the sending hostname.
They can be set together using the
.b \-p
command line flag or separately using the
.b \-M
or
.b \-oM
flags.
.pp
The
.b $_
is set to a validated sender host name.
If the sender is running an RFC 1413 compliant IDENT server
and the receiver has the IDENT protocol turned on,
it will include the user name on that host.
.pp
The
.b ${client_name} ,
.b ${client_addr} ,
and
.b ${client_port}
macros
are set to the name, address, and port number of the SMTP client
who is invoking
.i sendmail
as a server.
These can be used in the
.i check_*
rulesets (using the
.b $&
deferred evaluation form, of course!).
.sh 2 "C and F \*- Define Classes"
.pp
Classes of phrases may be defined
to match on the left hand side of rewriting rules,
where a
.q phrase
is a sequence of characters that does not contain space characters.
For example
a class of all local names for this site
might be created
so that attempts to send to oneself
can be eliminated.
These can either be defined directly in the configuration file
or read in from another file.
Classes are named as a single letter or a word in {braces}.
Class names beginning with lower case letters
and special characters are reserved for system use.
Classes defined in config files may be given names
from the set of upper case letters for short names
or beginning with an upper case letter for long names.
.pp
The syntax is:
.(b F
.b C \c
.i c\|phrase1
.i phrase2...
.br
.b F \c
.i c\|file
.)b
The first form defines the class
.i c
to match any of the named words.
If
.i phrase1
or
.i phrase2
is another class,
e.g.,
.i $=S ,
the contents of class
.i S
are added to class
.i c .
It is permissible to split them among multiple lines;
for example, the two forms:
.(b
CHmonet ucbmonet
.)b
and
.(b
CHmonet
CHucbmonet
.)b
are equivalent.
The ``F'' form
reads the elements of the class
.i c
from the named
.i file .
Each element should be listed on a separate line.
To specify an optional file, use ``-o'' between the class
name and the file name, e.g.,
.(b
Fc -o /path/to/file
.)b
If the file can't be used,
.i sendmail
will not complain but silently ignore it.
.pp
Elements of classes can be accessed in rules using
.b $=
or
.b $~ .
The
.b $~
(match entries not in class)
only matches a single word;
multi-word entries in the class are ignored in this context.
.pp
Some classes have internal meaning to
.i sendmail :
.nr ii 0.5i
.\".ip $=b
.\"A set of Content-Types that will not have the newline character
.\"translated to CR-LF before encoding into base64 MIME.
.\"The class can have major times
.\"(e.g.,
.\".q image )
.\"or full types
.\"(such as
.\".q application/octet-stream ).
.\"The class is initialized with
.\".q application/octet-stream ,
.\".q image ,
.\".q audio ,
.\"and
.\".q video .
.ip $=e
contains the Content-Transfer-Encodings that can be 8\(->7 bit encoded.
It is predefined to contain
.q 7bit ,
.q 8bit ,
and
.q binary .
.ip $=k
set to be the same as
.b $k ,
that is, the UUCP node name.
.ip $=m
set to the set of domains by which this host is known,
initially just
.b $m .
.ip $=n
can be set to the set of MIME body types
that can never be eight to seven bit encoded.
It defaults to
.q multipart/signed .
Message types
.q message/*
and
.q multipart/*
are never encoded directly.
Multipart messages are always handled recursively.
The handling of message/* messages
are controlled by class
.b $=s .
.ip $=q
A set of Content-Types that will never be encoded as base64
(if they have to be encoded, they will be encoded as quoted-printable).
It can have primary types
(e.g.,
.q text )
or full types
(such as
.q text/plain ).
The class is initialized to have
.q text/plain
only.
.ip $=s
contains the set of subtypes of message that can be treated recursively.
By default it contains only
.q rfc822 .
Other
.q message/*
types cannot be 8\(->7 bit encoded.
If a message containing eight bit data is sent to a seven bit host,
and that message cannot be encoded into seven bits,
it will be stripped to 7 bits.
.ip $=t
set to the set of trusted users by the
.b T
configuration line.
If you want to read trusted users from a file, use
.b Ft \c
.i /file/name .
.ip $=w
set to be the set of all names
this host is known by.
This can be used to match local hostnames.
.ip $={persistentMacros}
set to the macros would should be saved across queue runs.
Care should be taken when adding macro names to this class.
.pp
.i Sendmail
can be compiled to allow a
.i scanf (3)
string on the
.b F
line.
This lets you do simplistic parsing of text files.
For example, to read all the user names in your system
.i /etc/passwd
file into a class, use
.(b
FL/etc/passwd %[^:]
.)b
which reads every line up to the first colon.
.sh 2 "M \*- Define Mailer"
.pp
Programs and interfaces to mailers
are defined in this line.
The format is:
.(b F
.b M \c
.i name ,
{\c
.i field =\c
.i value \|}*
.)b
where
.i name
is the name of the mailer
(used internally only)
and the
.q field=name
pairs define attributes of the mailer.
Fields are:
.(b
.ta 1i
Path	The pathname of the mailer
Flags	Special flags for this mailer
Sender	Rewriting set(s) for sender addresses
Recipient	Rewriting set(s) for recipient addresses
Argv	An argument vector to pass to this mailer
Eol	The end-of-line string for this mailer
Maxsize	The maximum message length to this mailer
maxmessages	The maximum message deliveries per connection
Linelimit	The maximum line length in the message body
Directory	The working directory for the mailer
Userid	The default user and group id to run as
Nice	The nice(2) increment for the mailer
Charset	The default character set for 8-bit characters
Type	Type information for DSN diagnostics
Wait	The maximum time to wait for the mailer
/	The root directory for the mailer
.)b
Only the first character of the field name is checked.
.pp
The following flags may be set in the mailer description.
Any other flags may be used freely
to conditionally assign headers to messages
destined for particular mailers.
Flags marked with \(dg
are not interpreted by the
.i sendmail
binary;
these are the conventionally used to correlate to the flags portion
of the
.b H
line.
Flags marked with \(dd
apply to the mailers for the sender address
rather than the usual recipient mailers.
.nr ii 4n
.ip a
Run Extended SMTP (ESMTP) protocol (defined in RFCs 1869, 1652, and 1870).
This flag defaults on if the SMTP greeting message includes the word
.q ESMTP .
.ip A
Look up the user part of the address in the alias database.
Normally this is only set for local mailers.
.ip b
Force a blank line on the end of a message.
This is intended to work around some stupid versions of
/bin/mail
that require a blank line, but do not provide it themselves.
It would not normally be used on network mail.
.ip c
Do not include comments in addresses.
This should only be used if you have to work around
a remote mailer that gets confused by comments.
This strips addresses of the form
.q "Phrase <address>"
or
.q "address (Comment)"
down to just
.q address .
.ip C\(dd
If mail is
.i received
from a mailer with this flag set,
any addresses in the header that do not have an at sign
(\c
.q @ )
after being rewritten by ruleset three
will have the
.q @domain
clause from the sender envelope address
tacked on.
This allows mail with headers of the form:
.(b
From: usera@hosta
To: userb@hostb, userc
.)b
to be rewritten as:
.(b
From: usera@hosta
To: userb@hostb, userc@hosta
.)b
automatically.
However, it doesn't really work reliably.
.ip d
Do not include angle brackets around route-address syntax addresses.
This is useful on mailers that are going to pass addresses to a shell
that might interpret angle brackets as I/O redirection.
However, it does not protect against other shell metacharacters.
Therefore, passing addresses to a shell should not be considered secure.
.ip D\(dg
This mailer wants a
.q Date:
header line.
.ip e
This mailer is expensive to connect to,
so try to avoid connecting normally;
any necessary connection will occur during a queue run.
See also option
.b HoldExpensive .
.ip E
Escape lines beginning with
.q From\0
in the message with a `>' sign.
.ip f
The mailer wants a
.b \-f
.i from
flag,
but only if this is a network forward operation
(i.e.,
the mailer will give an error
if the executing user
does not have special permissions).
.ip F\(dg
This mailer wants a
.q From:
header line.
.ip g
Normally,
.i sendmail
sends internally generated email (e.g., error messages)
using the null return address
as required by RFC 1123.
However, some mailers don't accept a null return address.
If necessary,
you can set the
.b g
flag to prevent
.i sendmail
from obeying the standards;
error messages will be sent as from the MAILER-DAEMON
(actually, the value of the
.b $n
macro).
.ip h
Upper case should be preserved in host names
(the $@ portion of the mailer triplet resolved from ruleset 0)
for this mailer.
.ip i
Do User Database rewriting on envelope sender address.
.ip I
This mailer will be speaking SMTP
to another
.i sendmail
\*-
as such it can use special protocol features.
This option is not required
(i.e.,
if this option is omitted the transmission will still operate successfully,
although perhaps not as efficiently as possible).
.ip j
Do User Database rewriting on recipients as well as senders.
.ip k
Normally when
.i sendmail
connects to a host via SMTP,
it checks to make sure that this isn't accidently the same host name
as might happen if
.i sendmail
is misconfigured or if a long-haul network interface is set in loopback mode.
This flag disables the loopback check.
It should only be used under very unusual circumstances.
.ip K
Currently unimplemented.
Reserved for chunking.
.ip l
This mailer is local
(i.e.,
final delivery will be performed).
.ip L
Limit the line lengths as specified in RFC821.
This deprecated option should be replaced by the
.b L=
mail declaration.
For historic reasons, the
.b L
flag also sets the
.b 7
flag.
.ip m
This mailer can send to multiple users
on the same host
in one transaction.
When a
.b $u
macro occurs in the
.i argv
part of the mailer definition,
that field will be repeated as necessary
for all qualifying users.
Removing this flag can defeat duplicate supression on a remote site
as each recipient is sent in a separate transaction.
.ip M\(dg
This mailer wants a
.q Message-Id:
header line.
.ip n
Do not insert a UNIX-style
.q From
line on the front of the message.
.ip o
Always run as the owner of the recipient mailbox.
Normally
.i sendmail
runs as the sender for locally generated mail
or as
.q daemon
(actually, the user specified in the
.b u
option)
when delivering network mail.
The normal behavior is required by most local mailers,
which will not allow the envelope sender address
to be set unless the mailer is running as daemon.
This flag is ignored if the
.b S
flag is set.
.ip p
Use the route-addr style reverse-path in the SMTP
.q "MAIL FROM:"
command
rather than just the return address;
although this is required in RFC821 section 3.1,
many hosts do not process reverse-paths properly.
Reverse-paths are officially discouraged by RFC 1123.
.ip P\(dg
This mailer wants a
.q Return-Path:
line.
.ip q
When an address that resolves to this mailer is verified
(SMTP VRFY command),
generate 250 responses instead of 252 responses.
This will imply that the address is local.
.ip r
Same as
.b f ,
but sends a
.b \-r
flag.
.ip R
Open SMTP connections from a
.q secure
port.
Secure ports aren't
(secure, that is)
except on UNIX machines,
so it is unclear that this adds anything.
.ip s
Strip quote characters (" and \e) off of the address
before calling the mailer.
.ip S
Don't reset the userid
before calling the mailer.
This would be used in a secure environment
where
.i sendmail
ran as root.
This could be used to avoid forged addresses.
If the
.b U=
field is also specified,
this flag causes the effective user id to be set to that user.
.ip u
Upper case should be preserved in user names
for this mailer.
Standards require preservation of case in the local part of addresses,
except for those address for which your system accepts responsibility.
.ip U
This mailer wants UUCP-style
.q From
lines with the ugly
.q "remote from <host>"
on the end.
.ip w
The user must have a valid account on this machine,
i.e.,
getpwnam
must succeed.
If not,
the mail is bounced.
This is required to get
.q \&.forward
capability.
.ip x\(dg
This mailer wants a
.q Full-Name:
header line.
.ip X
This mailer want to use the hidden dot algorithm
as specified in RFC821;
basically,
any line beginning with a dot
will have an extra dot prepended
(to be stripped at the other end).
This insures that lines in the message containing a dot
will not terminate the message prematurely.
.ip z
Run Local Mail Transfer Protocol (LMTP)
between
.i sendmail
and the local mailer.
This is a variant on SMTP
defined in RFC 2033
that is specifically designed for delivery to a local mailbox.
.ip 0
Don't look up MX records for hosts sent via SMTP.
.ip 3
Extend the list of characters converted to =XX notation
when converting to Quoted-Printable
to include those that don't map cleanly between ASCII and EBCDIC.
Useful if you have IBM mainframes on site.
.ip 5
If no aliases are found for this address,
pass the address through ruleset 5 for possible alternate resolution.
This is intended to forward the mail to an alternate delivery spot.
.ip 6
Strip headers to seven bits.
.ip 7
Strip all output to seven bits.
This is the default if the
.b L
flag is set.
Note that clearing this option is not
sufficient to get full eight bit data passed through
.i sendmail .
If the
.b 7
option is set, this is essentially always set,
since the eighth bit was stripped on input.
Note that this option will only impact messages
that didn't have 8\(->7 bit MIME conversions performed.
.ip 8
If set,
it is acceptable to send eight bit data to this mailer;
the usual attempt to do 8\(->7 bit MIME conversions will be bypassed.
.ip 9
If set,
do
.i limited
7\(->8 bit MIME conversions.
These conversions are limited to text/plain data.
.ip :
Check addresses to see if they begin
.q :include: ;
if they do, convert them to the
.q *include*
mailer.
.ip |
Check addresses to see if they begin with a `|';
if they do, convert them to the
.q prog
mailer.
.ip /
Check addresses to see if they begin with a `/';
if they do, convert them to the
.q *file*
mailer.
.ip @
Look up addresses in the user database.
.ip %
Do not attempt delivery on initial recipient of a message
or on queue runs
unless the queued message is selected
using one of the -qI/-qR/-qS queue run modifiers
or an ETRN request.
.pp
Configuration files prior to level 6
assume the `A', `w', `5', `:', `|', `/', and `@' options
on the mailer named
.q local .
.pp
The mailer with the special name
.q error
can be used to generate a user error.
The (optional) host field is an exit status to be returned,
and the user field is a message to be printed.
The exit status may be numeric or one of the values
USAGE, NOUSER, NOHOST, UNAVAILABLE, SOFTWARE, TEMPFAIL, PROTOCOL, or CONFIG
to return the corresponding EX_ exit code,
or an enhanced error code as described in RFC 1893,
.ul
Enhanced Mail System Status Codes.
For example, the entry:
.(b
$#error $@ NOHOST $: Host unknown in this domain
.)b
on the RHS of a rule
will cause the specified error to be generated
and the
.q "Host unknown"
exit status to be returned
if the LHS matches.
This mailer is only functional in rulesets 0, 5,
or one of the check_* rulesets.
.pp
The mailer with the special name
.q discard
causes any mail sent to it to be discarded
but otherwise treated as though it were successfully delivered.
This mailer can not be used in ruleset 0,
only in the various address checking rulesets.
.pp
The mailer named
.q local
.i must
be defined in every configuration file.
This is used to deliver local mail,
and is treated specially in several ways.
Additionally, three other mailers named
.q prog ,
.q *file* ,
and
.q *include*
may be defined to tune the delivery of messages to programs,
files,
and :include: lists respectively.
They default to:
.(b
Mprog, P=/bin/sh, F=lsoDq9, T=DNS/RFC822/X-Unix, A=sh \-c $u
M*file*, P=[FILE], F=lsDFMPEouq9, T=DNS/RFC822/X-Unix, A=FILE $u
M*include*, P=/dev/null, F=su, A=INCLUDE $u
.)b
.pp
The Sender and Recipient rewriting sets
may either be a simple ruleset id
or may be two ids separated by a slash;
if so, the first rewriting set is applied to envelope
addresses
and the second is applied to headers.
Setting any value zero disables corresponding mailer-specific rewriting.
.pp
The Directory
is actually a colon-separated path of directories to try.
For example, the definition
.q D=$z:/
first tries to execute in the recipient's home directory;
if that is not available,
it tries to execute in the root of the filesystem.
This is intended to be used only on the
.q prog
mailer,
since some shells (such as
.i csh )
refuse to execute if they cannot read the home directory.
Since the queue directory is not normally readable by unprivileged users
.i csh
scripts as recipients can fail.
.pp
The Userid
specifies the default user and group id to run as,
overriding the
.b DefaultUser
option (q.v.).
If the
.b S
mailer flag is also specified,
this user and group will be set as the
effective uid and gid for the process.
This may be given as
.i user:group
to set both the user and group id;
either may be an integer or a symbolic name to be looked up
in the
.i passwd
and
.i group
files respectively.
If only a symbolic user name is specified,
the group id in the
.i passwd
file for that user is used as the group id.
.pp
The Charset field
is used when converting a message to MIME;
this is the character set used in the
Content-Type: header.
If this is not set, the
.b DefaultCharset
option is used,
and if that is not set, the value
.q unknown-8bit
is used.
.b WARNING:
this field applies to the sender's mailer,
not the recipient's mailer.
For example, if the envelope sender address
lists an address on the local network
and the recipient is on an external network,
the character set will be set from the Charset= field
for the local network mailer,
not that of the external network mailer.
.pp
The Type= field
sets the type information
used in MIME error messages
as defined by
RFC 1894.
It is actually three values separated by slashes:
the MTA-type (that is, the description of how hosts are named),
the address type (the description of e-mail addresses),
and the diagnostic type (the description of error diagnostic codes).
Each of these must be a registered value
or begin with
.q X\- .
The default is
.q dns/rfc822/smtp .
.pp
The m= field specifies the maximum number of messages to attempt to deliver 
on a single SMTP or LMTP connection.
.pp
The /= field specifies a new root directory for the mailer.  The path is
macro expanded and then passed to the
.q chroot
system call.  The root directory is changed before the Directory field is
consulted or the uid is changed.
.pp
The Wait= field specifies the maximum time to wait for the
mailer to return after sending all data to it.
This applies to mailers that have been forked by
.i sendmail .
.sh 2 "H \*- Define Header"
.pp
The format of the header lines that
.i sendmail
inserts into the message
are defined by the
.b H
line.
The syntax of this line is one of the following:
.(b F
.b H \c
.i hname \c
.b :
.i htemplate
.)b
.(b F
.b H [\c
.b ? \c
.i mflags \c
.b ? \c
.b ]\c
.i hname \c
.b :
.i htemplate
.)b
.(b F
.b H [\c
.b ? \c
.i ${macro} \c
.b ? \c
.b ]\c
.i hname \c
.b :
.i htemplate
.)b
Continuation lines in this spec
are reflected directly into the outgoing message.
The
.i htemplate
is macro-expanded before insertion into the message.
If the
.i mflags
(surrounded by question marks)
are specified,
at least one of the specified flags
must be stated in the mailer definition
for this header to be automatically output.
If a
.i ${macro}
(surrounded by question marks)
is specified,
the header will be automatically output
if the macro is set.
The macro may be set using any of the normal methods,
including using the
.b macro
storage map in a ruleset.
If one of these headers is in the input
it is reflected to the output
regardless of these flags or macros.
.pp
Some headers have special semantics
that will be described later.
.pp
A secondary syntax allows validation of headers as they are being read.
To enable validation, use:
.(b
.b H \c
.i Header \c
.b ": $>" \c
.i Ruleset
.b H \c
.i Header \c
.b ": $>+" \c
.i Ruleset
.)b
The indicated
.i Ruleset
is called for the specified
.i Header ,
and can return
.b $#error
to reject the message or
.b $#discard
to discard the message
(as with the other
.b check_ *
rulesets).
The ruleset receives the header field-body as argument,
i.e., not the header field-name; see also
${hdr_name} and ${currHeader}.
The header is treated as a structured field,
that is,
comments (in parentheses) are deleted before processing,
unless the second form
.b $>+
is used.
Note: only one ruleset can be associated with a header;
.i sendmail
will silently ignore multiple entries.
.pp
For example, the configuration lines:
.(b
HMessage-Id: $>CheckMessageId

SCheckMessageId
R< $+ @ $+  >	$@ OK
R$*		$#error $: Illegal Message-Id header
.)b
would refuse any message that had a Message-Id: header of any of the
following forms:
.(b
Message-Id: <>
Message-Id: some text
Message-Id: <legal text@domain> extra crud
.)b
A default ruleset that is called for headers which don't have a
specific ruleset defined for them can be specified by:
.(b
.b H \c
.i * \c
.b ": $>" \c
.i Ruleset
.)b
or
.(b
.b H \c
.i * \c
.b ": $>+" \c
.i Ruleset
.)b
.sh 2 "O \*- Set Option"
.pp
There are a number of
global
options that
can be set from a configuration file.
Options are represented by full words;
some are also representable as single characters
for back compatibility.
The syntax of this line is:
.(b F
.b O \0
.i option \c
.b = \c
.i value
.)b
This sets option
.i option
to be
.i value .
Note that there
.i must
be a space between the letter `O' and the name of the option.
An older version is:
.(b F
.b O \c
.i o\|value
.)b
where the option
.i o
is a single character.
Depending on the option,
.i value
may be a string, an integer,
a boolean
(with legal values
.q t ,
.q T ,
.q f ,
or
.q F ;
the default is TRUE),
or
a time interval.
.pp
The options supported (with the old, one character names in brackets) are:
.nr ii 1i
.ip "AliasFile=\fIspec, spec, ...\fP"
[A]
Specify possible alias file(s).
Each
.i spec
should be in the format
``\c
.i class \c
.b :
.i file ''
where
.i class \c
.b :
is optional and defaults to ``implicit''.
Depending on how
.i sendmail
is compiled, valid classes are
.q implicit
(search through a compiled-in list of alias file types,
for back compatibility),
.q hash
(if
.sm NEWDB
is specified),
.q dbm
(if
.sm NDBM
is specified),
.q stab
(internal symbol table \*- not normally used
unless you have no other database lookup),
or
.q nis
(if
.sm NIS
is specified).
If a list of
.i spec s
are provided,
.i sendmail
searches them in order.
.ip AliasWait=\fItimeout\fP
[a]
If set,
wait up to
.i timeout
(units default to minutes)
for an
.q @:@
entry to exist in the alias database
before starting up.
If it does not appear in the
.i timeout
interval
rebuild the database
(if the
.b AutoRebuildAliases
option is also set)
or issue a warning.
.ip AllowBogusHELO
[no short name]
If set, allow HELO SMTP commands that don't include a host name.
Setting this violates RFC 1123 section 5.2.5,
but is necessary to interoperate with several SMTP clients.
If there is a value, it is still checked for legitimacy.
.ip AuthMechanisms
[no short name]
List of authentication mechanisms for AUTH (separated by spaces).
The advertised list of authentication mechanisms will be the
intersection of this list and the list of available mechanisms as
determined by the Cyrus SASL library.
.ip AuthOptions
[no short name]
When to use the AUTH= parameter for the MAIL FROM command;
.(b
.ta 1i
A Only when authentication succeeded.
.)b
The default is to try whenever SMTP AUTH is available.
.ip AutoRebuildAliases
[D]
If set,
rebuild the alias database if necessary and possible.
The rebuild will happen the next time an alias is looked up.
If this option is not set,
.i sendmail
will never rebuild the alias database
unless explicitly requested
using
.b \-bi .
.b NOTE :
There is a potential for a denial of service attack if this is set.
This option is deprecated and
will be removed from a future version.
.ip BlankSub=\fIc\fP
[B]
Set the blank substitution character to
.i c .
Unquoted spaces in addresses are replaced by this character.
Defaults to space (i.e., no change is made).
.ip CACERTPath
[no short name]
Path to directory with certificates of CAs.
.ip CACERTFile
[no short name]
File containing one CA certificate.
.ip CheckAliases
[n]
Validate the RHS of aliases when rebuilding the alias database.
.ip CheckpointInterval=\fIN\fP
[C]
Checkpoints the queue every
.i N
(default 10)
addresses sent.
If your system crashes during delivery to a large list,
this prevents retransmission to any but the last
.i N
recipients.
.ip ClassFactor=\fIfact\fP
[z]
The indicated
.i fact or
is multiplied by the message class
(determined by the Precedence: field in the user header
and the
.b P
lines in the configuration file)
and subtracted from the priority.
Thus, messages with a higher Priority: will be favored.
Defaults to 1800.
.ip ClientCertFile
[no short name]
File containing the certificate of the client, i.e., this certificate
is used when sendmail acts as client.
.ip ClientPortOptions=\fIoptions\fP
[O]
Set client SMTP options.
The options are
.i key=value
pairs separated by commas.
Known keys are:
.(b
.ta 1i
Port	Name/number of source port for connection (defaults to any free port)
Addr	Address mask (defaults INADDR_ANY)
Family	Address family (defaults to INET)
SndBufSize	Size of TCP send buffer
RcvBufSize	Size of TCP receive buffer
Modifier	Options (flags) for the daemon
.)b
The
.i Addr ess
mask may be a numeric address in dot notation
or a network name.
.i Modifier
can be the following character:
.(b
.ta 1i
h	use name of interface for HELO command
.)b
If ``h'' is set, the name corresponding to the outgoing interface
address (whether chosen via the Connection parameter or
the default) is used for the HELO/EHLO command.
.ip ClientKeyFile
[no short name]
File containing the private key belonging to the client certificate.
.ip ColonOkInAddr
[no short name]
If set, colons are acceptable in e-mail addresses
(e.g.,
.q host:user ).
If not set, colons indicate the beginning of a RFC 822 group construct
(\c
.q "groupname: member1, member2, ... memberN;" ).
Doubled colons are always acceptable
(\c
.q nodename::user )
and proper route-addr nesting is understood
(\c
.q <@relay:user@host> ).
Furthermore, this option defaults on if the configuration version level
is less than 6 (for back compatibility).
However, it must be off for full compatibility with RFC 822.
.ip ConnectionCacheSize=\fIN\fP
[k]
The maximum number of open connections that will be cached at a time.
The default is one.
This delays closing the current connection until
either this invocation of
.i sendmail
needs to connect to another host
or it terminates.
Setting it to zero defaults to the old behavior,
that is, connections are closed immediately.
Since this consumes file descriptors,
the connection cache should be kept small:
4 is probably a practical maximum.
.ip ConnectionCacheTimeout=\fItimeout\fP
[K]
The maximum amount of time a cached connection will be permitted to idle
without activity.
If this time is exceeded,
the connection is immediately closed.
This value should be small (on the order of ten minutes).
Before
.i sendmail
uses a cached connection,
it always sends a RSET command
to check the connection;
if this fails, it reopens the connection.
This keeps your end from failing if the other end times out.
The point of this option is to be a good network neighbor
and avoid using up excessive resources
on the other end.
The default is five minutes.
.ip ConnectOnlyTo=\fIaddress\fP
[no short name]
This can be used to
override the connection address (for testing purposes).
.ip ConnectionRateThrottle=\fIN\fP
[no short name]
If set to a positive value,
allow no more than
.i N
incoming daemon connections in a one second period.
This is intended to flatten out peaks
and allow the load average checking to cut in.
Defaults to zero (no limits).
.ip ControlSocketName=\fIname\fP
[no short name]
Name of the control socket for daemon management.
A running
.i sendmail
daemon can be controlled through this named socket.
Available commands are:
.i help,
.i restart,
.i shutdown,
and
.i status.
The
.i status
command returns the current number of daemon children,
the maximum number of daemon children,
the free disk space (in blocks) of the queue directory,
and the load average of the machine expressed as an integer.
If not set, no control socket will be available.
Solaris and pre-4.4BSD kernel users should see the note in sendmail/README .
.ip DHParameters
File with DH parameters for STARTTLS.
This is only required if DSA/DH is used.
.ip DaemonPortOptions=\fIoptions\fP
[O]
Set server SMTP options.
Each instance of DaemonPortOptions leads to an additional incoming socket.
The options are
.i key=value
pairs.
Known keys are:
.(b
.ta 1i
Name	User-definable name for the daemon (defaults to "Daemon#")
Port	Name/number of listening port (defaults to "smtp")
Addr	Address mask (defaults INADDR_ANY)
Family	Address family (defaults to INET)
Listen	Size of listen queue (defaults to 10)
Modifier	Options (flags) for the daemon
SndBufSize	Size of TCP send buffer
RcvBufSize	Size of TCP receive buffer
.)b
The
.i Name
field is used for error messages and logging.
The
.i Addr ess
mask may be a numeric address in dot notation
or a network name.
The 
.i Family
key defaults to INET (IPv4).
IPv6 users who wish to also accept IPv6 connections
should add additional Family=inet6 DaemonPortOptions lines.
.i Modifier
can be a sequence (without any delimiters)
of the following characters:
.(b
.ta 1i
a	always require authentication
b	bind to interface through which mail has been received
c	perform hostname canonification (.cf)
f	require fully qualified hostname (.cf)
u	allow unqualified addresses (.cf)
C	don't perform hostname canonification
E	disallow ETRN (see RFC 2476)
.)b
That is, one way to specify a message submission agent (MSA) that
always requires authentication is:
.(b
O DaemonPortOptions=Name=MSA, Port=587, M=Ea
.)b
The modifiers that are marked with "(.cf)" have only
effect in the standard configuration file, in which
they are available via
.b ${daemon_flags} .
The flags ``c'' and ``C'' can change the default for
hostname canonification in the
.i sendmail.cf
file.
See the relevant documentation for
.sm FEATURE(nocanonify) .
The modifier ``f'' disallows addresses of the form
.b user@host
unless they are submitted directly.
The flag ``u'' allows unqualified sender addresses.
``b'' forces sendmail to bind to the interface
through which the e-mail has been
received for the outgoing connection.
.b WARNING:
Use ``b''
only if outgoing mail can be routed through the incoming connection's
interface to its destination. No attempt is made to catch problems due to a
misconfiguration of this parameter, use it only for virtual hosting
where each virtual interface can connect to every possible location.
This will also override possible settings via
.b ClientPortOptions.
Note,
.i sendmail
will listen on a new socket
for each occurence of the DaemonPortOptions option
in a configuration file.
.ip DefaultAuthInfo
[no short name]
Filename that contains default authentication information for outgoing
connections. This file must contain the user id, the authorization id,
the password (plain text), and the realm to use
on separate lines and must be readable by
root (or the trusted user) only.
If no realm is specified,
.b $j 
is used.
.ip DefaultCharSet=\fIcharset\fP
[no short name]
When a message that has 8-bit characters but is not in MIME format
is converted to MIME
(see the EightBitMode option)
a character set must be included in the Content-Type: header.
This character set is normally set from the Charset= field
of the mailer descriptor.
If that is not set, the value of this option is used.
If this option is not set, the value
.q unknown-8bit
is used.
.ip DataFileBufferSize=\fIthreshold\fP
[no short name]
Set the
.i threshold ,
in bytes,
before a memory-based
queue data file
becomes disk-based.
The default is 4096 bytes.
.ip DeadLetterDrop=\fIfile\fP
[no short name]
Defines the location of the system-wide dead.letter file,
formerly hardcoded to /usr/tmp/dead.letter.
If this option is not set (the default),
sendmail will not attempt to save to a system-wide dead.letter file
in the event
it can not bounce the mail to the user or postmaster.
Instead, it will rename the qf file
as it has in the past
when the dead.letter file could not be opened.
.ip DefaultUser=\fIuser:group\fP
[u]
Set the default userid for mailers to
.i user:group .
If
.i group
is omitted and
.i user
is a user name
(as opposed to a numeric user id)
the default group listed in the /etc/passwd file for that user is used
as the default group.
Both
.i user
and
.i group
may be numeric.
Mailers without the
.i S
flag in the mailer definition
will run as this user.
Defaults to 1:1.
The value can also be given as a symbolic user name.\**
.(f
\**The old
.b g
option has been combined into the
.b DefaultUser
option.
.)f
.ip DeliveryMode=\fIx\fP
[d]
Deliver in mode
.i x .
Legal modes are:
.(b
.ta 4n
i	Deliver interactively (synchronously)
b	Deliver in background (asynchronously)
q	Just queue the message (deliver during queue run)
d	Defer delivery and all map lookups (deliver during queue run)
.)b
Defaults to ``b'' if no option is specified,
``i'' if it is specified but given no argument
(i.e., ``Od'' is equivalent to ``Odi'').
The
.b \-v
command line flag sets this to
.b i .
.ip DialDelay=\fIsleeptime\fP
[no short name]
Dial-on-demand network connections can see timeouts
if a connection is opened before the call is set up.
If this is set to an interval and a connection times out
on the first connection being attempted
.i sendmail
will sleep for this amount of time and try again.
This should give your system time to establish the connection
to your service provider.
Units default to seconds, so
.q DialDelay=5
uses a five second delay.
Defaults to zero
(no retry).
.ip DontBlameSendmail=\fIoption,option,...\fP
[no short name]
In order to avoid possible cracking attempts
caused by world- and group-writable files and directories,
.i sendmail
does paranoid checking when opening most of its support files.
If for some reason you absolutely must run with,
for example,
a group-writable
.i /etc
directory,
then you will have to turn off this checking
(at the cost of making your system more vulnerable to attack).
The arguments are individual options that turn off checking:
.(b
Safe
AssumeSafeChown
ClassFileInUnsafeDirPath
DontWarnForwardFileInUnsafeDirPath
ErrorHeaderInUnsafeDirPath
FileDeliveryToHardLink
FileDeliveryToSymLink
ForwardFileInUnsafeDirPath
ForwardFileInUnsafeDirPathSafe
ForwardFileIngroupWritableDirPath
GroupWritableAliasFile
GroupWritableDirPathSafe
GroupWritableForwardFileSafe
GroupWritableIncludeFileSafe
HelpFileinUnsafeDirPath
IncludeFileInUnsafeDirPath
IncludeFileInUnsafeDirPathSafe
IncludeFileIngroupWritableDirPath
InsufficientEntropy
LinkedAliasFileInWritableDir
LinkedClassFileInWritableDir
LinkedForwardFileInWritableDir
LinkedIncludeFileInWritableDir
LinkedMapInWritableDir
LinkedServiceSwitchFileInWritableDir
MapInUnsafeDirPath
NonRootSafeAddr
RunProgramInUnsafeDirPath
RunWritableProgram
TrustStickyBit
WorldWritableAliasFile
WriteMapToHardLink
WriteMapToSymLink
WriteStatsToHardLink
WriteStatsToSymLink
.)b
.b Safe
is the default.
The details of these flags are described above.
.\"XXX should have more here!!!  XXX
.b "Use of this option is not recommended."
.ip DontExpandCnames
[no short name]
The standards say that all host addresses used in a mail message
must be fully canonical.
For example, if your host is named
.q Cruft.Foo.ORG
and also has an alias of
.q FTP.Foo.ORG ,
the former name must be used at all times.
This is enforced during host name canonification
($[ ... $] lookups).
If this option is set, the protocols are ignored and the
.q wrong
thing is done.
However, the IETF is moving toward changing this standard,
so the behavior may become acceptable.
Please note that hosts downstream may still rewrite the address
to be the true canonical name however.
.ip DontInitGroups
[no short name]
If set,
.i sendmail
will avoid using the initgroups(3) call.
If you are running NIS,
this causes a sequential scan of the groups.byname map,
which can cause your NIS server to be badly overloaded in a large domain.
The cost of this is that the only group found for users
will be their primary group (the one in the password file),
which will make file access permissions somewhat more restrictive.
Has no effect on systems that don't have group lists.
.ip DontProbeInterfaces
[no short name]
.i Sendmail
normally finds the names of all interfaces active on your machine
when it starts up
and adds their name to the
.b $=w
class of known host aliases.
If you have a large number of virtual interfaces
or if your DNS inverse lookups are slow
this can be time consuming.
This option turns off that probing.
However, you will need to be certain to include all variant names
in the
.b $=w
class by some other mechanism.
.ip DontPruneRoutes
[R]
Normally,
.i sendmail
tries to eliminate any unnecessary explicit routes
when sending an error message
(as discussed in RFC 1123 \(sc 5.2.6).
For example,
when sending an error message to
.(b
<@known1,@known2,@known3:user@unknown>
.)b
.i sendmail
will strip off the
.q @known1,@known2
in order to make the route as direct as possible.
However, if the
.b R
option is set, this will be disabled,
and the mail will be sent to the first address in the route,
even if later addresses are known.
This may be useful if you are caught behind a firewall.
.ip DoubleBounceAddress=\fIerror-address\fP
[no short name]
If an error occurs when sending an error message,
send the error report
(termed a
.q "double bounce"
because it is an error
.q bounce
that occurs when trying to send another error
.q bounce )
to the indicated address.
The address is macro expanded
at the time of delivery.
If not set, defaults to
.q postmaster .
.ip EightBitMode=\fIaction\fP
[8]
Set handling of eight-bit data.
There are two kinds of eight-bit data:
that declared as such using the
.b BODY=8BITMIME
ESMTP declaration or the
.b \-B8BITMIME
command line flag,
and undeclared 8-bit data, that is,
input that just happens to be eight bits.
There are three basic operations that can happen:
undeclared 8-bit data can be automatically converted to 8BITMIME,
undeclared 8-bit data can be passed as-is without conversion to MIME
(``just send 8''),
and declared 8-bit data can be converted to 7-bits
for transmission to a non-8BITMIME mailer.
The possible
.i action s
are:
.(b
.\"  r	Reject undeclared 8-bit data;
.\"	don't convert 8BITMIME\(->7BIT (``reject'')
  s	Reject undeclared 8-bit data (``strict'')
.\"	do convert 8BITMIME\(->7BIT (``strict'')
.\"  c	Convert undeclared 8-bit data to MIME;
.\"	don't convert 8BITMIME\(->7BIT (``convert'')
  m	Convert undeclared 8-bit data to MIME (``mime'')
.\"	do convert 8BITMIME\(->7BIT (``mime'')
.\"  j	Pass undeclared 8-bit data;
.\"	don't convert 8BITMIME\(->7BIT (``just send 8'')
  p	Pass undeclared 8-bit data (``pass'')
.\"	do convert 8BITMIME\(->7BIT (``pass'')
.\"  a	Adaptive algorithm: see below
.)b
.\"The adaptive algorithm is to accept 8-bit data,
.\"converting it to 8BITMIME only if the receiver understands that,
.\"otherwise just passing it as undeclared 8-bit data;
.\"8BITMIME\(->7BIT conversions are done.
In all cases properly declared 8BITMIME data will be converted to 7BIT
as needed.
.ip ErrorHeader=\fIfile-or-message\fP
[E]
Prepend error messages with the indicated message.
If it begins with a slash,
it is assumed to be the pathname of a file
containing a message (this is the recommended setting).
Otherwise, it is a literal message.
The error file might contain the name, email address, and/or phone number
of a local postmaster who could provide assistance
to end users.
If the option is missing or null,
or if it names a file which does not exist or which is not readable,
no message is printed.
.ip ErrorMode=\fIx\fP
[e]
Dispose of errors using mode
.i x .
The values for
.i x
are:
.(b
p	Print error messages (default)
q	No messages, just give exit status
m	Mail back errors
w	Write back errors (mail if user not logged in)
e	Mail back errors and give zero exit stat always
.)b
.ip FallbackMXhost=\fIfallbackhost\fP
[V]
If specified, the
.i fallbackhost
acts like a very low priority MX
on every host.
This is intended to be used by sites with poor network connectivity.
Messages which are undeliverable due to temporary address failures
(e.g., DNS failure)
also go to the FallBackMX host.
.ip ForkEachJob
[Y]
If set,
deliver each job that is run from the queue in a separate process.
Use this option if you are short of memory,
since the default tends to consume considerable amounts of memory
while the queue is being processed.
.ip ForwardPath=\fIpath\fP
[J]
Set the path for searching for users' .forward files.
The default is
.q $z/.forward .
Some sites that use the automounter may prefer to change this to
.q /var/forward/$u
to search a file with the same name as the user in a system directory.
It can also be set to a sequence of paths separated by colons;
.i sendmail
stops at the first file it can successfully and safely open.
For example,
.q /var/forward/$u:$z/.forward
will search first in /var/forward/\c
.i username
and then in
.i ~username /.forward
(but only if the first file does not exist).
.ip HelpFile=\fIfile\fP
[H]
Specify the help file
for SMTP.
If no file name is specified, "helpfile" is used.
.ip HoldExpensive
[c]
If an outgoing mailer is marked as being expensive,
don't connect immediately.
This requires that queueing be compiled in,
since it will depend on a queue run process to
actually send the mail.
.ip HostsFile=\fIpath\fP
[no short name]
The path to the hosts database,
normally
.q /etc/hosts .
This option is only consulted when sendmail
is canonifying addresses,
and then only when
.q files
is in the
.q hosts
service switch entry.
In particular, this file is
.i never
used when looking up host addresses;
that is under the control of the system
.i gethostbyname (3)
routine.
.ip HostStatusDirectory=\fIpath\fP
[no short name]
The location of the long term host status information.
When set,
information about the status of hosts
(e.g., host down or not accepting connections)
will be shared between all
.i sendmail
processes;
normally, this information is only held within a single queue run.
This option requires a connection cache of at least 1 to function.
If the option begins with a leading `/',
it is an absolute pathname;
otherwise,
it is relative to the mail queue directory.
A suggested value for sites desiring persistent host status is
.q \&.hoststat
(i.e., a subdirectory of the queue directory).
.ip IgnoreDots
[i]
Ignore dots in incoming messages.
This is always disabled (that is, dots are always accepted)
when reading SMTP mail.
.ip LDAPDefaultSpec=\fIspec\fP
[no short name]
Sets a default map specification for LDAP maps.
The value should only contain LDAP specific settings
such as
.q "-h host -p port -d bindDN" .
The settings will be used for all LDAP maps
unless the individual map specification overrides a setting.
This option should be set before any LDAP maps are defined.
.ip LogLevel=\fIn\fP
[L]
Set the log level to
.i n .
Defaults to 9.
.ip M\fIx\|value\fP
[no long version]
Set the macro
.i x
to
.i value .
This is intended only for use from the command line.
The
.b \-M
flag is preferred.
.ip MatchGECOS
[G]
Allow fuzzy matching on the GECOS field.
If this flag is set,
and the usual user name lookups fail
(that is, there is no alias with this name and a
.i getpwnam
fails),
sequentially search the password file
for a matching entry in the GECOS field.
This also requires that MATCHGECOS
be turned on during compilation.
This option is not recommended.
.ip MaxAliasRecursion=\fIN\fP
[no short name]
The maximum depth of alias recursion (default: 10).
.ip MaxDaemonChildren=\fIN\fP
[no short name]
If set,
.i sendmail
will refuse connections when it has more than
.i N
children processing incoming mail or automatic queue runs.
This does not limit the number of outgoing connections.
If not set, there is no limit to the number of children --
that is, the system load averaging controls this.
.ip MaxHeadersLength=\fIN\fP
[no short name]
The maximum length of the sum of all headers.
This can be used to prevent a denial of service attack.
The default is no limit.
.ip MaxHopCount=\fIN\fP
[h]
The maximum hop count.
Messages that have been processed more than
.i N
times are assumed to be in a loop and are rejected.
Defaults to 25.
.ip MaxMessageSize=\fIN\fP
[no short name]
Specify the maximum message size
to be advertised in the ESMTP EHLO response.
Messages larger than this will be rejected.
.ip MaxMimeHeaderLength=\fIN[/M]\fP
[no short name]
Sets the maximum length of certain MIME header field values
to
.i N
characters.
For some of these headers which take parameters,
the maximum length of each parameter is set to
.i M
if specified.  If
.i /M
is not specified, one half of
.i N
will be used.
By default,
these values are 0, meaning no checks are done.
.ip MaxQueueRunSize=\fIN\fP
[no short name]
The maximum number of jobs that will be processed
in a single queue run.
If not set, there is no limit on the size.
If you have very large queues or a very short queue run interval
this could be unstable.
However, since the first
.i N
jobs in queue directory order are run (rather than the
.i N
highest priority jobs)
this should be set as high as possible to avoid
.q losing
jobs that happen to fall late in the queue directory.
.ip MaxRecipientsPerMessage=\fIN\fP
[no short name]
The maximum number of recipients that will be accepted per message
in an SMTP transaction.
Note: setting this too low can interfere with sending mail from
MUAs that use SMTP for initial submission.
If not set, there is no limit on the number of recipients per envelope.
.ip MeToo
[m]
Send to me too,
even if I am in an alias expansion.
This option is deprecated
and will be removed from a future version.
.ip MinFreeBlocks=\fIN\fP
[b]
Insist on at least
.i N
blocks free on the filesystem that holds the queue files
before accepting email via SMTP.
If there is insufficient space
.i sendmail
gives a 452 response
to the MAIL command.
This invites the sender to try again later.
.ip MinQueueAge=\fIage\fP
[no short name]
Don't process any queued jobs
that have been in the queue less than the indicated time interval.
This is intended to allow you to get responsiveness
by processing the queue fairly frequently
without thrashing your system by trying jobs too often.
The default units are minutes.
.ip MustQuoteChars=\fIs\fP
[no short name]
Sets the list of characters that must be quoted if used in a full name
that is in the phrase part of a ``phrase <address>'' syntax.
The default is ``\'.''.
The characters ``@,;:\e()[]'' are always added to this list.
.ip NoRecipientAction
[no short name]
The action to take when you receive a message that has no valid
recipient headers (To:, Cc:, Bcc:, or Apparently-To: \(em
the last included for back compatibility with old
.i sendmail s).
It can be
.b None
to pass the message on unmodified,
which violates the protocol,
.b Add-To
to add a To: header with any recipients it can find in the envelope
(which might expose Bcc: recipients),
.b Add-Apparently-To
to add an Apparently-To: header
(this is only for back-compatibility
and is officially deprecated),
.b Add-To-Undisclosed
to add a header
.q "To: undisclosed-recipients:;"
to make the header legal without disclosing anything,
or
.b Add-Bcc
to add an empty Bcc: header.
.ip OldStyleHeaders
[o]
Assume that the headers may be in old format,
i.e.,
spaces delimit names.
This actually turns on
an adaptive algorithm:
if any recipient address contains a comma, parenthesis,
or angle bracket,
it will be assumed that commas already exist.
If this flag is not on,
only commas delimit names.
Headers are always output with commas between the names.
Defaults to off.
.ip OperatorChars=\fIcharlist\fP
[$o macro]
The list of characters that are considered to be
.q operators ,
that is, characters that delimit tokens.
All operator characters are tokens by themselves;
sequences of non-operator characters are also tokens.
White space characters separate tokens
but are not tokens themselves \(em for example,
.q AAA.BBB
has three tokens, but
.q "AAA BBB"
has two.
If not set, OperatorChars defaults to
.q \&.\|:\|@\|[\|] ;
additionally, the characters
.q (\|)\|<\|>\|,\|;
are always operators.
Note that OperatorChars must be set in the
configuration file before any rulesets.
.ip PidFile=\fIfilename\fP
[no short name]
Filename of the pid file.
(default is _PATH_SENDMAILPID).
The
.i filename
is macro-expanded before it is opened.
.ip PostmasterCopy=\fIpostmaster\fP
[P]
If set,
copies of error messages will be sent to the named
.i postmaster .
Only the header of the failed message is sent.
Errors resulting from messages with a negative precedence will not be sent.
Since most errors are user problems,
this is probably not a good idea on large sites,
and arguably contains all sorts of privacy violations,
but it seems to be popular with certain operating systems vendors.
The address is macro expanded
at the time of delivery.
Defaults to no postmaster copies.
.ip PrivacyOptions=\fI\|opt,opt,...\fP
[p]
Set the privacy
.i opt ions.
``Privacy'' is really a misnomer;
many of these are just a way of insisting on stricter adherence
to the SMTP protocol.
The
.i opt ions
can be selected from:
.(b
.ta \w'needvrfyhelo'u+3n
public	Allow open access
needmailhelo	Insist on HELO or EHLO command before MAIL
needexpnhelo	Insist on HELO or EHLO command before EXPN
noexpn	Disallow EXPN entirely, implies noverb.
needvrfyhelo	Insist on HELO or EHLO command before VRFY
novrfy	Disallow VRFY entirely
noetrn	Disallow ETRN entirely
noverb	Disallow VERB entirely
restrictmailq	Restrict mailq command
restrictqrun	Restrict \-q command line flag
noreceipts	Don't return success DSNs\**
nobodyreturn	Don't return the body of a message with DSNs
goaway	Disallow essentially all SMTP status queries
authwarnings	Put X-Authentication-Warning: headers in messages
		and log warnings
.)b
.(f
\**N.B.:
the
.b noreceipts
flag turns off support for RFC 1891
(Delivery Status Notification).
.)f
The
.q goaway
pseudo-flag sets all flags except
.q noreceipts ,
.q restrictmailq ,
.q restrictqrun ,
.q noetrn ,
and
.q nobodyreturn .
If mailq is restricted,
only people in the same group as the queue directory
can print the queue.
If queue runs are restricted,
only root and the owner of the queue directory
can run the queue.
Authentication Warnings add warnings about various conditions
that may indicate attempts to spoof the mail system,
such as using an non-standard queue directory.
.ip ProcessTitlePrefix=\fIstring\fP
[no short name]
Prefix the process title shown on 'ps' listings with
.i string .
The
.i string
will be macro processed.
.ip QueueDirectory=\fIdir\fP
[Q]
Use the named
.i dir
as the queue directory.
To use multiple queues, supply a value ending with an asterisk.
For example,
.i /var/spool/mqueue/q*
will use all of the directories or symbolic links to directories
beginning with
.i q
in
.i /var/spool/mqueue
as queue directories.
Do not change the queue directory structure
while sendmail is running.
.ip QueueFactor=\fIfactor\fP
[q]
Use
.i factor
as the multiplier in the map function
to decide when to just queue up jobs rather than run them.
This value is divided by the difference between the current load average
and the load average limit
(\c
.b QueueLA
option)
to determine the maximum message priority
that will be sent.
Defaults to 600000.
.ip QueueLA=\fILA\fP
[x]
When the system load average exceeds
.i LA ,
just queue messages
(i.e., don't try to send them).
Defaults to 8 multiplied by
the number of processors online on the system
(if that can be determined).
.ip QueueSortOrder=\fIalgorithm\fP
[no short name]
Sets the
.i algorithm
used for sorting the queue.
Only the first character of the value is used.
Legal values are
.q host
(to order by the name of the first host name of the first recipient),
.q filename
(to order by the name of the queue file name),
.q time
(to order by the submission time),
and
.q priority
(to order by message priority).
Host ordering makes better use of the connection cache,
but may tend to process low priority messages
that go to a single host
over high priority messages that go to several hosts;
it probably shouldn't be used on slow network links.
Filename ordering saves the overhead of
reading all of the queued items
before starting the queue run.
Time ordering is almost always a bad idea,
since it allows large, bulk mail to go out
before smaller, personal mail,
but may have applicability on some hosts with very fast connections.
Priority ordering is the default.
.ip QueueTimeout=\fItimeout\fP
[T]
A synonym for
.q Timeout.queuereturn .
Use that form instead of the
.q QueueTimeout
form.
.ip RandFile
[no short name]
Name of file containing random data or the name of the UNIX socket
if EGD is used.
A (required) prefix "egd:" or "file:" specifies the type.
STARTTLS requires this filename if the compile flag HASURANDOMDEV is not set
(see sendmail/README).
.ip ResolverOptions=\fIoptions\fP
[I]
Set resolver options.
Values can be set using
.b + \c
.i flag
and cleared using
.b \- \c
.i flag ;
the
.i flag s
can be
.q debug ,
.q aaonly ,
.q usevc ,
.q primary ,
.q igntc ,
.q recurse ,
.q defnames ,
.q stayopen ,
or
.q dnsrch .
The string
.q HasWildcardMX
(without a
.b +
or
.b \- )
can be specified to turn off matching against MX records
when doing name canonifications.
.b N.B.
Prior to 8.7,
this option indicated that the name server be responding
in order to accept addresses.
This has been replaced by checking to see
if the
.q dns
method is listed in the service switch entry for the
.q hosts
service.
.ip RrtImpliesDsn
[R]
If this option is set, a
.q Return-Receipt-To:
header causes the request of a DSN, which is sent to
the envelope sender as required by RFC1891,
not to the address given in the header.
.ip RunAsUser=\fIuser\fP
[no short name]
The
.i user
parameter may be a user name
(looked up in
.i /etc/passwd )
or a numeric user id;
either form can have
.q ":group"
attached
(where group can be numeric or symbolic).
If set to a non-zero (non-root) value,
.i sendmail
will change to this user id shortly after startup\**.
.(f
\**When running as a daemon,
it changes to this user after accepting a connection
but before reading any
.sm SMTP
commands.
.)f
This avoids a certain class of security problems.
However, this means that all
.q \&.forward
and
.q :include:
files must be readable by the indicated
.i user 
and all files to be written must be writable by
.i user
Also, all file and program deliveries will be marked unsafe
unless the option
.b DontBlameSendmail=NonRootSafeAddr
is set,
in which case the delivery will be done as
.i user .
It is also incompatible with the
.b SafeFileEnvironment
option.
In other words, it may not actually add much to security on an average system,
and may in fact detract from security
(because other file permissions must be loosened).
However, it should be useful on firewalls and other
places where users don't have accounts and the aliases file is
well constrained.
.ip RecipientFactor=\fIfact\fP
[y]
The indicated
.i fact or
is added to the priority (thus
.i lowering
the priority of the job)
for each recipient,
i.e., this value penalizes jobs with large numbers of recipients.
Defaults to 30000.
.ip RefuseLA=\fILA\fP
[X]
When the system load average exceeds
.i LA ,
refuse incoming SMTP connections.
Defaults to 12 multiplied by
the number of processors online on the system
(if that can be determined).
.ip RetryFactor=\fIfact\fP
[Z]
The
.i fact or
is added to the priority
every time a job is processed.
Thus,
each time a job is processed,
its priority will be decreased by the indicated value.
In most environments this should be positive,
since hosts that are down are all too often down for a long time.
Defaults to 90000.
.ip SafeFileEnvironment=\fIdir\fP
[no short name]
If this option is set,
.i sendmail
will do a
.i chroot (2)
call into the indicated
.i dir ectory
before doing any file writes.
If the file name specified by the user begins with
.i dir ,
that partial path name will be stripped off before writing,
so (for example)
if the SafeFileEnvironment variable is set to
.q /safe
then aliases of
.q /safe/logs/file
and
.q /logs/file
actually indicate the same file.
Additionally, if this option is set,
.i sendmail
refuses to deliver to symbolic links.
.ip SaveFromLine
[f]
Save
UNIX-style
.q From
lines at the front of headers.
Normally they are assumed redundant
and discarded.
.ip SendMimeErrors
[j]
If set, send error messages in MIME format
(see RFC2045 and RFC1344 for details).
If disabled,
.i sendmail
will not return the DSN keyword in response to an EHLO
and will not do Delivery Status Notification processing as described in
RFC1891.
.ip ServerCertFile
[no short name]
File containing the certificate of the server, i.e., this certificate
is used when sendmail acts as server.
.ip ServerKeyFile
[no short name]
File containing the private key belonging to the server certificate.
.ip ServiceSwitchFile=\fIfilename\fP
[no short name]
If your host operating system has a service switch abstraction
(e.g., /etc/nsswitch.conf on Solaris
or /etc/svc.conf on Ultrix and DEC OSF/1)
that service will be consulted and this option is ignored.
Otherwise, this is the name of a file
that provides the list of methods used to implement particular services.
The syntax is a series of lines,
each of which is a sequence of words.
The first word is the service name,
and following words are service types.
The services that
.i sendmail
consults directly are
.q aliases
and
.q hosts.
Service types can be
.q dns ,
.q nis ,
.q nisplus ,
or
.q files
(with the caveat that the appropriate support
must be compiled in
before the service can be referenced).
If ServiceSwitchFile is not specified, it defaults to
/etc/mail/service.switch.
If that file does not exist, the default switch is:
.(b
aliases	files
hosts	dns nis files
.)b
The default file is
.q /etc/mail/service.switch .
.ip SevenBitInput
[7]
Strip input to seven bits for compatibility with old systems.
This shouldn't be necessary.
.ip SingleLineFromHeader
[no short name]
If set, From: lines that have embedded newlines are unwrapped
onto one line.
This is to get around a botch in Lotus Notes
that apparently cannot understand legally wrapped RFC822 headers.
.ip SingleThreadDelivery
[no short name]
If set, a client machine will never try to open two SMTP connections
to a single server machine at the same time,
even in different processes.
That is, if another
.i sendmail
is already talking to some host a new
.i sendmail
will not open another connection.
This property is of mixed value;
although this reduces the load on the other machine,
it can cause mail to be delayed
(for example, if one
.i sendmail
is delivering a huge message, other
.i sendmail s
won't be able to send even small messages).
Also, it requires another file descriptor
(for the lock file)
per connection, so you may have to reduce the
.b ConnectionCacheSize
option to avoid running out of per-process file descriptors.
Requires the
.b HostStatusDirectory
option.
.ip SmtpGreetingMessage=\fImessage\fP
[$e macro]
The message printed when the SMTP server starts up.
Defaults to
.q "$j Sendmail $v ready at $b".
.ip StatusFile=\fIfile\fP
[S]
Log summary statistics in the named
.i file .
If no file name is specified, "statistics" is used.
If not set,
no summary statistics are saved.
This file does not grow in size.
It can be printed using the
.i mailstats (8)
program.
.ip SuperSafe
[s]
Be super-safe when running things,
i.e.,
always instantiate the queue file,
even if you are going to attempt immediate delivery.
.i Sendmail
always instantiates the queue file
before returning control to the client
under any circumstances.
This should really
.i always
be set.
.ip TempFileMode=\fImode\fP
[F]
The file mode for queue files.
It is interpreted in octal by default.
Defaults to 0600.
.ip Timeout.\fItype\fP=\|\fItimeout\fP
[r; subsumes old T option as well]
Set timeout values.
For more information,
see section
.\" XREF
4.1.
.ip TimeZoneSpec=\fItzinfo\fP
[t]
Set the local time zone info to
.i tzinfo
\*- for example,
.q PST8PDT .
Actually, if this is not set,
the TZ environment variable is cleared (so the system default is used);
if set but null, the user's TZ variable is used,
and if set and non-null the TZ variable is set to this value.
.ip TrustedUser=\fIuser\fP
[no short name]
The
.i user
parameter may be a user name
(looked up in
.i /etc/passwd )
or a numeric user id.
Trusted user for file ownership and starting the daemon.  If set, generated
alias databases and the control socket (if configured) will automatically
be owned by this user.
.ip TryNullMXList
[w]
If this system is the
.q best
(that is, lowest preference)
MX for a given host,
its configuration rules should normally detect this situation
and treat that condition specially
by forwarding the mail to a UUCP feed,
treating it as local,
or whatever.
However, in some cases (such as Internet firewalls)
you may want to try to connect directly to that host
as though it had no MX records at all.
Setting this option causes
.i sendmail
to try this.
The downside is that errors in your configuration
are likely to be diagnosed as
.q "host unknown"
or
.q "message timed out"
instead of something more meaningful.
This option is disrecommended.
.ip UnixFromLine=\fIfromline\fP
[$l macro]
Defines the format used when
.i sendmail
must add a UNIX-style From_ line
(that is, a line beginning
.q From<space>user ).
Defaults to
.q "From $g  $d" .
Don't change this unless your system uses a different UNIX mailbox format
(very unlikely).
.ip UnsafeGroupWrites
[no short name]
If set,
:include: and .forward files that are group writable are considered
.q unsafe ,
that is,
they cannot reference programs or write directly to files.
World writable :include: and .forward files
are always unsafe..
.ip UseErrorsTo
[l]
If there is an
.q Errors-To:
header, send error messages to the addresses listed there.
They normally go to the envelope sender.
Use of this option causes
.i sendmail
to violate RFC 1123.
This option is disrecommended and deprecated.
.ip UserDatabaseSpec=\fIudbspec\fP
[U]
The user database specification.
.ip Verbose
[v]
Run in verbose mode.
If this is set,
.i sendmail
adjusts options
.b HoldExpensive
(old
.b c )
and
.b DeliveryMode
(old
.b d )
so that all mail is delivered completely
in a single job
so that you can see the entire delivery process.
Option
.b Verbose
should
.i never
be set in the configuration file;
it is intended for command line use only.
.ip XscriptFileBufferSize=\fIthreshold\fP
[no short name]
Set the
.i threshold ,
in bytes,
before a memory-based
queue transcript file
becomes disk-based.
The default is 4096 bytes.
.lp
All options can be specified on the command line using the
\-O or \-o flag,
but most will cause
.i sendmail
to relinquish its setuid permissions.
The options that will not cause this are
SevenBitInput [7],
EightBitMode [8], 
MinFreeBlocks [b],
CheckpointInterval [C],
DeliveryMode [d],
ErrorMode [e],
IgnoreDots [i],
SendMimeErrors [j],
LogLevel [L],
MeToo [m],
OldStyleHeaders [o],
PrivacyOptions [p],
SuperSafe [s],
Verbose [v],
QueueSortOrder,
MinQueueAge,
DefaultCharSet,
Dial Delay,
NoRecipientAction,
ColonOkInAddr,
MaxQueueRunSize,
SingleLineFromHeader,
and
AllowBogusHELO.
Actually, PrivacyOptions [p] given on the command line
are added to those already specified in the
.i sendmail.cf
file, i.e., they can't be reset.
Also, M (define macro) when defining the r or s macros
is also considered
.q safe .
.sh 2 "P \*- Precedence Definitions"
.pp
Values for the
.q "Precedence:"
field may be defined using the
.b P
control line.
The syntax of this field is:
.(b
\fBP\fP\fIname\fP\fB=\fP\fInum\fP
.)b
When the
.i name
is found in a
.q Precedence:
field,
the message class is set to
.i num .
Higher numbers mean higher precedence.
Numbers less than zero
have the special property
that if an error occurs during processing
the body of the message will not be returned;
this is expected to be used for
.q "bulk"
mail such as through mailing lists.
The default precedence is zero.
For example,
our list of precedences is:
.(b
Pfirst-class=0
Pspecial-delivery=100
Plist=\-30
Pbulk=\-60
Pjunk=\-100
.)b
People writing mailing list exploders
are encouraged to use
.q "Precedence: list" .
Older versions of
.i sendmail
(which discarded all error returns for negative precedences)
didn't recognize this name, giving it a default precedence of zero.
This allows list maintainers to see error returns
on both old and new versions of
.i sendmail .
.sh 2 "V \*- Configuration Version Level"
.pp
To provide compatibility with old configuration files,
the
.b V
line has been added to define some very basic semantics
of the configuration file.
These are not intended to be long term supports;
rather, they describe compatibility features
which will probably be removed in future releases.
.pp
.b N.B.:
these version
.i levels
have nothing
to do with the version
.i number
on the files.
For example,
as of this writing
version 8 config files
(specifically, 8.10)
used version level 9 configurations.
.pp
.q Old
configuration files are defined as version level one.
Version level two files make the following changes:
.np
Host name canonification ($[ ... $])
appends a dot if the name is recognized;
this gives the config file a way of finding out if anything matched.
(Actually, this just initializes the
.q host
map with the
.q \-a.
flag \*- you can reset it to anything you prefer
by declaring the map explicitly.)
.np
Default host name extension is consistent throughout processing;
version level one configurations turned off domain extension
(that is, adding the local domain name)
during certain points in processing.
Version level two configurations are expected to include a trailing dot
to indicate that the name is already canonical.
.np
Local names that are not aliases
are passed through a new distinguished ruleset five;
this can be used to append a local relay.
This behavior can be prevented by resolving the local name
with an initial `@'.
That is, something that resolves to a local mailer and a user name of
.q vikki
will be passed through ruleset five,
but a user name of
.q @vikki
will have the `@' stripped,
will not be passed through ruleset five,
but will otherwise be treated the same as the prior example.
The expectation is that this might be used to implement a policy
where mail sent to
.q vikki
was handled by a central hub,
but mail sent to
.q vikki@localhost
was delivered directly.
.pp
Version level three files
allow # initiated comments on all lines.
Exceptions are backslash escaped # marks
and the $# syntax.
.pp
Version level four configurations
are completely equivalent to level three
for historical reasons.
.pp
Version level five configuration files
change the default definition of
.b $w
to be just the first component of the hostname.
.pp
Version level six configuration files
change many of the local processing options
(such as aliasing and matching the beginning of the address for
`|' characters)
to be mailer flags;
this allows fine-grained control over the special local processing.
Level six configuration files may also use long option names.
The
.b ColonOkInAddr
option (to allow colons in the local-part of addresses)
defaults
.b on
for lower numbered configuration files;
the configuration file requires some additional intelligence
to properly handle the RFC 822 group construct.
.pp
Version level seven configuration files
used new option names to replace old macros
(\c
.b $e
became
.b SmtpGreetingMessage ,
.b $l
became
.b UnixFromLine ,
and
.b $o
became
.b OperatorChars .
Also, prior to version seven,
the
.b F=q
flag (use 250 instead of 252 return value for
.sm "SMTP VRFY"
commands)
was assumed.
.pp
Version level eight configuration files allow
.b $#
on the left hand side of ruleset lines.
.pp
Version level nine configuration files allow
parentheses in rulesets, i.e. they are not treated
as comments and hence removed.
.pp
The
.b V
line may have an optional
.b / \c
.i vendor
to indicate that this configuration file uses modifications
specific to a particular vendor\**.
.(f
\**And of course, vendors are encouraged to add themselves
to the list of recognized vendors by editing the routine
.i setvendor
in
.i conf.c .
Please send e-mail to sendmail@Sendmail.ORG
to register your vendor dialect.
.)f
You may use
.q /Berkeley
to emphasize that this configuration file
uses the Berkeley dialect of
.i sendmail .
.sh 2 "K \*- Key File Declaration"
.pp
Special maps can be defined using the line:
.(b
Kmapname mapclass arguments
.)b
The
.i mapname
is the handle by which this map is referenced in the rewriting rules.
The
.i mapclass
is the name of a type of map;
these are compiled in to
.i sendmail .
The
.i arguments
are interpreted depending on the class;
typically,
there would be a single argument naming the file containing the map.
.pp
Maps are referenced using the syntax:
.(b
$( \fImap\fP \fIkey\fP $@ \fIarguments\fP $: \fIdefault\fP $)
.)b
where either or both of the
.i arguments
or
.i default
portion may be omitted.
The
.i "$@ arguments"
may appear more than once.
The indicated
.i key
and
.i arguments
are passed to the appropriate mapping function.
If it returns a value, it replaces the input.
If it does not return a value and the
.i default
is specified, the
.i default
replaces the input.
Otherwise, the input is unchanged.
.pp
The
.i arguments
are passed to the map for arbitrary use.
Most map classes can interpolate these arguments
into their values using the syntax
.q %\fIn\fP
(where
.i n
is a digit)
to indicate the corresponding
.i argument .
Argument
.q %0
indicates the database key.
For example, the rule
.(b
.ta 1.5i
R$\- ! $+	$: $(uucp $1 $@ $2 $: %1 @ %0 . UUCP $)
.)b
Looks up the UUCP name in a (user defined) UUCP map;
if not found it turns it into
.q \&.UUCP
form.
The database might contain records like:
.(b
decvax	%1@%0.DEC.COM
research	%1@%0.ATT.COM
.)b
Note that
.i default
clauses never do this mapping.
.pp
The built in map with both name and class
.q host
is the host name canonicalization lookup.
Thus,
the syntax:
.(b
$(host \fIhostname\fP$)
.)b
is equivalent to:
.(b
$[\fIhostname\fP$]
.)b
.pp
There are many defined classes.
.ip dbm
Database lookups using the ndbm(3) library.
.i Sendmail
must be compiled with
.b NDBM
defined.
.ip btree
Database lookups using the btree interface to the Berkeley DB
library.
.i Sendmail
must be compiled with
.b NEWDB
defined.
.ip hash
Database lookups using the hash interface to the Berkeley DB
library.
.i Sendmail
must be compiled with
.b NEWDB
defined.
.ip nis
NIS lookups.
.i Sendmail
must be compiled with
.b NIS
defined.
.ip nisplus
NIS+ lookups.
.i Sendmail
must be compiled with
.b NISPLUS
defined.
The argument is the name of the table to use for lookups,
and the
.b \-k
and
.b \-v
flags may be used to set the key and value columns respectively.
.ip hesiod
Hesiod lookups.
.i Sendmail
must be compiled with
.b HESIOD
defined.
.ip ldap
LDAP X500 directory lookups.
.i Sendmail
must be compiled with
.b LDAPMAP
defined.
The map supports most of the standard arguments
and most of the command line arguments of the
.i ldapsearch
program.
Note that,
by default,
if a single query matches multiple values,
only the first value will be returned
unless the 
.b \-z
(value separator)
map flag is set.
Also, the
.b \-1
map flag will treat a multiple value return
as if there were no matches.
.ip netinfo
NeXT NetInfo lookups.
.i Sendmail
must be compiled with
.b NETINFO
defined.
.ip text
Text file lookups.
The format of the text file is defined by the
.b \-k
(key field number),
.b \-v
(value field number),
and
.b \-z
(field delimiter)
flags.
.ip ph
PH query map.
Contributed and supported by
Mark Roth, roth@uiuc.edu.
For more information,
consult the web site
.q http://www-dev.cso.uiuc.edu/sendmail/ .
.ip nsd
nsd map for IRIX 6.5 and later.
Contributed and supported by Bob Mende of SGI,
mende@sgi.com.
.ip stab
Internal symbol table lookups.
Used internally for aliasing.
.ip implicit
Really should be called
.q alias
\(em this is used to get the default lookups
for alias files,
and is the default if no class is specified for alias files.
.ip user
Looks up users using
.i getpwnam (3).
The
.b \-v
flag can be used to specify the name of the field to return
(although this is normally used only to check the existence
of a user).
.ip host
Canonifies host domain names.
Given a host name it calls the name server
to find the canonical name for that host.
.ip bestmx
Returns the best MX record for a host name given as the key.
The current machine is always preferred \*-
that is, if the current machine is one of the hosts listed as a
lowest-preference MX record, then it will be guaranteed to be returned.
This can be used to find out if this machine is the target for an MX record,
and mail can be accepted on that basis.
If the
.b \-z
flag is given, then all MX names are returned,
separated by the given delimiter.
.ip sequence
The arguments on the `K' line are a list of maps;
the resulting map searches the argument maps in order
until it finds a match for the indicated key.
For example, if the key definition is:
.(b
Kmap1 ...
Kmap2 ...
Kseqmap sequence map1 map2
.)b
then a lookup against
.q seqmap
first does a lookup in map1.
If that is found, it returns immediately.
Otherwise, the same key is used for map2.
.ip syslog
the key is logged via
.i syslogd \|(8).
The lookup returns the empty string.
.ip switch
Much like the
.q sequence
map except that the order of maps is determined by the service switch.
The argument is the name of the service to be looked up;
the values from the service switch are appended to the map name
to create new map names.
For example, consider the key definition:
.(b
Kali switch aliases
.)b
together with the service switch entry:
.(b
aliases	nis files
.)b
This causes a query against the map
.q ali
to search maps named
.q ali.nis
and
.q ali.files
in that order.
.ip dequote
Strip double quotes (") from a name.
It does not strip backslashes,
and will not strip quotes if the resulting string
would contain unscannable syntax
(that is, basic errors like unbalanced angle brackets;
more sophisticated errors such as unknown hosts are not checked).
The intent is for use when trying to accept mail from systems such as
DECnet
that routinely quote odd syntax such as
.(b
"49ers::ubell"
.)b
A typical usage is probably something like:
.(b
Kdequote dequote

\&...

R$\-	$: $(dequote $1 $)
R$\- $+	$: $>3 $1 $2
.)b
Care must be taken to prevent unexpected results;
for example,
.(b
"|someprogram < input > output"
.)b
will have quotes stripped,
but the result is probably not what you had in mind.
Fortunately these cases are rare.
.ip regex
The map definition on the
.b K
line contains a regular expression.
Any key input is compared to that expression using the
POSIX regular expressions routines regcomp(), regerr(), and regexec().
Refer to the documentation for those routines for more information
about the regular expression matching.
No rewriting of the key is done if the
.b \-m
flag is used.  Without it, the key is discarded or if
.b \-s
if used, it is substituted by the substring matches, delimited by
.b $|
or the string specified with the the
.b \-d
flag.  The flags available for the map are
.(b
-n	not
-f	case sensitive
-b	basic regular expressions
	(default is extended)
-s	substring match
-d	set the delimiter used for -s
-a	append string to key
-m	match only, do not
	replace/discard value
-D	perform no lookup in deferred delivery mode.
.)b
The
.b \-s
flag can include an optional parameter which can be used
to select the substrings in the result of the lookup.  For example,
.(b
-s1,3,4
.)b
Notes: to match a
.b $ 
in a string,
\\$$
must be used.
If the pattern contains spaces, they must be replaced
with the blank substitution character, unless it is
space itself.
.ip program
The arguments on the
.b K
line are the pathname to a program and any initial parameters to be passed.
When the map is called,
the key is added to the initial parameters
and the program is invoked
as the default user/group id.
The first line of standard output is returned as the value of the lookup.
This has many potential security problems,
and has terrible performance;
it should be used only when absolutely necessary.
.ip macro
Set or clear a macro value.
To set a macro,
pass the value as the first argument in the map lookup.
To clear a macro,
do not pass an argument in the map lookup.
The map always returns the empty string.
Example of typical usage include:
.(b
Kstorage macro

\&...

# set macro ${MyMacro} to the ruleset match
R$+	$: $(storage {MyMacro} $@ $1 $) $1
# set macro ${MyMacro} to an empty string
R$*	$: $(storage {MyMacro} $@ $) $1		
# clear macro ${MyMacro}
R$\-	$: $(storage {MyMacro} $) $1		
.)b
.ip arith
Perform simple arithmetic operations.
The operation is given as key, currently +, -, *, /,
l (for less than), and = are supported.
The two operands are given as arguments.
The lookup returns the result of the computation,
i.e.
.sm TRUE
or
.sm FALSE
for comparisons, integer values otherwise.
All options which are possible for maps are ignored.
A simple example is:
.(b
Kcomp arith

\&...

Scheck_etrn
R$*	$: $(comp l $@ $&{load_avg} $@ 7 $) $1
RFALSE	$# error \&...
.)b
.pp
Most of these accept as arguments the same optional flags
and a filename
(or a mapname for NIS;
the filename is the root of the database path,
so that
.q .db
or some other extension appropriate for the database type
will be added to get the actual database name).
Known flags are:
.ip "\-o"
Indicates that this map is optional \*- that is,
if it cannot be opened,
no error is produced,
and
.i sendmail
will behave as if the map existed but was empty.
.ip "\-N, \-O"
If neither
.b \-N
or
.b \-O
are specified,
.i sendmail
uses an adaptive algorithm to decide whether or not to look for null bytes
on the end of keys.
It starts by trying both;
if it finds any key with a null byte it never tries again without a null byte
and vice versa.
If
.b \-N
is specified it never tries without a null byte and
if
.b \-O
is specified it never tries with a null byte.
Setting one of
these can speed matches but are never necessary.
If both
.b \-N
and
.b \-O
are specified,
.i sendmail
will never try any matches at all \(em
that is, everything will appear to fail.
.ip "\-a\fIx\fP"
Append the string
.i x
on successful matches.
For example, the default
.i host
map appends a dot on successful matches.
.ip "\-T\fIx\fP"
Append the string
.i x
on temporary failures.
For example,
.i x
would be appended if a DNS lookup returned
.q "server failed"
or an NIS lookup could not locate a server.
See also the
.b \-t
flag.
.ip "\-f"
Do not fold upper to lower case before looking up the key.
.ip "\-m"
Match only (without replacing the value).
If you only care about the existence of a key and not the value
(as you might when searching the NIS map
.q hosts.byname
for example),
this flag prevents the map from substituting the value.
However,
The \-a argument is still appended on a match,
and the default is still taken if the match fails.
.ip "\-k\fIkeycol\fP"
The key column name (for NIS+) or number
(for text lookups).
For LDAP maps this is an LDAP filter string
in which %s is replaced with the literal contents of the lookup key
and %0 is replaced with the LDAP escaped contents of the lookup key
according to RFC2254.
.ip "\-v\fIvalcol\fP"
The value column name (for NIS+) or number
(for text lookups).
For LDAP maps this is the name of one or more
attributes to be returned;
multiple attributes can be separated by commas.
If not specified, all attributes found in the match
will be returned.
.ip "\-z\fIdelim\fP"
The column delimiter (for text lookups).
It can be a single character or one of the special strings
.q \|\en
or
.q \|\et
to indicate newline or tab respectively.
If omitted entirely,
the column separator is any sequence of white space.
For LDAP maps this is the separator character
to combine multiple values
into a single return string.
If not set,
the LDAP lookup will only return the first match found.
.ip "\-t"
Normally, when a map attempts to do a lookup
and the server fails
(e.g.,
.i sendmail
couldn't contact any name server;
this is
.i not
the same as an entry not being found in the map),
the message being processed is queued for future processing.
The
.b \-t
flag turns off this behavior,
letting the temporary failure (server down)
act as though it were a permanent failure (entry not found).
It is particularly useful for DNS lookups,
where someone else's misconfigured name server can cause problems
on your machine.
However, care must be taken to ensure that you don't bounce mail
that would be resolved correctly if you tried again.
A common strategy is to forward such mail
to another, possibly better connected, mail server.
.ip "\-D"
Perform no lookup in deferred delivery mode.
This flag is set by default for the
.i host
map.
.ip "\-S\fIspacesub\fP
The character to use to replace space characters
after a successful map lookup (esp. useful for regex
and syslog maps).
.ip "\-s\fIspacesub\fP
For the dequote map only,
the character to use to replace space characters
after a successful dequote.
.ip "\-q"
Don't dequote the key before lookup.
.ip "\-L\fIlevel\fP
For the syslog map only, it specifies the level
to use for the syslog call.
.ip "\-A"
When rebuilding an alias file,
the
.b \-A
flag causes duplicate entries in the text version
to be merged.
For example, two entries:
.(b
list:	user1, user2
list:	user3
.)b
would be treated as though it were the single entry
.(b
list:	user1, user2, user3
.)b
in the presence of the
.b \-A
flag.
.pp
The following additional flags are present in the ldap map only:
.ip "\-R"
Do not auto chase referrals.  sendmail must be compiled with
.b \-DLDAP_REFERRALS
to use this flag.
.ip "\-n"
Retrieve attribute names only.
.ip "\-r\fIderef\fP"
Set the alias dereference option to one of never, always, search, or find.
.ip "\-s\fIscope\fP"
Set search scope to one of base, one (one level), or sub (subtree).
.ip "\-h\fIhost\fP"
LDAP server hostname.
Some LDAP libraries allow you to specify multiple, space-separated hosts for
redundancy.
In addition, each of the hosts listed can be followed by a colon and a port
number to override the default LDAP port.
.ip "\-b\fIbase\fP"
LDAP search base.
.ip "\-p\fIport\fP"
LDAP service port.
.ip "\-l\fItimelimit\fP"
Time limit for LDAP queries.
.ip "\-Z\fIsizelimit\fP"
Size (number of matches) limit for LDAP queries.
.ip "\-d\fIdistinguished_name\fP"
The distinguished name to use to login to the LDAP server.
.ip "\-M\fImethod\fP"
The method to authenticate to the LDAP server.
Should be one of
.b LDAP_AUTH_NONE ,
.b LDAP_AUTH_SIMPLE ,
or
.b LDAP_AUTH_KRBV4 .
.ip "\-P\fIpasswordfile\fP"
The file containing the secret key for the
.b LDAP_AUTH_SIMPLE
authentication method
or the name of the Kerberos ticket file for
.b LDAP_AUTH_KRBV4 .
.ip "\-1"
Force LDAP searches to only succeed if a single match is found.
If multiple values are found,
the search is treated as if no match was found.
.pp
The
.i dbm
map appends the strings
.q \&.pag
and
.q \&.dir
to the given filename;
the
.i hash
and
.i btree
maps append
.q \&.db .
For example, the map specification
.(b
Kuucp dbm \-o \-N /etc/mail/uucpmap
.)b
specifies an optional map named
.q uucp
of class
.q dbm ;
it always has null bytes at the end of every string,
and the data is located in
/etc/mail/uucpmap.{dir,pag}.
.pp
The program
.i makemap (8)
can be used to build any of the three database-oriented maps.
It takes the following flags:
.ip \-f
Do not fold upper to lower case in the map.
.ip \-N
Include null bytes in keys.
.ip \-o
Append to an existing (old) file.
.ip \-r
Allow replacement of existing keys;
normally, re-inserting an existing key is an error.
.ip \-v
Print what is happening.
.lp
The
.i sendmail
daemon does not have to be restarted to read the new maps
as long as you change them in place;
file locking is used so that the maps won't be read
while they are being updated.
.pp
New classes can be added in the routine
.b setupmaps
in file
.b conf.c .
.sh 2 "The User Database"
.pp
If you have a version of
.i sendmail
with the user database package
compiled in,
the handling of sender and recipient addresses
is modified.
.pp
The location of this database is controlled with the
.b UserDatabaseSpec
option.
.sh 3 "Structure of the user database"
.pp
The database is a sorted (BTree-based) structure.
User records are stored with the key:
.(b
\fIuser-name\fP\fB:\fP\fIfield-name\fP
.)b
The sorted database format ensures that user records are clustered together.
Meta-information is always stored with a leading colon.
.pp
Field names define both the syntax and semantics of the value.
Defined fields include:
.nr ii 1i
.ip maildrop
The delivery address for this user.
There may be multiple values of this record.
In particular,
mailing lists will have one
.i maildrop
record for each user on the list.
.ip "mailname"
The outgoing mailname for this user.
For each outgoing name,
there should be an appropriate
.i maildrop
record for that name to allow return mail.
See also
.i :default:mailname .
.ip mailsender
Changes any mail sent to this address to have the indicated envelope sender.
This is intended for mailing lists,
and will normally be the name of an appropriate -request address.
It is very similar to the owner-\c
.i list
syntax in the alias file.
.ip fullname
The full name of the user.
.ip office-address
The office address for this user.
.ip office-phone
The office phone number for this user.
.ip office-fax
The office FAX number for this user.
.ip home-address
The home address for this user.
.ip home-phone
The home phone number for this user.
.ip home-fax
The home FAX number for this user.
.ip project
A (short) description of the project this person is affiliated with.
In the University this is often just the name of their graduate advisor.
.ip plan
A pointer to a file from which plan information can be gathered.
.pp
As of this writing,
only a few of these fields are actually being used by
.i sendmail :
.i maildrop
and
.i mailname .
A
.i finger
program that uses the other fields is planned.
.sh 3 "User database semantics"
.pp
When the rewriting rules submit an address to the local mailer,
the user name is passed through the alias file.
If no alias is found (or if the alias points back to the same address),
the name (with
.q :maildrop
appended)
is then used as a key in the user database.
If no match occurs (or if the maildrop points at the same address),
forwarding is tried.
.pp
If the first token of the user name returned by ruleset 0
is an
.q @
sign, the user database lookup is skipped.
The intent is that the user database will act as a set of defaults
for a cluster (in our case, the Computer Science Division);
mail sent to a specific machine should ignore these defaults.
.pp
When mail is sent,
the name of the sending user is looked up in the database.
If that user has a
.q mailname
record,
the value of that record is used as their outgoing name.
For example, I might have a record:
.(b
eric:mailname	Eric.Allman@CS.Berkeley.EDU
.)b
This would cause my outgoing mail to be sent as Eric.Allman.
.pp
If a
.q maildrop
is found for the user,
but no corresponding
.q mailname
record exists,
the record
.q :default:mailname
is consulted.
If present, this is the name of a host to override the local host.
For example, in our case we would set it to
.q CS.Berkeley.EDU .
The effect is that anyone known in the database
gets their outgoing mail stamped as
.q user@CS.Berkeley.EDU ,
but people not listed in the database use the local hostname.
.sh 3 "Creating the database\**"
.(f
\**These instructions are known to be incomplete.
Other features are available which provide similar functionality,
e.g., virtual hosting and mapping local addresses into a
generic form as explained in cf/README.
.)f
.pp
The user database is built from a text file
using the
.i makemap
utility
(in the distribution in the makemap subdirectory).
The text file is a series of lines corresponding to userdb records;
each line has a key and a value separated by white space.
The key is always in the format described above \*-
for example:
.(b
eric:maildrop
.)b
This file is normally installed in a system directory;
for example, it might be called
.i /etc/mail/userdb .
To make the database version of the map, run the program:
.(b
makemap btree /etc/mail/userdb < /etc/mail/userdb
.)b
Then create a config file that uses this.
For example, using the V8 M4 configuration, include the
following line in your .mc file:
.(b
define(\`confUSERDB_SPEC\', /etc/mail/userdb.db)
.)b
.sh 1 "OTHER CONFIGURATION"
.pp
There are some configuration changes that can be made by
recompiling
.i sendmail .
This section describes what changes can be made
and what has to be modified to make them.
In most cases this should be unnecessary
unless you are porting
.i sendmail
to a new environment.
.sh 2 "Parameters in devtools/OS/$oscf"
.pp
These parameters are intended to describe the compilation environment,
not site policy,
and should normally be defined in the operating system
configuration file.
.b "This section needs a complete rewrite."
.ip NDBM
If set,
the new version of the DBM library
that allows multiple databases will be used.
If neither NDBM nor NEWDB are set,
a much less efficient method of alias lookup is used.
.ip NEWDB
If set, use the new database package from Berkeley (from 4.4BSD).
This package is substantially faster than DBM or NDBM.
If NEWDB and NDBM are both set,
.i sendmail
will read DBM files,
but will create and use NEWDB files.
.ip NIS
Include support for NIS.
If set together with
.i both
NEWDB and NDBM,
.i sendmail
will create both DBM and NEWDB files if and only if
an alias file includes the substring
.q /yp/
in the name.
This is intended for compatibility with Sun Microsystems'
.i mkalias
program used on YP masters.
.ip NISPLUS
Compile in support for NIS+.
.ip NETINFO
Compile in support for NetInfo (NeXT stations).
.ip LDAPMAP
Compile in support for LDAP X500 queries.
Requires libldap and liblber
from the Umich LDAP 3.2 or 3.3 release
or equivalent libraries for other LDAP libraries
such as OpenLDAP.
.ip HESIOD
Compile in support for Hesiod.
.ip MAP_NSD
Compile in support for IRIX NSD lookups.
.ip MAP_REGEX
Compile in support for regular expression matching.
.ip PH_MAP
Compile in support for ph lookups.
.ip SASL
Compile in support for SASL,
a required component for SMTP Authentication support.
.ip STARTTLS
Compile in support for STARTTLS.
.ip EGD
Compile in support for the "Entropy Gathering Daemon"
to provide better random data for TLS.
.ip SFIO
Compile in support for sfio, which is required to enable encryption,
e.g., STARTTLS.
.ip TCPWRAPPERS
Compile in support for TCP Wrappers.
.ip _PATH_SENDMAILCF
The pathname of the sendmail.cf file.
.ip _PATH_SENDMAILPID
The pathname of the sendmail.pid file.
.pp
There are also several compilation flags to indicate the environment
such as
.q _AIX3
and
.q _SCO_unix_ .
See the sendmail/README
file for the latest scoop on these flags.
.sh 2 "Parameters in sendmail/conf.h"
.pp
Parameters and compilation options
are defined in conf.h.
Most of these need not normally be tweaked;
common parameters are all in sendmail.cf.
However, the sizes of certain primitive vectors, etc.,
are included in this file.
The numbers following the parameters
are their default value.
.pp
This document is not the best source of information
for compilation flags in conf.h \(em
see sendmail/README or sendmail/conf.h itself.
.nr ii 1.2i
.ip "MAXLINE [2048]"
The maximum line length of any input line.
If message lines exceed this length
they will still be processed correctly;
however, header lines,
configuration file lines,
alias lines,
etc.,
must fit within this limit.
.ip "MAXNAME [256]"
The maximum length of any name,
such as a host or a user name.
.ip "MAXPV [256]"
The maximum number of parameters to any mailer.
This limits the number of recipients that may be passed in one transaction.
It can be set to any arbitrary number above about 10,
since
.i sendmail
will break up a delivery into smaller batches as needed.
A higher number may reduce load on your system, however.
.ip "MAXATOM [1000]"
The maximum number of atoms
(tokens)
in a single address.
For example,
the address
.q "eric@CS.Berkeley.EDU"
is seven atoms.
.ip "MAXMAILERS [25]"
The maximum number of mailers that may be defined
in the configuration file.
This value is defined in include/sendmail/sendmail.h.
.ip "MAXRWSETS [200]"
The maximum number of rewriting sets
that may be defined.
The first half of these are reserved for numeric specification
(e.g., ``S92''),
while the upper half are reserved for auto-numbering
(e.g., ``Sfoo'').
Thus, with a value of 200 an attempt to use ``S99'' will succeed,
but ``S100'' will fail.
.ip "MAXPRIORITIES [25]"
The maximum number of values for the
.q Precedence:
field that may be defined
(using the
.b P
line in sendmail.cf).
.ip "MAXUSERENVIRON [100]"
The maximum number of items in the user environment
that will be passed to subordinate mailers.
.ip "MAXMXHOSTS [100]"
The maximum number of MX records we will accept for any single host.
.ip "MAXALIASDB [12]"
The maximum number of alias databases that can be open at any time.
Note that there may also be an open file limit.
.ip "MAXMAPSTACK [12]"
The maximum number of maps that may be "stacked" in a
.b sequence
class map.
.ip "MAXMIMEARGS [20]"
The maximum number of arguments in a MIME Content-Type: header;
additional arguments will be ignored.
.ip "MAXMIMENESTING [20]"
The maximum depth to which MIME messages may be nested
(that is, nested Message or Multipart documents;
this does not limit the number of components in a single Multipart document).
.ip "MAXDAEMONS [10]"
The maximum number of sockets sendmail will open for accepting connections
on different ports.
.ip "MAXMACNAMELEN [25]"
The maximum length of a macro name.
.lp
A number of other compilation options exist.
These specify whether or not specific code should be compiled in.
Ones marked with \(dg
are 0/1 valued.
.nr ii 1.2i
.ip NETINET\(dg
If set,
support for Internet protocol networking is compiled in.
Previous versions of
.i sendmail
referred to this as
.sm DAEMON ;
this old usage is now incorrect.
Defaults on;
turn it off in the Makefile
if your system doesn't support the Internet protocols.
.ip NETINET6\(dg
If set,
support for IPv6 networking is compiled in.
It must be separately enabled by adding DaemonPortOptions settings.
.ip NETISO\(dg
If set,
support for ISO protocol networking is compiled in
(it may be appropriate to #define this in the Makefile instead of conf.h).
.ip NETUNIX\(dg
If set,
support for UNIX domain sockets is compiled in.
This is used for control socket support.
.ip LOG
If set,
the
.i syslog
routine in use at some sites is used.
This makes an informational log record
for each message processed,
and makes a higher priority log record
for internal system errors.
.b "STRONGLY RECOMMENDED"
\(em if you want no logging, turn it off in the configuration file.
.ip MATCHGECOS\(dg
Compile in the code to do ``fuzzy matching'' on the GECOS field
in /etc/passwd.
This also requires that the
.b MatchGECOS
option be turned on.
.ip NAMED_BIND\(dg
Compile in code to use the
Berkeley Internet Name Domain (BIND) server
to resolve TCP/IP host names.
.ip NOTUNIX
If you are using a non-UNIX mail format,
you can set this flag to turn off special processing
of UNIX-style
.q "From "
lines.
.ip QUEUE\(dg
This flag should be set to compile in the queueing code.
If this is not set,
mailers must accept the mail immediately
or it will be returned to the sender.
.ip SMTP\(dg
If set,
the code to handle user and server SMTP will be compiled in.
This is only necessary if your machine has some mailer
that speaks SMTP
(this means most machines everywhere).
.ip USERDB\(dg
Include the
.b experimental
Berkeley user information database package.
This adds a new level of local name expansion
between aliasing and forwarding.
It also uses the NEWDB package.
This may change in future releases.
.lp
The following options are normally turned on
in per-operating-system clauses in conf.h.
.ip IDENTPROTO\(dg
Compile in the IDENT protocol as defined in RFC 1413.
This defaults on for all systems except Ultrix,
which apparently has the interesting
.q feature
that when it receives a
.q "host unreachable"
message it closes all open connections to that host.
Since some firewall gateways send this error code
when you access an unauthorized port (such as 113, used by IDENT),
Ultrix cannot receive email from such hosts.
.ip SYSTEM5
Set all of the compilation parameters appropriate for System V.
.ip HASFLOCK\(dg
Use Berkeley-style
.b flock
instead of System V
.b lockf
to do file locking.
Due to the highly unusual semantics of locks
across forks in
.b lockf ,
this should always be used if at all possible.
.ip HASINITGROUPS
Set this if your system has the
.i initgroups()
call
(if you have multiple group support).
This is the default if SYSTEM5 is
.i not
defined or if you are on HPUX.
.ip HASUNAME
Set this if you have the
.i uname (2)
system call (or corresponding library routine).
Set by default if
SYSTEM5
is set.
.ip HASGETDTABLESIZE
Set this if you have the
.i getdtablesize (2)
system call.
.ip HASWAITPID
Set this if you have the
.i haswaitpid (2)
system call.
.ip FAST_PID_RECYCLE
Set this if your system can possibly
reuse the same pid in the same second of time.
.ip SFS_TYPE
The mechanism that can be used to get file system capacity information.
The values can be one of
SFS_USTAT (use the ustat(2) syscall),
SFS_4ARGS (use the four argument statfs(2) syscall),
SFS_VFS (use the two argument statfs(2) syscall including <sys/vfs.h>),
SFS_MOUNT (use the two argument statfs(2) syscall including <sys/mount.h>),
SFS_STATFS (use the two argument statfs(2) syscall including <sys/statfs.h>),
SFS_STATVFS (use the two argument statfs(2) syscall including <sys/statvfs.h>),
or
SFS_NONE (no way to get this information).
.ip LA_TYPE
The load average type.
Details are described below.
.lp
The are several built-in ways of computing the load average.
.i Sendmail
tries to auto-configure them based on imperfect guesses;
you can select one using the
.i cc
option
.b \-DLA_TYPE= \c
.i type ,
where
.i type
is:
.ip LA_INT
The kernel stores the load average in the kernel as an array of long integers.
The actual values are scaled by a factor FSCALE
(default 256).
.ip LA_SHORT
The kernel stores the load average in the kernel as an array of short integers.
The actual values are scaled by a factor FSCALE
(default 256).
.ip LA_FLOAT
The kernel stores the load average in the kernel as an array of
double precision floats.
.ip LA_MACH
Use MACH-style load averages.
.ip LA_SUBR
Call the
.i getloadavg
routine to get the load average as an array of doubles.
.ip LA_ZERO
Always return zero as the load average.
This is the fallback case.
.lp
If type
.sm LA_INT ,
.sm LA_SHORT ,
or
.sm LA_FLOAT
is specified,
you may also need to specify
.sm _PATH_UNIX
(the path to your system binary)
and
.sm LA_AVENRUN
(the name of the variable containing the load average in the kernel;
usually
.q _avenrun
or
.q avenrun ).
.sh 2 "Configuration in sendmail/conf.c"
.pp
The following changes can be made in conf.c.
.sh 3 "Built-in Header Semantics"
.pp
Not all header semantics are defined in the configuration file.
Header lines that should only be included by certain mailers
(as well as other more obscure semantics)
must be specified in the
.i HdrInfo
table in
.i conf.c .
This table contains the header name
(which should be in all lower case)
and a set of header control flags (described below),
The flags are:
.ip H_ACHECK
Normally when the check is made to see if a header line is compatible
with a mailer,
.i sendmail
will not delete an existing line.
If this flag is set,
.i sendmail
will delete
even existing header lines.
That is,
if this bit is set and the mailer does not have flag bits set
that intersect with the required mailer flags
in the header definition in
sendmail.cf,
the header line is
.i always
deleted.
.ip H_EOH
If this header field is set,
treat it like a blank line,
i.e.,
it will signal the end of the header
and the beginning of the message text.
.ip H_FORCE
Add this header entry
even if one existed in the message before.
If a header entry does not have this bit set,
.i sendmail
will not add another header line if a header line
of this name already existed.
This would normally be used to stamp the message
by everyone who handled it.
.ip H_TRACE
If set,
this is a timestamp
(trace)
field.
If the number of trace fields in a message
exceeds a preset amount
the message is returned
on the assumption that it has an aliasing loop.
.ip H_RCPT
If set,
this field contains recipient addresses.
This is used by the
.b \-t
flag to determine who to send to
when it is collecting recipients from the message.
.ip H_FROM
This flag indicates that this field
specifies a sender.
The order of these fields in the
.i HdrInfo
table specifies
.i sendmail 's
preference
for which field to return error messages to.
.ip H_ERRORSTO
Addresses in this header should receive error messages.
.ip H_CTE
This header is a Content-Transfer-Encoding header.
.ip H_CTYPE
This header is a Content-Type header.
.ip H_STRIPVAL
Strip the value from the header (for Bcc:).
.nr ii 5n
.lp
Let's look at a sample
.i HdrInfo
specification:
.(b
.ta 4n +\w'"content-transfer-encoding",  'u
struct hdrinfo	HdrInfo[] =
\&{
	     /* originator fields, most to least significant  */
	"resent-sender",	H_FROM,
	"resent-from",	H_FROM,
	"sender",	H_FROM,
	"from",	H_FROM,
	"full-name",	H_ACHECK,
	"errors-to",	H_FROM\^|\^H_ERRORSTO,
	     /* destination fields */
	"to",	H_RCPT,
	"resent-to",	H_RCPT,
	"cc",	H_RCPT,
	"bcc",	H_RCPT\^|\^H_STRIPVAL,
	     /* message identification and control */
	"message",	H_EOH,
	"text",	H_EOH,
	     /* trace fields */
	"received",	H_TRACE\^|\^H_FORCE,
	     /* miscellaneous fields */
	"content-transfer-encoding",	H_CTE,
	"content-type",	H_CTYPE,

	NULL,	0,
};
.)b
This structure indicates that the
.q To: ,
.q Resent-To: ,
and
.q Cc:
fields
all specify recipient addresses.
Any
.q Full-Name:
field will be deleted unless the required mailer flag
(indicated in the configuration file)
is specified.
The
.q Message:
and
.q Text:
fields will terminate the header;
these are used by random dissenters around the network world.
The
.q Received:
field will always be added,
and can be used to trace messages.
.pp
There are a number of important points here.
First,
header fields are not added automatically just because they are in the
.i HdrInfo
structure;
they must be specified in the configuration file
in order to be added to the message.
Any header fields mentioned in the configuration file but not
mentioned in the
.i HdrInfo
structure have default processing performed;
that is,
they are added unless they were in the message already.
Second,
the
.i HdrInfo
structure only specifies cliched processing;
certain headers are processed specially by ad hoc code
regardless of the status specified in
.i HdrInfo .
For example,
the
.q Sender:
and
.q From:
fields are always scanned on ARPANET mail
to determine the sender\**;
.(f
\**Actually, this is no longer true in SMTP;
this information is contained in the envelope.
The older ARPANET protocols did not completely distinguish
envelope from header.
.)f
this is used to perform the
.q "return to sender"
function.
The
.q "From:"
and
.q "Full-Name:"
fields are used to determine the full name of the sender
if possible;
this is stored in the macro
.b $x
and used in a number of ways.
.sh 3 "Restricting Use of Email"
.pp
If it is necessary to restrict mail through a relay,
the
.i checkcompat
routine can be modified.
This routine is called for every recipient address.
It returns an exit status
indicating the status of the message.
The status
.sm EX_OK
accepts the address,
.sm EX_TEMPFAIL
queues the message for a later try,
and other values
(commonly
.sm EX_UNAVAILABLE )
reject the message.
It is up to
.i checkcompat
to print an error message
(using
.i usrerr )
if the message is rejected.
For example,
.i checkcompat
could read:
.(b
.re
.sz -1
.ta 4n +4n +4n +4n +4n +4n +4n
int
checkcompat(to, e)
	register ADDRESS *to;
	register ENVELOPE *e;
\&{
	register STAB *s;

	s = stab("private", ST_MAILER, ST_FIND);
	if (s != NULL && e\->e_from.q_mailer != LocalMailer &&
	    to->q_mailer == s->s_mailer)
	{
		usrerr("No private net mail allowed through this machine");
		return (EX_UNAVAILABLE);
	}
	if (MsgSize > 50000 && bitnset(M_LOCALMAILER, to\->q_mailer))
	{
		usrerr("Message too large for non-local delivery");
		e\->e_flags |= EF_NORETURN;
		return (EX_UNAVAILABLE);
	}
	return (EX_OK);
}
.sz
.)b
This would reject messages greater than 50000 bytes
unless they were local.
The
.i EF_NORETURN
flag can be set in
.i e\(->e_flags
to suppress the return of the actual body
of the message in the error return.
The actual use of this routine is highly dependent on the
implementation,
and use should be limited.
.sh 3 "New Database Map Classes"
.pp
New key maps can be added by creating a class initialization function
and a lookup function.
These are then added to the routine
.i setupmaps.
.pp
The initialization function is called as
.(b
\fIxxx\fP_map_init(MAP *map, char *args)
.)b
The
.i map
is an internal data structure.
The
.i args
is a pointer to the portion of the configuration file line
following the map class name;
flags and filenames can be extracted from this line.
The initialization function must return
.sm TRUE
if it successfully opened the map,
.sm FALSE
otherwise.
.pp
The lookup function is called as
.(b
\fIxxx\fP_map_lookup(MAP *map, char buf[], char **av, int *statp)
.)b
The
.i map
defines the map internally.
The
.i buf
has the input key.
This may be (and often is) used destructively.
The
.i av
is a list of arguments passed in from the rewrite line.
The lookup function should return a pointer to the new value.
If the map lookup fails,
.i *statp
should be set to an exit status code;
in particular, it should be set to
.sm EX_TEMPFAIL
if recovery is to be attempted by the higher level code.
.sh 3 "Queueing Function"
.pp
The routine
.i shouldqueue
is called to decide if a message should be queued
or processed immediately.
Typically this compares the message priority to the current load average.
The default definition is:
.(b
bool
shouldqueue(pri, ctime)
	long pri;
	time_t ctime;
{
	if (CurrentLA < QueueLA)
		return (FALSE);
	return (pri > (QueueFactor / (CurrentLA \- QueueLA + 1)));
}
.)b
If the current load average
(global variable
.i CurrentLA ,
which is set before this function is called)
is less than the low threshold load average
(option
.b x ,
variable
.i QueueLA ),
.i shouldqueue
returns
.sm FALSE
immediately
(that is, it should
.i not
queue).
If the current load average exceeds the high threshold load average
(option
.b X ,
variable
.i RefuseLA ),
.i shouldqueue
returns
.sm TRUE
immediately.
Otherwise, it computes the function based on the message priority,
the queue factor
(option
.b q ,
global variable
.i QueueFactor ),
and the current and threshold load averages.
.pp
An implementation wishing to take the actual age of the message into account
can also use the
.i ctime
parameter,
which is the time that the message was first submitted to
.i sendmail .
Note that the
.i pri
parameter is already weighted
by the number of times the message has been tried
(although this tends to lower the priority of the message with time);
the expectation is that the
.i ctime
would be used as an
.q "escape clause"
to ensure that messages are eventually processed.
.sh 3 "Refusing Incoming SMTP Connections"
.pp
The function
.i refuseconnections
returns
.sm TRUE
if incoming SMTP connections should be refused.
The current implementation is based exclusively on the current load average
and the refuse load average option
(option
.b X ,
global variable
.i RefuseLA ):
.(b
bool
refuseconnections()
{
	return (RefuseLA > 0 && CurrentLA >= RefuseLA);
}
.)b
A more clever implementation
could look at more system resources.
.sh 3 "Load Average Computation"
.pp
The routine
.i getla
returns the current load average (as a rounded integer).
The distribution includes several possible implementations.
If you are porting to a new environment
you may need to add some new tweaks.\**
.(f
\**If you do, please send updates to
sendmail@Sendmail.ORG.
.)f
.sh 2 "Configuration in sendmail/daemon.c"
.pp
The file
.i sendmail/daemon.c
contains a number of routines that are dependent
on the local networking environment.
The version supplied assumes you have BSD style sockets.
.pp
In previous releases,
we recommended that you modify the routine
.i maphostname
if you wanted to generalize
.b $[
\&...\&
.b $]
lookups.
We now recommend that you create a new keyed map instead.
.sh 2 "Certificates for STARTTLS"
.pp
In this section we assume that
.i sendmail
has been compiled with support for STARTTLS.
When acting as a server,
.i sendmail
requires X.509 certificates to support STARTTLS:
one as certificate for the server (ServerCertFile)
at least one root CA (CACERTFile),
i.e., a certificate that is used to sign other certificates,
and a path to a directory which contains other CAs (CACERTPath).
The file specified via
CACERTFile
can contain several certificates of CAs.
The DNs of these certificates are sent
to the client during the TLS handshake (as part of the
CertificateRequest) as the list of acceptable CAs.
An X.509 certificate is also required for authentication in client mode
(ClientCertFile), however,
.i sendmail
will always use STARTTLS when offered by a server.
The client and server certificates can be identical.
Certificates can be obtained from a certificate authority
or created with the help of OpenSSL.
The required format for certificates and private keys is PEM.
To allow for automatic startup of sendmail, private keys
(ServerKeyFile, ClientKeyFile)
must be stored unencrypted.
The keys are only protected by the permissions of the file system.
Never make a private key available to a third party.
.sh 2 "PRNG for STARTTLS"
.pp
STARTTLS requires a strong pseudo random number generator (PRNG)
to operate properly.
Depending on the TLS library you use, it may be required to explicitly
initialize the PRNG with random data.
OpenSSL makes use of
.b /dev/urandom(4)
if available (this corresponds to the compile flag HASURANDOMDEV).
On systems which lack this support, a random file must be specified in the
.i sendmail.cf
file using the option RandFile.
It is
.b strongly
advised to use the "Entropy Gathering Daemon" EGD
from Brian Warner on those systems to provide useful random data.
In this case,
.i sendmail 
must be compiled with the flag EGD, and the
RandFile option must point to the EGD socket.
If neither
.b /dev/urandom(4)
nor EGD are available, you have to make sure
that useful random data is available all the time in RandFile.
If the file hasn't been modified in the last 10 minutes before
it is supposed to be used by
.i sendmail 
the content is considered obsolete.
One method for generating this file is:
.(b
openssl rand -out /etc/mail/randfile -rand \c
.i /path/to/file:... \c
256
.)b
See the OpenSSL documentation for more information.
In this case, the PRNG for TLS is only
seeded with other random data if the
.b DontBlameSendmail
option
.b InsufficientEntropy
is set.
This is most likely not sufficient for certain actions, e.g.,
generation of (temporary) keys.
.pp
Please see the OpenSSL documentation or other sources
for further information about certificates, their creation and their usage,
the importance of a good PRNG, and other aspects of TLS.
.sh 1 "ACKNOWLEDGEMENTS"
.pp
I've worked on
.i sendmail
for many years,
and many employers have been remarkably patient
about letting me work on a large project
that was not part of my official job.
This includes time on the INGRES Project at
the University of California at Berkeley,
at Britton Lee,
and again on the Mammoth and Titan Projects at Berkeley.
.pp
Much of the second wave of improvements
resulting in version 8.1
should be credited to Bryan Costales of the
International Computer Science Institute.
As he passed me drafts of his book on
.i sendmail
I was inspired to start working on things again.
Bryan was also available to bounce ideas off of.
.pp
Gregory Neil Shapiro
of Worcester Polytechnic Institute
has become instrumental in all phases of
.i sendmail
support and development,
and was largely responsible for getting versions 8.8 and 8.9
out the door.
.pp
Many, many people contributed chunks of code and ideas to
.i sendmail .
It has proven to be a group network effort.
Version 8 in particular was a group project.
The following people and organizations made notable contributions:
.(l
Claus Assmann
John Beck, Hewlett-Packard & Sun Microsystems
Keith Bostic, CSRG, University of California, Berkeley
Andrew Cheng, Sun Microsystems
Michael J. Corrigan, University of California, San Diego
Bryan Costales, International Computer Science Institute & InfoBeat
Pa\*:r (Pell) Emanuelsson
Craig Everhart, Transarc Corporation
Per Hedeland, Ericsson
Tom Ivar Helbekkmo, Norwegian School of Economics
Kari Hurtta, Finnish Meteorological Institute
Allan E. Johannesen, WPI
Jonathan Kamens, OpenVision Technologies, Inc.
Takahiro Kanbe, Fuji Xerox Information Systems Co., Ltd.
Brian Kantor, University of California, San Diego
John Kennedy, Cal State University, Chico
Murray S. Kucherawy, HookUp Communication Corp.
Bruce Lilly, Sony U.S.
Karl London
Motonori Nakamura, Ritsumeikan University & Kyoto University
John Gardiner Myers, Carnegie Mellon University
Neil Rickert, Northern Illinois University
Gregory Neil Shapiro, WPI
Eric Schnoebelen, Convex Computer Corp.
Eric Wassenaar, National Institute for Nuclear and High Energy Physics, Amsterdam
Randall Winchester, University of Maryland
Christophe Wolfhugel, Pasteur Institute & Herve Schauer Consultants (Paris)
Exactis.com, Inc.
.)l
I apologize for anyone I have omitted, misspelled, misattributed, or
otherwise missed.
At this point, I suspect that at least a hundred people
have contributed code,
and many more have contributed ideas, comments, and encouragement.
I've tried to list them in the RELEASE_NOTES in the distribution directory.
I appreciate their contribution as well.
.pp
Special thanks are reserved for Michael Corrigan and Christophe Wolfhugel,
who besides being wonderful guinea pigs and contributors
have also consented to be added to the ``sendmail@Sendmail.ORG'' list
and, by answering the bulk of the questions sent to that list,
have freed me up to do other work.
.++ A
.+c "COMMAND LINE FLAGS"
.ba 0
.nr ii 1i
.pp
Arguments must be presented with flags before addresses.
The flags are:
.ip \-b\fIx\fP
Set operation mode to
.i x .
Operation modes are:
.(b
.ta 4n
m	Deliver mail (default)
s	Speak SMTP on input side
a\(dg	``Arpanet'' mode (get envelope sender information from header)
d	Run as a daemon in background
D	Run as a daemon in foreground
t	Run in test mode
v	Just verify addresses, don't collect or deliver
i	Initialize the alias database
p	Print the mail queue
h	Print the persistent host status database
H	Purge expired entries from the persistent host status database
.)b
.(f
\(dgDeprecated.
.)f
.ip \-B\fItype\fP
Indicate body type.
.ip \-C\fIfile\fP
Use a different configuration file.
.i Sendmail
runs as the invoking user (rather than root)
when this flag is specified.
.ip \-d\fIlevel\fP
Set debugging level.
.ip "\-f\ \fIaddr\fP"
The envelope sender address is set to
.i addr .
This address may also be used in the From: header
if that header is missing during initial submission.
The envelope sender address is used as the recipient
for delivery status notifications
and may also appear in a Return-Path: header.
.ip \-F\ \fIname\fP
Sets the full name of this user to
.i name .
.ip \-G
When accepting messages via the command line,
indicate that they are for relay (gateway) submission.
sendmail may complain about syntactically invalid messages,
e.g., unqualified host names,
rather than fixing them when this flag is set.
sendmail will not do any canonicalization in this mode.
.ip "\-h\ \fIcnt\fP"
Sets the
.q "hop count"
to
.i cnt .
This represents the number of times this message has been processed
by
.i sendmail
(to the extent that it is supported by the underlying networks).
.i Cnt
is incremented during processing,
and if it reaches
MAXHOP
(currently 30)
.i sendmail
throws away the message with an error.
.ip "\-L \fItag\fP"
Sets the identifier used for syslog.
Note that this identifier is set
as early as possible.
However, 
.i sendmail
may be used
if problems arise
before the command line arguments
are processed.
.ip \-n
Don't do aliasing or forwarding.
.ip "\-N \fInotifications\fP"
Tag all addresses being sent as wanting the indicated
.i notifications ,
which consists of the word
.q NEVER
or a comma-separated list of
.q SUCCESS ,
.q FAILURE ,
and
.q DELAY
for successful delivery,
failure,
and a message that is stuck in a queue somewhere.
The default is
.q FAILURE,DELAY .
.ip "\-r\ \fIaddr\fP"
An obsolete form of
.b \-f .
.ip \-o\fIx\|value\fP
Set option
.i x
to the specified
.i value .
These options are described in Section 5.6.
.ip \-O\fIoption\fP\fB=\fP\fIvalue\fP
Set
.i option
to the specified
.i value
(for long form option names).
These options are described in Section 5.6.
.ip \-M\fIx\|value\fP
Set macro
.i x
to the specified
.i value .
.ip \-p\fIprotocol\fP
Set the sending protocol.
Programs are encouraged to set this.
The protocol field can be in the form
.i protocol \c
.b : \c
.i host
to set both the sending protocol and sending host.
For example,
.q \-pUUCP:uunet
sets the sending protocol to UUCP
and the sending host to uunet.
(Some existing programs use \-oM to set the r and s macros;
this is equivalent to using \-p.)
.ip \-q\fItime\fP
Try to process the queued up mail.
If the time is given,
a
.i sendmail
will run through the queue at the specified interval
to deliver queued mail;
otherwise, it only runs once.
.ip \-q\fIXstring\fP
Run the queue once,
limiting the jobs to those matching
.i Xstring .
The key letter
.i X
can be
.b I
to limit based on queue identifier,
.b R
to limit based on recipient,
or
.b S
to limit based on sender.
A particular queued job is accepted if one of the corresponding addresses
contains the indicated
.i string .
Multiple
.i \-q\fIX\fP
flags are permitted,
with items with the same key letter
.q or'ed
together, and items with different key letters
.q and'ed
together.
.ip "\-R ret"
What information you want returned if the message bounces;
.i ret
can be
.q HDRS
for headers only or
.q FULL
for headers plus body.
This is a request only;
the other end is not required to honor the parameter.
If
.q HDRS
is specified local bounces also return only the headers.
.ip \-t
Read the header for
.q To: ,
.q Cc: ,
and
.q Bcc:
lines, and send to everyone listed in those lists.
The
.q Bcc:
line will be deleted before sending.
Any addresses in the argument vector will be deleted
from the send list.
.ip "\-U"
Indicate that this is an initial User Agent submission.
This flag is deprecated.
Future releases will ignore this flag and
assume all submissions from the command line are
initial submissions.
.ip "\-V envid"
The indicated
.i envid
is passed with the envelope of the message
and returned if the message bounces.
.ip "\-X \fIlogfile\fP"
Log all traffic in and out of
.i sendmail
in the indicated
.i logfile
for debugging mailer problems.
This produces a lot of data very quickly and should be used sparingly.
.pp
There are a number of options that may be specified as
primitive flags.
These are the e, i, m, and v options.
Also,
the f option
may be specified as the
.b \-s
flag.
The DSN related options
.q "\-N" ,
.q "\-R" ,
and
.q "\-V"
have no effects on
.i sendmail
running as daemon.
.+c "QUEUE FILE FORMATS"
.pp
This appendix describes the format of the queue files.
These files live in the directory defined by the
.b Q
option in the
.i sendmail.cf
file, usually
.i /var/spool/mqueue
or
.i /usr/spool/mqueue .
The individual qf, df, and xf files
may be stored in separate 
.i qf/ ,
.i df/ ,
and
.i xf/
subdirectories
if they are present in the queue directory.
.pp
To use multiple queues,
supply a value ending with an asterisk.
For example,
.i /var/spool/mqueue/q*
will use all of the directories or symbolic links to directories
beginning with `q' in
.i /var/spool/mqueue
as queue directories.
New messages will be randomly placed
into one of the queues.
Do not change the queue directory structure
while sendmail is running.
.pp
All queue files have the name
\fIx\fP\|\fBf\fP\fIYMDhmsNPPPPP\fP
where
.i YMDhmsNPPPPP
is the
.i id
for this message
and the
.i x
is a type.
The individual letters in the
.i id
are:
.nr ii 0.5i
.ip Y
Encoded year
.ip M
Encoded month
.ip D
Encoded day
.ip h
Encoded hour
.ip m
Encoded minute
.ip s
Encoded second
.ip N
Envelope number
.ip PPPPP
At least five digits of the process ID
.pp
All files with the same id collectively define one message.
If memory-buffered files are available,
some of these files may never appear
on disk.
.pp
The types are:
.nr ii 0.5i
.ip d
The data file.
The message body (excluding the header) is kept in this file.
.ip q
The queue control file.
This file contains the information necessary to process the job.
.ip t
A temporary file.
These are an image of the
.b qf
file when it is being rebuilt.
It should be renamed to a
.b qf
file very quickly.
.ip x
A transcript file,
existing during the life of a session
showing everything that happens
during that session.
.pp
The
.b qf
file is structured as a series of lines
each beginning with a code letter.
The lines are as follows:
.ip V
The version number of the queue file format,
used to allow new
.i sendmail
binaries to read queue files created by older versions.
Defaults to version zero.
Must be the first line of the file if present.
For 8.10 the version number is 4.
.ip A
The information given by the AUTH= parameter of the
.q "MAIL FROM:"
command or $f@$j
if sendmail has been called directly.
.ip H
A header definition.
There may be any number of these lines.
The order is important:
they represent the order in the final message.
These use the same syntax
as header definitions in the configuration file.
.ip C
The controlling address.
The syntax is
.q localuser:aliasname .
Recipient addresses following this line
will be flagged so that deliveries will be run as the
.i localuser
(a user name from the /etc/passwd file);
.i aliasname
is the name of the alias that expanded to this address
(used for printing messages).
.ip Q
The ``original recipient'',
specified by the ORCPT= field in an ESMTP transaction.
Used exclusively for Delivery Status Notifications.
It applies only to the immediately following `R' line.
.ip R
A recipient address.
This will normally be completely aliased,
but is actually realiased when the job is processed.
There will be one line
for each recipient.
Version 1 qf files
also include a leading colon-terminated list of flags,
which can be
`S' to return a message on successful final delivery,
`F' to return a message on failure,
`D' to return a message if the message is delayed,
`B' to indicate that the body should be returned,
`N' to suppress returning the body,
and
`P' to declare this as a ``primary'' (command line or SMTP-session) address.
.ip S
The sender address.
There may only be one of these lines.
.ip T
The job creation time.
This is used to compute when to time out the job.
.ip P
The current message priority.
This is used to order the queue.
Higher numbers mean lower priorities.
The priority changes
as the message sits in the queue.
The initial priority depends on the message class
and the size of the message.
.ip M
A message.
This line is printed by the
.i mailq
command,
and is generally used to store status information.
It can contain any text.
.ip F
Flag bits, represented as one letter per flag.
Defined flag bits are
.b r
indicating that this is a response message
and
.b w
indicating that a warning message has been sent
announcing that the mail has been delayed.
.ip N
The total number of delivery attempts.
.ip K
The time (as seconds since January 1, 1970)
of the last delivery attempt.
.ip I
The i-number of the data file;
this can be used to recover your mail queue
after a disastrous disk crash.
.ip $
A macro definition.
The values of certain macros
(as of this writing, only
.b $r
and
.b $s )
are passed through to the queue run phase.
.ip B
The body type.
The remainder of the line is a text string defining the body type.
If this field is missing,
the body type is assumed to be
.q "undefined"
and no special processing is attempted.
Legal values are
.q 7BIT
and
.q 8BITMIME .
.ip Z
The original envelope id (from the ESMTP transaction).
For Deliver Status Notifications only.
.pp
As an example,
the following is a queue file sent to
.q eric@mammoth.Berkeley.EDU
and
.q bostic@okeeffe.CS.Berkeley.EDU \**:
.(f
\**This example is contrived and probably inaccurate for your environment.
Glance over it to get an idea;
nothing can replace looking at what your own system generates.
.)f
.(b
V4
T711358135
K904446490
N0
P2100941
$_eric@localhost
${daemon_flags}
Seric
Ceric:100:1000:sendmail@vangogh.CS.Berkeley.EDU
RPFD:eric@mammoth.Berkeley.EDU
RPFD:bostic@okeeffe.CS.Berkeley.EDU
H?P?Return-path: <^g>
H??Received: by vangogh.CS.Berkeley.EDU (5.108/2.7) id AAA06703;
	Fri, 17 Jul 1992 00:28:55 -0700
H??Received: from mail.CS.Berkeley.EDU by vangogh.CS.Berkeley.EDU (5.108/2.7)
	id AAA06698; Fri, 17 Jul 1992 00:28:54 -0700
H??Received: from [128.32.31.21] by mail.CS.Berkeley.EDU (5.96/2.5)
	id AA22777; Fri, 17 Jul 1992 03:29:14 -0400
H??Received: by foo.bar.baz.de (5.57/Ultrix3.0-C)
	id AA22757; Fri, 17 Jul 1992 09:31:25 GMT
H?F?From: eric@foo.bar.baz.de (Eric Allman)
H?x?Full-name: Eric Allman
H??Message-id: <9207170931.AA22757@foo.bar.baz.de>
H??To: sendmail@vangogh.CS.Berkeley.EDU
H??Subject: this is an example message
.)b
This shows
the person who sent the message,
the submission time
(in seconds since January 1, 1970),
the message priority,
the message class,
the recipients,
and the headers for the message.
.+c "SUMMARY OF SUPPORT FILES"
.pp
This is a summary of the support files
that
.i sendmail
creates or generates.
Many of these can be changed by editing the sendmail.cf file;
check there to find the actual pathnames.
.nr ii 1i
.ip "/usr/\*(SD/sendmail"
The binary of
.i sendmail .
.ip /usr/\*(SB/newaliases
A link to /usr/\*(SD/sendmail;
causes the alias database to be rebuilt.
Running this program is completely equivalent to giving
.i sendmail
the
.b \-bi
flag.
.ip /usr/\*(SB/mailq
Prints a listing of the mail queue.
This program is equivalent to using the
.b \-bp
flag to
.i sendmail .
.ip /etc/mail/sendmail.cf
The configuration file,
in textual form.
.ip /etc/mail/helpfile
The SMTP help file.
.ip /etc/mail/statistics
A statistics file; need not be present.
.ip /etc/mail/sendmail.pid
Created in daemon mode;
it contains the process id of the current SMTP daemon.
If you use this in scripts;
use ``head \-1'' to get just the first line;
the second line contains the command line used to invoke the daemon,
and later versions of
.i sendmail
may add more information to subsequent lines.
.ip /etc/mail/aliases
The textual version of the alias file.
.ip /etc/mail/aliases.db
The alias file in
.i hash \|(3)
format.
.ip /etc/mail/aliases.{pag,dir}
The alias file in
.i ndbm \|(3)
format.
.ip /var/spool/mqueue
The directory in which the mail queue(s)
and temporary files reside.
.ip /var/spool/mqueue/qf*
Control (queue) files for messages.
.ip /var/spool/mqueue/df*
Data files.
.ip /var/spool/mqueue/tf*
Temporary versions of the qf files,
used during queue file rebuild.
.ip /var/spool/mqueue/xf*
A transcript of the current session.
.if o \
\{\
.	bp
.	rs
.	sp |4i
.	ce 2
This page intentionally left blank;
replace it with a blank sheet for double-sided output.
.\}
.\".ro
.\".ls 1
.\".tp
.\".sp 2i
.\".in 0
.\".ce 100
.\".sz 24
.\".b SENDMAIL
.\".sz 14
.\".sp
.\"INSTALLATION AND OPERATION GUIDE
.\".sp
.\".sz 10
.\"Eric Allman
.\".sp
.\"Version $Revision: 1.4 $
.\".ce 0
.bp 3
.ce
.sz 12
TABLE OF CONTENTS
.sz 10
.sp
.\" remove some things to avoid "out of temp file space" problem
.rm sh
.rm (x
.rm )x
.rm ip
.rm pp
.rm lp
.rm he
.rm fo
.rm eh
.rm oh
.rm ef
.rm of
.xp
.if o \
\{\
.	bp
.	rs
.	sp |4i
.	ce 2
This page intentionally left blank;
replace it with a blank sheet for double-sided output.
.\}