ChangeLog
98.5 KB
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
2001-07-25 Alain Magloire
Base on Jakob idea propose an implementation for decode.
But it is clearly not flexible enough:
decode [msgno] [part]
? decode 28 2
Suppose message 28 is a mime with two part, the second part
will be decoded and sent to stdout.
* mail/decode.c: First implementation behind Jakobs idea.
2001-07-23 Sergey Poznyakoff
* configure.in,libmu_scm/Makefile.am,guimb/Makefile.am : Fixed to
compile properly on systems with missing/incomplete guile.
* include/mailutils/Makefile.am: Added mailutils.h to
pkginclude_HEADERS.
2001-07-23 Alain Magloire
* libmu_scm/mu_scm.h: Remove HAVE_LIBGUILE_H guard.
* guimb/guimb.h: Remove HAVE_LIBGUILE_H guard.
2001-07-23 Alain Magloire
* util.c (util_msglist_command): Check for interruption here
also and that will permit interruption on long commands like
"from *"
2001-07-23 Alain Magloire
The reason the interrupt code did not work for me, is that
by default using signal will make function calls restartable,
at least on my default RH5.1, when read() was interrupted
it did not return EINTR inside ml_getc().
* mail.c (main): Use sigaction if available to set SIGPIPE.
* mailline.c (sig_handler): Reset "lines" variable.
Recall signal() if we did not have sigaction.
(ml_readline_init): Use sigaction to set SIGWINCH and SIGINT.
* libmu_scm/mu_scm.h: Guard with HAVE_LIBGUILE_H.
* guimb/guimb.h : Guard with HAVE_LIBGUILE_H.
2001-07-22 Sergey Poznyakoff
Renamed debug_.* symbols to mu_debug_.* to avoid nameclashes.
Files affected:
* examples/mbox-dates.c, mbox-explode.c;
* from/from.c;
* include/mailutils/{debug.h,folder.h,mailbox.h,mailer.h};
* libmu_scm/mu_message.c;
* mail/send.c;
* mailbox/{debug.c,folder.c,mailbox.c,mailer.c};
* mailbox/include/{debug0.h,folder0.h,mailbox0.h,mailer0.h};
* mailbox2/include/mailutils/base.h;
* readmsg/readmsg.c;
* sieve/sieve.c;
* configure.in: Added --without-guile. Uncommented making
libmu_scm and guimb. Added check for -ldl before
checking for -lpam: both FreeBSD and OpenBSD lack libdl, but
have working libpam.
* messages/Makefile.am: Added missing @ARGP.*@ substitutes.
2001-07-21 Jakob 'sparky' Kaivo <jkaivo@elijah.nodomainname.net>
* mail/Makefile.am (mail_SOURCES): add decode.c
* mail/mail.h: add mail_decode protoype
* mail/decode.c (mail_decode): new file, new function
* mail/table.c: add decode command
* mail/util.c (util_expand_msglist): insert placeholder for
attachment operations
2001-07-20 Jakob 'sparky' Kaivo <jkaivo@elijah.nodomainname.net>
* messages/messages.c: new file, implement of elm messages command
(parse_opt): add --silent and --quit options
(messages_count): new function
2001-07-20 Alain Magloire
* mailbox/misc.c: Removed, _cpystr() function move in mutil.c
and rename to util_cpystr().
* mailbox/include/misc.h: Removed.
* include/mailutils/mutil.h: Added prototype for util_cpystr().
* mailbox/mutil.c (util_cpystr): New function, move
the _cpystr() from misc.c and move here.
* mailbox/Makefile.am: Removed misc.c in dependencies.
* mailbox/include/Makefile.am: Removed misc.h in dependencies.
* mailbox/address.c: Use util_cpystr() instead of _cpystr().
Added <mailutils/mutil.h> prototype.
* mailbox/auth.c: Likewised.
* mailbox/url.c: Likewised.
* mailbox/folder.c: Likewised.
2001-07-19 Sergey Poznyakoff
Added guile interface library.
* Makefile.am: Added scripts libmu_scm guimb.
* configure.in: Checks for presence of Guile components.
Making libmu_scm and guimb commented out until we solve
debug_print name clash
(libguile/debug.h vs. mailutils/debug.h).
* scripts: (new) Contains scripts for preparing guile
documentation strings from C sources. The reason for
their presence is that guile-doc-snarf scripts distributed
with guile up to version 1.4 do not work. The comment at
the beginnig of scripts/guile-doc-snarf describes why. We'll
have to use these until next version of guile fixes the bug.
* scripts/{Makefile.am,guile-doc-snarf,guile-func-name-check,
guile-snarf.awk: (new)
* scripts/.cvsignore: (new)
* libmu_scm: (new) Guile interface library:
* libmu_scm/Makefile.am: (new).
* libmu_scm/mu_scm.c: (new) Main module.
* libmu_scm/mu_mailbox.c: (new) Mailbox primitives.
* libmu_scm/mu_message.c: (new) Message primitives.
* libmu_scm/mu_body.c: (new) Message body primitives.
* libmu_scm/mu_scm.h: (new) Library prototypes.
* libmu_scm/.cvsignore: (new)
* guimb: (new) Process mailbox(es) using Guile program or
expression.
* guimb/Makefile.am: (new)
* guimb/main.c: (new) Main functions.
* guimb/collect.c: (new) Collect input.
* guimb/util.c: (new) Some utilities.
* guimb/run_scm.c: (new) Initialization of libguile and libmu_scm
* guimb/guimb.h: Prototypes.
* guimb/.cvsignore: (new)
* examples/reply.scm: Automatic mail responder for use with guimb.
2001-07-18 Sam Roberts
* include/mailutils/url.h: New api functions for parsing.
* doc/: Makefile.am, framework.texi, url.texi: Updated and
corrected URL documentation.
* doc/ex-url.texi: The url api example. Derived from
../example/url-parse by a perl script.
* mailbox/url.c: Added a function to do generalized URL parsing.
* mailbox/: url_imap.c, url_pop.c: Use the url_parse() function to
parse the URL.
* mailbox/mbx_pop.c: Added checks for low-memory conditions, and
look for passwd in url before prompting user.
* mailbox/folder_imap.c: Look for passwd in the url before
prompting.
* examples/: .cvsignore, Makefile, Urls, url-parse.c: Added example
of URL parsing, and test for parsing.
* examples/Urls.good: Added test for % decoding.
* mailbox/mbx_mbox.c: Needed <stdlib.h> on QNX6.
* mailbox/include/: registrar0.h, url0.h: Comment on schemes, and
removed comment on encoding.
2001-07-18 Alain Magloire
* mailbox/mbx_mbox.c (mbox_messages_count): This function does
not call the observers, the callback function, on the mbox_scan()
does.
* frm/frm.c (main): call mailbox_scan () instead of
mailbox_messages_count () since we want to be notified.
2001-07-12 Sam Roberts
* examples/mbox-dates.c: Added pop and imap records.
* include/mailutils/mutil.h, mailbox/mutil.c: New functions -
mu_hex2ul(), mu_hexstr2ul().
* mailbox/message.c: unistd.h needed on QNX6
* TODO: Added Sergey's todo items and mine for sieve.
2001-07-12 Jakob 'sparky' Kaivo <jkaivo@elijah.nodomainname.net>
* include/mailutils/mailutils.h: new "catchall" header, includes
all mailutils headers
2001-07-10 Sam Roberts
* examples/Addrs.good: Now mapping ENOENT to EPARSE in error
reporting, its clearer.
2001-07-09 Sergey Poznyakoff
* configure.in: check for termios.h termio.h sgtty.h
Added MU_MAINTAINER_MODE.
* m4/maintain.m4: (new) Settings specific to maintainer-mode.
* m4/Makefile.am: Added maintain.m4.
* mailbox/attribute.c: Fixed flags_to_string(): MU_ATTRIBUTE_SEEN
and MU_ATTRIBUTE_READ were swapped: the former produced 'R',
and the latter 'O'.
* mail/file.c: run "summary" after opening new mailbox.
Issue diagnostics if mailbox cannot be opened.
Display summary when called without arguments.
* mail/from.c: Changed flags display.
* mail/mailline.c: Provide ml_reread() when compiled without
readline.
Check for interrupt in (both versions of) ml_reread().
Use util_[cm]alloc() instead of [cm]alloc().
* mail/{print.c,visual.c}: set READ instead of SEEN attribute on
read messages.
* mail/z.c: case D_FWD missed break; Fixed typos in the comment
to D_NONE.
* mail/version.c: display options with which the program is
compiled.
* mail/util.c: Added util_malloc(), util_calloc().
* mail/mail.h: Protos for the above;
* mail/alias.c: use util_[cm]alloc() instead of library functions
wherever appropriate.
* mail/alt.c: Likewise.
* mail/mail.c: Likewise.
* mail/shell.c: Likewise.
* mail/unset.c: Likewise.
* mail/var.c: Likewise.
Implemented ~A (read signature from file).
* mail/quit.c: Raise hold flag when not closing system mailbox (%).
2001-07-06 Alain Magloire
* mail/mailline.c: "interupt" is actually a key word
for some C compiler i.e. Watcomm C, rename it to "interrupted".
* mail/util.c: The macros O_CREAT etc needs <sys/fnct.h>.
2001-07-06 Alain Magloire
* mail/mail.c: Be a little more verbose when mailbox_{create,open}()
fails at startup.
* doc/Makefile.am: Add the missing *.texi in the list of EXTRA_DIST.
2001-07-06 Sergey Poznyakoff
* imap4d/fetch.c: imap4d_fetch0(): return RESP_OK on success.
* imap4d/bye.c: split imap4d_bye() into imap4d_bye() and imap4d_bye0().
* imap4d/logout.c: call imap4d_bye0() instead of imap4d_bye().
Reason: rfc 2060 requires that the server send a BYE untagged response
before the (tagged) OK response. With our implementation it was
vice-versa.
* imap4d/imap4d.h: proto for imap4d_bye0().
* mail/mail.c: changed startup banner.
* mail/mailline.c: handle SIGWINCH.
* mail/util.c: Include <termios.h> when present.
* configure.in: test for the presence of <termios.h>
2001-07-05 Alain Magloire
* mail/send.c(mail_send0): Put the mailer in debug mode
if util_find_env("verbose")->set, good for debuging.
2001-07-05 Alain Magloire
According to the man page:
"sendmail contains a command, possibly with options, that mailx
invokes to send mail. You must manually set the default for this
environment variable by editing ROOTDIR/etc/mailx.rc to specify the
mail agent of your choice. The default is sendmail, but it can be any
command that takes addresses on the command line and message contents
on standard input."
* mail/mail.c (main): Register smtp_record too as a mailer.
Set variable sendmail to _PATH_SENDMAIL as the default mailer.
* mail/mail.h: New proto util_setenv(), util_find_env()
change to be const char *.
* mail/send.c (msg_to_pipe): New function, open a pipe()
and write a message to it.
(mail_send0): Now create the mailer according to
util_find_env("sendmail")->value. Use a pipe() if mailer_create()
fails.
* mail/set.c (mail_set): After free(entry->value) set the value
to NULL.
* mail/util.c (util_find_env): Change the prototype to be const.
Remove hack about need_free and use a static variable to hold
"asksub".
* mail/util.c (util_setenv): New function to set environment
model on libc call setenv().
* mailbox/message.c (message_sender): Set the default sender base on
the passwd entry.
2001-07-05 Alain Magloire
We can send a message and if the address starts with '|'
the message is pipe to the cmd and if starts with '/' it is
save to a file.
mailx ghislaine '|cat >save'
mails a message to ghislaine and also copies the message into a file
called save.
* mail/mail.h: Change struct send_environ to contain
two new fields char **outfiles and int nfiles.
* mail/send.c: Look for '/' and '|' when parsing the addresses
and add them to struct send_environ outfiles.
(mail_send0): Memory overflow, we were free(buf) twice.
made char *buf local where it is needed. Save the message
to outfiles when set.
(isfilename): New function.
* mail/followup.c: Initialise the struct send_environ new fields.
* mail/reply.c: Initialise the struct send_environ new fields.
* lib/argcv.c: Add support to consider string between
single quote like one word(same as double quotes).
2001-07-04 Alain Magloire
* mailbox2/stream.c: stream_read() and stream_write()
change prototype to be "void *" instead of "char *".
* mailbox2/bstream.c: Adjust bstream_{read,write} to the
new prototypes.
* mailbox2/pop3/pop3_stream.c: Likewised.
* mailbox2/Makefile.am: New file.
* mailbox2/pop3/Makefile.am: New file.
* mailbox2/mstream.c: Mapfile stream Implementation.
* mailbox2/fstream.c: File stream implementation.
* mailbox2/include/mailutils/sys/fstream.h: New file.
* mailbox2/include/mailutils/sys/mstream.h: New file.
* mailbox2/tcp.c: rename to tcpstream.c.
* mailbox2/include/mailutils/sys/tcp.h: Rename to tcpstream.h
* mailbox/mapfile_stream.c (_mapfile_write): Make sure
the size is not zero before making the memcpy().
2001-07-03 Alain Magloire
* mail/headers.c: Catch the overflow in the calculation by
reseting the number of lines to default screen lines.
* mail/mail.c (main): Add a "summary" call also for the
initial commands on startup(in interactive).
* mail.h: Proto for mail_summary() and mail_version().
* table.c: Add mail_summary() and mail_version() in the cmd table.
* util.c (util_getcols): First try an ioctl(TIOCGWINSZ,..) call
not all shells set the COLUMNS environ.
(util_getlines): Likewised. Also take to account the prompt
in the lines number.
* z.c (mail_z): Change the behaviour of "z." to show a screenfull
when the lastpage is reach. This is very practical when starting
mail, since "z." is the initial command to show the header summary.
* mail/version.c: New file, show mail version, mail_version().
* mail/summary.c: New file, display a short summary of the mailbox.
mail_summary().
* mail/Makefile.am: add summary.c and version.c
* mailbox2/include/mailutils/mbox.h: Proto for Unix-Mbox.
2001-07-03 Jakob 'sparky' Kaivo <jkaivo@elijah.nodomainname.net>
* README-alpha: note that INSTALL is generated
2001-07-03 Sergey Poznyakoff
* configure.in: --with-mail-rc option: set path to system-wide
mail.rc file.
* mail/Makefile.am,mail/mail.c: Likewise.
* mail/send.c: check for "dot" variable. Implemented "~.",
"appenddeadletter".
* mail/inc.c: (new) inc[orporate] command.
* mail/{mail.c,mail.h,table.c}: Ditto.
* mail/print.c: Handle interrupts when fetching message body.
* mail/followup.c: insert ',' between recepients' addresses.
* mail/quit.c: use mailbox_save_attributes(). Implemented
"hold" variable. Raise MU_ATTRIBUTE_READ on every message with
MU_ATTRIBUTE_SEEN bit set (compatibility with existing mails).
* mail/from.c: Changed order of checking message attribute bits to
be compatible with existing implementations.
* mail/z.c: removed break from the loop.
* mailbox/attribute.c: added attribute_set_modified() function.
Fixed attribute_unset.* functions to raise MU_ATTRIBUTE_MODIFIED bit.
* include/mailutils/attribute.h: Proto for attribute_set_modified().
2001-07-02 Alain Magloire
* mailbox2/tcp.c: make it thread-safe.
* mailbox2/bstream.c: Implement buffered stream.
* mailbox2/pop3_stream.c: Use a buffered stream.
2001-07-02 Alain Magloire
Feedback from Sergey for the need of saving the attribute flags
without expunging. Note, this is a hack, the code is taken from
mbox_expunge(mbx_mbox.c) and there is lot of duplication. But
since we are moving toward a new mailbox API, the code will be
rewritten more cleanly in the new API.
* include/mailutils/mailbox.h: Add proto mailbox_save_attributes()
* mailbox/include/mailbox0.h: New field in struct _mailbox
_save_attributes (mailbox_t);
* mailbox/mailbox.c: New function mailbox_save_attributes ().
* mailbox/mbx_mbox.c: New function mbox_save_attributes (),
implement saving the attribute flags in header field "Status:"
* imap4d/bye.c: call mailbox_save_attributes() when exiting.
it will save the attribute flags.
* imap4d/close.c: Typo.
* imap4d/logout: Remove the mailbox_close() and mailbox_destroy()
it is being call imap4d_bye ().
* imap4d/select.c (imapr3d_select0): call mailbox_save_attributes()
if a mailbox was already selected.
2001-07-01 Alain Magloire
* mail/util.c (util_strupper): The first implementation was
buggy, corrected.
2001-07-01 Alain Magloire
* mailbox2/pop3/*: Pop3 functions are thread-safe and cancel-safe.
The problem is monitor.h, we will probably end up doing a monitor.h.in
and set at compile time if threading is enable or not.
2001-07-01 Alain Magloire
* mail/util.c (util_expand_msglist): Cleanup the expand by pattern
by moving some code in util_strupper(), the comparison must be
case insensitive.
(util_strupper): Convert the string to uppercase.
2001-07-01 Sergey Poznyakoff
* mailbox/attribute.c: set MU_ATTRIBUTE_MODIFIED bit in the underlying
structure when setting the flags.
* mail/mail.c: Initialize readline and set user name before
determining working mode.
For an empty mailbox output diagnostics and quit.
Read system-wide mail.rc file.
Implemented "set ignoreeof".
* mail/send.c: Implemented "set ignore", "set ignoreeof", "set nosave".
Use doubled escape character to insert a single escape to the
message body.
* mail/delete.c: Implemented "set autoprint"
* mail/dp.c: removed util_do_command("next"): delete does this anyway.
2001-06-30 Sergey Poznyakoff
* configure.in:
define READLINE_LIBS instead of linking libreadline
to every binary.
AC_CHECK_LIB(pthread) was missing comma before
ACTION_IF_NOT_FOUND, thus have_libpthread was always no.
* mail/Makefile.am: Use READLINE_LIBS
* lib/argcv.[ch]: Treat a sequence of whitespace characters as
a single whitespace. Break string on given delimiters. Do not
split quoted arguments.
* mail/set.c: Modified to use new argcv_get() syntax.
* mail/delete.c: After deleting move realcursor to the next
non-deleted message.
* mail/alt.c: Honour "metoo" variable. Try to determine users
full email address.
* mail/mail.c: do not put empty or comment lines into readline
history. Handle keyboard interrupts properly.
Implemented `warranty' command. Warn user about arrival of a new
mail.
* mail/send.c: Handle keyboard interrupts. Use util_tempfile().
* mail/{send.c,reply.c}: change args in call to mail_send0(): packed
all header strings into one structure to facilitate escape handling.
Warn user about null message body.
* mail/mailline.c: (new) readline-related functions.
* mail/var.c: (new) Functions for escape variable handling.
* mail/util.c: added extra argument to util_find_entry(): a pointer
to the table where to look up. Added util_error(), util_help(),
util_tempfile().
* mail/*.c: use util_error() instead of printing diagnostics to ofile.
* mail/{source.c,if.c}: removed mail_is_terminal(),
mail_set_is_terminal(): `interactive' is used instead.
* mail/mail.h: in struct mail_command_entry changed `isflow' field
to `flags'. It contains information about semantics of the command.
* mail/table.c: Initialize `flags' field.
2001-06-29 Alain Magloire
* mail/util.c (util_expand_msglist): Implement expansion of
:d All deleted messages
:n All new messages
:o All old messages
:r All messages that have already been read
:u All unread messages
/string All messages with string in the subject line
(the case of characters in string is ignored)
2001-06-27 Alain Magloire
* configure.in: We were not checking for thread support
at all because the test was faulty.
* readmsg: New directory.
* readmsg/readmsg.c: New file.
* readmsg/readmsg.h: New file.
* readmsg/msglist.c: New file.
This is base on a old testing program Dave inglis wrote
to test the mime parsing code. It is still work in progress
but a good base for the readmsg(1) elm utility clone.
Not enable yet in the TOP Makefile.
2001-06-26 Alain Magloire
* mail/from.c: Use address_get_personal() for a more
pretty print when showing the headers.
2001-06-26 Sergey Poznyakoff
* mail/util.c:
Added extra argument to util_msglist_command(), controlling
whether it should move the cursor to the last message
processed.
* mail/delete.c,mail/dp.c,mail/edit.c,mail/from.c,mail/hold.c,
mail/mbox.c,mail/print.c,mail/reply.c,mail/size.c,mail/top.c,
mail/undelete.c,mail/util.c,mail/visual.c: Likewise.
* mail/util.c: util_screen_lines() function.
util_outfolder_name().
util_save_outgoing()
* mail/z.c: removed z_lines() in favor of util_screen_lines().
* mail/headers.c: use util_screen_lines().
* mail/touch.c: Initial implementation. Simply calls mail_mbox.
Maybe the table.c entry should point to mail_mbox instead?
* mail/write.c: use util_fullpath().
* mail/send.c: call util_save_outgoing() to preserve sent message.
Set umask 077 before calling mkstemp().
* mail/folders.c: Use $LISTER.
* mail/followup.c: Implemented.
* mail/from.c: Changed output format.
* mail/mbox.c: move mail_mbox_commit to quit.c.
* mail/quit.c: Likewise. Honour "keepsave" variable.
2001-06-25 Alain Magloire
* mail/header.c: We were looping forever in here. The loop
is not need it, header only prints one page that includes
the message specified i.e. the header command only takes
a message number as an argument that will serve as a reference
to display a screen full.
* mail/help.c: Use the pager code, the help is long.
2001-06-25 Alain Magloire
* doc/Makefile.am: add {c-api,framework,programs}.texi EXTRA_DIST
* imap4d/imap4d.c (imap4d_usage): Cut and paste typo.
* pop3d/pop3d.c (pop3d_usage): Cut and paste typo.
* include/mailutils/Makefile.am: add mutil.h to the list.
* lib/strisignal.c: Define __P if not set.
* m4/Makefile.am: Added tm_gmtoff.m4 tm_isdst.m4 tm_zone.m4
2001-06-25 Sergey Poznyakoff
* mail/if.c: Removed confusing comment.
* mail/copy.c: Split off mail_copy0. It is shared between mail_copy
and mail_save. Implemented Copy command.
Use mailbox_open_default() instead of mailbox_open().
Fixed possible memory leaks.
* mail/write.c: Implemented Write. Fixed memory leaks.
* mail/Makefile.am: removed discard.c
* mail/discard.c: removed. Implemented in retain.c.
* mail/retain.c: Implemented retain/ignore. It is more convenient
to keep them in one module so they can share static data.
* mail/alias.c: Implemented.
* mail/unalias.c: Implemented.
* mail/alt.c: Implemented.
* mail/file.c:
Check number of arguments.
Display current mailbox name when called without args.
Honour %, &, and + in mailbox names (possibly should
be implemented in mailbox_open_default ?).
Use mail_mbox_close(). After opening new mailbox,
run "z." instead of "from *".
* mail/folders.c: A (very rudimentary) implementation.
* mail/headers.c: Removed if (num) clause: util_expand_msglist()
now returns at least 1.
* mail/pipe.c: Likewise.
* mail/hold.c: Implemented.
* mail/mail.c: Escape % signs in the command line before passing
it to util_do_command().
* mail/mail.h: Protos for implemented functions. Proto for
readline() if libreadline is not linked in.
Definition for MAIL_ATTRIBUTE_MBOXED.
* mail/mbox.c: Implemented.
* mail/print.c: Print only header fields allowed by retain/ignore
settings.
* mail/quit.c: mail_mbox_close() shared between this module and
file.c.
Print statistics information on closing the mailbox (number
of messages held and saved in mbox).
* mail/reply.c: Implemented.
* mail/save.c: Use mail_copy0().
* mail/send.c: Split off mail_send0(). It is used by mail_send()
and mail_reply().
* mail/util.c:
util_expand_msglist(): return 1 and set msglist[0]=cursor
if argc == 1.
util_do_command(): Added missing va_end().
util_get_sender(): Returns sender email for the given msgno.
Optionally strips off domain part.
util_slist_.*(): "string lists" used by alias,alt,retain,
ignore.
util_strcat(): Concat two strings, reallocating first
to the necessary length.
util_escape_percent(): Excape % signs in a string, so
it can be used as format in .*printf calls.
2001-06-22 Sergey Poznyakoff
* mailbox/mutil.c: added mu_get_homedir() and mu_tilde_expansion();
* include/mailutils/mutil.h: protos for new mu_ functions
* imap4d/util.c: use mu_tilde_expansion().
* mail/z.c: implemented.
* mail/if.c: implemented.
* mail/mail.c: A read-eval loop function shared between mail.c and
source.c. Quits gracefully upon reading EOF.
Expand '~' in pathnames.
Upon startup in read mode, display first screenfull of from
lines, instead of listing the whole mailbox. This is
compatible with existing implementations.
Do not display prompt when not reading from a terminal.
* mail/source.c: Use common read-eval loop.
* mail/mail.h: Protos for new functions.
struct mail_command_entry: added isflow field, needed
for if/else/endif flow control.
* mail/table.c: changes due to addition of isflow field.
* mail/send.c: removed unconditional #include <paths.h>: it already
was included from "mail.h".
* mail/util.c: Added util_get_homedir() and util_fullpath().
2001-06-21 Sergey Poznyakoff
* mailbox/mutil.c: Fixed error introduced in the initial
implementation of mu_mktime (now mu_tm2time). The comment
on mu_tm2time() describes it.
Revert the sign of the return value of mu_utc_offset(), so it
agrees with the accepted timezone rules (+ for eastern
hemisphere, - for western).
2001-06-19 Sam Roberts
* include/mailutils/debug.h, mailbox/debug.c: New function:
debug_printv() to complement debug_print().
* examples/mbox-dates.c: parse822_date_time now takes a timezone
argument. We don't actually use the arguments, though.
* include/mailutils/parse822.h: parse82_date_time() now uses the
mu_timezone structure for portability.
* include/mailutils/mailbox.h: Prototyped mailbox_destroy_folder().
* mailbox/mu_mktime.c: Moved mu_mktime to mutil.c as mu_tm2time,
and removed mu_mktime.c
* include/mailutils/mutil.h, mailbox/Makefile.am,
mailbox/mbx_imap.c, mailbox/mutil.c, mailbox/parse822.c: Moved some
generically useful date/time handling functions to mutil.c, fixed
problems with portability of timezone information in struct tm, and
created a new structure to hold timezone information, since
struct tm doesn't do so reliably.
* imap4d/: append.c, fetch.c, imap4d.h, namespace.c, search.c,
util.c: Moved date/time parsing utility functions to
mailbox/mutil.c. Added braces to initializers and removed unused
variables prototyped shared functions, made functions that didn't
return return void. (to quiet gcc -Wall),
2001-06-17 Sam Roberts
* sieve/Makefile.am: More fixes to the packaging structure by
Sergey.
* acconfig.h, configure.in, m4/tm_gmtoff.m4, m4/tm_isdst.m4,
m4/tm_zone.m4: Added tests for isdst, gmtoffset, and zone in struct
tm.
* mailbox/folder_pop.c: Confusing typo in comment.
2001-06-16 Sergey Poznyakoff
* mailbox/mu_mktime.c(added): a wrapper around system mktime()
function that honours the timezone.
* mailbox/Makefile.am: add mu_mktime.c.
* imap4d/fetch.c: date conversion in fetch_internaldate.
get_timezone() not used anymore, removed.
* imap4d/search.c: removed confusing comment.
* imap4d/util.c: changed mktime() calls to mu_mktime(), this
solves the timezone problem.
use imap_parse_date_time() in util_parse_internal_date0().
(Proposed by Sam).
* imap4d/imap4d.h: Added missing declarations.
* mailbox/mbx_imap.c: Patch from Sam: added imap_parse_date_time().
imap_parse_date_time() returns tm/timezone pair.
* mailbox/folder_mbox.c: added #include <sys/types.h>. It is needed
on FreeBSD before inclusion of <dirent.h>
* sieve/sieve.c: swapped arguments in a call to va_start().
2001-06-15 Sergey Poznyakoff
Bunch of patches provided by Sam Roberts:
* imap4d/util.c: Fixed format bugs in util_parse.*_date functions.
Use parse822_date_time() in util_parse_header_date().
Some changes to pacify gcc -Wall.
* imap4d/util.c,imap4d/search.c,imap4d/imap4d.h:
Rename the confusing functions:
util_parse_header_date -> util_parse_822_date
util_parse_rfc822_date -> util_parse_ctime_date
include <ctype.h>
2001-06-14 23:01 sroberts
* mailbox/parse822.c: I think timezone info is now placed in struct
tm correctly.
* include/mailutils/parse822.h: Prototypes for functions to parse
rfc822 date-time.
* sieve/: Makefile.am, test.c: Patches from Sergey to make the
auto* stuff work, now uses lex/yacc portably, and puts all the
necessary files into the distribution.
* sieve/ylwrap: Portable wrapper for lex/yacc invocations, by Tom
Tromey <tromey@cygnus.com>, modified by Sergey Poznyakoff
<gray@farlep.net> to replace yy prefixes, so multiple grammers can
co-exist.
* sieve/sieve.c: Define EOK ifndefed.
* examples/showmail.c: No longer relevant to the current APIs.
* examples/mbox-dates.c: GNU indented.
* examples/addr.c: GNU indented
* examples/.cvsignore: Added example executables.
* examples/mbox-explode.c: Made so it now saves all the attachments
from all the messages in a folder. Also GNU indented.
* doc/envelope.texi: Added some text to the envelope docs, still
incomplete.
* doc/url.texi: Noted the IMAP url syntax.
* doc/mailutils.texi: Some of the RFCs were missing, or
miscategorized in the references sect.
* doc/.cvsignore: Ignoreing files.
* doc/rfc1939.txt: Was checked in with DOS line terminators,
converted to Unix.
2001-06-11 Alain Magloire
* imap4d/util.c (util_msgset): When '*' was define in the
set it was not added to the count.
Bug reported by Jakob Kaivo.
2001-06-09 Alain Magloire
* mailbox2/pop3/pop3_open.c: Remove for pop3_connect.c
* mailbox2/pop3/pop3_close.c: Remove for pop3_disconnect.c
* mailbox2/pop3/pop3_connect.c: New.
* mailbox2/pop3/pop3_disconnect.c: New.
* mailbox2/include/mailutiils/error.h: New macro
MU_ERROR_OPERATION_CANCELED
* mailbox2/include/mailutils/pop3.h: Move the enum state in sys/pop3.h
2001-06-09 Sam Roberts
* rfc1738.txt, rfc2045.txt, rfc2046.txt, rfc2047.txt, rfc2049.txt,
rfc2088.txt, rfc2111.txt, rfc2192.txt, rfc2193.txt, rfc2221.txt,
rfc2298.txt, rfc2342.txt, rfc2368.txt, rfc2384.txt, rfc2821.txt,
rfc2822.txt, rfc3028.txt, rfc821.txt, rfc822.txt: These RFCs are
relevant to mailutils, and many (all?) are referenced in the
mailutils documentation.
2001-06-09 Alain Magloire
* examples/mbox-explode.c: message_save_attachment, should take
the part. Continue if the message does have a Date or Subject field.
* mailbox/mapfile_stream.c (_mapfile_open): Identation.
2001-06-09 Alain Magloire
* mailbox/tcp.c (_tcp_get_fd): Buglet, comparing fd against EINVAL
instead of -1.
* mailbox2/pop3/pop3_apop.c: New.
* mailbox2/pop3/pop3_capa.c: New.
* mailbox2/pop3/pop3_close.c: New.
* mailbox2/pop3/pop3_create.c: New.
* mailbox2/pop3/pop3_dele.c: New.
* mailbox2/pop3/pop3_destroy.c: New.
* mailbox2/pop3/pop3_iterator.c: New.
* mailbox2/pop3/pop3_list.c: New.
* mailbox2/pop3/pop3_lista.c: New.
* mailbox2/pop3/pop3_noop.c: New.
* mailbox2/pop3/pop3_open.c: New.
* mailbox2/pop3/pop3_pass.c: New.
* mailbox2/pop3/pop3_quit.c: New.
* mailbox2/pop3/pop3_readline.c: New.
* mailbox2/pop3/pop3_response.c: New.
* mailbox2/pop3/pop3_retr.c: New.
* mailbox2/pop3/pop3_rset.c: New.
* mailbox2/pop3/pop3_sendline.c: New.
* mailbox2/pop3/pop3_stat.c: New.
* mailbox2/pop3/pop3_stream.c: New.
* mailbox2/pop3/pop3_timeout.c: New.
* mailbox2/pop3/pop3_top.c: New.
* mailbox2/pop3/pop3_uidl.c: New.
* mailbox2/pop3/pop3_uidla.c: New.
* mailbox2/pop3/pop3_user.c: New.
* mailbox2/tcp.c: New.
* mailbox2/iterator.c: New.
* mailbox2/stream.c: New.
* mailbox2/pop3/pop3client.c: Test case should probably somewhere else
in example/ perhaps?
2001-06-09 Alain Magloire
* mailbox2/*: First attempt to define the new API.
POP3 was implemented.
2001-06-07 Sam Roberts
* .cvsignore, AUTHORS, COPYING, Makefile.am, NEWS, README,
addr-lex.l, addr.y, comparator.c, comparator.h, exitcodes.h,
hmac-md5.h, imparse.c, imparse.h, interp.c, interp.h, md5.c, md5.h,
md5global.h, message.c, message.h, parseaddr.c, parseaddr.h,
script.c, script.h, sieve-gram.y, sieve-lex.l, sieve.c,
sieve_err.c, sieve_err.h, sieve_interface.h, svfield.c, svfield.h,
sysexits.h, test.c, tree.c, tree.h, util.c, util.h, xmalloc.c,
xmalloc.h: Initial commit of the port of CMU's sieve engine. It
builds, and some actions work, but has seen very little use.
2001-06-03 Sam Roberts
* mailbox/file_stream.c,mailbox/mapfile_stream.c: Return EINVAL
for meaningless combination of MU_STREAM_READ + WRITE.
2001-06-03 Alain Magloire
* doc/*; Bunch of typos corrected.
Patch from Thomas Fletcher.
2001-06-02 Sam Roberts
* mailbox/parse822.c,include/mailutils/parse822.h: functions
to parse rfc822 date-time.
* examples/mbox-explode.c: example of saving all mime attachments
for messages in a mailbox.
* examples/mbox-dates.c: example of using the date-time parser, it
prints all the dates in a mailbox that it can't parse.
* examples/Makefile: makes the mbox-* examples.
2001-06-01 Alain Magloire
* mailbox/mbx_pop.c (pop_writeline): if buffer is NULL noop.
2001-06-01 Sergey Poznyakoff
* imap4d/search.c: case-insensitive comparison for text fields.
Error checking for stray symbols at the end of criteria.
* imap4d/util.c: util_strcasestr() function. Functions for
converting between text and integer representation of
attributes. Split util_parse_internal_date: the helper
function util_parse_internal_date0 also returns the
pointer to the location in the string where parsing
stopped.
* imap4d/util.h: protos for util_strcasestr() and
util_parse_.*_date() functions.
* imap4d/imap4d.c: force ofile to be line-buffered, so command
continuation requests are immediately visible.
* imap4d/append.c: implemented. Currently this needs the
helper function mailbox_destroy_folder(), so that
mailbox_set_stream does its work. Also the situation
with message attributes needs to be cleared.
2001-06-01 Alain Magloire
* mailbox/debug.c(debug_print): Noop is format is NULL;
* mailbox/mbx_imap.c (imap_messages_count): Hack! Force a
reconnect if the server timeout on us. This is not the right
approach and does not work well, fix later.
(message_operation): Check if selected is not null, first.
* mailbox/folder_imap.c (folder_imap_create): Wrong state.
* mailbox/mime.c: Pass down the return value if not ENOENT.
2001-05-30 Dave Inglis
* mailbox/mbx_pop.c (CHECK_ERROR): Force the mailbox to call connect
again when an error occured. For example the QPopper(Qalcomm) POP3
server timeout very quickly, 30 seconds violating the RFC. So when
Readin the stream again we reconnect.
2001-05-30 Dave Inglis
* mailbox/filter_trans.c (base64_decode): The variable should
be unsigned char not signed char. By default gcc treats a
declaration of "char*" like "signed char*", CC Watcom did not.
(base64_encode): Likewised.
* mailbox/mime.c: Read 'itl the end of the stream.
2001-05-29 Sergey Poznyakoff
* imap4d/uid.c, imap4d/search.c: support for UID SEARCH command;
* imap4d/util.c: forgotten fix to util_msgset().
2001-05-27 Sergey Poznyakoff
* imap4d/search.c: Added missing <message set> condition.
2001-05-27 Sergey Poznyakoff
* imap4d/imap4d.c, imap4d/capability.c, imap4d/copy.c,
imap4d/create.c, imap4d/delete.c, imap4d/imap4d.h,
imap4d/list.c, imap4d/rename.c, imap4d/select.c,
imap4d/status.c, imap4d/namespace.c (added):
implemented NAMESPACE (rfc2342) support
* imap4d/util.c:
added util_normalize_path() function.
util_msgset() bailed out at 1:1 -- fixed.
Added util_parse_internal_date(), util_parse_header_date(),
util_parse_rfc822_date().
* imap4d/bye.c: typo in diagnostic output
* imap4d/noop.c: issue unsolicited response (as per rfc2060)
* imap4d/select.c: ditto
* imap4d/store.c: set MU_ATTRIBUTE_MODIFIED on a message, so
expunge will know it was modified.
* imap4d/search.c: implemented. Charsets other than US-ASCII are
not supported, though.
2001-05-27 Sam Roberts
* mailbox/address.c: removed unfolding of lines at a NL before parsing.
* mailbox/parse822.c: consider LF and CRLF equivalent for purposes
of unfolding lines.
2001-05-23 Alain Magloire
* mailbox/mbx_default.c (mailbox_create_default): Check
for URL in the mailbox name.
2001-05-23 Dave Inglis
* mailbox/mime.c (_mimepart_body_read): Use stream_is_seekable()
to detect if the stream is POP for example and read 'til the end.
(mime_get_part): Reuse the stream the original stream flags on the
newly created message.
Fix and patches provided by Dave Inglis.
2001-05-23 Sergey Poznyakoff
* pop3d/user.c: check for NULL return from getpwnam()
* imap4d/login.c: Likewised.
2001-05-21 Alain Magloire
GNU md5 is GPL, but we agreed that the libraries should
fall under LGPL.
Same goes for basename() and pretty much everything under
lib/*.[ch]
* mailbox/message.c (message_get_uidl): Remove the dependency
from GNU md5.
* mailbox/md5-rsa.c: New File.
* mailbox/md5-rsa.h: New File.
* mailbox/attachment.c (message_create_attachment): Remove
the dependency from lib/basename.c
* mailbox/mbx_mbox.c (mbox_tempfile): Remove
the dependency from lib/basename.c
* lib/signame.c: Replace in favor of the wellknown strsignal().
* lib/strsignal.c: New file, use the mu_signame() written by
Sergey.
* pop3d/signal.c: Use strsignal() unconditionnaly.
* imap4d/signal.c: Use strsignal() unconditionnaly.
* configure.in: autoconf-2.50 is having difficulty parsing
a long AC_CHECK_LIB, break it in two.
Check for strsignal()
* doc/auth.texi: Bug fixes in texinfo.
* doc/Makefile.am: Commented the ex-address.texi generation.
* doc/ex-address.texi: New file.
2001-05-21 Alain Magloire
* configure.in, imap4d/signal.c, pop3d/signal.c:
sys_siglist is not defined on some systems (namely, Solaris).
* lib/signame.c: (added) Provide mu_signame() function to convert
signal number to string representation.
* lib/strtok_r.c: bugfix
2001-05-19 Alain Magloire
* AUTHORS: Update to reflect Sergey and Sam contributions.
2001-05-20 Sergey Poznyakoff
* mailbox/mbx_mboxscan.c:* Bug in mailbox/mbx_mboxscan.c made the
stuff coredump upon encountering more than one subject in the header.
* pop3d/pop3d.c: Typo.
2001-05-19 Sam Roberts
* mailbox/parse822.c: parse822 is a little smarter in the way
it handles CRLF.
2001-05-19 Alain Magloire
* mailbox/mbx_default (mailbox_create_default): Base on a
suggestion/patch by Sam Roberts to provide tilde, plus and equal
(~ + = ) expansion.
* mailbox/address.c: Unfold field-bodies with NL.
* mailbox/parse822.c (parse822_field_body): New function.
(parse822_field_name): New function.
* pop3d/user.c: Use mailbox_create() now instead of
mailbox_create_default.
* pop3d/apop.c: Likewise.
2001-05-16 Dave Inglis
* mailbox/mime.c (_mime_parse_mpart): Better check for the
boundary.
2001-05-14 Sergey Poznyakoff
* pop3d/user.c: After unsuccessful authorization frees cmd twice,
2001-05-13 Alain Magloire
* imap4d/fetch.c: Lots of bug fixing. To many to enumerate.
* imap4d/imap4d.h: New prototypes.
* imap4d/login.c: syslog() the user.
* imap4d/select.c: Remove the call to mailbox_create_default.
* imap4d/util.c (util_getitem): New function.
(util_send_qstring): New function.
(util_send_literal): New function.
* mailbox/address.c: Parse822 can not handle '\n' inside
the buffer, prune them out before.
* mailbox/mime.c (_mime_parse_mpart_message): The mime->stream
was destroy when doing mime_get_part () better get it every time.
(_mime_body_fd): Likewised.
* mailbox/smtp.c: Do not close the stream on destroy.
2001-05-11 Alain Magloire
* imap4d/fetch.c: More cleanup in the bodystructure code,
arrange response indentation etc ...
* impa4d/utils.c (util_send_string): New helper function.
2001-05-10 Alain Magloire
* imap4d/fetch.c: Implemented INTERNALDATE.
* mailbox/mbx_imap.c (imap_envelope_date): ctime() always
append a newline, nuke it.
* mailbox/stream.c (stream_read): If the amount requested is bigger
then the buffer cache size, bypass the buffering mechanism.
2001-05-09 Alain Magloire
Take the missing pieces from the pop3d and make the
imap4d a standalone daemon.
* imap4d/fetch.c: Remove fetch_body_peek().
and use fetch_body() instead.
(fetch_operation): Malloc the entire message... not good.
* imap4d/bye.c: New file.
* imap4d/imap4d.c: Put the networking code taken from
pop3d.c.
* imap4d/lsub.c: Implemented.
* imap4d/subscribe.c: Implemented.
* imap4d/unsubscribe.c: Implemented.
* pop3d/pop3d.c: pop3d_usage() move from extra.c
* pop3d/signal.c: pop3d_signal () move from extra.c
* mailbox/url_imap.c: It was not checking for the port number.
* mailbox/filter_rfc822.c: Check for the lines if available.
2001-05-07 Alain Magloire
Now we can have multiple access to the mailbox and the server
will update the mailbox and send the unsollicited responses.
This is implemented in imap4d/sync.c.
* imap4d/copy.c: Move the code into imap4d_copy0() to allow
the use of UID COPY.
(imaprd_copy0): New function.
* imap4d/fetch.c: Define a new structure command for FETCH.
(fetch_getcommand): New function.
(imap4d_fetch0): New function to allow the use of UID COPY.
(fetch_envelope0): New function to permit to reuse the function
in bodystructure.
(fetch_bodystructure): Implemented.
(fetch_bodystructure0): The implementation.
(bodystructure): The helper function for fetch_bodystructure.
* imap4d/imap4d.c (imap4d_mainloop): call imap4d_sync() in the
mainloop. Now use FILE *ifile.
* imap4d/imap4d.h: Update prototypes. Define ERR_NO_MEM and
ERR_NO_OFILE.
* imap4d/select.c (imap4d_select0): Call imap4d_sync() to update.
* imap4d/store.c (ima4d_store): Cal imap4d_sync_flags() to
update the flags in the uid_table.
* imap4d/uid.c: Implemented.
* imap4d/util.c (imap4d_readline): Use fgets() and deal
with literals send from the client.
* imap4d/sync.c: New file.
* include/mailutils/header.c: Added some new headers.
* mailbox/attribute.c (attribute_copy): Do a shalow copy.
* mailbox/file_stream.c: Check if FILE * is null in all functions.
* mailbox/mailbox.c (mailbox_is_updated): Should not return ENOSYS
but rather 1.
2001-05-07 Sam Roberts
* mailbox/parse822.c: Now allow a unix mailbox in an address.
* include/mailutils/parse822.h: Declare the function to parse them.
* doc/address.texi: Document the fact.
* doc/Makefile.am: Automatically build the example code from addr.c.
* examples/addr.c: And update the parser test.
* examples/Addrs.good: Update the parser test.
2001-05-03 Sam Roberts
* mail/mail.c: Typo
2001-05-03 Alain Magloire
* argp/argp-help.c (hol_entry_help): Some compiler like Watcomm
can not initialize a local structure struct .. = { .. }. Do it
explicitely field by field.
* argp/arpg-parse.c: Watcomm choke on N_() macro.
(parser_init): Watcomm does not like operation on a void * pointer.
* imap4d/login.c: Cast the return of crypt(), since some platforms
do not provide a prototype in <unistd.h>
* pop3d/user.c: Cast the return of crypt(), since in may not be
declare in <unistd.h>.
* lib/snprintf.c: Use only __STDC__ to detect <stdarg.h>
* lib/snprintf.h: Use only __STDC__.
* mail/mail.h: The global variable should be declare extern.
* mail/pipe.c: Use 512 buffer instead of BUFSIZ, go easy on the stack.
* mail/print.c: Use 512 buffer instead of BUFSIZ, go easy on the stack.
* mail/write.c: Use 512 buffer instead of BUFSIZ, go easy on the stack.
* mailbox/folder_imap.c: Declare strtock_r ().
2001-05-03 Sergey Poznyakoff
* pop3d/user.c: Misplace parentheses around the mailbox_xx() calls.
Do not free (buf) since it is now static storage. Unfortunately most
of the pam modules do openlog() on their own, thus after
authentication all logging output flows to where the last pam module
has directed it, which is usually `auth' facility.
Put back closelog()/openlog().
* pop3d/pop3d.h: ifile is now FILE *.
pop3d_realine () take FILE * as a prototype.
* pop3d/pop3d.c (pop3d_mainloop): Refresh lock, pop3d_touchlock().
Register SIGALRM in the child.
Do not free (buf) since it is now static storage.
* pop3d/extra.c (pop3d_readline): Change to use
fgets () and alarm ().
With small modification from Alain.
(pop3d_signal): ofile will be NULL in the *child* process:
whereas in the parent one, ofile will always be NULL, since it lives
in the BSS (FILE *ofile;) and gets initialized only in the child
process. Thus, when the parent receives any signal, SIGTERM for
example, it does pop3d_abquit(ERR_SIGNAL) and dies doing
fprintf(ofile, ...)
2001-05-02 Alain Magloire
Some of the Makefile.am contain gcc specific options
like -Wall, -pedantic or -ansi remove them.
* configure.in: Check for stdarg and sysconf.
* mailbox/mime.c (_mime_set_content_type): Delayed the
creation of the header-field content-type until the message
is requested via mime_get_message().
* pop3d/lock.: new File to implement the locking.
* pop3d/apop.c: Rearrange the code around the #ifdefs
to be clearrer.
Make sure that when we use strncpy() that the buffer is
null terminated. Added the locking propose by Sergey to apop.
* pop3d/capa.c: Announce we support PIPELINING.
* pop3d/extra.c (pop3d_abquit): Remove ERR_DEAD_SOCK.
Remove the extra fflush(), the call to exit() always
flush the buffers.
(pop3d_readline): Implement PIPELINING.
* pop3d/pop3d.c: Remove the typedef struct sockaddr SA
for more clarity since it is not use that often.
port is not longer a global variable.
children should have the volatile qualification.
2001-04-29 Alain Magloire
* pop3d/extra.c (pop3d_readline): Modify the loop to be able
to support PIPELINING.
* pop3d/capa.c: Advertise that we support PIPELINING.
2001-04-29 Sergey Poznyakoff
Return values of all signal handlers are changed to RETSIGTYPE
and configure.in is modified accordingly. This is more portable.
* configure.in: New Macro AC_TYPE_SIGNAL.
* mailbox/locker.c (locker_lock): while trying to read pid value
from the pidfile passed wrong buffer length to read() call, namely:
read(fd, buf, sizeof (pid_t)).
2001-04-29 Sergey Poznyakoff
I have modified locker.c to implement reference count. The
struct _locker is now:
struct _locker { int fd; int refcnt; char *fname; int flags; };
The refcnt member gets incremented each time locker_lock is called and
decremented each time locker_unlock is called. Actual locking is
performed only if refcnt == 0 on entry to locker_lock. Similarly,
unlocking is performed only when refcnt gets decremented to 0 by
locker_unlock. Also I have added basic support for NFS-secure
locking.
* mailbox/locker.c: Reference count implementation.
2001-04-25 Alain Magloire
* imap4d/store.c: First implementation.
* mailbox/attribute.c (attribute_unset_flags): New function.
2001-04-23 Sergey Poznyakoff
* mailbox/mbx_mbox.c (mbx_expunge): It assumes that mbox_get_message()
will place the pointer to message into mum->message member. But
mbox_get_message() relies on 1-based message numbers, whereas `mum'
pointer is obtained using 0-based indexing.
2001-04-23 Alain Magloire
Sergey Poznyakoff noted: When the user's mailbox has zero size, mmap
fails on Solaris. On GNU/Linux it reuturn NULL buf subsequent munmap
fails.
* mailbox/mapfile_stream.c: To take care of this, mfs->ptr is set
to NULL for len == 0;
*mailbox/mbx_mbox.c (mbox_is_updated): Should I have return 0 (FALSE)
when size change.
2001-04-23 Sergey Poznyakoff
Several sources from mailbox subdirectory call fprintf(stderr,...)
to issue error messages. As the stderr usually gets connected to
the output socket, the client program receives all these error
messages and gets confused, since they do not start with
rfc-compliant +OK, -ERR keywords. So I have added a module
error.c and changed all these fprintf's to error()'s. Actual
function that ouputs the messages can be supplied by the
application using error_set_print() call.
2001-04-23 Alain Magloire
* pop3d/*.[ch]: Rename all the pop function pop3d_xx()
instead of pop3_xx() to be consistent with imap4d/*.
* mailbox/mbx_pop.c (pop_user): This is sudden death; for many pop
servers, it is important to let them time to remove locks or move
the .user.pop files. This happen when we do BUSY_CHECK(). For
example, the user does not want to read the entire file, and wants
start to read a new message, closing the connection and immediately
contact the server again, and we'll end up having
"-ERR Mail Lock busy" or something similar. To prevent this race
condition we sleep 2 seconds.
2001-04-23 Sergey Poznyakoff
It is often convenient to separate log outputs from POP and SMTP
servers. --with-log-facility flag which allows to specify to which
log facility the loggin output should be directed.
System administrators often prefere to have more information about
unsuccessfull authentications. I have added more verbose logging
to pop3d/user.c. Both failed attempts and possible account probes
(USER immediately followed by QUIT) are logged.
Made pop3d to be less verbose about its WELCOME prompt. When the
symbol TERSE_MODE is defined, pop3d introduces itself just as
+OK POP3 ready <apop_hash>
insead of divulging its type and version. This is a bit paranoid,
but it is better to be on the safe side...
* configure.in: ARGPINC gets assigne a relative path, due
to which the compilation fails if the package is configure with
--srdir=<path> option.
* configure.in: --with-log-facility new option.
* acconfig.h: LOG_FACILITY
* doc/mailutils.texi: Typo.
* mailbox/mapfile_stream.c: Define MAP_FAILED.
* pop3d/extra.c (pop3_abquit): new case ERR_MBOX_SYNC.
(pop3_signal): Syslog the reason.
* pop3d/pop3d.c (pop_mainloop): Syslog the hostname of
the user on connect.
(pop3_daemon): Log to many children. Lacks call to exit(), so if
pop3d is run as a daemon, any child after exiting from
pop3_mainloop tries to accept() from already closed socket
and issues spurious error messages.
(pop3_mainloop): Check if the mailbox is uptodate if not
and the size shrink, bail out. Do not send version number.
* pop3d/pop3d.h: ERR_MBOX_SYNC define. WELCOME removed.
* pop3d/signal (pop3_sigchld): Lacks signal() call, due to which
the signal handler gets cleared after first SIGCHLD and all
subsequent children, when finished, just hang around like zombies.
* pop3d/user.c: Log to LOG_FACILITY all the errors.
2001-04-23 Alain Magloire
Sergey Poznyakoff pointed out that errno changes depending
if _REENTRANT is set or not. So for enable thread we take
the approach of always defining _REENTRANT.
He also noted that when in standalone the child was not exiting.
* acconfig.h: Define _REENTRANT.
* configure.in: Check for sigaction().
* configuire.in: AC_DEFINE(_REENTRANT).
* doc/Makefile.am: add rfc2060-errata.
* doc/rfc2060-errata: New File.
* imap4d/copy.c: First Implementation.
* imap4d/status.c: First implementation.
* mailbox/file_stream.c (_file_open): For CREAT, close
the fd if we failed.
* mailbox/folder_imap.c: Remove the _REENTRANT.
* mailbox/mbx_mbox.c: Remove the _REENTRANT.
* mailbox/monitor.c: Remove the _REENTRANT.
* pop3d/pop3d.c (main): maxchildren boosted to 20.
(pop3_daemon_init): Use sigaction() for SIGCHLD,
the sematics of signal() is unreliable on some platforms.
* pop3d/signal.c: Save errno.
2001-04-22 Alain Magloire
* imap4d/create.c: First implementation.
* imap4d/delete.c: First implementation.
* imap4d/list.c: First implementation.
* imap4d/rename.c: First implementation.
* imap4d/util.c: New functions.
(util_tilde_expansion): expand ~.
(util_unquote): Remove surrounding double quotes.
(util_getfullpath): Expand the path to absolute.
* imap4d/fetch.c: Did not cycle throught the items.
(fetch_send_address): Patch from Sam Roberts, did not
use the index.
* mailbox/attachement.c (message_unencapsulate): Little buglet
strncasemp() passing the wrong size.
2001-04-19 Alain Magloire
* mailbox/smtp.c(smtp_readline): Because of the buffering mechanism,
we must maintain the offset.
* imap4d/list.c: partially implemented the LIST command.
* imap4d/imap4d.c: homedir new global variable.
* imap4d/login.c: same ${HOME} in homedir.
* imap4d/util.c (util_getword): Be aware of the quotes.
* lib/fnmatch.c: New replacement file.
* lib/fnmatch.h: New replacement file.
* configure.in: Check for fnmatch().
2001-04-18 Alain Magloire
Finally took time to put the code in from Jakob first draft, in
an email excerpt:
states is the valid states for a command (eg. LOGIN is only valid in
non-authenticated state, SELECT is valid in authenticated or
selected). success is the state to enter when the command completes
successfully (STATE_NONE means no change) and failure is the state to
enter when the command fails.
* imap4d/*.c: All the commands check there state.
* imap4d/fetch.c: Cleanup the fetch code, and broke
the fetch_operation() routine in multiple routines.
(fetch_message): New function.
(fetch_header): Likewised
(fetch_content): Likewised
(fetch_io): Likewised
(fetch_header_fields): Likewised
(fetch_header_fields_not): Likewised
(fetch_send_address): Likewised
* mailbox/header.c: Some functions were usefull while
programming the imap server, put them here.
(header_aget_value): New function.
(header_aget_field_name): New function.
(header_aget_field_value): New function.
* mailbox/memory_stream.c: New file, implemented a
malloc() buffer that you can access via the stream interface.
* mailbox/file_stream.c: Remove spurious checks.
* mailbox/mapfile_stream.c: Remove spurious checks.
(_mapfile_read): check if there is no newline left.
2001-04-16 Alain Magloire
To get things to compile on Solaris, change configure to check
for -lpthread since in libc the thread functions are defined
but all return ENOSYS, you need to explicitely link with -lphtread.
the ctype functions is*() arguments should be explicitely cast
since Solaris use them as indexes. __REENTRANT as to be define
if compile with support for threads. Never realize this but
setenv() is a BSD/GNU thing, so took a variant from libiberty
to cope.
* configure.in: Check for setenv. First check if -lphtread is ok.
* lib/setenv.c: New functions.
* lib/Makefile.am: add setenv.c in EXTRA_DIST.
* imap4d/imap4d.h: Include <alloca.h>
* mailbox/attachment.c: Include <alloca.h>
* (_header_get_param): isspace() cast argument.
* mail/mail.h: check if <paths.h> is available if not
define _PATH_SENDMAIL=/usr/lib/sendmail.
* mailbox/folder_imap.c: if pthread available, define _REENTRANT.
Include <alloca.h>.
(imap_bodystructure0): isdigit() cast argument.
* mailbox/mbx_mbox.c: if pthread available, define _REENTRANT.
Include <alloca.h>.
* mailbox/parse822.c: isdigit() cast argument unsigned.
2001-04-15 Alain Magloire
The FILE* stream "stdout" is not an lvalue so it is an error to
attempt to assign to it. To be able to redirect at will stdout
we need to assign it. In GNU lib C, it was not error since stdout
stderr, and stdin are variables, but to be portable we can not
assume this. The way out is to always use fprintf () and have
a global varialbe "ofile" pointing to stdout.
* mail/*: All the files under mail been change to use fprintf()
and ofile as the default stdout.
Copyright updated.
2001-04-15 Alain Magloire
Create a argp directory, it contains the necessary
files to build a standalone libargp.a
* argp: New directory.
argp-ba.c, argp-eexst.c, argp-fmtstream.c, argp-fmtstream.h
argp-fs-xinl.c, argp-help.c, argp-namefrob.h, argp-parse.c
argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, pin.c.
* mail/mail.c: Comment out the code that use readline
specifics WITH_READLINE.
* mail/mail.h: Likewised.
* mail/util.c: Likewised.
2001-04-15 Alain Magloire
* Makefile.am: Add argp in the list of subdirs.
* configure.am: Check for argp.h and look for
argp_parse().
* lib/strchrnul.c: New function.
* lib/strndup.c: New function.
* lib/strnlen.c: New function.
* lib/vasnprintf.c: New function.
* lib/getopt.c: Updated.
* lib/getopt1.c: Updated.
* lib/getopt.h: Updated.
* frm/Makefile.am: Remove -DTESTING in CFLAGS.
* from/Makefile.am: Remove -DTESTING in CFLAGS.
Add AUTOMAKE_OPTIONS.
* imapd/Makefile.am: Likewised.
* pop3d/Makefile.am: Likewised.
* mail/Makefile.am: Likewised. Added ARGPLIB macro
2001-04-14 Sam Roberts
* examples/{Makefile,Addrs,addr.c,Addrs.good}: address test f/w.
* include/mailutils/address.h,mailbox/{address.c,parse822.c}: now
stuff a group name into an _address, and added a function to do
a quick check if it is a group.
* mailbox/parse822.c: fixed bug where ",sam@foo.bar" wasn't valid.
2001-04-14 Alain Magloire
* mailbox/folder_imap.c: When calling imap_writeline () the
cookie for the tag should be unsigned %d --> %u.
(imap_send) : The number of bytes in memmove was wrong.
* mailbox/mbx_imap.c: Some duplicate degug calls MAILBOX_DEBUG0()
removed.
(attribute_string): IMAP does not have a \\Read flag it should be
the same as \\Seen so attribute_read() == attribute_seen().
(flag_string): New function.
(imap_attr_set_flags): Use flag_string(), instead.
* mailbox/include/imap0.h: CLEAR_STATE() should also deselect
the current mailbox.
* mailbox/mbx_pop.c (pop_write): The number of bytes in the memmove
was wrong.
* imap4d/imap4d.h: Add HAVE_SECURITY_PAM_APPL_H.
* imap4d/login.c: PAM_ERROR wrongly define.
* imap4d/expunge.c: Initialise variable sp.
* imap4d/logout.c: Initialise variable sp.
* imap4d/noop.c: Initialise variable sp.
* mailbox/attachement.c (message_create_attachment): Use base_name().
* mailbox/mbx_mbox.c (mbox_tmpfile): Use base_name().
* configure.in: AC_REP_FUNC(vasprintf strcasecmp strncasecmp).
* include/mailutils/Makefile.am: Add property.h, parse822.h.
* lib/vasprintf.c: Taken from libit.
* lib/basename.c: Taken from libit/fileutils.
* lib/Makefile.am.c: Always use our basename(base_name).
(AM_INIT_AUTOMAKE): Change version to 0.0.9
2001-04-13 Sam Roberts
QNX needed to include <strings.h> for many of the useful string
functions also to define _QNX_SOURCE so <sys/time.h> doesn't have
an internal warning.
* configure.in: Check for libgen.h.
* imap4d/imap4d.h: Define __QNX_SOURCE.
* mailbox/mime.c: wasn't including config.h
* mailbox/attachment.c: QNX needed libgen.h for basename(),
include <strings.h> if define.
* mailbox/filter.c: Include <strings.h>.
* mailbox/mbx_mbox.c: Include <strings.h>.
* mailbox/folder_imap.c: Include <strings.h>.
* mailbox/header.c: Include <strings.h>.
* mailbox/property.c: Include <strings.h>.
* mailbox/registrar.c: Include <strings.h>.
* mailbox/url.c: Include <strings.h>.
* mailbox/url_pop.c: Include <strings.h>.
* pop3d/user.c: QNX says getspnam(char* n), I cast away the error.
2001-04-13 Sam Roberts
* mailbox/parse822.c, include/mailutils/parse822.h: now can
quote the local-part of and addr-spec, and a string.
2001-04-13 Sam Roberts
* doc/address.texi: updated docs, now they match the parse822.
* mailbox/parse822.c: small tweaks to the new parser, the changes
made during the tidying over the last month were:
- use C comments only.
- don't use C++ reserved words.
- fix is_digit() to be like the other is functions
- Changed return codes to:
. no mem (ENOMEM)
. function wasn't called correctly, usually a missing
argument (EINVAL)
. invalid syntax found during parsing (ENOENT)
. success == 0
- const-corrected the APIs
- removed unnecessary (in C) casts.
- mailbox_t* removed in favor of address_t.
- fix handful of memory leaks detected by Alain.
2001-04-10 Alain Magloire
* pop3d/retr.c (pop3_retr): Typo.
* pop3d/top.c (pop3_top): No need to reallocate when sending the
headers.
* doc/mailbox.texi: Put the functions in alphabetic orders.
2001-04-10 Alain Magloire
* mailbox/Makefile.am: filter_trans.c added, trans_stream.c deleted.
* mailbox/attachment.c (message_create_attachment): use
filter_create().
(message_save_attachment): use filter_create().
* mailbox/body.c (body_set_lines): Wrong comparison for the owner.
* mailbox/mbx_mbox.c: Do not count the line separtor of part
of the mailbox.
* mailbox/url.c (url_is_same_sheme): New function.
(url_is_same_user): New function.
(url_is_same_path): New function.
(url_is_same_host): New function.
(url_is_same_port): New function.
* mailbox/folder.c : Moved the is_same_*() functions in url.c
they can be generally usefull.
(is_same_sheme): Removed.
(is_same_user): Removed.
(is_same_path): Removed.
(is_same_host): Removed.
(is_same_port): Removed.
* mailbox/folder_imap.c (folder_imap_create): New function,
CREATE a new mailbox.
(folder_imap_open): Calls folder_imap_create when the MU_STREAM_CREAT
flag is set.
* mailbox/mbx_imap.c: Appending messages implemented, if the message
comes from the same imap folder, it is COPY otherwise APPEND.
(is_same_folder): New function.
(imap_append_message): Implemented.
(attribute_string): New functions.
(imap_copy_message): New function.
* mailbox/include/imap0.h: New enum, IMAP_APPEND, IMAP_APPEND_ACK,
IMAP_APPEND_CONT, IMAP_APPEND_SEND, IMAP_COPY, IMAP_COPY_ACK,
IMAP_CREATE, IMAP_CREATE_ACK.
2001-04-06 Alain Magloire
* mailbox/parse822.c: New parser.
* include/mailutils/parse822.h: New file.
* mailbox/address.c (address_create): Remove the old parsing and use
parse822 as the underlying engine.
(address_parse): Removed.
(gettoken): Removed.
(quotes): Removed.
(address_get_personal): Remove the code to unquote, parse822 takes
care if it. Return value when no field is ENOENT.
(address_get_comments): Return value when no field ENOENT.
(address_get_local_part): Return value when no field ENOENT.
(address_get_domain): Return value when no field ENOENT.
(address_get_email): Return value when no field ENOENT.
(address_get_route): Return value when no field ENOENT.
* mailbox/message.c (message_sender): Use parse822 to retrieve
the email from the From: field.
(message_set_mailbox): New function.
* mailbox/misc.c : Removed the old parsing code.
(gettoken): Removed.
(parseaddr): Removed.
* mailbox/include/misc.h : Removed parseaddr() prototypes.
From Sam Roberts, the new parse822 parser..
2001-04-04 Alain Magloire
Introduction of the notion of filter_t object takes a stream and
perform some filtering on it. All the decoding streams will move
to this i.e. quoted-printable, base64 etc .. This scheme will also
permit users to add to the list new filters. Still work in progress.
* mailbox/Makefile.am : Add filter.c filter_rfc822.c.
* mailbox/body.c : When creating a floating body i.e creating
a temporary file, the stream was not "own" by the body_t.
(_body_get_fd): Likewised.
(_body_read):_ Likewised.
(_body_readline): Likewised.
(_body_write): Likewised.
(_body_truncate): Likewised.
(_body_size): Likewised.
(_body_flush): Likewised.
* mailbox/folder_imap.c (imap_literal_string): Check if the
callback.buffer is NULL.
(imap_body): Do no set the callback.type if "FIELDS" is part of the
string.
* mailbox/header.c: Remove the support for RFC822 it will be part
of the filter_t object.
* mailbox/mbx_mbox.c: Likewised.
* mailbox/mailbox.c (mailbox_size): Rename to mailbox_get_size().
* mailbox/stream.c (stream_is_seekable): New function.
(stream_set_property): New function.
(stream_get_property): New function.
* mailbox/trans_stream.c: Beautify.
* include/mailutils/filter.h: new file.
* doc/mailbox.texi: Updated.
More changes to come.
2001-03-20 Alain Magloire
* mailbox/folder_imap.c (imap_readline) : If the server goes away
suddenly return an error.
* mailbox/smtp.c (smtp_readline) : If the server goes away
suddenly return an error.
* mailbox/mbx_pop.c (pop_readline) : If the server goes away suddenly
return an error.
* mailbox/mbx_pop.c (pop_open) : The ticket comes from the folder.
2001-03-17 Vesselin Atanasov
* configure.in: AC_REQUIRE is not .. required. Just call
jm_FUNC_MALLOC and jm_FUNC_REALLOC.
2001-03-17 Alain Magloire
Clean the property object, mailbox and mailer have property object
that you can examine. Still a draft: the value of objects are ints.
This feature was put in to help the imap4d server, in this protocol
you can get a substring of the message starting from a certain offset.
To make the coding of imap4d simpler the complexity was move to the
* mailbox/smtp.c(smtp_readline): Because of the buffering mechanism,
we must maintain the offset.
* imap4d/list.c: partially implemented the LIST command.
* imap4d/imap4d.c: homedir new global variable.
* imap4d/login.c: same ${HOME} in homedir.
* imap4d/util.c (util_getword): Be aware of the quotes.
* lib/fnmatch.c: New replacement file.
* lib/fnmatch.h: New replacement file.
* configure.in: Check for fnmatch().
2001-04-18 Alain Magloire
Finally took time to put the code in from Jakob first draft, in
an email excerpt:
states is the valid states for a command (eg. LOGIN is only valid in
non-authenticated state, SELECT is valid in authenticated or
selected). success is the state to enter when the command completes
successfully (STATE_NONE means no change) and failure is the state to
enter when the command fails.
* imap4d/*.c: All the commands check there state.
* imap4d/fetch.c: Cleanup the fetch code, and broke
the fetch_operation() routine in multiple routines.
(fetch_message): New function.
(fetch_header): Likewised
(fetch_content): Likewised
(fetch_io): Likewised
(fetch_header_fields): Likewised
(fetch_header_fields_not): Likewised
(fetch_send_address): Likewised
* mailbox/header.c: Some functions were usefull while
programming the imap server, put them here.
(header_aget_value): New function.
(header_aget_field_name): New function.
(header_aget_field_value): New function.
* mailbox/memory_stream.c: New file, implemented a
malloc() buffer that you can access via the stream interface.
* mailbox/file_stream.c: Remove spurious checks.
* mailbox/mapfile_stream.c: Remove spurious checks.
(_mapfile_read): check if there is no newline left.
2001-04-16 Alain Magloire
To get things to compile on Solaris, change configure to check
for -lpthread since in libc the thread functions are defined
but all return ENOSYS, you need to explicitely link with -lphtread.
the ctype functions is*() arguments should be explicitely cast
since Solaris use them as indexes. __REENTRANT as to be define
if compile with support for threads. Never realize this but
setenv() is a BSD/GNU thing, so took a variant from libiberty
to cope.
* configure.in: Check for setenv. First check if -lphtread is ok.
* lib/setenv.c: New functions.
* lib/Makefile.am: add setenv.c in EXTRA_DIST.
* imap4d/imap4d.h: Include <alloca.h>
* mailbox/attachment.c: Include <alloca.h>
* (_header_get_param): isspace() cast argument.
* mail/mail.h: check if <paths.h> is available if not
define _PATH_SENDMAIL=/usr/lib/sendmail.
* mailbox/folder_imap.c: if pthread available, define _REENTRANT.
Include <alloca.h>.
(imap_bodystructure0): isdigit() cast argument.
* mailbox/mbx_mbox.c: if pthread available, define _REENTRANT.
Include <alloca.h>.
* mailbox/parse822.c: isdigit() cast argument unsigned.
2001-04-15 Alain Magloire
The FILE* stream "stdout" is not an lvalue so it is an error to
attempt to assign to it. To be able to redirect at will stdout
we need to assign it. In GNU lib C, it was not error since stdout
stderr, and stdin are variables, but to be portable we can not
assume this. The way out is to always use fprintf () and have
a global varialbe "ofile" pointing to stdout.
* mail/*: All the files under mail been change to use fprintf()
and ofile as the default stdout.
Copyright updated.
2001-04-15 Alain Magloire
Create a argp directory, it contains the necessary
files to build a standalone libargp.a
* argp: New directory.
argp-ba.c, argp-eexst.c, argp-fmtstream.c, argp-fmtstream.h
argp-fs-xinl.c, argp-help.c, argp-namefrob.h, argp-parse.c
argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, pin.c.
* mail/mail.c: Comment out the code that use readline
specifics WITH_READLINE.
* mail/mail.h: Likewised.
* mail/util.c: Likewised.
2001-04-15 Alain Magloire
* Makefile.am: Add argp in the list of subdirs.
* configure.am: Check for argp.h and look for
argp_parse().
* lib/strchrnul.c: New function.
* lib/strndup.c: New function.
* lib/strnlen.c: New function.
* lib/vasnprintf.c: New function.
* lib/getopt.c: Updated.
* lib/getopt1.c: Updated.
* lib/getopt.h: Updated.
* frm/Makefile.am: Remove -DTESTING in CFLAGS.
* from/Makefile.am: Remove -DTESTING in CFLAGS.
Add AUTOMAKE_OPTIONS.
* imapd/Makefile.am: Likewised.
* pop3d/Makefile.am: Likewised.
* mail/Makefile.am: Likewised. Added ARGPLIB macro
2001-04-14 Sam Roberts
* examples/{Makefile,Addrs,addr.c,Addrs.good}: address test f/w.
* include/mailutils/address.h,mailbox/{address.c,parse822.c}: now
stuff a group name into an _address, and added a function to do
a quick check if it is a group.
* mailbox/parse822.c: fixed bug where ",sam@foo.bar" wasn't valid.
2001-04-14 Alain Magloire
* mailbox/folder_imap.c: When calling imap_writeline () the
cookie for the tag should be unsigned %d --> %u.
(imap_send) : The number of bytes in memmove was wrong.
* mailbox/mbx_imap.c: Some duplicate degug calls MAILBOX_DEBUG0()
removed.
(attribute_string): IMAP does not have a \\Read flag it should be
the same as \\Seen so attribute_read() == attribute_seen().
(flag_string): New function.
(imap_attr_set_flags): Use flag_string(), instead.
* mailbox/include/imap0.h: CLEAR_STATE() should also deselect
the current mailbox.
* mailbox/mbx_pop.c (pop_write): The number of bytes in the memmove
was wrong.
* imap4d/imap4d.h: Add HAVE_SECURITY_PAM_APPL_H.
* imap4d/login.c: PAM_ERROR wrongly define.
* imap4d/expunge.c: Initialise variable sp.
* imap4d/logout.c: Initialise variable sp.
* imap4d/noop.c: Initialise variable sp.
* mailbox/attachement.c (message_create_attachment): Use base_name().
* mailbox/mbx_mbox.c (mbox_tmpfile): Use base_name().
* configure.in: AC_REP_FUNC(vasprintf strcasecmp strncasecmp).
* include/mailutils/Makefile.am: Add property.h, parse822.h.
* lib/vasprintf.c: Taken from libit.
* lib/basename.c: Taken from libit/fileutils.
* lib/Makefile.am.c: Always use our basename(base_name).
(AM_INIT_AUTOMAKE): Change version to 0.0.9
2001-04-13 Sam Roberts
QNX needed to include <strings.h> for many of the useful string
functions also to define _QNX_SOURCE so <sys/time.h> doesn't have
an internal warning.
* configure.in: Check for libgen.h.
* imap4d/imap4d.h: Define __QNX_SOURCE.
* mailbox/mime.c: wasn't including config.h
* mailbox/attachment.c: QNX needed libgen.h for basename(),
include <strings.h> if define.
* mailbox/filter.c: Include <strings.h>.
* mailbox/mbx_mbox.c: Include <strings.h>.
* mailbox/folder_imap.c: Include <strings.h>.
* mailbox/header.c: Include <strings.h>.
* mailbox/property.c: Include <strings.h>.
* mailbox/registrar.c: Include <strings.h>.
* mailbox/url.c: Include <strings.h>.
* mailbox/url_pop.c: Include <strings.h>.
* pop3d/user.c: QNX says getspnam(char* n), I cast away the error.
2001-04-13 Sam Roberts
* mailbox/parse822.c, include/mailutils/parse822.h: now can
quote the local-part of and addr-spec, and a string.
2001-04-13 Sam Roberts
* doc/address.texi: updated docs, now they match the parse822.
* mailbox/parse822.c: small tweaks to the new parser, the changes
made during the tidying over the last month were:
- use C comments only.
- don't use C++ reserved words.
- fix is_digit() to be like the other is functions
- Changed return codes to:
. no mem (ENOMEM)
. function wasn't called correctly, usually a missing
argument (EINVAL)
. invalid syntax found during parsing (ENOENT)
. success == 0
- const-corrected the APIs
- removed unnecessary (in C) casts.
- mailbox_t* removed in favor of address_t.
- fix handful of memory leaks detected by Alain.
2001-04-10 Alain Magloire
* pop3d/retr.c (pop3_retr): Typo.
* pop3d/top.c (pop3_top): No need to reallocate when sending the
headers.
* doc/mailbox.texi: Put the functions in alphabetic orders.
2001-04-10 Alain Magloire
* mailbox/Makefile.am: filter_trans.c added, trans_stream.c deleted.
* mailbox/attachment.c (message_create_attachment): use
filter_create().
(message_save_attachment): use filter_create().
* mailbox/body.c (body_set_lines): Wrong comparison for the owner.
* mailbox/mbx_mbox.c: Do not count the line separtor of part
of the mailbox.
* mailbox/url.c (url_is_same_sheme): New function.
(url_is_same_user): New function.
(url_is_same_path): New function.
(url_is_same_host): New function.
(url_is_same_port): New function.
* mailbox/folder.c : Moved the is_same_*() functions in url.c
they can be generally usefull.
(is_same_sheme): Removed.
(is_same_user): Removed.
(is_same_path): Removed.
(is_same_host): Removed.
(is_same_port): Removed.
* mailbox/folder_imap.c (folder_imap_create): New function,
CREATE a new mailbox.
(folder_imap_open): Calls folder_imap_create when the MU_STREAM_CREAT
flag is set.
* mailbox/mbx_imap.c: Appending messages implemented, if the message
comes from the same imap folder, it is COPY otherwise APPEND.
(is_same_folder): New function.
(imap_append_message): Implemented.
(attribute_string): New functions.
(imap_copy_message): New function.
* mailbox/include/imap0.h: New enum, IMAP_APPEND, IMAP_APPEND_ACK,
IMAP_APPEND_CONT, IMAP_APPEND_SEND, IMAP_COPY, IMAP_COPY_ACK,
IMAP_CREATE, IMAP_CREATE_ACK.
2001-04-06 Alain Magloire
* mailbox/parse822.c: New parser.
* include/mailutils/parse822.h: New file.
* mailbox/address.c (address_create): Remove the old parsing and use
parse822 as the underlying engine.
(address_parse): Removed.
(gettoken): Removed.
(quotes): Removed.
(address_get_personal): Remove the code to unquote, parse822 takes
care if it. Return value when no field is ENOENT.
(address_get_comments): Return value when no field ENOENT.
(address_get_local_part): Return value when no field ENOENT.
(address_get_domain): Return value when no field ENOENT.
(address_get_email): Return value when no field ENOENT.
(address_get_route): Return value when no field ENOENT.
* mailbox/message.c (message_sender): Use parse822 to retrieve
the email from the From: field.
(message_set_mailbox): New function.
* mailbox/misc.c : Removed the old parsing code.
(gettoken): Removed.
(parseaddr): Removed.
* mailbox/include/misc.h : Removed parseaddr() prototypes.
From Sam Roberts, the new parse822 parser..
2001-04-04 Alain Magloire
Introduction of the notion of filter_t object takes a stream and
perform some filtering on it. All the decoding streams will move
to this i.e. quoted-printable, base64 etc .. This scheme will also
permit users to add to the list new filters. Still work in progress.
* mailbox/Makefile.am : Add filter.c filter_rfc822.c.
* mailbox/body.c : When creating a floating body i.e creating
a temporary file, the stream was not "own" by the body_t.
(_body_get_fd): Likewised.
(_body_read):_ Likewised.
(_body_readline): Likewised.
(_body_write): Likewised.
(_body_truncate): Likewised.
(_body_size): Likewised.
(_body_flush): Likewised.
* mailbox/folder_imap.c (imap_literal_string): Check if the
callback.buffer is NULL.
(imap_body): Do no set the callback.type if "FIELDS" is part of the
string.
* mailbox/header.c: Remove the support for RFC822 it will be part
of the filter_t object.
* mailbox/mbx_mbox.c: Likewised.
* mailbox/mailbox.c (mailbox_size): Rename to mailbox_get_size().
* mailbox/stream.c (stream_is_seekable): New function.
(stream_set_property): New function.
(stream_get_property): New function.
* mailbox/trans_stream.c: Beautify.
* include/mailutils/filter.h: new file.
* doc/mailbox.texi: Updated.
More changes to come.
2001-03-20 Alain Magloire
* mailbox/folder_imap.c (imap_readline) : If the server goes away
suddenly return an error.
* mailbox/smtp.c (smtp_readline) : If the server goes away
suddenly return an error.
* mailbox/mbx_pop.c (pop_readline) : If the server goes away suddenly
return an error.
* mailbox/mbx_pop.c (pop_open) : The ticket comes from the folder.
2001-03-17 Vesselin Atanasov
* configure.in: AC_REQUIRE is not .. required. Just call
jm_FUNC_MALLOC and jm_FUNC_REALLOC.
2001-03-17 Alain Magloire
Clean the property object, mailbox and mailer have property object
that you can examine. Still a draft: the value of objects are ints.
This feature was put in to help the imap4d server, in this protocol
you can get a substring of the message starting from a certain offset.
To make the coding of imap4d simpler the complexity was move to the
library. It is possible now by setting a property of the mailbox
to make it output rfc822 stream i.e. "\r\n" terminated stream, the
offset and the size are also in term of rfc822.
* mailbox/property.c (property_set_int): Removed.
* mailbox/property.c (property_set_long): Removed.
* mailbox/property.c (property_set_double): Removed.
* mailbox/property.c (property_set_set_value): Removed.
* mailbox/property.c (property_set_get_value): Removed.
* mailbox/property.c (property_add_propety): New function.
* mailbox/property.c (hash): Renamed poperty_hash.
* include/mailutils/property.h (struct property_list): New structure.
* mailbox/include/mailbox0.h: new fields properties, properties_count.
* mailbox/mailbox.c (mailbox_get_property): The function will create
the proprety and add the default properties.
(mailbox_destroy): The default poperties and property are freed.
(mailbox_is_updated): Return ENOSYS if the argumets are wrong.
(mailbox_scan): Return ENOSYS if the argumets are wrong.
(mailbox_uidvalidity): Return ENOSYS if the argumets are wrong.
(mailbox_uidnext): Return ENOSYS if the argumets are wrong.
* mailbox/mbx_mbox.c (mbx_init): Set its default properties.
(mbx_header_get_fvalue): Return the len, even if buffer is null.
(mbx_body_read): If property rfc822 is set call
mbx_body_readstream_rfc822 to the conversion.
(mbx_body_readstream_rfc822): New function, do the conversion.
(struct _mbox_message): Remove the stream field.
added struct rfc822.
(mbox_get_header_readstream): Removed.
(mbox_header_size): Do the conversion if rfc822 set.
(mbox_body_size): Do the conversion if rfc822 set.
(mbox_get_message): Set the property on the header_t.
* mailbox/mbx_pop.c (pop_init): Set its default properties.
(pop_open): Remove MU_STREAM_POP flag obsolete.
(pop_readline): Do the converstion if rfc822 is set.
* mailbox/mbx_imap.c (mbx_imap_init): Set its default properties.
* mailbox/folder_imap.c (folder_imap_open): Remove MU_STREAM_IMAP,
no longer pertinent.
(imap_readline): If propety rfc822 is set don't strip '\r'.
* mailbox/header.c (header_set_property): New functions.
(header_get_property): New functions.
(header_destroy): Destroy property object.
(header_get_value): If property rfc822 is set
convert all "\n" to "\r\n".
(header_read): If property rfc822 is et convert to \n to \r\n.
(header_readline): If property rfc822 is et convert to \n to \r\n.
(fill_blurb): Clear the function overloading, when the blurb is fill.
* mailbox/include/header0.h: New field property.
* include/mailutils/header.h: Added prototypes for
header_set_property and header_get_property.
* include/mailutils/stream.h: Remove the identification macros;
MU_STREAM_IMAP, MU_STREAM_FILE, MU_STREAM_POP, it is part of the
properties of each object.
* mailbox/mailer.c (mailer_destroy): Free the properties.
* mailbox/mailer.c (mailer_get_poperty): New function, return the
property of the mailbox.
* mailbox/smtp.c (_mailer_smtp_init): Set its default properties.
* mailbox/sendmail.c (_sendmail_init): Set its default properties.
* mailbox/include/Makefile.am: Add property0.h.
2001-03-09 Sam Roberts
* include/mailutils/address.h: api for new parser,
address_create0(), and to get route, local-part, and domain.
* mailbox/address.c: implementation of 3 new get functions, first
cut, needs cleanup
* mailbox/include/address0.h: new members of _address, deleted
one that looked unused.
* mailbox/parse822.c: implementation of address_create0(),
which handles groups, routes, and the hoary old comment phrase
* addr/addr.c - parses addresses from its command line or
stding using create() or create0().
* mailbox/mbx_imap.c: need strings.h on some systems, like Nto
2001-03-12 Sam Roberts
* frm/frm.c (main): Changed to only print subject if
header_get_value(SUBJECT) returned success, otherwise I assume
it would print the stack.
(usage): Corrected a tiny typo in usage message.
(long_options): Added an option -f,--field that prints the named field
in the mailbox, and nothing else.
2001-03-09 Alain Magloire
* mailbox/Makefile.am: add property.c in the src list.
* doc/mailutils.texi: add Sam to the list of acknowlegment.
2001-03-09 Sam Roberts
* doc/address.texi: documented all the functions in address.h
* doc/url.texi: corrected location or url.h header
2001-03-08 Sam Roberts
* README-alpha: Be clearer on how to configure.
* doc/address.texi : New File, description of address_t object.
* doc/mailutils.texi : add include address.texi.
2001-03-03 Alain Magloire
* imap4d/fetch.c (fetch_operation) : HEADER.FIELDS.NOT implemented.
fetch_opertaion() take a new argument.
* imap4d/util.c (util_upper) : New function string upper.
* mailbox/heder.c: Added new functionnalities to help the imap4d
fetch command.
(header_get_field_count) : New function returns the number of header
fields in the header.
(header_get_field_name): New function returns the field name.
(header_get_field_value): New function returns the field value.
2001-03-03 Alain Magloire
* include/mailutils/address.h: s/_cplusplus/__cplusplus/g
(include/mailutils/auth.h): Likewised.
(include/mailutils/body.h): Likewised.
(include/mailutils/debug.h): Likewised.
(include/mailutils/header.h): Likewised.
(include/mailutils/iterator.h): Likewised.
(include/mailutils/list.h): Likewised.
(include/mailutils/mailer.h): Likewised.
(include/mailutils/message.h): Likewised.
(include/mailutils/mime.h): Likewised.
(include/mailutils/observer.h): Likewised.
(include/mailutils/property.h): Likewised.
(include/mailutils/registrar.h): Likewised.
(mailbox/include/address0.h): Likewised.
(mailbox/include/auth0.h): Likewised.
(mailbox/include/body0.h): Likewised.
(mailbox/include/debug0.h): Likewised.
(mailbox/include/header0.h): Likewised.
(mailbox/include/iterator0.h): Likewised.
(mailbox/include/list0.h): Likewised.
(mailbox/include/mailer0.h): Likewised.
(mailbox/include/message0.h): Likewised.
(mailbox/include/mime0.h): Likewised.
(mailbox/include/observer0.h): Likewised.
Pointed by Sam Roberts.
2001-02-28 Alain Magloire
* mailbox/address.c (address_get_personal): Remove surrounding quotes.
* mailbox/mbx_mbox.c (mbox_scan): If the mailbox is updated don't
rescan again.
(mbox_expunge): Same the uidvalidity in the header field "IMABase:"
on the first message of the mailbox.
* imap4d/fetch.c (fetch_envelope): Envelope imap4 command implemented.
(fetch_send_address): New function.
2001-02-26 Alain Magloire
* mailbox/mbx_imap.c (imap_submessage_size): New function to
retrieve message size of attachments.
* imap4d/fetch.c: More functionnality for the FETCH command.
(fetch_operation): New operation.
* imap4d/util.c (util_token): little helper function.
2001-02-25 Alain Magloire
* lib/strtok_r.c: If there are no delimiters left save the old string
and return NULL.
* mailbox/folder_imap.c (imap_fetch): Finish imap FETCH command.
(imap_rfc822): New Function.
(imap_rfc822_text): New Function.
(imap_rfc822_size): New Function.
(imap_rfc822_header): New Function.
(imap_uid): New Function.
(imap_body): New Function.
(imap_bodystructure0): Save the size.
2001-02-22 Alain Magloire
* mailbox/property.c: New file.
* include/mailutils/property.h: New file.
* mailbox/mailbox.c (mailbox_get_property): New function,
a first draft to let set "property" on a mailbox that can
change its behaviour.
* mailbox/include/mailbox0.h: New field in struct _mailbox, property.
* sieve/lex-sieve.lex: Add LGPL banner.
* sieve/gram-sieve.y: Add LGPL banner.
2001-02-22 Alain Magloire
* sieve: New Directory.
* sieve/lex-sieve.lex: RFC3028 tokenizer.
* sieve/gram-sieve.y: RFC3028 grammar.
2001-02-20 Alain Magloire
* mailbox/mailbox.c (mailbox_set_ticket): Those objects are now part
of the folder if a folder is attached to the mailbox.
(mailbox_set_authority: Likewise.
(mailbox_set_stream): Likewise.
* mailbox/mbx_imap.c (imap_message_read): If offset == 0, reset
the lines to 0.
(imap_body_read): Likewise.
2001-02-19 Alain Magloire
* mailbox/mbx_pop.c (pop_body_read): Move the CHECK_BUSY higher
it should be the first thing done. If the state is POP_NO_STATE
reset the offset and the size to 0 i.e we are starting fresh.
(pop_header_read): Likewise.
(pop_message_read): Likewise.
* mailbox/stream.c (stream_write): Don't call stream_flush().
2001-02-04 Alain Magloire
* mailbox/message.c (message_get_uid): Add message_get_uid() for
the UID of the message (IMAP definition) and message_get_uidl() for
the POP3 definition.
* mailbox/attachment.c: Indentation fixes.
* mailbox/file_stream.c: Make sure that the FILE* is close before opening.
* mailbox/folder_imap.c: Use strcasecmp() not strcmp().
* mailbox/mailbox.c: Added mailbox_uidnext() and mailbox_uidvalidity.
* mailbox/mapfile_stream.c: When munmap() failed we should check
against MAP_FAILED, not NULL.
* mailbox/mbx_imap.c: Implement imap_uidnext(), imap_uidvalidity()
imap_message_uid().
* mailbox/mbx_mbox.c: Implement mbox_uidnext(), mbox_uidvalidity()
mbox_message_uid().
* mailbox/mbx_mboxscan.c: Implement uidvalidity, it is save int the
header of the first message, "X-IMAPbase: 127673838 12", a la c-client.
Save UID, it is save in "X-UID".
* mailbox/mbx_pop.c: Implement pop_messages_recent(),
pop_message_unseen() and pop_uid().
* mailbox/trans_stream.c: Indentation fixes.
* include/mailutils/message.h: New prototypes message_get_uid(),
message_set_get_uid().
* include/mailutils/mailbox.h: New prototypes mailbox_uidnext(),
mailbox_uidvalidity().
* lib/snprintf.c lib/snprintf.h: Put it under the LGPL term.
* mailbox/imap4d/fetch.c: First draft implementation, very yucky.
* mailbox/imap4d/select.c: First draft implementation.
* mailbox/imap4d/util.c: Add util_msgset() and util_send().
Reuse of util_getcommand() for subcommands.
* mailbox/pop3d/uidl.c: API change the call is message_get_uidl()
to have UIDL POP3.
2001-02-03 Alain Magloire
* mailbox/mailbox.c mailbox/mbx_mbox.c mailbox/mbx_imap.c:
Implement mailbox_messages_recent() and mailbox_message_unseen(), this
time as define by the IMAP rfc.
2001-02-02 Alain Magloire
* mailbox/header.c: ENOENT was not return if the header was
not found.
* mailbox/mbx_mbox.c: When expunging check to see if the registar
the path_record too.
2001-02-02 Alain Magloire
* pop3d/extra.c (pop3_readline): Since the length of the string
is known, we can use memcpy() and friends for string manipulations.
memXXX() functions are builtin in GNU C (gcc) and are much faster
then the strXXX() counterparts. Small change in the loop to take
advantage of this.
* pop3d/quit.c: The rfc1939 insist that after a QUIT, we must
release any resources and close the connection:
"Whether the removal was successful or not, the server
then releases any exclusive-access lock on the maildrop
and closes the TCP connection." This was not done if error
occured while expunging, now we will close the connection and
notify the client of the error(ERR_FILE).
2001-02-01 Alain Magloire
"Premature Optimization Is The Root Of All Evil", Knuth.
* mailbox/attachment.c: Typo should be "Content-Disposition"
* mailbox/mbx_mbox.c mailbox/mbx_mboxscan.c mailbox/header.c:
Attempt to optimze the header, header_get_fvalue() is created,
The mailbox save/cache the most common headers, when doing a
header_get_value(), header_get_fvalue() is call first hoping
that the requested header was cache, if it fails we fall back
to the usual parsing. The common elected headers are : From,
To, Cc, Subject, Date, Content-Type, X-UIDL, X-UID.
* mailbox/mailbox.c mailbox/mbx_mbox.c mailbox/mbx_imap.c:
I've confuse the semantic of "unseen" and "recent", "unseen"
means new mail, not recent. Renamed mailbox_recent_count()
to mailbox_unseen_count().
* include/mailutils/mailbox.h: updated for mailbox_unseen_count()
2001-01-25 Alain Magloire
* frm/frm.c: Forget to add --summary option and fix return status.
When being very quiet just freopen(/dev/null, w, stdout).
2001-01-25 Alain Magloire
* pop3d/capa.c: Add UIDL in the capability list.
and update Copyrigth.
* pop3d/pop3d.c: Remove mbox_record register, only need path_record.
* pop3d/retr.c: When retrieve a message should be mark as read.
since we do not strip out the header "Status:".
* pop3d/top.c: Adjust stream_readline().
2001-01-25 Alain Magloire
While working on the new version of the API mailbox, Changelog was
discontinued, since the API could literaly change overnight a
maintenace of the entries were of a particular burden.
The API of the library, and some utilities like pop3d are
stable enough to restart normal entries.
* mailbox/*: New Api to access mailbox.
* include/mailutils: Public prototypes of the API.
* frm/frm.c frm/Makefile.am: A clone of elm frm utility.
* from/from.c from/Makefile.am: A utility to scan mailboxes.
* pop3d/* : GNU pop3d server.
2000-05-19 Sean 'Shaleh' Perry <shaleh@debian.org>
* libmailbox/mh.c: fleshed out mh_open() some more
2000-05-18 Sean 'Shaleh' Perry <shaleh@debian.org>
* libmailbox/mh.c: fleshed out mh_open() some more
2000-05-15 Sean 'Shaleh' Perry <shaleh@debian.org>
* libmailbox/*: ran some files thru emacs indent, I think I introduced
some oddness with vi
* libmailbox/mh.[ch]: new files, based on maildir
the mh work is very empty -- just mh_open right now
2000-04-19 Jeff Bailey <jbailey@nisa.net>
* configure.in: Test for limits.h and inttypes.h, add malloc
and realloc checks.
* m4/: New directory
* m4/Makefile.am: New file to support directory
* m4/malloc.m4: File to support lib/ directory
* m4/realloc.m4: File to support lib/ directory
* lib/Makefile.am: Distribute xalloc.h
* lib/xalloc.h: New file to support xmalloc.c
* lib/xmalloc.c: New version from sh-utils-2.0g
* autogen.sh: Look in m4 for extra macros
* doc/Makefile.am: Rearrange to quiet automake
2000-03-28 Jakob 'sparky' Kaivo <jkaivo@elijah.nodomainname.net>
* pop3d/pop3d.c (main): handle SIGPIPE
2000-01-19 Sean 'Shaleh' Perry
* mailbox/mbx_mh.c: some more code fleshing, still ugly
* README README-alpha: updates, corrected README to list mailbox as LGPL
2000-01-19 Sean 'Shaleh' Perry
* mailbox/mbx_mh.c: new file
no header, no error checking, no hable englais
* url/url_mh.[ch]: new files
url support for MH mailboxes
2000-01-17 Sean 'Shaleh' Perry
* examples/from.c: remove extraneous copyright notice
1999-12-15 Alain Magloire
* url/url_mbox.h url/url_pop.h url/url_imap.h url/url_mailto.h
New files.
1999-12-01 Alain Magloire
* url/_cpystr.c url/chewurl.c url/url.c url/url_imap.c
url/url_mailto.c url/url_mbox.c url/url_pop.c : New files,
first attempt to define the URL API.
* lib/Makefile.am: added xmalloc.c, xstrdup.c, xstrtol.{c,h}
* lib/xmalloc.c lib/xstrdup.c lib/xstrtol.c lib/xstrtol.h : New files
1999-11-21 Jeff Bailey
* doc/rfc*: Add. Standards followed should be included here.
1999-11-23 Jakob 'sparky' Kaivo
* TODO: Mention Maildir
* libmailbox/mailbox.c (mbox_init): new function
* libmailbox/maildir.h: new file
* libmailbox/maildir.c: new file
* libmailbox/mailbox.c (mbox_open): uncommented maildir_open attempt
1999-11-15 Jeff Bailey
* lib/ansi2knr.c lib/ansi2knr.h: Add
* configure.in: Add AM_C_PROTOTYPES
* libmailbox/Makefile.am: Add ansi2knr handling
1999-11-08 Sean 'Shaleh' Perry
* cleaned up some of the automake autoconf magic for non-Linux
1999-11-07 Sean 'Shaleh' Perry
* TODO: restructuring, now split into sections
* libmailbox/mailbox.c libmailbox/mailbox.h: added two new functions
to the api and began implementing them in unixmbox
is_updated() => has this mailbox been updated externally?
scan() => build info on mailbox, removing old data as needed
currently not implemented
1999-11-06 Sean 'Shaleh' Perry
* libmailbox/mailbox.c: more work on expunge
* libmailbox/mailbox.c: added a tester routine
* Makefile.am: added -g
1999-11-06 Sean 'Shaleh' Perry
* libmailbox/unixmbox.c: work on expunge
use read/write along with lseek still blows up -- getting there
* mail/mail.c: check return value of mbox_open()
1999-10-23 Alain Magloire
* ChangeLog: Cleanup according to GNU std, and remove
of email addresses. The emails should be AUTHORS or THANKS
so if they change no need to sed everything.
1999-10-11 Jeff Bailey
* libmailbox/Makefile.am: Remove no-install option, add -pedantic
1999-10-12 Sean 'Shaleh' Perry
* made sure that the imap4 was REALLY broken
1999-10-11 Jeff Bailey
* imap4d/Makefile.am: New file
* configure.in: Create imap4d/Makefile, and no install option
for library
* pop3d/Makefile.am: Add warnings, remove unneeded variable
* TODO: Update
* impa4rev1/: Rename to imap4d. (I asked first, really I did...)
* lib/Makefile.am: Update for new files
* lib/getline.c: New File
* lib/getline.h: New file
1999-10-11 Sean 'Shaleh' Perry
* added my imap code -- PLEASE DO NOT TOUCH
1999-10-10 Jeff Bailey
* THANKS: New file
* doc/mailutils.texi: New File
Provided by Alain Magloire <alainm@rcsm.ece.mcgill.ca> with some
changes so that Makeinfo reports no errors.
* doc/Makefile.am: New file
* configure.in: Deal with libsrc to lib rename
* pop3d/Makefile.am: Deal with libsrc to lib rename
* Makefile.am: Deal with libsrc to lib rename.
Add reference to doc/ subdirectory.
* libsrc/: Rename to lib/
1999-10-09 Sean 'Shaleh' Perry
* Made changelog.pl output in approved format -- I miss the time stamp
1999-10-09 Sean 'Shaleh' Perry
* added examples/gnu-pop3d.pam
1999-10-08 Jeff Bailey
* doc/: New directory
* pop3d/Makefile.am: Remove pam detection, now handled by configure
in the @AUTHLIBS@ spot.
* configure.in: Detect pam correctly/handle crypt case correctly
Add option: --disable-pam
* acconfig.h: New File
1999-10-08 Sean 'Shaleh' Perry
* added showmail.c to examples
* libmailbox: some minor code cleanups
1999-10-08 Sean 'Shaleh' Perry
* fixed the "if empty mailbox, return not implemented"
NB: seems there was a large assumption being made:
if unixmbox_open() failed, it was because it was not mbox
this was wrong for many reasons, so on actual "not mbox",
return EBADMSG.
Prolly want to come up with a better error, but this works for now
* more cleaning in the mailbox code
a) added stat() call -- we can bomb earlier, plus detect if
passed object is a directory or file
b) unixmbox_close() free()'s mbox. This will hamper the use
when we add support for more mailboxes later. Need to find
a solution. Perhaps a unixmbox_free() call.
There was also a small leak there -- mbox->name was being left.
c) To aid checking in unixbox_open(), added checks around fgets call.
Now properly detects EOF, errors, etc. This was a large cause of the
spurious "not implemented" bug.
d) all of unixmbox_open()'s function calls should now be checked
NB: need to do the same for rest of file
1999-10-07 Sean 'Shaleh' Perry
* removed spurious code in from.c
* added TODO file
1999-10-07 Jeff Bailey
* Makefile.am: Compile libsrc/ first.
* pop3d/Makefile.am: Link properly with crypt and libmailutils.a
from libsrc/
* libsrc/Makefile.am: Produce one library for all functions.
Do not use libtool for this library, it will never be shared.
* configure.in: Remove AM_MAINTAINER_MODE. Export crypt detection
to Makefiles
1999-10-07 Sean 'Shaleh' Perry
* included my read_a_line() in examples/
1999-10-06 Sean 'Shaleh' Perry
* Cleanup some compilation issues
* changed "w+" to "w" in called to pop3_mainloop():ofile = fdopen()
why was it called with w+? It is only ever used for writing.
* catch EINTR in call to accept() (play nice w/ our UNIX friends)
* set SO_REUSEADDR on daemon's socket
1999-10-05 Sean 'Shaleh' Perry
* Added changelog.pl so we can have automated entries
set CVS_EMAIL=me@here.com and CVS_FULLNAME="Joe Blow"
usage: changelog.pl "added signal.c" or changelog.pl, an editor will
then appear (uses $VISUAL and $EDITOR)
the format is controlled simply via the format call at the end
and the section of perl code directly above it
1999-10-05 Sean 'Shaleh' Perry
* added pop3d/signal.c -- contains pop3_sigchld() currently
1999-10-05 Sean 'Shaleh' Perry
* initial fork() rewrite, not even compiled it yet
1999-10-04 Sean 'Shaleh' Perry
* changed lock(int mode) to lock(mailbox_lock_t mode), this will allow
the type to be chnaged later without affecting code compatibility
* added name to AUTHORS
* noticed mention of IMAP4 server and went back to coding it (-:
1999-10-03 Jeff Bailey
* mail/mail.c: Support --help, --version.
* mail/Makefile.am: Add -Wall to compile line.
* libmailbox/Makefile.am: Add -Wall to compile line.
* libmailbox/mailbox.c: Warning cleanup, second parameter of lock
should be unsigned int, not int.
* libmailbox/mailbox.h: ""
* libmailbox/unixmbox.h: ""
* libmailbox/unixmbox.c: ""
* AUTHORS: Include my name. =)
* README: Rewrite for public consumption
* README-alpha: New file, add mailing list address, CVS information.
* libmailbox/unixmbox.c: Include config.h if defined
* libmailbox/mailbox.c: Include config.h if defined
* mail/mail.c: Include config.h if defined, update copyright.
1999-10-01 Sean 'Shaleh' Perry
* added an examples directory and the first example, from.c
1999-10-01 Jakob 'sparky' Kaivo
* libmailbox/*.[ch]: added cleanup patches from Shaleh while he works
on getting CVS access
1999-09-22 Jakob 'sparky' Kaivo
* mail/mail.c (main): added 'f' and 'F' to test mbox_header_line
* pop3d/apop.c (pop3_apop): cleanup, partial rewrite for libmailbox
* pop3d/retr.c (pop3_retr): fixed a potential segfault
* pop3d/user.c (pop3_user): cleanup and use mbox_lock
* libmailbox/mailbox.c (mbox_header_line): new function
(mbox_body_lines): new function
* mail/Makefile.am (mail_DEPENDENCIES): added libmailbox.la
* pop3d/top.c (pop3_top): made it work with libmailbox
* libmailbox/unixmbox.c (unixmbox_open): added check to see if it's
actually an mbox file
(unixmbox_open): Set mbox->_lock to unixmbox_lock
(unixmbox_lock): new function
* libmailbox/unixmbox.h: Added prototype for locking
* libmailbox/mailbox.c: Add dummy initializer for locking
* libmailbox/mailbox.h: Added interface for locking
Added interfaces for mbox_header_line and mbox_body_lines
* pop3d/*.[ch]: changed copyright info to FSF
* libmailbox/*.[ch]: added copyright/licensing info
1999-09-21 Jakob 'sparky' Kaivo
* pop3d/Makefile.am (pop3d_LDADD): add $(AUTHLIBS)
* configure.in: Added libsrc/Makefile to AC_OUTPUT (duh, Jake!)
fixed the PAM and crypt checks
* README: actually put something here, noted necessary tools to build
from CVS
1999-09-14 Jakob 'sparky' Kaivo
* pop3d/pop3d.c (main): moved setgid() call to after option parsing
(main): make --version report PACKAGE and VERSION
* libmailbox/mailbox.c (mbox_open): changed paramater type to const
* pop3d/Makefile.am (INCLUDES): change relative directories to
top_srcdir base
* configure.in: Added checks for PAM and crypt
1999-09-13 Jakob 'sparky' Kaivo
* pop3d/retr.c (pop3_retr): fixed calls mbox_header => mbox_get_header
and mbox_body => mbox_get_body
* pop3d/user.c (pop3_user): removed references to mailbox variable
* pop3d/stat.c (pop3_stat): fixed mbox->is_deleted => mbox_is_deleted
* pop3d/pop3d.c (pop3_mainloop): removed reference to lockfile variable
* pop3d/extra.c (pop3_abquit): change fclose(mbox) to mbox_close(mbox)
removed calls to free(messages) and pop3_unlock()
* pop3d/dele.c (pop3_dele): fixed call to mbox_delete()
* Makefile.am (SUBDIRS): added pop3d and libsrc
* configure.in: Added checks needed for pop3d/*
made it work with libtool
* libsrc/*: imported from gnu-pop3d tree
* pop3d/*: imported from gnu-pop3d tree
1999-09-11 Jeff Bailey
* libmailbox/unixmbox.h: Do not prefix config.h defines with _
1999-09-10 Jeff Bailey
* */*: Accomidate directory rearrange