summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/mailx.1
blob: a710fd32fdff6e2a71704aed9ff0dbd071b18c1a (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
.\"
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
.\" permission to reproduce portions of its copyrighted documentation.
.\" Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\"
.\" The Institute of Electrical and Electronics Engineers and The Open
.\" Group, have given us permission to reprint portions of their
.\" documentation.
.\"
.\" In the following statement, the phrase ``this text'' refers to portions
.\" of the system documentation.
.\"
.\" Portions of this text are reprinted and reproduced in electronic form
.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
.\" Standard for Information Technology -- Portable Operating System
.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
.\" between these versions and the original IEEE and The Open Group
.\" Standard, the original IEEE and The Open Group Standard is the referee
.\" document.  The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\"
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
.\" Copyright (c) 2001, Sun Microsystems, Inc.  All Rights Reserved
.\"
.TH MAILX 1 "Dec 18, 2014"
.SH NAME
mailx \- interactive message processing system
.SH SYNOPSIS
.LP
.nf
\fBmailx\fR [\fB-BdeHiInNURvV~\fR] [\fB-f\fR [\fIfile\fR | \fI+folder\fR]] [\fB-T\fR \fIfile\fR]
     [\fB-u\fR \fIuser\fR]
.fi

.LP
.nf
\fBmailx\fR [\fB-BdFintUv~\fR] [\fB-b\fR \fIbcc\fR] [\fB-c\fR \fIcc\fR] [\fB-h\fR \fInumber\fR]
     [\fB-r\fR \fIaddress\fR] [\fB-s\fR \fIsubject\fR] \fIrecipient\fR...
.fi

.LP
.nf
\fB/usr/ucb/mail\fR ...
.fi

.LP
.nf
\fB/usr/ucb/Mail\fR ...
.fi

.SH DESCRIPTION
.LP
The mail utilities listed above provide a comfortable, flexible environment for
sending and receiving mail messages electronically.
.sp
.LP
When reading mail, the mail utilities provide commands to facilitate saving,
deleting, and responding to messages. When sending mail, the mail utilities
allow editing, reviewing and other modification of the message as it is
entered.
.sp
.LP
Incoming mail is stored in a standard file for each user, called the
\fBmailbox\fR for that user. When the mail utilities are called to read
messages, the \fBmailbox\fR is the default place to find them. As messages are
read, they are marked to be moved to a secondary file for storage, unless
specific action is taken, so that the messages need not be seen again.This
secondary file is called the \fBmbox\fR and is normally located in the user's
\fBHOME\fR directory (see \fBMBOX\fR in ENVIRONMENT VARIABLES for a description
of this file). Messages can be saved in other secondary files named by the
user. Messages remain in a secondary file until forcibly removed.
.sp
.LP
The user can access a secondary file by using the \fB-f\fR option. Messages in
the secondary file can then be read or otherwise processed using the same
\fBCommands\fR as in the primary \fBmailbox\fR. This gives rise within these
pages to the notion of a current \fBmailbox\fR.
.SH OPTIONS
.LP
On the command line options start with a dash (\(mi). Any other arguments are
taken to be destinations (recipients). If no recipients are specified,
\fBmailx\fR attempts to read messages from the \fBmailbox\fR.
.sp
.ne 2
.na
\fB\fB-B\fR\fR
.ad
.RS 17n
Do not buffer standard input or standard output.
.RE

.sp
.ne 2
.na
\fB\fB-b\fR \fIbcc\fR\fR
.ad
.RS 17n
Set the blind carbon copy list to \fIbcc\fR. \fIbcc\fR should be enclosed in
quotes if it contains more than one name.
.RE

.sp
.ne 2
.na
\fB\fB-c\fR \fIcc\fR\fR
.ad
.RS 17n
Set the carbon copy list to \fIcc\fR. \fIcc\fR should be enclosed in quotes if
it contains more than one name.
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.RS 17n
Turn on debugging output. (Neither particularly interesting nor recommended.)
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.RS 17n
Test for the presence of mail. \fBmailx\fR prints nothing and exits with a
successful return code if there is mail to read.
.RE

.sp
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.RS 17n
Record the message in a file named after the first recipient. Overrides the
\fBrecord\fR variable, if set (see \fBInternal Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-f\fR\fB [\fR\fIfile\fR\fB]\fR\fR
.ad
.RS 17n
Read messages from \fIfile\fR instead of \fBmailbox\fR. If no \fIfile\fR is
specified, the \fBmbox\fR is used.
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-f\fR\fB [ \fR\fB+\fR\fIfolder\fR\fB]\fR\fR
.ad
.RS 17n
Use the file \fIfolder\fR in the folder directory (same as the \fBfold\fRer
command). The name of this directory is listed in the \fBfolder\fR variable.
.RE

.sp
.ne 2
.na
\fB\fB-H\fR\fR
.ad
.RS 17n
Print header summary only.
.RE

.sp
.ne 2
.na
\fB\fB-h\fR \fInumber\fR\fR
.ad
.RS 17n
The number of network "hops" made so far. This is provided for network software
to avoid infinite delivery loops. This option and its argument are passed to
the delivery program.
.RE

.sp
.ne 2
.na
\fB\fB-I\fR\fR
.ad
.RS 17n
Include the newsgroup and article-id header lines when printing mail messages.
This option requires the \fB-f\fR option to be specified.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.RS 17n
Ignore interrupts. See also \fBignore\fR in \fBInternal Variables\fR.
.RE

.sp
.ne 2
.na
\fB\fB-N\fR\fR
.ad
.RS 17n
Do not print initial header summary.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 17n
Do not initialize from the system default \fBmailx.rc\fR or \fBMail.rc\fR file.
See USAGE.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR \fIaddress\fR\fR
.ad
.RS 17n
Use \fIaddress\fR as the return address when invoking the delivery program. All
tilde commands are disabled. This option and its argument is passed to the
delivery program.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR \fIsubject\fR\fR
.ad
.RS 17n
Set the Subject header field to \fIsubject\fR. \fIsubject\fR should be enclosed
in quotes if it contains embedded white space.
.RE

.sp
.ne 2
.na
\fB\fB-T\fR \fIfile\fR\fR
.ad
.RS 17n
Message-id and article-id header lines are recorded in \fIfile\fR after the
message is read. This option also sets the \fB-I\fR option.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 17n
Scan the input for \fBTo:\fR, \fBCc:\fR, and \fBBcc:\fR fields. Any recipients
on the command line will be ignored.
.RE

.sp
.ne 2
.na
\fB\fB-U\fR\fR
.ad
.RS 17n
Convert \fBUUCP-style\fR addresses to internet standards.  Overrides the
\fBconv\fR environment variable.
.RE

.sp
.ne 2
.na
\fB\fB-u\fR \fIuser\fR\fR
.ad
.RS 17n
Read \fIuser\fR's \fBmailbox\fR. This is only effective if \fIuser\fR's
\fBmailbox\fR is not read protected.
.RE

.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.RS 17n
Print the \fBmailx\fR version number and exit.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 17n
Pass the \fB-v\fR flag to \fBsendmail\fR(1M).
.RE

.sp
.ne 2
.na
\fB\fB-~\fR\fR
.ad
.RS 17n
Interpret tilde escapes in the input even if not reading from a tty.
.RE

.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIrecipient\fR\fR
.ad
.RS 13n
Addressee of message.
.RE

.SH USAGE
.SS "Starting Mail"
.LP
At startup time, \fBmailx\fR executes the system startup file
\fB/etc/mail/mailx.rc\fR. If invoked as \fBmail\fR or \fBMail\fR, the system
startup file \fB/etc/mail/Mail.rc\fR is used instead.
.sp
.LP
The system startup file sets  up initial display options and alias lists and
assigns values to some internal variables. These variables are flags and valued
parameters which are set and cleared using the \fBse\fRt and \fBuns\fRet
commands. See \fBInternal Variables\fR.
.sp
.LP
With the following exceptions, regular commands are legal inside startup files:
\fB!\fR, \fBC\fRopy, \fBe\fRdit, \fBfo\fRllowup, \fBF\fRollowup, \fBho\fRld,
\fBm\fRail, \fBpre\fRserve, \fBr\fReply, \fBR\fReply, \fBsh\fRell, and
\fBv\fRisual. An error in the startup file causes the remaining lines in the
file to be ignored.
.sp
.LP
After executing the system startup file,  the mail utilities execute the
optional personal startup file \fB$HOME/.mailrc\fR, wherein the user can
override the values of the internal variables as set by the system startup
file.
.sp
.LP
If the \fB-n\fR option is specified, however, the mail utilities do not execute
the system startup file.
.sp
.LP
Many system administrators include the commands
.sp
.in +2
.nf
set appenddeadletter
unset replyall
unset pipeignore
.fi
.in -2
.sp

.sp
.LP
in the system startup files (to be compatible with past Solaris behavior), but
this does not meet standards requirements for \fBmailx\fR. To get standard
behavior for \fBmailx\fR, users should use the \fB-n\fR option or include the
following commands in a personal startup file:
.sp
.in +2
.nf
unset appenddeadletter
set replyall
set pipeignore
.fi
.in -2
.sp

.sp
.LP
When reading mail, the mail utilities are in \fIcommand mode\fR. A header
summary of the first several messages is displayed, followed by a prompt
indicating the mail utilities can accept regular commands (see \fBCommands\fR
below). When sending mail, the mail utilities are in \fIinput mode\fR. If no
subject is specified on the command line, and the \fBasksub\fR variable is set,
a prompt for the subject is printed.
.sp
.LP
As the message is typed, the mail utilities read the message and store it in a
temporary file. Commands may be entered by beginning a line with the tilde (~)
escape character followed by a single command letter and optional arguments.
See \fBTilde Escapes\fR for a summary of these commands.
.SS "Reading Mail"
.LP
Each message is assigned a sequential number, and there is at any time the
notion of a current message, marked by a right angle bracket (>) in the header
summary. Many commands take an optional list of messages (\fImessage-list\fR)
to operate on.  In most cases, the current message is set to the
highest-numbered message in the list after the command is finished executing.
.sp
.LP
The default for \fImessage-list\fR is the current message. A \fImessage-list\fR
is a list of message identifiers separated by spaces, which may include:
.sp
.ne 2
.na
\fB\fIn\fR\fR
.ad
.RS 11n
Message number \fIn\fR.
.RE

.sp
.ne 2
.na
\fB\fB\&.\fR\fR
.ad
.RS 11n
The current message.
.RE

.sp
.ne 2
.na
\fB\fB^\fR\fR
.ad
.RS 11n
The first undeleted message.
.RE

.sp
.ne 2
.na
\fB\fB$\fR\fR
.ad
.RS 11n
The last message.
.RE

.sp
.ne 2
.na
\fB\fB*\fR\fR
.ad
.RS 11n
All messages.
.RE

.sp
.ne 2
.na
\fB\fB+\fR\fR
.ad
.RS 11n
The next undeleted message.
.RE

.sp
.ne 2
.na
\fB\fB\(mi\fR\fR
.ad
.RS 11n
The previous undeleted message.
.RE

.sp
.ne 2
.na
\fB\fIn\fR\fB\(mi\fR\fIm\fR\fR
.ad
.RS 11n
An inclusive range of message numbers.
.RE

.sp
.ne 2
.na
\fB\fIuser\fR\fR
.ad
.RS 11n
All messages from \fIuser\fR.
.RE

.sp
.ne 2
.na
\fB\fI/string\fR\fR
.ad
.RS 11n
All messages with \fIstring\fR in the Subject line (case ignored).
.RE

.sp
.ne 2
.na
\fB\fB:\fR\fIc\fR\fR
.ad
.RS 11n
All messages of type \fIc\fR, where \fIc\fR is one of:
.sp
.ne 2
.na
\fB\fBd\fR\fR
.ad
.RS 5n
deleted messages
.RE

.sp
.ne 2
.na
\fB\fBn\fR\fR
.ad
.RS 5n
new messages
.RE

.sp
.ne 2
.na
\fB\fBo\fR\fR
.ad
.RS 5n
old messages
.RE

.sp
.ne 2
.na
\fB\fBr\fR\fR
.ad
.RS 5n
read messages
.RE

.sp
.ne 2
.na
\fB\fBu\fR\fR
.ad
.RS 5n
unread messages
.RE

Notice that the context of the command determines whether this type of message
specification makes sense.
.RE

.sp
.LP
Other arguments are usually arbitrary strings whose usage depends on the
command involved. Filenames, where expected, are expanded using the normal
shell conventions (see \fBsh\fR(1)). Special characters are recognized by
certain commands and are documented with the commands below.
.SS "Sending Mail"
.LP
Recipients listed on the command line may be of three types: login names, shell
commands, or alias groups. Login names may be any network address, including
mixed network addressing. If mail is found to be undeliverable, an attempt is
made to return it to the sender's \fBmailbox\fR. If the \fBexpandaddr\fR option
is not set (the default), then the following rules do not apply and the name of
the recipient must be a local mailbox or network address. If the recipient name
begins with a pipe symbol ( | ), the rest of the name is taken to be a shell
command to pipe the message through. This provides an automatic interface with
any program that reads the standard input, such as \fBlp\fR(1) for recording
outgoing mail on paper.
.sp
.LP
Alias groups are set by the \fBa\fRlias command (see \fBCommands\fR below) or in
a system startup file (for example, \fB$HOME/.mailrc\fR). Aliases are lists of
recipients of any type.
.SS "Forwarding Mail"
.LP
To forward a specific message, include it in a message to the desired
recipients with the \fB~f\fR or \fB~m\fR tilde escapes. See \fBTilde\fR
\fBEscapes\fR below. To forward mail automatically, add a comma-separated list
of addresses for additional recipients to the \fB\&.forward\fR file in your
home directory. This is different from the format of the \fBalias\fR command,
which takes a space-separated list instead. \fBNote:\fR Forwarding addresses
must be valid, or the messages will "bounce." You cannot, for instance, reroute
your mail to a new host by forwarding it to your new address if it is not yet
listed in the \fBNIS\fR aliases domain.
.SS "Commands"
.LP
Regular commands are of the form
.sp
.in +2
.nf
[ \fIcommand\fR ] [ \fImessage-list\fR ] [ \fIarguments\fR ]
.fi
.in -2
.sp

.sp
.LP
In \fIinput mode\fR, commands are recognized by the escape character,
\fBtilde(~)\fR, and lines not treated as commands are taken as input for the
message. If no command is specified in \fIcommand mode\fR, \fBn\fRext is
assumed. The following is a complete list of \fBmailx\fR commands:
.sp
.ne 2
.na
\fB\fB!\fR\fIshell-command\fR\fR
.ad
.sp .6
.RS 4n
Escape to the shell. See \fBSHELL\fR in ENVIRONMENT VARIABLES.
.RE

.sp
.ne 2
.na
\fB\fB#\fR \fIcomment\fR\fR
.ad
.sp .6
.RS 4n
\fINULL\fR command (comment). Useful in \fBmailrc\fR files.
.RE

.sp
.ne 2
.na
\fB\fB=\fR\fR
.ad
.sp .6
.RS 4n
Print the current message number.
.RE

.sp
.ne 2
.na
\fB\fB?\fR\fR
.ad
.sp .6
.RS 4n
Prints a summary of commands.
.RE

.sp
.ne 2
.na
\fB\fBa\fRlias \fIalias name\fR .\|.\|.\fR
.ad
.br
.na
\fB\fBg\fRroup \fIalias name\fR .\|.\|.\fR
.ad
.sp .6
.RS 4n
Declare an alias for the given names. The names are substituted when
\fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file. With no
arguments, the command displays the list of defined aliases.
.RE

.sp
.ne 2
.na
\fB\fBalt\fRernates \fIname .\|.\|.\fR\fR
.ad
.sp .6
.RS 4n
Declare a list of alternate names for your login. When responding to a message,
these names are removed from the list of recipients for the response. With no
arguments, print the current list of alternate names. See also \fBallnet\fR in
\fBInternal Variables\fR.
.RE

.sp
.ne 2
.na
\fB\fBcd\fR [\fIdirectory\fR]\fR
.ad
.br
.na
\fB\fBch\fRdir [\fIdirectory\fR]\fR
.ad
.sp .6
.RS 4n
Change directory. If \fIdirectory\fR is not specified, \fB$HOME\fR is used.
.RE

.sp
.ne 2
.na
\fB\fBc\fRopy [\fIfile\fR]\fR
.ad
.br
.na
\fB\fBc\fRopy [\fImessage-list\fR] \fIfile\fR\fR
.ad
.sp .6
.RS 4n
Copy messages to the file without marking the messages as saved. Otherwise
equivalent to the \fBs\fRave command.
.RE

.sp
.ne 2
.na
\fB\fBC\fRopy [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Save the specified messages in a file whose name is derived from the author of
the message to be saved, without marking the messages as saved. Otherwise
equivalent to the \fBS\fRave command.
.RE

.sp
.ne 2
.na
\fB\fBd\fRelete [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Delete messages from the \fBmailbox\fR. If \fBautoprint\fR is set, the next
message after the last one deleted is printed (see \fBInternal Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fBdi\fRscard [\fIheader-field\fR.\|.\|.\|]\fR
.ad
.br
.na
\fB\fBig\fRnore [\fIheader-field\fR.\|.\|.\|]\fR
.ad
.sp .6
.RS 4n
Suppress printing of the specified header fields when displaying messages on
the screen. Examples of header fields to ignore are \fBStatus\fR and
\fBReceived\fR. The fields are included when the message is saved, unless the
\fBalwaysignore\fR variable is set. The \fBMo\fRre, \fBPa\fRge, \fBP\fRrint,
and \fBT\fRype commands override this command. If no header is specified, the
current list of header fields being ignored is printed. See also the
\fBundi\fRscard and \fBunig\fRnore commands.
.RE

.sp
.ne 2
.na
\fB\fBdp\fR [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBdt \fR[\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Delete the specified messages from the \fBmailbox\fR and print the next message
after the last one deleted. Roughly equivalent to a \fBd\fRelete command
followed by a \fBp\fRrint command.
.RE

.sp
.ne 2
.na
\fB\fBec\fRho \fIstring \fR.\|.\|.\fR
.ad
.sp .6
.RS 4n
Echo the given strings (like \fBecho\fR(1)).
.RE

.sp
.ne 2
.na
\fB\fBe\fRdit [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Edit the given messages. Each message is placed in a temporary file and the
program named by the \fBEDITOR\fR variable is invoked to edit it (see
ENVIRONMENT VARIABLES). Default editor is \fBed\fR(1).
.RE

.sp
.ne 2
.na
\fB\fBexpandaddr\fR\fR
.ad
.sp .6
.RS 4n
Causes recipient addresses to be expanded based on the discussion in the section
\fBSending Mail\fR. Note that enabling this option allows for addresses that can
cause arbitrary command execution by starting with the \fB|\fR character.
.RE

.sp
.ne 2
.na
\fB\fBex\fRit\fR
.ad
.br
.na
\fB\fBx\fRit\fR
.ad
.sp .6
.RS 4n
Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
saved in the \fBmbox\fR (see also \fBq\fRuit).
.RE

.sp
.ne 2
.na
\fB\fBfie\fRld [\fImessage-list\fR] header-file\fR
.ad
.sp .6
.RS 4n
Display the value of the header field in the specified message.
.RE

.sp
.ne 2
.na
\fB\fBfi\fRle [\fIfile\fR]\fR
.ad
.br
.na
\fB\fBfold\fRer [\fIfile\fR]\fR
.ad
.sp .6
.RS 4n
Quit from the current file of messages and read in the specified file. Several
special characters are recognized when used as file names:
.sp
.ne 2
.na
\fB\fB%\fR\fR
.ad
.RS 9n
the current \fBmailbox\fR.
.RE

.sp
.ne 2
.na
\fB\fB%\fR\fIuser\fR\fR
.ad
.RS 9n
the \fBmailbox\fR for \fIuser\fR.
.RE

.sp
.ne 2
.na
\fB\fB#\fR\fR
.ad
.RS 9n
the previous mail file.
.RE

.sp
.ne 2
.na
\fB\fB&\fR\fR
.ad
.RS 9n
the current \fBmbox\fR.
.RE

.sp
.ne 2
.na
\fB\fB+\fR\fIfile\fR\fR
.ad
.RS 9n
The named file in the \fIfolder\fR directory (listed in the \fBfolder\fR
variable).
.RE

With no arguments, print the name of the current mail file, and the number of
messages and characters it contains.
.RE

.sp
.ne 2
.na
\fB\fBfolders\fR\fR
.ad
.sp .6
.RS 4n
Print the names of the files in the directory set by the \fBfolder\fR variable
(see \fBInternal Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fBFo\fRllowup [\fImessage\fR]\fR
.ad
.sp .6
.RS 4n
Respond to a message, recording the response in a file whose name is derived
from the author of the message. Overrides the \fBrecord\fR variable, if set. If
the \fBreplyall\fR variable is set, the actions of \fBFo\fRllowup and
\fBfo\fRllowup are reversed. See also the \fBf\fRollowup, \fBS\fRave, and
\fBC\fRopy commands and \fBoutfolder\fR in \fBInternal Variables\fR, and the
\fBStarting Mail\fR section in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBf\fRollowup [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Respond to the first message in the \fImessage-list\fR, sending the message to
the author of each message in the \fImessage-list\fR. The subject line is taken
from the first message and the response is recorded in a file whose name is
derived from the author of the first message. If the \fBreplyall\fR variable is
set, the actions of \fBfo\fRllowup and \fBFo\fRllowup are reversed. See also
the \fBFo\fRllowup, \fBS\fRave, and \fBC\fRopy commands and \fBoutfolder\fR in
\fBInternal Variables\fR, and the \fBStarting Mail\fR section in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBf\fRrom [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the header summary for the specified messages. If no messages are
specified, print the header summary for the current message.
.RE

.sp
.ne 2
.na
\fB\fBg\fRroup \fIalias name \fR.\|.\|.\fR
.ad
.br
.na
\fB\fBa\fRlias \fIalias name \fR.\|.\|.\fR
.ad
.sp .6
.RS 4n
Declare an alias for the given names. The names are substituted when
\fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file.
.RE

.sp
.ne 2
.na
\fB\fBh\fReaders [\fImessage\fR]\fR
.ad
.sp .6
.RS 4n
Print the page of headers which includes the message specified. The
\fBscreen\fR variable sets the number of headers per page (see \fBInternal
Variables\fR). See also the \fBz\fR command.
.RE

.sp
.ne 2
.na
\fB\fBhel\fRp\fR
.ad
.sp .6
.RS 4n
Print a summary of commands.
.RE

.sp
.ne 2
.na
\fB\fBho\fRld [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBpre\fRserve [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Hold the specified messages in the \fBmailbox\fR.
.RE

.sp
.ne 2
.na
\fB\fBi\fRf \fBs\fR | \fBr\fR | \fBt\fR\fR
.ad
.br
.na
\fB\fImail-commands\fR\fR
.ad
.br
.na
\fB\fR
.ad
.br
.na
\fB\fBel\fRse\fR
.ad
.br
.na
\fB\fImail-commands\fR\fR
.ad
.br
.na
\fB\fR
.ad
.br
.na
\fB\fBen\fRdif\fR
.ad
.sp .6
.RS 4n
Conditional execution, where \fIs\fR executes following \fImail-commands\fR, up
to an \fBel\fRse or \fBen\fRdif, if the program is in \fIsend\fR mode, \fIr\fR
causes the \fImail-commands\fR to be executed only in \fIreceive\fR mode, and
\fBt\fR causes the \fImail-commands\fR to be executed only if \fBmailx\fR is
being run from a terminal. Useful in the \fBmailrc\fR file.
.RE

.sp
.ne 2
.na
\fB\fBinc\fR\fR
.ad
.sp .6
.RS 4n
Incorporate messages that arrive while you are reading the system mailbox. The
new messages are added to the message list in the current \fBmail\fR session.
This command does not commit changes made during the session, and prior
messages are not renumbered.
.RE

.sp
.ne 2
.na
\fB\fBig\fRnore [\fIheader-field \fR.\|.\|.\|]\fR
.ad
.br
.na
\fB\fBdi\fRscard [\fIheader-field \fR.\|.\|.\|]\fR
.ad
.sp .6
.RS 4n
Suppress printing of the specified header fields when displaying messages on
the screen. Examples of header fields to ignore are \fBStatus\fR and \fBCc\fR.
All fields are included when the message is saved. The \fBMo\fRre, \fBPa\fRge,
\fBP\fRrint and \fBT\fRype commands override this command. If no header is
specified, the current list of header fields being ignored is printed. See also
the \fBundi\fRscard and \fBunig\fRnore commands.
.RE

.sp
.ne 2
.na
\fB\fBl\fRist\fR
.ad
.sp .6
.RS 4n
Print all commands available. No explanation is given.
.RE

.sp
.ne 2
.na
\fB\fBlo\fRad\fR
.ad
.sp .6
.RS 4n
[\fImessage\fR] \fBfile\fR The specified message is replaced by the message in
the named file. \fBfile\fR should contain a single mail message including mail
headers (as saved by the \fBs\fRave command).
.RE

.sp
.ne 2
.na
\fB\fBm\fRail \fIrecipient \fR.\|.\|.\fR
.ad
.sp .6
.RS 4n
Mail a message to the specified recipients.
.RE

.sp
.ne 2
.na
\fB\fBM\fRail \fIrecipient\fR\fR
.ad
.sp .6
.RS 4n
Mail a message to the specified recipients, and record it in a file whose name
is derived from the author of the message. Overrides the \fBrecord\fR variable,
if set. See also the \fBSave\fR and \fBCopy\fR commands and \fBoutfolder\fR in
\fBInternal Variables\fR.
.RE

.sp
.ne 2
.na
\fB\fBmb\fRox [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Arrange for the given messages to end up in the standard \fBmbox\fR save file
when \fBmailx\fR terminates normally. See \fBMBOX\fR in ENVIRONMENT VARIABLES
for a description of this file. See also the \fBex\fRit and \fBq\fRuit
commands.
.RE

.sp
.ne 2
.na
\fB\fBmo\fRre [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBpa\fRge [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the specified messages. If \fBcrt\fR is set, the messages longer than the
number of lines specified by the \fBcrt\fR variable are paged through the
command specified by the \fBPAGER\fR variable. The default command is
\fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
\fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBp\fRrint and
\fBt\fRype commands.
.RE

.sp
.ne 2
.na
\fB\fBMo\fRre [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBPa\fRge [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the specified messages on the screen, including all header fields.
Overrides suppression of fields by the \fBig\fRnore command. Same as the
\fBP\fRrint and \fBT\fRype commands.
.RE

.sp
.ne 2
.na
\fB\fBne\fRw [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBN\fRew [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBunr\fRead [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBU\fRnread\fR
.ad
.sp .6
.RS 4n
[\fImessage-list\fR] Take a message list and mark each message as \fInot\fR
having been read.
.RE

.sp
.ne 2
.na
\fB\fBn\fRext [\fImessage\fR]\fR
.ad
.sp .6
.RS 4n
Go to the next message matching \fImessage\fR. If message is not supplied, this
command finds the next message that was not deleted or saved. A
\fImessage-list\fR may be specified, but in this case the first valid message
in the list is the only one used. This is useful for jumping to the next
message from a specific user, since the name would be taken as a command in the
absence of a real command. See the discussion of \fImessage-list\fR above for a
description of possible message specifications.
.RE

.sp
.ne 2
.na
\fB\fBpi\fRpe [\fImessage-list\fR] [\fIshell-command\fR]\fR
.ad
.br
.na
\fB\fB|\fR [\fImessage-list\fR] [\fIshell-command\fR]\fR
.ad
.sp .6
.RS 4n
Pipe the message through the given \fIshell-command\fR. The message is treated
as if it were read. If no arguments are given, the current message is piped
through the command specified by the value of the \fBcmd\fR variable. If the
\fBpage\fR variable is set, a form feed character is inserted after each
message (see \fBInternal Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fBpre\fRserve [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBho\fRld [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Preserve the specified messages in the \fBmailbox\fR.
.RE

.sp
.ne 2
.na
\fB\fBp\fRrint [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBt\fRype [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the specified messages. If \fBcrt\fR is set, the messages longer than the
number of lines specified by the \fBcrt\fR variable are paged through the
command specified by the \fBPAGER\fR variable. The default command is
\fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
\fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBmo\fRre and \fBpa\fRge
commands.
.RE

.sp
.ne 2
.na
\fB\fBP\fRrint [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBT\fRype [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the specified messages on the screen, including all header fields.
Overrides suppression of fields by the \fBig\fRnore command.  Same as the
\fBMo\fRre and \fBPa\fRge commands.
.RE

.sp
.ne 2
.na
\fB\fBpu\fRt [\fIfile\fR]\fR
.ad
.br
.na
\fB\fBpu\fRt [\fImessage-list\fR] \fIfile\fR\fR
.ad
.sp .6
.RS 4n
Save the specified message in the given file. Use the same conventions as the
\fBp\fRrint command for which header fields are ignored.
.RE

.sp
.ne 2
.na
\fB\fBPu\fRt [\fIfile\fR]\fR
.ad
.br
.na
\fB\fBPu\fRt [\fImessage-list\fR] \fIfile\fR\fR
.ad
.sp .6
.RS 4n
Save the specified message in the given file. Overrides suppression of fields
by the \fBig\fRnore command.
.RE

.sp
.ne 2
.na
\fB\fBq\fRuit\fR
.ad
.sp .6
.RS 4n
Exit from \fBmailx\fR, storing messages that were read in \fBmbox\fR and unread
messages in the \fBmailbox\fR. Messages that have been explicitly saved in a
file are deleted unless the \fBkeepsave\fR variable is set.
.RE

.sp
.ne 2
.na
\fB\fBr\fReply [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBr\fRespond [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBreplys\fRender [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Send a response to the author of each message in the \fImessage-list\fR. The
subject line is taken from the first message.  If \fBrecord\fR is set to a
file, a copy of the reply is added to that file. If the \fBreplyall\fR variable
is set, the actions of \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond
are reversed. The \fBreplys\fRender command is not affected by the
\fBreplyall\fR variable, but sends each reply only to the sender of each
message. See the \fBStarting Mail\fR section in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBR\fReply [\fImessage\fR]\fR
.ad
.br
.na
\fB\fBR\fRespond [\fImessage\fR]\fR
.ad
.br
.na
\fB\fBreplya\fRll [\fImessage\fR]\fR
.ad
.sp .6
.RS 4n
Reply to the specified message, including all other recipients of that message.
If the variable \fBrecord\fR is set to a file, a copy of the reply added to
that file. If the \fBreplyall\fR variable is set, the actions of
\fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond are reversed. The
\fBreplya\fRll command is not affected by the \fBreplyall\fR variable, but
always sends the reply to all recipients of the message. See the \fBStarting
Mail\fR section in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBret\fRain\fR
.ad
.sp .6
.RS 4n
Add the list of header fields named to the \fIretained list\fR. Only the header
fields in the retain list are shown on your terminal when you print a message.
All other header fields are suppressed.  The set of retained fields specified
by the \fBret\fRain command overrides any list of ignored fields specified by
the \fBig\fRnore command. The \fBT\fRype and \fBP\fRrint commands can be used
to print a message in its entirety. If \fBret\fRain is executed with no
arguments, it lists the current set of retained fields.
.RE

.sp
.ne 2
.na
\fB\fBS\fRave [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Save the specified messages in a file whose name is derived from the author of
the first message. The name of the file is taken to be the author's name with
all network addressing stripped off. See also the \fBC\fRopy, \fBfo\fRllowup,
and \fBF\fRollowup commands and \fBoutfolder\fR in \fBInternal Variables\fR.
.RE

.sp
.ne 2
.na
\fB\fBs\fRave [\fIfile\fR]\fR
.ad
.br
.na
\fB\fBs\fRave [\fImessage-list\fR] \fIfile\fR\fR
.ad
.sp .6
.RS 4n
Save the specified messages in the given file. The file is created if it does
not exist. The file defaults to \fBmbox\fR. The message is deleted from the
\fBmailbox\fR when \fBmailx\fR terminates unless \fBkeepsave\fR is set (see
also \fBInternal Variables\fR and the \fBex\fRit and \fBq\fRuit commands).
.RE

.sp
.ne 2
.na
\fB\fBse\fRt\fR
.ad
.br
.na
\fB\fBse\fRt \fIvariable\fR\fR
.ad
.br
.na
\fB\fBse\fRt \fIvariable\fR\fB=\fR\fIstring\fR\fR
.ad
.br
.na
\fB\fBse\fRt \fIvariable\fR\fB=\fR\fInumber\fR\fR
.ad
.sp .6
.RS 4n
Define a \fIvariable\fR. To assign a \fIvalue\fR to \fIvariable\fR, separate
the variable name from the value by an `\fB=\fR' (there must be no space before
or after the `\fB=\fR'). A variable may be given a null, string, or numeric
\fIvalue\fR. To embed SPACE characters within a \fIvalue\fR, enclose it in
quotes.
.sp
With no arguments, \fBse\fRt displays all defined variables and any values they
might have. See \fBInternal Variables\fR for a description of all predefined
\fBmail\fR variables.
.RE

.sp
.ne 2
.na
\fB\fBsh\fRell\fR
.ad
.sp .6
.RS 4n
Invoke an interactive shell. See also \fBSHELL\fR in ENVIRONMENT VARIABLES.
.RE

.sp
.ne 2
.na
\fB\fBsi\fRze [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the size in characters of the specified messages.
.RE

.sp
.ne 2
.na
\fB\fBso\fRurce \fIfile\fR\fR
.ad
.sp .6
.RS 4n
Read commands from the given file and return to command mode.
.RE

.sp
.ne 2
.na
\fB\fBto\fRp [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the top few lines of the specified messages. If the \fBtoplines\fR
variable is set, it is taken as the number of lines to print (see \fBInternal
Variables\fR). The default is 5.
.RE

.sp
.ne 2
.na
\fB\fBtou\fRch [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Touch the specified messages. If any message in \fImessage-list\fR is not
specifically saved in a file, it is placed in the \fBmbox\fR, or the file
specified in the \fBMBOX\fR environment variable, upon normal termination. See
\fBex\fRit and \fBq\fRuit.
.RE

.sp
.ne 2
.na
\fB\fBT\fRype [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBP\fRrint [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the specified messages on the screen, including all header fields.
Overrides suppression of fields by the \fBig\fRnore command.
.RE

.sp
.ne 2
.na
\fB\fBt\fRype [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBp\fRrint [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Print the specified messages. If \fBcrt\fR is set, the messages longer than the
number of lines specified by the \fBcrt\fR variable are paged through the
command specified by the \fBPAGER\fR variable. The default command is
\fBpg\fR(1). See ENVIRONMENT VARIABLES.
.RE

.sp
.ne 2
.na
\fB\fBuna\fRlias [\fBalias\fR] .\|.\|.\fR
.ad
.br
.na
\fB\fBung\fRroup [\fBalias\fR] .\|.\|.\fR
.ad
.sp .6
.RS 4n
Remove the definitions of the specified aliases.
.RE

.sp
.ne 2
.na
\fB\fBu\fRndelete [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Restore the specified deleted messages. Will only restore messages deleted in
the current mail session. If \fBautoprint\fR is set, the last message of those
restored is printed (see \fBInternal Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fBundi\fRscard [\fIheader-field\fR\|.\|.\|.]\fR
.ad
.br
.na
\fB\fBunig\fRnore [\fIheader-field\fR\|.\|.\|.]\fR
.ad
.sp .6
.RS 4n
Remove the specified header fields from the list being ignored. If no header
fields are specified, all header fields are removed from the list being
ignored.
.RE

.sp
.ne 2
.na
\fB\fBunret\fRain [\fIheader-field\fR\|.\|.\|.]\fR
.ad
.sp .6
.RS 4n
Remove the specified header fields from the list being retained. If no header
fields are specified, all header fields are removed from the list being
retained.
.RE

.sp
.ne 2
.na
\fB\fBunr\fRead [\fImessage-list\fR]\fR
.ad
.br
.na
\fB\fBU\fRnread [\fImessage-list\fR] Same as the \fBne\fRw command.\fR
.ad
.sp .6
.RS 4n

.RE

.sp
.ne 2
.na
\fB\fBuns\fRet \fIvariable\fR\|.\|.\|.\fR
.ad
.sp .6
.RS 4n
Erase the specified variables. If the variable was imported from the
environment (that is, an environment variable or exported shell variable), it
cannot be unset from within \fBmailx\fR.
.RE

.sp
.ne 2
.na
\fB\fBve\fRrsion\fR
.ad
.sp .6
.RS 4n
Print the current version and release date of the \fBmailx\fR utility.
.RE

.sp
.ne 2
.na
\fB\fBv\fRisual [\fImessage-list\fR]\fR
.ad
.sp .6
.RS 4n
Edit the given messages with a screen editor. Each messages is placed in a
temporary file and the program named by the \fBVISUAL\fR variable is invoked to
edit it (see ENVIRONMENT VARIABLES). Notice that the default visual editor is
\fBvi\fR.
.RE

.sp
.ne 2
.na
\fB\fBw\fRrite [\fImessage-list\fR] \fBfile\fR\fR
.ad
.sp .6
.RS 4n
Write the given messages on the specified file, minus the header and trailing
blank line. Otherwise equivalent to the \fBs\fRave command.
.RE

.sp
.ne 2
.na
\fB\fBx\fRit\fR
.ad
.br
.na
\fB\fBex\fRit\fR
.ad
.sp .6
.RS 4n
Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
saved in the \fBmbox\fR (see also \fBq\fRuit).
.RE

.sp
.ne 2
.na
\fB\fBz\fR[\fB+\fR\||\|\fB\(mi\fR]\fR
.ad
.sp .6
.RS 4n
Scroll the header display forward or backward one screen\(mifull. The number of
headers displayed is set by the \fBscreen\fR variable (see \fBInternal
Variables\fR).
.RE

.SS "Tilde Escapes"
.LP
The following tilde escape commands can be used when composing mail to send.
These may be entered only from \fIinput mode\fR, by beginning a line with the
tilde escape character (~). See \fBescape\fR in \fBInternal Variables\fR for
changing this special character. The escape character can be entered as text by
typing it twice.
.sp
.ne 2
.na
\fB\fB~\|!\fR\fIshell-command\fR\fR
.ad
.RS 23n
Escape to the shell. If present, run \fIshell-command\fR.
.RE

.sp
.ne 2
.na
\fB\fB~.\fR\fR
.ad
.RS 23n
Simulate end of file (terminate message input).
.RE

.sp
.ne 2
.na
\fB\fB~\|:\fR\fImail-command\fR\fR
.ad
.br
.na
\fB\fB~_\|\fR\fImail-command\fR\fR
.ad
.RS 23n
Perform the command-level request. Valid only when sending a message while
reading mail.
.RE

.sp
.ne 2
.na
\fB\fB~?\fR\fR
.ad
.RS 23n
Print a summary of tilde escapes.
.RE

.sp
.ne 2
.na
\fB\fB~A\fR\fR
.ad
.RS 23n
Insert the autograph string \fBSign\fR into the message (see \fBInternal
Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fB~a\fR\fR
.ad
.RS 23n
Insert the autograph string \fBsign\fR into the message (see \fBInternal
Variables\fR).
.RE

.sp
.ne 2
.na
\fB\fB~b\fR\fI name \|.\|.\|.\fR\fR
.ad
.RS 23n
Add the \fIname\fRs to the blind carbon copy (\fBBcc\fR) list. This is like the
carbon copy (\fBCc\fR) list, except that the names in the \fBBcc\fR list are
not shown in the header of the mail message.
.RE

.sp
.ne 2
.na
\fB\fB~c\fR\fI name \|.\|.\|.\fR\fR
.ad
.RS 23n
Add the \fIname\fRs to the carbon copy (\fBCc\fR) list.
.RE

.sp
.ne 2
.na
\fB\fB~d\fR\fR
.ad
.RS 23n
Read in the \fBdead-letter\fR file. See \fBDEAD\fR in ENVIRONMENT VARIABLES for
a description of this file.
.RE

.sp
.ne 2
.na
\fB\fB~e\fR\fR
.ad
.RS 23n
Invoke the editor on the partial message. See also \fBEDITOR\fR in ENVIRONMENT
VARIABLES.
.RE

.sp
.ne 2
.na
\fB\fB~f\fR [\fImessage-list\fR]\fR
.ad
.RS 23n
Forward the specified message, or the current message being read. Valid only
when sending a message while reading mail. The messages are inserted into the
message without alteration (as opposed to the \fB~m\fR escape).
.RE

.sp
.ne 2
.na
\fB\fB~F\fR [\fImessage-list\fR]\fR
.ad
.RS 23n
Forward the specified message, or the current message being read, including all
header fields. Overrides the suppression of fields by the \fBig\fRnore command.
.RE

.sp
.ne 2
.na
\fB\fB~h\fR\fR
.ad
.RS 23n
Prompt for \fBSubject\fR line and \fBTo\fR, \fBCc\fR, and \fBBcc\fR lists. If
the field is displayed with an initial value, it may be edited as if you had
just typed it.
.RE

.sp
.ne 2
.na
\fB\fB~i\fR \fIvariable\fR\fR
.ad
.RS 23n
Insert the value of the named variable into the text of the message. For
example, \fB~A\fR is equivalent to `\fB~i Sign\fR.' Environment variables set
and exported in the shell are also accessible by \fB~i\fR.
.RE

.sp
.ne 2
.na
\fB\fB~m\fR [\fImessage-list\fR]\fR
.ad
.RS 23n
Insert the listed messages, or the current message being read into the letter.
Valid only when sending a message while reading mail. The text of the message
is shifted to the right, and the string contained in the \fBindentprefix\fR
variable is inserted as the leftmost characters of each line. If
\fBindentprefix\fR is not set, a TAB character is inserted into each line.
.RE

.sp
.ne 2
.na
\fB\fB~M\fR [\fImessage-list\fR]\fR
.ad
.RS 23n
Insert the listed messages, or the current message being read, including the
header fields, into the letter. Valid only when sending a message while reading
mail. The text of the message is shifted to the right, and the string contained
in the \fBindentprefix\fR variable is inserted as the leftmost characters of
each line. If \fBindentprefix\fR is not set, a TAB character is inserted into
each line. Overrides the suppression of fields by the \fBig\fRnore command.
.RE

.sp
.ne 2
.na
\fB\fB~p\fR\fR
.ad
.RS 23n
Print the message being entered.
.RE

.sp
.ne 2
.na
\fB\fB~q\fR\fR
.ad
.RS 23n
Quit from input mode by simulating an interrupt. If the body of the message is
not null, the partial message is saved in \fBdead-letter\fR. See \fBDEAD\fR in
ENVIRONMENT VARIABLES for a description of this file.
.RE

.sp
.ne 2
.na
\fB\fB~R\fR\fR
.ad
.RS 23n
Mark message for return receipt.
.RE

.sp
.ne 2
.na
\fB\fB~r\fR \fIfile\fR\fR
.ad
.br
.na
\fB\fB~<\fR \fIfile\fR\fR
.ad
.br
.na
\fB\fB~< ! \fR\fIshell-command\fR\fR
.ad
.RS 23n
Read in the specified file. If the argument begins with an exclamation point
(!), the rest of the string is taken as an arbitrary shell command and is
executed, with the standard output inserted into the message.
.RE

.sp
.ne 2
.na
\fB\fB~s\fR \fIstring \|.\|.\|.\fR\fR
.ad
.RS 23n
Set the subject line to \fIstring\fR.
.RE

.sp
.ne 2
.na
\fB\fB~t\fR \fIname \|.\|.\|.\fR\fR
.ad
.RS 23n
Add the given \fIname\fRs to the To list.
.RE

.sp
.ne 2
.na
\fB\fB~v\fR\fR
.ad
.RS 23n
Invoke a preferred screen editor on the partial message. The default visual
editor is \fBvi\fR(1). See also \fBVISUAL\fR in ENVIRONMENT VARIABLES.
.RE

.sp
.ne 2
.na
\fB\fB~w\fR \fIfile\fR\fR
.ad
.RS 23n
Write the message into the given file, without the header.
.RE

.sp
.ne 2
.na
\fB\fB~x\fR\fR
.ad
.RS 23n
Exit as with \fB~q\fR except the message is not saved in \fBdead-letter\fR.
.RE

.sp
.ne 2
.na
\fB\fB~|\fR \fIshell-command\fR\fR
.ad
.RS 23n
Pipe the body of the message through the given \fIshell-command\fR. If the
\fIshell-command\fR returns a successful exit status, the output of the command
replaces the message.
.RE

.SS "Internal Variables"
.LP
The following variables are internal variables. They may be imported from the
execution environment or set using the \fBse\fRt command at any time. The
\fBuns\fRet command may be used to erase variables.
.sp
.ne 2
.na
\fB\fBallnet\fR\fR
.ad
.RS 26n
All network names whose last component (login name) match are treated as
identical. This causes the \fImessage-list\fR message specifications to behave
similarly. Disabled by default. See also the \fBalt\fRernates command and the
\fBmetoo\fR and \fBfuzzymatch\fR variables.
.RE

.sp
.ne 2
.na
\fB\fBalwaysignore\fR\fR
.ad
.RS 26n
Ignore header fields with \fBig\fRnore everywhere, not just during \fBp\fRrint
or \fBt\fRype. Affects the \fBs\fRave, \fBS\fRave, \fBc\fRopy, \fBC\fRopy,
\fBto\fRp, \fBpi\fRpe, and \fBw\fRrite commands, and the \fB~m\fR and \fB~f\fR
tilde escapes. Enabled by default.
.RE

.sp
.ne 2
.na
\fB\fBappend\fR\fR
.ad
.RS 26n
Upon termination, append messages to the end of the \fBmbox\fR file instead of
prepending them. Although disabled by default, \fBappend\fR is set in the
system startup file (which can be suppressed with the \fB-n\fR command line
option).
.RE

.sp
.ne 2
.na
\fB\fBappenddeadletter\fR\fR
.ad
.RS 26n
Append to the deadletter file rather than overwrite it. Although disabled by
default, \fBappenddeadletter\fR is frequently set in the system startup file.
See \fBStarting Mail\fR in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBaskbcc\fR\fR
.ad
.RS 26n
Prompt for the \fBBcc\fR list after the \fBSubject\fR is entered if it is not
specified on the command line with the \fB-b\fR option. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBaskcc\fR\fR
.ad
.RS 26n
Prompt for the \fBCc\fR list after the \fBSubject\fR is entered if it is not
specified on the command line with the \fB-c\fR option. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBasksub\fR\fR
.ad
.RS 26n
Prompt for subject if it is not specified on the command line with the \fB-s\fR
option. Enabled by default.
.RE

.sp
.ne 2
.na
\fB\fBautoinc\fR\fR
.ad
.RS 26n
Automatically incorporate new messages into the current session as they arrive.
This has an affect similar to issuing the \fBinc\fR command every time the
command prompt is displayed. Disabled by default, but \fBautoinc\fR is set in
the default system startup file for \fBmailx\fR; it is not set for
\fB/usr/ucb/mail\fR or \fB/usr/ucb/Mail\fR.
.RE

.sp
.ne 2
.na
\fB\fBautoprint\fR\fR
.ad
.RS 26n
Enable automatic printing of messages after \fBd\fRelete and \fBu\fRndelete
commands. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBbang\fR\fR
.ad
.RS 26n
Enable the special-casing of exclamation points (!) in shell escape command
lines as in \fBvi\fR(1). Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBbsdcompat\fR\fR
.ad
.RS 26n
Set automatically if \fBmailx\fR is invoked as \fBmail\fR or \fBMail\fR. Causes
\fBmailx\fR to use \fB/etc/mail/Mail.rc\fR as the system startup file. Changes
the default pager to \fBmore\fR(1).
.RE

.sp
.ne 2
.na
\fB\fBcmd=\fR\fIshell-command\fR\fR
.ad
.RS 26n
Set the default command for the \fBpi\fRpe command.  No default value.
.RE

.sp
.ne 2
.na
\fB\fBconv=\fR\fIconversion\fR\fR
.ad
.RS 26n
Convert \fBuucp\fR addresses to the specified address style, which can be
either:
.sp
.ne 2
.na
\fB\fBinternet\fR\fR
.ad
.RS 12n
This requires a mail delivery program conforming to the \fBRFC822\fR standard
for electronic mail addressing.
.RE

.sp
.ne 2
.na
\fB\fBoptimize\fR\fR
.ad
.RS 12n
Remove loops in \fBuucp\fR(1C) address paths (typically generated by the
\fBr\fReply command).  No rerouting is performed; \fBmail\fR has no knowledge
of \fBUUCP\fR routes or connections.
.RE

Conversion is disabled by default. See also \fBsendmail\fR(1M) and the \fB-U\fR
command-line option.
.RE

.sp
.ne 2
.na
\fB\fBcrt\fR[\fB=\fR\fInumber\fR]\fR
.ad
.RS 26n
Pipe messages having more than \fInumber\fR lines through the command specified
by the value of the \fBPAGER\fR variable ( \fBpg\fR(1) or \fBmore\fR(1) by
default). If \fInumber\fR is not specified, the current window size is used.
Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBdebug\fR\fR
.ad
.RS 26n
Enable verbose diagnostics for debugging. Messages are not delivered. Disabled
by default.
.RE

.sp
.ne 2
.na
\fB\fBdot\fR\fR
.ad
.RS 26n
Take a period on a line by itself, or \fBEOF\fR during input from a terminal as
end-of-file. Disabled by default, but \fBdot\fR is set in the system startup
file (which can be suppressed with the \fB-n\fR command line option).
.RE

.sp
.ne 2
.na
\fB\fBfcc\fR\fR
.ad
.RS 26n
By default, \fBmailx\fR will treat any address containing a slash ("/")
character as a local "send to file" address. By unsetting this option, this
behavior is disabled. Enabled by default.
.RE

.sp
.ne 2
.na
\fB\fBflipr\fR\fR
.ad
.RS 26n
Reverse the effect of the \fBfo\fRllowup/\fBFo\fRllowup and
\fBr\fReply/\fBR\fReply command pairs.  If both \fBflipr\fR and \fBreplyall\fR
are set, the effect is as if neither was set.
.RE

.sp
.ne 2
.na
\fB\fBfrom\fR\fR
.ad
.RS 26n
Extract the author listed in the header summary from the \fBFrom:\fR header
instead of the UNIX \fBFrom\fR line. Enabled by default.
.RE

.sp
.ne 2
.na
\fB\fBfuzzymatch\fR\fR
.ad
.RS 26n
The \fBfrom\fR command searches for messages from the indicated sender. By
default, the full sender address must be specified. By setting this option,
only a sub-string of the sender address need be specified. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBescape=\fR\fIc\fR\fR
.ad
.RS 26n
Substitute \fIc\fR for the ~ escape character. Takes effect with next message
sent.
.RE

.sp
.ne 2
.na
\fB\fBfolder=\fR\fIdirectory\fR\fR
.ad
.RS 26n
The directory for saving standard mail files. User-specified file names
beginning with a plus (+) are expanded by preceding the file name with this
directory name to obtain the real file name. If \fIdirectory\fR does not start
with a slash (/), \fB$HOME\fR is prepended to it.  There is no default for the
\fBfolder\fR variable. See also \fBoutfolder\fR below.
.RE

.sp
.ne 2
.na
\fB\fBheader\fR\fR
.ad
.RS 26n
Enable printing of the header summary when entering \fBmailx\fR. Enabled by
default.
.RE

.sp
.ne 2
.na
\fB\fBhold\fR\fR
.ad
.RS 26n
Preserve all messages that are read in the \fBmailbox\fR instead of putting
them in the standard \fBmbox\fR save file. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBignore\fR\fR
.ad
.RS 26n
Ignore interrupts while entering messages. Handy for noisy dial-up lines.
Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBignoreeof\fR\fR
.ad
.RS 26n
Ignore end-of-file during message input. Input must be terminated by a period
(.) on a line by itself or by the \fB~.\fR command. See also \fBdot\fR above.
Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBindentprefix=\fR\fIstring\fR\fR
.ad
.RS 26n
When \fBindentprefix\fR is set, \fIstring\fR is used to mark indented lines
from messages included with \fB~m\fR. The default is a TAB character.
.RE

.sp
.ne 2
.na
\fB\fBkeep\fR\fR
.ad
.RS 26n
When the \fBmailbox\fR is empty, truncate it to zero length instead of removing
it. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBiprompt=\fR\fIstring\fR\fR
.ad
.RS 26n
The specified prompt string is displayed before each line on input is requested
when sending a message.
.RE

.sp
.ne 2
.na
\fB\fBkeepsave\fR\fR
.ad
.RS 26n
Keep messages that have been saved in other files in the \fBmailbox\fR instead
of deleting them. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBmakeremote\fR\fR
.ad
.RS 26n
When replying to all recipients of a message, if an address does not include a
machine name, it is assumed to be relative to the sender of the message.
Normally not needed when dealing with hosts that support RFC822.
.RE

.sp
.ne 2
.na
\fB\fBmetoo\fR\fR
.ad
.RS 26n
If your login appears as a recipient, do not delete it from the list. Disabled
by default.
.RE

.sp
.ne 2
.na
\fB\fBmustbang\fR\fR
.ad
.RS 26n
Force all mail addresses to be in bang format.
.RE

.sp
.ne 2
.na
\fB\fBonehop\fR\fR
.ad
.RS 26n
When responding to a message that was originally sent to several recipients,
the other recipient addresses are normally forced to be relative to the
originating author's machine for the response. This flag disables alteration of
the recipients' addresses, improving efficiency in a network where all machines
can send directly to all other machines (that is, one hop away). Disabled by
default.
.RE

.sp
.ne 2
.na
\fB\fBoutfolder\fR\fR
.ad
.RS 26n
Locate the files used to record outgoing messages in the directory specified by
the \fBfolder\fR variable unless the path name is absolute. Disabled by
default. See \fBfolder\fR above and the \fBS\fRave, \fBC\fRopy, \fBfo\fRllowup,
and \fBF\fRollowup commands.
.RE

.sp
.ne 2
.na
\fB\fBpage\fR\fR
.ad
.RS 26n
Used with the \fBpi\fRpe command to insert a form feed after each message sent
through the pipe. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBpipeignore\fR\fR
.ad
.RS 26n
Omit ignored header when outputting to the \fBpipe\fR command. Although
disabled by default,  \fBpipeignore\fR is frequently set in the system startup
file. See \fBStarting Mail\fR in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBpostmark\fR\fR
.ad
.RS 26n
Your "real name" to be included in the From line of messages you send.  By
default this is derived from the comment field in your \fBpasswd\fR(4) file
entry.
.RE

.sp
.ne 2
.na
\fB\fBprompt=\fR\fIstring\fR\fR
.ad
.RS 26n
Set the \fIcommand mode\fR prompt to \fIstring\fR. Default is "\fB? \fR",
unless the \fBbsdcompat\fR variable is set, then the default is "\fB&\fR".
.RE

.sp
.ne 2
.na
\fB\fBquiet\fR\fR
.ad
.RS 26n
Refrain from printing the opening message and version when entering
\fBmailx\fR. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBrecord=\fR\fIfile\fR\fR
.ad
.RS 26n
Record all outgoing mail in \fIfile\fR. Disabled by default. See also
\fBoutfolder\fR above.
.RE

.sp
.ne 2
.na
\fB\fBreplyall\fR\fR
.ad
.RS 26n
Reverse the effect of the \fBr\fReply and \fBR\fReply and \fBfo\fRllowup and
\fBFo\fRllowup commands. Although set by default,  \fBreplayall\fR is
frequently unset in the system startup file. See \fBflipr\fR and \fBStarting
Mail\fR in USAGE above.
.RE

.sp
.ne 2
.na
\fB\fBreturnaddr=\fR\fIstring\fR\fR
.ad
.RS 26n
The default sender address is that of the current user. This variable can be
used to set the sender address to any arbitrary value. Set with caution.
.RE

.sp
.ne 2
.na
\fB\fBsave\fR\fR
.ad
.RS 26n
Enable saving of messages in \fBdead-letter\fR on interrupt or delivery error.
See \fBDEAD\fR for a description of this file. Enabled by default.
.RE

.sp
.ne 2
.na
\fB\fBscreen=\fR\fInumber\fR\fR
.ad
.RS 26n
Sets the number of lines in a screen-full of headers for the \fBh\fReaders
command. \fInumber\fR must be a positive number.
.sp
The default is set according to baud rate or window size. With a baud rate less
than \fB1200\fR, \fInumber\fR defaults to \fB5\fR, if baud rate is exactly
\fB1200\fR, it defaults to \fB10\fR. If you are in a window, \fInumber\fR
defaults to the default window size minus 4. Otherwise, the default is
\fB20\fR.
.RE

.sp
.ne 2
.na
\fB\fBsendmail=\fR\fIshell-command\fR\fR
.ad
.RS 26n
Alternate command for delivering messages. \fBNote:\fR In addition to the
expected list of recipients, \fBmail\fR also passes the \fB-i\fR and \fB-m\fR,
flags to the command. Since these flags are not appropriate to other commands,
you may have to use a shell script that strips them from the arguments list
before invoking the desired command. Default is \fB/usr/bin/rmail\fR.
.RE

.sp
.ne 2
.na
\fB\fBsendwait\fR\fR
.ad
.RS 26n
Wait for background mailer to finish before returning. Disabled by default.
.RE

.sp
.ne 2
.na
\fB\fBshowname\fR\fR
.ad
.RS 26n
Causes the message header display to show the sender's real name (if known)
rather than their mail address. Disabled by default, but \fBshowname\fR is set
in the \fB/etc/mail/mailx.rc\fR system startup file for \fBmailx\fR.
.RE

.sp
.ne 2
.na
\fB\fBshowto\fR\fR
.ad
.RS 26n
When displaying the header summary and the message is from you, print the
recipient's name instead of the author's name.
.RE

.sp
.ne 2
.na
\fB\fBsign=\fR\fIstring\fR\fR
.ad
.RS 26n
The variable inserted into the text of a message when the \fB~a\fR (autograph)
command is given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
.sp
`
.RE

.sp
.ne 2
.na
\fB\fBSign=\fR\fIstring\fR\fR
.ad
.RS 26n
The variable inserted into the text of a message when the \fB~A\fR command is
given.  No default (see also \fB~i\fR in \fBTilde Escapes\fR).
.RE

.sp
.ne 2
.na
\fB\fBtoplines=\fR\fInumber\fR\fR
.ad
.RS 26n
The number of lines of header to print with the \fBto\fRp command. Default is
\fB5\fR.
.RE

.sp
.ne 2
.na
\fB\fBverbose\fR\fR
.ad
.RS 26n
Invoke \fBsendmail\fR(1M) with the \fB-v\fR flag.
.RE

.sp
.ne 2
.na
\fB\fBtranslate\fR\fR
.ad
.RS 26n
The name of a program to translate mail addresses. The program receives mail
addresses as arguments. The program produces, on the standard output, lines
containing the following data, in this order:
.RS +4
.TP
.ie t \(bu
.el o
the postmark for the sender (see the postmark variable)
.RE
.RS +4
.TP
.ie t \(bu
.el o
translated mail addresses, one per line, corresponding to the program's
arguments.  Each translated address will replace the corresponding address in
the mail message being sent.
.RE
.RS +4
.TP
.ie t \(bu
.el o
a line containing only "y" or "n".  if the line contains "y" the user will be
asked to confirm that the message should be sent.
.RE
The translate program will be invoked for each mail message to be sent. If the
program exits with a non-zero exit status, or fails to produce enough output,
the message is not sent.
.RE

.SS "Large File Behavior"
.LP
See \fBlargefile\fR(5) for the description of the behavior of \fBmailx\fR when
encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH ENVIRONMENT VARIABLES
.LP
See \fBenviron\fR(5) for descriptions of the following environment variables
that affect the execution of \fBmailx\fR: \fBHOME\fR, \fBLANG\fR,
\fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
\fBTERM\fR.
.sp
.ne 2
.na
\fB\fBDEAD\fR\fR
.ad
.RS 14n
The name of the file in which to save partial letters in case of untimely
interrupt. Default is \fB$HOME/dead.letter\fR.
.RE

.sp
.ne 2
.na
\fB\fBEDITOR\fR\fR
.ad
.RS 14n
The command to run when the \fBe\fRdit or \fB~e\fR command is used. Default is
\fBed\fR(1).
.RE

.sp
.ne 2
.na
\fB\fBLISTER\fR\fR
.ad
.RS 14n
The command (and options) to use when listing the contents of the \fBfolder\fR
directory. The default is \fBls\fR(1).
.RE

.sp
.ne 2
.na
\fB\fBMAIL\fR\fR
.ad
.RS 14n
The name of the initial mailbox file to read (in lieu of the standard system
mailbox). The default is \fB/var/mail/\fIusername\fR .\fR
.RE

.sp
.ne 2
.na
\fB\fBMAILRC\fR\fR
.ad
.RS 14n
The name of the startup file.  Default is \fB$HOME/.mailrc\fR.
.RE

.sp
.ne 2
.na
\fB\fBMAILX_HEAD\fR\fR
.ad
.RS 14n
The specified string is included at the beginning of the body of each message
that is sent.
.RE

.sp
.ne 2
.na
\fB\fBMAILX_TAIL\fR\fR
.ad
.RS 14n
The specified string is included at the end of the body of each message that is
sent.
.RE

.sp
.ne 2
.na
\fB\fBMBOX\fR\fR
.ad
.RS 14n
The name of the file to save messages which have been read. The \fBex\fRit
command overrides this function, as does saving the message explicitly in
another file.  Default is \fB$HOME/mbox\fR.
.RE

.sp
.ne 2
.na
\fB\fBPAGER\fR\fR
.ad
.RS 14n
The command to use as a filter for paginating output. This can also be used to
specify the options to be used.  Default is \fBpg\fR(1), or if the
\fBbsdcompat\fR variable is set, the default is \fBmore\fR(1). See \fBInternal
Variables\fR.
.RE

.sp
.ne 2
.na
\fB\fBSHELL\fR\fR
.ad
.RS 14n
The name of a preferred command interpreter. Default is \fBsh\fR(1).
.RE

.sp
.ne 2
.na
\fB\fBVISUAL\fR\fR
.ad
.RS 14n
The name of a preferred screen editor.  Default is \fBvi\fR(1).
.RE

.SH EXIT STATUS
.LP
When the \fB-e\fR option is specified, the following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Mail was found.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
Mail was not found or an error occurred.
.RE

.sp
.LP
Otherwise, the following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion. Notice that this status implies that all messages were
\fBsent\fR, but it gives no assurances that any of them were actually
\fBdelivered\fR.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred
.RE

.SH FILES
.ne 2
.na
\fB\fB$HOME/.mailrc\fR\fR
.ad
.sp .6
.RS 4n
 personal startup file
.RE

.sp
.ne 2
.na
\fB\fB$HOME/mbox\fR\fR
.ad
.sp .6
.RS 4n
secondary storage file
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.Maillock\fR\fR
.ad
.sp .6
.RS 4n
lock file to prevent multiple writers of system mailbox
.RE

.sp
.ne 2
.na
\fB\fB/etc/mail/mailx.rc\fR\fR
.ad
.sp .6
.RS 4n
optional system startup file for \fBmailx\fR only
.RE

.sp
.ne 2
.na
\fB\fB/etc/mail/Mail.rc\fR\fR
.ad
.sp .6
.RS 4n
BSD compatibility system-wide startup file for \fB/usr/ucb/mail\fR and
\fB/usr/ucb/Mail\fR
.RE

.sp
.ne 2
.na
\fB\fB/tmp/R[emqsx]*\fR\fR
.ad
.sp .6
.RS 4n
temporary files
.RE

.sp
.ne 2
.na
\fB\fB/usr/share/lib/mailx/mailx.help*\fR\fR
.ad
.sp .6
.RS 4n
help message files
.RE

.sp
.ne 2
.na
\fB\fB/var/mail/*\fR\fR
.ad
.sp .6
.RS 4n
post office directory
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
.TE

.SH SEE ALSO
.LP
\fBbiff\fR(1B), \fBecho\fR(1), \fBed\fR(1), \fBex\fR(1), \fBfmt\fR(1),
\fBlp\fR(1), \fBls\fR(1), \fBmail\fR(1), \fBmail\fR(1B), \fBmailcompat\fR(1),
\fBmore\fR(1), \fBpg\fR(1), \fBsh\fR(1), \fBuucp\fR(1C), \fBvacation\fR(1),
\fBvi\fR(1), \fBnewaliases\fR(1M), \fBsendmail\fR(1M), \fBaliases\fR(4),
\fBpasswd\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
\fBstandards\fR(5)
.SH NOTES
.LP
Where \fIshell-command\fR is shown as valid, arguments are not always allowed.
Experimentation is recommended.
.sp
.LP
Internal variables imported from the execution environment cannot be
\fBuns\fRet.
.sp
.LP
The full internet addressing is not fully supported by \fBmailx\fR. The new
standards need some time to settle down.
.sp
.LP
Replies do not always generate correct return addresses.  Try resending the
errant reply with \fBonehop\fR set.
.sp
.LP
\fBmailx\fR does not lock your record file. So, if you use a record file and
send two or more messages simultaneously, lines from the messages may be
interleaved in the record file.
.sp
.LP
The format for the \fBalias\fR command is a space-separated list of recipients,
while the format for an alias in either the \fB\&.forward\fR or
\fB/etc/aliases\fR is a comma-separated list.
.sp
.LP
To read mail on a workstation running Solaris 1.\fIx\fR when your mail server
is running Solaris 2.\fIx\fR, first execute the \fBmailcompat\fR(1) program.