12021-08-05  Automatically generated  <bug-mailutils@gnu.org>
2
3	HEAD c705c9c19feffbcd645927f6e1d4e7151c3f85ca.
4
52021-08-05  Sergey Poznyakoff  <gray@gnu.org>
6
7	Version 3.13.
8
92021-07-27  Sergey Poznyakoff  <gray@gnu.org>
10
11	Prefer User-Agent header over X-Mailer.
12
13	* NEWS: Update.
14	* doc/texinfo/programs/mail.texi: Update.
15	* include/mailutils/header.h (MU_HEADER_USER_AGENT): New
16	define.
17	* mail/mail.c (default_setup): Set useragent
18	* mail/mail.h (mailvar_name_useragent): New define.
19	* mail/mailline.c (header_generator): Add MU_HEADER_USER_AGENT.
20	* mail/mailvar.c: Mew variable: "useragent". Retain "xmailer"
21	as an alias.
22	* mail/send.c (mail_compose_send): Add the User-Agent header if
23	the "useragent" variable is set.
24	* libmailutils/tests/hdrcpy.at: Use User-Agent instead of
25	X-Mailer.
26	* mail/tests/send.at: Likewise.
27	* mail/tests/sendbyname.at: Likewise.
28	* mail/tests/sendrec.at: Likewise.
29	* mail/testsuite/mail/Followup.exp: Likewise.
30	* mail/testsuite/mail/Reply.exp: Likewise.
31	* mail/testsuite/mail/reply.exp: Likewise.
32	* mail/testsuite/mail/send.exp: Likewise.
33	* mh/repl.c: Likewise.
34	* mh/send.c: New .mtstailor vareiable "user-agent".
35
362021-07-27  Sergey Poznyakoff  <gray@gnu.org>
37
38	Rewrite tests for interactive mail features in expect.
39
40	After 4befcfd015 interpolation escapes can't be tested using
41	autotest. Move them to DejaGNU testsuite.
42
43	* mail/tests/Followup.at: Remove.
44	* mail/tests/Reply.at: Remove.
45	* mail/tests/followup.at: Remove.
46	* mail/tests/reply.at: Remove.
47	* mail/tests/Makefile.am: Remove these tests.
48	* mail/tests/testsuite.at: Likewise.
49	* mail/.gitignore: Fix the entry for mail.
50	* mail/testsuite/mail/Followup.exp: New test.
51	* mail/testsuite/mail/Reply.exp: New test.
52	* mail/testsuite/mail/followup.exp: New test.
53	* mail/testsuite/mail/reply.exp: New test.
54	* mail/testsuite/mail/DISTFILES: Add these files.
55	* mail/testsuite/lib/mail.exp (mail_version): Don't print the
56	version number.
57	* mail/testsuite/mail/write.exp: Preserve current working
58	directory.
59
602021-07-19  Sergey Poznyakoff  <gray@gnu.org>
61
62	Fix in quoted-printable decoder.
63
64	* libmailutils/filter/qpflt.c (_qp_decoder): Accept soft line
65	breaks (RFC 2045, 6.7, page 19)
66
672021-07-19  Sergey Poznyakoff  <gray@gnu.org>
68
69	mail: disable compose escapes in non-interctive mode.
70
71	* NEWS: Document changes.
72	* doc/texinfo/programs/mail.texi: Document changes.
73	* mail/send.c (mail_compose_send): Recognize escapes only in
74	interactive mode.
75
762021-07-16  Sergey Poznyakoff  <gray@gnu.org>
77
78	Rename the FROMRB filter to FROMRD.
79
80	Old name is retained as an alias.
81
822021-07-15  Sergey Poznyakoff  <gray@gnu.org>
83
84	Fix stream reference bug in mu_filter_stream_create.
85
86	If the mu_filter_xcode_t function failed in mu_filter_init
87	request, mu_filter_stream_create would leave the transport
88	reference counter incremented by one.
89
90	* libmailutils/stream/fltstream.c (mu_filter_stream_create): On
91	failure, decrement reference counter of transport stream.
92	* libmailutils/tests/fltcnt.c: Test for the above bug as well.
93
942021-07-15  Sergey Poznyakoff  <gray@gnu.org>
95
96	Fix stream reference bug in mu_filter_chain_create family
97	functions.
98
99	This change affects the following two functions:
100	mu_filter_chain_create, mu_filter_chain_create_pred. In
101	previous versions, if these functions failed to create the
102	requested filter chain, they decremented reference counter of
103	their transport (input stream) argument.
104
105	This change restores the proper behavior:
106
107	 - On success, reference counter is incremented by 1.
108	 - On error, reference counter doesn't change.
109	* libmailutils/filter/fltchain.c (_add_next_link): Make sure
110	the transport reference counter does not change.
111	* libmailutils/tests/Makefile.am: Add new auxiliary program and
112	test case.
113	* libmailutils/tests/fltcnt.at: New file.
114	* libmailutils/tests/fltcnt.c: New file.
115	* libmailutils/tests/testsuite.at: Include new test.
116
1172021-07-14  Sergey Poznyakoff  <gray@gnu.org>
118
119	Minor change.
120
121	* libmailutils/stream/streamref.c
122	(mu_streamref_create_abridged):Don't reposition the underlying
123	stream to beginning.
124
1252021-07-13  Sergey Poznyakoff  <gray@gnu.org>
126
127	Bugfixes.
128
129	* libproto/imap/fetch.c (_fill_response): Tolerate NIL date
130	field.
131	* libproto/imap/mailbox.c (__imap_msg_get_stream): Seek to the
132	end, instead of computing stream size.
133	* libproto/mbox/mboxrd.c (mailbox_append_message): If all
134	methods of determining envelope size fail, assume epoch instead
135	of bailing out.
136
1372021-06-11  Sergey Poznyakoff  <gray@gnu.org>
138
139	mail: fix descriptions of command arguments in help output.
140
1412021-06-11  Sergey Poznyakoff  <gray@gnu.org>
142
143	fix mail '| cat >/tmp/save'
144
145	* mail/send.c (msg_to_pipe): Run command via shell.
146
1472021-06-11  Sergey Poznyakoff  <gray@gnu.org>
148
149	Fix handling of MIME messages that have only one part.
150
151	* libmailutils/mime/mime.c (_mime_part_size): Fix handling of
152	one part MIME messages. Don't touch psize memory in case of
153	error.
154	(_mime_body_stream_read): Fix handling of one part MIME
155	messages. Previous implementation used to add an extra newline
156	at the end.
157	* mh/tests/mhn.at: Reflect the above changes.
158	* sieve/tests/vacation.at: Reflect the above changes.
159
1602021-06-11  Sergey Poznyakoff  <gray@gnu.org>
161
162	Fix typo.
163
164	* mail/util.c (util_outfilename): Remove extra closing
165	parenthesis.
166
1672021-06-10  Sergey Poznyakoff  <gray@gnu.org>
168
169	Update docs; improve mailx compatibility mode.
170
171	* doc/texinfo/programs/mail.texi (Saving and Recording): New
172	section.
173	* mail/mailvar.c: Make sure escape is a single character.
174	* mail/util.c (util_outfilename): In mailx compatibility mode,
175	assume outfilename_local.
176
1772021-06-10  Sergey Poznyakoff  <gray@gnu.org>
178
179	Fix memory leaks (mboxrd and mail)
180
181	* libproto/mbox/mboxrd.c (mboxrd_rescan_unlocked): Free buf.
182	(mboxrd_detect): Destroy str when no longer needed.
183	* mail/copy.c (mail_copy0): Free allocated memory. Create file
184	in cwd if util_outfolder_name return NULL.
185	* mail/exit.c (mail_exit): Destroy mbox.
186	* mail/util.c (util_range_msg): Use msgset_free instead of
187	plain free.
188
1892021-06-10  Sergey Poznyakoff  <gray@gnu.org>
190
191	Provide several ways of creating the outgoing file name.
192
193	Several mail commands store message in a file named by its
194	recipient (or sender) in the "folder" directory (these commands
195	are: Copy, Save, Mail, followup, Followup). As per POSIX, the
196	local part of the email address serves as the file name. There
197	may be cases, however, when using the entire email would be
198	preferable.
199
200	This commit introduces new mail variable "outfilename" that
201	controls how the file name is generated. Its default value is
202	"local", which means use the email local part. Other possible
203	values are: "email", to save messages in a file named by entire
204	email, and "domain", to save them in a file named by domain
205	part of the email.
206
207	* NEWS: Document changes.
208	* doc/texinfo/programs/mail.texi: Document changes.
209	* mail/mail.c (default_setup): Set outfilename=local.
210	* mail/mail.h (mailvar_name_outfilename): New define.
211	(outfilename_mode): New extern.
212	(util_outfilename): New proto.
213	* mail/mailvar.c: New variable: "outfilename".
214	* mail/send.c (mail_compose_send): Use util_outfilename to form
215	outgoing file name.
216	* mail/util.c (outfilename_mode): New global.
217	(util_outfilename): New function.
218	(util_message_sender): Use util_outfilename.
219
2202021-06-09  Sergey Poznyakoff  <gray@gnu.org>
221
222	mail: implement the fullnames variable.
223
224	* NEWS: Document changes.
225	* doc/texinfo/programs/mail.texi: Likewise.
226	* mail/mail.c (default_setup): Set fullnames.
227	* mail/mail.h (mailvar_name_fullnames): New define.
228	* mail/mailvar.c (fullnames): New variable.
229	* mail/reply.c (compose_remove_personal): New function.
230	(respond_msg,respond_all): Call compose_remove_personal if
231	fullnames is not set.
232
2332021-06-09  Sergey Poznyakoff  <gray@gnu.org>
234
235	Add tests for mail send/reply/followup commands.
236
237	* mail/mail.c (main): Fix exit status in send mode.
238	* mail/tests/Makefile.am: Add new tests.
239	* mail/tests/testsuite.at: Likewise.
240	* mail/tests/atlocal.in (MAILER): New variable.
241	* mail/tests/Followup.at: New file.
242	* mail/tests/Reply.at: New file.
243	* mail/tests/followup.at: New file.
244	* mail/tests/reply.at: New file.
245	* mail/tests/send.at: New file.
246	* mail/tests/sendbyname.at: New file.
247	* mail/tests/sendrec.at: New file.
248
2492021-06-09  Sergey Poznyakoff  <gray@gnu.org>
250
251	mail: fix semantics of mail sending and saving commands.
252
253	* NEWS: Document changes.
254	* doc/texinfo/programs/mail.texi: Document changes.
255	* mail/Makefile.am (mail_SOURCES): Remove followup.c
256	* mail/followup.c: Remove.
257	* mail/mail.c: Fix the -F option. Rewrite send mode by calling
258	mail_send directly.
259	* mail/mail.h (mailvar_name_byname): Remove.
260	(mail_send0): Rename to mail_compose_send. All uses changed.
261	(util_message_sender): New function.
262	* mail/mailvar.c (mailvar_tab): Remove the "byname" variable.
263	"outfolder": Accept string and boolean values.
264	(print_descr): Handle hard newlines.
265	(mailvar_get): Use mailvar_type_whatever to test whether a
266	variable is set, regardless of its type.
267	* mail/reply.c: Rewrite to match POSIX standard. This affects
268	the following commands: "reply", "Reply", "followup",
269	"Followup".
270	* mail/send.c (compose_header_set): Use util_merge_addresses
271	when operating on address headers.
272	(send_message): In mailx compatibility mode, assume the
273	sendmail:// scheme.
274	(mail_send0): Rename to mail_compose_send. Add Date header
275	before saving the message, to make sure
276	mu_mailbox_append_message won't bail out.
277	* mail/table.c: New command: "Mail".
278	* mail/testsuite/mail/send.exp: Fix expected output.
279	* mail/testsuite/mail/write.exp: Likewise.
280	* mail/util.c (util_message_sender): New function.
281	(util_get_sender): Rewrite using util_message_sender.
282	(util_outfolder_name,util_save_outgoing): Rewrite from scratch,
283	Ensure mailx compatibility,
284	* mail/write.c (mail_write): Don't use outfolder.
285	* testsuite/mockmail.c: Support -i and -v options.
286	* testsuite/mockmail.at: Unset MAIL_DUMP when testing.
287
2882021-06-08  Sergey Poznyakoff  <gray@gnu.org>
289
290	Bugfix.
291
292	* libproto/mbox/mboxrd.c (mailbox_append_message): Don't
293	overwrite the error code.
294
2952021-06-07  Sergey Poznyakoff  <gray@gnu.org>
296
297	mail: Add a Date: header before sending the message.
298
299	* mail/send.c (message_add_date): New function.
300	(mail_send0): Call message_add_date before sending the message.
301
3022021-06-06  Sergey Poznyakoff  <gray@gnu.org>
303
304	mail: revamp parsing of adresses in send mode.
305
306	In particular, this fixes parsing of addresses with comma in
307	the local part.
308
309	* include/mailutils/address.h (MU_ADDRESS_HINT_INITIALIZER):
310	New define.
311	* libmailutils/address/addrstream.c (mu_stream_format_address):
312	Format local user names without surrounding angle quotes.
313	* mail/mail.h (util_header_expand): Rename to
314	util_header_expand_aliases. All uses changed.
315	(util_address_expand_aliases): New function.
316	* mail/send.c (compose_header_set): Expand aliases if
317	inplacealiases is set. Avoid useless recursion.
318	* mail/util.c (send_message): Create addresses via
319	mu_address_create_hint to avoid appending local domain to the
320	unqualified user names.
321	(mail_send0): Likewise.
322	(util_address_expand_aliases): New function.
323	(util_header_expand): Rename to util_header_expand_aliases. Use
324	util_address_expand_aliases and regular address parsing
325	functions instead of wordsplit. Unwrap header values.
326
3272021-05-25  Sergey Poznyakoff  <gray@gnu.org>
328
329	Test IMAP folder scanning.
330
331	* imap4d/imap4d.c (prefix_section_parser): Use
332	namespace_encode_delim.
333	* imap4d/imap4d.h (namespace_decode_delim)
334	(namespace_encode_delim): New protos.
335	* imap4d/list.c (list_ref): Convert delimiters in the wcard to
336	/.
337	* imap4d/namespace.c (namespace_decode_delim)
338	(namespace_encode_delim): New functions.
339	* imap4d/tests/testclient.c: New auxiliary program.
340	* imap4d/tests/.gitignore: Add testclient.
341	* imap4d/tests/Makefile.am: Add new tests
342	* imap4d/tests/atlocal.in: Include libproto/imap/tests in the
343	PATH.
344	* imap4d/tests/clt_list.at: New file.
345	* imap4d/tests/list.at: Test delimiter translation.
346	* imap4d/tests/testsuite.at: Add new tests.
347	* libproto/imap/tests/imapfolder.c: Sort the resulting lists.
348	Use quoting on output.
349
3502021-05-25  Sergey Poznyakoff  <gray@gnu.org>
351
352	imap4d LIST: discern between implementation-defined and
353	required behavior.
354
355	* imap4d/list.c (match_pfx): Return true if ref is "pfx/",
356	where / stands for a namespace delimiter.
357	* imap4d/namespace.c (prefix_translate_name): namespace prefix
358	is required to end with a delimiter.
359	* imap4d/tests/list.at: Make sure all reference arguments that
360	refer to directories end in a hierarchy delimiter.
361
3622021-05-23  Sergey Poznyakoff  <gray@gnu.org>
363
364	fix memory leak in folder scanner.
365
366	* libmailutils/mailbox/folder.c (mu_folder_enumerate): Set the
367	destroy_item function on the created list.
368	* libmailutils/mailbox/fsfolder.c (list_helper): Free the resp
369	structure when it is no longer needed.
370
3712021-05-23  Sergey Poznyakoff  <gray@gnu.org>
372
373	Fix the previous commit: take into account "" mailbox names.
374
375	* libproto/imap/folder.c (_mu_imap_folder_separator): Use empty
376	mailbox name to get the hierarchy delimiter.
377	* libproto/imap/genlist.c: Take into account eventual hierarchy
378	delimiter queries.
379
3802021-05-22  Sergey Poznyakoff  <gray@gnu.org>
381
382	folder scan returns mailbox names without the leading directory
383	prefix.
384
385	For example, suppose folder /foo/bar contains mailboxes a, b,
386	and c. Then scanning the mu_folder_t object for '/foo' will
387	return 'bar/a', 'bar/b', and 'bar/c'. Scanning the mu_folder_t
388	for '/foo/bar'
389
390	 will return 'a', 'b', and 'c', and so on.
391	* libmailutils/string/mkfilename.c (mu_make_file_name_suf):
392	Reasonable handling of corner cases. Document its behavior.
393	* libmailutils/mailbox/fsfolder.c (struct folder_scan_data):
394	New member: prefix_len
395	(list_helper): Return the portion of the file name after the
396	base directory prefix.
397	(_fsfolder_list): Initialize sdata.prefix_len.
398	* libmailutils/tests/fsfolder.c: Remove prefix handling code.
399	* libmailutils/tests/fsfolder00.at: Change expectations.
400	* libmailutils/tests/fsfolder02.at: Likewise.
401	* libmailutils/tests/fsfolder03.at: Likewise.
402	* libmailutils/tests/fsfolder04.at: Likewise.
403	* include/mailutils/sys/imap.h (struct _mu_imap): New members:
404	separator and prefix_len.
405	* libproto/imap/folder.c (_mu_imap_folder_separator): New
406	function.
407	(_mu_imap_folder_pathname): New function.
408	(_mu_imap_folder_list): Prefix the original refname with the
409	base directory of the folder.
410	(_mu_imap_folder_lsub,_mu_imap_folder_subscribe)
411	(_mu_imap_folder_unsubscribe,_mu_imap_folder_delete)
412	(_mu_imap_folder_rename): Adjust input mailbox names.
413	* libproto/imap/genlist.c (list_untagged_handler): Return the
414	portion of the file name after the base directory prefix.
415	* libproto/imap/tests/imapfolder.c: Minor change.
416
417	Update for changed folder behavior
418	* imap4d/list.c (struct refinfo): Replace dirlen with delim - a
419	character to be inserted between the original reference and
420	mailbox name.
421	(list_fun): Insert delimiter, if required.
422	(list_ref): Set refinfo.delim, unless the reference prefix
423	already ends with a delimiter or is the same as the namespace
424	prefix.
425
426	Mail 'folders' command: add support for remote folders.
427	* mail/folders.c: Handle remote folders correctly.
428	* mail/mail.h (util_get_folder): New proto.
429	* mail/mailline.c (struct filegen): Remove path_len.
430	(new_folder): Rename to util_get_folder and move to util.c
431	(filegen_init): Initialize prefix_len from the argument.
432	* mail/util.c (util_get_folder): New function.
433
4342021-05-21  Sergey Poznyakoff  <gray@gnu.org>
435
436	Bugfix in mu_list_clear.
437
438	The bug affected imap client code, in particular.
439
440	* libmailutils/list/clear.c (mu_list_clear): Reset list item
441	count.
442
4432021-05-01  Sergey Poznyakoff  <gray@gnu.org>
444
445	Revise the mailbox locking functions.
446
447	The locker is created by the following call:
448
449	 mu_locker_create_ext(&locker, filename, &hints);
450
451	The last arguments points to a structure mu_locker_hints_t,
452	which defines the settings for the locker. NULL value implies
453	default. Settings of an existing locker can be modified using
454	the following call:
455	 mu_locker_modify(locker, &hints);
456
457	Current settings can be examined using mu_locker_get_hints.
458
459	The functions mu_locker_destroy, mu_locker_lock_mode,
460	mu_locker_lock, mu_locker_touchlock, mu_locker_unlock, and
461	mu_locker_remove_lock remained unchanged. Rest of functions is
462	deprecated, but retained for a couple of releases for the sake
463	of backward compatibility.
464
465	Constants (locker types, flags, etc) are also revisited.
466
467	This commit also fixes a bug in mu_spawnvp function, which was
468	discovered when testing external lockers.
469	* include/mailutils/locker.h: Major rewrite.
470	(MU_LOCKER_DEFAULT_EXPIRE_TIME) (MU_LOCKER_DEFAULT_RETRY_COUNT)
471	(MU_LOCKER_DEFAULT_RETRY_SLEEP)
472	(MU_LOCKER_DEFAULT_EXT_LOCKER): New defines.
473	(mu_locker_hints_t): New data type. (MU_LOCKER_FLAG_RETRY)
474	(MU_LOCKER_FLAG_EXPIRE_TIME) (MU_LOCKER_FLAG_CHECK_PID)
475	(MU_LOCKER_FLAG_TYPE,MU_LOCKER_FLAGS_ALL): New defines.
476	(mu_locker_create_ext, mu_locker_modify)
477	(mu_locker_get_hints): New functions.
478	(mu_locker_create,mu_locker_set_default_flags)
479	(mu_locker_set_default_retry_timeout)
480	(mu_locker_set_default_retry_count)
481	(mu_locker_set_default_expire_timeout)
482	(mu_locker_set_default_external_program)
483	(mu_locker_set_flags,mu_locker_mod_flags)
484	(mu_locker_set_expire_time,mu_locker_set_retries)
485	(mu_locker_set_retry_sleep,mu_locker_set_external)
486	(mu_locker_get_flags,mu_locker_get_expire_time)
487	(mu_locker_get_retries,mu_locker_get_retry_sleep): Mark as
488	deprecated.
489	* libmailutils/base/locker.c: Rewrite.
490	* libmailutils/cli/stdcapa.c: New locking statements: type and
491	retry-sleep. retry-timeout is deprecated.
492	* libmailutils/tests/lck.c: Use new locker functions.
493	* libmailutils/tests/lock.at: Test the external locker.
494	* libmailutils/base/spawnvp.c (mu_spawnvp): Restore the default
495	SIGCHLD handler while waiting for the process to terminate.
496	* dotlock/dotlock.c: Use new locker functions.
497	* lib/manlock.c: Likewise.
498	* libmailutils/base/amd.c: Likewise.
499	* libmu_dbm/berkeley.c: Likewise.
500	* libmu_sieve/extensions/vacation.c: Likewise.
501	* libproto/dotmail/dotmail.c: Likewise.
502	* libproto/mbox/mboxrd.c: Likewise.
503	* mail/copy.c: Likewise.
504	* mda/lmtpd/lmtpd.c: Modify mu_locker_defaults instead of using
505	deprecated functions.
506	* mda/mda/mda.c: Likewise.
507	* mda/putmail/putmail.c: Likewise.
508	* NEWS: Document changes.
509	* configure.ac: Version 3.12.90.
510	* doc/texinfo/Makefile.am: Add programs/dotlock.texi
511	* doc/texinfo/programs.texi: Rewrite the locking section. New
512	section: dotlock.
513	* doc/texinfo/programs/dotlock.texi: New file.
514
5152021-04-29  Sergey Poznyakoff  <gray@gnu.org>
516
517	mail: accept attachments from FIFOs.
518
519	* mail/send.c: Use mu_file_stream_create for FIFOs.
520
5212021-04-29  Sergey Poznyakoff  <gray@gnu.org>
522
523	mh: fix extra doc formatting.
524
525	* mh/mh_getopt.c (mh_extra_help_hook): Use number of leading
526	whitespace as left margin for output.
527
5282021-04-29  Sergey Poznyakoff  <gray@gnu.org>
529
530	libopt: don't show hidden options in the --usage output.
531
532	* libmailutils/opt/help.c (option_summary): Skip options with
533	MU_OPTION_HIDDEN bit set.
534	(mu_option_describe_options): Reset margin to 0 so that
535	eventual extra_doc is formatted correctly.
536
5372021-04-29  Sergey Poznyakoff  <gray@gnu.org>
538
539	Further improvements of the locker interface.
540
541	This fixes a bug that prevented previous versions of mailutils
542	to retry aquiring the lock.
543
544	Locking configuration (the "locking" section) is improved.
545
546	* dotlock/dotlock.c: New options: --retry (-r), --delay (-t),
547	--pid-check (-p). Use the "locking" capability.
548	* libmailutils/base/locker.c: Remove the uses of assert().
549	(mu_locker_lock_mode): Fix the retry loop.
550	(lock_dotlock): Use mu_asprintf to create temporary lock name.
551	Return EAGAIN on temporary error conditions.
552	(lock_kernel): Fix typo (EACCES).
553	* libmailutils/cli/stdcapa.c (cb_locker_flags): Locker flags
554	are deprecated.
555	(cb_locker_retry_timeout,cb_locker_retry_count): Clear the
556	MU_LOCKER_RETRY flag, if supplied a zero value.
557	(cb_locker_external): Clear the MU_LOCKER_EXTERNAL flag (revert
558	to the dotlock locker type) if the value is a false boolean
559	value.
560	* libmailutils/tests/Makefile.am: Add new test.
561	* libmailutils/tests/testsuite.at: Include new test,
562	* libmailutils/tests/lck.c: New test program.
563	* libmailutils/tests/lock.at: New test.
564
5652021-04-27  Sergey Poznyakoff  <gray@gnu.org>
566
567	Fix misattributed locker flags.
568
569	* libmailutils/cli/stdcapa.c (cb_locker_expire_timeout)
570	(cb_locker_external): Pass proper first argument to
571	mu_locker_set_default_flags.
572
5732021-04-18  Sergey Poznyakoff  <gray@gnu.org>
574
575	Bugfix in the configuration file lexer.
576
577	String values like the following caused failure:
578
579	 "foo \
580	 bar \
581	 baz \
582	 qux"
583
584	The second and third physical lines would not be recognized by
585	the scanner. The bug was due to a long-standing copy-paste
586	error.
587
5882021-04-18  Sergey Poznyakoff  <gray@gnu.org>
589
590	SQL auth: supply backend-specific parameters via the "param"
591	statement.
592
593	For MySQL, backend-specific parameter is a list of
594	keuword=value pairs delimited by semicolons. Valid keywords
595	are:
596
597	defaults_file - read configuration from the supplied file;
598	group - if default_file is supplied, read configuration from
599	this named group (default - "client"); ca - name of the
600	certificate authority file;
601
602	* include/mailutils/sql.h (mu_sql_module_config)<param>: New
603	member.
604	(mu_sql_connection)<param>: New member.
605	(mu_sql_connection_init): Take additional argument (param). All
606	uses changed.
607	* libmu_auth/sql.c: New keyword: "param".
608	* sql/mysql.c (mu_mysql_connect): Parse backend-specific
609	parameters: defaults_file, group, and ca.
610	* sql/sql.c (mu_sql_connection_init): Take additional argument.
611	Initialize the connection param member.
612
6132021-04-18  Sergey Poznyakoff  <gray@gnu.org>
614
615	mbox,dotmail: fix the _message_unseen method.
616
617	* libproto/dotmail/dotmail.c (dotmail_message_unseen): Set
618	return value to 0 and return success if there are no unseen
619	messages.
620	* libproto/mbox/mboxrd.c (mboxrd_message_unseen): Likewise.
621
6222021-04-15  Sergey Poznyakoff  <gray@gnu.org>
623
624	Bugfix in mimeview testsuite.
625
626	* mimeview/tests/bf.c (write_byte): Fix type of the character
627	buffer.
628
6292021-04-15  Sergey Poznyakoff  <gray@gnu.org>
630
631	Minor fix.
632
633	* include/mailutils/sys/streamtrans.h: Add missing #endif
634
6352021-02-13  Sergey Poznyakoff  <gray@gnu.org>
636
637	Version 3.12.
638
6392021-02-13  Sergey Poznyakoff  <gray@gnu.org>
640
641	Skip imap4d tests if home directory does not exist.
642
643	* imap4d/tests/testsuite.at (IMAP4D_RUN): Skip test if home
644	directory does not exist.
645
6462021-02-10  Sergey Poznyakoff  <gray@gnu.org>
647
648	inc: when updating the unseen sequence, translate message
649	numbers to uids.
650
651	* mh/inc.c (main): Ensure translation from ordinal to sequence
652	numbers (uid).
653
6542021-02-09  Sergey Poznyakoff  <gray@gnu.org>
655
656	dotmail: synchronize with the recent changes to mbox.
657
658	* libproto/dotmail/dotmail.c: Synchronize with the recent
659	changes to mbox.
660	* libproto/dotmail/tests/rospool.at: New test.
661	* libproto/dotmail/tests/Makefile.am: Add new test.
662	* libproto/dotmail/tests/testsuite.at: Add new test.
663
6642021-02-09  Sergey Poznyakoff  <gray@gnu.org>
665
666	mbox: use fstat etc. instead of stat etc.
667
668	* libproto/mbox/mboxrd.c (mboxrd_stat,mboxrd_set_priv): New
669	functions.
670	(mboxrd_get_atime): Use mboxrd_stat instead of stat(2). Fix the
671	return value.
672	(mboxrd_flush_unlocked): Use mboxrd_stat to stat the mailbox
673	and mboxrd_set_priv to set mode and ownership.
674	* libproto/mbox/tests/rospool.at: Remove extra newline (typo).
675
6762021-02-09  Sergey Poznyakoff  <gray@gnu.org>
677
678	mbox: fix expunging in a read-only directory.
679
680	This fixes debian bug 980042. Re:
681	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980042#16
682
683	* libproto/mbox/mboxrd.c (mboxrd_flush_unlocked): If temporary
684	file cannot be created in the directory of the mailbox because
685	of EACCES, create it elsewhere and copy back to the mailbox
686	when ready. Also, make sure that the mode and ownership of the
687	mailbox are preserved, no matter what temporary file was used.
688	* libproto/mbox/tests/rospool.at: New test.
689	* libproto/mbox/tests/Makefile.am: Add new test.
690	* libproto/mbox/tests/testsuite.at: Add new test.
691
6922021-01-12  Sergey Poznyakoff  <gray@gnu.org>
693
694	Fix libmu_scm testsuite.
695
696	This is a follow-up to a3bd653315.
697
698	* libmu_scm/tests/testsuite.at (MU_GUILE_OUTPUT_FILTER): New
699	macro.
700	(MU_GUILE_CHECK): If MU_GUILE_OUTPUT_FILTER is not empty,
701	filter the stdout through it.
702	* libmu_scm/tests/mailbox-append-message.at: Filter out line
703	and byte counts.
704	* libmu_scm/tests/mailbox-expunge.at: Fix line and byte counts.
705	* libmu_scm/tests/mailbox-get-message.at: Likewise.
706	* libmu_scm/tests/mailbox-iterate.at: Likewise.
707
7082021-01-12  Sergey Poznyakoff  <gray@gnu.org>
709
710	Remove left-over mailutils.rc support.
711
712	* libmailutils/cli/cli.c (MU_LEGACY_CONFIG_FILE): Remove.
713	(mu_cli_ext): No handling for the pre-3.0 configuration file.
714
7152021-01-11  Sergey Poznyakoff  <gray@gnu.org>
716
717	Fix building mda utilities with mailbox quotas off.
718
7192021-01-11  Sergey Poznyakoff  <gray@gnu.org>
720
721	Fix architecture-dependent test failures.
722
723	* configure.ac (MU_COND_MAILBOX_QUOTA): Fix test condition.
724	* libproto/dotmail/tests/atlocal.in (x_imapbase_normalize): New
725	function.
726	* libproto/mbox/tests/atlocal.in: Likewise.
727	* libproto/dotmail/tests/delete.at: Filter output through
728	x_imapbase_normalize to avoid triggering false negative due to
729	padding differences.
730	* libproto/mbox/tests/delete.at: Likewise.
731
7322021-01-11  Sergey Poznyakoff  <gray@gnu.org>
733
734	Force character signedness in strout test.
735
7362021-01-11  Sergey Poznyakoff  <gray@gnu.org>
737
738	SMTP mailer: fix selection of the default port.
739
740	* libproto/mailer/smtp.c (smtp_open): Use MU_SMTPS_PORT only if
741	MAILER_TLS_ALWAYS is required.
742
7432021-01-11  Sergey Poznyakoff  <gray@gnu.org>
744
745	strout test: don't wait for the input forever.
746
747	* libmailutils/tests/strout.c: Run no longer than 30 seconds.
748	Standardize exit codes.
749
7502021-01-05  Sergey Poznyakoff  <gray@gnu.org>
751
752	Minor changes.
753
7542021-01-05  Sergey Poznyakoff  <gray@gnu.org>
755
756	Version 3.11.1.
757
7582021-01-05  Sergey Poznyakoff  <gray@gnu.org>
759
760	Fix version output.
761
762	* include/mailutils/cli.h (mu_copyright_year): New extern.
763	(mu_version_print): New proto.
764	* libmailutils/cli/cli.c (mu_copyright_year): New variable.
765	Should be updated once a year.
766	(mu_version_print): New function.
767	(mu_version_hook): Use mu_version_print.
768	* mail/mail.c (mail_warranty): Use mu_version_print.
769
7702021-01-05  Sergey Poznyakoff  <gray@gnu.org>
771
772	Update copyright years.
773
7742020-12-30  Sergey Poznyakoff  <gray@gnu.org>
775
776	Fix coredump on NULL input to mu_url_create_hint.
777
778	In particular, this caused inc to coredump when called without
779	explicit -file option.
780
781	* libmailutils/url/create.c (mu_url_create_hint): Return EINVAL
782	if str is NULL.
783	* mh/tests/inc.at: Add new test.
784
7852020-12-30  Sergey Poznyakoff  <gray@gnu.org>
786
787	Use well-known mboxrd format name everywhere.
788
7892020-12-23  Sergey Poznyakoff  <gray@gnu.org>
790
791	Version 3.11.
792
7932020-12-21  Sergey Poznyakoff  <gray@gnu.org>
794
795	MH: provide a mh_profile setting to control assignment of
796	sequence numbers.
797
798	The "Volatile-uidnext" setting controls how sequence numbers
799	are allocated. By default they increase monotonically. If
800	Volatile-uidnext is set to "true", each new incorporated
801	message is assigned the sequence number equal to that of the
802	last message increased by one. When the last message in the
803	mailbox is deleted, the value of UIDNEXT is recalculated and
804	UIDVALIDITY is increased. This follows the behavior of
805	traditional MH implementations.
806
807	* doc/texinfo/mu-mh.texi: Document chnges.
808	* include/mailutils/sys/amd.h (MU_AMD_VOLATILE_UIDNEXT): New
809	constant.
810	* libmailutils/base/amd.c (amd_expunge): Reset uidvalidity and
811	uidnext if MU_AMD_VOLATILE_UIDNEXT capability is set and the
812	last message was removed.
813	* libproto/mh/mh.c (_mailbox_mh_init): New mh_profile setting
814	"Volatile-uidnext". If set to true, it instructs mailutils to
815	mimic the traditional MH behavior when assigning sequence
816	number to the new message.
817	* testsuite/mbop.c (main): Use MBOP_PRE_OPEN_HOOK (if defined)
818	as the name of the function to call before opening the mailbox.
819	* libproto/mh/tests/mbop.c (mbop_pre_open_hook): New function.
820	If the MH environment variable is set, take its value as the
821	name of the mh_profile and read settings from it.
822	* libproto/mh/tests/Makefile.am: Add uidvol.at
823	* libproto/mh/tests/atlocal.in: Unset MH.
824	* libproto/mh/tests/testsuite.at: Include uidvol.at
825	* libproto/mh/tests/uidvol.at: New file.
826
8272020-12-04  Sergey Poznyakoff  <gray@gnu.org>
828
829	amd: reset the UIDNEXT after resetting the uidvalidity.
830
831	This happens automatically for plaintext mailboxes, but needs
832	to be done explicitly for directory-based ones.
833
834	* libmailutils/base/amd.c (amd_set_uidvalidity): Reset the
835	UIDNEXT
836	* testsuite/mbop.c: New command: uidvalidity_reset
837
8382020-12-04  Sergey Poznyakoff  <gray@gnu.org>
839
840	Explicitly reset uidvalidity after folder -pick.
841
842	(See also 6e0fb32ec8)
843
8442020-11-30  Sergey Poznyakoff  <gray@gnu.org>
845
846	Version 3.10.91.
847
8482020-11-30  Sergey Poznyakoff  <gray@gnu.org>
849
850	New functions for closing all fds and daemonizing.
851
852	* configure.ac: Select a suitable interface for closing all
853	file descriptors greater than or equal to a chosen one.
854	* include/mailutils/daemon.h (mu_daemon): New proto.
855	* include/mailutils/util.h (mu_close_fds): New proto.
856	* lib/daemon.c: Removed.
857	* lib/Makefile.am: Remove daemon.c
858	* libmailutils/base/Makefile.am: Add closefds.c
859	* libmailutils/base/closefds.c: New file.
860	* libmailutils/base/daemon.c: Rename to
861	libmailutils/base/pidfile.c
862	* libmailutils/base/daemon.c: New file.
863	* libmailutils/diag/bt.c: Use mu_close_fds.
864	* libmailutils/server/acl.c: Likewise.
865	* mh/mh_whatnow.c: Likewise.
866	* libmailutils/stream/prog_stream.c: Likewise.
867	* libmailutils/server/msrv.c: Use mu_daemon.
868	* mh/send.c: Likewise.
869	* mda/lib/util.c (mda_close_fds): Remove.
870
8712020-11-29  Sergey Poznyakoff  <gray@gnu.org>
872
873	Optimize the observable interface.
874
875	A bitmask of all requested event types is stored in the
876	observable structure. When an event is reported,
877	mu_observable_notify first check if the event type bit is set
878	in that bitmap. If so, it starts iterating over observers. That
879	should allow us to avoid the loop in most cases.
880
881	* include/mailutils/observer.h (mu_observable_wants): New
882	proto.
883	* include/mailutils/sys/observer.h (_mu_observable): New
884	member: types.
885	* libmailutils/base/observer.c (mu_observable_attach): Compute
886	bitmask of all types requested by attached observers.
887	(mu_observable_detach): Likewise.
888	(mu_observable_notify): Check if the event type is marked in
889	the bitmap, skip iteration if it is not.
890	(mu_observable_wants): New function.
891
8922020-11-29  Sergey Poznyakoff  <gray@gnu.org>
893
894	Avoid using VPATH in libproto testsuites.
895
896	* libproto/dotmail/tests/Makefile.am: Build mbop from local
897	source.
898	* libproto/maildir/tests/Makefile.am: Likewise.
899	* libproto/mbox/tests/Makefile.am: Likewise.
900	* libproto/mh/tests/Makefile.am: Likewise.
901	* libproto/dotmail/tests/mbop.c: New file.
902	* libproto/maildir/tests/mbop.c: New file.
903	* libproto/mbox/tests/mbop.c: New file.
904	* libproto/mh/tests/mbop.c: New file.
905
906	Rename mbox.c files in libproto libraries to avoid confusion
907	with the eponymous format.
908	* libproto/imap/mbox.c: Rename to mailbox.c.
909	* libproto/imap/Makefile.am: Update.
910	* libproto/maildir/mbox.c: Rename to maildir.c
911	* libproto/maildir/Makefile.am: Update.
912	* libproto/mailer/mbox.c: Rename to mailbox.c
913	* libproto/mailer/Makefile.am: Update.
914	* libproto/mh/mbox.c: Rename to mh.c.
915	* libproto/mh/Makefile.am: Update.
916	* libproto/pop/mbox.c: Rename to mailbox.c
917	* libproto/pop/Makefile.am: Update.
918
9192020-11-27  Sergey Poznyakoff  <gray@gnu.org>
920
921	Improve mbox data/time handling.
922
923	* libproto/mbox/mboxrb.c (scan_message_begin): Use a single
924	scan format for parsing all possible variants of the date/time.
925
9262020-11-27  Sergey Poznyakoff  <gray@gnu.org>
927
928	Don't use __FILE__ and __LINE__ in mu_debug.
929
930	This is spurious as it can be enabled by the debug.line-info
931	configuration directive.
932
9332020-11-27  Sergey Poznyakoff  <gray@gnu.org>
934
935	mu_scan_datetime: Fix error recovery.  %Z handles both
936	time-zone forms.
937
938	The value stored in the memory location pointed to by the endp
939	argument has changed. On the MU_ERR_PARSE error, it is (as
940	earlier) the position in input where conversion stopped. On the
941	MU_ERR_FORMAT, however, it is the character in fmt where the
942	format error was detected.
943
944	* libmailutils/datetime/scantime.c (peek_state): Return
945	MU_ERR_FORMAT if mu_list_tail fails (the list is empty). This
946	reflects unbalanced closing parenthesis or bracket.
947	(scan_recovery): fix algorithm.
948	(mu_scan_datetime): %Z handles both abbreviated time-zones and
949	time-zones as hour offset from GMT. Improve error handling. On
950	MU_ERR_PARSE error, point *endp to the character in input where
951	conversion stopped. On MU_ERR_FORMAT error, point it to the
952	character in fmt, where the format error was detected.
953	* libmailutils/tests/scantime.c: Improve error handling.
954	* libmailutils/tests/scantime.at: More testcases.
955
9562020-11-26  Sergey Poznyakoff  <gray@gnu.org>
957
958	dotmail: re-implement tracker along the lines of mboxrb.
959
960	* include/mailutils/sys/dotmail.h (mu_dotmail_message): New
961	member: mark.
962	(mu_dotmail_message_reconstruct): Change signature.
963	* libproto/dotmail/dotmail.c (mu_dotmail_flush_tracker): Change
964	type of the ref member.
965	(tracker_next_ref): Rewrite.
966	(dotmail_tracker_sync): Rewrite.
967	(dotmail_mailbox_copy_unchanged): Rewrite.
968	* libproto/dotmail/message.c (dotmail_message_copy_with_uid)
969	(mu_dotmail_message_reconstruct): Rewrite.
970	* libproto/dotmail/tests/delete.at: Rewrite.
971
9722020-11-26  Sergey Poznyakoff  <gray@gnu.org>
973
974	mboxrb: Keep timestamps in normalized form.
975
976	* include/mailutils/datetime.h (mu_timezone_offset): New proto.
977	* libmailutils/datetime/scantime.c: New conversion: %Z
978	(timezone abbreviation).
979	* libmailutils/datetime/parsedate.y (mu_timezone_offset): New
980	function. Returns time offset in seconds corresponding to the
981	given timezone abbreviation.
982	* include/mailutils/sys/mboxrb.h (mu_mboxrb_hdr): Remove
983	unneeded enum.
984	(mu_mboxrb_message): Remove env_date_start, New member "date"
985	holds the string representation of the envelope timestamp in
986	normalized form - ctime(3), UTC.
987	* libproto/mbox/mboxrb.c (scan_message_finalize): New function.
988	(scan_message_begin): New function. When initializing the
989	message, timestamps in obsolete forms are converted to
990	normalized representation.
991	(mboxrb_rescan_unlocked): Use scan_message_finalize and
992	scan_message_begin.
993	* libproto/mbox/message.c (mboxrb_envelope_date): Get
994	normalized timestamp from the date member,
995	* libproto/mbox/tests/env.at: Reflect the above changes.
996
9972020-11-25  Sergey Poznyakoff  <gray@gnu.org>
998
999	Improve mboxrb scanner.
1000
1001	* libproto/mbox/mboxrb.c: Request that the From_line be
1002	preceded by an empty line.
1003
10042020-11-25  Sergey Poznyakoff  <gray@gnu.org>
1005
1006	Replace mbox format driver with mboxrb.
1007
1008	* NEWS: update
1009	* configure.ac: Revert 9763fd4a.
1010	* include/mailutils/registrar.h: Likewise.
1011	* libproto/Makefile.am: Likewise.
1012	* libmailutils/stream/stream.c (mu_stream_size): Fix size
1013	calculation in case of line and full buffering scheme.
1014	* libmailutils/stream/streamcpy.c (mu_stream_copy_nl): Change
1015	semantics. Ensure that the copied data ends with two newline
1016	characters. Append them if necessary.
1017	* testsuite/mbop.c: New commands: message_lines and
1018	message_size.
1019	* libproto/mbox/mboxrb.c (mboxrb_mailbox_init_stream): Always
1020	add MU_STREAM_READ permission. Use the same flags for
1021	mu_mapfile_stream_create and mu_file_stream_create.
1022	(mboxrb_rescan_unlocked): Count terminating newline as part of
1023	the message.
1024	(mailbox_append_message): Make sure each message ends with an
1025	empty line.
1026	(mboxrb_tracker_sync): Update mailbox mesg_count.
1027	(mboxrb_flush_temp): Truncate the temporary stream to the new
1028	size.
1029	(mboxrb_flush_unlocked): Clear all modifications only in
1030	FLUSH_UIDVALIDITY mode.
1031	(mboxrb_message_copy_with_uid): Fix message_end computation.
1032	Use mu_stream_copy_nl to copy message body.
1033	(mu_mboxrb_message_reconstruct): Update ref on return.
1034	* po/POTFILES.in: Update.
1035	* mail/copy.c (append_to_file): Use mu_stream_stat_buffer to
1036	compute statistics.
1037	* mail/mail.c: Allow for opening read-only mailboxes.
1038	* libproto/mbox/tests/body.at: Fix the expected byte count.
1039	* libproto/mbox/tests/qget.at: Likewise.
1040	* libproto/mbox/tests/delete.at: Add more tests.
1041	* mail/tests/align.at: Fix the expected byte and line count.
1042	* mail/tests/hold.at: Likewise.
1043	* mail/testsuite/mail/read.exp: Likewise.
1044	* mail/testsuite/mail/tag.exp: Likewise.
1045	* mail/testsuite/mail/z.exp: Likewise.
1046	* mail/tests/copy04.at: Don't use line count and size in
1047	comparison.
1048	* mail/testsuite/mail/write.exp: Use regexps instead of exact
1049	strings for the same reason.
1050	* pop3d/testsuite/pop3d/read.exp: Fix the expected byte count.
1051	* readmsg/tests/all.at: Expect extra newline in output.
1052	* readmsg/tests/hdr.at: Likewise.
1053	* readmsg/tests/nohdr.at: Likewise.
1054	* readmsg/tests/twomsg.at: Likewise.
1055	* readmsg/tests/weed.at: Likewise.
1056	* sieve/tests/redirect.at: Fix the expected byte count.
1057	* sieve/tests/reject.at: Expect extra newline in output.
1058	* mh/inc.c (incmbx): Parse truncate and nomoveto URL parameters
1059	prior to opening the mailbox. If notruncate is requested, open
1060	the mailbox read-only.
1061	* mh/mh_format.c (str_compress_ws): Fix copying between
1062	overlapping memory regions.
1063	* libtests/Makefile.am: Remove lstuid tests.
1064	* libtests/testsuite.at: Likewise.
1065	* libtests/lstuid.c: Remove.
1066	* libtests/lstuid00.at: Remove.
1067	* libtests/lstuid01.at: Remove.
1068	* libtests/lstuid02.at: Remove.
1069	* libtests/mime.at: Fix the expected byte count.
1070	* imap4d/tests/IDEF0956.at: Fix the expected byte count.
1071	* map4d/tests/fetch.at: Likewise.
1072	* imap4d/tests/append00.at: Remove X-* headers and Status from
1073	the mbox prior to comparison.
1074	* imap4d/tests/append01.at: Likewise.
1075	* libproto/mbox: Remove old code. Replace it with mboxrb.
1076	* mail/tests/nohome.at: Update lines/sizes.
1077	* mail/testsuite/mail/folder.exp: Likewise.
1078	* mail/testsuite/mail/tag.exp: Likewise.
1079	* mail/testsuite/mail/z.exp: Likewise.
1080	* mda/mda/tests/mda.at: Fix shell quoting.
1081	* mda/putmail/tests/putmail.at: Remove extra newline from the
1082	expectation. Eliminate X-IMAPbase and X-UID from the resulting
1083	mailbox.
1084	* mda/tests/mda.sh: Eliminate X-IMAPbase and X-UID from the
1085	output.
1086	* pop3d/testsuite/pop3d/read.exp: Fix expected lines/sizes
1087	* readmsg/tests/hdr.at: Fix extra whitespace.
1088	* sieve/tests/action.at: Eliminate X-IMAPbase and X-UID. Fix
1089	extra whitespace in the expected From_ line.
1090	* sieve/tests/addheader.at: Likewise.
1091	* sieve/tests/pipeact.at: Likewise.
1092
10932020-11-23  Sergey Poznyakoff  <gray@gnu.org>
1094
1095	Two bugfixes.
1096
1097	* libproto/mboxrb/mboxrb.c (mboxrb_open): Propagate failure to
1098	open the stream to the return code.
1099	* libproto/mboxrb/tests/notify.at: Use cat to create test inbox
1100
11012020-11-23  Sergey Poznyakoff  <gray@gnu.org>
1102
1103	Add two more mboxrb tests.
1104
11052020-11-23  Sergey Poznyakoff  <gray@gnu.org>
1106
1107	mboxrb: rewrite tracker.
1108
1109	* include/mailutils/sys/mboxrb.h (mu_mboxrb_message_ref):
1110	Remove.
1111	(mu_mboxrb_message_reconstruct): Change prototype.
1112	* libproto/mboxrb/mboxrb.c (mu_mboxrb_flush_tracker) <ref>:
1113	Change type to size_t *.
1114	(tracker_next_ref): Return the refereced message.
1115	(mboxrb_tracker_sync): Rewrite.
1116	(mboxrb_mailbox_copy_unchanged): Update.
1117	(mailbox_append_message): Place exactly one empty line between
1118	two messages.
1119	* libproto/mboxrb/message.c (mboxrb_message_copy_with_uid): Ref
1120	argument is struct mu_mboxrb_message *.
1121	(mu_mboxrb_message_reconstruct): Likewise.
1122	* libproto/mboxrb/tests/delete.at: Check number of messages
1123	after deletion.
1124	* libproto/mboxrb/tests/append.at: Expect extra newline.
1125
11262020-11-23  Sergey Poznyakoff  <gray@gnu.org>
1127
1128	Fix deletes.  Add new tests.
1129
1130	* include/mailutils/sys/mboxrb.h (mu_mboxrb_message): New
1131	member: mark
1132	* libproto/mboxrb/mboxrb.c (mu_mboxrb_message_ref): New
1133	members: from_length, env_sender_len, env_date_start.
1134	* libproto/mboxrb/message.c (mboxrb_rescan_unlocked): Update
1135	dmp->scan. Fix NULL dereference.
1136	(mboxrb_rescan): Don't update dmp->scan, see above.
1137	(mailbox_append_message): Write out envelope; use FROMRB
1138	filter.
1139	(mboxrb_tracker_sync): Rewrite using mark/sweep technique.
1140	* libproto/mboxrb/tests/Makefile.am: Add new tests.
1141	* libproto/mboxrb/tests/testsuite.at: Include new tests.
1142	* libproto/mboxrb/tests/append.at: New test.
1143	* libproto/mboxrb/tests/delete.at: New test.
1144	* libproto/mboxrb/tests/qget.at: New test.
1145	* libproto/mboxrb/tests/uidnext.at: New test.
1146	* libproto/mboxrb/tests/uidvalidity.at: New test.
1147
11482020-11-23  Sergey Poznyakoff  <gray@gnu.org>
1149
1150	Implement mboxrb format (a replacement for the mbox used
1151	currently)
1152
1153	* configure.ac: New format: mboxrb
1154	* include/mailutils/filter.h (mu_fromrb_filter): New extern.
1155	* include/mailutils/registrar.h (mu_mboxrb_record): New extern.
1156	(mu_register_all_mbox_formats)
1157	(mu_register_local_mbox_formats): Add mu_mboxrb_record.
1158	* libmailutils/filter/filter.c (mu_filter_get_list): Add
1159	mu_fromrb_filter
1160	* libproto/Makefile.am [MU_COND_SUPPORT_MBOXRB]: Add mboxrb
1161	* bootstrap.conf: Remove special handling for testsuite/maildir
1162	(fixes 1d846d2d92).
1163	* testsuite/mbop.c: Implement the -r (--read-only) option.
1164	* include/mailutils/sys/Makefile.am: Add mboxrb.h
1165	* include/mailutils/sys/mboxrb.h: New file.
1166	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
1167	fromrb.c
1168	* libmailutils/filter/fromrb.c: New file.
1169	* libmailutils/tests/Makefile.am: New file.
1170	* libmailutils/tests/fromrb.at: New file.
1171	* libmailutils/tests/testsuite.at: New file.
1172	* libproto/mboxrb/Makefile.am: New file.
1173	* libproto/mboxrb/mboxrb.c: New file.
1174	* libproto/mboxrb/message.c: New file.
1175	* libproto/mboxrb/tests/.gitignore: New file.
1176	* libproto/mboxrb/tests/Makefile.am: New file.
1177	* libproto/mboxrb/tests/atlocal.in: New file.
1178	* libproto/mboxrb/tests/attr.at: New file.
1179	* libproto/mboxrb/tests/autodetect.at: New file.
1180	* libproto/mboxrb/tests/body.at: New file.
1181	* libproto/mboxrb/tests/count.at: New file.
1182	* libproto/mboxrb/tests/env.at: New file.
1183	* libproto/mboxrb/tests/header.at: New file.
1184	* libproto/mboxrb/tests/testsuite.at: New file.
1185
11862020-11-20  Sergey Poznyakoff  <gray@gnu.org>
1187
1188	dotmail: update uids in append mode as well.
1189
1190	* include/mailutils/sys/dotmail.h (mu_dotmail_mailbox): New
1191	member stream_flags.
1192	* libproto/dotmail/dotmail.c (dotmail_mailbox_init_stream):
1193	Translate MU_STREAM_APPEND to MU_STREAM_RDWR.
1194	(dotmail_rescan_unlocked,dotmail_rescan): Check actual stream
1195	flags, not the mailbox ones.
1196	(dotmail_flush_unlocked): Remove check for MU_STREAM_APPEND.
1197	* libproto/dotmail/tests/append.at: Test appends in append
1198	mode.
1199	* testsuite/mbop.c: New option -a (--append).
1200
12012020-11-20  Sergey Poznyakoff  <gray@gnu.org>
1202
1203	dotmail: optimize appends.
1204
1205	* include/mailutils/sys/dotmail.h (mu_dotmail_mailbox): New
1206	members: x_imapbase_off and x_imapbase_len.
1207	* libproto/dotmail/dotmail.c: Format X-IMAPbase header with
1208	fixed width to avoid rewriting entire mailbox only to make the
1209	new header fit to its place in the first message.
1210
12112020-11-19  Sergey Poznyakoff  <gray@gnu.org>
1212
1213	Make sure UIDs are monotonically increased in dotmail, mh, and
1214	maildir.
1215
1216	* include/mailutils/sys/amd.h (_MU_AMD_PROP_UIDNEXT): New
1217	define.
1218	(MU_AMD_PROP): Remove.
1219	(MU_AMD_F_PROP): New flag.
1220	(_amd_data): New member: flags. Remove next_uid
1221	(amd_reset_uidvalidity): Change return type.
1222	(amd_update_uidnext,amd_alloc_uid): New protos.
1223	* include/mailutils/sys/dotmail.h (mu_dotmail_mailbox): New
1224	member uidvalidity_changed.
1225	* libmailutils/base/amd.c (_amd_prop_create): Set MU_AMD_F_PROP
1226	flag if the prop file exists.
1227	(amd_initial_scan): New function. (amd_get_uidvalidity,
1228	amd_set_uidvalidity)
1229	(amd_uidnext): Rewrite using amd_initial_scan.
1230	(amd_reset_uidvalidity): Return int.
1231	(amd_update_uidnext,amd_alloc_uid): New functions.
1232	* libproto/dotmail/dotmail.c (dotmail_close): Flush UID
1233	parameters if uidvalidity_changed is set.
1234	(dotmail_flush): Take three-state mode as its third argument.
1235	(dotmail_flush_unlocked): Likewise. If operating in
1236	FLUSH_UIDVALIDITY mode, clear all other modifications to the
1237	messages in the mailbox. Clear uidvalidity_changed on success.
1238	(dotmail_expunge, dotmail_sync): Update call to dotmail_flush.
1239	(dotmail_alloc_next_uid): Set uidvalidity_changed.
1240	(dotmail_rescan_unlocked): Check if the assigned UID is greater
1241	than the previously assigned one and less than the UIDNEXT
1242	value. Raise uidvalidity_changed if UIDs were re-allocated.
1243	(mu_dotmail_mailbox_uid_setup): Set uidvalidity_scanned.
1244	* libproto/dotmail/tests/Makefile.am: Add new test.
1245	* libproto/dotmail/tests/testsuite.at: Likewise.
1246	* libproto/dotmail/tests/uidnext.at: New test.
1247	* libproto/maildir/mbox.c: Use amd_update_uidnext to
1248	synchronize the computed and predicted uidnext value.
1249	(maildir_next_uid): Remove.
1250	* libproto/maildir/tests/Makefile.am: Add new test.
1251	* libproto/maildir/tests/testsuite.at: Likewise.
1252	* libproto/maildir/tests/uidnext.at: New test.
1253	* libproto/mh/mbox.c (_mh_next_seq): Remove function.
1254	(mh_scan0): Use amd_update_uidnext to synchronize the computed
1255	and predicted uidnext value.
1256	* libproto/mh/tests/Makefile.am: Add new test.
1257	* libproto/mh/tests/testsuite.at: Likewise.
1258	* libproto/mh/tests/uidnext.at: New test.
1259
12602020-11-18  Sergey Poznyakoff  <gray@gnu.org>
1261
1262	imap4d: SEARCH: don't bail out if unexistent UID is given as
1263	criterion.
1264
1265	* imap4d/search.c (node_false): New constant.
1266	(parse_simple_key): Report error only if mu_msgset_parse_imap
1267	returns MU_ERR_PARSE. Otherwise, add node_false to the tree.
1268	(evaluate_node): Handle node_false.
1269
12702020-11-18  Sergey Poznyakoff  <gray@gnu.org>
1271
1272	maildir: assign UID to the message file before moving it from
1273	new to cur.
1274
1275	* libproto/maildir/mbox.c (maildir_scan_unlocked): Assign next
1276	UID to the message before moving it from new to cur.
1277	* libproto/maildir/tests/new.at: New test.
1278	* libproto/maildir/tests/Makefile.am: Add nre test.
1279	* libproto/maildir/tests/testsuite.at: Likewise.
1280
12812020-11-17  Sergey Poznyakoff  <gray@gnu.org>
1282
1283	maildir_fixup: don't bail out if unable to open the mailbox.
1284
12852020-11-17  Sergey Poznyakoff  <gray@gnu.org>
1286
1287	Fix mda (lmtpd) testsuite: don't assume mbox as the default
1288	format.
1289
12902020-11-17  Sergey Poznyakoff  <gray@gnu.org>
1291
1292	Minor changes.
1293
1294	* libproto/mh/mbox.c: Include limits.h
1295	* testsuite/mbox2dir.c (next_name_from_file): *scanf %m
1296	modifier isn't common enough yet. Rewrite using fgets +
1297	realloc.
1298
12992020-11-17  Sergey Poznyakoff  <gray@gnu.org>
1300
1301	New mailutils subcommand: maildir_fixup.
1302
1303	The subcommand converts names in maildirs created by earlier
1304	versions of mailutils to the new format.
1305
1306	* NEWS: Update.
1307	* doc/texinfo/programs/mailutils.texi: Document maildir_fixup
1308	* mu/libexec/Makefile.am: Build maildir_fixup subcommand.
1309	* mu/libexec/maildir_fixup.c: New file.
1310	* mu/libexec/mu.h (common_options): New extern.
1311	* include/mailutils/cli.h (MU_CLI_OPTION_CONF_PROGNAME): New
1312	constant.
1313	* libmailutils/cli/simple.c (MU_CLI_OPTION_PROG_NAME)
1314	(MU_CLI_OPTION_PROG_NAME) (MU_CLI_OPTION_PROG_DOC)
1315	(MU_CLI_OPTION_BUG_ADDRESS) (MU_CLI_OPTION_PACKAGE_URL)
1316	(MU_CLI_OPTION_EXTRA_INFO) (MU_CLI_OPTION_HELP_HOOK)
1317	(MU_CLI_OPTION_VERSION_HOOK) (MU_CLI_OPTION_PROG_DOC_HOOK)
1318	(MU_CLI_OPTION_NEGATION)
1319	(MU_CLI_OPTION_SPECIAL_ARGS): Allow for NULL argument.
1320	(MU_CLI_OPTION_CONF_PROGNAME): New code
1321
13222020-11-17  Sergey Poznyakoff  <gray@gnu.org>
1323
1324	sortm: reset the uidvalidity of the modified mailbox.
1325
1326	* include/mailutils/mailbox.h (mu_mailbox_uidvalidity_reset):
1327	New proto.
1328	* include/mailutils/sys/mailbox.h (_mu_mailbox): Replace the
1329	_uidvalidity member with two function pointers:
1330	_get_uidvalidity and _set_uidvalidity.
1331	* libmailutils/mailbox/mailbox.c
1332	(mu_mailbox_uidvalidity_reset): New function.
1333	* libmailutils/base/amd.c: Initialize the two methods.
1334	* libproto/dotmail/dotmail.c: Likewise.
1335	* libproto/mbox/mbox.c: Likewise.
1336	* libproto/imap/mbox.c: Initialize the _get_uidvalidity field.
1337	* mh/sortm.c: Reset the uidvalidity on success.
1338	* mh/tests/sortm.at: Check that the uidvalidity changed after
1339	sorting
1340
13412020-11-16  Sergey Poznyakoff  <gray@gnu.org>
1342
1343	Remove mh and maildir sample mailboxes from the distribution.
1344
1345	Testsuites use mbox2dir to create the requested directory-based
1346	mailbox from the mbox source.
1347
13482020-11-16  Sergey Poznyakoff  <gray@gnu.org>
1349
1350	Fix message append notifications for maildir, mh, and dotmail.
1351
1352	* testsuite/mbop.c: Implement notification mode.
1353	* comsat/tests/testsuite.at: Fix mh qid.
1354	* libproto/dotmail/dotmail.c (dotmail_append_message): Lock the
1355	monitor before and unlock it after the operation.
1356	* libproto/dotmail/tests/notify.at: New file.
1357	* libproto/dotmail/tests/Makefile.am: Add notify.at
1358	* libproto/dotmail/tests/testsuite.at: Include notify.at.
1359	* include/mailutils/sys/amd.h (cur_msg_file_name): Change
1360	signature.
1361	* libmailutils/base/amd.c: Use amd->cur_msg_file_name with 0 as
1362	its second argument to get qid.
1363	* libproto/maildir/mbox.c (maildir_cur_message_name): Take
1364	three argument, second one specifying whether an absolute or
1365	relative filename is requested. All uses changed.
1366	* libproto/maildir/tests/notify.at: New file.
1367	* libproto/maildir/tests/Makefile.am: Add notify.at
1368	* libproto/maildir/tests/testsuite.at: Include notify.at
1369	* libproto/mh/mbox.c (_mh_cur_message_name): Take three
1370	argument, second one specifying whether an absolute or relative
1371	filename is requested. All uses changed.
1372	* libproto/mh/tests/notify.at: New file.
1373	* libproto/mh/tests/Makefile.am: Add notify.at
1374	* libproto/mh/tests/testsuite.at: Include notify.at
1375
13762020-11-16  Sergey Poznyakoff  <gray@gnu.org>
1377
1378	Write testsuite for mh mailbox library.
1379
1380	* libmailutils/base/amd.c (amd_get_attr_flags): Scan the
1381	message if AMD does not report MU_AMD_STATUS capability.
1382	* libproto/mh/mbox.c (mh_qfetch): Fix,
1383	* libproto/mh/Makefile.am (SUBDIRS): Add tests.
1384	* libproto/mh/tests/.gitignore: New file.
1385	* libproto/mh/tests/Makefile.am: New file.
1386	* libproto/mh/tests/append.at: New file.
1387	* libproto/mh/tests/atlocal.in: New file.
1388	* libproto/mh/tests/attr.at: New file.
1389	* libproto/mh/tests/autodetect.at: New file.
1390	* libproto/mh/tests/body.at: New file.
1391	* libproto/mh/tests/count.at: New file.
1392	* libproto/mh/tests/delete.at: New file.
1393	* libproto/mh/tests/envelope.at: New file.
1394	* libproto/mh/tests/header.at: New file.
1395	* libproto/mh/tests/qget.at: New file.
1396	* libproto/mh/tests/testsuite.at: New file.
1397	* libproto/mh/tests/uid.at: New file.
1398	* libproto/mh/tests/uidvalidity.at: New file.
1399
14002020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1401
1402	Encode all Mailutils attributes in maildir file names.
1403
1404	The attributes that have no corresponding info letters are
1405	encoded in the 'a' name attribute as a string of mailutils
1406	status flags, e.g.:
1407
1408	 1284628225.M17468P3883Q0.localhost,a=FO,u=1:2,S
1409
1410	Meaning: MU_ATTRIBUTE_READ (from the info letter 'S'),
1411	MU_ATTRIBUTE_FLAGGED (attr. 'F') and MU_ATTRIBUTE_SEEN (attr.
1412	'O').
1413	* libproto/maildir/mbox.c (maildir_message_alloc): Parse the
1414	'a' attribute.
1415	(maildir_subdir_scan): Don't force MU_ATTRIBUTE_SEEN on
1416	existing messages.
1417	(maildir_message_fixup): Fixup the (original) MU_ATTRIBUTE_SEEN
1418	attribute.
1419	* libproto/maildir/tests/attfixup.at: Update.
1420	* libproto/maildir/tests/attr.at: Update.
1421
14222020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1423
1424	Rename mu_string_to_flags to mu_attribute_string_to_flags.
1425
1426	* include/mailutils/attribute.h (mu_attribute_string_to_flags):
1427	New proto.
1428	(mu_string_to_flags): Mark as deprecated.
1429	(mu_attribute_flags_to_string): New proto.
1430	* libmailutils/mailbox/attribute.c (mu_string_to_flags): Rename
1431	to mu_attribute_string_to_flags.
1432	(mu_attribute_flags_to_string): New function.
1433	* libmailutils/base/amd.c: Use mu_attribute_string_to_flags
1434	instead of mu_string_to_flags.
1435	* libmailutils/mailbox/msgscan.c: Likewise. *
1436	libproto/dotmail/message.c: Likewise.
1437	* libproto/pop/mbox.c: Likewise.
1438
14392020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1440
1441	Add maildir format detection test.
1442
1443	* libproto/maildir/tests/Makefile.am: Add autodetect.at.
1444	* libproto/maildir/tests/testsuite.at: Include autodetect.at.
1445	* libproto/maildir/tests/autodetect.at: New file.
1446	* testsuite/mbop.c: Fix exit code for --detect.
1447
14482020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1449
1450	Convert dotmail testsuite to mbop.
1451
1452	* libproto/dotmail/tests/.gitignore: Update.
1453	* libproto/dotmail/tests/Makefile.am: Remove dm_detect, dm_mesg
1454	and dm_qget, build mbop instead.
1455	* testsuite/mbop.c: Implement the detect mode.
1456	* libproto/dotmail/tests/dm_detect.c: Remove.
1457	* libproto/dotmail/tests/dm_mesg.c: Remove.
1458	* libproto/dotmail/tests/dm_qget.c: Remove.
1459	* libproto/dotmail/tests/append.at: Use mbop.
1460	* libproto/dotmail/tests/autodetect.at: Use mbop.
1461	* libproto/dotmail/tests/count.at: Use mbop.
1462	* libproto/dotmail/tests/delete.at: Use mbop.
1463	* libproto/dotmail/tests/qget.at: Use mbop.
1464	* libproto/dotmail/tests/recent.at: Use mbop.
1465	* libproto/dotmail/tests/testsuite.at: Use mbop.
1466	* libproto/dotmail/tests/uidvalidity.at: Use mbop.
1467	* libproto/dotmail/tests/unseen.at: Use mbop.
1468
14692020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1470
1471	Implement the MU_ATTRIBUTE_FORWARDED attribute flag.
1472
1473	* include/mailutils/attribute.h (MU_ATTRIBUTE_FORWARDED): New
1474	constant. (mu_attribute_is_forwarded,
1475	mu_attribute_set_forwarded)
1476	(mu_attribute_unset_forwarded): New prototypes.
1477	(MU_STATUS_BUF_SIZE): Update definition.
1478	* libmailutils/mailbox/attribute.c (mu_attribute_is_forwarded)
1479	(mu_attribute_set_forwarded)
1480	(mu_attribute_unset_forwarded): New functions.
1481	* libproto/maildir/mbox.c (info_map): Implement the 'P' flag.
1482
14832020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1484
1485	AMD API: provide function for resetting the uidvalidity value.
1486
1487	* include/mailutils/sys/amd.h (amd_reset_uidvalidity): New
1488	proto.
1489	* libmailutils/base/amd.c (amd_reset_uidvalidity): New
1490	function.
1491	* libproto/maildir/mbox.c (maildir_scan_unlocked): Use
1492	amd_reset_uidvalidity.
1493
14942020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1495
1496	Improve mbop interface.
1497
1498	* testsuite/mbop.c: Use mu_cli_simple for option handling. Use
1499	the -m option to pass the mailbox file name (or URL). Mark qget
1500	as not requiring message selection.
1501
15022020-11-15  Sergey Poznyakoff  <gray@gnu.org>
1503
1504	More maildir tests.
1505
1506	* .gitignore: Update.
1507	* include/mailutils/sys/amd.h (MU_AMD_IMAPBASE): Remove.
1508	* libmailutils/base/amd.c (amd_scan_message): Remove obsolete
1509	code.
1510	* libproto/maildir/mbox.c (maildir_message_cmp): Bugfixes.
1511	* testsuite/Makefile.am: Add mbop.c to distribution.
1512	* testsuite/mbop.c: Implement qget.
1513	* testsuite/mbox2dir.c (maildir_generate_name): Fix typo.
1514	(main): Skip From_ line before copying.
1515	* libmailutils/tests/Makefile.am (wsp_SOURCES): Remove.
1516	* libproto/maildir/tests/Makefile.am: Add new tests.
1517	* libproto/maildir/tests/append.at: New file.
1518	* libproto/maildir/tests/attr.at: New file.
1519	* libproto/maildir/tests/body.at: New file.
1520	* libproto/maildir/tests/count.at: Update.
1521	* libproto/maildir/tests/delete.at: New file.
1522	* libproto/maildir/tests/envelope.at: New file.
1523	* libproto/maildir/tests/header.at: New file.
1524	* libproto/maildir/tests/qget.at: New file.
1525	* libproto/maildir/tests/testsuite.at: Include new tests.
1526	* libproto/maildir/tests/uid.at: New file.
1527	* libproto/maildir/tests/uidvalidity.at: New file.
1528
15292020-11-14  Sergey Poznyakoff  <gray@gnu.org>
1530
1531	Maildir testsuite core.
1532
1533	* libmailutils/tests/tesh.c (mu_tesh_read_and_eval): Print
1534	fixed prompt if attached to a terminal.
1535	* libproto/maildir/Makefile.am (SUBDIRS): Add tests.
1536	* libproto/maildir/mbox.c (flags_to_info): Be sure to format
1537	each flag only once.
1538	(maildir_scan_unlocked): Save updated properties.
1539	* testsuite/.gitignore: Add mbox2dir.
1540	* testsuite/Makefile.am: Build mbox2dir.
1541	* testsuite/mbop.c: New file.
1542	* testsuite/mbox2dir.c: New file.
1543	* libproto/maildir/tests/.gitignore: New file.
1544	* libproto/maildir/tests/Makefile.am: New file.
1545	* libproto/maildir/tests/atlocal.in: New file.
1546	* libproto/maildir/tests/attfixup.at: New file.
1547	* libproto/maildir/tests/count.at: New file.
1548	* libproto/maildir/tests/testsuite.at: New file.
1549	* libproto/maildir/tests/uidfixup.at: New file.
1550
15512020-11-12  Sergey Poznyakoff  <gray@gnu.org>
1552
1553	Full rewrite of maildir support.
1554
1555	This rewrite aims to speed up maildir manipulations and to fix
1556	the problem with storing the uids and uidvalidity attributes.
1557
1558	Uidvalidity value is stored in the .mu-prop file, as it was
1559	done previously. UID of each message is encoded in its file
1560	name between the unique prefix and the info part. Overall
1561	structure of the message file name is:
1562
1563	 uniq [ ',' attrs ] ':2,' info
1564
1565	where uniq is the unique prefix, info is the attribute flags,
1566	and attrs is a comma-delimited list of attribute=value pairs.
1567	The 'u' attribute holds the UID. Unrecognized attributes are
1568	ignored.
1569
1570	To speed up the access and avoid unnecessary memory
1571	allocations, maildir access is reimplemented using the *at()
1572	function calls (openat instead of open, etc).
1573	* libproto/maildir/folder.c: Rewrite.
1574	* libproto/maildir/maildir.h: Rewrite.
1575	* libproto/maildir/mbox.c: Rewrite.
1576
15772020-11-12  Sergey Poznyakoff  <gray@gnu.org>
1578
1579	dotmail: reset uidvalidity if UIDs are reinitialized.
1580
1581	* libproto/dotmail/dotmail.c (dotmail_rescan_unlocked): Reset
1582	uidvalidity if the UIDs are to be reinitialized.
1583
15842020-11-12  Sergey Poznyakoff  <gray@gnu.org>
1585
1586	Don't assume any special meaning of the X-Imapbase header in
1587	the library.
1588
1589	This starts a series of commits whose purpose is to clean up
1590	the mess with the uid and uidvalidity attributes.
1591
1592	The way these attributes are stored depends on the mailbox
1593	type. The libmailutils library contained some historical
1594	left-overs that assumed that the X-Imapbase header of the first
1595	message in the mailbox contained the value of the uidvalidity
1596	and next uid. These left-overs are removed.
1597
1598	* include/mailutils/message.h (mu_message_scan): Remove
1599	uidvalidity.
1600	* libmailutils/mailbox/msgscan.c: Remove special handling for
1601	the X-Imapbase header.
1602	* libmailutils/base/amd.c (_amd_message_save)
1603	(amd_scan_message): Remove special handling for X-Imapbase.
1604
16052020-11-10  Sergey Poznyakoff  <gray@gnu.org>
1606
1607	Fix Savane bug #56428.
1608
1609	* NEWS: Update.
1610	* configure.ac: Version 3.10.90
1611	* include/mailutils/cstr.h (mu_version_string_parse)
1612	(mu_version_string_cmp): New protos.
1613	* libmailutils/string/Makefile.am (libstring_la_SOURCES): Add
1614	version.c.
1615	* libmailutils/string/version.c: New file.
1616	* include/mailutils/sys/amd.h (_amd_message): Remove the
1617	orig_flags member. All uses changed.
1618	(MU_AMD_PROP): New capability.
1619	* include/mailutils/url.h (MU_AUTODETECT_ACCURACY_MAX): New
1620	constant.
1621	* libmailutils/base/amd.c (_amd_prop_create): Raise MU_AMD_PROP
1622	if the prop file exists.
1623	* libmailutils/base/schemeauto.c: New values for the
1624	MU_AUTODETECT_ACCURACY environment variable: default, fast, and
1625	max.
1626	* libmailutils/property/mhprop.c (_mh_prop_fill): Fix
1627	diagnostic message.
1628	* libproto/maildir/mbox.c: Fix incorrect letter to attribute
1629	mapping.
1630	* libproto/mh/mbox.c: Remove uses of orig_flags.
1631	* libmailutils/base/registrar.c (mu_registrar_lookup_url): Fall
1632	back to the default registrar if the url doesn't contain
1633	explicit scheme, the file it references does not exist, and the
1634	default record is a local one.
1635
16362020-11-09  Sergey Poznyakoff  <gray@gnu.org>
1637
1638	Fix mapping of the \Seen IMAP attribute.
1639
1640	* include/mailutils/attribute.h: Document message attributes.
1641	* libmailutils/imapio/flags.c (_imap4_attrlist): \Seen
1642	corresponds to MU_ATTRIBUTE_READ.
1643
16442020-10-01  Sergey Poznyakoff  <gray@gnu.org>
1645
1646	Improve message comparison routine for maildir.
1647
1648	* libproto/maildir/mbox.c (maildir_message_cmp): Compare
1649	seconds, microseconds and number of deliveries, in that order.
1650	If all match (shouldn't happen), resort to lexicographical
1651	comparison.
1652
16532020-10-01  Sergey Poznyakoff  <gray@gnu.org>
1654
1655	Rewrite amd_msg_bsearch without recursion.
1656
16572020-10-01  Sergey Poznyakoff  <gray@gnu.org>
1658
1659	Bugfix.
1660
1661	* libmailutils/base/amd.c (amd_msg_lookup): Always store the
1662	index of the memory slot, as described in the comment. This was
1663	broken in 1274d937 in a fit of overcorrectness.
1664
16652020-09-28  Sergey Poznyakoff  <gray@gnu.org>
1666
1667	Fix last resort return for message_envelope_sender.
1668
1669	* libmailutils/mailbox/msgenv.c (message_envelope_sender): Fix
1670	conditional. Use mu_get_user_email instead of tinkering with
1671	mu_auth_data.
1672	* sieve/tests/moderator.at: Fix expected output.
1673
16742020-09-13  Sergey Poznyakoff  <gray@gnu.org>
1675
1676	Fix uninitialized variable in readmsg.
1677
1678	* readmsg/readmsg.c (main): Initialize weedc.
1679
16802020-09-07  Sergey Poznyakoff  <gray@gnu.org>
1681
1682	Include libtests/mbdel.at to the dist.
1683
16842020-09-06  Sergey Poznyakoff  <gray@gnu.org>
1685
1686	Honor idle timeout settings in inetd mode.
1687
1688	* imap4d/imap4d.c (main): For inetd mode, initialize
1689	idle_timeout from the server settings.
1690	* pop3d/pop3d.c: Likewise.
1691
16922020-09-05  Sergey Poznyakoff  <gray@gnu.org>
1693
1694	Fix parsing of IMAP ranges with the lower value less than the
1695	actual message set minimum.
1696
1697	* libmailutils/msgset/parse.c (get_msgnum): Make sure the
1698	returned is in the [minval,maxval] interval.
1699
17002020-08-19  Sergey Poznyakoff  <gray@gnu.org>
1701
1702	libmailutils/tests: Use MU_CHECK for simple tests.
1703
1704	* testsuite/testsuite.inc (MU_CHECK): Remove superfluous
1705	quoting.
1706	* libmailutils/tests/modmesg.at: New file.
1707	* libmailutils/tests/streams.at: New file.
1708	* libmailutils/tests/strin.at: Minor change.
1709	* libmailutils/tests/modmesg02.at: Remove.
1710	* libmailutils/tests/streamshift.at: Remove.
1711	* libmailutils/tests/strtoc.at: Remove.
1712	* libmailutils/tests/t0-stream.at: Remove.
1713	* libmailutils/tests/t1-stream.at: Remove.
1714	* libmailutils/tests/getdelim.at: Remove.
1715	* libmailutils/tests/modmesg00.at: Remove.
1716	* libmailutils/tests/modmesg01.at: Remove.
1717	* libmailutils/tests/modmesg03.at: Remove.
1718	* libmailutils/tests/testsuite.at: Update.
1719	* libmailutils/tests/Makefile.am: Update.
1720
17212020-08-18  Sergey Poznyakoff  <gray@gnu.org>
1722
1723	libmailutils/tests tools: use mu_cli_simple for option
1724	handling.
1725
17262020-08-17  Sergey Poznyakoff  <gray@gnu.org>
1727
1728	Bugfix (complements fd9a86d37b)
1729
1730	* mda/lib/mailquota.c (sql_retrieve_quota): Fix a leftover use
1731	of get_size.
1732
17332020-08-14  Sergey Poznyakoff  <gray@gnu.org>
1734
1735	Version 3.10.
1736
1737	* NEWS: Update.
1738	* configure.ac: Raise version number and VI_CURRENT.
1739
17402020-08-14  Sergey Poznyakoff  <gray@gnu.org>
1741
1742	Reorganize testsuite.
1743
1744	The testsuite directory contains only data and programs that
1745	are used by other tests in the mailutils hierarchy. As such, it
1746	is moved to the top of the SUBDIRS list, so that the utilities
1747	on which another tests depend are tested first.
1748
1749	The tests that depend on both libmailutils and libraries from
1750	libproto are moved to a separate directory libtests. These
1751	tests are run after tests in testsuite, libmailutils and
1752	libproto.
1753
1754	* Makefile.am (SUBDIR): Move the testsuite directory before
1755	libmailutils.
1756	* configure.ac (libtests): New test directory.
1757	* libtests/.gitignore: New file.
1758	* libtests/Makefile.am: New file.
1759	* libtests/atlocal.in: New file.
1760	* testsuite/fldel.at: Move to libtests/
1761	* testsuite/fldel.c: Likewise.
1762	* testsuite/lstuid.c: Likewise.
1763	* testsuite/lstuid00.at: Likewise.
1764	* testsuite/lstuid01.at: Likewise.
1765	* testsuite/lstuid02.at: Likewise.
1766	* testsuite/mbdel.at: Likewise.
1767	* testsuite/mbdel.c: Likewise.
1768	* testsuite/mime.at: Likewise.
1769	* testsuite/mime01.at: Likewise.
1770	* testsuite/mimetest.c: Likewise.
1771	* libtests/testsuite.at: New file.
1772	* testsuite/Makefile.am: Remove all files that depend on
1773	mailutils components.
1774	* testsuite/testsuite.at: Likewise.
1775	* testsuite/bs.c: Remove.
1776	* testsuite/msgset.c: Remove.
1777
17782020-08-14  Sergey Poznyakoff  <gray@gnu.org>
1779
1780	Fix race condition in mockmta.
1781
1782	* testsuite/mockmta.c (mta_open): Call to listen before
1783	printing the port number. This ensures that the client will
1784	find port listening to its requests.
1785
17862020-08-14  Sergey Poznyakoff  <gray@gnu.org>
1787
1788	Bugfixes.
1789
1790	* libmailutils/stream/mapfile_stream.c (_mapfile_open): For
1791	MU_STREAM_WRITE set open flags to O_RDWR. This is required for
1792	the remapping code to work. Without it mmap with MAP_SHARED
1793	falls with EACCESS.
1794	* libmailutils/stream/stream.c (mu_stream_close): Improve error
1795	checking.
1796
17972020-08-11  Sergey Poznyakoff  <gray@gnu.org>
1798
1799	decodemail: use append mode to reduce memory requirements.
1800
1801	* decodemail/decodemail.c (main): Open output mailbox in append
1802	mode. If truncate is requested, open it rw for truncating, then
1803	close and reopen for appending. This speeds up operation
1804	considerably.
1805	* libproto/mbox/mbox.c (mbox_open): Change rules for selecting
1806	mmap vs file open.
1807	(mbox_close): Destroy the stream.
1808	(append_message_to_stream): Minor fix.
1809	(mbox_append_message): Unlock the stream on failure as well as
1810	on success.
1811
18122020-08-11  Sergey Poznyakoff  <gray@gnu.org>
1813
1814	Allow the caller to unref messages obtained from the mailbox.
1815
1816	* include/mailutils/sys/message.h (struct _mu_message): New
1817	member: _detach.
1818	* libmailutils/mailbox/msgref.c (_mu_message_free): Detach
1819	message from the owning object.
1820	* libmailutils/base/amd.c (_amd_attach_message): Provide the
1821	_detach method.
1822	* libproto/dotmail/message.c (mu_dotmail_message_get):
1823	Initialize the _detach member.
1824	* libproto/imap/mbox.c (_imap_mbx_get_message): Likewise.
1825	* libproto/mbox/mbox.c (new_message): Likewise.
1826	* libproto/pop/mbox.c (pop_create_message): Likewise.
1827	* libmailutils/stream/temp_stream.c (temp_stream_write):
1828	Tempfile stream is created fully buffered. Free the buffer
1829	before reinitializing.
1830	* lib/mdecode.c (message_body_stream): Change error message for
1831	MU_ERR_NOENT.
1832	* decodemail/decodemail.c (main): Unref the original message to
1833	decrease memory usage.
1834
18352020-08-10  Sergey Poznyakoff  <gray@gnu.org>
1836
1837	Use mu_temp_stream_create instead of mu_temp_file_stream_create
1838	everywhere.
1839
18402020-08-10  Sergey Poznyakoff  <gray@gnu.org>
1841
1842	Fix compilation without TLS.
1843
1844	* testsuite/mockmta.c: Fix preprocessor conditionals regarding
1845	TLS.
1846
18472020-08-09  Sergey Poznyakoff  <gray@gnu.org>
1848
1849	Implement temporary streams.
1850
1851	A temporary stream functions as a memory stream until its size
1852	reaches a preconfigured threshold value. Once it is reached,
1853	the stream storage is automatically converted to a temporary
1854	file, and all data written so far are transferred to the new
1855	storage. If the temporary file cannot be created, the stream
1856	continues to operate in memory-based mode.
1857
1858	This stream type is intended to decrease the number of used
1859	file descriptors.
1860
1861	* include/mailutils/sys/Makefile.am: Add temp_stream.h
1862	* include/mailutils/sys/temp_stream.h: New file.
1863	* include/mailutils/stream.h (mu_temp_file_threshold_size): New
1864	extern.
1865	(mu_temp_stream_create): New proto.
1866	* libmailutils/stream/Makefile.am: Add temp_stream.c.
1867	* libmailutils/stream/temp_stream.c: New file.
1868	* libmailutils/string/Makefile.am: Add strtosize.c
1869	* libmailutils/tests/.gitignore: Update.
1870	* libmailutils/tests/Makefile.am
1871	* libmailutils/tests/strtoc.c: Add tests for mu_c_hsize.
1872	* libmailutils/tests/temp_stream.c: New test program.
1873	* libmailutils/tests/testsuite.at: Test the temp_stream
1874	functionality.
1875	* testsuite/testsuite.inc (MU_CHECK): New macro.
1876	* libmailutils/mailbox/body.c (body_get_transport): Use
1877	mu_temp_stream_create.
1878
18792020-08-08  Sergey Poznyakoff  <gray@gnu.org>
1880
1881	New function: mu_strtosize.
1882
1883	* include/mailutils/cstr.h (mu_strtosize): New proto.
1884	* libmailutils/string/strtosize.c: New file.
1885	* libmailutils/string/Makefile.am: Add strtosize.c
1886	* libmailutils/string/str_to_c.c: Implement conversions for
1887	mu_c_hsize.
1888	* include/mailutils/util.h (mu_c_hsize): New mu_c_type,
1889	* libmailutils/tests/strtoc.c: Add tests for mu_c_hsize.
1890	* libmu_auth/ldap.c: Use mu_strtosize to parse quota.
1891	* mda/lib/mailquota.c: Likewise.
1892
18932020-08-08  Sergey Poznyakoff  <gray@gnu.org>
1894
1895	Bugfix in MIME parser.
1896
1897	* libmailutils/mime/mime.c: Rewrite boundary matcher as a
1898	separate function.
1899
19002020-08-08  Sergey Poznyakoff  <gray@gnu.org>
1901
1902	Fix referencing uninitialized value.
1903
1904	* decodemail/decodemail.c (message_decode_mime): Don't
1905	dereference newmsg prior to creating it.
1906
19072020-08-07  Sergey Poznyakoff  <gray@gnu.org>
1908
1909	stream API: remove the readdelim method.
1910
1911	The method is superfluous as the API itself provides the
1912	necessary functionality. Besides, it interacted poorly with
1913	positioning in buffered streams.
1914
1915	* include/mailutils/sys/stream.h (struct _mu_stream): Remove
1916	the readdelim method.
1917	* libmailutils/stream/stream.c (mu_stream_readdelim)
1918	(mu_stream_getdelim): Remove uses of the readdelim method.
1919	* libmailutils/tests/.gitignore: Update.
1920	* libmailutils/tests/Makefile.am: Add new test.
1921	* libmailutils/tests/testsuite.at: Likewise.
1922	* libmailutils/tests/getdelim.at: New test.
1923	* libmailutils/tests/stream-getdelim.c: New test program.
1924	* libmailutils/base/amd.c: Remove readdelim implementation.
1925	* libmailutils/mailbox/msgstream.c: Likewise.
1926	* libmailutils/stream/iostream.c: Likewise.
1927	* libmailutils/stream/streamref.c: Likewise.
1928	* libmailutils/stream/xscript-stream.c: Likewise.
1929	* libproto/pop/pop3_stream.c: Likewise.
1930	* mail/decode.c (mime_descend): Handle errors from
1931	mu_message_unencapsulate graciously. On failure, treat
1932	message/rfc822 as text/plain.
1933
19342020-08-07  Sergey Poznyakoff  <gray@gnu.org>
1935
1936	decodemail: if run out of fds report the number of fds needed.
1937
1938	* decodemail/decodemail.c: Special handling for EMFILE.
1939
19402020-08-07  Sergey Poznyakoff  <gray@gnu.org>
1941
1942	Bugfixes.
1943
1944	* libmailutils/stream/temp_file_stream.c
1945	(mu_temp_file_stream_create): Fix return value.
1946	* decodemail/decodemail.c (message_decode): Split to two
1947	subfunctions to improve error recovery.
1948	* include/mailutils/sys/body.h: Fix typo.
1949
19502020-08-06  Sergey Poznyakoff  <gray@gnu.org>
1951
1952	decodemail: make sure each message has the final newline on its
1953	own.
1954
1955	* include/mailutils/stream.h (mu_stream_copy_wcb)
1956	(mu_stream_copy_nl): New protos.
1957	* libmailutils/stream/streamcpy.c (mu_stream_copy_wcb)
1958	(mu_stream_copy_nl): New functions.
1959	* libproto/mbox/mbox.c (append_message_to_stream): Use
1960	mu_stream_copy_nl.
1961	* decodemail/decodemail.c (hdr_print, body_print): Remove.
1962	(message_store_stdout): Use message stream instead of piping
1963	header and body separately. Use mu_stream_copy_nl to ensure the
1964	message has a final newline.
1965
19662020-08-06  Sergey Poznyakoff  <gray@gnu.org>
1967
1968	Fix in scm testsuite.
1969
1970	* libmu_scm/tests/message-get-envelope-date.at: Expected time
1971	zone is UTC (compensates for the change introduced in
1972	50d7ea1d1b).
1973
19742020-08-05  Sergey Poznyakoff  <gray@gnu.org>
1975
1976	logstream: introduce optional prefix.
1977
1978	The prefix, if set, is output at the beginning of each line,
1979	after the location and before the severity. It can be used to
1980	provide additional information about the diagnostics, such as,
1981	e.g. the number or UID of the message.
1982
1983	The decodemail utility makes use of the new feature.
1984
1985	* include/mailutils/log.h (MU_LOGMODE_PREFIX): New define.
1986	* include/mailutils/stream.h
1987	(MU_IOCTL_LOGSTREAM_SET_LOCUS_RANGE)
1988	(MU_IOCTL_LOGSTREAM_SET_PREFIX): New defines.
1989	* include/mailutils/sys/logstream.h (_mu_log_stream): New
1990	member: prefix.
1991	* libmailutils/stream/logstream.c (_log_write): Output the
1992	prefix.
1993	(_log_done): Dereference the prefix.
1994	(_log_ctl): Handle MU_IOCTL_LOGSTREAM_SET_LOCUS_RANGE and
1995	MU_IOCTL_LOGSTREAM_SET_PREFIX.
1996	* libmailutils/tests/logstr.c: New test: prefix.
1997	* libmailutils/tests/logstr.at: Test log prefix functionality.
1998	* decodemail/decodemail.c: Remove crd_error. Use logstream
1999	prefix to display message part locations.
2000
20012020-08-05  Sergey Poznyakoff  <gray@gnu.org>
2002
2003	Add two manpages.
2004
20052020-08-05  Sergey Poznyakoff  <gray@gnu.org>
2006
2007	Assorted fixes.
2008
2009	* libmailutils/mailbox/body.c (mu_body_size): Don't unref the
2010	transport stream. This fixes a bug introduced in 45d54031f4.
2011	* decodemail/decodemail.c (message_decode): Additional
2012	error-checking.
2013	* libmailutils/cfg/parser.y (split_cfg_path): Free the
2014	mu_wordsplit object on error.
2015	* libmu_sieve/extensions/spamd.c (spamd_read_line): Fix the
2016	argument to free.
2017	* doc/texinfo/programs/decodemail.texi: Remove a techically
2018	incorrect passage.
2019	* examples/sa.c: Initialize the urlstr variable.
2020	* libmailutils/base/amd.c (amd_msg_lookup): Store the value in
2021	*pret only if returning success.
2022	(amd_body_stream_seek): Check the return value from
2023	amd_body_size.
2024	* libmailutils/base/permstr.c (mu_readlink): Fix the
2025	uninitialized variable.
2026	* libmailutils/base/symlink.c (mu_readlink) Store the value in
2027	*plen only on success.
2028
20292020-08-03  Sergey Poznyakoff  <gray@gnu.org>
2030
2031	Housekeeping.
2032
20332020-08-02  Sergey Poznyakoff  <gray@gnu.org>
2034
2035	Provide fallback methods for restoring the envelope date.
2036
2037	* libmailutils/mailbox/msgenv.c (message_envelope_date): Try
2038	Received, X-Envelope-Date, and Date headers, in that order.
2039	* libmailutils/datetime/scantime.c (mu_scan_datetime): Timezone
2040	defaults to UTC.
2041
20422020-08-01  Sergey Poznyakoff  <gray@gnu.org>
2043
2044	New function to reconstruct message envelope from the headers.
2045
2046	* include/mailutils/sys/message_stream.h (_mu_message_stream):
2047	Reorganize structure.
2048	* libmailutils/base/amd.c: Use mu_message_reconstruct_envelope
2049	instead of the amd-specific envelope functions.
2050	* libmailutils/stream/message_stream.c: Likewise.
2051	* libmailutils/tests/readmesg.at: New test case.
2052	* libmailutils/tests/readmesg.c: New test program.
2053	* libmailutils/tests/Makefile.am: Add new tests.
2054	* libmailutils/tests/testsuite.at: Likewise.
2055	* mh/tests/mhl.at: Update expected output.
2056	* mh/tests/mhn.at: Likewise.
2057	* testsuite/mh/mbox1/: Fix timestamps in X-Envelope-Date
2058	* testsuite/mh/teaparty/: Likewise.
2059
20602020-08-01  Sergey Poznyakoff  <gray@gnu.org>
2061
2062	New function for reconstructing the message envelope from its
2063	headers.
2064
2065	* libmailutils/address/parse822.c (mu_parse822_route_addr):
2066	Accept <local-part-only> if the default domain is set.
2067	* include/mailutils/message.h
2068	(mu_message_reconstruct_envelope): New prototype.
2069	* libmailutils/mailbox/msgenv.c (message_envelope_sender): Try
2070	each candidate header in turn until a valid email is extracted
2071	or run out of headers. In the latter case, use the current user
2072	login name as the email.
2073	(mu_message_reconstruct_envelope): New function.
2074	* libmailutils/tests/Makefile.am: Add new test.
2075	* libmailutils/tests/testsuite.at: Likewise.
2076	* libmailutils/tests/recenv.c: Test program for the
2077	mu_message_reconstruct_envelope function
2078	* libmailutils/tests/recenv.at: New test.
2079
20802020-08-01  Sergey Poznyakoff  <gray@gnu.org>
2081
2082	MIME-related fices in decodemail.
2083
2084	* decodemail/decodemail.c (message_decode): Initialize ismime
2085	to 0.
2086	* libmailutils/mime/mimehdr.c (parse_param): Silently ignore
2087	duplicated parameters.
2088
20892020-07-31  Sergey Poznyakoff  <gray@gnu.org>
2090
2091	decodemail: Fix storing the envelope.
2092
2093	Copying the envelope was broken in f111a7ad. This fixes it and
2094	improves the diagnostics in message_store_mbox.
2095
2096	* decodemail/decodemail.c (message_store_mbox)
2097	(message_store_stdout): Take mu_coord_t as 3rd argument.
2098	Improve diagnostics.
2099	(message_store_mbox): Don't exit on address family errors.
2100	(message_decode): Decrement dim.
2101
21022020-07-30  Sergey Poznyakoff  <gray@gnu.org>
2103
2104	Bugfixes.
2105
2106	* libmailutils/base/ctparse.c (content_type_parse): Initialize
2107	rc.
2108	* decodemail/decodemail.c (message_decode): Use the
2109	MU_CONTENT_TYPE_PARAM flag.
2110	* lib/mdecode.c: Likewise.
2111
21122020-07-29  Sergey Poznyakoff  <gray@gnu.org>
2113
2114	Bugfix.
2115
2116	* mda/lib/script.c: Restore the message-id-header configuration
2117	statement.
2118
21192020-07-29  Sergey Poznyakoff  <gray@gnu.org>
2120
2121	Relax syntax rules for parsing Content-Type headers.
2122
2123	* decodemail/decodemail.c (qstring_format): Account for s==NULL
2124	(message_decode): Use MU_CONTENT_TYPE_RELAXED when parsing
2125	content types.
2126	* doc/texinfo/programs/decodemail.texi: Document handling of
2127	partial content types.
2128	* include/mailutils/util.h (MU_CONTENT_TYPE_STRICT)
2129	(MU_CONTENT_TYPE_RELAXED)
2130	(MU_CONTENT_TYPE_PARAM): New constants.
2131	(mu_content_type_parse_ext): New function.
2132	* lib/mdecode.c (text_mime_cmp): Implement comparison of
2133	partial content types (missing subtype).
2134	(message_body_stream): Use MU_CONTENT_TYPE_RELAXED.
2135	* libmailutils/base/ctparse.c (content_type_parse): Take
2136	additional argument (flags). Modify parsing algorithm depending
2137	on its value.
2138	(mu_content_type_parse_ext): New function.
2139	(mu_content_type_parse): Rewrite as a wrapper over
2140	mu_content_type_parse_ext.
2141	(mu_content_type_destroy): Account for subtype==NULL.
2142
21432020-07-27  Sergey Poznyakoff  <gray@gnu.org>
2144
2145	decodemail: quote personal part of an address header only if
2146	necessary.
2147
2148	* decodemail/decodemail.c (is_address_header): Add "From:".
2149	(qstring_format): Format as a quoted string only if really
2150	necessary.
2151	(message_decode): Fix improper use of address_decode.
2152
21532020-07-27  Sergey Poznyakoff  <gray@gnu.org>
2154
2155	Bugfix.
2156
2157	* imap4d/namespace.c (prefix_translate_name): The name "INBOX"
2158	is special only without prefix.
2159
21602020-07-25  Sergey Poznyakoff  <gray@gnu.org>
2161
2162	decodemail: double-quote decoded personal parts of email
2163	addresses.
2164
2165	* decodemail/decodemail.c: Take care to double-quote decoded
2166	personal parts of email addresses.
2167	* libmailutils/address/parse822.c (mu_parse822_quoted_string):
2168	Don't skip 8-bit characters.
2169
21702020-07-25  Sergey Poznyakoff  <gray@gnu.org>
2171
2172	Improve error tolerance when parsing MIME structured headers.
2173
2174	* include/mailutils/assoc.h (mu_assoc_set_mark)
2175	(mu_assoc_head_set_mark, mu_assoc_tail_set_mark) (mu_assoc_pop,
2176	mu_assoc_shift)
2177	(mu_assoc_sweep_unset, mu_assoc_pull): New protos.
2178	* libmailutils/base/assoc.c: New functions (see above).
2179	* libmailutils/mime/mimehdr.c (parse_param): Mark last
2180	installed element for sweeping. When seeing a semicolon, unmark
2181	it. Return MU_ERR_PARSE on errors. On success, install the
2182	created parameter in the assoc array.
2183	(_mime_header_parse): Change type of the subset parameter.
2184	Attempt error recovery on parse errors. If it succeeds, sweep
2185	out the last installed parameter. If subset is specified, use
2186	mu_assoc_pull to populate it from the created assoc.
2187	(mu_mime_header_parse_subset)
2188	(mu_mime_param_assoc_create): Update invocations of
2189	_mime_header_parse.
2190	* libmailutils/tests/mimehdr.at: Test error tolerance.
2191	* libmailutils/tests/mimehdr.c: Use mu_cli_simple to parse
2192	command line. Treat positional arguments as names of the
2193	parameters to retain on output.
2194
21952020-07-24  Sergey Poznyakoff  <gray@gnu.org>
2196
2197	decodemail: print error location (message.part) with
2198	diagnostics.
2199
2200	* decodemail/decodemail.c (message_decode): Take three
2201	arguments: the message(part), its location as a pointer to
2202	mu_coord_t object and dimension, meaning number of slots used
2203	in the latter. Use crd_error for diagnostics.
2204	(crd_error): New function. Display error message prefixed with
2205	the location of the message part it belongs to.
2206	* libmailutils/base/coord.c (mu_coord_realloc): Update the
2207	stored dimension.
2208
22092020-07-23  Sergey Poznyakoff  <gray@gnu.org>
2210
2211	* decodemail/decodemail.c (message_decode): Don't stop on copy
2212	errors.  Instead, issue an error message and mark the part in
2213	the output message where copying failed with an explicit error
2214	statement.
2215
22162020-07-23  Sergey Poznyakoff  <gray@gnu.org>
2217
2218	Minor fixes in base64 and inline-comment filters.
2219
2220	* libmailutils/diag/errors (MU_ERR_BASE64): New error code.
2221	* libmailutils/filter/base64.c (_base64_decoder): Stop decoding
2222	and return failure if padding length gets greater than 3
2223	* libmailutils/filter/inline-comment.c (_ilcmt_decoder): Make
2224	sure proper error code is set.
2225
22262020-07-23  Sergey Poznyakoff  <gray@gnu.org>
2227
2228	decodemail: better error tolerance.
2229
2230	* decodemail/decodemail.c (message_decode): Don't bail out if
2231	unable to get the Content-Type header or copy the message
2232	envelope.
2233
22342020-07-23  Sergey Poznyakoff  <gray@gnu.org>
2235
2236	Relax sytnax requirements for MIME structured headers.
2237
2238	* libmailutils/base/ctparse.c (content_type_parse): Rewrite the
2239	value splitting on type and subtype. Allow for optional
2240	whitespace at both sides of "/". Both type and subtype can
2241	contain arbitrary characters (except for "/"). This is not
2242	right according to RFC 2045, but reportedly such cases exist in
2243	old mails.
2244	* libmailutils/mailbox/bodystruct.c (bodystructure_fill): Fix
2245	parsing of the Content-Type header. Fix storing the pointer to
2246	an automatic variable in assoc object. Unfold the
2247	Content-Disposition value.
2248	* libmailutils/mime/mimehdr.c (_mime_header_parse): Return in
2249	pvalue entire prefix part up to the first semicolon, with
2250	leading and trailing whitespace removed. Allow for both output
2251	parameters to be NULL.
2252	* libmailutils/tests/content-type.at: Add new test case.
2253	* libmailutils/tests/conttype.c: ignore empty lines in input.
2254	* libmailutils/tests/mimehdr.at: Change mimehdr16 and mimehdr17
2255	tests: this syntax is accepted by the relaxed rules of the
2256	modified parser.
2257
22582020-07-23  Sergey Poznyakoff  <gray@gnu.org>
2259
2260	Fixes in MIME structured header parser.
2261
2262	* libmailutils/mime/mimehdr.c (parse_param): Allow for
2263	whitespace surrounding =.
2264	* libmailutils/tests/mimehdr.at: More tests
2265
22662020-07-23  Sergey Poznyakoff  <gray@gnu.org>
2267
2268	Add missing file.
2269
2270	* libmailutils/tests/listsort.c: New file.
2271
22722020-07-22  Sergey Poznyakoff  <gray@gnu.org>
2273
2274	Fix list sort.
2275
2276	* include/mailutils/sys/list.h (_mu_list_null)
2277	(_mu_list_init): New functions.
2278	* libmailutils/list/sort.c (_list_qsort): Fix pivot selection
2279	and list merging.
2280	* libmailutils/tests/.gitignore: Add listsort.
2281	* libmailutils/tests/Makefile.am: Likewise.
2282	* libmailutils/tests/list.at: Check sorting large lists.
2283
22842020-07-22  Sergey Poznyakoff  <gray@gnu.org>
2285
2286	Stricter parsing of structured MIME headers.
2287
2288	The mu_content_type_parse function allowed for missing
2289	/subtype, which caused grief in case of blatantly invalid
2290	inputs.
2291
2292	* decodemail/decodemail.c (message_decode): Handle
2293	mu_content_type_parse failures racefully: return a reference to
2294	the input message. Improve diagnostics.
2295	* lib/mdecode.c (message_body_stream): Improve diagnostics.
2296	* libmailutils/base/assoc.c (merge_sort): Bugfix: accept empty
2297	input list.
2298	* libmailutils/base/ctparse.c (content_type_parse): Require
2299	that both type and subtype be present.
2300	* libmailutils/mime/mimehdr.c (_mime_header_parse): Move
2301	parameter parsing to a separate function. Do better syntax
2302	checking.
2303	* libmailutils/tests/Makefile.am: Add new tests.
2304	* libmailutils/tests/testsuite.at: Likewise.
2305	* libmailutils/tests/content-type.at: New tests.
2306	* libmailutils/tests/conttype.c: Return 1 if at least one parse
2307	fails.
2308	* libmailutils/tests/mimehdr.at: Add tests for invalid inputs.
2309	* libmailutils/tests/mimehdr.c: Better diagnostics.
2310
23112020-07-21  Sergey Poznyakoff  <gray@gnu.org>
2312
2313	decodemail: always copy the envelope.
2314
2315	* decodemail/decodemail.c (message_decode): When processing the
2316	top-level message, always copy the original envelope to it.
2317
23182020-07-20  Sergey Poznyakoff  <gray@gnu.org>
2319
2320	New simplified interface to command line option parser.
2321
2322	* include/mailutils/cli.h (MU_CLI_OPTION_): New constants.
2323	(mu_cli_simple): New proto.
2324	* libmailutils/cli/simple.c: New file.
2325	* libmailutils/cli/Makefile.am: Add new source.
2326	* libmailutils/cli/cli.c (mu_cli_ext): Take into account
2327	po_special_flags in hints. Honor MU_PARSEOPT_HELP_HOOK and
2328	MU_PARSEOPT_EXIT_ERROR set in hints.
2329	* libmailutils/opt/opt.c (parseopt_init): Fix improper use of
2330	MU_PARSEOPT_PACKAGE_URL instead of MU_PARSEOPT_DATA.
2331
23322020-07-20  Sergey Poznyakoff  <gray@gnu.org>
2333
2334	Fix memory leak in property code.
2335
2336	The property API contains a serious flaw that leads to memory
2337	leaks. The property initialization function (set by
2338	mu_property_set_init or similiar functions) is supposed to
2339	initialize the supported methods in mu_property_t, in
2340	particular _prop_done, which is responsible for releasing the
2341	resources allocated for the initdata object upon invocation of
2342	mu_property_destroy.
2343
2344	However, the initialization function gets called only upon a
2345	read/write manipulation on the property. This means that unless
2346	at least one such operation is performed the _prop_done method
2347	will not be initialized and the resources (if any) allocated
2348	for the initial data object will never be released. This is
2349	true, in particular for the MH properties and assoc properties
2350	with I/O stream.
2351
2352	Until the API is revamped, the following solution is
2353	implemented. The function mu_property_create_init calls the
2354	mu_property_init function if called with a non-NULL third
2355	argument (initdata). This ensures that it will be properly
2356	freed upon destroying the object.
2357
2358	The use of low-level functions mu_property_set_init and
2359	mu_property_set_init_data requires the caller to call
2360	mu_property_init explicitly, if needed.
2361
2362	* include/mailutils/property.h (mu_property_init): New proto.
2363	* libmailutils/property/create.c (_mu_property_init): Rename to
2364	mu_property_init.
2365	(mu_property_create_init): Call mu_property_init if initdata is
2366	not NULL.
2367	* libmailutils/property/propinv.c: Update call to
2368	mu_property_init.
2369
23702020-07-20  Sergey Poznyakoff  <gray@gnu.org>
2371
2372	Provide tests for auxiliary test utilities.
2373
2374	* configure.ac: Initialize testsuite in libproto/mbox
2375	* libproto/mbox/Makefile.am (SUBDIRS): Declare.
2376	* libproto/mbox/tests/Makefile.am: New file.
2377	* libproto/mbox/tests/atlocal.in: New file.
2378	* libproto/mbox/tests/testsuite.at: New file.
2379	* testsuite/ufms.at: Rename to libproto/mbox/tests/ufms.at
2380	* testsuite/ufms.c: Rename to libproto/mbox/tests/ufms.c
2381	* testsuite/.gitignore: Update.
2382	* testsuite/mockmail.at: New file.
2383	* testsuite/mockmail.c (main): Fix the state machine.
2384	* testsuite/mockmta.at: New file.
2385	* testsuite/mockmta.c: Fix typo in the comment.
2386	* testsuite/testsuite.at: Add new tests
2387	* testsuite/Makefile.am: Add new tests
2388
23892020-07-19  Sergey Poznyakoff  <gray@gnu.org>
2390
2391	Minor changes.
2392
2393	* testsuite/Makefile.am (cwdrepl_LDADD): Remove mailutils
2394	dependencies
2395	* testsuite/cwdrepl.c: Replace with a mu-independent version
2396	from wydawca. (http://git.gnu.org.ua/cgit/wydawca.git)
2397	* testsuite/mockmail.c: Fix indentation
2398	* mh/tests/comp.at: Remove trailing whitespace from the output.
2399	* mh/tests/forw.at: Likewise.
2400	* mh/tests/repl.at: Likewise.
2401
24022020-07-17  Sergey Poznyakoff  <gray@gnu.org>
2403
2404	New test tool: mockmail.
2405
2406	* testsuite/mockmail.c: New auxiliary tool.
2407	* testsuite/.gitignore: Add mockmail.
2408	* testsuite/Makefile.am: Build mockmail.
2409	* testsuite/mockmta.c: Change docs.
2410	* mail/testsuite/mail/send.exp: Use testsuite/mockmail to
2411	emulate Sendmail.
2412	* mda/mda/tests/forward.at: Likewise.
2413	* mh/tests/send.at: Likewise.
2414	* mh/tests/testsuite.at: Likewise.
2415	* sieve/tests/moderator.at: Likewise.
2416	* sieve/tests/redirect.at: Likewise.
2417	* sieve/tests/reject.at: Likewise.
2418	* sieve/tests/testsuite.at: Likewise.
2419	* sieve/tests/vacation.at: Likewise.
2420
24212020-07-17  Sergey Poznyakoff  <gray@gnu.org>
2422
2423	Rewrite test suite for smtp mailer.
2424
2425	* libproto/mailer/smtp.c: Fix mailer initialization (bug
2426	introduced in a0f754eb81). Initialization based on mailer URL
2427	cannot be run from _mailer_smtp_init, since at that stage URL
2428	is not yet known. Move it to smtp_open and make sure it is run
2429	only once.
2430	* am/tls.m4: Make TLS_LIBS a subst variable.
2431	* testsuite/mockmta.c: New test tool.
2432	* testsuite/.gitignore: Update.
2433	* testsuite/Makefile.am: Update.
2434	* libproto/mailer/tests/.gitignore: Update.
2435	* libproto/mailer/tests/Makefile.am: Add new tests.
2436	* libproto/mailer/tests/testsuite.at: Include new tests.
2437	* libproto/mailer/tests/seqsend.at: New test case.
2438	* libproto/mailer/tests/smtp-msg.at: New test case. Moved from
2439	testsuite/smtp-msg.at. Uses mockmta.
2440	* libproto/mailer/tests/smtp-str.at: New test case. Moved from
2441	testsuite/smtp-str.at. Uses mockmta.
2442	* libproto/mailer/tests/smtpsend.c: New program. Moved from
2443	testsuite/smtpsend.c.
2444
24452020-07-15  Sergey Poznyakoff  <gray@gnu.org>
2446
2447	Test multiple transmissions over a single SMTP mailer.
2448
2449	* configure.ac: Configure testsuite in libproto/mailer/tests.
2450	* examples/mta.c: New option -c (continuous reception).
2451	(mta_smtp): Continue accepting connections if -c is given.
2452	* libproto/mailer/Makefile.am: Add tests.
2453	* libproto/mailer/tests/.gitignore: New file.
2454	* libproto/mailer/tests/Makefile.am: New file.
2455	* libproto/mailer/tests/atlocal.in: New file.
2456	* libproto/mailer/tests/sendm.c: New file.
2457	* libproto/mailer/tests/sends.c: New file.
2458	* libproto/mailer/tests/seqsend.at: New file.
2459	* libproto/mailer/tests/testsuite.at: New file.
2460
24612020-07-15  Sergey Poznyakoff  <gray@gnu.org>
2462
2463	smtp mailer: fix multiple open/close on the same mailer.
2464
2465	This fixes the operation of the smtp(s) mailer in the following
2466	context
2467
2468	 while (cond)
2469	 {
2470	 mu_mailer_open (mailer, ...);
2471	 mu_mailer_send_message (mailer, msg, ...);
2472	 mu_mailer_close (mailer);
2473	 }
2474	* include/mailutils/mailer.h (mu_mailer_get_streamref)
2475	(mu_mailer_set_stream): Remove.
2476	* include/mailutils/sys/mailer.h (struct _mu_mailer): Remove
2477	stream.
2478	* libmailutils/mailer/mailer.c (mu_mailer_create): Don't
2479	reference stream.
2480	(mu_mailer_set_stream,mu_mailer_get_streamref): Remove.
2481	* libproto/mailer/smtp.c (struct _smtp_mailer): New members:
2482	tls and auth.
2483	(smtp_open): Open the stream and assign it.
2484	(_mailer_smtp_init): Create the struct _smtp_mailer object and
2485	save it in the mailer.
2486	(smtp_close): Close and destroy the carrier.
2487	* libproto/mailer/smtp_carrier.c (mu_smtp_set_carrier): Accept
2488	NULL as the carrier argument.
2489
24902020-07-15  Sergey Poznyakoff  <gray@gnu.org>
2491
2492	Fix memory leaks.
2493
2494	* libmailutils/sockaddr/free.c (mu_sockaddr_free): Free the
2495	address itself.
2496	* libmailutils/stream/message_stream.c
2497	(mu_message_from_stream_with_envelope): Envelope must be owned
2498	by the message. Change mu_envelope_create accordingly.
2499	(_env_msg_date, _env_msg_sender): Likewise.
2500	* libmailutils/url/destroy.c: Free url->portstr.
2501
25022020-07-15  Sergey Poznyakoff  <gray@gnu.org>
2503
2504	Update decodemail.texi.
2505
2506	Improved version from Karl Berry.
2507
25082020-07-14  Sergey Poznyakoff  <gray@gnu.org>
2509
2510	Document the decodemail tool.
2511
2512	* THANKS: Add Karl Berry
2513	* doc/texinfo/programs/decodemail.texi: New file.
2514	* doc/texinfo/Makefile.am (programs_TEXINFOS): Add new file.
2515	* doc/texinfo/mailutils.texi: Document the decodemail tool.
2516	* doc/texinfo/programs.texi: Document the mime configuration
2517	statement.
2518	* doc/texinfo/programs/readmsg.texi: Document new options.
2519
25202020-07-09  Sergey Poznyakoff  <gray@gnu.org>
2521
2522	Fix https://savannah.gnu.org/bugs/index.php?57787.
2523
25242020-07-09  Sergey Poznyakoff  <gray@gnu.org>
2525
2526	Fix memory leaks.
2527
2528	* libmailutils/diag/debug.c (mu_debug_log): Free buf.
2529	* libmailutils/mailer/progmailer.c (mu_progmailer_send): Call
2530	mu_stream_destroy (fix copy-paste error).
2531	* libmailutils/string/expvar.c (mu_str_expand): Save word[0],
2532	free the rest.
2533	* mail/mail.c (main): Free the result of mu_argcv_string.
2534	* mail/mail.h (compose_header_get): Return const ptr.
2535	* mail/mailline.c (ml_readline_internal): Free the buffer on
2536	EOF.
2537	* mail/reply.c (reply0): compose_header_get returns const
2538	char*.
2539	* mail/send.c (add_body): Don't increase stream reference count
2540	(follow-up to 45d54031).
2541	(compose_header_get): Return const char* (use
2542	mu_header_sget_value).
2543	(mail_send0): Always free buf.
2544	* mail/source.c (source_readline): Free buf on EOF.
2545	* mail/util.c (util_header_expand): Free mu_wordsplit.
2546
25472020-07-07  Sergey Poznyakoff  <gray@gnu.org>
2548
2549	Bugfixes.
2550
2551	* libmailutils/stream/stream.c (_stream_read_unbuffered):
2552	Update pnread only on success.
2553	* libmailutils/string/muctype.c: Mark underscore as
2554	MU_CTYPE_HEADR
2555
25562020-07-06  Sergey Poznyakoff  <gray@gnu.org>
2557
2558	Fix assoc operation in case-insensitive mode.
2559
2560	* libmailutils/base/assoc.c (_mu_assoc): New member: hash.
2561	(mu_assoc_create): Set proper hashing function for
2562	case-insensitive operation.
2563
25642020-07-06  Sergey Poznyakoff  <gray@gnu.org>
2565
2566	Implement mu_stream_shift function.
2567
2568	* include/mailutils/stream.h (mu_stream_shift): New proto.
2569	* libmailutils/stream/Makefile.am: Add new source.
2570	* libmailutils/stream/streamshift.c: New file.
2571	* libmailutils/tests/.gitignore: Update.
2572	* libmailutils/tests/Makefile.am: Add new tests.
2573	* libmailutils/tests/streamshift.at: New file.
2574	* libmailutils/tests/t-streamshift.c: New file.
2575	* libmailutils/tests/testsuite.at: Include new test.
2576
25772020-07-05  Sergey Poznyakoff  <gray@gnu.org>
2578
2579	Bugfix.
2580
2581	* libmailutils/imapio/getline.c (mu_imapio_getline): Don't
2582	unquote literals.
2583
25842020-06-30  Sergey Poznyakoff  <gray@gnu.org>
2585
2586	Fix static builds with libldap.
2587
25882020-06-29  Sergey Poznyakoff  <gray@gnu.org>
2589
2590	Improve default content types for message_body_stream.
2591
25922020-06-27  Sergey Poznyakoff  <gray@gnu.org>
2593
2594	sieve: quoted strings may span several lines.
2595
2596	As per RFC 5228, quoted strings may span several lines and are
2597	allowed to contain special characters. Backslash and
2598	double-quotes appearing within a quoted string must be escaped
2599	by a backslash. A backslash followed by any other character is
2600	silently removed.
2601
2602	* libmu_sieve/sieve-lex.l (line_addz, str_unescape): Remove.
2603	Allow for \n in quoted strings. Escape only " and \ with
2604	backslash. Replace unrecognized escapes with the character
2605	after \.
2606	* sieve/examples/exn-5.4.sv: envelope should not be required.
2607	* sieve/tests/compile.at: Add more tests.
2608
26092020-06-27  Sergey Poznyakoff  <gray@gnu.org>
2610
2611	Replace AM_LEXFLAGS in Makefile.ams with AM_LFLAGS.
2612
26132020-06-26  Sergey Poznyakoff  <gray@gnu.org>
2614
2615	Minor fix in configure.
2616
2617	* configure.ac (check_bdb): Add library to DBMLIBS when it is
2618	confirmed that the header and library versions match.
2619
26202020-06-26  Sergey Poznyakoff  <gray@gnu.org>
2621
2622	Use mailutils instead of mailutils-config in AM_GNU_MAILUTILS.
2623
2624	* mu-aux/mailutils.m4: Rewrite using the mailutils tool.
2625
26262020-06-26  Sergey Poznyakoff  <gray@gnu.org>
2627
2628	Restore mailutils-config (partial revert of e1e7e02cf932)
2629
2630	It was premature to remove that script, since some existing
2631	packages still rely on it.
2632
2633	* mu/mailutils-config: Restore. Put installation directory
2634	before other PATH components, not after them.
2635
26362020-06-25  Sergey Poznyakoff  <gray@gnu.org>
2637
2638	configure: make sure python-config version matches that of
2639	python.
2640
26412020-06-23  Sergey Poznyakoff  <gray@gnu.org>
2642
2643	Specify additional content-type parameters when creating
2644	multipart MIME objects.
2645
2646	Preserve original parameters (excepting boundary) when
2647	processing multipart messages by decodemail.
2648
2649	* decodemail/decodemail.c (message_decode): copy parameters
2650	from the original Content-Type.
2651	* include/mailutils/mime.h (mu_mime_create_multipart): Add
2652	third parameter: an assoc table of additional content-type
2653	parameters.
2654	(mu_mime_content_type_param): Rename to
2655	mu_mime_content_type_get_param.
2656	(mu_mime_content_type_set_param): New proto.
2657	* libmailutils/mime/mime.c: See above.
2658	(_mime_set_content_type): Preserve all parameters.
2659
26602020-06-22  Sergey Poznyakoff  <gray@gnu.org>
2661
2662	decodemain: set 7bit or 8bit transfer encoding on decoded
2663	parts.
2664
2665	* decodemail/decodemail.c (message_decode): Set 8bit or 7bit
2666	transfer encoding, depending on the character of the decoded
2667	stream.
2668	* include/mailutils/cstr.h (mu_mem_8bit_count): New proto.
2669	* include/mailutils/stream.h (MU_STREAM_STAT_IN8BIT)
2670	(MU_STREAM_STAT_OUT8BIT): New constants.
2671	* libmailutils/stream/stream.c (_stream_read,_stream_write):
2672	Set MU_STREAM_STAT_IN8BIT (MU_STREAM_STAT_OUT8BIT) if requested
2673	* libmailutils/string/strcount.c (mu_mem_8bit_count): New
2674	function.
2675
26762020-06-22  Sergey Poznyakoff  <gray@gnu.org>
2677
2678	Fix default text mime types.
2679
26802020-06-21  Sergey Poznyakoff  <gray@gnu.org>
2681
2682	Make the list of textual mime types configurable.
2683
2684	* decodemail/decodemail.c: Request the "mime" configuration
2685	capability.
2686	* lib/mdecode.c: Make the list of textual mime types
2687	configurable via the mime.text-type configuration statement.
2688	* lib/muaux.h (mu_cli_capa_mime): New extern.
2689
26902020-06-17  Sergey Poznyakoff  <gray@gnu.org>
2691
2692	Improve MIME parser and mime object creation.  Preserve
2693	original content-type in decodemail.
2694
2695	* decodemail/decodemail.c: Preserve the content subtype of each
2696	message.
2697	* include/mailutils/mime.h (MU_MIME_CONTENT_TYPE_MULTIPART)
2698	(MU_MIME_CONTENT_SUBTYPE_MIXED)
2699	(MU_MIME_CONTENT_SUBTYPE_ALTERNATIVE)
2700	(MU_MIME_CONTENT_SUBTYPE_DIGEST): New defines.
2701	(mu_mime_create_multipart): New proto.
2702	(mu_mime_sget_content_type,mu_mime_aget_content_type)
2703	(mu_mime_sget_content_subtype,mu_mime_aget_content_subtype)
2704	(mu_mime_content_type_param): New protos.
2705	* include/mailutils/sys/mime.h (content_type): Change type.
2706	(boundary): Const now. Points to a string in
2707	content_type->param.
2708	* libmailutils/base/ctparse.c (format_param): Fix quoting.
2709	Insert additonal whitespace after each semicolon.
2710	* libmailutils/mime/mime.c: Use mu_content_type_t to represent
2711	the Content-Type header.
2712	(mu_mime_create_multipart): New function.
2713	(mu_mime_create): Use mu_mime_create_multipart to create new
2714	mime object.
2715	(mu_mime_sget_content_type,mu_mime_aget_content_type)
2716	(mu_mime_sget_content_subtype,mu_mime_aget_content_subtype)
2717	(mu_mime_content_type_param): New functions.
2718
27192020-06-16  Sergey Poznyakoff  <gray@gnu.org>
2720
2721	Update NEWS.
2722
27232020-06-16  Sergey Poznyakoff  <gray@gnu.org>
2724
2725	Drop support for Python 2.x.
2726
27272020-06-16  Sergey Poznyakoff  <gray@gnu.org>
2728
2729	decodemail: don't recode charsets unless explicitly requested.
2730
2731	* decodemail/decodemail.c: New options --charset and --recode
2732	(main): Recode messages only if requested from the command
2733	line. Don't add the Content-Disposition header.
2734	* include/mailutils/util.h (mu_content_type_format): New proto.
2735	* lib/mdecode.c (charset_setup): Return immediately if charset
2736	is NULL.
2737	* libmailutils/base/ctparse.c (mu_content_type_format): New
2738	function.
2739
27402020-06-15  Sergey Poznyakoff  <gray@gnu.org>
2741
2742	Fix long-standing memory leak in body.c.
2743
2744	* include/mailutils/body.h (mu_body_ref, mu_body_unref): New
2745	functions.
2746	* include/mailutils/sys/body.h (_mu_body): New member
2747	ref_count.
2748	* libmailutils/mailbox/body.c: Keep body and body stream
2749	objects alive for as long as their reference counters are not
2750	zero. Rewrite transport stream code.
2751	* libmailutils/tests/modmesg.c: Use MU_ASSERT.
2752
27532020-06-15  Sergey Poznyakoff  <gray@gnu.org>
2754
2755	decodemail: copy original message envelope.
2756
27572020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2758
2759	Add missing files.
2760
27612020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2762
2763	Move decodemail to a separate directory and make it
2764	installable.
2765
27662020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2767
2768	Upgrade wordsplit.
2769
27702020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2771
2772	New utility: decodemail.
2773
2774	* examples/decodemail.c: New source.
2775	* examples/.gitignore: Add decodemail.
2776	* examples/Makefile.am: Build decodemail.
2777	* lib/mdecode.c: New file.
2778	* lib/Makefile.am: Add mdecode.c
2779	* lib/muaux.h (message_body_stream): New proto.
2780	* readmsg/msglist.c (message_body_stream): Move to a separate
2781	source in lib.
2782
27832020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2784
2785	Rewrite mime message parser.
2786
2787	* include/mailutils/sys/mime.h (MIME_STATE_BEGIN_LINE)
2788	(MIME_PARSER_HAVE_CR): Remove constants.
2789	(struct _mu_mime): Remove cur_buf and buf_size.
2790	* libmailutils/mime/mime.c (_mime_parse_mpart_message): Use
2791	mu_stream_getline instead of the handcrafted dual buffering
2792	scheme.
2793
27942020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2795
2796	mail: fix message list parser.
2797
2798	* mail/msgset.y: Throw range error only if message number is
2799	greater than the number of available messages.
2800
28012020-06-14  Sergey Poznyakoff  <gray@gnu.org>
2802
2803	Fix memory leaks.
2804
2805	* libmailutils/base/amd.c (amd_message_stream_close): Use
2806	mu_stream_destroy instead of mu_stream_close.
2807	* libmailutils/base/ctparse.c (content_type_parse): Free value.
2808	* libmailutils/base/tilde.c (mu_tilde_expansion): Free proto.
2809	* libmailutils/cfg/driver.c (mu_config_destroy_container): Free
2810	refcount.
2811	* libmailutils/cfg/parser.y (mu_cfg_tree_postprocess): Destroy
2812	iterator.
2813	(mu_cfg_destroy_tree): Free the tree itself.
2814	* libmailutils/datetime/scantime.c (pop_input): Free the popped
2815	element.
2816	* libmailutils/mailer/mailer.c (send_fragments): Destroy mime
2817	after converting it to message.
2818	* libmailutils/mime/mimehdr.c (_mime_header_parse): Free ws
2819	after errors.
2820
28212020-06-06  Sergey Poznyakoff  <gray@gnu.org>
2822
2823	Use mu_coord_t in mail.
2824
2825	* include/mailutils/message.h (mu_coord_part_string): New
2826	proto.
2827	* libmailutils/base/coord.c (mu_coord_part_string): New
2828	function.
2829	* mail/mail.h (message_set): Remove npart and msg_part.
2830	Introduce mu_coord_t crd instead. All uses updated.
2831
28322020-06-05  Sergey Poznyakoff  <gray@gnu.org>
2833
2834	Bugfix.
2835
2836	* libmailutils/base/coord.c (mu_coord_alloc): Return the
2837	allocated memory.
2838
28392020-06-04  Sergey Poznyakoff  <gray@gnu.org>
2840
2841	Remove placeholder (mapi) and dead (nntp) code.
2842
28432020-06-04  Sergey Poznyakoff  <gray@gnu.org>
2844
2845	Fix compilation without libunistring.
2846
2847	* lib/unistr_c.c (unistr_is_substring_dn): Add missing function
2848
28492020-06-02  Sergey Poznyakoff  <gray@gnu.org>
2850
2851	Minor fixes.
2852
28532020-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2854
2855	Bugfix.
2856
2857	* libmailutils/base/coord.c (mu_coord_string): Reverse the
2858	partially built coordinate string.
2859	* mail/msgset.y (msgset_part_str): Likewise.
2860
28612020-06-02  Sergey Poznyakoff  <gray@gnu.org>
2862
2863	Improve message part iterator and readmsg output.
2864
2865	* include/mailutils/message.h (mu_coord_t): New data type.
2866	(mu_coord_alloc, mu_coord_realloc)
2867	(mu_coord_dup, mu_coord_string): New protos.
2868	(mu_coord_length): New function.
2869	* libmailutils/base/Makefile.am: Add coord.c
2870	* libmailutils/base/coord.c: New file.
2871	* libmailutils/mime/mimeitr.c: Key returned by
2872	mu_iterator_current_kv is allocated in the struct mimeitr.
2873	Caller may not free it.
2874	(struct mimeitr): New member: coord.
2875	(getitem): Reallocate coord.
2876	(mimeitr_free): New function.
2877	(destroy): Use mimeitr_free.
2878	(itrdup): Duplicate coord
2879	(mu_message_get_iterator): Initialize coord.
2880	* libmailutils/tests/mimeitr.c: Use mu_coord_string to print
2881	the part coordinates.
2882	* readmsg/msglist.c (message_body_stream): New argument:
2883	unix_header. Install additional "FROM" encoding filter if it is
2884	set.
2885	(print_header): Special handling for "*" in the weedlist.
2886	(msgpart_str): Remove. Use mu_coord_string instead.
2887	(main): In mime decode mode, if -h (display all headers) is
2888	requested, ignore MIME headers, since after decoding they are
2889	no longer relevant.
2890
28912020-06-01  Sergey Poznyakoff  <gray@gnu.org>
2892
2893	readmsg: Implement searches in MIME messages. Decode MIME on
2894	output.
2895
2896	* configure.ac: Add UNISTRING_LIBS to MU_APP_LIBRARIES.
2897	* examples/Makefile.am: Link with $MU_APP_LIBRARIES instead of
2898	plain libmuaux.la.
2899	* mh/Makefile.am: Likewise.
2900	* imap4d/Makefile.am: Likewise.
2901	* imap4d/imap4d.h (unistr_downcase)
2902	(unistr_is_substring): Move prototypes to lib/muaux.h
2903	* imap4d/search.c (_scan_header): Use unistr_is_substring_dn
2904	instead of unistr_is_substring.
2905	* include/mailutils/message.h (mu_message_get_iterator): New
2906	prototype.
2907	* lib/Makefile.am: Add unistr_u8.c or unistr_c.c, depending on
2908	MU_COND_UNISTRING.
2909	* lib/muaux.h (unistr_downcase)
2910	(unistr_is_substring,unistr_is_substring_dn): New functions.
2911	* lib/unistr_c.c: New file (moved from /imap4d).
2912	* lib/unistr_u8.c: Likewise.
2913	* libmailutils/mime/Makefile.am: Add mimeitr.c
2914	* libmailutils/mime/mimeitr.c: New file.
2915	* libmailutils/tests/Makefile.am: Add mimeitr.c
2916	* libmailutils/tests/mimeitr.c: New file.
2917	* readmsg/msglist.c: Rewrite search in messages.
2918	* readmsg/readmsg.c: New options --glob, --regex, --ignorecase
2919	control message matching.
2920	* readmsg/readmsg.h (pattern_init,pattern_match)
2921	(pattern_free): New protos.
2922
29232020-05-29  Sergey Poznyakoff  <gray@gnu.org>
2924
2925	Fix stream buffer parameters on truncate.
2926
2927	* configure.ac: Version 3.9.90
2928	* libmailutils/stream/stream.c (mu_stream_truncate): Update
2929	stream->offset, stream->level, and stream->pos, if needed.
2930
29312020-05-29  Sergey Poznyakoff  <gray@gnu.org>
2932
2933	mail: write command operates on message parts as well as on
2934	messages.
2935
2936	Messages or message parts are decoded before being written to a
2937	disk file.
2938
2939	* include/mailutils/cstr.h (mu_mem_c_count): New proto.
2940	* include/mailutils/stream.h (MU_STREAM_STAT_INLN)
2941	(MU_STREAM_STAT_OUTLN): New constants.
2942	* libmailutils/stream/stream.c (_stream_stat_incr)
2943	(_stream_seek): Rewrite as inline functions.
2944	(_stream_read, _stream_write): Rewrite as inline functions.
2945	Optionally count number of lines read/written.
2946	* libmailutils/string/strcount.c (mu_mem_c_count): New
2947	function.
2948	* libmailutils/tests/fltst.c: Update.
2949	* mail/decode.c (format_msgset): Remove. Use msgset_str
2950	instead.
2951	(print_message_body): New function.
2952	* mail/mail.h (msgset_part_str)
2953	(util_get_message_part): New protos.
2954	(msgset_str): New function.
2955	* mail/msgset.y: Change the message part syntax. Components are
2956	separated by dots, instead of being enclosed in brackets. Old
2957	syntax is still supported for compatibility.
2958	* mail/struct.c (show_part): Use msgset_str.
2959	* mail/testsuite/mail/read.exp: Fix expected strings.
2960	* mail/util.c (util_get_message_part): New function.
2961	* mail/write.c (mail_write): Write message part if requested.
2962	Decode the body if the Content-Transfer-Encoding header is set.
2963
29642020-05-29  Sergey Poznyakoff  <gray@gnu.org>
2965
2966	libmailutils: fix error in full and line buffer mode.
2967
2968	* libmailutils/stream/stream.c (_stream_buffer_full_p): Fix
2969	conditions for buffered streams. The buffer is full if current
2970	pointer (not level) equals the size. For line buffering, any
2971	newline appearing in the written portion of the buffer causes
2972	flushing.
2973	(mu_stream_write): Fix the free space calculation.
2974	* libmailutils/tests/t0-stream.at: New file.
2975	* libmailutils/tests/t0-stream.c: New file.
2976	* libmailutils/tests/t1-stream.at: New file.
2977	* libmailutils/tests/t1-stream.c: New file.
2978	* libmailutils/tests/Makefile.am: Add new testcase.
2979	* libmailutils/tests/testsuite.at: Likewise.
2980
29812020-05-28  Sergey Poznyakoff  <gray@gnu.org>
2982
2983	Amend b8664765e1.
2984
2985	The body_end member holds the offset of the first character
2986	that follows the message body. In a well-formed mailbox, it is
2987	the newline character of a blank line that delimits the
2988	message. However, there are mailboxes that lack this blank
2989	line. In such cases body_end points to the ^F of the next
2990	envelope line.
2991
2992	When saving the mailbox, delimiting blank lines are always
2993	emitted.
2994
2995	* libproto/mbox/mbox.c (mbox_expunge_unlocked): Revert size
2996	calculation. Always emit a blank line after the message.
2997
29982020-05-27  Sergey Poznyakoff  <gray@gnu.org>
2999
3000	mail: fix INTR handling.
3001
3002	The mail's signal handler is not called when using readline 6.0
3003	or newer. As a result pressing INTR no longer works as
3004	expected. To fix this, this change prevents libreadline from
3005	setting its own signal handlers.
3006
3007	* mail/mailline.c (sig_handler): Call readline-specific signal
3008	handler.
3009	(ml_readline_init): Disable readline signal handling.
3010
30112020-04-28  Sergey Poznyakoff  <gray@gnu.org>
3012
3013	Bugfix.
3014
3015	* libmailutils/datetime/utcoff.c (mu_utc_offset): Fix a typo.
3016
30172020-04-20  Sergey Poznyakoff  <gray@gnu.org>
3018
3019	Fix uid->seqno translation.
3020
3021	* libmailutils/msgset/trans.c (_mu_msgset_translate_pair):
3022	Don't exclude end point of the range.
3023
30242020-03-31  Sergey Poznyakoff  <gray@gnu.org>
3025
3026	mbox: fix a bug in expunge routine.
3027
3028	The bug will manifest itself by removal of the trailing newline
3029	in the last message in a block of unchanged messages when
3030	expunging the mailbox after removal of one or more messages
3031	before that block.
3032
3033	Bug reported by Ken Olum.
3034
3035	* libproto/mbox/mbox.c (mbox_expunge_unlocked): Fix an
3036	off-by-one error in computation of the file chunk size.
3037
30382020-03-30  Sergey Poznyakoff  <gray@gnu.org>
3039
3040	Fix improper handling of [TRYCREATE] and similar imap
3041	responses.
3042
3043	* libproto/imap/resproc.c (parse_response_code): Fix an
3044	off-by-one index.
3045
30462020-03-27  Sergey Poznyakoff  <gray@gnu.org>
3047
3048	Minor changes.
3049
3050	* imap4d/io.c (io_setio): Unref subordinate streams.
3051	* pop3d/extra.c: Likewise.
3052
30532020-03-22  Jordi Mallach  <jordi@debian.org>
3054
3055	Call $PYTHON_CONFIG instead of pyhon-config.
3056
30572020-03-22  Sergey Poznyakoff  <gray@gnu.org>
3058
3059	imap4d: implement TLS in inetd mode.
3060
3061	This is a follow-up to commit ddfa689bff. It also fixes
3062	possible bug in daemon mode: calls to auth_gssapi_init and
3063	auth_gsasl_init should appear after eventual demonization
3064	(mu_m_server_begin), since the latter may close file
3065	descriptors opened by them.
3066
30672020-03-18  Sergey Poznyakoff  <gray@gnu.org>
3068
3069	Remove deprecated mailutils-config.  Other minor changes.
3070
3071	* libmu_sieve/extensions/Makefile.am: Remove superfluous
3072	variables.
3073	* libmu_sieve/extensions/vacation.c: Remove unneeded include.
3074	* mu/mailutils-config: Remove.
3075	* mu/Makefile.am: Likewise.
3076
30772020-03-16  Sergey Poznyakoff  <gray@gnu.org>
3078
3079	Fix a typo.
3080
30812020-03-13  Sergey Poznyakoff  <gray@gnu.org>
3082
3083	Version 3.9.
3084
30852020-03-13  Sergey Poznyakoff  <gray@gnu.org>
3086
3087	Distribute testsuite/package.m4.
3088
30892020-02-08  Sergey Poznyakoff  <gray@gnu.org>
3090
3091	Update copyright years.
3092
30932020-02-08  Sergey Poznyakoff  <gray@gnu.org>
3094
3095	Remove include/mailutils/sys/wordsplit.h.
3096
3097	The file is a symlink created by configure. It was
3098	inadvertently added by 2ad00905.
3099
31002019-12-21  Sergey Poznyakoff  <gray@gnu.org>
3101
3102	Fix build with Python 3.8
3103	(https://savannah.gnu.org/bugs/index.php?57318)
3104
3105	* configure.ac: When setting PYTHON_LIBS, use the approach
3106	suggested in
3107	https://docs.python.org/dev/whatsnew/3.8.html#debug-build-uses-
3108	the-same-abi-as-release-build.
3109
31102019-12-21  Sergey Poznyakoff  <gray@gnu.org>
3111
3112	Fix https://savannah.gnu.org/bugs/index.php?57431.
3113
3114	* libmailutils/mime/attachment.c (at_hdr): Always use base file
3115	name without directory components for both filename and name.
3116	(mu_message_create_attachment): Update accordingly.
3117	* NEWS: Update.
3118
31192019-12-15  Sergey Poznyakoff  <gray@gnu.org>
3120
3121	Update NEWS.
3122
31232019-12-15  Sergey Poznyakoff  <gray@gnu.org>
3124
3125	mail: enforce inline disposition for message body.
3126
3127	* mail/send.c (atchinfo) <disp_inline>: New member.
3128	(attlist_add): New argument: disp_inline.
3129	(saveatt): Split into two functions: saveatt and
3130	save_attachment. Make sure memory allocated for the MIME part
3131	is always freed. If disp_inline is set, enforce
3132	Content-Disposition: inline.
3133	(add_body): Set prominent identifier and request inline
3134	disposition.
3135
31362019-12-14  Sergey Poznyakoff  <gray@gnu.org>
3137
3138	Fix several linking issues.
3139
3140	* configure.ac: Require libtool version 2.4.6
3141	(MU_LINK_POSTFLAGS): Remove. Not needed with the patched
3142	version of ltmain.sh. Detect the presencecof GSSAPI. Fix
3143	displaying the status of GSSAPI support. Remove the hack
3144	introduced on 2010-02-19 (commit 35ac66f056).
3145	(MU_AUTHLIBS,SQLLIB)
3146	(SQL_LOADABLE_MODULES,SQL_LIBOBJS): Insert spaces only when
3147	needed.
3148	* mu-aux/ltmain.sh: ltmain.sh from libtool 2.4.6 with fixes
3149	from http://gray.gnu.org.ua/public/ltbug installed.
3150	* bootstrap.conf (bootstrap_epilogue): Install the fixed
3151	ltmain.sh version.
3152	* am/gssapi.m4: Allow for "yes" and "probe" argument values.
3153
3154	Improve makefile style consistency
3155	 . Uniformly use parentheses instead of curly braces in
3156	variable
3157	 referencing;
3158	 . Prefer to use Make variables over substitution variables,
3159	for
3160	 variables prefixed with MU_;
3161	* comsat/Makefile.am
3162	* dotlock/Makefile.am
3163	* examples/Makefile.am
3164	* examples/cpp/Makefile.am
3165	* frm/Makefile.am
3166	* imap4d/Makefile.am
3167	* imap4d/tests/Makefile.am
3168	* lib/Makefile.am
3169	* libmailutils/Makefile.am
3170	* libmailutils/address/Makefile.am
3171	* libmailutils/auth/Makefile.am
3172	* libmailutils/base/Makefile.am
3173	* libmailutils/cfg/Makefile.am
3174	* libmailutils/cidr/Makefile.am
3175	* libmailutils/cli/Makefile.am
3176	* libmailutils/datetime/Makefile.am
3177	* libmailutils/diag/Makefile.am
3178	* libmailutils/filter/Makefile.am
3179	* libmailutils/imapio/Makefile.am
3180	* libmailutils/list/Makefile.am
3181	* libmailutils/locus/Makefile.am
3182	* libmailutils/mailbox/Makefile.am
3183	* libmailutils/mailcap/Makefile.am
3184	* libmailutils/mailer/Makefile.am
3185	* libmailutils/mime/Makefile.am
3186	* libmailutils/msgset/Makefile.am
3187	* libmailutils/opt/Makefile.am
3188	* libmailutils/property/Makefile.am
3189	* libmailutils/server/Makefile.am
3190	* libmailutils/sockaddr/Makefile.am
3191	* libmailutils/stdstream/Makefile.am
3192	* libmailutils/stream/Makefile.am
3193	* libmailutils/string/Makefile.am
3194	* libmailutils/tests/Makefile.am
3195	* libmailutils/url/Makefile.am
3196	* libmailutils/wicket/Makefile.am
3197	* libmu_auth/Makefile.am
3198	* libmu_cpp/Makefile.am
3199	* libmu_dbm/Makefile.am
3200	* libmu_scm/Makefile.am
3201	* libmu_scm/mailutils/Makefile.am
3202	* libmu_sieve/Makefile.am
3203	* libmu_sieve/extensions/Makefile.am
3204	* libproto/dotmail/Makefile.am
3205	* libproto/dotmail/tests/Makefile.am
3206	* libproto/imap/Makefile.am
3207	* libproto/imap/tests/Makefile.am
3208	* libproto/maildir/Makefile.am
3209	* libproto/mailer/Makefile.am
3210	* libproto/mbox/Makefile.am
3211	* libproto/mh/Makefile.am
3212	* libproto/nntp/Makefile.am
3213	* libproto/pop/Makefile.am
3214	* mail/Makefile.am
3215	* mapi/Makefile.am
3216	* mda/lib/Makefile.am
3217	* mda/lmtpd/Makefile.am
3218	* mda/mda/Makefile.am
3219	* mda/mda/tests/Makefile.am
3220	* mda/putmail/Makefile.am
3221	* messages/Makefile.am
3222	* mh/Makefile.am
3223	* mh/tests/Makefile.am
3224	* mimeview/Makefile.am
3225	* movemail/Makefile.am
3226	* mu/Makefile.am
3227	* mu/libexec/Makefile.am
3228	* pop3d/Makefile.am
3229	* python/2/libmu_py/Makefile.am
3230	* python/2/mailutils/Makefile.am
3231	* python/3/libmu_py/Makefile.am
3232	* python/3/mailutils/Makefile.am
3233	* readmsg/Makefile.am
3234	* sieve/Makefile.am
3235	* sql/Makefile.am
3236	* testsuite/Makefile.am
3237
32382019-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
3239
3240	Make sure LD_LIBRARY_PATH overrides the DT_RPATH tag on
3241	FreeBSD.
3242
3243	* testsuite/testsuite.inc: Set LD_LIBRARY_PATH_RPATH variable
3244	to "y" before running tests.
3245
32462019-12-14  Sergey Poznyakoff  <gray@gnu.org>
3247
3248	Build package.m4 in Makefile.
3249
3250	The decision to build package.m4 in config.status makes proper
3251	maintenance of the file problematic. It is reverted.
3252
3253	This patch also uses colon-separated VPATH for compatibility
3254	with other make implementations.
3255
3256	* configure.ac: Don't build package.m4
3257	* testsuite/Makefile.am: Do it here.
3258	* libmailutils/tests/Makefile.am: Use colon-separated VPATH for
3259	compatibility with BSD make.
3260	* testsuite/package.m4.in: Remove.
3261
32622019-11-30  Sergey Poznyakoff  <gray@gnu.org>
3263
3264	Fix the cwdrepl auxiliary tool.
3265
3266	Make sure the longest possible match is replaced.
3267
3268	* testsuite/cwdrepl.c: Sort the translist by directory length,
3269	in descending order.
3270	* mail/tests/atlocal.in: Add $testsuitedir to $PATH
3271	* mail/tests/hold.at (MAIL_TEST): Use cwdrepl instead of sed
3272	rules. Correct expected outputs accordingly.
3273
32742019-11-29  Sergey Poznyakoff  <gray@gnu.org>
3275
3276	Fix missing Makefile variables.
3277
3278	* readmsg/tests/Makefile.am: Augment TESTSUITE_AT.
3279	Inadvertently broken in b666b297.
3280
32812019-11-26  Sergey Poznyakoff  <gray@gnu.org>
3282
3283	Bugfix.
3284
3285	* comsat/action.c (run_user_action): Fill env.locus.end with
3286	0s.
3287
32882019-11-23  Sergey Poznyakoff  <gray@gnu.org>
3289
3290	Bugfix in libmailutils testsuite.
3291
3292	* libmailutils/tests/decode2047.at: Deduce charset from the
3293	input.
3294
32952019-11-23  Sergey Poznyakoff  <gray@gnu.org>
3296
3297	Restore two accidentally deleted lines.
3298
32992019-11-23  Sergey Poznyakoff  <gray@gnu.org>
3300
3301	Fix uses of uninitialized variables.
3302
3303	* libproto/mailer/smtp.c (_smtp_set_rcpt): Initialize header
3304	count to zero if no such header is provided.
3305	* mail/decode.c: Fix the util_get_hdr_value usage.
3306	* mail/mail.h (util_get_content_type)
3307	(util_get_hdr_value): Change return type.
3308	* mail/util.c (util_get_content_type): Change return to void.
3309	(util_get_hdr_value): Report error if necessary. Always
3310	initialize
3311	*value before return. Change return to void.
3312
33132019-11-17  Sergey Poznyakoff  <gray@gnu.org>
3314
3315	Bugfix.
3316
3317	* libmailutils/mailbox/msgenv.c (get_received_date): Fix
3318	possible NULL dereference.
3319
33202019-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3321
3322	Follow-up to the previous commit.
3323
33242019-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3325
3326	Get rid of the deprecated functions.
3327
3328	Below I list the removed functions along with the recipes on
3329	how to replace them.
3330
3331	. mu_body_get_stream . mu_message_get_stream .
3332	mu_mailer_get_stream . mu_header_get_stream
3333
3334	 These functions should not be used at all.
3335	 They will reappear within a couple of releases as synonyms
3336	 for the corresponding _get_streamref functions, after which
3337	 the latter will be gradually removed. Thus, at the end of
3338	 the transition perion _get_streamref's will be replaced by
3339	 _get_stream.
3340
3341	. mu_sieve_compile_buffer
3342	 Replaced by mu_sieve_compile_text.
3343	 Old code:
3344	 rc = mu_sieve_compile_buffer (mach, buf, bufsize, fname,
3345	line);
3346	 New code:
3347	 struct mu_locus_point loc = MU_LOCUS_POINT_INITIALIZER;
3348	 mu_locus_point_set_file (&loc, fname);
3349	 loc.mu_line = line;
3350	 rc = mu_sieve_compile_text (mach, buf, bufsize, &loc);
3351	 mu_locus_point_deinit (&loc);
3352
3353	. mu_address_to_string
3354	 Use mu_address_get_printable instead.
3355
3356	. mu_address_format_string
3357	 Use mu_stream_format_address instead. E.g. to print to a
3358	string:
3359	 char buf[100];
3360	 stream_t str;
3361	 mu_fixed_memory_stream_create (&str, buf, sizeof(buf),
3362	MU_STREAM_WRITE);
3363	 rc = mu_stream_format_address (str, addr);
3364
3365	. mu_registrar_get_list
3366	 Should not be used. Use mu_registrar_get_iterator if you need
3367	to
3368	 iterate over the list.
3369
3370	. mu_mailbox_save_attributes
3371	 Replaced by mu_mailbox_sync.
3372
3373	. mu_msgset_print
3374	 Use mu_stream_msgset_format.
3375	 Old code:
3376	 rc = mu_msgset_print (mu_stream_t str, mu_msgset_t mset);
3377	 New code:
3378	 rc = mu_stream_msgset_format (str, mu_msgset_fmt_imap, mset);
3379
33802019-11-10  Sergey Poznyakoff  <gray@gnu.org>
3381
3382	Create types.h when configuring.
3383
33842019-11-10  Sergey Poznyakoff  <gray@gnu.org>
3385
3386	Remove deprecated MU_IOCTL_LOGSTREAM_GET_LOCUS and
3387	MU_IOCTL_LOGSTREAM_SET_LOCUS.
3388
33892019-11-10  Sergey Poznyakoff  <gray@gnu.org>
3390
3391	Bugfixes.
3392
3393	* include/mailutils/Makefile.am: Don't distribute types.h
3394	* mda/tests/mda.sh: New file.
3395	* mda/Makefile.am: Distribute mda.sh
3396	* mda/lmtpd/tests/atlocal.in: Set MU_DEFAULT_SCHEME and source
3397	mda.sh
3398	* mda/mda/tests/atlocal.in: Likewise.
3399	* mda/putmail/tests/atlocal.in: Likewise.
3400	* mda/lmtpd/tests/lmtpd.at: Use dumpmail
3401	* mda/tests/mda.inc (MDA_OPTIONS): Remove MUT_DEFAULT_OPTIONS.
3402	(dumpmail): Remove macro.
3403	* testsuite/package.m4.in (MU_DEFAULT_SCHEME): Remove macro.
3404	* maint/fullcheck.mk (fullcheck_tmpl): Make the source dir
3405	read-only.
3406
34072019-11-09  Sergey Poznyakoff  <gray@gnu.org>
3408
3409	Reorganize testsuite.
3410
3411	Simplify Makefile.am's in tests subdirectories by moving the
3412	common part in a separate file and including it where
3413	necessary. Build only one copy of package.m4. Both package.m4
3414	and include file testsuite.am reside in the testsuite
3415	directory.
3416
3417	Also provide configure options for selecting mda components to
3418	build:
3419
3420	 --disable-build-mda do not build mda
3421	 --disable-build-lmtpd do not build lmtpd
3422	 --disable-build-putmail do not build putmail
3423	* .gitignore: Update.
3424	* Makefile.am [MU_COND_MDA]: Change to MU_COND_MDA_TOOLS
3425	* configure.ac: Provide a way to enable/disable building of
3426	mda, lmtpd and putmail separately. Build testsuite/package.m4
3427	* testsuite/testsuite.am
3428	* testsuite/Makefile.am: Distribute both package.m4.in and
3429	package.m4. Include main part from testsuite.am
3430	* testsuite/package.m4.in: New file.
3431	* comsat/tests/Makefile.am: Include main part from testsuite.am
3432	* frm/tests/Makefile.am: Likewise.
3433	* imap4d/tests/Makefile.am: Likewise.
3434	* libmailutils/tests/Makefile.am: Likewise.
3435	* libmu_scm/tests/Makefile.am: Likewise.
3436	* libproto/dotmail/tests/Makefile.am: Likewise.
3437	* mail/tests/Makefile.am: Likewise.
3438	* messages/tests/Makefile.am: Likewise.
3439	* mh/tests/Makefile.am: Likewise.
3440	* mimeview/tests/Makefile.am: Likewise.
3441	* readmsg/tests/Makefile.am: Likewise.
3442	* sieve/tests/Makefile.am: Likewise.
3443	* mda/.gitignore: Remove.
3444	* mda/tests/Makefile.am: Remove.
3445	* mda/tests/testsuite.at: Remove.
3446	* mda/tests/.gitignore: Remove.
3447	* mda/tests/atlocal.in: Remove.
3448	* mda/tests/mda.inc: New file.
3449	* mda/Makefile.am: Add extra directory level. Add subdirs
3450	depending on whether the corresponding component is selected
3451	for building.
3452	* mda/lmtpd/.gitignore: New file.
3453	* mda/lmtpd/Makefile.am: New file.
3454	* mda/lmtpd.c: Move to mda/lmtpd/lmtpd.c
3455	* mda/lmtpd/tests/.gitignore: New file.
3456	* mda/lmtpd/tests/Makefile.am: New file.
3457	* mda/lmtpd/tests/atlocal.in: New file.
3458	* mda/tests/lmtpd.at: Move to mda/lmtpd/tests/lmtpd.at
3459	* mda/lmtpd/tests/testsuite.at: New file.
3460	* mda/mda/.gitignore: New file.
3461	* mda/mda/Makefile.am: New file.
3462	* mda/mda.c: Move to mda/mda/mda.c
3463	* mda/mda/tests/.gitignore: New file.
3464	* mda/mda/tests/Makefile.am: New file.
3465	* mda/mda/tests/atlocal.in: New file.
3466	* mda/tests/forward.at: Move to mda/mda/tests/forward.at
3467	* mda/tests/mda.at: Move to mda/mda/tests/mda.at
3468	* mda/mda/tests/testsuite.at: New file.
3469	* mda/putmail/.gitignore: New file.
3470	* mda/putmail/Makefile.am: New file.
3471	* mda/putmail.c: Move to mda/putmail/putmail.c
3472	* mda/putmail/tests/.gitignore: New file.
3473	* mda/putmail/tests/Makefile.am: New file.
3474	* mda/putmail/tests/atlocal.in: New file.
3475	* mda/tests/putmail.at: Move to mda/putmail/tests/putmail.at
3476	* mda/putmail/tests/testsuite.at: New file
3477	* po/POTFILES.in: Update pathnames
3478	* maint/fullcheck.mk: Minor fixes.
3479
34802019-11-09  Sergey Poznyakoff  <gray@gnu.org>
3481
3482	New maintainer makefile for running tests for all default
3483	mailbox formats.
3484
3485	* maint/fullcheck.mk: New file. Runs make check for all
3486	possible default mailbox formats.
3487	* GNUmakefile: Include new file.
3488	* NEWS: Update.
3489	* configure.ac: Version 3.8.90
3490
34912019-11-09  Sergey Poznyakoff  <gray@gnu.org>
3492
3493	Fix mda testsuite.
3494
3495	The testsuite should work no matter what the selected default
3496	mailbox format.
3497
3498	* mda/tests/atlocal.in (dumpmail): New function.
3499	* mda/tests/forward.at: Use dumpmail to read the mailbox.
3500	* mda/tests/mda.at: Likewise.
3501
35022019-11-09  Sergey Poznyakoff  <gray@gnu.org>
3503
3504	Fix SUBDIRS ordering in Makefile.am's.
3505
3506	* imap4d/Makefile.am: Build in source dir before tests.
3507	* mimeview/Makefile.am: Likewise.
3508	* pop3d/Makefile.am: Likewise.
3509	* mail/Makefile.am: Likewise.
3510
35112019-11-09  Sergey Poznyakoff  <gray@gnu.org>
3512
3513	dotmail: fix opening in append-only mode.
3514
3515	* libproto/dotmail/dotmail.c (dotmail_rescan_unlocked)
3516	(dotmail_rescan): Skip if mailbox is not opened for reading.
3517
35182019-11-07  Sergey Poznyakoff  <gray@gnu.org>
3519
3520	Fix typos in help strings.
3521
3522	* imap4d/imap4d.c: Fix typo in help string for tls-mode.
3523	* pop3d/pop3d.c: Likewise.
3524
35252019-11-06  Sergey Poznyakoff  <gray@gnu.org>
3526
3527	Version 3.8.
3528
3529	* configure.ac: Version 3.8
3530	* NEWS: Document changes.
3531	* THANKS: Update.
3532
35332019-10-16  Sergey Poznyakoff  <gray@gnu.org>
3534
3535	Restore MDA debug flags.
3536
35372019-10-14  Sergey Poznyakoff  <gray@gnu.org>
3538
3539	Restore mda tests.
3540
3541	* mda/mda.c: Instrument for compilation for the testsuite.
3542	* mda/tests/.gitignore: Add testmda
3543	* mda/tests/Makefile.am: Build testmda. Add new tests.
3544	* mda/tests/forward.at: New test.
3545	* mda/tests/mda.at: New test.
3546	* mda/tests/testsuite.at: Include new tests.
3547
35482019-10-13  Sergey Poznyakoff  <gray@gnu.org>
3549
3550	Minor fixes.
3551
35522019-10-13  Sergey Poznyakoff  <gray@gnu.org>
3553
3554	Fix distcheck.
3555
35562019-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3557
3558	Split maidag into three single-purpose tools.
3559
3560	Maidag operated in three modes: mda, url and lmtp. In mda mode
3561	it is normally started by sendmail with non-root privileges. In
3562	order to be able to write to other users' mailboxes, the binary
3563	must be setuid, which creates certain security threats. As
3564	these appear to be impossible to avoid in a single
3565	multi-purpose program, it has been decided to replace maidag
3566	with three single-purpose tools: mda, putmail, and lmtpd. The
3567	mda tool is a local mail delivery agent. It is the only one for
3568	which the setuid bit is required, so special measures have been
3569	taken to secure it. In particular, to avoid unverified user
3570	inputs it disallows to override any configuration settings from
3571	the command line.
3572
3573	The two other tools provide the functionality of the url and
3574	lmtp mode.
3575
3576	* Makefile.am (MAIDAG_DIR): Replace with MDA_DIR
3577	* configure.ac (MU_COND_MAILBOX_QUOTA): New conditional. Use
3578	names relative to ${top_builddir} instead of ".".
3579	* maidag: Remove.
3580	* mda/.gitignore: New file.
3581	* mda/Makefile.am: New file.
3582	* mda/lib/Makefile.am: New file.
3583	* mda/lib/deliver.c: New file.
3584	* mda/lib/forward.c: New file.
3585	* mda/lib/libmda.h: New file.
3586	* mda/lib/mailquota.c: New file.
3587	* mda/lib/script.c: New file.
3588	* mda/lib/util.c: New file.
3589	* mda/lmtpd.c: New file.
3590	* mda/mda.c: New file.
3591	* mda/putmail.c: New file.
3592	* mda/tests/.gitignore: New file.
3593	* mda/tests/Makefile.am: New file.
3594	* mda/tests/atlocal.in: New file.
3595	* mda/tests/input.msg: New file.
3596	* mda/tests/lmtpd.at: New file.
3597	* mda/tests/putmail.at: New file.
3598	* mda/tests/testsuite.at: New file.
3599	* doc/texinfo/programs/maidag.texi: Remove.
3600	* doc/texinfo/programs/mda.texi: New file.
3601	* doc/texinfo/programs/lmtpd.texi: New file.
3602
36032019-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3604
3605	cli: implement a hint that disallows overriding configuration
3606	from the command line * include/mailutils/cfg.h
3607	(MU_CFHINT_NO_CONFIG_OVERRIDE): New hint. *
3608	libmailutils/cli/cli.c (init_options): Omit configuration
3609	override options if MU_CFHINT_NO_CONFIG_OVERRIDE is set.
3610
36112019-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3612
3613	Fix typo.
3614
36152019-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3616
3617	mail: revamp message type specification handling.
3618
3619	* mail/mail.h (msgtype_generator): New proto.
3620	* mail/mailline.c (msgtype_generator): Remove.
3621	* mail/msgset.y (TYPE rule): Use find_type_selector to find the
3622	right selector.
3623	(select_type): Remove. Replaced with separate functions for
3624	each message type (select_type_n, select_type_d, etc.)
3625	(find_type_selector): New static function.
3626	(msgtype_generator): New function.
3627
36282019-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3629
3630	mail: new message specification :s.
3631
3632	* NEWS: Update.
3633	* doc/texinfo/programs/mail.texi: Update.
3634	* mail/mailline.c (msgtype_generator): Recogize 's'
3635	* mail/msgset.y (select_type): Recognize 's'
3636
36372019-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3638
3639	Document how to set body content-type and encoding in multipart
3640	messages.
3641
3642	This closes https://savannah.gnu.org/support/?109866
3643
36442019-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
3645
3646	Document yesterday's changes.
3647
36482019-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3649
3650	Fix the semantics of the hold and keepsave variables in mail.
3651
3652	* mail/delete.c (mail_delete_msg): Set
3653	MAIL_ATTRIBUTE_PRESERVED. This is not necessary, stricto sensu,
3654	because mail_mbox_close skips messages marked for deletion
3655	anyway. But it's good for clarity.
3656	* mail/quit.c (mailbox_classify): New function.
3657	(mail_mbox_commit): Rewrite
3658	* mail/tests/Makefile.am: Add new test
3659	* mail/tests/testsuite.at: Include new tests.
3660	* mail/tests/atlocal.in (catmbox): New function.
3661	* mail/tests/hold.at: New test.
3662
36632019-09-05  Sergey Poznyakoff  <gray@gnu.org.ua>
3664
3665	Fix guimb help message.
3666
3667	* scheme/guimb.scmi: Format the usage and description lines
3668	consistently with other mailutils programs.
3669
36702019-09-03  Sergey Poznyakoff  <gray@gnu.org>
3671
3672	comsatd: optional argument to the --test option supplies the
3673	name of the tty to use.
3674
3675	* NEWS: Document changes.
3676	* comsat/action.c (open_default_tty): Remove.
3677	(open_tty): Examine the tty device (or file) and construct a
3678	suitable filter chain. Use append mode when opening it.
3679	* comsat/comsat.c: The --test option takes optional argument.
3680	* comsat/tests/testsuite.at: Use local file instead of the tty.
3681	* doc/texinfo/programs/comsatd.texi: Document changes.
3682
36832019-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3684
3685	pop3d: implement TLS in inetd mode.
3686
3687	New global configuration statement "tls-mode" configures the
3688	TLS for use in inetd mode.
3689
3690	The certificate and key files are configured by the global
3691	"tls" compound statement.
3692
3693	Example configuration (pop3s server):
3694
3695	 mode inetd;
3696	 tls-mode connection;
3697	 tls {
3698	 ssl-key-file /etc/ssl/key.pem;
3699	 ssl-certificate-file /etc/ssl/cert.pem;
3700	 }
3701
3702	In daemon mode, global "tls-mode" sets the type of TLS
3703	encryption to use in all server blocks that lack the "tls-mode"
3704	statement.
3705	* pop3d/cmd.c (global_tls_mode)
3706	(global_conf_status): New globals.
3707	(stls_server_check): New function.
3708	(stls_preflight): Use stls_server_check.
3709	* pop3d/pop3d.c (pop3d_cfg_param): New global statement:
3710	tls-mode
3711	(main): Set up TLS connection in inetd mode, if requested.
3712	* pop3d/pop3d.h (global_tls_mode): New global.
3713	(stls_server_check): New proto.
3714	* NEWS: Document changes.
3715	* doc/texinfo/programs/pop3d.texi: Likewise.
3716
37172019-07-23  Sergey Poznyakoff  <gray@gnu.org>
3718
3719	Fix mandatory locking.
3720
3721	* lib/manlock.c (mailbox_open_and_lock): Force proper locker if
3722	a null locker is associated with the mailbox.
3723
37242019-07-23  Sergey Poznyakoff  <gray@gnu.org>
3725
3726	Minor fix.
3727
3728	Check return from mu_message_get_num_parts
3729
37302019-07-13  Sergey Poznyakoff  <gray@gnu.org>
3731
3732	Fixes in the mail testsute.
3733
3734	* mail/tests/copy00.at: Fix description. Skip test if
3735	/dev/stdout cannot be locked.
3736	* mail/tests/copy03.at: Rename MBOX to avoid name clashes on
3737	case-insensitive file systems.
3738
37392019-07-11  Sergey Poznyakoff  <gray@gnu.org>
3740
3741	Bugfix.
3742
3743	* include/mailutils/sys/dotmail.h: Remove stray variable
3744	declaration.
3745
37462019-07-11  Sergey Poznyakoff  <gray@gnu.org>
3747
3748	Pull wordsplit from submodule.
3749
3750	* .gitmodules: Add wordsplit.
3751	* configure.ac: Version 3.7.90
3752	* NEWS: Raise version number.
3753	* include/mailutils/sys/Makefile.am: Include wordsplit.h from
3754	the submodule.
3755	* include/mailutils/sys/wordsplit.h: New file.
3756	* include/mailutils/wordsplit.h: Rewrite as a wrapper over
3757	mailutils/sys/wordsplit.h
3758	* libmailutils/Makefile.am: Distribute files from wordsplit.
3759	* libmailutils/string/Makefile.am: Add libmailutils/wordsplit
3760	to the include path.
3761	* libmailutils/string/wordsplit.c: Replace with a wrapper over
3762	wordsplit/wordsplit.c
3763	* libmailutils/tests/.gitignore: Update.
3764	* libmailutils/tests/Makefile.am: Pull wordsplit testsuite from
3765	the submodule.
3766	* libmailutils/tests/wordsplit.at: Remove.
3767	* libmailutils/tests/wsp.c: Remove.
3768
37692019-06-22  Sergey Poznyakoff  <gray@gnu.org>
3770
3771	Use defines for internal mail variable names.
3772
37732019-06-22  Sergey Poznyakoff  <gray@gnu.org>
3774
3775	Fix typos and wording in some diagnostic messages.
3776
37772019-06-21  Sergey Poznyakoff  <gray@gnu.org>
3778
3779	Version 3.7.
3780
37812019-06-21  Sergey Poznyakoff  <gray@gnu.org>
3782
3783	Update NEWS.
3784
37852019-05-30  Sergey Poznyakoff  <gray@gnu.org>
3786
3787	Fix conditional compilation; add dotmail support to libmu_scm.
3788
3789	* configure.ac: Accept dotmail as a value for
3790	MU_DEFAULT_SCHEME. Display dotmail support status at the end of
3791	the run.
3792	* libmailutils/base/nullrec.c: Provide placeholder for disabled
3793	dotmail.
3794	* libmu_scm/mu_scm.c (format_table): Add dotmail.
3795	* libmu_scm/tests/testsuite.at: Don't assume mbox as the
3796	default. Load it explicitly.
3797
37982019-05-30  Sergey Poznyakoff  <gray@gnu.org>
3799
3800	Minor change.
3801
3802	* maint/flowgraph.mk: Pass --all to cflow.
3803
38042019-05-29  Sergey Poznyakoff  <gray@gnu.org>
3805
3806	mh: fix folder +/absolute/name.
3807
3808	* mh/folder.c (name_prefix_len): Remove global.
3809	(install_folder_info,_scan): Take additional argument: length
3810	of the name prefix to skip.
3811	(folder_scan): New function.
3812	(action_print): Don't impose name prefix unconditionally. Call
3813	folder_scan to set it up as necessary.
3814
38152019-05-22  Sergey Poznyakoff  <gray@gnu.org>
3816
3817	Fix a bug in TLS read.
3818
3819	This complements afda9ba4. Thanks to Rafael Fontenelle for
3820	helping locate the bug.
3821
3822	* libmu_auth/tlsiostr.c (_tls_io_read): Handle GNUTLS_E_AGAIN
3823	and GNUTLS_E_INTERRUPTED.
3824	* libmailutils/stream/stream.c (mu_stream_seterr): EINTR is a
3825	transient error condition.
3826	* THANKS: Update.
3827
38282019-05-22  Sergey Poznyakoff  <gray@gnu.org>
3829
3830	URL parser: use case-insensitive comparison for auth and host
3831	parts.
3832
3833	* libmailutils/url/accessor.h: (URL_PART_CMP_ICASE)
3834	(URL_PART_CMP_ICASE): New defines.
3835	* libmailutils/url/get-auth.c: Request case-insensitive
3836	comparison.
3837	* libmailutils/url/get-host.c: Likewise.
3838
38392019-05-21  Sergey Poznyakoff  <gray@gnu.org>
3840
3841	Describe maidag delivery-mode configuration variable.
3842
38432019-05-09  Sergey Poznyakoff  <gray@gnu.org>
3844
3845	Maidag: fix coredump in daemon mode.
3846
3847	* maidag/maidag.c (main): Pass pointer to the server as data
3848	parameter to mu_cli.
3849
38502019-05-03  Sergey Poznyakoff  <gray@gnu.org>
3851
3852	movemail: make sure UIDLs are properly stored.
3853
3854	* movemail/movemail.c (main): When using POP3 UIDLs for message
3855	identification, be sure to store them in the X-UIDL header.
3856
38572019-04-24  Sergey Poznyakoff  <gray@gnu.org>
3858
3859	Bugfixes.
3860
3861	* libmailutils/diag/diag.c (mu_diag_vprintf): Fix debug level
3862	formatting. It missed 's' after the escape character.
3863	* mu/libexec/ldflags.c (lib_descr): Add dotmail.
3864
38652019-03-29  Sergey Poznyakoff  <gray@gnu.org>
3866
3867	Remove explicit _DEPENDENCIES variables from Makefiles.
3868
3869	These might be needed only in rare cases during the development
3870	cycle. There is no use keeping them around.
3871
3872	* configure.ac (MU_AUTHLIBS_DEPENDENCY)
3873	(DBMLIB_DEPENDENCY,SQLLIB_DEPENDENCY): Remove.
3874	* imap4d/Makefile.am: Remove explicit _DEPENDENCIES.
3875	* pop3d/Makefile.am: Likewise.
3876	* libmu_auth/Makefile.am: Likewise.
3877	* libmu_dbm/Makefile.am: Likewise.
3878
38792019-03-27  Sergey Poznyakoff  <gray@gnu.org>
3880
3881	Use <prog>_LDADD to link in libmu_test.
3882
3883	This helps automake discover dependency on this library.
3884
38852019-03-27  Sergey Poznyakoff  <gray@gnu.org>
3886
3887	Minor fix (follow-up to 60c5545ba)
3888
38892019-03-27  Sergey Poznyakoff  <gray@gnu.org>
3890
3891	Minor fixes in dot filters.
3892
3893	The DOT decoder accepts input consisting of two characters
3894	".\n" and decodes it to empty output. When encoding empty
3895	input, ".\n" is produced
3896
3897	Similarly, CRLFDOT handles ".\r\n" the same way.
3898
3899	* libmailutils/filter/crlfdot.c (_crlfdot_encoder): Accept
3900	".\r\n" as input.
3901	* libmailutils/filter/dot.c: Accept ".\n" as input.
3902	* libmailutils/tests/crlfdot.at: Add new test.
3903	* libmailutils/tests/dot.at: Likewise.
3904
39052019-03-26  Sergey Poznyakoff  <gray@gnu.org>
3906
3907	Use mu_folder_scan in imap4d.
3908
3909	* imap4d/list.c (list_fun): Don't check if the returned record
3910	matches refinfo->pfx->record. This is done by mu_folder_scan.
3911	(list_ref): Use mu_folder_scan.
3912
39132019-03-26  Sergey Poznyakoff  <gray@gnu.org>
3914
3915	Consistently use the term 'depth' when referring to directory
3916	nesting depth.
3917
3918	* include/mailutils/folder.h (mu_list_response): Rename 'level'
3919	to 'depth'. All uses updated.
3920
39212019-03-26  Sergey Poznyakoff  <gray@gnu.org>
3922
3923	Implement selection of requested mailbox formats in scanning
3924	the local file system folders.
3925
3926	* include/mailutils/registrar.h (mu_record_match): New struct.
3927	(mu_registrar_match_records): New proto.
3928	* libmailutils/base/registrar.c (mu_registrar_match_records):
3929	New function.
3930	* libmailutils/mailbox/fsfolder.c (list_helper): Actually
3931	select the matching record from scn->records (if supplied).
3932	* libmailutils/tests/Makefile.am: Add new tests.
3933	* libmailutils/tests/fsfolder.c: Minor changes.
3934	* libmailutils/tests/testsuite.at: Add new tests.
3935	* libmailutils/tests/fsfolder03.at: New file.
3936	* libmailutils/tests/fsfolder04.at: New file.
3937
39382019-03-25  Sergey Poznyakoff  <gray@gnu.org>
3939
3940	Bugfixes in fsfolder.
3941
3942	* libmailutils/mailbox/fsfolder.c (list_helper): Fix depth cut
3943	off. Fix the lookup in scn->records.
3944	* libmailutils/tests/fsfolder.c: Implement two test records.
3945	New command: "scan".
3946
39472019-03-25  Sergey Poznyakoff  <gray@gnu.org>
3948
3949	Implement test shell framework.
3950
3951	* libmailutils/tests/tesh.c: New file.
3952	* libmailutils/tests/tesh.h: New file.
3953	* libmailutils/tests/Makefile.am: Add new files.
3954	* libmailutils/tests/fsfolder.c: Rewrite using test shell
3955	framework.
3956	* libmailutils/tests/fsfolder00.at: Use semicolons to delimit
3957	commands.
3958	* libmailutils/tests/fsfolder01.at: Likewise.
3959	* libmailutils/tests/linetrack.c: Rewrite using test shell
3960	framework.
3961	* libmailutils/tests/linetrack.at: Change command initial
3962	character to dot.
3963	* libmailutils/tests/listop.c: Rewrite using test shell
3964	framework.
3965	* libmailutils/tests/list.at: Minor changes.
3966	* libproto/dotmail/tests/dm_mesg.c: Rewrite using test shell
3967	framework.
3968	* libproto/dotmail/tests/Makefile.am: Link dm_mesg with
3969	libmu_tesh
3970	* libproto/dotmail/dotmail.c: Fix typo.
3971
39722019-03-23  Sergey Poznyakoff  <gray@gnu.org>
3973
3974	Two new string functions.
3975
3976	mu_string_prefix(A, B) returns true if B is the prefix of A.
3977	mu_string_suffix(A, B) returns true if B is the suffix of A.
3978
3979	* include/mailutils/cstr.h (mu_string_prefix)
3980	(mu_string_suffix): protos.
3981	* libmailutils/string/Makefile.am: Add new files.
3982	* libmailutils/string/strpref.c: New file.
3983	* libmailutils/string/strsuf.c: New file.
3984
39852019-03-23  Sergey Poznyakoff  <gray@gnu.org>
3986
3987	Rewrite folder listing interface.
3988
3989	New function mu_folder_scan provides an improved scanning
3990	interface. In particular, it allows the user to abridge the
3991	scan to mailboxes of certain type (or types).
3992
3993	Existing listing API functions are rewritten as alternative
3994	entry points to mu_folder_scan.
3995
3996	* include/mailutils/folder.h (mu_folder_scanner): New struct.
3997	(mu_folder_scan): New function.
3998	* include/mailutils/registrar.h (mu_registrar_list_p): New
3999	function.
4000	* include/mailutils/sys/folder.h (_mu_folder._list): Change
4001	signature.
4002	* libmailutils/base/registrar.c (mu_registrar_list_p): New
4003	function.
4004	* libmailutils/mailbox/folder.c (mu_folder_scan): New function.
4005	(mu_folder_enumerate): Rewrite as entry point to
4006	mu_folder_scan.
4007	* libmailutils/mailbox/fsfolder.c: Use new API,
4008	* libmailutils/tests/fsfolder.c: Rewrite scheme matcher.
4009	* libmailutils/tests/fsfolder00.at: Fix test output.
4010	* libmailutils/tests/fsfolder02.at: Likewise.
4011	* libproto/imap/folder.c: Use new API.
4012
40132019-03-22  Sergey Poznyakoff  <gray@gnu.org>
4014
4015	Fix MH format detection.
4016
4017	* libproto/mh/folder.c (mh_dir_p): Check only regular files.
4018	(_mh_list_p): Ditto. All directories are eligible for listing.
4019	* libmailutils/base/registrar.c (mu_record_list_p): Remove
4020	useless check.
4021
40222019-03-13  Sergey Poznyakoff  <gray@gnu.org>
4023
4024	mail: force mime mode if at least one attachment was given.
4025
4026	This fixes
4027	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918806
4028
4029	* mail/mail.c (cli_attach): Set mime_option.
4030
40312019-03-10  Sergey Poznyakoff  <gray@gnu.org>
4032
4033	Fix encoding of empty input by DOT filter.
4034
4035	* libmailutils/filter/dot.c (_dot_encoder): Don't emit
4036	additional empty line on empty input (i.e. if mu_filter_lastbuf
4037	arrives when dfa is in dot_encode_init state).
4038	* libmailutils/tests/dot.at: Test empty input.
4039
40402019-03-06  Sergey Poznyakoff  <gray@gnu.org>
4041
4042	Simplify dotmail test environment.
4043
4044	The dm_mbox tool is not needed after ff847bb1. Remove it.
4045	Modify dm_mesg to optionally take commands from the command
4046	line. Use it instead of dm_mbox in testcases.
4047
40482019-03-06  Sergey Poznyakoff  <gray@gnu.org>
4049
4050	Minor change.
4051
4052	* NEWS: Document the recent changes.
4053	* THANKS: Add Kurt Hackenberg.
4054
40552019-03-06  Sergey Poznyakoff  <gray@gnu.org>
4056
4057	Bugfix.
4058
4059	* libproto/mbox/mbox.c (restore_date): Fix possible
4060	uninitialized memory access.
4061
40622019-03-06  Sergey Poznyakoff  <gray@gnu.org>
4063
4064	Revamp UID support in dotmail.
4065
4066	* include/mailutils/stream.h (mu_stream_header_copy): New
4067	proto.
4068	* libmailutils/stream/hdrcpy.c: New file.
4069	* libmailutils/stream/Makefile.am: Add hdrcpy.c
4070	* libmailutils/tests/hdrcpy.c: New test program.
4071	* libmailutils/tests/hdrcpy.at: New testcase.
4072	* libmailutils/tests/Makefile.am: Add new test program and
4073	testcase.
4074	* libmailutils/tests/testsuite.at: Add new testcase.
4075	* libproto/dotmail/tests/append.at: Add new tests.
4076	* libmailutils/tests/.gitignore: Update.
4077	* include/mailutils/sys/dotmail.h (mu_dotmail_message): Remove
4078	headers_scanned. New field: uid_modified.
4079	(mu_dotmail_mailbox): Change type for uidnext to unsigned long.
4080	Remove scanned_uids_count. (mu_dotmail_message_headers_prescan)
4081	(mu_dotmail_mailbox_scan_uids): Remove.
4082	(mu_dotmail_mailbox_uid_setup): New proto.
4083	* libproto/dotmail/dotmail.c: Revamp UID support. See "Notes"
4084	on line 251 for description.
4085	* libproto/dotmail/message.c (mu_dotmail_message_reconstruct):
4086	Optimize for the case where the message remains unchanged
4087	except for the UID information.
4088	* libproto/dotmail/tests/dm_mesg.c: Add mailbox inspection
4089	commands from dm_mbox. Perhaps the latter can be removed.
4090
40912019-03-03  Sergey Poznyakoff  <gray@gnu.org>
4092
4093	Implement automatic dot-unstuffing in dotmail mailboxes.
4094
4095	* include/mailutils/sys/dotmail.h (mu_dotmail_message): New
4096	members: body_size and body_dot_stuffed.
4097	* libproto/dotmail/dotmail.c (dotmail_rescan_unlocked): Count
4098	dot-unstuffed octets in the body. Set dmsg->body_dot_stuffed to
4099	1 if at least one byte was dot-stuffed.
4100	* libproto/dotmail/message.c (dotmail_body_size): Return
4101	unstuffed size.
4102	(_msg_body_setup): If the body was dot-stuffed, return rdcache
4103	stream built over the "DOT" decoder.
4104	* libproto/dotmail/tests/body.at: Check dot-unstuffing.
4105
41062019-03-02  Sergey Poznyakoff  <gray@gnu.org>
4107
4108	Fix the dot filter decoding.
4109
4110	* libmailutils/filter/dot.c (_dot_decoder): Don't emit extra
4111	newline at the "\n.\n" marker.
4112	* libmailutils/stream/stream.c (mu_stream_seterr): Don't treat
4113	ENOSYS as fatal error.
4114	* libmailutils/tests/dot.at: New file.
4115	* libmailutils/tests/testsuite.at: Include dot.at.
4116	* libmailutils/tests/Makefile.am: Add dot.at
4117	* testsuite/smtp-msg.at: Remove extra newline from the expected
4118	output.
4119	* testsuite/smtp-str.at: Likewise.
4120
41212019-03-02  Sergey Poznyakoff  <gray@gnu.org>
4122
4123	Improve the dotmail testsuite.
4124
4125	* libproto/dotmail/tests/dm_mesg.c: Rewrite to take commands
4126	from stdin.
4127	* libproto/dotmail/tests/Makefile.am: Add setattr.at
4128	* libproto/dotmail/tests/testsuite.at (DM_MESG): New macro.
4129	* libproto/dotmail/tests/setattr.at: New file.
4130	* libproto/dotmail/tests/append.at: Use DM_MESG.
4131	* libproto/dotmail/tests/attr.at: Likewise.
4132	* libproto/dotmail/tests/body.at: Likewise.
4133	* libproto/dotmail/tests/delete.at: Likewise.
4134	* libproto/dotmail/tests/env.at: Likewise.
4135	* libproto/dotmail/tests/header.at: Likewise.
4136	* libproto/dotmail/tests/uid.at: Likewise.
4137
41382019-03-02  Sergey Poznyakoff  <gray@gnu.org>
4139
4140	Implement different accuracy levels for the mailbox format
4141	detection.
4142
4143	Selecting the accuracy level allows the user to achieve the
4144	desired balance between the speed of the folder scan and
4145	accuracy of mailbox format detection.
4146
4147	The accuracy level can be set either from the configuration
4148	file, using the mailbox.accuracy-level statement, or from the
4149	environment, using the MU_AUTODETECT_ACCURACY variable.
4150
4151	The default accuracy level 1 discerns valid mbox and dotmail
4152	mailboxes providing reasonable scan speed. Level 0 (previous
4153	default) does not discern them, but provides maximal speed.
4154	Level 2 and higher provide better accuracy at the price of
4155	speed.
4156
4157	* include/mailutils/url.h (MU_AUTODETECT_ACCURACY_AUTO)
4158	(MU_AUTODETECT_ACCURACY_FAST)
4159	(MU_AUTODETECT_ACCURACY_DEFAULT): New constants.
4160	(mu_scheme_autodetect_p): New proto, moved here from util.h
4161	(mu_set_autodetect_accuracy)
4162	(mu_autodetect_accuracy): New protos.
4163	* libmailutils/base/schemeauto.c (mu_set_autodetect_accuracy)
4164	mu_autodetect_accuracy): New functions.
4165	* libmailutils/cli/stdcapa.c: New configuration statement:
4166	mailbox.autodetect-accuracy.
4167	* libmailutils/url/create.c (_mu_url_create_internal): Assume
4168	the "file" scheme if the MU_URL_PARSE_LOCAL flag is set.
4169	* libproto/dotmail/folder.c: Implement format detection. Three
4170	accuracy levels: 0, 1, and >1
4171	* libproto/mbox/folder.c (_mbox_is_scheme): Implement default
4172	format detection.
4173	* libproto/dotmail/tests/Makefile.am: Add new test.
4174	* libproto/dotmail/tests/autodetect.at: New test.
4175	* libproto/dotmail/tests/dm_detect.c: New file.
4176	* libproto/dotmail/tests/testsuite.at: Add new test.
4177
41782019-03-01  Sergey Poznyakoff  <gray@gnu.org>
4179
4180	Initial implementation of the dotfile format.
4181
4182	* configure.ac: Enable new local format.
4183	* include/mailutils/registrar.h (mu_dotmail_record): New
4184	extern. (mu_register_all_mbox_formats)
4185	(mu_register_local_mbox_formats): Add mu_dotmail_record
4186	* include/mailutils/sys/dotmail.h: New file.
4187	* libproto/dotmail/Makefile.am: New file.
4188	* libproto/dotmail/dotmail.c: New file.
4189	* libproto/dotmail/message.c: New file.
4190	* libproto/dotmail/folder.c: New file.
4191	* libproto/dotmail/tests/.gitignore: New file.
4192	* libproto/dotmail/tests/Makefile.am: New file.
4193	* libproto/dotmail/tests/atlocal.in: New file.
4194	* libproto/dotmail/tests/count.at: New file.
4195	* libproto/dotmail/tests/dm_mbox.c: New file.
4196	* libproto/dotmail/tests/dm_mesg.c: New file.
4197	* libproto/dotmail/tests/env.at: New file.
4198	* libproto/dotmail/tests/header.at: New file.
4199	* libproto/dotmail/tests/recent.at: New file.
4200	* libproto/dotmail/tests/testsuite.at: New file.
4201	* libproto/dotmail/tests/attr.at: New file.
4202	* libproto/dotmail/tests/body.at: New file.
4203	* libproto/dotmail/tests/uid.at: New file.
4204	* libproto/dotmail/tests/dm_qget.c: New file.
4205	* libproto/dotmail/tests/qget.at: New file.
4206	* libproto/dotmail/tests/append.at: New file.
4207	* libproto/dotmail/tests/delete.at: New file.
4208	* libmu_scm/mailutils/ancilla.scm: Fix regular expression to
4209	take into account changes introduced by 4bdc41ff90.
4210
42112019-02-26  Sergey Poznyakoff  <gray@gnu.org>
4212
4213	Provide fallback mechanism for mu_mailbox_messages_recent and
4214	mu_mailbox_message_unseen.
4215
4216	* libmailutils/mailbox/mailbox.c (mu_mailbox_messages_recent)
4217	(mu_mailbox_message_unseen): Fall back to iteration if no
4218	backend-specific method is provided.
4219
42202019-02-26  Sergey Poznyakoff  <gray@gnu.org>
4221
4222	envelope: attempt to recover from trace information if not
4223	available otherwise.
4224
4225	* libmailutils/mailbox/msgenv.c (message_envelope_date): Use
4226	timestamp from Received header.
4227	(message_envelope_sender): Give preference to Return-Path
4228	header
4229
42302019-02-26  Sergey Poznyakoff  <gray@gnu.org>
4231
4232	New autoconf macro for activating mailbox format support.
4233
4234	* am/enable.m4 (MU_ENABLE_SUPPORT)
4235	(MU_ENABLE_BUILD): Use m4_-prefixed directives.
4236	(MU_ENABLE_MAILBOX_FORMAT) (MU_ENABLE_LOCAL_MAILBOX_FORMAT_
4237	(MU_ENABLE_REMOTE_MAILBOX_FORMAT): New macros. (MU_LIB_MAILBOX)
4238	(MU_LIB_LOCAL_MAILBOX)
4239	(MU_LIB_REMOTE_MAILBOX): New substitution variables.
4240	* configure.ac: Use new macros to enable mailbox formats
4241	* libproto/Makefile.am: Augment SUBDIRS instead of using
4242	Makefile variables.
4243	* comsat/Makefile.am: Use MU_LIB_.*MAILBOX macros to link in
4244	the necessary libraries.
4245	* examples/Makefile.am: Likewise.
4246	* examples/cpp/Makefile.am: Likewise.
4247	* frm/Makefile.am: Likewise.
4248	* imap4d/Makefile.am: Likewise.
4249	* include/mailutils/sys/Makefile.am: Likewise.
4250	* libmu_scm/Makefile.am: Likewise.
4251	* libproto/Makefile.am: Likewise.
4252	* maidag/Makefile.am: Likewise.
4253	* mail/Makefile.am: Likewise.
4254	* messages/Makefile.am: Likewise.
4255	* mh/Makefile.am: Likewise.
4256	* movemail/Makefile.am: Likewise.
4257	* mu/libexec/Makefile.am: Likewise.
4258	* pop3d/Makefile.am: Likewise.
4259	* python/2/libmu_py/Makefile.am: Likewise.
4260	* python/3/libmu_py/Makefile.am: Likewise.
4261	* readmsg/Makefile.am: Likewise.
4262	* sieve/Makefile.am: Likewise.
4263	* testsuite/Makefile.am: Likewise.
4264
42652019-02-24  Sergey Poznyakoff  <gray@gnu.org>
4266
4267	Bugfix.
4268
4269	* python/3/libmu_py/mailcap.c: Fix leftover uses of
4270	PyString_FromString and PyInt_FromLong.
4271
42722019-02-23  Sergey Poznyakoff  <gray@gnu.org>
4273
4274	Version 3.6.
4275
4276	* NEWS: Update.
4277	* configure.ac: Raise version number Raise VI_CURRENT and clear
4278	VI_REVISION (due to 18e23d6e).
4279	* libproto/imap/close.c: Add missing include.
4280
42812019-02-03  Sergey Poznyakoff  <gray@gnu.org>
4282
4283	Update NEWS.
4284
42852019-02-03  Sergey Poznyakoff  <gray@gnu.org>
4286
4287	Rewrite the mailcap support.
4288
4289	* configure.ac: Build libmailutils/mailcap/Makefile
4290	* include/mailutils/mailcap.h: Rewrite
4291	* include/mailutils/sys/Makefile.am: Add mailcap.h
4292	* include/mailutils/sys/mailcap.h: New file.
4293	* include/mailutils/util.h: Add missing include.
4294	* lib/mailcap.c: Rewrite using new API.
4295	* libmailutils/Makefile.am: Build in mailcap
4296	* libmailutils/base/Makefile.am: Remove mailcap.c
4297	* libmailutils/base/mailcap.c: Remove.
4298	* libmailutils/mailcap/Makefile.am: New file.
4299	* libmailutils/mailcap/ctmatch.c: New file.
4300	* libmailutils/mailcap/deferrclos.c: New file.
4301	* libmailutils/mailcap/mcp_creat.c: New file.
4302	* libmailutils/mailcap/mcp_destr.c: New file.
4303	* libmailutils/mailcap/mcp_err.c: New file.
4304	* libmailutils/mailcap/mcp_flags.c: New file.
4305	* libmailutils/mailcap/mcp_get.c: New file.
4306	* libmailutils/mailcap/mcp_sel.c: New file.
4307	* libmailutils/mailcap/mcp_count.c: New file.
4308	* libmailutils/mailcap/mcp_find.c: New file.
4309	* libmailutils/mailcap/ent_cmd.c: New file.
4310	* libmailutils/mailcap/ent_creat.c: New file.
4311	* libmailutils/mailcap/ent_destr.c: New file.
4312	* libmailutils/mailcap/ent_locus.c: New file.
4313	* libmailutils/mailcap/ent_type.c: New file.
4314	* libmailutils/mailcap/fieldacc.c: New file.
4315	* libmailutils/mailcap/fields.c: New file.
4316	* libmailutils/mailcap/finder.c: New file.
4317	* libmailutils/mailcap/parse.c: New file.
4318	* libmailutils/mailcap/parsefile.c: New file.
4319	* libmailutils/tests/mailcap.c: Rewrite using new API. Improve
4320	cli
4321	* libmailutils/tests/mcf.c: New file.
4322	* libmailutils/tests/ctm.c: New file.
4323	* libmailutils/tests/ctm.at: New file.
4324	* libmu_cpp/mailcap.cc: Rewrite using new API.
4325	* python/2/libmu_py/mailcap.c: Rewrite using new API.
4326	* python/3/libmu_py/mailcap.c: Rewrite using new API.
4327	* examples/python/2/mailcap.py: Minor change. This example is
4328	broken with the new API. Should be fixed.
4329	* include/mailutils/cpp/mailcap.h: Update
4330	* include/mailutils/cpp/pop3.h: Update
4331
43322019-02-02  Sergey Poznyakoff  <gray@gnu.org>
4333
4334	New iterator functions: mu_iterator_skip_while and
4335	mu_iterator_skip_until.
4336
4337	The mu_iterator_skip_while function continues iteration while
4338	the supplied predicate function returns true. The
4339	mu_iterator_skip_until function continues iteration until the
4340	supplied predicate function returns true.
4341
4342	* include/mailutils/iterator.h: Add new prototypes.
4343	* libmailutils/base/iterator.c: Implement new functions.
4344
43452019-01-31  Sergey Poznyakoff  <gray@gnu.org>
4346
4347	Rewrite the transcript stream.
4348
4349	The new implementation consists of two independent state
4350	machines for each transcript channel (input and output). The
4351	MU_XSCRIPT_PAYLOAD state can be turned on for a predefined
4352	number of bytes on each channel. After that many bytes pass
4353	through, the state will return back to MU_XSCRIPT_NUMBER. This
4354	allows, in particular, to improve logging of client commands
4355	containing literals in imap4d.
4356
4357	* include/mailutils/stream.h (MU_IOCTL_XSCRIPTSTREAM_CHANNEL):
4358	New ioctl subcode.
4359	(mu_xscript_channel): New struct. (MU_XSCRIPT_LEVEL_IS_PACKED)
4360	(MU_XSCRIPT_LEVEL_MASK,MU_XSCRIPT_LEVEL_UNMASK)
4361	(MU_XSCRIPT_LEVEL_PACK): New macros.
4362	* include/mailutils/sys/xscript-stream.h (_mu_xscript_channel):
4363	New struct.
4364	(_mu_xscript_stream): Keep independent state for each channel.
4365	* libmailutils/stream/xscript-stream.c: Rewrite as a state
4366	machine with independent states for input and output channels.
4367	* libmailutils/tests/xscript.at: Test packed channel levels and
4368	MU_IOCTL_XSCRIPTSTREAM_CHANNEL ioctl.
4369	* libmailutils/tests/xscript.c: Rewrite command parser.
4370	* imap4d/imap4d.h (xscript_declare_client_payload): New proto.
4371	* imap4d/util.c (xscript_declare_client_payload): New function.
4372	* imap4d/io.c (imap4d_readline): Use
4373	xscript_declare_client_payload after literals.
4374
43752019-01-29  Sergey Poznyakoff  <gray@gnu.org>
4376
4377	imap4d: Proper case-insensitive searches over multibyte
4378	strings.
4379
4380	This requires libunistring.
4381
4382	* NEWS: Update.
4383	* README: Update.
4384	* configure.ac: Check for libunistring.
4385	* libmailutils/base/version.c: Reflect libunistring usage.
4386	* imap4d/Makefile.am: Link with libunistring, if available.
4387	* imap4d/imap4d.h (unistr_downcase)
4388	(unistr_is_substring): New protos.
4389	* imap4d/search.c (_scan_header)
4390	(_scan_header_all,_match_text): Use unistr_is_substring for
4391	searches.
4392	* imap4d/unistr_c.c: New file.
4393	* imap4d/unistr_u8.c: New file.
4394	* imap4d/tests/search.at: Add new test.
4395
43962019-01-28  Sergey Poznyakoff  <gray@gnu.org>
4397
4398	Revert 3aeec0dcc151b836cb09d756ad41598c95201446.
4399
4400	Adding 1 to the buffer size is necessary, because
4401	_stream_scandelim requires buffer to provide enough space to
4402	accomodate the trailing 0. Consequently, the minimal acceptable
4403	buffer size is 2.
4404
44052019-01-27  Sergey Poznyakoff  <gray@gnu.org>
4406
4407	Minor fix.
4408
4409	* search.c (_match_multipart): Initialize result.
4410
44112019-01-26  Sergey Poznyakoff  <gray@gnu.org>
4412
4413	Minor fix.
4414
4415	* imap4d/search.c (parse_search_key): Fix eventual NULL pointer
4416	dereference.
4417
44182019-01-26  Sergey Poznyakoff  <gray@gnu.org>
4419
4420	Add tests for imap4d SEARCH BODY, TEXT, and CHARSET.
4421
4422	* imap4d/tests/.gitignore: New file.
4423	* imap4d/tests/ckiconv.c: New file.
4424	* imap4d/tests/Makefile.am: Build ckiconv.c
4425	* imap4d/tests/search.at: Add tests for BODY, TEXT and CHARSET
4426	* imap4d/tests/testsuite.at (IMAP4D_WITH_PREREQ): New macro
4427	(IMAP4D_CHECK): Skip test if the supplied prerequisite is not
4428	satisfied.
4429	* testsuite/spool/search2.mbox: New file.
4430	* testsuite/spool/DISTFILES: Add search2.mbox.
4431	* mail/decode.c (mime_descend): Fix handling of message/rfc822.
4432
44332019-01-26  Sergey Poznyakoff  <gray@gnu.org>
4434
4435	Remove misguiding comment.
4436
44372019-01-26  Sergey Poznyakoff  <gray@gnu.org>
4438
4439	imap4d: implement SEARCH CHARSET; fix BODY and TEXT searches.
4440
4441	* imap4d/search.c: Implement proper BODY searches. Implement
4442	CHARSET.
4443	* imap4d/util.c (util_strcasestr): Remove. Use mu_c_strcasestr
4444	instead.
4445	* imap4d/imap4d.h: Likewise.
4446	* NEWS: Document changes.
4447
44482019-01-25  Sergey Poznyakoff  <gray@gnu.org>
4449
4450	Improve error checking in stream writing functions.
4451
4452	* libmailutils/stream/stream.c (mu_stream_write): Return EIO on
4453	short writes if pnwritten is NULL.
4454	* libmailutils/stream/streamcpy.c (mu_stream_copy): Likewise
4455	(if source stream size is known.
4456
44572019-01-24  Sergey Poznyakoff  <gray@gnu.org>
4458
4459	Fix stream reference implementation.
4460
4461	Do not propagate streamref's error and eof state upstream.
4462
4463	* libmailutils/stream/streamref.c (streamref_return): Remove
4464	function. All uses updated.
4465
44662019-01-23  Sergey Poznyakoff  <gray@gnu.org>
4467
4468	mail: fix completion of set, unset, and variable.
4469
44702019-01-23  Sergey Poznyakoff  <gray@gnu.org>
4471
4472	mail: implement variable and command expansion in echo command.
4473
4474	* mail/echo.c: Implement variable and command expansion.
4475	* mail/mail.c (main): Set PID mailvar.
4476	* mail/mailvar.c (mailvar_tab): New variable PID (to help in
4477	debugging).
4478	(set_folder): Expand initial ~
4479	* mail/set.c: Remove misguiding comment.
4480
44812019-01-23  Sergey Poznyakoff  <gray@gnu.org>
4482
4483	Fix in IMAP wildcard matcher.
4484
4485	* libmailutils/imapio/wildmatch.c (_wild_match): Handle % at
4486	the end of input same way as *.
4487
44882019-01-23  Sergey Poznyakoff  <gray@gnu.org>
4489
4490	mail: fixes in completion routines.
4491
44922019-01-23  Sergey Poznyakoff  <gray@gnu.org>
4493
4494	mail: improve message set parser.
4495
4496	* mail/from.c (sender_string): New function.
4497	* mail/mail.h: Likewise.
4498	* mail/msgset.y: Fix memory management and error reporting.
4499	Implement sender address matching.
4500	* mail/util.c (util_outfolder_name): Always return allocated
4501	value.
4502	* mail/copy.c (mail_copy0): Add typecast.
4503
45042019-01-23  Sergey Poznyakoff  <gray@gnu.org>
4505
4506	mail: new notation @, for the mailbox given with the -f option.
4507
4508	* doc/texinfo/programs/mail.texi: Document the @ notation.
4509	* NEWS: Likewise.
4510	* mail/copy.c (mail_copy0): Rewrite. Use mailbox URLs instead
4511	of filenames.
4512	* mail/file.c (mail_expand_name): Return integer code. On
4513	success, convert the expanded name to URL and return it in the
4514	memory location supplied by the second argument. Use new
4515	shorthand notation @, for the name of the file given with the
4516	-f option. All uses changed.
4517	* mail/mail.c (secondary_url): New global.
4518	(main): Save the URL of the file given with the -f option in
4519	secondary_url. Use it, instead of the file variable, to decide
4520	what kind of summary message to display for empty mailbox (see
4521	commit 99b6b6f02c3cf94ebe1daf7233a702c743d6a2b5).
4522	* mail/mail.h (secondary_url): New global.
4523	(mail_expand_name): Change prototype.
4524	* mail/mailline.c: Minor changes.
4525	* libmailutils/wicket/noauth.c (noauth_ticket_get_cred): Return
4526	MU_ERR_AUTH_NO_CRED.
4527
45282019-01-22  Sergey Poznyakoff  <gray@gnu.org>
4529
4530	Summarize recent changes in NEWS.
4531
45322019-01-22  Sergey Poznyakoff  <gray@gnu.org>
4533
4534	Improve mail folder completion.
4535
4536	* mail/mailline.c (filegen_init): Check if the mail folder is
4537	the same as the one used by the current mailbox, and reuse it
4538	if so.
4539
45402019-01-22  Sergey Poznyakoff  <gray@gnu.org>
4541
4542	Add missing prototype.
4543
4544	* include/mailutils/url.h (mu_url_is_same_portstr): New proto.
4545
45462019-01-22  Sergey Poznyakoff  <gray@gnu.org>
4547
4548	Remove central registry of created folders.
4549
4550	The way it is implemented now, it creates more problems than
4551	offers solutions. In particular, it makes it impossible to open
4552	two mailboxes in the same IMAP account.
4553
4554	* libmailutils/mailbox/folder.c (known_folder_list)
4555	(folder_lock): Remove variable.
4556	(is_known_folder): Remove function.
4557	(mu_folder_create_from_record): Don't use static folder list.
4558
45592019-01-22  Sergey Poznyakoff  <gray@gnu.org>
4560
4561	fix in mail completion.
4562
4563	* mail/mailline.c (filegen_init): Append tailing delimiter to
4564	folders only on exact match.
4565
45662019-01-22  Sergey Poznyakoff  <gray@gnu.org>
4567
4568	Minor fix in imap client.
4569
4570	* libproto/imap/close.c (_mu_close_handler): Free mbox_name.
4571
45722019-01-21  Sergey Poznyakoff  <gray@gnu.org>
4573
4574	Fixes in imap client: handle EXPUNGE response, fix
4575	incorporation of new messages.
4576
4577	Certain servers do not issue EXISTS unsolicited response after
4578	expunging. Use EXPUNGE responses to keep track of the deleted
4579	messages.
4580
4581	Internal structure of imap mailbox object did not interact well
4582	with incorporating new messages. It is fixed.
4583
4584	* include/mailutils/imap.h (MU_IMAP_CB_EXPUNGE): New callback
4585	code.
4586	* include/mailutils/sys/imap.h (_mu_imap_message): New member:
4587	msgno.
4588	(_mu_imap_mailbox): Change type of msgs to struct
4589	_mu_imap_message **. Each _mu_imap_message * is registered as
4590	owner for various MU objects, so it is important it does not
4591	change during reallocations.
4592	* libproto/imap/mbox.c (_imap_msg_free): Free the message
4593	itself.
4594	(_imap_attr_clr_flags): Fix bitwise op.
4595	(_imap_mbx_get_message,_imap_realloc_messages)
4596	(aggregate_attributes,_imap_mbx_gensync)
4597	(_imap_fetch_callback): Reflect change in the type of msgs
4598	array.
4599	(_imap_expunge_callback): New callback.
4600	(_imap_mbx_open): Register _imap_expunge_callback.
4601	* libproto/imap/resproc.c (_process_unsolicited_response):
4602	handle the EXPUNGE response.
4603
46042019-01-21  Sergey Poznyakoff  <gray@gnu.org>
4605
4606	Fix page invalidation in mail.
4607
46082019-01-21  Sergey Poznyakoff  <gray@gnu.org>
4609
4610	Improve folder handling and expansion in mail. Add convenience
4611	functions to the library.
4612
4613	* configure.ac: Build libmailutils/wicket
4614	* libmailutils/Makefile.am: Likewise.
4615	* libmailutils/base/wicket.c: Move file wicket stuff to ...
4616	* libmailutils/wicket/file.c: ... here
4617	* libmailutils/wicket/noauth.c: New file.
4618	* libmailutils/wicket/Makefile.am: New file.
4619	* include/mailutils/auth.h (mu_noauth_ticket_create)
4620	(mu_noauth_wicket_create): New protos.
4621	* include/mailutils/folder.h (mu_folder_attach_ticket)
4622	(mu_folder_is_local): New protos.
4623	* include/mailutils/mailbox.h (mu_mailbox_attach_ticket): New
4624	proto.
4625	* include/mailutils/sys/folder.h (_mu_folder): Remove flags.
4626	Add new member: is_local.
4627	* libmailutils/mailbox/folder.c (mu_folder_create_from_record):
4628	Set is_local.
4629	(mu_folder_attach_ticket): New function.
4630	(mu_folder_is_local): New function.
4631	* libmailutils/mailbox/mbx_default.c
4632	(mu_mailbox_attach_ticket): New function.
4633	* libmailutils/url/create.c: Allow for trailing / in url.
4634	* libproto/imap/mbox.c (_imap_mbx_open): Do initial scan.
4635	(__imap_msg_get_stream): Initialize clos.size.
4636	* libproto/imap/tests/imapfolder.c: Attach ticket to the
4637	folder.
4638	* mail/cd.c (mail_cd): Expand directory name (~, %, +
4639	notations) prior to use.
4640	* mail/file.c (mail_file): Attach ticket to the mailbox.
4641	* mail/copy.c (append_to_mailbox): Likewise.
4642	* mail/mailline.c: Rewrite directory expansion. Implement fully
4643	functional folder expansion.
4644	* mail/util.c (util_folder_path)
4645	(util_outfolder_name): Rewrite using mu_mailbox_expand_name.
4646
46472019-01-18  Sergey Poznyakoff  <gray@gnu.org>
4648
4649	Read message headers during initial scan of an imap mailbox.
4650
4651	This considerably speeds up the operation of such tools as mail
4652	(initial loading), frm or from.
4653
4654	* include/mailutils/sys/imap.h (_mu_imap_message): New member:
4655	header_stream.
4656	* libproto/imap/mbox.c (_imap_msg_free): Destroy header_stream.
4657	(_imap_hdr_fill): Rewrite.
4658	(fetch_response_parser): Handle MU_IMAP_FETCH_BODY.
4659	(_imap_mbx_scan): Fetch BODY.PEEK[HEADER].
4660
46612019-01-18  Sergey Poznyakoff  <gray@gnu.org>
4662
4663	Don't reveal file name with the '0 messages' summary message.
4664
4665	Rationale: file name can contain password.
4666
4667	* mail/mail.c (main): Make sure file is always allocated. Fill
4668	it with 0's and free when no longer needed. Use mail_summary to
4669	display the summary for empty mailbox.
4670
46712019-01-18  Sergey Poznyakoff  <gray@gnu.org>
4672
4673	Minor change.
4674
4675	* mail/testsuite/lib/mail.exp (default_mail_start): Join
4676	arguments into a string.
4677
46782019-01-18  Sergey Poznyakoff  <gray@gnu.org>
4679
4680	mail: implement msglist completion.
4681
4682	* mail/mailline.c (msglist_closure_compl): Make the matches
4683	argument optional.
4684	(msglist_compl): Implement using msglist_closure_compl.
4685
46862019-01-17  Sergey Poznyakoff  <gray@gnu.org>
4687
4688	Improve completion in mail.
4689
4690	This affects the following commands: pipe, file, write, store.
4691
4692	* mail/mail.h (shell_compl): New function.
4693	* mail/mailline.c (ml_command_completion): Change the meaning
4694	of the last argument to command_completion function. All
4695	functions updated.
4696	(msgtype_generator): Take into account '/' that can follow ':'.
4697	Prefix returned values with :.
4698	(header_generator): Append ':/' to the returned strings.
4699	(compl_concat): New function.
4700	(file_compl): Rewrite.
4701	(msglist_closure_compl): New function.
4702	(file_compl_matches,msglist_file_compl,exec_compl): Rewrite.
4703	(shell_compl): New function.
4704	* mail/table.c: Implement completion for pipe and shell
4705	commands.
4706
47072019-01-16  Sergey Poznyakoff  <gray@gnu.org>
4708
4709	Edit docs.
4710
4711	* doc/texinfo/programs/mail.texi: Reorder material. Document
4712	message states. Rewrite description of message lists. Describe
4713	mailbox argument in file, save, write, etc.
4714	* doc/texinfo/mailutils.texi: Regenerate detailed menu
4715
47162019-01-16  Sergey Poznyakoff  <gray@gnu.org>
4717
4718	Bugfix.
4719
4720	* libmailutils/base/amd.c (amd_body_stream_readdelim): Fix line
4721	length calculation.
4722
47232019-01-16  Sergey Poznyakoff  <gray@gnu.org>
4724
4725	mail: fix / and :/ searches in message sets.
4726
4727	* mail/mail.h (msgset_remove): New proto.
4728	* mail/msgset.y (yylex): Make sure to never move cur_p past the
4729	terminating 0 character.
4730	(msgset_append): Eliminated duplicates.
4731	(select_body): Read entire lines. Fix the conditional: return
4732	true if the matching line was found.
4733
47342019-01-16  Sergey Poznyakoff  <gray@gnu.org>
4735
4736	Split programs.texi into manageable parts.
4737
4738	* NEWS: Update.
4739	* configure.ac: Version 3.5.90
4740	* doc/texinfo/Makefile.am (mailutils_TEXINFOS): Add new files.
4741	* doc/texinfo/programs.texi: Include sections from
4742	programs/*.texi
4743	* doc/texinfo/programs/comsatd.texi: New file.
4744	* doc/texinfo/programs/frm.texi: New file.
4745	* doc/texinfo/programs/guimb.texi: New file.
4746	* doc/texinfo/programs/imap4d.texi: New file.
4747	* doc/texinfo/programs/maidag.texi: New file.
4748	* doc/texinfo/programs/mail.texi: New file.
4749	* doc/texinfo/programs/mailutils.texi: New file.
4750	* doc/texinfo/programs/messages.texi: New file.
4751	* doc/texinfo/programs/mimeview.texi: New file.
4752	* doc/texinfo/programs/movemail.texi: New file.
4753	* doc/texinfo/programs/pop3d.texi: New file.
4754	* doc/texinfo/programs/readmsg.texi: New file.
4755	* doc/texinfo/programs/sieve.texi: New file.
4756
47572019-01-15  Sergey Poznyakoff  <gray@gnu.org>
4758
4759	Fix the pipe command (mail)
4760
4761	* mail/pipe.c: Always treat last argument as the name of the
4762	command to use.
4763
47642019-01-15  Sergey Poznyakoff  <gray@gnu.org>
4765
4766	Improve mail documentation.
4767
47682019-01-15  Sergey Poznyakoff  <gray@gnu.org>
4769
4770	Minor change.
4771
4772	* libmailutils/cli/cli.c: Update copyright year.
4773
47742019-01-03  Sergey Poznyakoff  <gray@gnu.org>
4775
4776	Update copyright years.
4777
47782018-12-25  Sergey Poznyakoff  <gray@gnu.org>
4779
4780	Fix typos and improve wording in the docs.
4781
4782	Reported by Dan Jacobson.
4783
47842018-12-25  Sergey Poznyakoff  <gray@gnu.org>
4785
4786	Fix showenvelope.
4787
4788	* mail/envelope.c (print_stream_envelope): New function. End
4789	output with a newline.
4790	* mail/mail.h: Likewise.
4791	* mail/print.c (mail_print_msg): Print envelope to the created
4792	output stream, instead of mu_strout.
4793
47942018-11-09  Sergey Poznyakoff  <gray@gnu.org>
4795
4796	Fix obsolete docstring.
4797
4798	* libmailutils/cli/stdcapa.c: Fix description of the argument
4799	syntax for the "debug" statement.
4800
48012018-10-27  Sergey Poznyakoff  <gray@gnu.org>
4802
4803	Version 3.5.
4804
48052018-10-24  Sergey Poznyakoff  <gray@gnu.org>
4806
4807	Add missing prototype.
4808
48092018-10-24  Sergey Poznyakoff  <gray@gnu.org>
4810
4811	sieve: set variables from command line.
4812
4813	The new command line option --variable initializes the RFC 5229
4814	variable.
4815
4816	* NEWS: Update.
4817	* doc/texinfo/programs.texi: Fix description of sieve command
4818	line options.
4819	* include/mailutils/sieve.h (mu_sieve_variable_initialize): New
4820	proto.
4821	* libmu_sieve/runtime.c (sieve_run): Call
4822	mu_i_sv_init_variables to clear and initialize the table of
4823	variables.
4824	* libmu_sieve/sieve-gram.y (mu_sieve_machine_dup): Copy
4825	variables.
4826	(mu_sieve_machine_destroy): Destroy table of variables and
4827	initializer list.
4828	* libmu_sieve/sieve-priv.h (mu_sieve_machine) <init_var>: New
4829	member.
4830	(mu_sieve_variable_initializer): New type.
4831	(mu_i_sv_init_variables): New proto.
4832	* libmu_sieve/variables.c (mu_sieve_variable_initialize): New
4833	function.
4834	(mu_i_sv_copy_variables): Copy initializers as well.
4835	(mu_i_sv_init_variables): New function.
4836	* sieve/sieve.c: New command line option --variable.
4837	* sieve/tests/variables.at: Test the --variable option.
4838
48392018-10-23  Sergey Poznyakoff  <gray@gnu.org>
4840
4841	Fix static linkage.
4842
4843	* libmailutils/datetime/scantime.c (get_num): static
4844	* mu/libexec/ldflags.c: Make sure libmailutils is linked after
4845	all libmu_ libraries that rely on it.
4846
48472018-10-22  Sergey Poznyakoff  <gray@gnu.org>
4848
4849	Fix wordsplit command expansion and related tests.
4850
4851	* include/mailutils/wordsplit.h (MU_WRDSO_ARGV): Remove.
4852	* libmailutils/string/wordsplit.c (expcmd): Always split
4853	command line into arguments. This fixes
4854	https://savannah.gnu.org/bugs/?54830
4855	* libmailutils/tests/wordsplit.at: Rewrite command expansion
4856	tests.
4857	* libmailutils/tests/wsp.c: Implement internal commands,
4858	instead of calling shell ones. This fixes
4859	https://savannah.gnu.org/bugs/?54829.
4860	* libmailutils/string/expvar.c: Remove the use of
4861	MU_WRDSO_ARGV.
4862
48632018-10-04  Sergey Poznyakoff  <gray@gnu.org>
4864
4865	Fix imap client behavior when opening empty mailboxes.
4866
4867	According to RFC 3501 (page 89):
4868
4869	 The server should respond with a tagged BAD
4870	 response to a command that uses a message
4871	 sequence number greater than the number of
4872	 messages in the selected mailbox. This
4873	 includes "*" if the selected mailbox is empty.
4874	* include/mailutils/sys/imap.h (_mu_imap_mailbox)<total_size>:
4875	Remove unnecessary field.
4876	* libproto/imap/mbox.c (_imap_fetch_callback): Fix array size
4877	calculation.
4878	(_imap_mbx_scan): Don't issue FETCH command if the mailbox is
4879	empty.
4880
48812018-08-26  Sergey Poznyakoff  <gray@gnu.org>
4882
4883	Implement SCM interface to mailutils filters.
4884
4885	* include/mailutils/guile.h (mu_port_make_from_stream): Remove
4886	unused msg argument. All uses updated.
4887	* libmu_scm/mu_filter.c: New file.
4888	* libmu_scm/Makefile.am: Add mu_filter.c
4889	* libmu_scm/mu_message.c (mu-message-get-port): Add missing
4890	anchor to the docstring.
4891	* libmu_scm/mu_port.c (mu_port): Remove msg.
4892	* libmu_scm/mu_scm.c (mu_scm_init): Call mu_scm_filter_init.
4893	* NEWS: Updated.
4894
48952018-08-25  Sergey Poznyakoff  <gray@gnu.org>
4896
4897	Bugfix in base64 encoder.
4898
4899	* libmailutils/filter/base64.c (_base64_encoder): Don't return
4900	immediately on eof. The encoder can have some more characters
4901	for output, left over from the previous call.
4902
49032018-08-16  Ivan A. Melnikov  <iv@altlinux.org>
4904
4905	Force terminating \0 in mh_format result.
4906
4907	Apparently, mu_stream_read is not required to put the
4908	terminating zero into the buffer, so we need to do it in its
4909	caller.
4910
4911	Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
4912
49132018-08-13  Sergey Poznyakoff  <gray@gnu.org>
4914
4915	Bugfix in python configuration code.
4916
4917	* configure.ac: Use $PYTHON_CONFIG instead of the hardcoded
4918	python-config name.
4919
49202018-07-30  Sergey Poznyakoff  <gray@gnu.org>
4921
4922	Version 3.4.91.
4923
4924	* NEWS: Update version number.
4925	* configure.ac: Likewise.
4926
49272018-07-30  Sergey Poznyakoff  <gray@gnu.org>
4928
4929	Support for Python 3.
4930
4931	Support for v2 is retained for a while. Both the API and the
4932	syntax of the two versions differ considerably enough to keep
4933	both versions apart in parallel directory subtrees, instead of
4934	fiddling with CPP directives and Automake conditionals. So,
4935	instead of prior 'python/' and 'examples/python' we now have
4936	'python/2', 'python/3', and 'examples/python/2' with
4937	'examples/python/3'. The customized loader is modified to
4938	insert the appropriate path to the sys.path.
4939
4940	When Python 2 is definitely gone, the directory structures will
4941	be flattened again, by removing additional version number
4942	subdirectory.
4943
4944	* Makefile.am (SUBDIRS): Add python unconditionally
4945	* configure.ac (PYTHON_MAJOR): New substvar.
4946	(MU_LIB_PY): Change path
4947	(MU_COND_PYTHON2,MU_COND_PYTHON3): New conditionals.
4948	* examples/python/*: Rename to examples/python/2/*
4949	* examples/python/3/Makefile.am: New file.
4950	* examples/python/3/addr.py: New file.
4951	* examples/python/3/auth.py: New file.
4952	* examples/python/3/iconv.py: New file.
4953	* examples/python/3/lsf.py: New file.
4954	* examples/python/3/mailcap.py: New file.
4955	* examples/python/3/mimetest.py: New file.
4956	* examples/python/3/msg-send.py: New file.
4957	* examples/python/3/sfrom.py: New file.
4958	* examples/python/3/url-parse.py: New file.
4959	* include/mailutils/python.h: Remove inclusion of Python.h. It
4960	must included before all other files.
4961	* lib/python.c: Include Python.h
4962	* python/*: Rename to python/2/*
4963	* python/usercustomize.py: Insert path to the appropriate
4964	Python version implementation to the sys.path
4965	* python/3/Makefile.am: New file.
4966	* python/3/libmu_py/Makefile.am: New file.
4967	* python/3/libmu_py/address.c: New file.
4968	* python/3/libmu_py/attribute.c: New file.
4969	* python/3/libmu_py/auth.c: New file.
4970	* python/3/libmu_py/body.c: New file.
4971	* python/3/libmu_py/envelope.c: New file.
4972	* python/3/libmu_py/errno.c: New file.
4973	* python/3/libmu_py/error.c: New file.
4974	* python/3/libmu_py/filter.c: New file.
4975	* python/3/libmu_py/folder.c: New file.
4976	* python/3/libmu_py/header.c: New file.
4977	* python/3/libmu_py/libmu_py.c: New file.
4978	* python/3/libmu_py/libmu_py.h: New file.
4979	* python/3/libmu_py/list.c: New file.
4980	* python/3/libmu_py/mailbox.c: New file.
4981	* python/3/libmu_py/mailcap.c: New file.
4982	* python/3/libmu_py/mailer.c: New file.
4983	* python/3/libmu_py/message.c: New file.
4984	* python/3/libmu_py/mime.c: New file.
4985	* python/3/libmu_py/nls.c: New file.
4986	* python/3/libmu_py/registrar.c: New file.
4987	* python/3/libmu_py/script.c: New file.
4988	* python/3/libmu_py/secret.c: New file.
4989	* python/3/libmu_py/sieve.c: New file.
4990	* python/3/libmu_py/stream.c: New file.
4991	* python/3/libmu_py/url.c: New file.
4992	* python/3/libmu_py/util.c: New file.
4993	* python/3/mailutils/Makefile.am: New file.
4994	* python/3/mailutils/__init__.py: New file.
4995	* python/3/mailutils/address.py: New file.
4996	* python/3/mailutils/attribute.py: New file.
4997	* python/3/mailutils/auth.py: New file.
4998	* python/3/mailutils/body.py: New file.
4999	* python/3/mailutils/c_api.c: New file.
5000	* python/3/mailutils/envelope.py: New file.
5001	* python/3/mailutils/error.py: New file.
5002	* python/3/mailutils/filter.py: New file.
5003	* python/3/mailutils/folder.py: New file.
5004	* python/3/mailutils/header.py: New file.
5005	* python/3/mailutils/mailbox.py: New file.
5006	* python/3/mailutils/mailcap.py: New file.
5007	* python/3/mailutils/mailer.py: New file.
5008	* python/3/mailutils/message.py: New file.
5009	* python/3/mailutils/mime.py: New file.
5010	* python/3/mailutils/nls.py: New file.
5011	* python/3/mailutils/registrar.py: New file.
5012	* python/3/mailutils/secret.py: New file.
5013	* python/3/mailutils/sieve.py: New file.
5014	* python/3/mailutils/stream.py: New file.
5015	* python/3/mailutils/url.py: New file.
5016	* python/3/mailutils/util.py: New file.
5017
50182018-07-27  Sergey Poznyakoff  <gray@gnu.org>
5019
5020	Bugfix.
5021
5022	* libmailutils/mime/mimehdr.c (_mime_header_parse): Initialize
5023	ws.ws_options prior to modifying it.
5024
50252018-07-25  Sergey Poznyakoff  <gray@gnu.org>
5026
5027	Add maintainer's makefiles.
5028
50292018-07-23  Sergey Poznyakoff  <gray@gnu.org>
5030
5031	Support for Berkeley DB versions 5 and 6.
5032
5033	Drop the legacy configure option --with-db2
5034
50352018-07-20  Sergey Poznyakoff  <gray@gnu.org>
5036
5037	Add test cases missing from the distribution.
5038
5039	* readmsg/tests/Makefile.am (TESTSUITE_AT): Add missing
5040	testcases
5041
50422018-06-22  Sergey Poznyakoff  <gray@gnu.org>
5043
5044	Minor documentation fix.
5045
50462018-06-22  Sergey Poznyakoff  <gray@gnu.org>
5047
5048	Fix endianness bug in string to IP conversion.
5049
5050	* libmailutils/cidr/fromsa.c (_mu_inaddr_to_bytes)
5051	(_mu_sockaddr_to_bytes): Fix improper endianness conversion.
5052	* libmailutils/cidr/tosa.c (mu_cidr_to_sockaddr): Simplify
5053	conversion.
5054
50552018-06-13  Sergey Poznyakoff  <gray@gnu.org>
5056
5057	Fix eventual segmentation violation in imap4d.
5058
5059	The coredump occurred if a recently started child received a
5060	termination signal before initializing iostream.
5061
5062	* imap4d/bye.c (imap4d_bye0): Rename to imap4d_bye_command. All
5063	uses changed.
5064	* imap4d/io.c (io_untagged_response): Check if iostream is
5065	initialized.
5066
50672018-06-13  Sergey Poznyakoff  <gray@gnu.org>
5068
5069	libmu_scm: fix docs.
5070
50712018-06-12  Sergey Poznyakoff  <gray@gnu.org>
5072
5073	libmu_scm: add testcases for mu-mime functions (with bugfixes)
5074
5075	* libmu_scm/mu_message.c (mu_scm_message_add_owner): Fix owner
5076	list construction.
5077	* libmu_scm/mu_mime.c (mu-mime-create): Fix a bug: both
5078	arguments are optional now.
5079	* libmu_scm/tests/Makefile.am: Add new tests.
5080	* libmu_scm/tests/testsuite.at: Likewise,
5081
5082	New testcases:
5083	* libmu_scm/tests/mime-add-part.at
5084	* libmu_scm/tests/mime-create.at
5085	* libmu_scm/tests/mime-get-num-parts.at
5086	* libmu_scm/tests/mime-get-part.at
5087	* libmu_scm/tests/mime-multipart-p.at
5088	* libmu_scm/tests/mime-p.at
5089
50902018-06-12  Sergey Poznyakoff  <gray@gnu.org>
5091
5092	libmu_scm: more tests.
5093
5094	* testsuite/spool/mbox2: New file. Same messages as in mbox1,
5095	but with Mailutils auxiliary headers added. Ideally,
5096	libmailutils should not add any headers to the messages, unless
5097	explicitly requested to do so. Hopefully, I'll fix this in
5098	future.
5099	* testsuite/spool/DISTFILES: Add mbox2 and mime.msg
5100	* libmu_scm/tests/mailbox-append-message.at: New testcase.
5101	* libmu_scm/tests/mailbox-expunge.at: New testcase.
5102	* libmu_scm/tests/message-delete.at: New testcase.
5103	* libmu_scm/tests/message-get-flag.at: New testcase.
5104	* libmu_scm/mu_message.c (mu_scm_message_print): Display flags.
5105	* libmu_scm/tests/Makefile.am: Add new files.
5106	* libmu_scm/tests/mailbox-print.at: Remove the now superfluous
5107	quoting.
5108	* libmu_scm/tests/message-get-part.at: Likewise.
5109	* libmu_scm/tests/testsuite.at (MU_GUILE_CHECK): Quote the
5110	argument to AT_DATA Include new tests.
5111
5112	Changes missing from the previous commit:
5113	* libmu_scm/mailutils/ancilla.scm
5114	* libmu_scm/mu_body.c
5115	* libmu_scm/mu_port.c
5116
51172018-06-10  Sergey Poznyakoff  <gray@gnu.org>
5118
5119	libmu_scm: minor fixes; add more tests.
5120
5121	* libmu_scm/mailutils/ancilla.scm (string->message)
5122	(file->message): Ise open- call instead of call-with-input to
5123	avoid premature closing of the input port. This has a drawbak
5124	that the port will be actually closed only after the returned
5125	message is destroyed (possibly by the gc).
5126	* libmu_scm/mu_body.c: Use scm_intprint when printing objects.
5127	* libmu_scm/mu_mailbox.c: Likewise.
5128	* libmu_scm/mu_port.c: Likewise.
5129	* libmu_scm/mu_message.c (mu_scm_message_free): Fix destroying
5130	of the underlying mu_message_t object.
5131	* libmu_scm/tests/message-get-num-parts.at: New file.
5132	* libmu_scm/tests/message-get-part.at: New file.
5133	* libmu_scm/tests/message-multipart.at: New file.
5134	* testsuite/spool/mime.msg: New file.
5135
51362018-06-09  Sergey Poznyakoff  <gray@gnu.org>
5137
5138	Upgrade gint.
5139
5140	This suppresses spurious warnings when generating
5141	guile-procedures.txt
5142
51432018-06-09  Sergey Poznyakoff  <gray@gnu.org>
5144
5145	Add more libmu_scm tests.
5146
5147	* libmu_scm/Makefile.am (C_SRCS): Add portstream.c
5148	* libmu_scm/mailutils/Makefile.am (EXTRA_DIST): Add ancilla.scm
5149	* libmu_scm/mailutils/ancilla.scm: New file
5150	* libmu_scm/mu_message.c (mu-message-get-header-fields): Fix
5151	operation when called with three arguments.
5152	(mu-message-from-port): New function.
5153	* libmu_scm/portstream.c: New file.
5154
51552018-06-08  Sergey Poznyakoff  <gray@gnu.org>
5156
5157	Further fixes in the scheme library. Add guile testsuite.
5158
5159	* .gitignore: Ignore .gdbinit
5160	* README: Update.
5161	* configure.ac: Add guile testsuite
5162	* libmu_scm/Makefile.am (SUBDIRS): Add tests.
5163	* libmu_scm/mu_body.c: Update smob support.
5164	* libmu_scm/mu_dbgport.c (mu_scm_make_debug_port): Delegate
5165	buffering to mailutils streams layer.
5166	* libmu_scm/mu_mailbox.c: Update smob support.
5167	(mu-mailbox-more-messages?): Fix reversed return value.
5168	* libmu_scm/mu_message.c: Update smob support.
5169	* libmu_scm/mu_mime.c: Likewise.
5170	* libmu_scm/mu_port.c (mu_port_make_from_stream): Delegate
5171	buffering to mailutils streams layer.
5172	* libmu_scm/tests/.gitignore: New file.
5173	* libmu_scm/tests/Makefile.am: New file.
5174	* libmu_scm/tests/atlocal.in: New file.
5175	* libmu_scm/tests/const.at: New file.
5176	* libmu_scm/tests/mailbox-get-message.at: New file.
5177	* libmu_scm/tests/mailbox-get-size.at: New file.
5178	* libmu_scm/tests/mailbox-get-url.at: New file.
5179	* libmu_scm/tests/mailbox-iterate.at: New file.
5180	* libmu_scm/tests/mailbox-messages-count.at: New file.
5181	* libmu_scm/tests/mailbox-open-exc.at: New file.
5182	* libmu_scm/tests/mailbox-open.at: New file.
5183	* libmu_scm/tests/mailbox-print.at: New file.
5184	* libmu_scm/tests/message-create.at: New file.
5185	* libmu_scm/tests/message-print.at: New file.
5186	* libmu_scm/tests/testsuite.at: New file.
5187
51882018-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>
5189
5190	Switch to Guile 2.2.0.
5191
5192	* configure.ac" Set minimum supported Guile version to 2.2.0
5193	* libmu_scm/mu_body.c: Rewrite.
5194	* libmu_scm/mu_dbgport.c: Rewrite.
5195	* libmu_scm/mu_mailbox.c: Update types.
5196	* libmu_scm/mu_message.c: Likewise.
5197	* libmu_scm/mu_mime.c: Likewise.
5198	* libmu_scm/mu_port.c: Likewise.
5199
52002018-06-02  Sergey Poznyakoff  <gray@gnu.org>
5201
5202	Fix absolute name of the "missing" utility.
5203
5204	* am/bison.m4: Use $am_aux_dir. Take care to not expand $SHELL
5205	prematurely.
5206	* am/flex.m4: Likewise.
5207
52082018-05-16  Sergey Poznyakoff  <gray@gnu.org>
5209
5210	Fix the use of uninitialized variable.
5211
52122018-04-18  Sergey Poznyakoff  <gray@gnu.org>
5213
5214	Minor fixes in the mailutils-dbm utility.
5215
5216	* mu/libexec/dbm.c (write_quoted_string): Fix expected return
5217	from mu_wordsplit_c_quote_char.
5218	(add_records): Don't break on empty lines.
5219
52202018-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
5221
5222	Port wordsplit from grecs
5223	dae43f323db9578e656e3a6c53440e2365421af7.
5224
5225	* libmailutils/string/wordsplit.c (expvar): Gracefully handle
5226	NULL values in an ENV_KV environment.
5227	* include/mailutils/wordsplit.h: Fix typos
5228
52292018-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
5230
5231	Version 3.4.90; update copyright years.
5232
52332018-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
5234
5235	Add new date/time specifier for headline variable in mail.
5236
5237	The new %D specifier allows the user to supply arbitrary
5238	strftime(3) format string for outputting message date/time.
5239	E.g.:
5240
5241	 set headline="%4m %20D{%Y-%m-%dT%H:%M:%S} %18f %s"
5242	* mail/from.c (hdr_date): Take format from data, if supplied.
5243	(compile_headline): Handle the %D specifier
5244	* mail/util.c (util_do_command): Return immediately if command
5245	parsing failed.
5246	* mail/tests/D.at: New testcase.
5247	* mail/tests/Makefile.am: Add new testcase.
5248	* mail/tests/testsuite.at: Likewise.
5249	* NEWS: Document changes.
5250	* doc/texinfo/strftime.texi: New file.
5251	* doc/texinfo/Makefile.am: Add strftime.texi
5252	* doc/texinfo/mailutils.texi: Include strftime.texi
5253	* doc/texinfo/programs.texi: Document the %D format specifier.
5254
52552018-01-18  Sergey Poznyakoff  <gray@gnu.org>
5256
5257	Fix header field alignment in header output of the mail
5258	command.
5259
5260	* mail/from.c (compile_headline): Honor the alingment setting.
5261	* mail/tests/align.at: New testcase.
5262	* mail/tests/Makefile.am: Add new testcase.
5263	* mail/tests/testsuite.at: Include new testcase.
5264
52652018-01-18  Sergey Poznyakoff  <gray@gnu.org>
5266
5267	Minor fixes.
5268
5269	* doc/texinfo/mailutils.texi: Fix typos in the imap URL
5270	example.
5271	* libmailutils/locus/linetrack.c: Re-word the comment.
5272	* mimeview/grammar.y: Remove unnecessary assignment.
5273
52742017-12-29  Sergey Poznyakoff  <gray@gnu.org>
5275
5276	Fix memory management in imap4d.
5277
5278	* imap4d/io.c (imap4d_tokbuf_getline): Add missing index check.
5279	* imap4d/search.c (parse_simple_key): Don't free msgset (it
5280	will be freed later).
5281
52822017-12-17  Sergey Poznyakoff  <gray@gnu.org>
5283
5284	Update ChangeLog.amend.
5285
52862017-12-16  Sergey Poznyakoff  <gray@gnu.org>
5287
5288	Fix the operation of CRLF and CRLFDOT filters.
5289
5290	When encoding, these filters used to retain any existing CRLF
5291	sequences untouched on output. As a result, it was not possible
5292	to predict the number of characters output having the number of
5293	characters and number of lines on input. Due to this imap4d
5294	fetch would produce invalid literal output on FETCH command if
5295	the requested stream (usually body), contained a mixture of LF
5296	and CRLF terminated lines. Moreover, encode + decode operations
5297	would not be idempotent in this case.
5298
5299	To fix this, the default behavior of CRLF and CRLFDOT filter in
5300	encode mode is changed to translate each LF to CRLF, no matter
5301	what the prior character was. To invoke the former
5302	"normalizing" behavior, the "-n" option argument is provided
5303	for mu_filter_create_args.
5304
5305	* imap4d/fetch.c (fetch_io): Use raw stream when possible. Use
5306	a temporary CRLF translator to ensure proper positioning if
5307	start offset is specified. This is suboptimal (to say the very
5308	least) and will be fixed as soon as possible.
5309	* imap4d/io.c (io_enable_crlf): New function (hopefully
5310	temporary).
5311	* libmailutils/filter/crlfdot.c: When encoding, retain input
5312	CRLF only if the -n option was used when creating the filter.
5313	Otherwise, translate it to CRCRLF.
5314	* libmailutils/filter/crlfflt.c: Likewise.
5315	* libmailutils/stream/fltstream.c (filter_read): Make sure
5316	mu_filter_lastbuf is always emitted prior to closing the
5317	filter.
5318	(filter_seek): Clear flag_eof.
5319	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add dump
5320	and tocrlf.
5321	* libmailutils/tests/crlf.at: New test case.
5322	* libmailutils/tests/crlfdot.at: New test case.
5323	* libmailutils/tests/dump.c: New auxiliary program.
5324	* libmailutils/tests/tocrlf.c: Likewise.
5325	* libmailutils/tests/testsuite.at (MU_FILTER_TEST_NIBBLE)
5326	(MU_FILTER_TEST): New defines.
5327
53282017-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
5329
5330	Fix typos.
5331
53322017-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
5333
5334	Follow up to 78132d34.
5335
5336	* libmailutils/mime/mime.c (_mime_parse_mpart_message): Avoid
5337	segmentation violation on nbytes==0.
5338
53392017-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
5340
5341	MIME: part boundary in not required to be followed by a
5342	newline.
5343
5344	* libmailutils/mime/mime.c: Part boundary can be either
5345	followed by a newline, or appear at the very end of input.
5346	* testsuite/Makefile.am: Add mime01.at
5347	* testsuite/testsuite.at: Include mime01.at.
5348	* testsuite/mime01.at: New file.
5349	* testsuite/mime.at: Update expected output. Don't filter
5350	output through tr & sed.
5351	* testsuite/mimetest.c: Change output to make sure no trailing
5352	whitespace could be produced.
5353
53542017-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5355
5356	Bugfix.
5357
5358	* libmailutils/base/rfc2047.c (mu_rfc2047_encode): Fix
5359	compliance with RFC 2047, 4.3 (page 7). See FIXME, though.
5360	* libmailutils/tests/encode2047.at: Change expected output
5361
53622017-11-18  Sergey Poznyakoff  <gray@gnu.org>
5363
5364	Fix AM_GNU_MAILUTILS.
5365
5366	* mu-aux/mailutils.m4: Remove support for v. 1.2 and earlier.
5367
53682017-11-18  Sergey Poznyakoff  <gray@gnu.org>
5369
5370	Fix the use of uninitialized memory.
5371
5372	* mh/mh_alias_lex.l (push_source): Initialize locus range prior
5373	to copying to it.
5374	* libmailutils/cfg/parser.y (mu_cfg_tree_create_node):
5375	Likewise.
5376	* libmu_sieve/util.c: (mu_sieve_value_create): Likewise.
5377
53782017-11-10  Sergey Poznyakoff  <gray@gnu.org>
5379
5380	Minor fix in MH testsuite.
5381
5382	Running fmtcheck without .mh_profile triggers mh_install, which
5383	surprises the testsuite with unexpected output "I'm going to
5384	create the standard MH path for you." Defining the MH envar to
5385	an existing file name suppresses it.
5386
5387	* mh/tests/fmtcnd00.at: Always define MH prior to starting
5388	fmtcheck.
5389	* mh/tests/fmtcomp.at: Likewise.
5390	* mh/tests/fmtfunc.at: Likewise.
5391
53922017-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5393
5394	Pull wordsplit tests from grecs.
5395
5396	* libmailutils/string/wordsplit.c (_wsplt_alloc_die): use %s
5397	format spec.
5398	(mu_wordsplit_init): Use MU_WRDSX_ constants instead of
5399	numerics.
5400	(expvar): Remove useless gettext.
5401	* libmailutils/tests/wordsplit.at: Update.
5402
54032017-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5404
5405	Minor fix.
5406
5407	* mimeview/lexer.l (yyerror): Use explicit format spec.
5408
54092017-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
5410
5411	Improve support of MU_IOCTL_TCPSTREAM.
5412
5413	* libmailutils/stream/iostream.c (_iostream_ctl): Handle
5414	MU_IOCTL_TCPSTREAM
5415	* libmailutils/stream/logstream.c (_log_ctl): Propagate unknown
5416	codes to the transport stream.
5417	* libmailutils/stream/rdcache_stream.c (rdcache_ioctl):
5418	Likewise.
5419	* libmu_auth/tls.c (_tls_ioctl): Likewise.
5420	* libmu_auth/tlsiostr.c (_tls_io_ioctl): Likewise.
5421
54222017-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
5423
5424	Version 3.4.
5425
54262017-11-01  Sergey Poznyakoff  <gray@gnu.org>
5427
5428	Minor fix.
5429
54302017-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5431
5432	Improve socket and SMTP client API.
5433
5434	Split formatting functions into two distinct families.
5435	Functions prefixed with mu_sys_sockadrr deal with struct
5436	sockaddr, whereas those starting with mu_sockaddr deal with
5437	struct mu_sockaddr. Introduce special format for SMTP EHLO.
5438
5439	When sending EHLO to the remote party, use IP address in square
5440	brackets if hostname is empty.
5441
5442	* libmailutils/sockaddr/Makefile.am (libsockaddr_la_SOURCES):
5443	Add fromsock.c
5444	* libmailutils/sockaddr/fromsock.c: New function.
5445	* libmailutils/sockaddr/str.c (mu_sockaddr_format): Rewrite.
5446	(mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New
5447	functions.
5448	* include/mailutils/debug.h (mu_sockaddr_to_astr): Remove
5449	prototype.
5450	* include/mailutils/sockaddr.h (mu_sockaddr_format): New enum.
5451	(mu_sockaddr_format): change signature.
5452	(mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New
5453	prototypes.
5454	(mu_sockaddr_from_socket): New prototype.
5455	* include/mailutils/stream.h (MU_IOCTL_TCPSTREAM): New ioctl
5456	family;
5457	(MU_IOCTL_TCP_GETSOCKNAME): New ioctl opcode.
5458	* comsat/comsat.c: Use mu_sys_sockaddr_ interface to handle
5459	struct sockaddr.
5460	* lib/tcpwrap.c: Likewise.
5461	* libmailutils/server/ipsrv.c: Likewise.
5462	* libmailutils/server/msrv.c: Likewise.
5463	* libmailutils/stream/tcp.c (_tcp_ioctl): Handle
5464	MU_IOCTL_TCPSTREAM.
5465	* libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): If hostname is
5466	empty, use IP address in square brackets.
5467
54682017-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5469
5470	Bugfix.
5471
5472	* libmailutils/sockaddr/fromnode.c
5473	[!MAILUTILS_IPV6] (mu_sockaddr_from_node): Convert port to
5474	network order.
5475
54762017-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5477
5478	Bugfix in AM_MAILUTILS macro.
5479
5480	* mu-aux/mailutils.m4 (am_mu_vercmp): Ignore missing version
5481	parts.
5482
54832017-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5484
5485	Version 3.3.
5486
5487	* NEWS: Update.
5488	* configure.ac: Update.
5489	* Makefile.am (dist-hook): Fix conditional.
5490
54912017-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5492
5493	Minor change.
5494
5495	* libmailutils/mailbox/msgsave.c (mu_message_save_to_mailbox):
5496	Open destination in append mode.
5497
54982017-10-16  Sergey Poznyakoff  <gray@gnu.org>
5499
5500	Reimplement control escapes in mh_format.
5501
5502	This patch makes sure that (1) the value of the "num" register
5503	is not altered by evaluating the condition expressions and
5504	remains visible in the conditional branches, and (2) the value
5505	of the control escape is 1 or 0 depending on whether the last
5506	control condition succeeded or not.
5507
5508	* mh/mh_format.h: Implement numeric stack in the vm.
5509	(mhop_pushn,mhop_popn,mhop_xchgn): New opcodes.
5510	(mh_fvm) <numstack,maxstack,tos>: New members.
5511	* mh/mh_fmtgram.y (ctx_stack): Reallocate as necessary.
5512	(yylex_cond): Handle backslash continuations.
5513	(format_parse): Initialize and free ctx_stack
5514	(codegen_node): Reimplement control escapes. See the comment
5515	for explanation
5516	* mh/mh_format.c (mh_fvm_run): Use mh_string_init to initialize
5517	registers. Initialize stack. Implement push, popn, and xchgn
5518	(extract_labels,mh_format_dump_disass): Handle new opcodes.
5519	* mh/tests/fmtcnd00.at: New testcase.
5520	* mh/tests/Makefile.am: Add new testcase
5521	* mh/tests/testsuite.at: Likewise.
5522	* mh/tests/fmtcomp.at: Fix expected code dumps
5523
55242017-10-15  Sergey Poznyakoff  <gray@gnu.org>
5525
5526	Fix memory leaks in amd and assoc.
5527
55282017-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5529
5530	Version 3.2.94.
5531
55322017-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5533
5534	Use mu_prtstr to safely print string values.
5535
55362017-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5537
5538	Check for NULL return from mu_address_aget_ and
5539	mu_address_sget_ family functions.
5540
5541	It is possible that these functions return success and place
5542	NULL in the result variable. Make sure this possibility is
5543	checked throughout the code.
5544
5545	* libmailutils/base/usremail.c (mu_set_user_email): Check for
5546	NULL return value from mu_address_[as]get.
5547	* libmailutils/mailbox/msgenv.c (message_envelope_sender)
5548	* libmailutils/tests/addr.c (parse)
5549	* libmu_scm/mu_message.c (mu_scm_message_print):
5550	* libproto/mailer/prog.c (_expand_rcpt)
5551	* libproto/mailer/smtp.c (_rcpt_to_addr)
5552	(mu_address_sget_email)
5553	* maidag/lmtp.c (check_address):
5554	* mail/from.c (hdr_from):
5555	* mail/util.c (util_get_sender):
5556	* mh/mh_format.c (addr_cmp, builtin_proper) (builtin_addr,
5557	builtin_pers, builtin_note) (builtin_mbox, builtin_path,
5558	builtin_formataddr)
5559	* mh/mh_whom.c (scan_addrs):
5560	* libmu_sieve/util.c (mu_sieve_vlist_compare): Skip NULL
5561	returns from retr.
5562	* libmu_sieve/actions.c (check_redirect_loop): Error checking.
5563	* include/mailutils/types.hin (mu_prstr): New function.
5564	* libmu_cpp/address.cc: Use mu_prstr to ensure the printable
5565	representation of string.
5566	* python/libmu_py/address.c: Likewise.
5567	* libmu_scm/mu_address.c (_get_address_part): Likewise.
5568	* libmailutils/string/wordsplit.c (expvar): Treat NULL value as
5569	"".
5570
55712017-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5572
5573	Bugfix in mh.
5574
5575	* mh/mh_fmtgram.y (yylex_func): Accept negative numbers.
5576
55772017-10-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5578
5579	Minor fix.
5580
5581	* libmailutils/mime/mimehdr.c (_mime_header_parse): Preserve
5582	charset no matter what lang setting is.
5583
55842017-10-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5585
5586	bugfix in imap4d: INBOX name is case-insensitive.
5587
55882017-09-27  Sergey Poznyakoff  <gray@gnu.org.ua>
5589
5590	Assume UTC for IMAP internaldate.
5591
5592	* include/mailutils/datetime.h (mu_datetime_tz_utc): New proto.
5593	* libmailutils/datetime/tzutc.c: New file.
5594	* libmailutils/datetime/Makefile.am: Add tzutc.c
5595	* imap4d/fetch.c (_frt_internaldate): Assume UTC for
5596	internaldate.
5597	* libproto/imap/fetch.c (_date_mapper): Likewise.
5598	* mh/send.c: Improve diagnostics.
5599
56002017-09-27  Sergey Poznyakoff  <gray@gnu.org>
5601
5602	Fix build without libtool.
5603
5604	* libmu_sieve/load.c [!HAVE_LIBLTDL] (mu_sieve_unload_ext):
5605	Dummy function.
5606	[!HAVE_LIBLTDL] (mu_sieve_load_ext, mu_i_sv_load_add_dir): Set
5607	errno. Fix return value.
5608	* mu-aux/gylwrap (yysym): Add more symbols
5609	(dumpme): Skip old contents of the BOOTSTRAP section up to the
5610	next POD keyword.
5611	* mu/libexec/Makefile.am (MUTOOL_LIBRARIES_TAIL): Fix ordering
5612	of libraries.
5613
56142017-09-27  Sergey Poznyakoff  <gray@gnu.org>
5615
5616	Minor fix.
5617
56182017-07-29  Sergey Poznyakoff  <gray@gnu.org.ua>
5619
5620	Implement new MH format primitives (for compatibility with
5621	nmh).
5622
5623	* mh/etc/replcomps: Use localmbox instead of me.
5624	* mh/etc/replgroupcomps: Likewise.
5625	* mh/mh.h (mh_get_my_real_name)
5626	(mh_get_my_user_name,mh_my_host): New protos.
5627	(mh_my_email): Change prototype.
5628	* mh/mh_format.c (builtin_me): Use mh_get_my_user_name.
5629	(builtin_myhost,builtin_myname,builtin_localmbox): New
5630	functions.
5631	(builtin_formataddr): Preserve collected data if the address is
5632	not parseable.
5633	(builtin_tab): New functions: myhost, myname, localmbox.
5634	* mh/mh_init.c (mh_local_mailbox): New function.
5635	(mh_get_my_real_name)
5636	(mh_get_my_user_name,mh_my_host): New functions.
5637	* mh/repl.c (set_group): Don't overwrite any prior -form or
5638	-format options.
5639
56402017-07-14  Sergey Poznyakoff  <gray@gnu.org>
5641
5642	Bugfix.
5643
5644	* mail/send.c (add_body): Increase reference counter of the
5645	copied stream.
5646
56472017-07-07  Sergey Poznyakoff  <gray@gnu.org>
5648
5649	Bugfixes in MH format code generator.
5650
5651	* mh/mh_fmtgram.y (mh_read_formfile): Remove only the last
5652	trailing newline.
5653	(codegen_node): Don't emit spurious clear register statements
5654	at the end of the "else" branch. Optimize if no "else" branch
5655	is present.
5656	* mh/mh_format.c (mh_fvm_run) <mhop_brzn, mhop_brzs>: Leave the
5657	result of condition evaluation in num.
5658	(builtin_tab): rcpt takes literal argument.
5659	* mh/scan.c (action): Remove unused argument.
5660	* mh/tests/fmtcomp.at: Update the "if-else" test.
5661
56622017-07-07  Sergey Poznyakoff  <gray@gnu.org>
5663
5664	Simplify mh_fvm_run calling sequence.
5665
5666	The commit 6b16ba19 (in its changes to mh/mh_format.c)
5667	inadvertently broke the operation of inc on folders with gaps
5668	in sequence (UID) numbering. It turns out that the msgno
5669	argument to mh_fvm_run (and msgno member in struct mh_fvm) can
5670	be disposed of. If the caller wants to supply an explicit UID
5671	number of the message, it should use mu_message_set_uid.
5672
5673	* mh/mh.h (mh_fvm_run): Take only two arguments: fvm and
5674	message.
5675	* mh/mh_format.h (mh_fvm) <msgno>: Remove.
5676	* mh/fmtcheck.c (run): Set the uid accessor on the created
5677	message.
5678	* mh/mh_format.c (mh_format_str): Likewise.
5679	(builtin_msg, builtin_cur): Always call mh_message_number.
5680	* mh/inc.c: Update calls to mh_fvm_run
5681	* mh/repl.c: Likewise.
5682	* mh/scan.c: Likewise.
5683	* mh/sortm.c: Likewise.
5684	* mh/tests/inc.at: Check whether inc on folders with gaps in
5685	message UIDs produces the correct output.
5686
56872017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5688
5689	Bugfix.
5690
5691	* mu-aux/gylwrap (filter): $yyrx is always defined after
5692	ce4b84ab. Use $yyrepl instead.
5693
56942017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5695
5696	Implement new opool function.
5697
5698	* include/mailutils/opool.h (mu_opool_less): New function.
5699	* libmailutils/base/opool.c: Likewise.
5700
57012017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5702
5703	Rewrite rfc822 date parser.
5704
5705	* include/mailutils/parse822.h (mu_parse822_day)
5706	(mu_parse822_date,mu_parse822_time): Remove protos.
5707	* libmailutils/address/parse822.c (mu_parse822_date_time):
5708	Rewrite via mu_scan_datetime.
5709
57102017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5711
5712	Start rewriting parse822.
5713
5714	* include/mailutils/cctype.h (MU_CTYPE_IMSPC)
5715	(MU_CTYPE_NWCTL,MU_CTYPE_IMATM): New classes.
5716	(mu_isimspc,mu_isnwctl,mu_isimatm): New macros
5717	* libmailutils/string/muctype.c: Mark characters from the above
5718	classes.
5719	* include/mailutils/parse822.h (mu_parse822_is_char)
5720	(mu_parse822_is_digit,mu_parse822_is_ctl)
5721	(mu_parse822_is_space,mu_parse822_is_htab)
5722	(mu_parse822_is_lwsp_char,mu_parse822_is_special)
5723	(mu_parse822_is_atom_char,mu_parse822_is_q_text)
5724	(mu_parse822_is_d_text,mu_parse822_is_smtp_q): Rewrite as
5725	inline static functions, using macros from cctype.h
5726	* libmailutils/address/parse822.c: See above.
5727	(parse822_is_atom_char_ex): Remove.
5728
57292017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5730
5731	Bootstrap gylwrap.
5732
5733	This removes the need for List::Regexp during development
5734
57352017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5736
5737	Improve gylwrap.
5738
5739	This change allows the user to pre-compile the yyrx expression
5740	in gylwrap so that it no longer requires the List::Regexp
5741	module. Only supplying the --yysym module will require the
5742	module.
5743
5744	* mu-aux/gylwrap: New options --reset and --dump
5745
57462017-07-06  Sergey Poznyakoff  <gray@gnu.org>
5747
5748	Bugfix.
5749
5750	* am/flex.m4: Add missing 'fi'
5751
57522017-07-05  Sergey Poznyakoff  <gray@gnu.org>
5753
5754	Fix VI_REVISION and VI_AGE in configure.ac.
5755
57562017-07-05  Sergey Poznyakoff  <gray@gnu.org>
5757
5758	Fix the nohost MH format function.
5759
57602017-07-05  Sergey Poznyakoff  <gray@gnu.org>
5761
5762	MH: Rewrite the mymbox function.
5763
5764	* mh/mh_init.c (emailcmp): Rewrite.
5765	(email_match): New function.
5766	(mh_is_my_name): Cache Alternate-Mailboxes and mh_my_email in a
5767	static mu_address_t; use email_match to compare.
5768	* mh/tests/fmtfunc.at: Test mymbox function.
5769
57702017-07-04  Sergey Poznyakoff  <gray@gnu.org>
5771
5772	Add more fmtfunc tests.
5773
57742017-07-04  Sergey Poznyakoff  <gray@gnu.org>
5775
5776	Minor fixes.
5777
5778	* mh/mh_fmtgram.y (yyerror): Cast * arguments to int
5779	* mh/mh_format.h (mh_instr_t)<size>: New member.
5780	* mh/tests/fmtfunc.at (FMTFUNC): Enforce Charset:auto.
5781
57822017-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5783
5784	mu_parse_date_dtl: Minor fix.
5785
5786	* libmailutils/datetime/parsedate.y (mu_parse_date_dtl): Set
5787	tm.tm_gmtoff and tm.tm_zone upon return (if present).
5788
57892017-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5790
5791	Improve parsedate & related MH formats.
5792
5793	* libmailutils/datetime/parsedate.y (spec production): If a
5794	non-signed number is given, treat it as a (positive) timezone,
5795	unless tz is already set, or as a year number, unless a year is
5796	already set, or throw an error otherwise.
5797	(mu_parse_date_dtl): Revert sign of the returned utc_offset
5798	* mh/mh_format.c (builtin_tzone): Compatibility fix
5799	* mh/tests/fmtfunc.at: Test more functions.
5800
58012017-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5802
5803	Revamp MH datetime format functions.
5804
5805	* mh/mh_format.c (_parse_date): Use mu_parse_date_dtl instead
5806	of much stricter mu_parse822_date_time. Return more info. All
5807	callers changed
5808	(builtin_sday,builtin_szone): Implemented
5809	* mh/tests/fmtfunc.at: Comment out (temporarily) the tzone test
5810
58112017-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5812
5813	Move parsedate.y from base to datetime library.
5814
58152017-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5816
5817	Improve parsedate parser.
5818
5819	* include/mailutils/datetime.h (MU_PD_MASK_*): New defines,
5820	taken from parsedate.y
5821	(mu_parse_date_dtl): New proto.
5822	* libmailutils/base/parsedate.y: Remove obsolete defines. Move
5823	PD_MASK_ defines to datetime.h; use functions from cctype.h and
5824	cstr.h
5825	(pd_date) <tzname>: New member
5826	(%union): New member tz
5827	(T_ZONE,T_DAYZONE): Change type to <tz>
5828	(zone productions): Set tzname.
5829	(mu_parse_date_dtl): New function. Returns detailed time
5830	information.
5831	(mu_parse_date): Rewrite as an entry point to mu_parse_date_dtl
5832
58332017-07-03  Sergey Poznyakoff  <gray@gnu.org.ua>
5834
5835	Test mh format date functions.
5836
5837	* mh/mh_format.c (builtin_sday, builtin_szone): Mark as not
5838	implemented
5839	(builtin_zone): Fix output
5840	(builtin_tzone): Fix output
5841	* mh/tests/fmtfunc.at: Test most date functions.
5842
58432017-07-03  Sergey Poznyakoff  <gray@gnu.org.ua>
5844
5845	Bugfix.
5846
5847	* libmailutils/address/parse822.c (mu_parse822_date_time): Set
5848	tm_yday
5849
58502017-07-03  Sergey Poznyakoff  <gray@gnu.org.ua>
5851
5852	fmtcheck: use symbolic label names by default.
5853
5854	Actual program counters may differ between different
5855	architecture, so avoid using them in the testsuite.
5856
5857	* mh/fmtcheck.c: New option -pc requires printing program
5858	counters. Unless this option is used, -disass prints only
5859	labels where needed.
5860	* mh/mh.h (mh_format_dump_disass): Change signature.
5861	* mh/mh_format.c (mh_format_dump_disass): Take additional flag
5862	indicating whether to print program counters. Compute and print
5863	program labels, unless this flag is non-zero.
5864	* mh/tests/fmtcomp.at: Don't expect program counters in
5865	disassembled code.
5866
58672017-07-02  Sergey Poznyakoff  <gray@gnu.org.ua>
5868
5869	MH: fix formataddr.
5870
5871	* mh/mh_fmtgram.y (emit_funcall): Emit mhop_movs acc, reg if
5872	MHA_ACC flag is set.
5873	* mh/mh_format.c (mh_fvm_run): Clear all registers.
5874	(builtin_formataddr): Get previously accumulated addresses from
5875	R_ACC
5876	(builtin_tab): Mark formataddr with MHA_ACC, remove MHA_OPTARG
5877	(mh_format_dump_disass): Account for the new register.
5878	(mh_fvm_destroy): Free all registers.
5879	* mh/mh_format.h: New register R_ACC. It is needed to implement
5880	proper formataddr and concataddr functionality.
5881	* mh/tests/fmtcomp.at: Update.
5882	* mh/tests/fmtfunc.at: Update.
5883
58842017-07-02  Sergey Poznyakoff  <gray@gnu.org.ua>
5885
5886	MH: fix the nodate format function.
5887
5888	* mh/mh_format.c (builtin_nodate): Call mu_parse822_date_time
5889	directly.
5890	(mh_format_dump_disass): Escape literal strings on output.
5891	* mh/tests/fmtfunc.at: Test nodate.
5892
58932017-07-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5894
5895	Minor fixes.
5896
58972017-07-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5898
5899	MH format: fix processing of special functions: putstrf,
5900	putnumf, lit, and num.
5901
5902	* mh/mh_fmtgram.y (node): Replace noprint with printflag.
5903	(escape production): Consult printflag to decide whether to amd
5904	how to print
5905	(funcall production): Rewrite logic
5906	(yylex_func): Make a clear distinction between literals and
5907	inlined ctls, which require leading whitespace, and funcalls
5908	and components, that don't tolerate it.
5909	(emit_funcall): Process special functions separately
5910	* mh/mh_format.c (builtin_tab): Mark lit, num, putstrf, and
5911	putnumf as specials.
5912	* mh/mh_format.h: Revamp MHA_ flags
5913	* mh/tests/fmtcomp.at: Update.
5914	* mh/tests/fmtfunc.at: Add tests for putstrf and putnumf
5915
59162017-07-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5917
5918	MH: Fix mh_builtin field misnomer.
5919
59202017-07-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5921
5922	More fixes in MH format parser.
5923
5924	* mh/mh_fmtgram.y (codegen_node): Generate mhop_printlit
5925	instruction for fmtnode_print node with a literal or number
5926	argument.
5927	* mh/mh_format.c (mh_fvm_run): Handle mhop_printlit
5928	* mh/mh_format.h (mhop_printlit): New opcode.
5929	* mh/tests/fmtcomp.at: Update.
5930	* mh/tests/fmtfunc.at: Add more tests.
5931
59322017-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
5933
5934	Improve MH format parser.
5935
5936	* mh/fmtcheck.c (main): Assume -dump if no input message and no
5937	-disass is given.
5938	* mh/mh_fmtgram.y: Enable error-verbose mode
5939	(funcall production): Use MHA_OPTARG_NIL flag to provide 0 (or
5940	"") default argument.
5941	(yyerror): Improve location printer
5942	(yylex_initial): Correctly handle %%
5943	* mh/mh_format.c (mh_string_move): Rename to mh_string_copy
5944	(builtin_msg, builtin_cur): Try to obtain message number only
5945	if msgno is 0.
5946	(builtin_tab): Fix definitions of comp, lit, and num
5947	(mh_format_dump_disass): Print width.
5948	* mh/mh_format.h (MHA_OPTARG_NIL): New flag.
5949	* mh/tests/fmtcomp.at: New file.
5950	* mh/tests/fmtfunc.at: New file.
5951	* mh/tests/Makefile.am: Add new files.
5952	* mh/tests/testsuite.at: Likewise.
5953	* mh/tests/atlocal.in (MHETCDIR): New variable.
5954	* mh/tests/scan.at: Test external formats.
5955
59562017-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
5957
5958	Introduce explicit data type for MH format virtual machine.
5959
5960	* mh/mh.h (mh_fvm_t): New typedef.
5961	(mh_format): Remove. (mh_fvm_create,mh_fvm_destroy)
5962	(mh_fvm_set_output,mh_fvm_set_width)
5963	(mh_fvm_set_format,mh_fvm_run): New protos.
5964	* mh/mh_format.c: Likewise.
5965	* mh/mh_format.h (mh_machine): Rename to mh_fvm
5966	* mh/fmtcheck.c: Rewrite using mh_fvm_ functions.
5967	* mh/inc.c: Likewise.
5968	* mh/mh_list.c (print_header_value): Likewise.
5969	* mh/repl.c: Likewise.
5970	* mh/scan.c: Likewise.
5971	* mh/sortm.c: Likewise.
5972
59732017-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
5974
5975	Restore version output expected by mh-e.
5976
5977	* mh/mh_getopt.c (mh_version_hook): Print version in format
5978	expected by mh-e
5979	(process_std_options): Produce usual version output when
5980	responding to --version
5981
59822017-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
5983
5984	Add special flag for debugging MH format parser.
5985
5986	* mh/mh.h (MH_FMT_PARSE_DEBUG): New flag.
5987	* mh/fmtcheck.c: Pass the MH_FMT_PARSE_DEBUG flag, if required.
5988	* mh/mh_fmtgram.y (mh_format_debug): Remove.
5989	(format_parse): Enable debugging if MH_FMT_PARSE_DEBUG flag is
5990	set
5991
59922017-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
5993
5994	MH: minor fix in format lexer.
5995
5996	* mh/mh_fmtgram.y (yylex): Don't return empty strings
5997
59982017-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
5999
6000	Improve mhl format parser.
6001
6002	* mh/mh_list.c: Keep track of input locations
6003
60042017-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
6005
6006	Fix wordsplit MU_WRDSF_INCREMENTAL | MU_WRDSF_NOSPLIT.
6007
6008	* libmailutils/string/wordsplit.c (mu_wordsplit_process_list):
6009	Update wsp->ws_endp in nosplit mode
6010	* libmailutils/tests/wordsplit.at: Test incremental nosplit
6011
60122017-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
6013
6014	Bugfix in libdatetime.
6015
6016	* libmailutils/datetime/utcoff.c (mu_utc_offset): Correct the
6017	difference if computed at the break of a day.
6018
60192017-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
6020
6021	Improve format parser API.
6022
6023	* mh/scanfmt.c: New file.
6024	* mh/Makefile.am: Add scanfmt.c
6025	* mh/mh.h (mh_list_format): Remove extern
6026	(mh_format_parse): Remove proto.
6027	(mh_format_string_parse,mh_format_file_parse)
6028	(mh_scan_format): New functions.
6029	(mh_audit_open, mh_audit_close): Operate on mu_stream_t,
6030	instead of FILE*.
6031	* mh/mh_fmtgram.y (mh_format_string_parse)
6032	(mh_format_file_parse): New functions.
6033	* mh/mh_format.c (print_fmt_string): Make sure trailing newline
6034	is output, even if it is the Nth character on the line
6035	(N=width).
6036	* mh/mh_getopt.c (mh_opt_parse_formfile)
6037	(mh_opt_parse_format): New functions.
6038	* mh/mh_getopt.h (mh_opt_parse_formfile)
6039	(mh_opt_parse_format): New protos.
6040	* mh/mh_init.c (mh_list_format): Remove.
6041	(mh_audit_open, mh_audit_close): Operate on mu_stream_t,
6042	instead of FILE*.
6043	* mh/fmtcheck.c: Use new format parsing API.
6044	* mh/inc.c: Likewise.
6045	* mh/mh_list.c: Likewise.
6046	* mh/repl.c: Likewise.
6047	* mh/scan.c: Likewise.
6048	* mh/sortm.c: Likewise.
6049
60502017-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
6051
6052	MH: Fix repl formats.
6053
6054	* mh/etc/replcomps: Replace calls to %(concat)
6055	* mh/etc/replgroupcomps: Likewise.
6056	* mh/repl.c: Fix embedded format.
6057
60582017-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
6059
6060	MH format: fix location tracking and error diagnostics.
6061
6062	* mh/mh_fmtgram.y: Use mu_linetrack_t to keep track of input
6063	location. Handle %; comments.
6064	* mh/mh_format.c (mh_format): Change semantics of mhop_atoi and
6065	mhop_itoa.
6066	(builtin_tab): Fix returns types of trim, date2local, and
6067	date2gmt.
6068	* mh/mh_format.h: Document changes.
6069	* mh/mh_init.c (mh_read_formfile): Read entire file.
6070
60712017-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
6072
6073	Fix mu_diag_at_locus_range and mu_vdiag_at_locus_range.
6074
6075	* libmailutils/diag/diag.c (mu_vdiag_at_locus_range): Reset
6076	stream mode.
6077
60782017-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
6079
6080	Further work on format vm.
6081
6082	* mh/mh.h (mh_format): Change signature.
6083	(MH_FMT_FORCENL): New define.
6084	* mh/mh_format.h (MHA_OPT_CLEAR): Remove.
6085	(MHA_LITERAL,MHA_VOID): New flags.
6086	(mh_machine) <flags>: New member.
6087	* mh/mh_fmtgram.y (funcall production): Fix argument
6088	interpretation
6089	(else_part production): Allow for empty expression.
6090	(token_function): Use MU_CTYPE_IDENT instead of the more
6091	restrictive MU_CTYPE_ALPHA.
6092	* mh/mh_format.c (node_free): Accept NULL as argument
6093	(emit_funcall): Assign literal arguments to R_ARG registers
6094	(codegen_node): Fix coding the mhop_setn instruction. Clear
6095	both str and reg if the ELSE part of a conditional is empty.
6096	(mh_string_load): Fix size computation.
6097	(mh_string_move): Don't clear the source register.
6098	(mh_format): Reorder parameters, pass flags as 6th parameter.
6099	Emit final newline if MH_FMT_FORCENL is set, unless the last
6100	character output is newline.
6101	(mh_format_str): Rewrite function.
6102	(builtin_lit): Implement
6103	(builtin_friendly): Fix register assignment
6104	(builtin_addr): Pass R_ARG to R_REG verbatim, if it cannot be
6105	parsed as a RFC822 address.
6106	(builtin_decode): Don't clear str reg.
6107	(builtin_concat): Remove. The implementation contradicts the
6108	principles of the format VM; besides, the same functionality
6109	could be easily achieved by using ctls
6110	(builtin_tab): Put additional flags
6111	* mh/fmtcheck.c (run): Update call to mh_format
6112	* mh/inc.c (list_message): Likewise. Emit warning about
6113	not-implemented audit feature.
6114	* mh/mh_list.c (_destroy_value): Remove spurious call to
6115	free().
6116	* mh/repl.c: Fix calls to mh_format and mh_format_parse.
6117	* mh/scan.c: Likewise.
6118	* mh/sortm.c: Likewise.
6119
61202017-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
6121
6122	Improve cctype API.
6123
6124	* include/mailutils/cctype.h (MU_CTYPE_IDENT)
6125	(MU_CTYPE_HEADR): New character classes.
6126	(mu_isident,mu_isheadr): New macros.
6127	* libmailutils/string/muctype.c: Mark valid identifier and
6128	header constituents as such.
6129
61302017-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
6131
6132	Fix premature push.
6133
61342017-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
6135
6136	Start rewriting MH format functions.
6137
6138	* mh/fmtcheck.c: New option -disassemble
6139	* mh/mh.h: Move format-related declarations to mh_format.h
6140	(mh_format_parse): Change signature.
6141	(mh_format): Change signature. (mh_format_dump_code)
6142	(mh_format_dump_disass): New protos.
6143	(mh_decode_2047): Change signature.
6144	* mh/mh_fmtgram.y: Rewrite from scratch. First, build a parse
6145	tree, then use it to generate code.
6146	* mh/mh_format.c: Rewrite from scratch.
6147	* mh/mh_format.h: Move format-related declarations from mh.h
6148	* mh/mh_init.c (mh_decode_2047): Text is const.
6149	* mh/mh_list.c: Fix calls to mh_format_parse and related
6150	objects.
6151
61522017-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
6153
6154	Start rewriting MH format functions.
6155
6156	* mh/fmtcheck.c: New option -disassemble
6157	* mh/mh.h: Move format-related declarations to mh_format.h
6158	(mh_format_parse): Change signature.
6159	(mh_format): Change signature. (mh_format_dump_code)
6160	(mh_format_dump_disass): New protos.
6161	(mh_decode_2047): Change signature.
6162	* mh/mh_fmtgram.y: Rewrite from scratch. First, build a parse
6163	tree, then use it to generate code.
6164	* mh/mh_format.c: Rewrite from scratch.
6165	* mh/mh_format.h: Move format-related declarations from mh.h
6166	* mh/mh_init.c (mh_decode_2047): Text is const.
6167	* mh/mh_list.c: Fix calls to mh_format_parse and related
6168	objects.
6169
61702017-06-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6171
6172	mh: determine output width automatically.
6173
6174	* mh/fmtcheck.c: Take file name as optional argument. Run
6175	format on it, if supplied
6176	* mh/mh.h (mh_width): New proto.
6177	* mh/inc.c: Don't initialize width.
6178	* mh/mh_format.c (mh_format): Use mh_width, if width is 0.
6179	* mh/mh_list.c (mhl_format_run): Use mh_width, if width is 0.
6180	* mh/mh_init.c (mh_width): New function.
6181	* mh/repl.c: Likewise.
6182	* mh/scan.c: Likewise.
6183	* mh/sortm.c: Likewise. New option -width
6184
61852017-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6186
6187	Revert previous commit.  Require gettext 0.19.
6188
61892017-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6190
6191	Remove gettext version requirement.
6192
61932017-06-20  Sergey Poznyakoff  <gray@gnu.org>
6194
6195	Version 3.2.93.
6196
61972017-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6198
6199	Rework emitting source locations in sieve code.
6200
6201	* include/mailutils/locus.h (mu_locus_point_eq): New function.
6202	* libmu_sieve/prog.c (mu_i_sv_code): Emit the
6203	_mu_i_sv_instr_locus if locus changed.
6204	(mu_i_sv_locus): Raise the changeloc flag and set the locus,
6205	instead of immediately emitting location change code.
6206	* libmu_sieve/runtime.c (_mu_i_sv_instr_locus): New function.
6207	(_mu_i_sv_instr_source,_mu_i_sv_instr_line)
6208	(_mu_i_sv_instr_col): Remove.
6209	* libmu_sieve/sieve-priv.h (mu_sieve_machine) <changeloc>: New
6210	member.
6211
62122017-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6213
6214	Bugfix in sieve library.
6215
6216	* libmu_sieve/sieve-gram.y: Add missing assignment to $$ in
6217	testlist production. This fixes improper handling of anyof and
6218	allof
6219
62202017-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6221
6222	Commit missing file.
6223
62242017-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6225
6226	API for formatting message sets on output.
6227
6228	* libmailutils/msgset/print.c (mu_msgset_formats): New global.
6229	(mu_stream_msgset_format): New function.
6230	* include/mailutils/msgset.h (mu_msgset_format): New struct.
6231	(mu_msgset_fmt_imap, mu_msgset_fmt_mh): New defines.
6232	(MU_MSGSET_IGNORE_TRANSERR): New flag
6233	(mu_msgset_copy, mu_msgset_translate): New protos.
6234	(mu_stream_msgset_format, mu_msgset_imap_print): New protos.
6235	(mu_msgset_print): Deprecate.
6236	* libmailutils/imapio/sendmsgset.c: Use mu_msgset_imap_print
6237	instead of mu_msgset_print.
6238	* mu/libexec/imap.c: Likewise.
6239	* libmailutils/msgset/Makefile.am: Add copy.c
6240	* libmailutils/msgset/add.c (mu_msgset_add_range): Translate if
6241	message set mode doesn't match the requested one.
6242	* libmailutils/msgset/sub.c (mu_msgset_sub_range): Likewise.
6243	* libmailutils/msgset/trans.c (_mu_msgset_translate_pair): Act
6244	according to the mode argument.
6245	(mu_msgset_translate): New function.
6246	* libmailutils/tests/msgset.c: New option -mh
6247	* mh/mh_sequence.c (write_sequence): Rewrite.
6248	* testsuite/msgset.c: Optionally translate uids to msgnums and
6249	vice-versa.
6250
62512017-06-18  Sergey Poznyakoff  <gray@gnu.org>
6252
6253	refile: eliminate refiled messages from all sequences.
6254
6255	* mh/Makefile.am: Add seqelim.c
6256	* mh/mh.h (mh_sequences_elim): New proto.
6257	* mh/seqelim.c: New file.
6258	* mh/refile.c (main): Fixup sequences after refiling.
6259	* mh/rmm.c: Fixup sequences using mh_sequences_elim
6260
62612017-06-18  Sergey Poznyakoff  <gray@gnu.org>
6262
6263	linetrack: handle #line directives without file name.
6264
6265	* include/mailutils/diag.h (mu_vdiag_at_locus_range): New
6266	proto.
6267	* libmailutils/locus/linetrack.c (mu_linetrack_origin): accept
6268	locus point with mu_file==NULL. Reuse current file name in this
6269	case. This is to simplify handling of #line directives without
6270	file name.
6271	* libmailutils/tests/linetrack.c: Implement #line directive.
6272	* libmailutils/tests/linetrack.at: Add new test.
6273
62742017-06-18  Sergey Poznyakoff  <gray@gnu.org>
6275
6276	Improve line tracker.
6277
6278	The new version is able to hold input history from several
6279	source lines, which makes it easier to implement #line
6280	directives in lexers.
6281
6282	* include/mailutils/locus.h (mu_linetrack_stat): Remove
6283	start_line
6284	(mu_linetrack_origin): New proto.
6285	* libmailutils/locus/linetrack.c: Improve indexing. Keep track
6286	of several input files.
6287	* libmailutils/tests/linetrack.at: Add new tests.
6288	* libmailutils/tests/linetrack.c: Improve command set.
6289	* mimeview/grammar.y (make_node): Initialize locus
6290
62912017-06-17  Sergey Poznyakoff  <gray@gnu.org>
6292
6293	Minor change in the testsuite.
6294
6295	* mh/tests/send.at: Make expected text version-independent
6296
62972017-06-16  Sergey Poznyakoff  <gray@gnu.org.ua>
6298
6299	Version 3.2.92.
6300
63012017-06-15  Sergey Poznyakoff  <gray@gnu.org>
6302
6303	Make sure all loci are properly initialized before first use.
6304
6305	Clean up semantics of initializers. Each locus type can be
6306	initialized either statically (by assigning the
6307	MU_LOCUS_*_INITIALIZER macro), or dynamically (by calling
6308	mu_locus_*_init function). Whatever method is used, it is
6309	important that it be initialized prior to using any other
6310	mu_locus_* function.
6311
6312	* include/mailutils/locus.h (mu_locus_point_init): Takes single
6313	argument. Returns nothing.
6314	(mu_locus_range_init): New proto.
6315	* libmailutils/locus/locus.c (mu_locus_point_init): Rewrite.
6316	(mu_locus_range_init): New function.
6317	* libmailutils/cfg/parser.y (mu_cfg_alloc_node): Initialize
6318	locus.
6319	* libmailutils/tests/logstr.c: Fix printf argument types.
6320	* libmu_sieve/extensions/moderator.c
6321	(moderator_filter_message): Initialize locus.
6322	* libmu_sieve/sieve-gram.y (node_alloc): Likewise.
6323	* mu/libexec/logger.c (parse_locus_point, set_locus): Likewise.
6324
63252017-06-15  Sergey Poznyakoff  <gray@gnu.org.ua>
6326
6327	Fix id reference counting.
6328
6329	* include/mailutils/locus.h: Add copyleft.
6330	(mu_ident_stat): New proto.
6331	* include/mailutils/types.hin (mu_locus_DEPRECATED): Update
6332	commit. Include link to the wiki article.
6333	* include/mailutils/yyloc.h: Add copyleft.
6334	* libmailutils/locus/ident.c (mu_ident_stat): New function.
6335	* libmailutils/locus/locus.c (mu_locus_point_init)
6336	(mu_locus_point_copy): Don't touch destination unless setting
6337	mu_file member succeeds.
6338	(mu_locus_range_copy): deinitialize dest before assignment.
6339	* libmailutils/stream/logstream.c (_log_write): Use
6340	mu_locus_range_copy to save locus.
6341	(mu_ioctl_logstream_get_locus_deprecated)
6342	(mu_ioctl_logstream_set_locus_deprecated): Include link to the
6343	wiki article.
6344	* libmailutils/tests/linetrack.c (main): Destroy tracker before
6345	exiting.
6346	* libmailutils/tests/logstr.c: Make it possible to run selected
6347	tests.
6348
63492017-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
6350
6351	Require bison and flex.
6352
6353	These are needed only during development cycle, as the created
6354	sources are included in the tarball.
6355
6356	* am/bison.m4: New file.
6357	* am/flex.m4: New file.
6358	* configure.ac: Use MU_PROG_BISON and MU_PROG_FLEX
6359	* mu-aux/gylwrap: Drop support for alternative command line
6360	syntax and the --stdout option.
6361
63622017-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
6363
6364	Provide backward compatibility layer for deprecated functions.
6365
6366	* include/mailutils/sieve.h (mu_sieve_compile_text): New proto.
6367	(mu_sieve_compile_buffer): Backward-compatible proto.
6368	* include/mailutils/stream.h
6369	((MU_IOCTL_LOGSTREAM_GET_LOCUS_DEPRECATED)
6370	(MU_IOCTL_LOGSTREAM_SET_LOCUS_DEPRECATED): New defines.
6371	(MU_IOCTL_LOGSTREAM_GET_LOCUS)
6372	(MU_IOCTL_LOGSTREAM_SET_LOCUS): Use external functions to make
6373	sure any references to these are marked as deprecated.
6374	* include/mailutils/types.hin (mu_locus_DEPRECATED): New
6375	struct.
6376	(mu_locus): Define to mu_locus_DEPRECATED
6377	* libmailutils/stream/logstream.c (_log_ctl): Handle the
6378	deprecated ctls.
6379	* libmu_sieve/extensions/moderator.c
6380	(moderator_filter_message): Use mu_sieve_compile_text.
6381	* libmu_sieve/sieve-gram.y (mu_sieve_compile_buffer): Rename to
6382	mu_sieve_compile_text. Re-introduce it as a
6383	backward-compatibility API.
6384	* sieve/sieve.c: Call mu_sieve_compile_text instead of
6385	mu_sieve_compile_buffer.
6386
63872017-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
6388
6389	Lex-related fixes.
6390
6391	* mu-aux/gylwrap (@yysym): Add more symbols from lex.
6392	* mh/mh_alias_lex.l (mh_alias_read): Return meaningful value.
6393
63942017-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
6395
6396	Bugfixes.
6397
6398	* libmu_sieve/sieve-lex.l: Allocate new ctx structure (restore
6399	accidentally deleted file.
6400	* libmailutils/locus/debug.c: Add missing copyleft.
6401	* libmailutils/locus/genprloc.c: Likewise.
6402	* libmailutils/locus/ident.c: Likewise.
6403	* libmailutils/locus/linetrack.c: Likewise.
6404	* libmailutils/locus/locus.c: Likewise.
6405	* mu-aux/gencl: Likewise.
6406	* mu-aux/gitinfo: Likewise.
6407	* mu-aux/gylwrap: Likewise.
6408
64092017-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6410
6411	Switch mh_aliases to line tracker.
6412
6413	* mh/mh.h (ali_parse_error): Remove.
6414	* mh/mh_alias_gram.y: Simplify parser. Use location tracking.
6415	* mh/mh_alias_lex.l: Switch to mu_linetrack facility
6416	* mh/tests/ali.at: Update expected location.
6417
64182017-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6419
6420	Try to display exact error locations in Sieve diagnostics.
6421
6422	* include/mailutils/sieve.h (mu_sieve_value_t)<locus>: New
6423	field.
6424	* libmu_sieve/util.c (mu_sieve_value_create): Take a pointer to
6425	mu_locus_range. Use it to initialize the locus field.
6426	* libmu_sieve/sieve-gram.y: Pass loci in calls to
6427	mu_sieve_value_create.
6428	* libmu_sieve/actions.c: Use the most specific locus when
6429	displaying the message.
6430	* libmu_sieve/comparator.c: Likewise.
6431	* libmu_sieve/prog.c: Likewise.
6432	* libmu_sieve/variables.c: Likewise.
6433	* sieve/tests/i-numeric.at: Update the expected error location.
6434
64352017-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6436
6437	Rewrite Makefile rules for lex and bison.
6438
6439	The aim is to get rid of the explicit rules and use the
6440	Automake framework as much as possible, without hurting the
6441	flexibility. To this effect, the gylwrap tool is rewritten from
6442	scratch (in Perl). In compatibility mode it takes the same
6443	arguments as the standard ylwrap. Additional configuration is
6444	supplied in the configuration file gylwrap.conf, located in the
6445	directory where the input file resides.
6446
6447	* mu-aux/gylwrap: Rewrite from scratch.
6448	* configure.ac (MU_YLWRAP): New subst variable.
6449	* libmailutils/base/.gitignore: Update.
6450	* libmailutils/base/Makefile.am: Update.
6451	* libmailutils/base/gylwrap.conf: New file.
6452	* libmailutils/cfg/.gitignore: Update.
6453	* libmailutils/cfg/Makefile.am: Use new YLWRAP
6454	* libmailutils/cfg/cfg.h: Remove.
6455	* libmailutils/cfg/gylwrap.conf: New file.
6456	* libmailutils/cfg/lexer.l: Include mailutils/yyloc.h directly.
6457	* libmailutils/cfg/parser.y: Likewise.
6458	* libmu_sieve/Makefile.am: Use new YLWRAP
6459	* libmu_sieve/gylwrap.conf: New file.
6460	* libmu_sieve/sieve.y: Rename to libmu_sieve/sieve-gram.y
6461	* libmu_sieve/sieve.l: Rename to libmu_sieve/sieve-lex.l
6462	* mail/Makefile.am: Use new YLWRAP
6463	* mh/.gitignore: Update.
6464	* mh/Makefile.am: Use new YLWRAP
6465	* mh/gylwrap.conf: New file.
6466	* mh/mh_alias.y: Rename to mh/mh_alias_gram.y
6467	* mh/mh_alias.l: Rename to mh/mh_alias_lex.l
6468	* mh/pick.y: Rename to mh/pick-gram.y
6469	* mimeview/.gitignore: Update.
6470	* mimeview/Makefile.am: Use new YLWRAP
6471	* mimeview/mimetypes.y: Rename to mimeview/grammar.y
6472	* mimeview/gylwrap.conf: New file.
6473	* mimeview/mimetypes.l: Rename to mimeview/lexer.l
6474	* po/POTFILES.in: Update
6475
64762017-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6477
6478	Switch to new locus types.
6479
6480	* include/mailutils/types.hin (mu_locus): Remove.
6481	* include/mailutils/diag.h (mu_diag_at_locus): Remove.
6482	(mu_diag_at_locus_point,mu_diag_at_locus_range): New protos.
6483	* include/mailutils/mailutils.h: Include locus.h
6484	* include/mailutils/stream.h (MU_IOCTL_LOGSTREAM_GET_LOCUS)
6485	(MU_IOCTL_LOGSTREAM_SET_LOCUS): Remove.
6486	* libmailutils/stream/logstream.c (_log_ctl): Reflect this.
6487	* libmailutils/tests/logstr.at: Remove the related test.
6488	* libmailutils/tests/logstr.c: Ditto.
6489	* libmailutils/cfg/Makefile.am: Add new header.
6490	* libmailutils/cfg/cfg.h: New file.
6491	* libmailutils/cfg/format.c: Use mu_locus_range
6492	* libmailutils/cfg/lexer.l: Use the mu_linetrack facility
6493	* libmailutils/cfg/parser.y: Likewise.
6494	* libmailutils/diag/diag.c (mu_diag_at_locus): Remove.
6495	(mu_diag_at_locus_point,mu_diag_at_locus_range): New protos.
6496	* comsat/action.c: Use mu_locus_point and mu_locus_range
6497	instead of the removed mu_locus.
6498	* include/mailutils/auth.h: Likewise.
6499	* include/mailutils/cfg.h: Likewise.
6500	* include/mailutils/sieve.h: Likewise.
6501	* libmailutils/base/wicket.c: Likewise.
6502	* libmailutils/tests/wicket.c: Likewise.
6503	* libmu_auth/radius.c: Likewise.
6504	* libmu_sieve/actions.c: Likewise.
6505	* libmu_sieve/comparator.c: Likewise.
6506	* libmu_sieve/extensions/moderator.c: Likewise.
6507	* libmu_sieve/mem.c: Likewise.
6508	* libmu_sieve/prog.c: Likewise.
6509	* libmu_sieve/require.c: Likewise.
6510	* libmu_sieve/runtime.c: Likewise.
6511	* libmu_sieve/sieve-priv.h: Likewise.
6512	* libmu_sieve/sieve.l: Use the mu_linetrack facility.
6513	* libmu_sieve/sieve.y: Likewise.
6514	* libmu_sieve/util.c: Use mu_locus_point and mu_locus_range
6515	instead of the removed mu_locus
6516	* libmu_sieve/variables.c: Likewise.
6517	* mail/source.c: Likewise.
6518	* mu/libexec/dbm.c: Likewise.
6519	* mu/libexec/logger.c: Likewise.
6520	* mu/libexec/wicket.c: Likewise.
6521	* sieve/sieve.c: Likewise.
6522	* sieve/tests/i-numeric.at: Update expected locations
6523
65242017-06-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6525
6526	Improve linetrack interface.
6527
6528	* include/mailutils/locus.h (mu_linetrack_rebase): New proto.
6529	* libmailutils/locus/linetrack.c (mu_linetrack_rebase): New
6530	function.
6531	* libmailutils/diag/diag.c (mu_diag_at_locus_range): New
6532	function.
6533
65342017-06-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6535
6536	Switch mimeview to new locus and linetracker.
6537
6538	* include/mailutils/locus.h (mu_stream_print_locus_point): New
6539	proto.
6540	(mu_locus_range_copy): New proto.
6541	* include/mailutils/yyloc.h (mu_file_print_locus_point)
6542	(mu_file_print_locus_range): New protos.
6543	(YY_LOCATION_PRINT): Redo using mu_file_print_locus_range.
6544	* libmailutils/locus/filprloc.c: New file.
6545	* libmailutils/locus/genprloc.c: New file.
6546	* libmailutils/locus/strprloc.c: New file.
6547	* libmailutils/locus/Makefile.am: Add new files.
6548	* libmailutils/locus/debug.c (mu_stream_print_locus_range):
6549	Remove. Declared elsewhere.
6550	* libmailutils/locus/linetrack.c: use mu_locus_point_set_file,
6551	instead of mu_locus_point_init.
6552	* libmailutils/locus/locus.c: Likewise. (mu_locus_range_copy)P:
6553	New function.
6554	* mimeview/mimetypes.l: Provide rule for \n in ARGSTRING Always
6555	print diagnostics before returning BOGUS
6556	(lex_next_rule): Rewrite. Print verbose diagnostics if
6557	app.trace6 is set.
6558	(mimetypes_close): Deinitialize yylloc.
6559	* mimeview/mimetypes.y: Catch the BOGUS token. Adjust conflict
6560	expectation. Properly reference assigned loci.
6561	(mimetypes_parse): Return 1 if any errors detected.
6562	* mimeview/mimeview.c: Use debug category app instead of mime.
6563	* mimeview/tests/testsuite.at: Add new tests.
6564	* libmailutils/stream/logstream.c (_log_done): Deinitialize
6565	locus range.
6566
65672017-06-12  Sergey Poznyakoff  <gray@gnu.org>
6568
6569	Start switching lexers to the new line tracker facility.
6570
6571	* include/mailutils/locus.h (MU_LOCUS_POINT_INITIALIZER): New
6572	define
6573	(MU_LOCUS_RANGE_INITIALIZER): New define
6574	(mu_locus_point_set_file, mu_locus_point_init)
6575	(mu_locus_point_deinit, mu_locus_point_copy)
6576	(mu_locus_range_deinit): New protos
6577	* libmailutils/locus/locus.c: New file.
6578	* libmailutils/locus/Makefile.am: Add new file.
6579	* libmailutils/locus/linetrack.c (mu_linetrack_at_bol): New
6580	function.
6581	(mu_linetrack_locus): New function.
6582	(mu_linetrack_advance): Use mu_locus_point_set_file to set the
6583	mu_file field.
6584	* libmailutils/tests/linetrack.c: Initialize and deinitialize
6585	locus range.
6586	* mimeview/mimetypes.l: switch to line tracker
6587	* mimeview/mimeview.h: Use defines from yyloc.h
6588
65892017-06-11  Sergey Poznyakoff  <gray@gnu.org>
6590
6591	Fix the -nodraftfolder and -nowhatnowproc options.
6592
6593	The commit 744c4a9c didn't take into account the -nodraftfolder
6594	and -nowhatnowproc options, which can be used to cancel the
6595	effect of the corresponding facilities. This commit fixes it.
6596
6597	* mh/mh_getopt.c (mh_getopt_ext): New function.
6598	* mh/mh_getopt.h (mh_getopt_ext): New prototype.
6599	(mh_optinit): New struct.
6600	* mh/tests/comp.at: Test the use of Draft-Folder
6601	* mh/tests/forw.at: Likewise.
6602	* mh/tests/repl.at: Likewise.
6603	* mh/comp.c (main): use mh_getopt_ext to properly process
6604	draftfolder and whatnowproc.
6605	* mh/forw.c: Likewise.
6606	* mh/repl.c: Likewise.
6607	* mh/mh.h (mh_whom): Remove.
6608	(mh_whom_header, mh_whom_file, mh_whom_message): New protos.
6609	* mh/mh_alias.y (mh_read_aliases): Don't read aliases twice.
6610	* mh/mh_whatnow.c (whom): Use mh_whom_file.
6611	* mh/mh_whom.c (mh_whom): Rewrite and rename to mh_whom_file.
6612	(mh_whom_header, mh_whom_message): New functions.
6613	* mh/whom.c: Use mh_getopt_ext. Interpret command line
6614	arguments, depending on whether the draftfile facility is in
6615	use.
6616
66172017-06-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6618
6619	Fix processing of abbreviated negated boolean options.
6620
6621	It was noted that "mhn -nohead" did not suppress the output of
6622	headers as "mhn -noheaders" did. It turned out that the
6623	negation marker was overwritten while scanning options for
6624	possible matching alternatives. This patch fixes it.
6625
6626	* libmailutils/opt/opt.c (find_long_option): Don't overwrite
6627	the negation attribute of the last found option.
6628	* libmailutils/tests/parseopt.c: New option --headers, to test
6629	the fix.
6630	* libmailutils/tests/parseopt28.at: New testcase.
6631	* libmailutils/tests/Makefile.am: Add new testcase.
6632	* libmailutils/tests/testsuite.at: Include new testcase.
6633	* libmailutils/tests/parseopt*.at: Trivial changes
6634
66352017-06-08  Sergey Poznyakoff  <gray@gnu.org>
6636
6637	Re-use last invoked editor in MH whatnow.
6638
6639	This fixes a bug introduced in d30e5a07
6640
6641	* mh/mh.h (mh_whatnow_env) <last_ed>: New member
6642	* mh/mh_whatnow.c (_whatnow): Initialize reedit and last_ed
6643	members Free last_ed before returning
6644	(edit): Prefer wh->last_ed over wh->editor
6645
66462017-06-08  Sergey Poznyakoff  <gray@gnu.org>
6647
6648	Bugfix in mh_whatnow.
6649
6650	* mh/mh_whatnow.c (edit): Disable command expansion in
6651	wordsplit. See also 491bec23.
6652
66532017-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
6654
6655	Rename mu_locus_tracker to mu_linetrack.
6656
66572017-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
6658
6659	Silence remaining *.[yl] rules in Makefiles.
6660
66612017-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
6662
6663	Include new headers to the distribution.
6664
66652017-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
6666
6667	Improve locus tracker; provide a testsuite.
6668
6669	* include/mailutils/locus.h (mu_locus_track_stat): New struct.
6670	(mu_locus_tracker_stat): New proto.
6671	(mu_locus_tracker_retreat): Change return type.
6672	* libmailutils/locus/debug.c (mu_stream_vlprintf): Don't print
6673	spurious \n.
6674	(mu_lrange_debug): Fix incorrect call.
6675	* libmailutils/locus/tracker.c (mu_locus_track_create):
6676	Allocate storage for at least two lines of text.
6677	(mu_locus_tracker_stat): New function.
6678	(mu_locus_tracker_advance): Handle empty lines
6679	(mu_locus_tracker_retreat): Add error handling.
6680	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
6681	locktrack.
6682	* libmailutils/tests/tracker.c: Rename to loctrack.c
6683	* libmailutils/tests/testsuite.at: Add new testcase.
6684	* libmailutils/tests/loctrack.at: New test case.
6685
66862017-06-08  Sergey Poznyakoff  <gray@gnu.org>
6687
6688	Bugfix in mh_whatnow.
6689
66902017-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
6691
6692	Fix logstream to support mu_locus_range.
6693
6694	* include/mailutils/locus.h (mu_stream_print_locus_range)
6695	(mu_stream_vlprintf, mu_stream_lprintf, mu_lrange_debug): New
6696	protos.
6697	* include/mailutils/stream.h
6698	(MU_IOCTL_LOGSTREAM_GET_LOCUS_RANGE)
6699	(MU_IOCTL_LOGSTREAM_SET_LOCUS_RANGE): New ioctls.
6700	* include/mailutils/sys/logstream.h (_mu_log_stream): Replace
6701	locus with struct mu_locus_range locrange.
6702	* libmailutils/locus/debug.c: Rewrite.
6703	* libmailutils/locus/ident.c (mu_ident_ref): Accept NULL
6704	argument. Fix initialization.
6705	(mu_ident_deref): Accept NULL argument.
6706	* libmailutils/stream/logstream.c: Rewrite.
6707	* libmailutils/tests/.gitignore: Update.
6708	* libmailutils/tests/Makefile.am: Add new tests.
6709	* libmailutils/tests/testsuite.at: Likewise.
6710	* libmailutils/tests/logstr.at: New testcase.
6711	* libmailutils/tests/logstr.c: New file.
6712	* libmailutils/tests/xscript.at: Minor change.
6713	* sieve/tests/i-numeric.at: Minor change.
6714
67152017-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
6716
6717	Fix tests when logical and physical CWD differ.
6718
6719	MH testsuite produced false negatives when run in a directory
6720	accessed by its logical name (symlink). To fix this, avoiding
6721	at the same time the use of non-portable "pwd -P" & "pwd -L",
6722	this commit adds a filter utility that replaces both logical
6723	and physical cwd with a dot on output. The MH testsuite is
6724	updated to use this utility.
6725
6726	* testsuite/cwdrepl.c: New utility
6727	* testsuite/Makefile.am: Build cwdrepl
6728	* testsuite/.gitignore: Update.
6729	* testsuite/cwdrepl.at: New test.
6730	* testsuite/testsuite.at: Include new test.
6731	* mh/tests/atlocal.in (PATH): Add testsuite
6732	(remove_curdir): Remove function.
6733	* mh/tests/comp.at: Use cwdrepl, fix expected output.
6734	* mh/tests/forw.at: Likewise.
6735	* mh/tests/mhn.at: Likewise.
6736	* mh/tests/mhpath.at: Likewise.
6737	* mh/tests/repl.at: Likewise.
6738
67392017-06-07  Sergey Poznyakoff  <gray@gnu.org>
6740
6741	Begin implementing liblocus.
6742
6743	Liblocus is a part of libmailutils that will provide functions
6744	for manipulating source file locations, for use in lexers,
6745	grammars, etc. This will expand the functionality of the
6746	mu_locus type and logstreams.
6747
6748	* configure.ac: add libmailutils/locus/
6749	* include/mailutils/assoc.h (mu_assoc_install_ref2): New proto.
6750	* libmailutils/base/assoc.c (mu_assoc_install_ref2): New entry
6751	point.
6752	* libmailutils/base/copyfile.c (copy_regular_file): Add
6753	typecasts.
6754	* libmailutils/Makefile.am: Build liblocus
6755	* libmailutils/locus/Makefile.am: New file.
6756	* libmailutils/locus/debug.c: New file.
6757	* libmailutils/locus/ident.c: New file.
6758	* libmailutils/locus/tracker.c: New file.
6759	* libmailutils/tests/Makefile.am: New file.
6760	* libmailutils/tests/tracker.c: New file.
6761
67622017-06-06  Sergey Poznyakoff  <gray@gnu.org.ua>
6763
6764	Bugfix.
6765
6766	* mh/mh_whatnow.c (edit): Initialize ws.ws_env
6767
67682017-06-03  Sergey Poznyakoff  <gray@gnu.org>
6769
6770	mimeview: improve parser error recovery.
6771
6772	* mimeview/Makefile.am: Silent rules
6773	* mimeview/mimetypes.l (lex_reset): Remove.
6774	(lex_next_rule): New function.
6775	* mimeview/mimetypes.y: Expect 12 shift/reduce conflicts.
6776	Rewrite the error rule
6777	(yyprint): Print TYPE token correctly
6778	* mimeview/mimeview.h (lex_next_rule): New proto.
6779
67802017-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>
6781
6782	mh whatnow: allow for arguments in the editor profile value.
6783
6784	* mh/mh_whatnow.c (edit): Make sure ed is always initialized.
6785	Accept command line arguments in the "editor" and "*-next"
6786	values.
6787
67882017-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>
6789
6790	New wordsplit call: mu_worsplit_append.
6791
6792	* include/mailutils/wordsplit.h (mu_wordsplit_append): New
6793	proto.
6794	* libmailutils/string/wordsplit.c (mu_wordsplit_append): New
6795	function.
6796	* libmailutils/tests/wordsplit.at: Two more tests cases for
6797	mu_wordsplit_append.
6798	* libmailutils/tests/wsp.c: Accept extra arguments to append
6799	using the new function.
6800
68012017-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
6802
6803	Revise the mime.types lexer; provide the testsuite.
6804
6805	* am/testsuite.m4: New file.
6806	* configure.ac: Use the MU_CONFIG_TESTSUITE macro.
6807	* mimeview/Makefile.am (SUBDIRS): Add tests
6808	* mimeview/mimetypes.l: Rewrite in three exclusive states.
6809	* mimeview/mimetypes.y: Simplify grammar.
6810	* mimeview/mimeview.c: New option --identify (-i).
6811	* mimeview/mimeview.h: Update.
6812	* mimeview/tests/Makefile.am: New file.
6813	* mimeview/tests/atlocal.in: New file.
6814	* mimeview/tests/bf.c: New file.
6815	* mimeview/tests/testsuite.at: New file.
6816	* README: Update.
6817	* doc/texinfo/programs.texi
6818
68192017-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
6820
6821	Bugfix.
6822
6823	* mimeview/mimetypes.y (compare_bytes): Fix improper read size
6824
68252017-05-31  Sergey Poznyakoff  <gray@gnu.org>
6826
6827	Fix whatnow edit command.
6828
6829	In whatnow shell, edit [program [parameters]] now calls program
6830	with supplied parameters plus the name of the file to edit.
6831
6832	* mh/mh.h (mh_whatnow_env) <reedit>: New member.
6833	* mh/mh_whatnow.c (edit): Rewrite.
6834	* mh/whatnow.c (main): Properly handle argv[1]
6835	* NEWS: Update.
6836
68372017-05-31  Sergey Poznyakoff  <gray@gnu.org>
6838
6839	mh: check Local-Mailbox setting.
6840
6841	* mh/mh_init.c (mh_my_email): If Local-Mailbox is set, use its
6842	value.
6843	* mh/tests/scan.at: Add test for Local-Mailbox.
6844
68452017-05-31  Sergey Poznyakoff  <gray@gnu.org>
6846
6847	Fix MH initialization order.
6848
6849	Calls to mh_global_profile_get and similar functions must
6850	appear only after a call to mh_getopt (more properly, after
6851	mh_init and mh_init2 are callead). This sequence was
6852	inadvertently changed by commit e267ac86, due to which comp,
6853	forw, repl and burst stopped reading important information from
6854	.mh_profile. Bug spotted by Pierre-Jean.
6855
6856	* mh/burst.c: Make sure profile variables are accessed after
6857	the profile is read.
6858	* mh/comp.c: Likewise.
6859	* mh/forw.c: Likewise.
6860	* mh/repl.c: Likewise.
6861	* mh/mh.h (mh_whatnow_env_from_environ): Split into two
6862	functions: mh_whatnow_env_from_environ_early, to be called
6863	before mh_getopt, and mh_whatnow_env_from_environ_late, to be
6864	called after it.
6865	* mh/whatnowenv.c: Ditto.
6866	* mh/whatnow.c: Call these two in the right order.
6867	* THANKS: Update.
6868
68692017-05-31  Sergey Poznyakoff  <gray@gnu.org.ua>
6870
6871	Improve mimeview.
6872
6873	Old short option '-t' renamed to '-f' for consistency (-f
6874	stands for --file in most other utilities). Thus, 'mimeview -f
6875	my.types' reads the file 'my.types'.
6876
6877	The '-t' option is reused as a short equivalent of the new
6878	'--lint' option, which instructs the tool to check the syntax
6879	of the mime.types file and exit, ignoring any surplus command
6880	line arguments.
6881
6882	Added support for priority and regex functions.
6883
6884	Improved debugging output.
6885
6886	* mimeview/mimetypes.l: Rewrite lexer in a cleaner way.
6887	* mimeview/mimetypes.y: Rewrite parser. Track locations. Add
6888	line information to nodes and rules. Improve debugging
6889	* mimeview/mimeview.c: Remove the debug configuration
6890	statement. Using debug { level } provides the same
6891	functionality. Use mu_debug for debugging. New option -t
6892	(--lint). Rename the -t short option to -f.
6893	* mimeview/mimeview.h: Define lexer and parser macros for
6894	location tracking.
6895	* NEWS: Document changes to mimeview utility.
6896	* doc/texinfo/programs.texi: Document changes to mimeview
6897	utility.
6898	* lib/mailcap.c: Use standart mu_debug calls for debugging.
6899	* lib/mailcap.h (display_stream_mailcap): Change last argument:
6900	take a mu_debug_handle_t
6901	* libmailutils/diag/debcat (app): New category.
6902	Application-specific debug
6903	* mail/decode.c (display_submessage): Change invocation of
6904	display_stream_mailcap.
6905	* mail/mailvar.c: Setting "verbose" enables app.trace7,
6906	unsetting it clears app.*
6907
69082017-05-26  Sergey Poznyakoff  <gray@gnu.org>
6909
6910	Bugfixes in MH show.
6911
6912	* mh/show.c: Set cur before returning. Allow for arguments in
6913	showproc settings. Move to next or prev if invoked with the
6914	corresponding argv[0]
6915	* mh/mh.h (mh_msgset_parse): def argument is const.
6916	(mh_msgset_first_current, mh_msgset_first_uid): Remove proto.
6917	(mh_msgset_first): Change signature.
6918	(mh_msgset_last): New function.
6919	* mh/mh_msgset.c (mh_msgset_first): Return UID or message
6920	number depending on the value of the second parameter.
6921	(mh_msgset_first_current, mh_msgset_first_uid): Remove.
6922	(mh_msgset_last): New function.
6923	* mh/anno.c: Update.
6924	* mh/comp.c: Update.
6925	* mh/folder.c: Update.
6926	* mh/mh_init.c: Update.
6927	* mh/repl.c: Update.
6928	* mh/Makefile.am (install-exec-hook): Link show to prev and
6929	next
6930
69312017-05-26  Sergey Poznyakoff  <gray@gnu.org>
6932
6933	Implement mu_msgset_first and mu_msgset_last.
6934
6935	* include/mailutils/msgset.h (mu_msgset_first, mu_msgset_last):
6936	New prototypes.
6937	* libmailutils/msgset/Makefile.am: Add new files.
6938	* libmailutils/msgset/first.c: New file.
6939	* libmailutils/msgset/last.c: New file.
6940	* libmailutils/tests/msgset.c: New options for testing the new
6941	functions.
6942	* libmailutils/tests/msgset.at: Test new functions.
6943
69442017-04-22  Sergey Poznyakoff  <gray@gnu.org>
6945
6946	Bugfix.
6947
6948	* mh/etc/Makefile.am (bindir): Override. Reported by Ken Brown
6949	<kbrown@cornell.edu>
6950
69512017-04-22  Sergey Poznyakoff  <gray@gnu.org.ua>
6952
6953	Functions for formatting RFC-2231-compliant mail headers
6954	fields.
6955
6956	* include/mailutils/cctype.h (MU_CTYPE_TSPEC): New class.
6957	Represents tspecials as per RFC 2045, section 5.1.
6958	(mu_istspec): New define.
6959	* libmailutils/string/muctype.c (mu_c_tab): Mark tspecials
6960	* include/mailutils/assoc.h (mu_assoc_mark)
6961	(mu_assoc_sweep): New protos.
6962	* libmailutils/base/assoc.c (_mu_assoc_elem): New field: mark
6963	(mu_assoc_mark,mu_assoc_sweep): New functions.
6964	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
6965	dq.c and percent.c.
6966	* libmailutils/filter/dq.c: New file.
6967	* libmailutils/filter/percent.c: New file.
6968	* include/mailutils/filter.h (mu_percent_filter)
6969	(mu_dq_filter): New externs.
6970	* libmailutils/filter/filter.c (mu_filter_get_list): Register
6971	mu_percent_filter and mu_dq_filter.
6972	* include/mailutils/mime.h (mu_mime_header_set)
6973	(mu_mime_header_set_w): New protos.
6974	* libmailutils/mime/Makefile.am (libmime_la_SOURCES): Add
6975	mimehdrset.c
6976	* libmailutils/mime/mimehdrset.c: New file.
6977	* libmailutils/mime/mime.c (_mime_set_content_type): For
6978	multipart/alternative, remove also all parameters except
6979	charset from the Content-Type header.
6980	* mail/send.c (saveatt): Remove the now unneeded conditionals.
6981	* libmailutils/tests/mimehdr.at: Test formatting functions.
6982	* include/mailutils/stream.h (MU_IOCTL_FILTER_SET_OUTBUF_SIZE):
6983	New ioctl.
6984	* include/mailutils/sys/filter.h (_MU_FILTER_DISABLED)
6985	(_MU_FILTER_EOF): Remove. Use bitfields instead.
6986	(_mu_filter_stream): Remove fltflag. New fields: flag_disabled,
6987	flag_eof, outbuf_size.
6988	* libmailutils/stream/fltstream.c (MFB_BASE) (MFB_CURPTR,
6989	MFB_ENDPTR, MFB_SIZE, MFB_LEVEL) (MFB_POS, MFB_RDBYTES,
6990	MFB_FREESIZE)
6991	(MBF_CLEAR, MBF_FREE): Replace with inline functions.
6992	(init_iobuf): Use the outbuf_size field (unless 0) to set the
6993	output buffer size.
6994	(filter_read): Stop if on success if outbuf_size is set,
6995	without trying to fill the entire buffer.
6996	(filter_ctl): Handle MU_IOCTL_FILTER_SET_OUTBUF_SIZE.
6997	* libmailutils/tests/mimehdr.c: New option -width: format and
6998	print the value assuming given line width.
6999
70002017-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7001
7002	Minor change.
7003
7004	* mail/mail.h: Remove unneeded extern qualifiers.
7005
70062017-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7007
7008	Automatically handle native character sets on input to the mail
7009	utility.
7010
7011	If the mime header is set, then mail will provide the missing
7012	'charset' parameter for each Content-Type header that begins
7013	with 'text/'. Its value will be determined by examining the
7014	'charset' mail variable. If it is set to 'auto' (the default),
7015	the character set will be extracted from the value of the
7016	LC_ALL environment variable. If it is unset, it will be deduced
7017	from the LANG environment variable.
7018
7019	Thus, provided that LC_ALL is set correctly, the following
7020	setting in .mailrc is recommended to ensure that mails in
7021	native character sets will be processed correctly:
7022
7023	 set charset=auto mime
7024
7025	In most cases, it can be simplified to just 'set mime'.
7026	* NEWS: Update.
7027	* doc/texinfo/programs.texi: Update the description of the
7028	charset variable.
7029	* mail/mail.h (util_get_charset): New proto.
7030	* mail/send.c (attach_set_content_type): New function.
7031	(attlist_add, add_body): Use attach_set_content_type to set the
7032	content_type field.
7033	* mail/util.c (util_get_charset): New function.
7034	(util_rfc2047_decode): Use util_get_charset.
7035
70362017-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7037
7038	mail: use mailvar_is_true to test boolean values.
7039
70402017-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7041
7042	New option --mime.
7043
7044	* mail/mail.c (mime_option): New variable.
7045	(main): assume --mime if either or both of --content-type and
7046	--content-encoding are set. Set the mime variable if so.
7047	* mail/mail.h (mailvar_is_true): New prototype.
7048	* mail/send.c (add_attachments): Continue if the mime variable
7049	is set.
7050	(add_body): Rewrite, treating the text read from the stdin as
7051	MIME part in itself.
7052	* mailvar.c (mailvar_tab): New variable "mime"
7053	(mailvar_is_true): New function.
7054	* NEWS: Document --mime
7055	* doc/texinfo/programs.texi: Rewrite the Attachments
7056	subsection.
7057
70582017-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7059
7060	Minor changes.
7061
7062	* mail/mail.c (cli_attach): Exit if unable to attach file.
7063	* mail/mail.h (send_attach_file): Change prototype.
7064	* mail/send.c (send_attach_file): Return int.
7065	(add_body): Honor default_content_type
7066
70672017-04-18  Sergey Poznyakoff  <gray@gnu.org>
7068
7069	fix a typo.
7070
70712017-04-18  Sergey Poznyakoff  <gray@gnu.org.ua>
7072
7073	Fix semantics of mu_header_set_value and creation of
7074	multipart/alternative MIME.
7075
7076	Until now, mu_header_set_value called with replace=0 prepended
7077	the header to the header list, if a header with such name was
7078	already present. This has been changed. Now, if the header with
7079	the requested name is already present, its action is as
7080	follows:
7081
7082	 1. If repl is 0, return MU_ERR_EXISTS
7083	 2. Otherwise, replace the header with the new value.
7084
7085	If the header is not present, it is appended to the end of the
7086	header list, instead of putting it at the beginning.
7087
7088	This change is incompatible and breaks the tests, that relied
7089	on a particular field ordering. These are fixed as well.
7090
7091	The use of mu_header_set_value throughout the sources has been
7092	revised to ensure that single-instance headers are never added
7093	twice.
7094
7095	This change also facilitates the second part of this commit,
7096	which fixes creation of the multipart/alternative message by
7097	the mail utility.
7098	* libmailutils/mailbox/header.c (mu_header_set_value): Fix
7099	semantics. If the replace parameter is not set and the header
7100	field with the given name already exists, return MU_ERR_EXISTS
7101	without changing anything. If adding new header, append it to
7102	the end of the header list, instead of pushing it to the top.
7103	* configure.ac: Raise shared library revision number.
7104	* libmu_scm/mu_message.c (mu-message-set-header)
7105	(mu-message-set-header-fields): call mu_header_set_value
7106	explicitly if repl is not set.
7107	* libmu_sieve/extensions/moderator.c: Force replace header mode
7108	when needed.
7109	* libmu_sieve/extensions/vacation.c: Likewise.
7110	* mh/mh_init.c (mh_annotate): Prepend the annotation header.
7111	* mh/mhn.c: Force replace header mode when needed.
7112	* mh/repl.c: Likewise.
7113	* mh/send.c: Likewise.
7114	* libmailutils/tests/modmesg01.at: Change expected header
7115	order.
7116	* libmailutils/tests/modmesg03.at: Likewise.
7117	* mh/tests/mhn.at: Likewise.
7118	* mh/tests/send.at: Likewise.
7119	* sieve/tests/moderator.at: Likewise.
7120	* sieve/tests/redirect.at: Likewise.
7121	* sieve/tests/reject.at: Likewise.
7122	* sieve/tests/vacation.at: Likewise.
7123	* examples/mta.c (message_finalize): Append
7124	X-Authentication-Warning, instead of setting it.
7125
7126	Make sure Content-Disposition is not set for parts of a
7127	multipart/ alternative MIME message. Some mail readers
7128	(notably, yahoo), misinterpret it.
7129	* libmailutils/mime/attachment.c (at_hdr): Use
7130	mu_header_set_value to set Content-Type and
7131	Content-Disposition.
7132	* libmailutils/mime/mime.c (_mime_set_content_type): If the
7133	content type is set to multipart/alternative, remove the
7134	Content-Disposition headers from the message parts.
7135	* mail/send.c (saveatt): Don't set content-disposition for
7136	multipart/alternative, it is now done by the library.
7137	(add_attachments): Warn about ignored headers. Append only
7138	Received and X-* headers, replace others.
7139	(parse_headers): Append headers.
7140	(compose_header_set): Use mu_header_append if COMPOSE_APPEND is
7141	requested.
7142	* mail/util.c (util_header_expand): Use mu_header_append.
7143
71442017-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
7145
7146	Bugfix.
7147
7148	* libmailutils/base/assoc.c (merge_sort): Fix last argument in
7149	call to cmp.
7150
71512017-04-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7152
7153	Send multipart/alternative messages using mail.
7154
7155	The new option --alternative is provided to change the content
7156	type of the composed message to multipart/alternative. The ~/
7157	escape toggles the type between multipart/mixed and
7158	multipart/alternative. In messages of multipart/alternative
7159	type, the Content-Disposition header of all attachments is
7160	reset to "inline".
7161
7162	* libmailutils/mime/mime.c (mu_mime_create): Bugfix: honour the
7163	MU_MIME_MULTIPART_ALT flag.
7164	* mail/mail.c: New option --alternative.
7165	* mail/mail.h (compose_env) <attlist,mime>: New members.
7166	(multipart_alternative): New global.
7167	(send_attach_file): Change return value.
7168	(escape_toggle_multipart_type): New proto.
7169	* mail/send.c (multipart_alternative): New global. Keep the
7170	list of attachments in compose_env_t. Make sure it is freed
7171	when no longer used. Implement the ~/ escape.
7172	* mail/table.c: New escape ~/
7173	* mail/util.c: Use mu_strerror instead of strerror.
7174	* NEWS: Document changes to the mail utility
7175	* doc/texinfo/programs.texi: Likewise.
7176
71772017-04-11  Sergey Poznyakoff  <gray@gnu.org.ua>
7178
7179	Rewrite the mailutils tool.
7180
7181	The subcommands are re-implemented as standalone binaries
7182	installed to pkglibexecdir. The main binary acts as a
7183	dispatcher.
7184
7185	* configure.ac: Build mu/libexec/Makefile
7186	* include/mailutils/.gitignore: Ignore gitinfo.h
7187	* include/mailutils/opt.h (mu_parseopt_help_stream_create): New
7188	proto.
7189	* libmailutils/cli/cli.c (mu_cli_ext): Honor
7190	MU_PARSEOPT_PROG_NAME setting.
7191	* libmailutils/opt/help.c (mu_parseopt_create_help_stream): New
7192	function. (mu_program_help,mu_program_usage)
7193	(mu_program_version): Use it.
7194	* mu/Makefile.am: Move commands to separate executables under
7195	libexec.
7196	* mu/mu.c: Rewrite.
7197	* mu/dispatch.c: Remove.
7198	* mu/help.c: Remove.
7199	* mu/libexec/.gitignore: New file.
7200	* mu/libexec/Makefile.am: New file.
7201	* mu/libexec/getopt.c: New file.
7202	* mu/getans.c: Move to mu/libexec.
7203	* mu/getarg.c: Likewise.
7204	* mu/getyn.c: Likewise.
7205	* mu/util.c: Likewise.
7206	* mu/verbose.c: Likewise.
7207	* mu/shell.c: Likewise.
7208	* mu/mu.h: Remove.
7209	* mu/libexec/mu.h: New file.
7210	* mu/acl.c: Move to mu/libexec; Rewrite as a standalone
7211	program.
7212	* mu/cflags.c: Likewise.
7213	* mu/dbm.c: Likewise.
7214	* mu/filter.c: Likewise.
7215	* mu/flt2047.c: Likewise.
7216	* mu/imap.c: Likewise.
7217	* mu/info.c: Likewise.
7218	* mu/ldflags.c: Likewise.
7219	* mu/logger.c: Likewise.
7220	* mu/pop.c: Likewise.
7221	* mu/query.c: Likewise.
7222	* mu/send.c: Likewise.
7223	* mu/smtp.c: Likewise.
7224	* mu/stat.c: Likewise.
7225	* mu/wicket.c: Likewise.
7226	* mu/mu-setup.awk: Remove.
7227	* po/POTFILES.in: Update.
7228
72292017-04-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7230
7231	Bugfix.
7232
7233	* libmailutils/cfg/parser.y (mu_cfg_find_node): Fix spurious
7234	error diagnostics when the node is not found.
7235
72362017-04-09  Sergey Poznyakoff  <gray@gnu.org>
7237
7238	Version 3.2.91.
7239
72402017-04-09  Sergey Poznyakoff  <gray@gnu.org>
7241
7242	Remove the Scheme implementation of the Sieve language.
7243
7244	* NEWS: Describe the change.
7245	* doc/texinfo/mailutils.texi: Remove description of sieve2scm
7246	* doc/texinfo/programs.texi: Likewise.
7247	* scheme/Makefile.am: Remove sieve2scm.
7248	* scheme/mimeheader.scm: Remove.
7249	* scheme/numaddr.scm: Remove.
7250	* scheme/redirect.scm: Remove.
7251	* scheme/reject.scm: Remove.
7252	* scheme/sieve-core.scm: Remove.
7253	* scheme/sieve2scm.scmi: Remove.
7254	* scheme/vacation.scm: Remove.
7255
72562017-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
7257
7258	movemail: implement --progress-meter option.
7259
72602017-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
7261
7262	Improve generation of session identifiers for server programs.
7263
7264	* include/mailutils/acl.h (mu_acl_set_session_id): Remove
7265	proto.
7266	* include/mailutils/server.h (mu_session_id): Remove extern.
7267	(mu_sid): New proto.
7268	* libmailutils/server/sid.c: New file.
7269	* libmailutils/server/Makefile.am: Add sid.c
7270	* libmailutils/server/ipsrv.c (mu_ip_tcp_accept)
7271	(mu_ip_udp_accept): Remove calls to mu_acl_set_session_id.
7272	(mu_ip_server_accept): Make sure output to mu_strerr is
7273	filtered so that session ID is prepended to each line.
7274	(mu_ip_server_loop): Remove.
7275	* libmailutils/server/msrv.c (mu_m_server_check_acl): Remove
7276	call to mu_acl_set_session_id.
7277	* libmailutils/server/server.c (mu_session_id): Remove
7278	variable.
7279	* imap4d/imap4d.c (get_client_address, set_strerr_flt)
7280	(clr_strerr_flt): Remove unused functions.
7281	(imap4d_connection): Simplify.
7282	* pop3d/pop3d.c: Likewise.
7283
72842017-04-07  Sergey Poznyakoff  <gray@gnu.org>
7285
7286	Fix links in HTML doc generator.
7287
7288	* doc/texinfo/gendocs_template: Fix links.
7289	* doc/texinfo/html.init: Fix the Documentation link.
7290
72912017-04-06  Sergey Poznyakoff  <gray@gnu.org>
7292
7293	Improve AM_GNU_MAILUTILS autoconf macro.
7294
7295	* mu-aux/mailutils.m4: Don't use packed version representation,
7296	because of eventual numerical overflows. Compare versions
7297	number by number. Define the following additional constants:
7298	MAILUTILS_VERSION_MAJOR, MAILUTILS_VERSION_MINOR, and
7299	MAILUTILS_VERSION_PATCH.
7300	* NEWS: Document changes.
7301
73022017-04-06  Sergey Poznyakoff  <gray@gnu.org>
7303
7304	Minor improvement in gitinfo.h production.
7305
7306	* Makefile.am: Minor change.
7307	* include/mailutils/Makefile.am (gitinfo.h): Build only if
7308	$(srcdir) and $(builddir) are the same.
7309	* mu-aux/gitinfo.pl: Rename to mu-aux/gitinfo
7310	* configure.ac (GITINFO): Reflect this change
7311	* mu-aux/Makefile.am: Likewise.
7312
73132017-04-05  Sergey Poznyakoff  <gray@gnu.org.ua>
7314
7315	Ensure stability of merge sort in assoc.
7316
7317	* libmailutils/base/assoc.c (merge): Fix comparison
7318
73192017-04-04  Sergey Poznyakoff  <gray@gnu.org.ua>
7320
7321	Another improvement in gencl.
7322
7323	* mu-aux/gencl: New option --email.
7324	* Makefile.am: Simplify the ChangeLog command. Use the --email
7325	option.
7326
73272017-04-03  Sergey Poznyakoff  <gray@gnu.org>
7328
7329	Minor improvements in gencl.
7330
7331	* mu-aux/gencl: Don't use Time::ParseDate. Work over bug in
7332	Text::Wrap 2012.0818. New option --ignore-errors (-i). Ensure
7333	consistent error code.
7334	* Makefile.am (dist-hook): Relax checking for intermediate
7335	releases.
7336
73372017-04-03  Sergey Poznyakoff  <gray@gnu.org.ua>
7338
7339	Rewrite gencl as an enhanced replacement of
7340	gitlog-to-changelog.
7341
7342	* mu-aux/gencl: Rewritten as a replacement for
7343	gitlog-to-changelog.
7344	* ChangeLog.amend: More spell fixes.
7345	* Makefile.am: Use gencl instead of gitlog-to-changelog.
7346	* doc/ChangeLog.CVS: Spell checking
7347	* gnulib.modules: Remove gitlog-to-changelog.
7348
73492017-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
7350
7351	Test transcript streams.
7352
7353	* libmailutils/tests/.gitignore: Update.
7354	* libmailutils/tests/xscript.at: New file.
7355	* libmailutils/tests/xscript.c: New file.
7356	* libmailutils/tests/Makefile.am: Add new files.
7357	* libmailutils/tests/testsuite.at: Include new testcase.
7358
73592017-03-23  Sergey Poznyakoff  <gray@gnu.org.ua>
7360
7361	Tiny fix.
7362
7363	* include/mailutils/debug.h (MU_ASSERT): Prefix local variable
7364	name with two underscores to diminish the probability of
7365	shadowing.
7366
73672017-03-23  Sergey Poznyakoff  <gray@gnu.org.ua>
7368
7369	Make sure ChangeLog is built by make.
7370
7371	* Makefile.am: Mark ChangeLog as noinst_DATA to trigger its
7372	rule. Rewrite the ChangeLog rule using a wrapper over
7373	gitlog-to-changelog, which rewrites the file only when needed.
7374	(dist-hook): Fail if there are uncommitted changes.
7375	* mu-aux/gencl: New file.
7376	* maint.mk: Remove.
7377
73782017-03-22  Sergey Poznyakoff  <gray@gnu.org.ua>
7379
7380	Bugfix.
7381
7382	* libmailutils/stream/xscript-stream.c (print_transcript):
7383	Print closing double-quote after user name in LOGIN statement.
7384
73852017-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7386
7387	Improve maintainer scripts.
7388
7389	* Makefile.am (alpha,alphacheck): Update rules.
7390	* mu-aux/gitinfo.pl: Obtain more data.
7391
73922017-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7393
7394	Minor fix.
7395
73962017-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7397
7398	Bugfixes in NLS code.
7399
7400	* libmailutils/base/lcall.c (mu_lc_all_free): Use str->flags to
7401	determine what fields need to be freed.
7402	(mu_parse_lc_all): Force retrieving language and territory if
7403	charset is requested. Use this to provide a default value, in
7404	case charset cannot be determined. Deallocate the surplus data
7405	afterward
7406	* libmailutils/base/locale.c (mu_charset_lookup): Bugfix.
7407	* mail/util.c (util_rfc2047_decode): Avoid memory leak.
7408
74092017-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7410
7411	Fix imap4d testsuite.
7412
7413	The tests failed if MU_DEFAULT_SCHEME were set to anything, but
7414	mbox.
7415
7416	* imap4d/tests/atlocal.in (make_config): set
7417	.mailbox.mailbox-type=mbox.
7418	* imap4d/list.c (imap4d_list): Use %s as the format.
7419
74202017-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7421
7422	More fixes to mu_cfg_field_map (see afbb33cf).
7423
7424	* libmailutils/cfg/driver.c (mu_cfg_field_map): Use correct
7425	enumeration function depending on the element type. Return
7426	meaningful error.
7427
74282017-03-20  Sergey Poznyakoff  <gray@gnu.org.ua>
7429
7430	Housekeeping: implement a tool for producing intermediate alpha
7431	tarballs.
7432
7433	Intermediate tarballs have the same version number as initial
7434	alpha version, to which is appended a suffix "-N", where N is
7435	the number of commits between the current git HEAD and the
7436	original alpha release.
7437
7438	Additionally, the --version (or -version, for MH) output has
7439	been changed to include the N and the git description (for all
7440	releases, but stable).
7441
7442	* .gitignore: Update.
7443	* Makefile.am: Remove git-describe and git-describe.h goals.
7444	(alpha, alphacheck): Rewrite.
7445	* configure.ac (GITINFO): New subst variable.
7446	* include/mailutils/Makefile.am (gitinfo.h): New built source.
7447	* libmailutils/cli/cli.c: Include gitinfo.h
7448	(mu_version_hook): Rewrite.
7449	* mh/mh_getopt.c: Include gitinfo.h
7450	(mh_version_hook): Rewrite.
7451	* mu-aux/gitinfo.pl: New file.
7452	* mu-aux/Makefile.am (EXTRA_DIST): Add gitinfo.pl
7453	* mu/Makefile.am (mu-setup.c): Add dependency
7454	* testsuite/testsuite.inc (MUT_VERSION): Account for changes in
7455	version output.
7456
74572017-03-20  Sergey Poznyakoff  <gray@gnu.org.ua>
7458
7459	Fix pop3d command parser (complement afda9ba4)
7460
7461	* pop3d/cmd.c (command_table_head): Remove. Use command_table
7462	instead. All uses changed.
7463	* pop3d/stls.c (pop3d_stls): Fail if TLS is not requested.
7464
74652017-03-20  Sergey Poznyakoff  <gray@gnu.org.ua>
7466
7467	New itrctl request: mu_itrctl_count.
7468
7469	* include/mailutils/iterator.h (mu_itrctl_req)
7470	<mu_itrctl_count>: New request type.
7471	* libmailutils/base/assoc.c (itrctl): Support mu_itrctl_count.
7472	* libmailutils/list/iterator.c (list_itrctl): Likewise.
7473	* libmailutils/mailbox/hdritr.c (hdr_itrctl): Likewise.
7474	* libmailutils/mailbox/mbxitr.c (mbx_itrctl): Likewise.
7475	* libmailutils/base/opool.c (opitr_itrctl): New function -
7476	support mu_itrctl_count.
7477	(mu_opool_get_iterator): Register opitr_itrctl.
7478	* libmailutils/diag/debug.c (list_itrctl): Return 1-based
7479	position indices on mu_itrctl_tell. Support mu_itrctl_count.
7480
74812017-03-19  Sergey Poznyakoff  <gray@gnu.org>
7482
7483	Fix a bug in field-map handling.
7484
7485	* libmailutils/cfg/driver.c (parse_mapping): Fix expected value
7486	type.
7487	* libmu_auth/sql.c (get_field): Remove left-over mu_assoc_ref
7488	call (see 622bc770).
7489
74902017-03-18  Sergey Poznyakoff  <gray@gnu.org>
7491
7492	Rewrite TLS support.
7493
7494	The new implementation allows for per-server certificates.
7495
7496	* libmu_auth/Makefile.am: Build tls support depending on the
7497	value of MU_COND_GNUTLS.
7498	* libmu_auth/notls.c: New file.
7499	* libmu_auth/tls.c: Rewrite.
7500	* libmu_auth/tlsiostr.c: New file.
7501	* libmu_auth/tlsvar.c: New file.
7502	* libmu_auth/tlsconf.c: New file.
7503	* include/mailutils/sys/tls-stream.h (_mu_tls_stream): New
7504	members: session_type, conf, cred.
7505	(mu_tls_io_stream_create): New proto.
7506	* include/mailutils/tls.h (mu_tls_module_config): Remove
7507	definition.
7508	(mu_tls_config): New structure.
7509	(mu_tls_server_stream_create): Remove proto.
7510	(mu_tls_cert_file_checks) (mu_tls_key_file_checksr)
7511	(mu_tls_ca_file_checks): New globals (MU_TLS_CERT_FILE_CHECKS)
7512	(MU_TLS_KEY_FILE_CHECKS)
7513	(MU_TLS_CA_FILE_CHECKS): New defines.
7514	(mu_tls_stream_create): New proto.
7515	(mu_tls_config_status): New constants.
7516	(mu_tls_check_config): Remove.
7517	(mu_tls_config_check): New function.
7518	* include/mailutils/server.h (mu_m_server_preflight_fp): New
7519	typedef.
7520	(mu_m_server_set_preflight): New proto.
7521	* libmailutils/diag/debcat (tls): New category.
7522	* libmailutils/server/ipsrv.c (mu_ip_server_get_data): New
7523	function.
7524	* libmailutils/server/msrv.c (_mu_m_server) <preflight>: New
7525	method.
7526	(mu_m_server_set_preflight): New function.
7527	(mu_m_server_destroy): Destroy the srvlist.
7528	(open_connection): New function.
7529	(mu_m_server_run): Remove from srvlist only those servers that
7530	failed to open. Run preflight check, if registered.
7531	* include/mailutils/cfg.h (mu_cfg_section): New member: data.
7532	* libmailutils/cfg/driver.c (dup_container): Copy the "data"
7533	pointer.
7534	(mu_cfg_section_add_params): Preserve original pointer and
7535	offset when necessary.
7536	* libmailutils/cfg/parser.y (_scan_tree_helper): Use the
7537	section data pointer (if set) as data target.
7538	* configure.ac (MU_COND_GNUTLS): New conditional.
7539	* imap4d/commands.c: Remove #ifdef WITH_TLS preprocessor
7540	conditional.
7541	* imap4d/imap4d.c (tls_mode): Remove variable.
7542	(imap4d_srv_config): Move definition to the header file. Remove
7543	#ifdef WITH_TLS preprocessor conditionals. Rename the tls
7544	configuration statement to tls-mode. Add new subsection
7545	.server.tls; Remove the legacy tls-required configuration
7546	statement.
7547	(imap4d_mainloop): Change signature: take a pointer to the
7548	struct imap4d_srv_config as the 3rd argument, Use the
7549	cfg->tls_mode member to decide on TLS state.
7550	(main): Call mu_tls_cfg_init. Install server preflight checker.
7551	* imap4d/imap4d.h: Remove #ifdef WITH_TLS preprocessor
7552	conditionals.
7553	(imap4d_srv_config): Moved from imap4d.c New member: tls_conf
7554	(imap4d_session): New member: tls_conf
7555	(global_tls_conf): New global.
7556	(io_setio, imap4d_init_tls_server): Change prototypes.
7557	* imap4d/io.c (io_setio): Change signature: take a pointer to
7558	the struct mu_tls_config as the 3rd argument. Rewrite TLS
7559	support.
7560	(imap4d_init_tls_server): Take a pointer to the struct
7561	mu_tls_config.
7562	* imap4d/starttls.c (tls_available, tls_done): Remove globals.
7563	(global_tls_conf): New global.
7564	(imap4d_starttls): Keep TLS state in the session.
7565	(tls_encryption_on): Likewise.
7566	(starttls_init): Rewrite as a mserver preflight check function.
7567	* pop3d/capa.c: Remove #ifdef WITH_TLS preprocessor
7568	conditional.
7569	(capa_stls): Rewrite.
7570	* pop3d/cmd.c (global_tls_conf): New global.
7571	(stls_preflight): New function.
7572	(pop3d_error_string): Rewrite using char ** array.
7573	* pop3d/extra.c (pop3d_setio): Take a pointer to struct
7574	mu_tls_config as the 3rd argument. Decide on TLS using it.
7575	(pop3d_init_tls_server): Take a pointer to struct
7576	mu_tls_config.
7577	* pop3d/pop3d.c: Rename the tls configuration statement to
7578	tls-mode. Add new subsection .server.tls; Remove the legacy
7579	tls-required configuration statement. (pop3d_mainloop) Take a
7580	pointer to struct mu_tls_config as the 3rd argument. Decide on
7581	TLS using it.
7582	(main): Call mu_tls_cfg_init. Install server preflight check.
7583	* pop3d/pop3d.h (pop3d_session): New member tls_conf.
7584	(pop3d_srv_config): New definition.
7585	(global_tls_conf): New extern.
7586	* pop3d/stls.c: Rewrite TLS support.
7587	* NEWS: Document new features.
7588	* configure.ac: Version 3.2.90.
7589	* doc/texinfo/programs.texi: Update.
7590
75912017-03-11  Sergey Poznyakoff  <gray@gnu.org>
7592
7593	Minor changes.
7594
75952017-03-11  Sergey Poznyakoff  <gray@gnu.org>
7596
7597	Version 3.2.
7598
75992017-03-06  Sergey Poznyakoff  <gray@gnu.org>
7600
7601	Fix NULL dereference.
7602
7603	* libmailutils/mime/mimehdr.c (mu_mime_param_free): Check if
7604	argument is NULL.
7605
76062017-02-18  Sergey Poznyakoff  <gray@gnu.org>
7607
7608	'Q' encoding: encode question mark properly; limit length of
7609	encoded words.
7610
7611	* libmailutils/base/rfc2047.c (mu_rfc2047_encode): Limit length
7612	of encoded word to 75 bytes.
7613	* libmailutils/filter/qpflt.c: Treat '?' as special character
7614	in Q encoder.
7615	* libmailutils/tests/encode2047.at: Add more tests.
7616	* libmailutils/tests/encode2047.c: Use mailutils string I/O
7617
76182017-02-17  Sergey Poznyakoff  <gray@gnu.org>
7619
7620	Fix memory leak in mu_stream_destroy.
7621
7622	* libmailutils/stream/stream.c (mu_stream_destroy): Free buffer
7623	space.
7624	(mu_stream_set_buffer,mu_stream_getdelim): Use stdlib
7625	allocation functions instead of mu wrappers.
7626
76272017-02-17  Sergey Poznyakoff  <gray@gnu.org>
7628
7629	Fix handling of ambiguous command line options.
7630
7631	The approach used so far failed to recognize ambiguous
7632	abbreviations located in different groups. It also didn't work
7633	when MU_PARSEOPT_NO_SORT was requested. This commit fixes it by
7634	keeping an additional array of indices to long options. The
7635	array is sorted so that its elements produce a
7636	lexicographically ascending list of long options.
7637
7638	* include/mailutils/opt.h (mu_parseopt): New members
7639	po_longcnt, po_longidx keep a sorted array of indices to
7640	po_optv with long options.
7641	* libmailutils/opt/opt.c (find_long_option): Iterate over
7642	po_longidx.
7643	(parseopt_init): Initialize and sort po_longidx.
7644	(mu_parseopt_free): Free po_longidx.
7645	* libmailutils/tests/parseopt.c: Add three more potentially
7646	ambiguous options
7647	* libmailutils/tests/parseopt26.at: New testcase.
7648	* libmailutils/tests/parseopt27.at: New testcase.
7649	* libmailutils/tests/Makefile.am: Add new testcases.
7650	* libmailutils/tests/testsuite.at: Likewise.
7651
76522017-02-05  Sergey Poznyakoff  <gray@gnu.org>
7653
7654	Remove unneeded file.
7655
7656	* sieve/examples/.gitignore: Remove.
7657
76582017-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>
7659
7660	sieve: add a locus indicating end of input.
7661
7662	The new node type mu_sieve_node_end is introduced to explicitly
7663	mark end of the parse tree. When generating code, this node
7664	triggers insertion of _mu_i_sv_instr_source/_mu_i_sv_instr_line
7665	before the end of code marker. This, in turn, ensures that a
7666	correct location is reported for implicit keep, if logging is
7667	enabled.
7668
7669	* libmu_sieve/sieve-priv.h (mu_sieve_node_end): New node type.
7670	(mu_sieve_node_list): New type (from struct node_list in
7671	sieve.y)
7672	* libmu_sieve/sieve.y (node_list_add): New function.
7673	(input production): Add mu_sieve_node_end at the end of the
7674	tree.
7675
76762017-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>
7677
7678	Log sieve source location in maidag.
7679
7680	* lib/sieve.c (_sieve_action_log): Log source location
7681
76822017-01-30  Sergey Poznyakoff  <gray@gnu.org.ua>
7683
7684	Fix sieve logging in maidag.
7685
7686	* maidag/maidag.c (sieve_debug_flags)
7687	(sieve_enable_log): Remove.
7688	* maidag/script.c (apply_script): Check for
7689	mu_script_sieve_log.
7690
76912017-01-26  Sergey Poznyakoff  <gray@gnu.org.ua>
7692
7693	Allow for "INBOX." namespace.
7694
7695	* imap4d/imap4d.h (io_send_astring): New proto.
7696	* imap4d/io.c (io_send_astring): New function.
7697	* imap4d/list.c (list_fun): Use io_send_astring.
7698	(list_ref): Special handling for empty wcard
7699	(imap4d_list): Remove special handling for empty wcard and
7700	INBOX. Leave that to list_ref. This makes it possible to
7701	declare namespaces like "INBOX." ("." being the delimiter).
7702	* imap4d/lsub.c (imap4d_lsub): Use io_send_astring.
7703	* imap4d/namespace.c (namespace_translate_name): Check for
7704	declared namespace first.
7705
77062017-01-26  Sergey Poznyakoff  <gray@gnu.org.ua>
7707
7708	Minor fix.
7709
77102017-01-26  Sergey Poznyakoff  <gray@gnu.org.ua>
7711
7712	Improve description of variables useful in namespace directory
7713	statements.
7714
77152017-01-26  Sergey Poznyakoff  <gray@gnu.org.ua>
7716
7717	Minor fix.
7718
7719	* imap4d/list.c (list_ref): Use mu_imap_wildmatch_ci to check
7720	for a request matching INBOX.
7721	* include/mailutils/imaputil.h (mu_imap_wildmatch_ci): New
7722	prototype.
7723	* libmailutils/imapio/wildmatch.c (mu_imap_wildmatch_ci): New
7724	function.
7725
77262017-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>
7727
7728	Further improvements of IMAP LIST functionality.
7729
7730	* imap4d/list.c (list_fun): Ignore names that contain delimiter
7731	as part of their name (untranslatable names); Don't insert
7732	spurious separators.
7733	(list_ref): Make sure a pathnames are properly separated from
7734	namespace prefixes.
7735	(imap4d_list): Fix eventual use of uninitialized pfx.
7736	* imap4d/namespace.c (prefix_translate_name): Allow for
7737	NS_OTHER prefixes ending with a delimiter.
7738	(extract_username): Return NULL if prefix without trailing
7739	delimiter was used.
7740	* imap4d/tests/atlocal.in (make_config): Add more namespace
7741	prefixes.
7742	* imap4d/tests/list.at: Add more tests.
7743	* libmailutils/string/expvar.c (exp_getvar): Return
7744	MU_WRDSE_UNDEF if the variable is defined, but has NULL value.
7745
77462017-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>
7747
7748	imap4d: forbid to treat namespace root as a mailbox.
7749
7750	* imap4d/namespace.c (namespace_get_name): Return NULL if name
7751	is the same as the returned prefix
7752
77532017-01-24  Sergey Poznyakoff  <gray@gnu.org>
7754
7755	Simplify the namespace interface.
7756
7757	* imap4d/namespace.c (prefix_translate_name): Remove the url
7758	parameter. All uses changed.
7759	(namespace_translate_name): Likewise.
7760	(i_translate_name): Rename to translate_name. Remove the url
7761	and ns parameters. All uses changed.
7762	* imap4d/imap4d.h (namespace_translate_name): Change signature.
7763
77642017-01-24  Sergey Poznyakoff  <gray@gnu.org>
7765
7766	imap4d: uniformly use mailbox name and record for opening
7767	mailboxes.
7768
7769	This avoids problems with escaping pathnames that contain
7770	characters specific for URLs
7771
7772	* imap4d/select.c (imap4d_select0): Don't use mailbox URL.
7773	* lib/manlock.c (manlock_open_mailbox_from_record): New
7774	function.
7775	* lib/muaux.h (manlock_open_mailbox_from_record): New proto.
7776
77772017-01-23  Sergey Poznyakoff  <gray@gnu.org.ua>
7778
7779	Fix memory allocation.
7780
77812017-01-23  Sergey Poznyakoff  <gray@gnu.org.ua>
7782
7783	imap4d: fix list.
7784
7785	* imap4d/list.c (refinfo) <refptr>: const pointer.
7786	(list_fun): Don't insert spurious delimiter between the prefix
7787	and the value.
7788	(list_ref): New static function. Actually list a normalized
7789	ref/wcard pair.
7790	(imap4d_list): Correctly handle wildcard part starting with
7791	namespace prefixes
7792	* imap4d/namespace.c (prefix_translate_name): If a prefix ends
7793	with a delimiter, allow its use without trailing delimiter in
7794	ref. E.g.
7795	 LIST "~" "%"
7796
7797	for prefix "~/" is quite OK.
7798	* imap4d/tests/atlocal.in: Fix prefix declaration.
7799
78002017-01-23  Sergey Poznyakoff  <gray@gnu.org>
7801
7802	Fix listing names with escapable characters.
7803
7804	* imap4d/io.c (io_send_qstring): Fix condition
7805	* imap4d/list.c (list_fun): Use io_send_qstring to print names.
7806	* imap4d/lsub.c (imap4d_lsub): Likewise.
7807
78082017-01-22  Sergey Poznyakoff  <gray@gnu.org>
7809
7810	Bugfix.
7811
7812	* imap4d/namespace.c (namespace_init): Provide record for
7813	default "" prefix.
7814
78152017-01-22  Sergey Poznyakoff  <gray@gnu.org>
7816
7817	imap4d: revamp namespace translation.
7818
7819	Instead of translating names to full mailbox URLs, translate
7820	them to the filesystem pathname and record (mu_record_t) that
7821	should be used when creating the mailbox. Never use
7822	mu_mailbox_create_default.
7823
7824	This patch also fixes memory leaks in some functions (the
7825	return value from namespace_get_url was never freed).
7826
7827	* imap4d/imap4d.h (namespace_get_url): Remove.
7828	(namespace_get_name): New proto.
7829	* imap4d/namespace.c (namespace_init): Always initialize the
7830	pfx->record member. This requires that the default record be
7831	initialized.
7832	(namespace_get_url): Remove.
7833	(namespace_get_name): New function.
7834	* imap4d/create.c: Use namespace_get_name and
7835	mu_mailbox_create_from_record to create mailboxes. Fix folder
7836	creation.
7837	* imap4d/append.c: Use namespace_get_name and
7838	mu_mailbox_create_from_record to create mailboxes.
7839	* imap4d/copy.c: Likewise.
7840	* imap4d/delete.c: Likewise.
7841	* imap4d/quota.c: Likewise.
7842	* imap4d/rename.c: Likewise.
7843	* imap4d/status.c: Likewise.
7844
78452017-01-22  Sergey Poznyakoff  <gray@gnu.org>
7846
7847	Bugfix in IMAP LIST.
7848
7849	* imap4d/list.c (list_fun): List matching directories.
7850
78512017-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7852
7853	Bugfix.
7854
7855	* libmu_auth/ldap.c (_construct_attr_array)
7856	(_mu_entry_to_auth_data): Fix types of iterator return values.
7857
78582017-01-20  Sergey Poznyakoff  <gray@gnu.org.ua>
7859
7860	Update README-alpha.
7861
78622017-01-20  Sergey Poznyakoff  <gray@gnu.org.ua>
7863
7864	Update documentation.  Use the namespace name "personal",
7865	instead of "private".
7866
78672017-01-19  Sergey Poznyakoff  <gray@gnu.org>
7868
7869	Add tests for mu_str_expand and mu_str_vexpand functions.
7870
7871	* libmailutils/string/expvar.c (exp_shell): Fix out-of-buffer
7872	read when used without arguments.
7873	(mu_str_expand): Improve error handling.
7874	* libmailutils/tests/testsuite.at (MU_GENERIC_TEST_CMD): New
7875	macro. Include exp.at
7876	* libmailutils/tests/vexp.c: New file.
7877	* libmailutils/tests/Makefile.am: Build vexp. Add exp.at
7878	* libmailutils/tests/exp.at: New file.
7879
78802017-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7881
7882	Provide functions for expanding string using mu_assoc_t table.
7883
7884	The functions are used wherever variables can be expected, most
7885	notably in configuration statements, such as ldap, namespace
7886	(imap4d), etc. Apart from expanding variables it also provides
7887	command expansion $(command args...)
7888
7889	The commands currently available are:
7890
7891	 domainpart ARG splits its argument on the first occurrence of
7892	@
7893	 and returns the part after it.
7894	 localpart ARG splits its argument on the first occurrence of @
7895	 and returns the part before it.
7896	 shell CMD ARG... runs shell command CMD and returns its output
7897	* include/mailutils/cstr.h (mu_str_expand, mu_str_vexpand): New
7898	protos.
7899	* libmailutils/string/expvar.c: New file.
7900	* libmailutils/string/Makefile.am: Add expvar.c
7901	* libmailutils/tests/exp.c: New file.
7902	* libmailutils/tests/Makefile.am: Add exp.c
7903	* imap4d/imap4d.c (namespace_cfg_init): Fix docstring.
7904	* imap4d/namespace.c (namespace_translate_name): Use
7905	mu_str_expand.
7906	* libmailutils/mailbox/mbx_default.c
7907	(mu_construct_user_mailbox_url): Use mu_str_vexpand.
7908	* libmu_auth/ldap.c (_mu_ldap_search): Likewise.
7909	* libmu_auth/radius.c (_expand_query): Likewise.
7910	* libmu_auth/sql.c (mu_sql_expand_query): Likewise.
7911	* mu/shell.c (mutool_prompt_env): Remove.
7912	(shell_prompt): Rewrite
7913	(input_line_interactive): Use mu_str_expand.
7914	(mutool_shell_prompt_assoc): New function.
7915	* mu/mu.h (mutool_shell_prompt_assoc): New proto.
7916	* mu/imap.c (imap_prompt_env): Use mutool_shell_prompt_assoc.
7917	* mu/pop.c (pop_prompt_env): Likewise.
7918	* mu/smtp.c (smtp_prompt_env): Likewise.
7919
79202017-01-18  Sergey Poznyakoff  <gray@gnu.org.ua>
7921
7922	Minor change.
7923
7924	* libmailutils/mime/mime.c: Fix formatting
7925
79262017-01-17  Sergey Poznyakoff  <gray@gnu.org.ua>
7927
7928	Remove unnecessary mu_message_t flag (MESSAGE_MIME_OWNER)
7929
79302017-01-17  Sergey Poznyakoff  <gray@gnu.org.ua>
7931
7932	Minor changes.
7933
7934	* configure.ac: Set version 3.1.91
7935	* NEWS: Update.
7936	* doc/texinfo/programs.texi: Minor change.
7937	* libmailutils/mime/mime.c (_mime_part_size)
7938	(_mime_body_lines): Fix counting. Return 0 if MIME is empty.
7939
79402017-01-16  Sergey Poznyakoff  <gray@gnu.org>
7941
7942	Improve mu_attachment_copy_ interface.
7943
7944	* libmailutils/mime/attachment.c
7945	(mu_attachment_copy_from_stream)
7946	(mu_attachment_copy_from_file): Remove the encoding parameter.
7947	Take the encoding to use from the value of the
7948	Content-Transfer-Encoding header. Return EINVAL if it is not
7949	present.
7950	* include/mailutils/message.h (mu_attachment_copy_from_stream)
7951	(mu_attachment_copy_from_file): Change signature. All uses
7952	changed.
7953
79542017-01-16  Sergey Poznyakoff  <gray@gnu.org>
7955
7956	Improve the --skip-empty-attachment functionality.
7957
7958	This also includes small bugfixes in the MIME library code.
7959
7960	The --skip-empty-attachment option now affects the original
7961	body as well. If the option is in effect, and the body is
7962	empty, it will not be included to the composed message.
7963
7964	* libmailutils/mime/mime.c (_mime_body_stream_read): Return EOF
7965	if there are no parts in the message.
7966	(mu_mime_get_num_parts): If message is not multipart, report 1
7967	part without setting mime->nmtp_parts. Setting it caused
7968	coredump in other MIME functions (namely, in mu_mime_add_part.
7969	* mail/send.c (add_body): New function. Adds original body to
7970	the MIME, honoring the --skip-empty-attachment option.
7971	* doc/texinfo/programs.texi: Update.
7972
79732017-01-16  Sergey Poznyakoff  <gray@gnu.org>
7974
7975	imap4d: log client identity.
7976
7977	* imap4d/id.c (eat_args): Log the client identity using the
7978	info channel.
7979	* imap4d/list.c: tiny change
7980
79812017-01-16  Sergey Poznyakoff  <gray@gnu.org>
7982
7983	mail: new option --skip-empty-attachments.
7984
7985	* libmailutils/cli/cli.c (mu_cli): Use "no-" prefix to indicate
7986	negation
7987	* mail/mail.c (skip_empty_attachments): New global.
7988	(mail_options): New option --skip-empty-attachments
7989	* mail/mail.h (skip_empty_attachments): New extern.
7990	* mail/send.c (atchinfo) <skip_empty>: New field.
7991	(send_attach_file): Initialize skip_empty
7992	(saveatt): Optionally skip empty attachments
7993	* NEWS: Mention the new option.
7994	* doc/texinfo/programs.texi: Document the new option.
7995
79962017-01-14  Sergey Poznyakoff  <gray@gnu.org>
7997
7998	Bugfix.
7999
8000	* libmu_sieve/load.c [!HAVE_LIBLTDL] (mu_sieve_load_ext): Fix
8001	declaration.
8002
80032017-01-14  Sergey Poznyakoff  <gray@gnu.org>
8004
8005	Fix typos.
8006
80072017-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8008
8009	docs: improve the attachment section.
8010
8011	* doc/texinfo/programs.texi: provide an example script
8012	illustrating how to use mail from another programs.
8013
80142017-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8015
8016	Re-introduce the --HANG hidden option.
8017
8018	* libmailutils/cli/cli.c (mu_common_options): Declare the
8019	--HANG option.
8020	(hangproc): New function.
8021
80222017-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8023
8024	mail: new options to read attachments from file descriptors.
8025
8026	* mail/mail.c (default_encoding,default_content_type)
8027	(content_name,content_filename): New statics.
8028	(cli_attach): Use the value of --content-name option as the
8029	content-type name parameter. The "-" argument instructs the
8030	program to read attachment from stdin (eqv --attach-fd=0)
8031	(cli_attach_fd): New function.
8032	(mail_options): New options: --content-name,
8033	--content-filename, --attach-fd
8034	* mail/mail.h (send_attach_file_default): Remove.
8035	(send_attach_file): New proto.
8036	* mail/send.c (atchinfo): New fields: id, name, source.
8037	(atchinfo_free): Update.
8038	(default_encoding,default_content_type): Remove globals.
8039	(send_attach_file): Rewrite.
8040	(send_attach_file_default): Remove.
8041	(escape_list_attachments): Print attachment identifier instead
8042	of the file name, which can be NULL.
8043	(saveatt): Use mu_attachment_create and
8044	mu_attachment_copy_from_stream.
8045	* NEWS: Update.
8046	* doc/texinfo/programs.texi: Document the new options.
8047
80482017-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8049
8050	Fix default nullstream read mode.
8051
8052	* libmailutils/stream/nullstream.c (_nullstream_free_pattern):
8053	Always reset pattern and patsize.
8054	(mu_nullstream_create): Fix patsize.
8055
80562017-01-04  Sergey Poznyakoff  <gray@gnu.org>
8057
8058	Improve handling of namespace references.
8059
8060	* imap4d/list.c (refinfo) <pfxlen>: Remove.
8061	(list_fun): Change the algorithm for restoring the printable
8062	reference name.
8063	(imap4d_list): Use actual reference, not the prefix value.
8064	* imap4d/namespace.c: Fix handling of NS_OTHER prefixes.
8065	* imap4d/tests/list.at: Change the testcase.
8066
80672017-01-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8068
8069	Tiny fix in c++ code.
8070
80712017-01-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8072
8073	Rewrite namespace support.
8074
8075	* imap4d/imap4d.c (imap4d_homedir)
8076	(modify_homedir, mailbox_mode): Remove.
8077	(imap4d_srv_param): New configuration statement "namespace"
8078	Remove statements: homedir, personal-namespace,
8079	shared-namespace, other-mailbox-mode, shared-mailbox-mode.
8080	* imap4d/imap4d.h (imap4d_homedir, modify_homedir)
8081	(mailbox_mode): Remove. (namespace, namespace_init_session,
8082	util_getfullpath)
8083	(namespace_getfullpath, namespace_checkfullpath): Remove.
8084	(namespace_prefix, namespace): New structs. (namespace_lookup,
8085	namespace_translate_name)
8086	(namespace_get_url, translate_delim): New protos.
8087	* imap4d/list.c (refinfo): Revamp.
8088	(list_fun): Rewrite.
8089	* imap4d/namespace.c: Rewrite from scratch.
8090	* imap4d/append.c: Use new namespace functions.
8091	* imap4d/util.c (util_getfullpath): Remove.
8092	* imap4d/copy.c: Likewise.
8093	* imap4d/create.c: Likewise.
8094	* imap4d/delete.c: Likewise.
8095	* imap4d/quota.c: Likewise.
8096	* imap4d/rename.c: Likewise.
8097	* imap4d/select.c: Likewise.
8098	* imap4d/status.c: Likewise.
8099	* imap4d/tests/atlocal.in (make_config): New function.
8100	* imap4d/tests/testsuite.at (IMAP4D_CONFIG)
8101	(IMAP4D_RUN): New functions.
8102	* imap4d/tests/list.at: Update tests 16, 17, 18, 19
8103	* imap4d/tests/IDEF0955.at: Use IMAP4D_RUN.
8104	* imap4d/tests/IDEF0956.at: Likewise.
8105	* imap4d/tests/append00.at: Likewise.
8106	* imap4d/tests/append01.at: Likewise.
8107	* imap4d/tests/create01.at: Likewise.
8108	* imap4d/tests/create02.at: Likewise.
8109
81102017-01-02  Sergey Poznyakoff  <gray@gnu.org>
8111
8112	Tiny fix.
8113
8114	* libmailutils/sockaddr/str.c: Add missing include. Reported by
8115	Felix Janda
8116
81172017-01-01  Sergey Poznyakoff  <gray@gnu.org>
8118
8119	Happy GNU Year.
8120
81212016-12-31  Sergey Poznyakoff  <gray@gnu.org.ua>
8122
8123	Provide a way to discern between erroneous return and
8124	user-induced break condition in foreach iterator functions.
8125
8126	* libmailutils/diag/errors (MU_ERR_USER0-MU_ERR_USER7): New
8127	error constants. Reserved for user's purposes, such as breaking
8128	from foreach iterators.
8129	* libmaildutils/list/foreach.c (mu_list_foreach): Treat NULL
8130	list as a list of 0 elements.
8131	* libmailutils/list/foreachdir.c (mu_list_foreach_dir):
8132	Likewise.
8133	* imap4d/imap4d.h (imap4d_auth_result): Remap constants to
8134	MU_ERR_USER[0-2]
8135	* libmu_sieve/prog.c (mu_i_sv_lint_command): Use mu_list_locate
8136	with the default comparator.
8137	* mh/mh_list.c (_comp_name): Rewrite to match the definition of
8138	mu_list_comparator_t
8139	(mhl_format_run): Set _comp_name as comparator for the
8140	env.printed_fields list.
8141	(header_is_printed): Use mu_list_locate.
8142	* imap4d/authenticate.c: Use MU_ERR_USER0-MU_ERR_USER7 to
8143	indicate normal break condition in foreach iterators.
8144	* imap4d/imap4d.c: Likewise.
8145	* imap4d/namespace.c: Likewise.
8146	* libmailutils/auth/auth.c: Likewise.
8147	* libmailutils/cfg/driver.c: Likewise.
8148	* libmailutils/cfg/parser.y: Likewise.
8149	* libmailutils/server/acl.c: Likewise.
8150	* libmailutils/server/msrv.c: Likewise.
8151	* libmu_sieve/conf.c: Likewise.
8152	* libmu_sieve/load.c: Likewise.
8153	* libmu_sieve/sieve.l: Likewise.
8154	* libmu_sieve/strexp.c: Likewise.
8155	* libproto/imap/mbox.c: Likewise.
8156	* libproto/imap/search.c: Likewise.
8157	* mh/mh_format.c: Likewise.
8158	* mh/send.c: Likewise.
8159	* mh/sortm.c: Likewise.
8160	* mimeview/mimetypes.y: Likewise.
8161	* movemail/movemail.c: Likewise.
8162
81632016-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8164
8165	Provide sort function for associative arrays.
8166
8167	The mu_assoc_sort_r call sorts the elements of mu_assoc_t for
8168	subsequent iterative access. Random access facilities remain
8169	undisturbed.
8170
8171	* include/mailutils/assoc.h (mu_assoc_comparator_t): New
8172	typedef.
8173	(mu_assoc_sort_r): New proto.
8174	* libmailutils/base/assoc.c (mu_assoc_sort_r): New function.
8175	* libmailutils/tests/mimehdr.c: Sort assoc elements prior to
8176	iteration.
8177
81782016-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8179
8180	Fix parsing of Content-Type and Content-Disposition headers.
8181
8182	Correctly handle character set and language info embedded in
8183	parameter values, and eventual parameter value continuations as
8184	per RFC 2231, Section 3.
8185
8186	* include/mailutils/assoc.h (mu_assoc_is_empty): New proto.
8187	* libmailutils/base/assoc.c (mu_assoc_is_empty): New function.
8188	* include/mailutils/mime.h (mu_mime_header_parse): Output
8189	charset is char const *.
8190	* libmailutils/mime/mimehdr.c (mu_mime_header_parse): Likewise.
8191	* include/mailutils/util.h (mu_content_type) <param>: Change
8192	type to mu_assoc_t
8193	(mu_param): Remove structure declaration.
8194	(mu_content_type_parse): Take an optional output charset.
8195	* libmailutils/base/ctparse.c (mu_content_type_parse): Rewrite
8196	using mu_mime_header_parse.
8197	* imap4d/fetch.c (send_parameter_list): Rewrite using
8198	mu_mime_header_parse.
8199	(format_param): Use base64 for parameter values with explicit
8200	charsets.
8201	* libmailutils/tests/conttype.c: Reflect the changes to struct
8202	mu_content_type
8203
82042016-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8205
8206	Implement mu_assoc_foreach function.
8207
8208	* include/mailutils/assoc.h (mu_assoc_action_t): New typedef.
8209	(mu_assoc_foreach): New function.
8210	* libmailutils/base/assoc.c (mu_assoc_foreach): New function.
8211
82122016-12-27  Sergey Poznyakoff  <gray@gnu.org.ua>
8213
8214	Revise associative array API.
8215
8216	* configure.ac (VI_REVISION): Increase.
8217	* include/mailutils/assoc.h (mu_assoc_create): Change
8218	prototype. (mu_assoc_ref,mu_assoc_ref_install)
8219	(mu_assoc_remove_ref): Remove.
8220	(mu_assoc_get): New proto.
8221	(mu_assoc_lookup,mu_assoc_lookup_ref): New proto.
8222	(mu_assoc_install_ref): New proto.
8223	(mu_assoc_set_free): Remove.
8224	(mu_assoc_set_destroy_item): Set proto.
8225	* include/mailutils/types.hin (mu_deallocator_t): New typedef.
8226	* include/mailutils/list.h (mu_list_destroy_item_t): Change
8227	definition.
8228	* libmailutils/base/assoc.c: Rewrite. Link all entries in a
8229	doubly-linked list to preserve natural ordering during
8230	iterations.
8231	* libmailutils/base/mutil.c (mutil_parse_field_map): Update
8232	calls to assoc API.
8233	* libmailutils/cfg/driver.c (alloc_section_tab)
8234	(mu_create_canned_section,mu_create_canned_param)
8235	(mu_get_canned_container,parse_mapping)
8236	(mu_cfg_field_map): Likewise.
8237	* libmailutils/mime/mimehdr.c (_mu_mime_param_free): Free the
8238	pointer itself. (flush_param,mu_mime_param_assoc_create)
8239	(mu_mime_param_assoc_add) (_mime_header_parse)
8240	(mu_mimehdr_aget_decoded_param): Update calls to assoc API.
8241	(mu_mime_param_free): New function.
8242	* libmailutils/property/assocprop.c: Likewise.
8243	* libmu_sieve/environment.c: Likewise.
8244	* libmu_sieve/variables.c: Likewise.
8245	* libproto/imap/id.c: Likewise.
8246	* mail/alias.c: Likewise.
8247	* mail/testsuite/mail/alias.exp: Update ordering of expected
8248	output.
8249	* mu/imap.c (com_id): Update.
8250	* include/mailutils/mime.h (mu_rfc2047_decode_param): Change
8251	prototype.
8252	* libmailutils/base/rfc2047.c (mu_rfc2047_decode_param):
8253	Allocate returned value, instead of filling an already
8254	allocated structure.
8255	* libproto/imap/fetch.c: Reflect changes.
8256
82572016-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
8258
8259	Fix typecasts in sieve.
8260
8261	* libmu_sieve/sieve.y (sieve_parse): Make sure 0 is properly
8262	promoted to sieve_instr_t.
8263
82642016-12-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8265
8266	Improve attachment creation API.
8267
8268	* include/mailutils/message.h (mu_attachment_create)
8269	(mu_attachment_copy_from_stream)
8270	(mu_attachment_copy_from_file): New functions.
8271	* libmailutils/mime/attachment.c: Likewise.
8272	(mu_message_create_attachment): Rewrite using the three
8273	functions above.
8274
82752016-12-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8276
8277	New string functions.
8278
8279	* libmailutils/string/strcount.c (mu_str_count): Take an array
8280	of (ASCII) characters to count occurrences of. Optionally store
8281	individual counts in an array passed as the 3rd argument.
8282	* include/mailutils/cstr.h (mu_str_count): Change proto.
8283	(mu_c_str_escape, mu_c_str_escape_trans)
8284	(mu_c_str_unescape_inplace, mu_c_str_unescape)
8285	(mu_c_str_unescape_trans): New protos.
8286	* libmailutils/string/cstrescape.c: New file.
8287	* libmailutils/string/cstrunescape.c: New file.
8288	* libmailutils/string/Makefile.am: Add new files.
8289
82902016-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
8291
8292	New command: mailutils stat.
8293
8294	* include/mailutils/util.h (mu_c_storage_t): New data type.
8295	* mu/stat.c: New file.
8296	* mu/Makefile.am: Add stat
8297	* doc/texinfo/programs.texi: Document mailutils stat
8298
82992016-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8300
8301	Bugfixes in imap client code.
8302
8303	* libproto/imap/mbox.c (_imap_message_unseen): Fix type of
8304	pointer returned by mu_list_head
8305	* libproto/imap/resproc.c (parse_response_code): Fix parser
8306
83072016-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8308
8309	imap: fix LIST "" "mbox"
8310
8311	* imap4d/list.c (imap4d_list): Move the longest directory
8312	prefix to the reference.
8313	* imap4d/tests/list.at: New testcase.
8314	* libmu_sieve/tests.c: Fix bug introduced by previous commit
8315
83162016-12-20  Sergey Poznyakoff  <gray@gnu.org.ua>
8317
8318	sieve: improve address tests.
8319
8320	* libmu_sieve/tests.c (retrieve_address): Treat
8321	MU_ERR_EMPTY_ADDRESS as MU_ERR_NOENT. This complements
8322	678d93678
8323
83242016-12-20  Sergey Poznyakoff  <gray@gnu.org.ua>
8325
8326	Bugfixes.
8327
8328	* libmu_sieve/sieve.y (mu_sieve_machine_clone): Fix memory
8329	allocation.
8330	* mh/pick.c: Remove unused functions.
8331
83322016-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8333
8334	Fix fb84d1e3.
8335
8336	The commit didn't take into account all possible
8337	option/argument combinations.
8338
8339	* mh/pick.c (main): Preprocess command line prior to parsing
8340	it, expanding --COMP NAME in -component COMP -pattern NAME.
8341	* mh/mh_getopt.c: Revert fb84d1e3
8342	* mh/mh_getopt.h: Likewise.
8343
83442016-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8345
8346	Minor changes to configure.
8347
8348	* configure.ac: Assume tokyo|kyoto cabinet will pull the
8349	necessary dependencies. Add GINT_LDADD if necessary
8350	* gint: Upgrade
8351
83522016-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8353
8354	New example.
8355
8356	* configure.ac (MU_PRI_OFF_T): Define to the printf format spec
8357	suitable for printing mu_off_t. Don't use [ ] instead of test.
8358	* include/mailutils/types.hin (MU_PRI_OFF_T): New define.
8359	* include/mailutils/Makefile.am (type.h): Pass MU_PRI_OFF_T
8360	* examples/mboxsize.c: New file.
8361	* examples/Makefile.am: Build mboxsize
8362
83632016-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8364
8365	Fix size calculation for MH and Maildir mailboxes.
8366
8367	Exclude from calculation any eventual nested mailboxes.
8368
8369	* libproto/maildir/mbox.c: Provide the mailbox_size method.
8370	* libproto/mh/mbox.c: Likewise.
8371
83722016-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8373
8374	Bugfixes.
8375
8376	* configure.ac: Fallback to guile installation prefix, if
8377	'guile-config info bindir' returns empty string.
8378	* doc/texinfo/programs.texi: Minor fix.
8379	* mail/mailline.c (ml_readline_init): Don't use obsolete
8380	CPPFunction type.
8381	* mu/shell.c (mutool_initialize_readline): Likewise.
8382	* scheme/sieve2scm.scmi: Fix typo.
8383	* sieve/sieve.c (main): Fix initialization of Sieve environment
8384	variables "location" and "post".
8385
83862016-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8387
8388	Version 3.1.90.
8389
83902016-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8391
8392	Improve rename/copy/reomove API.
8393
8394	* examples/rename.c: Remove.
8395	* examples/fcopy.c: New file.
8396	* examples/fremove.c: New file.
8397	* examples/frename.c: New file.
8398	* examples/Makefile.am: Update.
8399	* include/mailutils/util.h (mu_rename_file): Add flags.
8400	(mu_remove_file): New function.
8401	(MU_COPY_OVERWRITE): New flag.
8402	* libmailutils/base/renamefile.c: New file.
8403	* libmailutils/base/Makefile.am: Add new file.
8404	* libmailutils/base/copyfile.c: Fix error handling.
8405	* libmailutils/base/renamefile.c (mu_rename_file): Refuse to
8406	proceed if the destination file exists and MU_COPY_OVERWRITE
8407	flag is not set
8408	* libmailutils/diag/errors (MU_ERR_REMOVE_SOURCE)
8409	(MU_ERR_RESTORE_META): New errors
8410	* imap4d/rename.c (imap4d_rename): Use mu_rename_file
8411	* mh/forw.c: Likewise.
8412	* mh/mh_whatnow.c: Likewise.
8413	* mh/mhn.c: Likewise.
8414	* mh/send.c: Likewise.
8415	* include/mailutils/cstr.h (mu_str_count): New proto.
8416	* include/mailutils/util.h (mu_file_name_is_safe): New proto.
8417	* libmailutils/string/safefilename.c: New file.
8418	* libmailutils/string/strcount.c: New file.
8419	* libmailutils/string/Makefile.am: Update.
8420
84212016-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8422
8423	Add functions for safe renaming and copying of files.
8424
8425	* libmailutils/base/copyfile.c: New file.
8426	* libmailutils/base/renamefile.c: New file.
8427	* include/mailutils/util.h (mu_copy_file)
8428	(mu_rename_file): New protos.
8429	* libmailutils/base/Makefile.am: Add new files.
8430	* examples/rename.c: New file.
8431	* examples/Makefile.am: Add new files.
8432	* NEWS: Update.
8433
84342016-12-16  Sergey Poznyakoff  <gray@gnu.org>
8435
8436	Version 3.1.1 released.
8437
84382016-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
8439
8440	Export mu-mailer guile variable.
8441
8442	* libmu_scm/mu_scm.c: Export mu-mailer.
8443	* libmu_scm/mu_message.c (scm_mu_message_send): Fix a typo.
8444
84452016-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
8446
8447	Swap precedences of MH and Maildir to help in format
8448	autodetection.
8449
8450	* include/mailutils/registrar.h: Swap MU_MAILDIR_PRIO and
8451	MU_MH_PRIO (mu_record_is_local)
8452	(mu_registrar_apply_filter): New protos.
8453	* libmailutils/base/registrar.c
8454	(mu_registrar_set_default_scheme): Use
8455	mu_registrar_set_default_record.
8456	(mu_record_is_local): New function.
8457	(mu_record_get_url): Use it.
8458	(mu_registrar_apply_filter): New function.
8459
84602016-12-15  Sergey Poznyakoff  <gray@gnu.org>
8461
8462	Version 3.1.1.
8463
84642016-12-14  Sergey Poznyakoff  <gray@gnu.org>
8465
8466	Fix pick --component NAME.
8467
8468	* mh/mh_getopt.c (mh_getopt0): New function.
8469	(mh_getopt): Rewrite as alternative entry point to .
8470	* mh/mh_getopt.h (mh_getopt0): New proto.
8471	* mh/pick.c: Use mh_getopt0
8472	* mh/tests/pick.at: Add new testcase.
8473
84742016-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8475
8476	Bugfixes.
8477
8478	* libproto/imap/tag.c: Initialize allocated slot to 0
8479	* mu/imap.c: Fix number of elements to allocate
8480
84812016-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8482
8483	Restore prematurely deleted header.
8484
8485	* include/mailutils/argcv.h: Restore
8486	* include/mailutils/Makefile.am: Add back argcv.h
8487
84882016-12-13  Sergey Poznyakoff  <gray@gnu.org>
8489
8490	Minor changes in sieve.
8491
8492	* libmu_sieve/runtime.c (mu_sieve_abort): Jump with code
8493	MU_ERR_FAILURE.
8494	* libmu_sieve/tests.c (retrieve_address): Tolerate empty
8495	addresses.
8496	(retrieve_header): Return reasonable error code.
8497	* maidag/script.c (script_apply): If the script failed, return
8498	0.
8499
85002016-12-13  Sergey Poznyakoff  <gray@gnu.org>
8501
8502	Minor fix.
8503
85042016-12-13  Sergey Poznyakoff  <gray@gnu.org>
8505
8506	Version 3.1.
8507
8508	* configure.ac: version 3.1
8509	* NEWS: Likewise.
8510	* libmu_sieve/comparator.c: Attend to FIXMEs.
8511	* libmu_sieve/conf.c: Likewise.
8512	* libmu_sieve/prog.c: Likewise.
8513	* libmu_sieve/runtime.c: Likewise.
8514	* libmu_sieve/sieve.y: Likewise.
8515	* libmu_sieve/util.c: Likewise.
8516	* libmu_sieve/variables.c: Likewise.
8517	* po/POTFILES.in: Add new files.
8518
85192016-12-13  Sergey Poznyakoff  <gray@gnu.org>
8520
8521	libmu_sieve: minor fix.
8522
8523	* libmu_sieve/util.c (mu_sieve_value_get): Treat actual string
8524	and expected string list as equivalent types.
8525
85262016-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8527
8528	Pacify a paranoid compiler warning.
8529
8530	* libmailutils/string/wordsplit.c (mu_wordsplit_perror): Use %s
8531	format specifier
8532
85332016-12-13  Jordi Mallach  <jordi@debian.org>
8534
8535	Fix spelling errors.
8536
85372016-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8538
8539	Bugfixes.
8540
8541	* libmu_sieve/sieve.y: Fix compilation of chained elsif
8542	conditions.
8543	* sieve/sieve.c: Define the location environment item.
8544
85452016-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8546
8547	Document changes to Sieve.
8548
8549	* NEWS: Update.
8550	* doc/texinfo/libmu_sieve.texi: Update.
8551	* doc/texinfo/sieve.texi: Document extensions
8552	* libmu_sieve/comparator.c (mu_sieve_match_part_checker): Check
8553	the type of the 2nd argument.
8554	* sieve/sieve.c: Define "location" and "phase" environment
8555	items.
8556	* sieve/tests/pipetest.at: Use "pipe" as the capability string.
8557
85582016-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8559
8560	New sieve machine accessor functions.
8561
8562	* include/mailutils/sieve.h (mu_sieve_get_mailbox)
8563	(mu_sieve_get_argc): New protos.
8564	* libmu_sieve/runtime.c: New functions.
8565
85662016-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8567
8568	Fix command expansion in wordsplit.
8569
8570	* libmailutils/string/wordsplit.c: Change ordering of
8571	expansions so that command expansion occurs first. This fixes
8572	nested expansions and command expansions occurring after
8573	variable expansions.
8574	* libmailutils/tests/wordsplit.at: Add more tests.
8575
85762016-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8577
8578	mhn: allow for whitespace in edit commands.
8579
85802016-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8581
8582	Fix -nowhatnow proc in mh.
8583
8584	* mh/mh.h (mh_whatnow_env) <nowhatnowproc>: New member.
8585	* mh/compcommon.c (check_draft_disposition): Return
8586	DISP_REPLACE if nowhatnowproc is set.
8587	* mh/mh_whatnow.c (mh_whatnowproc): Return 0 if nowhatnowproc
8588	is set.
8589	* mh/comp.c: Fix -nowhatnowproc
8590	* mh/forw.c: Likewise.
8591	* mh/repl.c: Likewise.
8592
85932016-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8594
8595	Bugfix.
8596
8597	* libmailutils/base/ctparse.c (parse_type)
8598	(parse_subtype): Fix memory allocation
8599
86002016-12-12  Sergey Poznyakoff  <gray@gnu.org>
8601
8602	Minor fix.
8603
86042016-12-12  Sergey Poznyakoff  <gray@gnu.org>
8605
8606	Add tests for sieve environment.  Initialize environment in
8607	maidag and inc.
8608
8609	* sieve/tests/environment.at: New testcase.
8610	* sieve/tests/Makefile.am: Add new file.
8611	* sieve/tests/testsuite.at: Include new file.
8612	* lib/muscript.h (mu_script_init): Change signature.
8613	* lib/muscript_priv.h (mu_script_fun) <script_init>: Likewise.
8614	* lib/guile.c (scheme_init): Update.
8615	* lib/python.c (python_init): Update.
8616	* lib/script.c (mu_script_init): Pass environment to the
8617	script_init method.
8618	* lib/sieve.c (sieve_init): Set sieve environment.
8619	* maidag/script.c (apply_script): Set environment.
8620	* mh/inc.c: Likewise.
8621
86222016-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8623
8624	Support for environment extension (RFC 5183).
8625
8626	* include/mailutils/sieve.h (mu_sieve_require_environment): New
8627	proto.
8628	* libmu_sieve/Makefile.am: Add environment.c
8629	* libmu_sieve/environment.c: New file.
8630	* libmu_sieve/require.c: Handle "environment" keyword.
8631	* libmu_sieve/sieve-priv.h (mu_sieve_machine) <exenv>: New
8632	member.
8633	* libmu_sieve/sieve.l: Bugfixes
8634	* libmu_sieve/variables.c: Add missing static qualifiers
8635	* sieve/sieve.c: New option --environment
8636
86372016-12-10  Sergey Poznyakoff  <gray@gnu.org>
8638
8639	Remove libmu_compat.
8640
86412016-12-10  Sergey Poznyakoff  <gray@gnu.org>
8642
8643	Rewrite stream flushing code.
8644
8645	* libmailutils/stream/stream.c (_stream_flush_buffer): Rewrite.
8646
86472016-12-09  Sergey Poznyakoff  <gray@gnu.org>
8648
8649	Fix minor inconsistencies.
8650
86512016-12-09  Sergey Poznyakoff  <gray@gnu.org>
8652
8653	Provide function for parsing the Content-Type header (RFC
8654	2045).
8655
8656	* include/mailutils/util.h (mu_content_type, mu_param): New
8657	structs.
8658	(mu_content_type_t): New typedef.
8659	(mu_content_type_parse, mu_content_type_destroy): New protos.
8660	* libmailutils/base/ctparse.c: New file.
8661	* libmailutils/base/Makefile.am: Add new file.
8662	* imap4d/fetch.c: Use mu_content_type_parse to parse the
8663	header.
8664	* libmailutils/tests/conttype.c: New file.
8665	* libmailutils/tests/Makefile.am: Add new file.
8666
86672016-12-08  Sergey Poznyakoff  <gray@gnu.org>
8668
8669	Fix eventual dangling pointers.
8670
8671	Don't set mu_log_tag, leave that to the caller.
8672
8673	* libmailutils/cli/cli.c (mu_cli_ext): Don't set mu_log_tag.
8674	* libmailutils/stdstream/strerr.c: Use MU_LOG_TAG macro from
8675	syslog.h
8676	* sieve/sieve.c: Redo --no-program-name support
8677
86782016-12-08  Sergey Poznyakoff  <gray@gnu.org>
8679
8680	sieve: fix the mu_sieve_vlist_compare API.
8681
8682	* libmu_sieve/util.c (mu_sieve_vlist_compare): Rewrite.
8683	* include/mailutils/sieve.h (mu_sieve_retrieve_t): Change
8684	signature. All uses changed.
8685	(mu_sieve_relational_count): Remove.
8686	(mu_sieve_vlist_compare): Change signature.
8687	* libmu_sieve/extensions/list.c (list_retrieve_header): Always
8688	return meaningful status.
8689	* libmu_sieve/tests.c (mu_sieve_relational_count): Remove.
8690	(retrieve_address,retrieve_envelope): Return meaningful status.
8691	(retrieve_header): Iterate over all mime parts, if required.
8692	(sieve_test_address,sieve_test_header): Rewrite.
8693	* libmu_sieve/variables.c (sieve_test_string): Rewrite using
8694	mu_sieve_vlist_compare.
8695
86962016-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8697
8698	Version 3.0.90.
8699
87002016-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8701
8702	Add missing file.
8703
8704	* include/mailutils/glob.h: File was missing in df608ed0
8705	* include/mailutils/Makefile.am: Add glob.h
8706
87072016-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8708
8709	Implement the "variables" Sieve extension (RFC 5229)
8710
8711	* include/mailutils/sieve.h (mu_sieve_string): New fields
8712	"constant" and "changed".
8713	(mu_sieve_match_part_tags): New extern.
8714	(mu_sieve_relational_count) (mu_sieve_require_variables)
8715	(mu_sieve_has_variables)
8716	(mu_sieve_string_get): New functions.
8717	* libmu_sieve/variables.c: New file.
8718	* libmu_sieve/Makefile.am: Add variables.c
8719	* libmu_sieve/comparator.c: Use mu_sieve_string_get to obtain
8720	the actual value of the string.
8721	* libmu_sieve/require.c: Support the "variables" extension.
8722	* libmu_sieve/sieve-priv.h (mu_sieve_machine): New fields
8723	vartab, match_string, match_buf, match_count, match_max.
8724	(mu_i_sv_copy_variables)
8725	(mu_i_sv_expand_variables): New protos.
8726	* libmu_sieve/sieve.l (line_add): zero length means add entire
8727	asciiz string.
8728	* libmu_sieve/sieve.y (mu_sieve_machine_reset): Reset the new
8729	fields.
8730	(mu_sieve_machine_clone): Copy variables and initialize new
8731	fields.
8732	(string_rescan): New function.
8733	(sieve_parse): Rescan string to determine their properties.
8734	* libmu_sieve/strexp.c (update_len): Allow for NULL replacement
8735	values.
8736	* libmu_sieve/string.c (mu_sieve_string_get): New function.
8737	(mu_sieve_string): Use it.
8738	* libmu_sieve/tests.c (do_count): Rename to
8739	mu_sieve_relational_count, make global. All uses changed.
8740	(match_part_tags): Rename to mu_sieve_match_part_tags, make
8741	global. All uses changed.
8742	* sieve/tests/variables.at: New file.
8743	* sieve/tests/Makefile.am: Add new testcases.
8744	* sieve/tests/testsuite.at: Likewise.
8745
87462016-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8747
8748	Use glob API in sieve.
8749
8750	* libmu_sieve/comparator.c: Use mu_glob_compile instead of
8751	fnmatch.
8752
87532016-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8754
8755	New API for converting globbing patterns to extended POSIX
8756	regex.
8757
8758	* include/mailutils/opool.h (mu_nonlocal_jmp_t): New type.
8759	(mu_opool_setjmp,mu_opool_clrjmp): New functions.
8760	(mu_opool_setup_nonlocal_jump): New macro.
8761	* libmailutils/base/opool.c (_mu_opool)<jmp>: New field.
8762	(alloc_bucket): Do a non-local jump on out of memory condition,
8763	if jmp is not NULL.
8764	(mu_opool_setjmp,mu_opool_clrjmp): New functions.
8765	* libmailutils/base/glob.c: New file.
8766	* libmailutils/base/Makefile.am: Add glob.c
8767	* include/mailutils/glob.h: New file.
8768	* include/mailutils/mailutils.h: Include glob.h
8769	* libmailutils/tests/globtest.c: New file.
8770	* libmailutils/tests/globtest.at: New test.
8771	* libmailutils/tests/Makefile.am: Add new files.
8772	* libmailutils/tests/testsuite.at: Include new test.
8773
87742016-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8775
8776	Bugfix.
8777
8778	* libmailutils/stream/stream.c (mu_stream_ioctl): Don't flush
8779	read buffer.
8780
87812016-12-05  Sergey Poznyakoff  <gray@gnu.org>
8782
8783	Improve opool.
8784
8785	* include/mailutils/opool.h (mu_opool_detach): New proto.
8786	* libmailutils/base/opool.c (mu_opool_bucket): Redo as union to
8787	ensure proper alignment. All uses changed.
8788	(mu_opool_detach): New function.
8789
87902016-12-04  Sergey Poznyakoff  <gray@gnu.org>
8791
8792	sieve: redo symbol registry support.
8793
8794	The purpose is to simplify the machine structure and to ensure
8795	its clones are completely independent of the master instance.
8796
8797	* include/mailutils/sieve.h (mu_sieve_command): New struct.
8798	(mu_sieve_record): New enum
8799	(mu_sieve_registry_t): Generalize for storing various types of
8800	objects. (mu_sieve_test_lookup,mu_sieve_action_lookup)
8801	(mu_sieve_require_action,mu_sieve_require_test)
8802	(mu_sieve_require_comparator): Remove.
8803	(mu_sieve_register_test_ext,mu_sieve_register_test)
8804	(mu_sieve_register_action_ext,mu_sieve_register_action)
8805	(mu_sieve_register_comparator)
8806	(mu_sieve_load_ext): Change return type.
8807	(mu_sieve_registry_require,mu_sieve_unload_ext): New functions.
8808	(mu_sieve_machine_inherit): Rename to mu_sieve_machine_clone.
8809	* libmu_sieve/sieve-priv.h (mu_sieve_machine): Remove
8810	source_list, test_list, action_list, and comp_list. Add a
8811	single registry list instead. Add space for file and command
8812	(action and test) names: idspace, idcount, idmax. Remove unused
8813	field "stack";
8814	(mu_i_sv_lex_finish): Change prototype.
8815	(_mu_i_sv_instr_push,_mu_i_sv_instr_pop): Remove protos.
8816	(mu_i_sv_id_canon,mu_i_sv_id_num)
8817	(mu_i_sv_id_str,mu_i_sv_free_idspace): New protos.
8818	* libmu_sieve/register.c: Rename to registry.c
8819	* libmu_sieve/registry.c (mu_sieve_test_lookup)
8820	(mu_sieve_action_lookup): Remove.
8821	(mu_sieve_require_test,mu_sieve_require_action): Remove.
8822	(mu_sieve_registry_require): New function.
8823	(mu_sieve_registry_add,mu_sieve_registry_lookup): New
8824	functions.
8825	* libmu_sieve/Makefile.am: Update.
8826	* libmu_sieve/comparator.c: Rewrite using new registry
8827	functions.
8828	* libmu_sieve/load.c (mu_sieve_load_ext): Return module handle.
8829	(mu_sieve_unload_ext): New function.
8830	* libmu_sieve/mem.c (mu_sieve_free): Gracefully handle NULL
8831	argument.
8832	(mu_i_sv_id_canon,mu_i_sv_id_num,mu_i_sv_id_str): New
8833	functions.
8834	* libmu_sieve/prog.c (mu_i_sv_locus): Store index of the file
8835	name in the id space, instead of pointer to the name itself.
8836	* libmu_sieve/require.c (mu_sieve_require): Rewrite.
8837	* libmu_sieve/runtime.c (_mu_i_sv_instr_source): Expect ID
8838	index as argument. (_mu_i_sv_instr_push)
8839	(_mu_i_sv_instr_pop): Remove unused instructions.
8840	* libmu_sieve/sieve.l (file_names): Remove. Use
8841	mu_sieve_machine idspace instead.
8842	* libmu_sieve/sieve.y (mu_sieve_machine_clone)
8843	(mu_sieve_machine_dup): Rewrite.
8844	(mu_sieve_machine_destroy): Free idspace and registry
8845	* examples/numaddr.c: Reflect changes.
8846	* libmu_sieve/extensions/editheader.c: Likewise.
8847	* libmu_sieve/extensions/list.c: Likewise.
8848	* libmu_sieve/extensions/moderator.c: Likewise.
8849	* libmu_sieve/extensions/pipe.c: Likewise.
8850	* libmu_sieve/extensions/spamd.c: Likewise.
8851	* libmu_sieve/extensions/timestamp.c: Likewise.
8852	* libmu_sieve/extensions/vacation.c: Likewise.
8853
88542016-12-03  Sergey Poznyakoff  <gray@gnu.org>
8855
8856	Rename mu_sieve_machine_init to mu_sieve_machine_create.
8857
88582016-12-03  Sergey Poznyakoff  <gray@gnu.org>
8859
8860	Cleanup.
8861
8862	* include/mailutils/sieve.h (SVT_IDENT): Remove.
8863	* libmu_sieve/comparator.c (mu_sieve_match_part_checker):
8864	Remove unused variable.
8865	* libmu_sieve/mem.c (mu_sieve_reclaim_list): Remove function.
8866	* libmu_sieve/sieve.y: Remove leftover uses of SVT_IDENT.
8867	* libmu_sieve/util.c: Likewise.
8868	* libmu_sieve/sieve-priv.h: Remove useless prototypes.
8869
88702016-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
8871
8872	sieve: change string allocation and argument passing
8873	convention.
8874
8875	Strings are allocated in a per-machine string space. String and
8876	argument lists form contiguous arrays of structures. Regular
8877	expressions are compiled when they are needed. Compiled
8878	expressions are cached for eventual reuse.
8879
88802016-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
8881
8882	Fix delivery to MH and Maildir mailboxes.
8883
8884	After successful delivery, maidag would switch back to root
8885	privileges too early, due to which the mailbox would be closed
8886	when running with root UID. I the property file (.mu-prop) did
8887	not exist, it would therefore be created by root. Subsequent
8888	attempts to open it by user would fail. One of consequences is
8889	that the UIDVALIDITY value would be recalculated each time the
8890	mailbox is opened. This would force imap4 clients to rescan
8891	mailboxes infinitely, as each scan would change the UIDVALIDITY
8892	again.
8893
8894	This patch fixes the initialization of UIDVALIDITY and fixes
8895	maidag to switch back to root privileges only after closing the
8896	mailbox. It also makes sure MH and Maildir mailboxes write
8897	.mu-prop upon closing, not upon destroying the mailbox.
8898
8899	* libmailutils/base/amd.c (amd_close): Save property.
8900	(_amd_scan0): Use mailbox modification time as initial
8901	uidvalidity value.
8902	* maidag/deliver.c (deliver_to_mailbox): Remove useless UID/GID
8903	transitions.
8904
89052016-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
8906
8907	sieve: improve memory allocation.
8908
8909	* include/mailutils/sieve.h (mu_sieve_alloc)
8910	(mu_sieve_palloc,mu_sieve_prealloc)
8911	(mu_sieve_pfree,mu_sieve_pstrdup): Remove.
8912	(mu_sieve_mstrdup,mu_sieve_mrealloc)
8913	(mu_sieve_mfree): Remove.
8914	(mu_sieve_reclaim_t): New typedef.
8915	(mu_sieve_calloc,mu_sieve_strdup) (mu_sieve_realloc)
8916	(mu_sieve_reclaim_default,mu_sieve_reclaim_list)
8917	(mu_sieve_reclaim_value,mu_sieve_reclaim_tag): New functions
8918	(mu_sieve_value_create): Change prototype (take
8919	mu_sieve_machine_t as first argument)
8920	* libmu_sieve/mem.c: New file.
8921	* libmu_sieve/Makefile.am: Add new file.
8922	* libmu_sieve/comparator.c: Use new allocation functions.
8923	* libmu_sieve/prog.c: Likewise.
8924	* libmu_sieve/register.c: Likewise.
8925	* libmu_sieve/sieve.l: Likewise.
8926	* libmu_sieve/sieve.y: Likewise.
8927	* libmu_sieve/util.c: Likewise.
8928	* doc/texinfo/libmu_sieve.texi: Update (needs revision).
8929
89302016-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
8931
8932	Minor change.
8933
8934	* include/mailutils/list.h (mu_list_remove)
8935	(mu_list_remove_nd): Second arg is const.
8936	* libmailutils/list/remove.c: Likewise.
8937
89382016-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
8939
8940	Remove compatibility support for obsolete .mu-size.
8941
89422016-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8943
8944	sieve: more improvements to the argument/tag runtime access
8945	API.
8946
8947	* include/mailutils/sieve.h (mu_sieve_handler_t): Change
8948	signature: remove args and tags arguments, they are contained
8949	in struct mu_sieve_machine now. (mu_sieve_get_comparator)
8950	(mu_sieve_relcmpn_t): Change signature.
8951	(mu_sieve_tag_lookup,mu_sieve_tag_lookup_untyped): Remove
8952	(mu_sieve_get_tag,mu_sieve_get_tag_untyped): New protos.
8953	(mu_sieve_value_get_optional): Replace by
8954	mu_sieve_get_arg_optional.
8955	(mu_sieve_value_get_untyped): Replace by
8956	mu_sieve_get_arg_untyped.
8957	(mu_sieve_value_get): Replace by mu_sieve_get_arg. All uses
8958	changed.
8959	* libmu_sieve/sieve-priv.h (mu_sieve_machine): New members:
8960	arg_list and tag_list
8961	* libmu_sieve/runtime.c (instr_run): Set up identifier,
8962	arg_list, and tag_list in mu_sieve_machine_t before calling the
8963	handler. Reset them afterward.
8964	* libmu_sieve/util.c (mu_sieve_value_get_optional): Replace by
8965	mu_sieve_get_arg_optional.
8966	(mu_sieve_value_get_untyped): Replace by
8967	mu_sieve_get_arg_untyped.
8968	(mu_sieve_value_get): Replace by mu_sieve_get_arg.
8969	(mu_sieve_tag_lookup): Replace by mu_sieve_get_tag
8970	(mu_sieve_tag_lookup_untyped): Replace by
8971	mu_sieve_get_tag_untyped
8972
89732016-11-26  Sergey Poznyakoff  <gray@gnu.org>
8974
8975	sieve: improve argument/tag runtime access API.
8976
8977	* include/mailutils/sieve.h (mu_sieve_data_type): Remove
8978	SVT_VALUE_LIST.
8979	(mu_sieve_value_storage): Named union for use in
8980	mu_sieve_value_t; remove the tag field.
8981	(mu_sieve_tag_lookup): Change prototype.
8982	(mu_sieve_value_get): Change prototype.
8983	(mu_sieve_value_get_optional)
8984	(mu_sieve_value_get_untyped): New functions.
8985	(mu_sieve_arg_error): Removed proto.
8986	* libmu_sieve/sieve.y: Remove SVT_VALUE_LIST support.
8987	* libmu_sieve/util.c (mu_sieve_value_create)
8988	(mu_sieve_type_str,mu_sieve_vlist_do): Remove SVT_VALUE_LIST
8989	support.
8990	(mu_sieve_value_get): Rewrite. (mu_sieve_value_get_untyped)
8991	(mu_sieve_value_get_optional): New functions.
8992	(mu_sieve_arg_error): Remove.
8993	(mu_sieve_tag_lookup): Rewrite.
8994	(mu_sieve_tag_lookup_untyped): New function.
8995	* doc/texinfo/libmu_sieve.texi: Update.
8996
8997	libmu_sieve/tests.c libmu_sieve/actions.c
8998	libmu_sieve/extensions/editheader.c
8999	libmu_sieve/extensions/list.c
9000	libmu_sieve/extensions/moderator.c
9001	libmu_sieve/extensions/pipe.c libmu_sieve/extensions/spamd.c
9002	libmu_sieve/extensions/timestamp.c
9003	libmu_sieve/extensions/vacation.c libmu_sieve/relational.c
9004
9005	examples/numaddr.c
9006
90072016-11-26  Sergey Poznyakoff  <gray@gnu.org>
9008
9009	Minor fixes.
9010
9011	* libmu_sieve/sieve-priv.h (sieve_op_t) <unum>: New field.
9012	* libmu_sieve/sieve.l: Leave one string interpreter slot.
9013
90142016-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
9015
9016	Improve list sorting API.
9017
9018	* libmailutils/list/sort.c (mu_list_sort_r): New function.
9019	* include/mailutils/list.h: Provide prototype.
9020
90212016-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9022
9023	Implement RFC 5228, 2.4.2.4 (Encoding Characters Using
9024	"encoded-character")
9025
9026	* libmu_sieve/encoded.c: New file.
9027	* libmu_sieve/strexp.c: New file.
9028	* libmu_sieve/Makefile.am: Add new files.
9029	* libmu_sieve/require.c (mu_sieve_require): Understand
9030	"encoded-character".
9031	* libmu_sieve/sieve-priv.h (mu_i_sv_interp_t): New typedef.
9032	(mu_i_sv_expand_encoded_char): New proto.
9033	(mu_sieve_require_encoded_character): New proto.
9034	* libmu_sieve/sieve.l (string): Rewrite via line_.* functions.
9035	This fixes memory leaks on mu_sieve_machine_destroy.
9036	(line_finish): Expand ${} sequences before returning.
9037	(mu_sieve_require_encoded_character): New function.
9038	* sieve/tests/enc-char.at: New file.
9039	* sieve/tests/Makefile.am: Add enc-char.at
9040	* sieve/tests/testsuite.at: Likewise.
9041
90422016-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
9043
9044	sieve: simplify action logging API.
9045
9046	* include/mailutils/sieve.h (mu_sieve_action_log_t): Change
9047	proto.
9048	* lib/sieve.c (_sieve_action_log): Rewrite.
9049	* libmu_sieve/util.c (mu_sieve_log_action): Rewrite.
9050	* python/libmu_py/sieve.c (_sieve_action_printer): Rewrite.
9051	* sieve/sieve.c (_sieve_action_log): Rewrite.
9052
90532016-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
9054
9055	sieve: provide a separate stream for debugging output.
9056
9057	* include/mailutils/sieve.h (MU_SIEVE_DEBUG_TRACE)
9058	(MU_SIEVE_DEBUG_INSTR,MU_SIEVE_DEBUG_DISAS)
9059	(MU_SIEVE_DRY_RUN): Remove.
9060	(mu_sieve_machine_init_ex): Remove proto.
9061	(mu_sieve_set_dbg_stream,mu_sieve_get_dbg_stream)
9062	(mu_sieve_stream_save)
9063	(mu_sieve_stream_restore): New protos.
9064	* libmu_sieve/runtime.c (INSTR_DISASS,INSTR_DEBUG):
9065	Reimplement.
9066	* libmu_sieve/sieve-priv.h (MU_SV_SAVED_ERR_STATE)
9067	(MU_SV_SAVED_DBG_STATE,MU_SV_SAVED_STATE): New bitflags.
9068	(mu_sieve_state_disass): New constant.
9069	(mu_sieve_machine)<state_flags, err_mode>
9070	<err_locus,dbg_mode,dbg_locus>: New members.
9071	<dbgstream>: New member.
9072	* libmu_sieve/sieve.y (mu_sieve_machine_init_ex): Remove.
9073	(mu_sieve_machine_dup, mu_sieve_machine_inherit): Fix.
9074	(mu_sieve_set_dbg_stream)
9075	(mu_sieve_get_dbg_stream): New functions.
9076	(mu_sieve_machine_destroy): Destroy dbgstream.
9077	(with_machine): Preserve stream state (mode & locus).
9078	* libmu_sieve/util.c (mu_i_sv_debug,mu_i_sv_debug_command): Use
9079	ioctl instead of format strings.
9080	(mu_sieve_stream_save, mu_sieve_stream_restore): New functions.
9081	* python/libmu_py/sieve.c (api_sieve_machine_init): Use
9082	mu_sieve_machine_init.
9083	* sieve/sieve.c: Improve help output.
9084	(main): Dump disassembled code to standard output.
9085
90862016-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
9087
9088	Sieve: remove unused opcode.
9089
9090	* libmu_sieve/runtime.c (_mu_i_sv_instr_nop): Remove.
9091	* libmu_sieve/sieve-priv.h: Likewise.
9092
90932016-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
9094
9095	Revamp debugging/tracing support.
9096
9097	* bootstrap.conf (mu_sieve_debug, mu_sieve_trace): Remove.
9098	* include/mailutils/sieve.h (mu_sieve_debug): Remove.
9099	* examples/numaddr.c: Remove calls to mu_sieve_trace.
9100	* libmu_sieve/extensions/list.c: Likewise.
9101	* libmu_sieve/extensions/moderator.c: Likewise.
9102	* libmu_sieve/extensions/pipe.c: Likewise.
9103	* libmu_sieve/extensions/spamd.c: Likewise.
9104	* libmu_sieve/extensions/timestamp.c: Likewise.
9105	* libmu_sieve/extensions/vacation.c: Likewise.
9106	* libmu_sieve/tests.c: Likewise.
9107	* libmu_sieve/runtime.c: Use new debugging/tracing functions.
9108	* libmu_sieve/sieve-priv.h (mu_i_sv_debug, mu_i_sv_trace)
9109	(mu_i_sv_debug_command)
9110	(mu_i_sv_argf, mu_i_sv_valf): New prototypes.
9111	* libmu_sieve/sieve.y (mu_i_sv_valf, mu_i_sv_argf): New
9112	functions.
9113	* libmu_sieve/util.c (mu_sieve_debug): Remove.
9114	(mu_i_sv_print_value_list): Remove.
9115	(mu_i_sv_print_tag_list): Remove.
9116	(mu_sieve_trace): Remove.
9117	(mu_i_sv_tagf): New function.
9118	(mu_i_sv_debug): New function.
9119	(mu_i_sv_trace): New function.
9120	(mu_i_sv_debug_command): New function.
9121
91222016-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
9123
9124	Fix typo.
9125
91262016-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
9127
9128	Redo sieve debugging support.
9129
9130	Instead of keeping individual debug flags for each Sieve
9131	machine, use global debugging mechanism, category "sieve". The
9132	following levels are defined:
9133
9134	 trace1 - print parse tree before optimization
9135	 trace2 - print parse tree after optimization
9136	 trace3 - print parser traces
9137	 trace4 - print tests and actions being executed
9138	 trace8 - print disassembled code, don't run
9139	 trace9 - print each Sieve instruction being executed
9140	* include/mailutils/sieve.h (mu_sieve_get_debug_level)
9141	(mu_sieve_set_debug_level): Remove.
9142	(mu_sieve_is_dry_run,mu_sieve_set_dry_run
9143	* lib/script.c (mu_script_debug_flags): Redo.
9144	* lib/sieve.c (sieve_init): Remove call to obsoleted
9145	mu_sieve_set_debug_level.
9146	* examples/numaddr.c: Use mu_sieve_trace
9147	* libmu_sieve/extensions/list.c: Likewise.
9148	* libmu_sieve/extensions/moderator.c: Likewise.
9149	* libmu_sieve/extensions/pipe.c: Likewise.
9150	* libmu_sieve/extensions/spamd.c: Likewise.
9151	* libmu_sieve/extensions/timestamp.c: Likewise.
9152	* libmu_sieve/extensions/vacation.c: Likewise.
9153	* libmu_sieve/tests.c: Likewise.
9154	* libmu_sieve/runtime.c (INSTR_DEBUG,INSTR_DISASS): Rewrite.
9155	(mu_sieve_get_debug_level): Remove. (mu_sieve_is_dry_run_:
9156	Rewrite.
9157	(mu_sieve_set_dry_run): New function.
9158	(mu_sieve_disass): Rewrite.
9159	* libmu_sieve/sieve-priv.h (mu_sieve_machine) <debug_level>:
9160	Remove.
9161	<dry_run>: New field.
9162	* libmu_sieve/sieve.y (mu_sieve_set_debug_level): Remove.
9163	* libmu_sieve/util.c (mu_sieve_trace): New function.
9164	* sieve/sieve.c: Rewrite support for --dry-run and --debug.
9165	* sieve/tests/ext.at: Use --libdir-prefix instead of -L
9166
91672016-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
9168
9169	Further cleanup of sieve namespace.
9170
9171	Prefix internal function names with mu_i_
9172
91732016-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
9174
9175	Rewrite sieve parser.
9176
9177	Three objectives:
9178
9179	1. Simplify code. 2. Produce optimized sieve code. 3. Improve
9180	error reporting. 4. Prepare for further extensions
9181
9182	* include/mailutils/sieve.h (mu_sieve_tag_checker_t): Change
9183	signature (take mu_sieve_machine_t as the first arg). All uses
9184	changed.
9185	(mu_sieve_require): Likewise.
9186	(mu_sieve_yydebug): Remove global.
9187	* libmu_sieve/sieve-priv.h (mu_locus_range): New struct.
9188	(YYLTYPE): New define
9189	(mu_sieve_state): New enum.
9190	(mu_sieve_machine): New members: string_pool, state.
9191	(mu_sieve_node_type): New enum.
9192	(mu_sieve_node): New struct. Remove unused prototypes.
9193	* libmu_sieve/sieve.l: Keep track of code locations. Use opool
9194	for constructing string values.
9195	* libmu_sieve/sieve.y: Rewrite. First build the parse tree.
9196	Then optimize it. Finally, generate code.
9197	* libmu_sieve/tests.c (sieve_test_true,sieve_test_false):
9198	Remove. True and false tests are always optimized away.
9199	* libmu_sieve/util.c (mu_sv_compile_error): Remove.
9200	* libmu_sieve/actions.c: Use mu_diag_at_locus to report errors
9201	and mu_i_sv_error to mark sieve machine as being in error
9202	state.
9203	* libmu_sieve/comparator.c: Likewise.
9204	* libmu_sieve/prog.c (mu_sv_code): Replace with mu_i_sv_code.
9205	(mu_sv_code_instr,mu_sv_code_handler)
9206	(mu_sv_code_list,mu_sv_code_number)
9207	(mu_sv_code_string,mu_sv_code_source)
9208	(mu_sv_code_line,mu_sv_change_source)
9209	(mu_sv_code_action,mu_sv_code_test)
9210	(mu_sv_code_anyof,mu_sv_code_allof): Remove.
9211	(mu_i_sv_locus,mu_i_sv_code_action)
9212	(mu_i_sv_code_test): New function.
9213	(mu_sv_code_command): Replace with a static function.
9214	* libmu_sieve/require.c (mu_sieve_require): Take ptr to machine
9215	as the first arg.
9216	* libmu_sieve/runtime.c (mu_sieve_mailbox)
9217	(mu_sieve_message): Refuse to run if the machine is in error
9218	state.
9219	* sieve/sieve.c: Update.
9220	* sieve/tests/i-numeric.at: Update expected error message.
9221	* libmailutils/diag/diag.c (mu_diag_at_locus): Don't pass locus
9222	if mu_file is NULL.
9223	* libmu_auth/ldap.c (_mu_entry_to_auth_data): Remove leftover
9224	mu_error.
9225
92262016-11-14  Sergey Poznyakoff  <gray@gnu.org>
9227
9228	Fix expansion of #, &, %, etc. in mail copy and file commands.
9229
9230	This was accidentally broken by commit eea2c4aa.
9231
9232	* include/mailutils/mailbox.h (mu_mailbox_expand_name): New
9233	proto.
9234	* libmailutils/mailbox/mbx_default.c (mu_mailbox_expand_name):
9235	New function.
9236	(mu_mailbox_create_default): Use it.
9237	(mu_set_folder_directory): Accept NULL as argument.
9238	(mu_folder_directory): Reset default value after assigning it.
9239	This way the folder directory still defaults to the same value
9240	as earlier, but can be reset to NULL, if so desired.
9241	(plus_expand): Return a copy of the input string if folder is
9242	NULL.
9243	* mail/copy.c (append_to_mailbox): Use mu_mailbox_create, as
9244	the mailbox name has already been expanded.
9245	* mail/file.c (mail_expand_name): Use mu_mailbox_expand_name.
9246	(mail_file): Use mu_mailbox_create, as the mailbox name has
9247	already been expanded.
9248	* mail/mailvar.c (mailvar_cmd): New enum.
9249	(mailvar_symbol) <handler>: Change signature and return type.
9250	(mailvar_set): Rewrite. Take care not to modify the variable if
9251	the handler (if any) returns non-null or if the memory can't be
9252	allocated.
9253	(set_folder): Handler for the "folder" variable.
9254	* mail/tests/copy01.at: New testcase.
9255	* mail/tests/copy02.at: New testcase.
9256	* mail/tests/copy03.at: New testcase.
9257	* mail/tests/copy04.at: New testcase.
9258	* mail/tests/Makefile.am: Add new tests.
9259	* mail/tests/testsuite.at (MUT_MAIL_CMD): Set MAILRC to
9260	/dev/null. Add new tests.
9261
92622016-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
9263
9264	mhn: restore -compose mode as default.
9265
92662016-11-10  Sergey Poznyakoff  <gray@gnu.org>
9267
9268	Fix program name duplicate in the output of "mailutils help
9269	COMMAND"
9270
92712016-11-07  Sergey Poznyakoff  <gray@gnu.org>
9272
9273	Version 3.0.
9274
92752016-11-05  Sergey Poznyakoff  <gray@gnu.org>
9276
9277	Fix option sorting.
9278
9279	* libmailutils/opt/opt.c (sort_group): Don't assume stability
9280	of the sort. Use auxiliary data structure to sort array of
9281	options that contain aliases.
9282	* libmailutils/tests/parseopt.c (set_prog_args): Fix delimiter.
9283	* libmailutils/tests/strtoc.c (v_cidr_format): Error checking.
9284	* maidag/Makefile.am (maidag_LDADD): Reorder libraries to make
9285	sure maidag uses freshly built libraries (not the ones already
9286	installed in the system).
9287	* mh/pick.c (options): Bugfix.
9288
92892016-11-05  Sergey Poznyakoff  <gray@gnu.org>
9290
9291	Add missing documentation.
9292
92932016-11-05  Sergey Poznyakoff  <gray@gnu.org>
9294
9295	Minor changes.
9296
92972016-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
9298
9299	Fix operation of mail -t; some other minor fixes.
9300
9301	* mail/escape.c (parse_headers): Moved to send.c
9302	(check_headers): New function.
9303	(escape_continue): Use check_headers.
9304	* mail/mail.c (read_recipients): New variable. The -t option
9305	sets read_recipients and editheaders
9306	* mail/mail.h (parse_headers): New proto.
9307	* mail/send.c: Special handling for -t option.
9308	(parse_headers): New function.
9309	* movemail/movemail.c (onerror statement): Accept a list as
9310	argument.
9311	* doc/texinfo/mailutils.texi: Update.
9312	* doc/texinfo/programs.texi: Update.
9313
93142016-11-03  Sergey Poznyakoff  <gray@gnu.org.ua>
9315
9316	Fix docs. Change argument of the field-map configuration
9317	statement.
9318
9319	The field-map statement (.ldap.field-map & .sql.field-map)
9320	takes a list of mappings as argument. For compatibility and for
9321	internal purposes, a string is still allowed.
9322
9323	* doc/texinfo/programs.texi: Update.
9324	* include/mailutils/cfg.h (mu_cfg_field_map): New proto.
9325	* include/mailutils/sql.h (mu_password_type): Rename.
9326	(mu_sql_module_config) <positional>: Remove.
9327	(mu_sql_decode_password_type): Remove prototype.
9328	* libmailutils/base/mutil.c (mu_sql_decode_password_type):
9329	Remove function.
9330	* libmailutils/cfg/driver.c (mu_cfg_field_map): New function.
9331	* libmu_auth/ldap.c (cb_field_map): Use mu_cfg_field_map.
9332	(module_init): Fix default filter.
9333	* libmu_auth/sql.c (cb_field_map): Use mu_cfg_field_map.
9334	(mu_sql_param): Rename "password-type" statement to
9335	"password-encryption". Remove the "positional" statement.
9336
93372016-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
9338
9339	Bugfix.
9340
9341	* libmailutils/cfg/parser.y (mu_cfg_parse_config): Silently
9342	ignore ENOENT
9343
93442016-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
9345
9346	Rename default configuration file.
9347
9348	The default configuration file name is "mailutils.conf". Legacy
9349	configuration file "mailutils.rc" is processed if necessary.
9350
9351	* libmailutils/cli/cli.c: Rename main configuration file to
9352	mailutils.conf Remove 'rcfile' option aliases.
9353	(mu_cli_ext): Special handling for legacy configuration file.
9354	* NEWS: Update.
9355	* doc/texinfo/mailutils.texi: Update.
9356	* doc/texinfo/programs.texi: Update.
9357
93582016-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
9359
9360	Improve configuration file handling.
9361
9362	* include/mailutils/cfg.h (mu_cfg_parse_hints): Rename
9363	site_rcfile to site_file, custom_rcfile to custom_file. Remove
9364	append_tree and data fields.
9365	(MU_PARSE_CONFIG_GLOBAL,MU_CFG_PARSE_PROGRAM): Remove.
9366	(MU_PARSE_CONFIG_VERBOSE): Rename to MU_CF_VERBOSE.
9367	(MU_PARSE_CONFIG_DUMP): Rename to MU_CF_DUMP.
9368	(MU_CFG_FMT_LOCUS): Rename to MU_CF_FMT_LOCUS.
9369	(MU_CFG_FMT_VALUE_ONLY): Rename to MU_CF_FMT_VALUE_ONLY.
9370	(MU_CFG_FMT_PARAM_PATH): Rename to MU_CF_FMT_PARAM_PATH.
9371	(MU_CFG_COMPATIBILITY,MU_CFG_DEPRECATED): Remove.
9372	(mu_parse_config, mu_get_config): Remove deprecated functions.
9373	* libmailutils/cli/cli.c (mu_general_help_text): New global.
9374	(app_data): New struct.
9375	(init_options): Construct configuration option group depending
9376	on which configuration files are in use.
9377	(mu_cli_ext): Don't use per-user configuration files for
9378	servers. Pass pointer to app_data structure as po.po_data
9379	(mu_cli): Set MU_CFHINT_PER_USER_FILE flag by default.
9380	* mail/testsuite/lib/mail.exp: Rewrite invocation of the
9381	mu_init command.
9382	* include/mailutils/cli.h (mu_cli_setup) <server>: New field.
9383	* comsat/comsat.c (cli): Mark as server.
9384	(main): Bugfix: pass pointer to server to mu_cli.
9385	* imap4d/imap4d.c (cli): Mark as server.
9386	* pop3d/pop3d.c: Likewise.
9387	* comsat/tests/testsuite.at: Use the --no-site-config option.
9388	* imap4d/tests/testsuite.at: Likewise.
9389	* libmailutils/cfg/driver.c: Update.
9390	* libmailutils/cfg/format.c: Update.
9391	* libmailutils/cfg/lexer.l: Update.
9392	* libmailutils/cfg/parser.y: Update.
9393	* mu/acl.c: Update.
9394	* pop3d/testsuite/lib/pop3d.exp: Likewise.
9395	* mu/mu.c: Don't read configuration files.
9396	* mu/query.c: Fix args_doc
9397	* testsuite/lib/mailutils.exp (mu_init): Change option
9398	handling. Set --no-config option by default.
9399
94002016-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
9401
9402	Fix in logstream.
9403
9404	* libmailutils/stream/logstream.c (_log_write): Force
9405	MU_LOG_LOCUS mode if the locus is given explicitly.
9406
94072016-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
9408
9409	Bugfixes in MH.
9410
9411	* mh/mh_getopt.c (mh_opt_notimpl_warning): For boolean options,
9412	don't emit warning if the value would be set to false.
9413	* mh/anno.c: Fix the type of boolean unimplemented options.
9414	* mh/refile.c: Likewise.
9415	* mh/repl.c: Likewise.
9416	* mh/send.c: Likewise.
9417
94182016-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>
9419
9420	Minor fix.
9421
94222016-10-30  Sergey Poznyakoff  <gray@gnu.org>
9423
9424	Improve opool API.
9425
9426	* configure.ac: Version 2.99.993
9427	* NEWS: Update.
9428	* include/mailutils/opool.h (MU_OPOOL_DEFAULT)
9429	(MU_OPOOL_ENOMEMABRT): New defines.
9430	(mu_opool_create): Change meaning of the 2nd argument. All uses
9431	updated.
9432	(mu_opool_free, mu_opool_dup): New proto.
9433	* libmailutils/base/opool.c (_mu_opool) <memerr>: Replace with
9434	flags.
9435	<head,tail,free>: Rename.
9436	(mu_opool_free, mu_opool_dup): New functions.
9437	(mu_opool_head): Bugfix.
9438
94392016-10-29  Sergey Poznyakoff  <gray@gnu.org>
9440
9441	Remove old compatibility quirks.
9442
94432016-10-29  Sergey Poznyakoff  <gray@gnu.org>
9444
9445	Minor changes.
9446
94472016-10-29  Sergey Poznyakoff  <gray@gnu.org>
9448
9449	Remove left over references to argp; other bugfixes.
9450
94512016-10-28  Sergey Poznyakoff  <gray@gnu.org>
9452
9453	Bugfix.
9454
9455	* configure.ac: Version 2.99.992
9456	* NEWS: Update.
9457	* libmailutils/opt/opt.c (add_option_cache): Use opt_default if
9458	no argument is given.
9459
94602016-10-24  Sergey Poznyakoff  <gray@gnu.org>
9461
9462	Bugfix.
9463
94642016-10-24  Sergey Poznyakoff  <gray@gnu.org>
9465
9466	Improve program usage output.
9467
9468	* include/mailutils/opt.h (MU_PARSEOPT_SPECIAL_ARGS): New flag.
9469	(mu_parseopt)<po_special_args>: New field.
9470	* libmailutils/opt/help.c (option_summary)
9471	(print_program_usage): Print po_special_args, if defined.
9472	* libmailutils/opt/opt.c (parseopt_init): Initialize
9473	po_special_args unless MU_PARSEOPT_SPECIAL_ARGS is set.
9474
9475	MH: Advertise [+FOLDER] special argument if the -folder option
9476	is declared.
9477	* mh/mh_getopt.c (folder_option): Bugfix: -folder takes
9478	argument.
9479	(mh_getopt): Set po_special_args if the -folder option is
9480	declared.
9481	* mh/inc.c: Fix arg_doc.
9482	* mh/mhpath.c: Likewise.
9483	* mh/repl.c: Likewise.
9484	* mh/rmf.c: Likewise.
9485	* mh/rmm.c: Likewise.
9486	* mh/scan.c: Likewise.
9487	* mh/show.c: Likewise.
9488
94892016-10-23  Sergey Poznyakoff  <gray@gnu.org.ua>
9490
9491	Bugfix.
9492
94932016-10-22  Sergey Poznyakoff  <gray@gnu.org>
9494
9495	Bugfixes.
9496
9497	* libmailutils/cli/cli.c (mu_cli_ext): Initialize hints.data
9498	(accidentally deleted).
9499	* libmailutils/opt/help.c (mu_option_describe_options): Don't
9500	display dup_args_note in single-dash mode.
9501	* libmailutils/opt/progname.c (mu_set_program_name): Free the
9502	old value after allocating new copy. This allows to pass
9503	mu_full_program_name as argument. Set mu_program_name to point
9504	to a segment of mu_full_program_name, not the original arg.
9505	* mh/mh_getopt.c: Remove duplicate version option.
9506	* po/POTFILES.in: Add missing files.
9507
95082016-10-22  Sergey Poznyakoff  <gray@gnu.org>
9509
9510	Provide extended interface to mu_cli.
9511
9512	* include/mailutils/cfg.h (MU_CFG_APPEND_TREE): New flag.
9513	* include/mailutils/cli.h (mu_version_copyright): New extern.
9514	(mu_cli_ext): New proto.
9515	* libmailutils/cfg/parser.y (mu_cfg_parse_config): Check for
9516	MU_CFG_APPEND_TREE bit set before accessing hints->append_tree.
9517	* libmailutils/cli/cli.c (param_set): Likewise.
9518	(mu_cli_ext): New function.
9519	(mu_cli): Rewrite as an entry point to mu_cli_ext.
9520	* comsat/comsat.c: Remove inclusion of obsolete headers.
9521	* mu/help.c: Likewise.
9522	* pop3d/extra.c: Likewise.
9523
95242016-10-22  Sergey Poznyakoff  <gray@gnu.org>
9525
9526	Bugfixes.
9527
9528	* libmu_auth/ldap.c: Fix compilation without ldap
9529	* mh/mh_getopt.c: Fix version output to match what MH-E expects
9530
95312016-10-22  Sergey Poznyakoff  <gray@gnu.org>
9532
9533	MH: Fix MH-E compatibility.
9534
9535	* include/mailutils/cli.h (mu_version_func): Rename to
9536	mu_version_hook.
9537	* libmailutils/cli/cli.c: Likewise.
9538	* pop3d/popauth.c: Likewise.
9539	* mh/mh_getopt.c: (mh_getopt): Initialize NLS support. Install
9540	standard version hook (needed for mh-e autodetect feature).
9541	* mh/ali.c: Update prog_doc. Remove NLS initialization.
9542	* mh/anno.c: Likewise
9543	* mh/burst.c: Likewise
9544	* mh/comp.c: Likewise
9545	* mh/fmtcheck.c: Likewise
9546	* mh/folder.c: Likewise
9547	* mh/forw.c: Likewise
9548	* mh/inc.c: Likewise
9549	* mh/install-mh.c: Likewise
9550	* mh/mark.c: Likewise
9551	* mh/mhl.c: Likewise
9552	* mh/mhn.c: Likewise
9553	* mh/mhparam.c: Likewise
9554	* mh/mhpath.c: Likewise
9555	* mh/mhseq.c: Likewise
9556	* mh/msgchk.c: Likewise
9557	* mh/pick.c: Likewise
9558	* mh/prompter.c: Likewise
9559	* mh/refile.c: Likewise
9560	* mh/repl.c: Likewise
9561	* mh/rmf.c: Likewise
9562	* mh/rmm.c: Likewise
9563	* mh/scan.c: Likewise
9564	* mh/send.c: Likewise
9565	* mh/show.c: Likewise
9566	* mh/sortm.c: Likewise
9567	* mh/whatnow.c: Likewise
9568	* mh/whom.c: Likewise
9569
95702016-10-22  Sergey Poznyakoff  <gray@gnu.org>
9571
9572	Finish conversion of MH utilities to mh_parseopt.
9573
9574	This finishes work started at commit bc73fc65.
9575
9576	* include/mailutils/opt.h (mu_option_cache) <cache_arg>: Made
9577	const.
9578	* libmailutils/opt/opt.c (mu_option_cache_destroy): Don't free
9579	cache_arg.
9580	* doc/texinfo/mu-mh.texi: Update.
9581	* po/POTFILES.in: Remove obsolete files.
9582	* mh/tests/refile.at: Don't use double-dash options.
9583	* mh/mh_getopt.c (mh_opt_set_folder): New function.
9584	* mh/mh_getopt.h: Likewise.
9585	* mh/mhn.c: Convert to mh_getopt.
9586	* mh/mhparam.c: Likewise.
9587	* mh/mhpath.c: Likewise.
9588	* mh/mhseq.c: Likewise.
9589	* mh/msgchk.c: Likewise.
9590	* mh/pick.c: Likewise.
9591	* mh/pick.h: Likewise.
9592	* mh/pick.y: Likewise.
9593	* mh/prompter.c: Likewise.
9594	* mh/refile.c: Likewise.
9595	* mh/repl.c: Likewise.
9596	* mh/rmf.c: Likewise.
9597	* mh/rmm.c: Likewise.
9598	* mh/scan.c: Likewise.
9599	* mh/send.c: Likewise.
9600	* mh/show.c: Likewise.
9601	* mh/sortm.c: Likewise.
9602	* mh/whatnow.c: Likewise.
9603	* mh/whom.c: Likewise.
9604
96052016-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9606
9607	Begin rewriting MH to get rid of argp stuff.
9608
9609	MH utilities will use only single-dash long options.
9610
9611	* include/mailutils/opt.h (mu_option) <opt_default>: New
9612	member.
9613	* libmailutils/opt/opt.c (find_long_option): Improve detection
9614	of ambiguous options.
9615	(mu_option_set_value): Use default value (opt_default), if
9616	supplied.
9617	* mh/mh_argp.c: Delete.
9618	* mh/Makefile.am (libmh_a_SOURCES): Remove mh_argp.c
9619	* mh/mh_getopt.c: Rewrite from scratch using mailutils/opt
9620	* mh/mh_getopt.h: Likewise.
9621	* mh/mh.h: Add missing includes
9622	(mh_read_formfile, mh_alias_read): Change signatures.
9623	* mh/mh_alias.l (mh_alias_read): Name is const
9624	* mh/mh_init.c (mh_read_formfile): Name is const.
9625	* mh/ali.c: Convert to mh_getopt.
9626	* mh/anno.c: Likewise.
9627	* mh/burst.c: Likewise.
9628	* mh/comp.c: Likewise.
9629	* mh/fmtcheck.c: Likewise.
9630	* mh/folder.c: Likewise.
9631	* mh/forw.c: Likewise.
9632	* mh/inc.c: Likewise.
9633	* mh/install-mh.c: Likewise.
9634	* mh/mark.c: Likewise.
9635	* mh/mhl.c: Likewise.
9636	* mh/scan.c: Likewise.
9637	* mh/tests/burst.at: Don't use double-dash options
9638	* mh/tests/folder.at: Likewise.
9639
96402016-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
9641
9642	Support for single-dash long options (as in MH) and negation
9643	for boolean options.
9644
9645	* include/mailutils/opt.h (MU_PARSEOPT_SINGLE_DASH)
9646	(MU_PARSEOPT_NEGATION): New flags.
9647	(mu_parseopt) <po_negation, po_long_opt_start>: New fields.
9648	(mu_option_describe_options): Change signature.
9649	* libmailutils/opt/help.c (init_usage_vars): Initialize
9650	long_opt_col depending on the value of MU_PARSEOPT_SINGLE_DASH
9651	bit.
9652	(print_option): Handle single-dash long options and boolean
9653	options with negations.
9654	(option_summary): Likewise.
9655	(mu_option_describe_options): Take struct mu_parseopt * as its
9656	second parameter.
9657	* libmailutils/opt/opt.c (find_long_option): Handle boolean
9658	options with negations. Return also a pointer to the mu_option
9659	describing the originally used option (as opposed to the
9660	canonical one returned by the function).
9661	(parse): Handle single-dash long options.
9662	(parseopt_init): Initialize po_negation and po_long_opt_start.
9663	* libmailutils/tests/parseopt.c (parseopt_param): Handle
9664	MU_PARSEOPT_SINGLE_DASH and MU_PARSEOPT_NEGATION.
9665
96662016-10-20  Sergey Poznyakoff  <gray@gnu.org>
9667
9668	Minor fix in wordwrapper stream.
9669
9670	* libmailutils/stream/wordwrap.c (set_margin): Flush the stream
9671	if the new margin equals the current offset.
9672	(_wordwrap_write): Fix conditional
9673
96742016-10-20  Sergey Poznyakoff  <gray@gnu.org>
9675
9676	Minor fix.
9677
9678	* mu/ldflags.c: Ignore "cfg" and "argp" keywords.
9679
96802016-10-19  Sergey Poznyakoff  <gray@gnu.org>
9681
9682	Minor fix.
9683
96842016-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>
9685
9686	Rename MU_APP_NEW_LIBRARIES back to MU_APP_LIBRARIES. Version
9687	2.99.991.
9688
96892016-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>
9690
9691	Convert remaining utilities (except mh) to mu_cli.
9692
9693	* Makefile.am: Remove libmu_argp and libmu_cfg
9694	* configure.ac: Likewise.
9695	* libmu_argp/: Remove.
9696	* libmu_cfg/: Remove.
9697	* include/mailutils/Makefile.am (pkginclude_HEADERS): Remove
9698	gocs.h, libargp.h, libcfg.h
9699	* frm/frm.c: Register tls auth module
9700	* frm/from.c: Likewise.
9701	* maidag/maidag.c: Likewise.
9702	* mail/mail.c: Likewise.
9703	* messages/messages.c: Likewise.
9704	* movemail/movemail.c: Likewise.
9705	* readmsg/readmsg.c: Likewise.
9706	* sieve/sieve.c: Likewise.
9707	* frm/frm.h: Remove obsolete includes
9708	* imap4d/Makefile.am: Update.
9709	* imap4d/imap4d.c: Use mu_cli for command line and
9710	configuration parsing.
9711	* imap4d/imap4d.h: Update.
9712	* include/mailutils/gocs.h: Remove.
9713	* libmailutils/cfg/gocs.c: Remove.
9714	* libmailutils/cfg/Makefile.am: Remove gocs.c
9715	* include/mailutils/cli.h (mu_cli_capa_apply): Rename to
9716	mu_cli_capa_extend_settings
9717	(mu_cli_setup) <inorder, prog_doc_hook>: New fields.
9718	* include/mailutils/daemon.h: Remove obsolete includes.
9719	* include/mailutils/gsasl.h: Likewise.
9720	* include/mailutils/mailutils.h: Update.
9721	* include/mailutils/mu_auth.h (mu_auth_mode): New enum
9722	(mu_auth_module): Redo structure.
9723	* include/mailutils/opt.h (mu_parseopt) <po_prog_doc_hook>: New
9724	field.
9725	* include/mailutils/sql.h (mu_sql_module_config): New extern.
9726	(mu_sql_interface_index): Change proto.
9727	* libmailutils/auth/mu_auth.c: Rewrite.
9728	* libmailutils/auth/system.c (mu_auth_system_module): Update
9729	structure
9730	* libmailutils/cli/capa.c (mu_cli_capa_apply): Rename to
9731	mu_cli_capa_extend_settings
9732	* libmailutils/cli/cli.c: Extend settings from auth modules as
9733	well.
9734	* libmailutils/opt/help.c (mu_program_help): Invoke
9735	po_prog_doc_hook if defined.
9736	* libmailutils/opt/opt.c (parseopt_init): Check the
9737	MU_PARSEOPT_PROG_DOC_HOOK flag.
9738	(find_long_option): Fix recognition of ambiguous options in
9739	case of exact match.
9740	* libmu_auth/gsasl.c: Add configuration.
9741	* libmu_auth/ldap.c: Likewise.
9742	* libmu_auth/pam.c: Likewise.
9743	* libmu_auth/radius.c: Likewise.
9744	* libmu_auth/sql.c: Likewise.
9745	* libmu_auth/tls.c: Likewise.
9746	* libmu_auth/virtual.c: Likewise.
9747	* mu/Makefile.am: Update.
9748	* mu/mu.c: Rewrite using mu_cli
9749	* mu/mu.h: Likewise.
9750	* mu/acl.c: Likewise.
9751	* mu/cflags.c: Likewise.
9752	* mu/dbm.c: Likewise.
9753	* mu/dispatch.c: Likewise.
9754	* mu/filter.c: Likewise.
9755	* mu/flt2047.c: Likewise.
9756	* mu/getans.c: Likewise.
9757	* mu/getarg.c: Likewise.
9758	* mu/getyn.c: Likewise.
9759	* mu/help.c: Likewise.
9760	* mu/imap.c: Likewise.
9761	* mu/info.c: Likewise.
9762	* mu/ldflags.c: Likewise.
9763	* mu/logger.c: Likewise.
9764	* mu/pop.c: Likewise.
9765	* mu/query.c: Likewise.
9766	* mu/send.c: Likewise.
9767	* mu/shell.c: Likewise.
9768	* mu/smtp.c: Likewise.
9769	* mu/util.c: Likewise.
9770	* mu/verbose.c: Likewise.
9771	* mu/wicket.c: Likewise.
9772	* pop3d/Makefile.am: Update.
9773	* pop3d/pop3d.c: Convert to mu_cli interface.
9774	* pop3d/pop3d.h: Likewise.
9775	* sql/sql.c (mu_sql_interface_index): Change argument
9776	qualifiers.
9777
97782016-10-17  Sergey Poznyakoff  <gray@gnu.org>
9779
9780	Convert pop3d to mu_cli.
9781
97822016-10-16  Sergey Poznyakoff  <gray@gnu.org>
9783
9784	Convert popauth to mu_cli.
9785
97862016-10-16  Sergey Poznyakoff  <gray@gnu.org>
9787
9788	Convert maidag to mu_cli.
9789
97902016-10-16  Sergey Poznyakoff  <gray@gnu.org>
9791
9792	Convert comsat to mu_cli.
9793
97942016-10-16  Sergey Poznyakoff  <gray@gnu.org>
9795
9796	Convert examples to mu_cli.
9797
97982016-10-16  Sergey Poznyakoff  <gray@gnu.org>
9799
9800	Minor fix in help output.
9801
9802	Print "[OPTION...]", instead of "[OPTION]..."
9803
98042016-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
9805
9806	Convert mail to mu_cli.
9807
98082016-10-16  Sergey Poznyakoff  <gray@gnu.org>
9809
9810	Allow for multiple argument sets in help output.
9811
9812	Alternative invocations follow the main one, each on a separate
9813	line, preceded by " or: ".
9814
9815	* include/mailutils/cli.h (mu_cli_setup) <prog_alt_args>: New
9816	member.
9817	* include/mailutils/opt.h (mu_parseopt) <po_prog_args>: Change
9818	type.
9819	(mu_program_usage): Change signature.
9820	* include/mailutils/stream.h (MU_IOCTL_WORDWRAP_GET_OFFSET):
9821	Rename to MU_IOCTL_WORDWRAP_GET_COLUMN. All uses changed.
9822	* libmailutils/cli/cli.c (mu_cli): Construct po.po_prog_args
9823	from prog_args and prog_alt_args.
9824	* libmailutils/opt/help.c (move_margin): Remove.
9825	(print_program_usage): New static function.
9826	(mu_program_usage): Second argument instructs how to display
9827	options. Main work is done by print_program_usage.
9828	(mu_program_help): Call print_program_usage.
9829	* libmailutils/opt/opt.c: Update.
9830	* libmailutils/stream/wordwrap.c (set_margin): Avoid
9831	unnecessary flushes.
9832	* libmailutils/tests/parseopt.c (MU_PARSEOPT_PROG_ARGS):
9833	Alternative argument sets are separated by the pipe sign.
9834	* libmailutils/tests/Makefile.am: Add new testcase.
9835	* libmailutils/tests/testsuite.at: Likewise.
9836	* libmailutils/tests/parseopt_help04.at: Add
9837	MU_PARSEOPT_PROG_ARGS to keywords.
9838	* libmailutils/tests/parseopt_help12.at: New file.
9839	* libmailutils/tests/tcli.c (cli): Add alternative arguments.
9840	* dotlock/dotlock.c: Update.
9841	* mimeview/mimeview.c: Likewise.
9842	* sieve/sieve.c: Likewise.
9843
98442016-10-15  Sergey Poznyakoff  <gray@gnu.org>
9845
9846	Rewrite parseopt help routines using wordwrap streams.
9847
9848	* include/mailutils/stream.h
9849	(MU_IOCTL_WORDWRAP_SET_NEXT_MARGIN)
9850	(MU_IOCTL_WORDWRAP_GET_OFFSET): New opcodes.
9851	* libmailutils/stream/wordwrap.c (_wordwrap_flush_line):
9852	Replace whitespace-only lines with single newline on output.
9853	(_wordwrap_flush): Fix condition.
9854	(set_margin): Bugfix.
9855	(_wordwrap_ctl): Handle new opcodes.
9856	* include/mailutils/cli.h (mu_version_func): Change signature.
9857	* include/mailutils/opt.h (mu_parseopt) <po_help_hook>
9858	<po_version_hook>: Change signature.
9859	(mu_parseopt_fmt_text): Remove. (mu_option_describe_options,
9860	mu_program_help)
9861	(mu_program_usage): Change signature.
9862	(mu_program_version): New prototype.
9863	* libmailutils/cli/cli.c (mu_version_func): Take mu_stream_t as
9864	2nd argument. Use mu_stream_printf for output.
9865	(extra_help_hook): Likewise.
9866	* libmailutils/opt/help.c: Rewrite using wordwrap streams.
9867	* libmailutils/opt/opt.c (fn_help, fn_usage, fn_version):
9868	Update.
9869	* libmailutils/tests/parseopt.c (version_hook): Write to
9870	mu_stream_t.
9871	* libmailutils/tests/parseopt_help00.at: Fix expected output.
9872	* libmailutils/tests/parseopt_help01.at: Likewise.
9873	* libmailutils/tests/parseopt_help02.at: Likewise.
9874	* libmailutils/tests/parseopt_help03.at: Likewise.
9875	* libmailutils/tests/parseopt_help04.at: Likewise.
9876	* libmailutils/tests/parseopt_help05.at: Likewise.
9877	* libmailutils/tests/parseopt_help06.at: Likewise.
9878	* libmailutils/tests/parseopt_help07.at: Likewise.
9879	* libmailutils/tests/parseopt_help08.at: Likewise.
9880	* libmailutils/tests/parseopt_help09.at: Likewise.
9881	* libmailutils/tests/parseopt_help10.at: Likewise.
9882	* libmailutils/tests/parseopt_help11.at: Likewise.
9883
98842016-10-14  Sergey Poznyakoff  <gray@gnu.org>
9885
9886	Implement simple word-wrapping stream.
9887
9888	* include/mailutils/stream.h (MU_IOCTL_WORDWRAPSTREAM): New
9889	ioctl.
9890	(mu_wordwrap_stream_create): New proto.
9891	* libmailutils/stream/Makefile.am: add wordwrap.c
9892	* libmailutils/stream/wordwrap.c: New file.
9893	* libmailutils/tests/Makefile.am: Add new testcases.
9894	* libmailutils/tests/testsuite.at: Include new testcases.
9895	* libmailutils/tests/wordwrap.c: New file.
9896	* libmailutils/tests/wordwrap00.at: New file.
9897	* libmailutils/tests/wordwrap01.at: New file.
9898	* libmailutils/tests/wordwrap02.at: New file.
9899	* libmailutils/tests/wordwrap03.at: New file.
9900
99012016-10-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9902
9903	Bugfixes in libmailutils/opt/opt.c.
9904
99052016-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
9906
9907	Fix some incompatibilities in the previous commit.
9908
9909	* dotlock/dotlock.c (force): Change type to unsigned. Provide
9910	default value for --force.
9911	(cli): Set exit codes and extra docstring.
9912	* include/mailutils/cli.h (mu_cli_setup): New members:
9913	prog_extra_doc, ex_usage, ex_config.
9914	* include/mailutils/opt.h (mu_parseopt_getcolumn)
9915	(mu_parseopt_fmt_text): New prototypes.
9916	* libmailutils/cli/cli.c (extra_help_hook): New hook.
9917	(mu_cli): Set up customized exit codes. Pass pointer to struct
9918	mu_cli_setup in hints.data. All uses changed. Set up help hook
9919	if setup->prog_extra_doc is defined.
9920	* libmailutils/opt/help.c (mu_parseopt_getcolumn): New
9921	function.
9922	(print_option_descr): Honor explicit newlines.
9923	(mu_parseopt_fmt_text): New function.
9924	* mimeview/mimeview.c (cli): Provide extra docs.
9925	* sieve/sieve.c: Likewise.
9926
99272016-10-12  Sergey Poznyakoff  <gray@gnu.org>
9928
9929	Convert to mu_cli: frm, from, messages, mimeview, movemail,
9930	readmsg, sieve.
9931
9932	* configure.ac (MU_APP_NEW_LIBRARIES): New temp variable.
9933	* include/mailutils/sieve.h (mu_cli_capa_sieve): New extern.
9934	* include/mailutils/tls.h (mu_cli_capa_tls): New extern.
9935	* libmailutils/cli/cli.c: Minor change.
9936	* libmailutils/cli/stdcapa.c: Add "auth" capability.
9937	* libmu_auth/tls.c: provide mu_cli_capa_tls
9938	* dotlock/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9939	* dotlock/dotlock.c
9940	* frm/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9941	* frm/frm.h: Fix includes.
9942	* frm/frm.c: Use mu_cli for option & config parsing.
9943	* frm/from.c: Likewise.
9944	* messages/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9945	* messages/messages.c: Use mu_cli for option & config parsing.
9946	* mimeview/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9947	* mimeview/mimeview.c: Use mu_cli for option & config parsing.
9948	* movemail/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9949	* movemail/movemail.c: Use mu_cli for option & config parsing.
9950	* readmsg/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9951	* readmsg/readmsg.c: Use mu_cli for option & config parsing.
9952	* sieve/Makefile.am: Link with MU_APP_NEW_LIBRARIES
9953	* sieve/sieve.c: Use mu_cli for option & config parsing.
9954
99552016-10-11  Sergey Poznyakoff  <gray@gnu.org>
9956
9957	Bugfix.
9958
9959	* libmailutils/opt/opt.c (find_long_option): Don't mark
9960	ambiguity if the matching option unaliases to the same option
9961	as the found one.
9962
99632016-10-11  Sergey Poznyakoff  <gray@gnu.org>
9964
9965	Introduce new CLI/configuration code for mailutils
9966	applications.
9967
9968	The new API is to replace libmu_cfg and libmu_argp. A smooth
9969	transition is scheduled, during which the two APIs will
9970	coexist,
9971
9972	* configure.ac: Build libmailutils/cli/Makefile
9973	* include/mailutils/cli.h: New file.
9974	* include/mailutils/Makefile.am: Add cli.h
9975	* libmailutils/cli/Makefile.am: New file.
9976	* libmailutils/cli/capa.c: New file.
9977	* libmailutils/cli/cli.c: New file.
9978	* libmailutils/cli/stdcapa.c: New file.
9979	* libmailutils/Makefile.am (SUBDIRS): Add cli.
9980	* include/mailutils/cfg.h (mu_cfg_parse_hints): New members:
9981	append_tree and data.
9982	(MU_PARSE_CONFIG_LINT): New flag.
9983	* include/mailutils/diag.h (mu_program_name)
9984	(mu_full_program_name): Remove const qualifier.
9985	* include/mailutils/locker.h
9986	(mu_locker_set_default_external_program): Argument is const.
9987	* libmailutils/base/locker.c: Likewise.
9988	* include/mailutils/opt.h (mu_progname, mu_absprogname):
9989	Replace with mu_program_name and mu_full_program_name.
9990	(mu_set_progname): Rename to mu_set_program_name.
9991	(mu_parseopt) <po_data>: Change type to void *.
9992	(po_help_hook, po_version_hook): Change signatures.
9993	(mu_parseopt_error): New function.
9994	* libmailutils/opt/progname.c (mu_progname, mu_absprogname):
9995	Replace with mu_program_name and mu_full_program_name.
9996	(mu_set_progname): Rename to mu_set_program_name.
9997	* libmailutils/opt/help.c: Minor changes
9998	* libmailutils/opt/opt.c (parse_error): Rename to
9999	mu_parse_error (extern).
10000	(next_opt): Fix permutations.
10001	* libmailutils/tests/parseopt.c: Reflect changes.
10002	* libmailutils/tests/parseopt17.at: Improve test case
10003	* libmailutils/tests/parseopt_help05.at: Reflect changes.
10004	* libmailutils/tests/parseopt_help07.at: Reflect changes.
10005	* include/mailutils/stdstream.h (mu_program_name): Remove
10006	qualifier.
10007	* libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Remove
10008	useless condition
10009	* libmailutils/cfg/lexer.l (mu_cfg_parse_file): Additional info
10010	messages.
10011	* libmailutils/cfg/parser.y (mu_cfg_parse_config): Join in the
10012	append_tree.
10013	* libmailutils/diag/diag.c (mu_program_name,
10014	mu_full_program_name)
10015	(mu_set_program_name): Remove. Declared elsewhere.
10016	* libmu_sieve/conf.c: Add new configuration code. Mark old text
10017	for removal.
10018	* libmailutils/tests/tcli.c: New program.
10019	* libmailutils/tests/Makefile.am: Add tcli.c
10020
100212016-10-10  Sergey Poznyakoff  <gray@gnu.org>
10022
10023	Raise shared library version number.
10024
10025	* configure.ac (VI_CURRENT): Set to 5 Don't link intprops.h
10026	* gnulib: Upgrade.
10027	* gnulib.modules (intprops) Remove.
10028	* libmailutils/cfg/parser.y: Don't include intprops.h
10029	* po/POTFILES.in: Add new files.
10030
100312016-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10032
10033	Add missing test.
10034
100352016-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10036
10037	Fix help output.  Test it.
10038
10039	* include/mailutils/opt.h (MU_PARSEOPT_EXTRA_INFO)
10040	(MU_PARSEOPT_EXIT_ERROR): New flags.
10041	(struct mu_parseopt) <po_extra_info>: New member.
10042	<po_exit_error>: New member.
10043	* libmailutils/opt/help.c: Fix help output formatting.
10044	Implement support for ARGP_HELP_FMT envvar.
10045	* libmailutils/opt/opt.c (add_option_cache): Honor
10046	MU_PARSEOPT_IMMEDIATE.
10047	(parseopt_init): Initialize each member separately.
10048	* libmailutils/tests/parseopt.c: Rewrite envvar handling.
10049	* libmailutils/tests/Makefile.am: Add new tests.
10050	* libmailutils/tests/testsuite.at (PARSEOPT_DEFAULT): New
10051	define.
10052	* libmailutils/tests/parseopt00.at: Use PARSEOPT_DEFAULT.
10053	* libmailutils/tests/parseopt01.at: Likewise.
10054	* libmailutils/tests/parseopt02.at: Likewise.
10055	* libmailutils/tests/parseopt03.at: Likewise.
10056	* libmailutils/tests/parseopt04.at: Likewise.
10057	* libmailutils/tests/parseopt05.at: Likewise.
10058	* libmailutils/tests/parseopt06.at: Likewise.
10059	* libmailutils/tests/parseopt07.at: Likewise.
10060	* libmailutils/tests/parseopt08.at: Likewise.
10061	* libmailutils/tests/parseopt09.at: Likewise.
10062	* libmailutils/tests/parseopt10.at: Likewise.
10063	* libmailutils/tests/parseopt11.at: Likewise.
10064	* libmailutils/tests/parseopt12.at: Likewise.
10065	* libmailutils/tests/parseopt13.at: Likewise.
10066	* libmailutils/tests/parseopt14.at: Likewise.
10067	* libmailutils/tests/parseopt15.at: Likewise.
10068	* libmailutils/tests/parseopt16.at: Likewise.
10069	* libmailutils/tests/parseopt17.at: Likewise.
10070	* libmailutils/tests/parseopt18.at: Likewise.
10071	* libmailutils/tests/parseopt19.at: Likewise.
10072	* libmailutils/tests/parseopt20.at: Likewise.
10073	* libmailutils/tests/parseopt21.at: Likewise.
10074	* libmailutils/tests/parseopt22.at: Likewise.
10075	* libmailutils/tests/parseopt23.at: New test.
10076	* libmailutils/tests/parseopt24.at: New test.
10077	* libmailutils/tests/parseopt25.at: New test.
10078	* libmailutils/tests/parseopt_help00.at: New test.
10079	* libmailutils/tests/parseopt_help01.at: New test.
10080	* libmailutils/tests/parseopt_help02.at: New test.
10081	* libmailutils/tests/parseopt_help03.at: New test.
10082	* libmailutils/tests/parseopt_help04.at: New test.
10083	* libmailutils/tests/parseopt_help05.at: New test.
10084	* libmailutils/tests/parseopt_help06.at: New test.
10085	* libmailutils/tests/parseopt_help07.at: New test.
10086	* libmailutils/tests/parseopt_help08.at: New test.
10087	* libmailutils/tests/parseopt_help09.at: New test.
10088	* libmailutils/tests/parseopt_help10.at: New test.
10089	* libmailutils/tests/parseopt_help11.at: New test.
10090
100912016-10-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10092
10093	Fix mu_parseopt. Add testsuite for it.
10094
10095	* include/mailutils/opt.h (mu_parseopt) <po_permuted>: New
10096	member.
10097	* libmailutils/opt/help.c (print_option): Fix display of
10098	optional arguments.
10099	* libmailutils/opt/opt.c (next_opt,parse): Fix
10100	start-of-arguments index. Move permutation into a separate
10101	function.
10102	* libmailutils/opt/progname.c (mu_set_progname): Remove
10103	eventual lt- prefix.
10104	* libmailutils/tests/Makefile.am: Add new tests.
10105	* libmailutils/tests/parseopt.c: Use environment to control
10106	mu_parseopt flags.
10107	* libmailutils/tests/testsuite.at: Add new tests.
10108	* libmailutils/tests/strtoc.at: Update.
10109	* libmailutils/tests/parseopt00.at: New file.
10110	* libmailutils/tests/parseopt01.at: New file.
10111	* libmailutils/tests/parseopt02.at: New file.
10112	* libmailutils/tests/parseopt03.at: New file.
10113	* libmailutils/tests/parseopt04.at: New file.
10114	* libmailutils/tests/parseopt05.at: New file.
10115	* libmailutils/tests/parseopt06.at: New file.
10116	* libmailutils/tests/parseopt07.at: New file.
10117	* libmailutils/tests/parseopt08.at: New file.
10118	* libmailutils/tests/parseopt09.at: New file.
10119	* libmailutils/tests/parseopt10.at: New file.
10120	* libmailutils/tests/parseopt11.at: New file.
10121	* libmailutils/tests/parseopt12.at: New file.
10122	* libmailutils/tests/parseopt13.at: New file.
10123	* libmailutils/tests/parseopt14.at: New file.
10124	* libmailutils/tests/parseopt15.at: New file.
10125	* libmailutils/tests/parseopt16.at: New file.
10126	* libmailutils/tests/parseopt17.at: New file.
10127	* libmailutils/tests/parseopt18.at: New file.
10128	* libmailutils/tests/parseopt19.at: New file.
10129	* libmailutils/tests/parseopt20.at: New file.
10130	* libmailutils/tests/parseopt21.at: New file.
10131	* libmailutils/tests/parseopt22.at: New file.
10132
101332016-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
10134
10135	Use mu_c_type_t throughout the code.  Get rid of
10136	mu_cfg_param_data_type.
10137
10138	* include/mailutils/cfg.h (mu_cfg_param_data_type): Remove.
10139	(mu_cfg_param_type): New enum.
10140	(mu_cfg_param) <type>: Change type to int.
10141	(mu_cfg_cidr): Remove.
10142	(mu_cfg_parse_boolean): Remove. All uses updated.
10143	* include/mailutils/util.h (mu_c_void): New constant.
10144	(mu_c_type_str): New extern/
10145	* libmailutils/string/str_to_c.c (mu_c_type_str): New global.
10146	* libmailutils/cfg/format.c (mu_cfg_data_type_string): Rename
10147	to mu_c_type_string; change argument type. All uses updated.
10148	* libmailutils/cfg/parser.y: Use mu_str_to_c for value
10149	conversion.
10150	* libmailutils/tests/.gitignore: Update.
10151	* libmailutils/tests/Makefile.am: Add strtoc.at; build strtoc
10152	* libmailutils/tests/strtoc.at: New file.
10153	* libmailutils/tests/strtoc.c: New file.
10154	* libmailutils/tests/testsuite.at: Include strtoc.at
10155	* comsat/comsat.c: Use mu_c_type_t types.
10156	* dotlock/dotlock.c: Likewise.
10157	* imap4d/imap4d.c: Likewise.
10158	* lib/manlock.c: Likewise.
10159	* lib/tcpwrap.c: Likewise.
10160	* libmailutils/server/msrv.c: Likewise.
10161	* libmu_argp/muinit.c: Likewise.
10162	* libmu_cfg/common.c: Likewise.
10163	* libmu_cfg/gsasl.c: Likewise.
10164	* libmu_cfg/ldap.c: Likewise.
10165	* libmu_cfg/pam.c: Likewise.
10166	* libmu_cfg/radius.c: Likewise.
10167	* libmu_cfg/sieve.c: Likewise.
10168	* libmu_cfg/sql.c: Likewise.
10169	* libmu_cfg/tls.c: Likewise.
10170	* libmu_cfg/virtdomain.c: Likewise.
10171	* maidag/maidag.c: Likewise.
10172	* mimeview/mimeview.c: Likewise.
10173	* movemail/movemail.c: Likewise.
10174	* pop3d/pop3d.c: Likewise.
10175	* readmsg/readmsg.c: Likewise.
10176	* sieve/sieve.c: Likewise.
10177
101782016-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10179
10180	Add generic library for option parsing.
10181
10182	* configure.ac: Build libmailutils/opt
10183	* include/mailutils/Makefile.am: Add opt.h
10184	* include/mailutils/opt.h: New file.
10185	* include/mailutils/util.h (mu_c_type_t): New datatype.
10186	(mu_str_to_c): New proto.
10187	* libmailutils/Makefile.am: Add opt to subdirs.
10188	* libmailutils/opt/Makefile.am: New file.
10189	* libmailutils/opt/help.c: New file.
10190	* libmailutils/opt/opt.c: New file.
10191	* libmailutils/opt/progname.c: New file.
10192	* libmailutils/string/Makefile.am: Add new files.
10193	* libmailutils/string/str_to_c.c: New file.
10194	* libmailutils/string/to_sn.c: New file.
10195	* libmailutils/string/to_un.c: New file.
10196	* libmailutils/tests/.gitignore: Update.
10197	* libmailutils/tests/Makefile.am: Update.
10198	* libmailutils/tests/parseopt.c: New file.
10199
102002016-10-06  Sergey Poznyakoff  <gray@gnu.org.ua>
10201
10202	Bugfixes.
10203
10204	* mh/rmf.c (current_folder_path): Treat name as folder while
10205	expanding.
10206	* mail/unset.c (mail_unset): Fix the behavior when no arguments
10207	were given.
10208
102092016-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10210
10211	Allow to configure the length of the backlog queue for TCP
10212	servers.
10213
10214	New statement backlog is provided in the server block.
10215
10216	* include/mailutils/server.h (mu_m_server_cfg_init): Pass
10217	mu_m_server_t as first argument.
10218	* libmailutils/server/msrv.c (mu_m_server_cfg_init): Pass
10219	mu_m_server_t as first argument. Customize available statements
10220	depending on the type of server (tcp vs udp). New statement
10221	"backlog" available for tcp servers.
10222	* comsat/comsat.c: Update call to mu_m_server_cfg_init
10223	* imap4d/imap4d.c: Likewise.
10224	* pop3d/pop3d.c: Likewise.
10225	* maidag/maidag.c: Likewise.
10226
102272016-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10228
10229	Minor fixes.
10230
10231	* libmailutils/tests/modtofsaf.c (main): Trivial fix.
10232	* mail/mail.c: Support "address" capability.
10233	* mu/shell.c: Trivial fixes
10234
102352016-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10236
10237	Force using gnu-mh in Emacs after loading mailutils-mh.
10238
10239	* mh/etc/mailutils-mh.eli: Force using gnu-mh
10240
102412016-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10242
10243	Fix docstrings for -nowhatnowproc.
10244
102452016-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10246
10247	mh: fix the -nowhatnowproc option.
10248
10249	The -nowhatnowproc option inhibits the invocation of whatnow,
10250	and consequently, prevents the editing of the draft from
10251	occurring.
10252
102532016-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
10254
10255	Fix memory allocation in libmu_imap.
10256
10257	* libproto/imap/tag.c (_mu_imap_tag_incr): Fix size calculation
10258	when reallocating tag_buf
10259	(_mu_imap_tag_clr): Re-initialize members on error.
10260
102612016-06-15  Sergey Poznyakoff  <gray@gnu.org.ua>
10262
10263	Revert changes to msgset test utility.
10264
10265	The changes would be nice, if it weren't for the fact that
10266	libproto is not yet built by the time libmailutils/tests are
10267	compiled.
10268
102692016-06-15  Sergey Poznyakoff  <gray@gnu.org>
10270
10271	Gracefully handle empty mailboxes in mu_msgset_parse_imap.
10272
10273	* libmailutils/msgset/parse.c (MU_MSGSET_EMPTY): New constant.
10274	(parse_msgrange): Don't add any ranges if mode is set to
10275	MU_MSGSET_EMPTY.
10276	(mu_msgset_parse_imap): Force MU_MSGSET_EMPTY mode if the
10277	mailbox is empty.
10278	* libmailutils/msgset/print.c (mu_msgset_print): Handle empty
10279	message sets.
10280	* libmailutils/msgset/trans.c (_mu_msgset_translate_pair):
10281	Initialize variable.
10282	* libmailutils/tests/Makefile.am (msgset_LDADD): New variable.
10283	* libmailutils/tests/msgset.c (parse_msgset): Take mailbox as
10284	first argument.
10285	(main): New option -mailbox
10286
102872016-02-08  Sergey Poznyakoff  <gray@gnu.org.ua>
10288
10289	Minor fix.
10290
10291	* mu/smtp.c�(com_list_param): Report if the connection has not
10292	been established yet.
10293
102942016-01-22  Sergey Poznyakoff  <gray@gnu.org>
10295
10296	Fix build without tcpwrappers.
10297
10298	* configure.ac (MU_TCPWRAP_LIBRARIES): New subst variable.
10299	Always includes lib/libmutcpwrap.a. If libwrap is present on
10300	the system and required, it is included as well
10301	* imap4d/Makefile.am (TCPWRAP_LIBRARIES): Replace with
10302	MU_TCPWRAP_LIBRARIES.
10303	* maidag/Makefile.am: Likewise.
10304	* pop3d/Makefile.am: Likewise.
10305
103062016-01-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10307
10308	Update copyright years.
10309
103102015-12-19  Sergey Poznyakoff  <gray@gnu.org>
10311
10312	Bugfix in wordsplit test program.
10313
10314	* libmailutils/tests/wsp.c (make_env_kv): Fix array size.
10315
103162015-11-11  Sergey Poznyakoff  <gray@gnu.org>
10317
10318	Minor fix.
10319
10320	* bootstrap.conf: Don't try to download anything if --help is
10321	given
10322
103232015-11-10  Sergey Poznyakoff  <gray@gnu.org>
10324
10325	Minor changes.
10326
10327	* libmu_argp/mailutils.c: Include argp-namefrob.h
10328	* libproto/mailer/smtp_auth.c (get_ticket)
10329	 (_mu_smtp_fixup_params): Protect with WITH_GSASL
10330
103312015-11-10  Sergey Poznyakoff  <gray@gnu.org>
10332
10333	Fix linking.
10334
10335	* configure.ac (MU_APP_LIBRARIES): Add libmuaux.la. This
10336	complements a41e62b9 and fixes linking on systems that are
10337	unable to track dynamic library dependencies.
10338
103392015-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
10340
10341	Document Sieve extensions.
10342
103432015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10344
10345	vacation: read message body from the file.
10346
10347	* doc/texinfo/sieve.texi: Document recent changes to vacation.
10348	* libmu_sieve/extensions/vacation.c (vacation_reply): Handle
10349	the "rfc2822" tag: if set together with :file, treat the file
10350	as the RFC2822 message. Otherwise, read message body from it.
10351	* sieve/tests/vacation.at: Add test for :rfc2822
10352
103532015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10354
10355	User-defined headers in vacation extension.
10356
10357	New tag :header allows to set headers in the reply message
10358	generated by the vacation extension.
10359
103602015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10361
10362	Minor fixes.
10363
10364	* libproto/mailer/sendmail.c: Fix typo in debugging message.
10365	* po/.gitignore: Update.
10366
103672015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10368
10369	Maidag: avoid using auth_by_uid when delivering message.
10370
10371	When delivering message, the library may need to know the email
10372	address of the user on behalf of whom maidag is called. In
10373	particular, that happens when using the vacation extension. In
10374	that case the library would construct the email by
10375	concatenating user name, obtained as a result of
10376	mu_get_auth_by_uid, and current domain name. Avoid this by
10377	remembering email address the message is being delivered to.
10378
10379	* libmailutils/base/usremail.c (mu_set_user_email): NULL
10380	argument clears email.
10381	(mu_get_user_email): Use EUID instead of UID.
10382	* maidag/deliver.c (do_delivery): Set user email prior to
10383	delivery.
10384	* maidag/maidag.c (default_domain): New variable.
10385	(maidag_cfg_param): New setting "domain".
10386	* maidag/maidag.h (default_domain): New extern.
10387
103882015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10389
10390	Improve debugging.
10391
10392	* libmailutils/diag/debug.c (mu_debug_log): Account for
10393	eventual newlines in the generated message string.
10394	* imap4d/io.c (imap4d_init_tls_server): Use mu_stream_strerror.
10395
103962015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10397
10398	Bugfix.
10399
10400	* libproto/mailer/prog.c (url_to_argv): Free ws only if it was
10401	initialized.
10402
104032015-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10404
10405	Minor fixes in Makefiles.
10406
10407	* include/mailutils/Makefile.am (errno.h): Use explicit file
10408	names instead of implicit variables.
10409	* include/mailutils/sys/Makefile.am (debcat.h): Likewise.
10410	* libmailutils/diag/Makefile.am (muerrno.c): Likewise.
10411	* libmu_argp/Makefile.am (libmu_argp_la_LIBADD): Use relative
10412	path to .la,
10413
104142015-10-26  Sergey Poznyakoff  <gray@gnu.org>
10415
10416	Vacation: improve compatibility with the Sendmail utility.
10417
10418	* libmu_sieve/extensions/vacation.c (match_addresses): Change
10419	arguments: take primary email address as well as a list of
10420	aliases.
10421	(vacation_reply): Reply if the primary email or one of alias
10422	emails are listed in recipient list of the original message.
10423	New tag "always_reply" reverts to the old behavior: reply
10424	regardless of whether the message is destined for us. Use the
10425	current user email as the sender address of the vacation
10426	message. New tag "return_address" sets the sender address
10427	explicitly.
10428	* sieve/tests/vacation.at: Add new tests.
10429
104302015-10-25  Sergey Poznyakoff  <gray@gnu.org>
10431
10432	Fixes in sieve vacation extension.
10433
10434	* libmu_sieve/extensions/vacation.c (build_mime): Fix memory
10435	leak. This also flushes the message body stream, so its content
10436	becomes visible for the mailer.
10437	(noreply_address_p): Rename "addresses" tag to "noreply".
10438	(check_db): The "database" tag provides vacation database name.
10439	(vacation_reply): Always set message headers.
10440	(vacation_tags): Rename "addresses" tag to "noreply". New tag:
10441	"database"
10442	* sieve/tests/vacation.at: New file.
10443	* sieve/tests/Makefile.am (TESTSUITE_AT): Add vacation.at.
10444	* sieve/tests/testsuite.at: Include vacation.at.
10445	* doc/texinfo/programs.texi: Minor change.
10446
104472015-09-20  Sergey Poznyakoff  <gray@gnu.org>
10448
10449	Document mailbox types, variable extension, etc.
10450
104512015-09-19  Sergey Poznyakoff  <gray@gnu.org>
10452
10453	Complement f160ca75.
10454
10455	* include/mailutils/wordsplit.h (MU_WRDSX_WORD)
10456	(MU_WRDSX_QUOTE): New constants.
10457	(mu_wordsplit_getwords): Rename to mu_wordsplit_get_words.
10458	* libmailutils/string/wordsplit.c (mu_wordsplit_getwords):
10459	Rename to mu_wordsplit_get_words.
10460	* libmailutils/base/userprivs.c (mu_switch_to_privs): Fix
10461	memory overrun when retrieving the current pointer.
10462	* examples/header.c (main): Use mu_wordsplit_get_words
10463	* imap4d/preauth.c (preauth_getvar): Rewrite according to the
10464	new API.
10465	* libmailutils/imapio/create.c (mu_imapio_create): Use
10466	MU_WRDSX_ constants to address ws_escape.
10467	* libmailutils/imapio/qstring.c: Likewise.
10468	* libmailutils/mailbox/mbx_default.c: Minor fix.
10469	* libmailutils/server/acl.c (acl_getvar): Rewrite according to
10470	the new API.
10471	* libmailutils/tests/wsp.c: Minor fix.
10472	* libmailutils/url/create.c (_mu_url_create_internal): Bugfix:
10473	alloc url->path.
10474	* libmu_sieve/extensions/list.c (retrieve_next_header): Use
10475	mu_wordsplit_get_words
10476	* libproto/mailer/prog.c (prog_getvar): Rewrite according to
10477	the new API.
10478	* libproto/mailer/smtp_gsasl.c (get_implemented_mechs): Remove
10479	unneeded assignment to ws.ws_wordv.
10480	* mh/folder.c: Use mu_wordsplit_get_words.
10481	* mh/mhn.c: Likewise.
10482	* movemail/movemail.c (movemail_getvar): Rewrite according to
10483	the new API.
10484
104852015-09-16  Sergey Poznyakoff  <gray@gnu.org>
10486
10487	Port wordsplit from grecs 20616b88.
10488
10489	The updated version supports tilde and pathname expansion,
10490	command substitution and standard shell-like replacement
10491	constructs in variable substitution, such as ${X:-V} etc.
10492
10493	* include/mailutils/wordsplit.h: Update.
10494	* libmailutils/string/wordsplit.c: Update.
10495	* libmailutils/tests/wsp.c: Update.
10496	* libmailutils/tests/wordsplit.at: Update unescape test.
10497	* libmailutils/imapio/create.c (mu_imapio_create): Initialize
10498	ws_escape array.
10499	* libmailutils/mime/mimehdr.c (_mime_header_parse): Likewise.
10500	* libmailutils/tests/modmesg.c: Use mu_wordsplit with
10501	MU_WRDSF_NOSPLIT to run expansions on the string.
10502	* mu/shell.c (shell_prompt): Likewise.
10503
105042015-08-24  Sergey Poznyakoff  <gray@gnu.org>
10505
10506	Fix typos.
10507
105082015-08-04  Sergey Poznyakoff  <gray@gnu.org>
10509
10510	Spelling fixes in ChangeLog.
10511
105122015-08-04  Sergey Poznyakoff  <gray@gnu.org>
10513
10514	Bugfix.
10515
10516	* pop3d/bulletin.c (read_bulletin_db): Fix memory/descriptor
10517	leak.
10518
105192015-07-11  Sergey Poznyakoff  <gray@gnu.org>
10520
10521	Update NEWS.
10522
105232015-07-11  Sergey Poznyakoff  <gray@gnu.org.ua>
10524
10525	Log ciphersuite info after successful initiation of TLS
10526	connection.
10527
10528	* include/mailutils/stream.h (MU_IOCTL_TLSSTREAM): New ioctl
10529	code.
10530	(MU_IOCTL_TLS_GET_CIPHER_INFO): New ioctl opcode.
10531	* libmailutils/property/assocprop.c (_assoc_prop_fill)
10532	(_assoc_prop_save): allow for NULL stream pointer.
10533	* libmu_auth/tls.c (_tls_io_ioctl,_tls_ioctl): Handle
10534	MU_IOCTL_TLSSTREAM/MU_IOCTL_TLS_GET_CIPHER_INFO ioctl.
10535	* imap4d/io.c (log_cipher): New function.
10536	(io_setio, imap4d_init_tls_server): Call log_cipher after
10537	successfully establishing the TLS connection.
10538	* imap4d/starttls.c (tls_encryption_on): Remove diagnostic
10539	output.
10540	* pop3d/extra.c (log_cipher): New function.
10541	(pop3d_setio,pop3d_init_tls_server): Call log_cipher after
10542	successfully establishing the TLS connection.
10543
105442015-07-11  Sergey Poznyakoff  <gray@gnu.org.ua>
10545
10546	Minor fixes.
10547
10548	* libmailutils/mailbox/mbx_default.c
10549	(mu_normalize_mailbox_url): don't place / in front of the
10550	username.
10551	(plus_expand): Use mu_make_file_name and mu_asprintf. Check for
10552	errors.
10553	(mu_mailbox_create_default): Check for errors.
10554
105552015-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10556
10557	Fix TLS streams.
10558
10559	Avoid calling gnutls_global_init (via mu_tls_module_init) prior
10560	to forking. gnutls_global_init opens at least one file
10561	descriptor (/dev/urandom), and closing it will disrupt its
10562	operation. Current stable libgnutls (3.3.15) is able to cope
10563	with it, but there are plenty of systems running much older
10564	versions.
10565
10566	* libmailutils/server/msrv.c (mu_m_server_begin): Reset onexit
10567	list after forking.
10568	* libmu_auth/tls.c (mu_tls_module_init): Don't call
10569	mu_init_tls_libs.
10570	(_tls_server_open, _tls_client_open): Check return value from
10571	mu_init_tls_libs.
10572	* imap4d/auth_gsasl.c (auth_gsasl): Use mu_onexit to register
10573	onexit functions.
10574	* imap4d/imap4d.h (util_atexit): Remove prototype.
10575	* imap4d/starttls.c (imap4d_starttls): Don't register
10576	mu_deinit_tls_libs: now done by tls library.
10577	(starttls_init): Don't call mu_init_tls_libs.
10578	* imap4d/util.c (util_atexit): Remove.
10579	(util_bye): Update accordingly.
10580	* pop3d/extra.c (pop3d_setio): Print informational message
10581	after establishing TLS.
10582	(pop3d_bye): Don't call mu_deinit_tls_libs: that's done by the
10583	library.
10584	* pop3d/pop3d.c (main): Don't call mu_init_tls_libs.
10585
105862015-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10587
10588	Fix make check if MU_DEFAULT_SCHEME value is other than mbox.
10589
10590	* testsuite/testsuite.inc (MUT_DEFAULT_OPTIONS): New define.
10591	* maidag/tests/testsuite.at: Add MUT_DEFAULT_OPTIONS to the
10592	options passed to maidag
10593	* mail/tests/cols00.at: Use MUT_MAIL_CMD
10594	* mail/tests/cols01.at: Likewise.
10595	* mail/tests/copy00.at: Likewise.
10596	* mail/tests/nohome.at: Likewise.
10597	* mail/tests/testsuite.at (MUT_MAIL_CMD): New define. Pass
10598	MUT_DEFAULT_OPTIONS to mail.
10599	* sieve/tests/testsuite.at: Pass MUT_DEFAULT_OPTIONS to sieve.
10600
106012015-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10602
10603	Compatibility fix.
10604
10605	* libmailutils/mailbox/mbx_default.c
10606	(mu_normalize_mailbox_url): Append ${user} if URL ends with
10607	"user=". Fixes 131ddb25a.
10608
106092015-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10610
10611	Minor changes.
10612
10613	* lib/Makefile.am: Add -version-info to LDFLAGS
10614	* libmu_cfg/Makefile.am: Likewise.
10615	* libmu_argp/Makefile.am: Use LIBADD to add library dependency
10616	Pass -version-info to LDFLAGS
10617
106182015-07-02  Sergey Poznyakoff  <gray@gnu.org.ua>
10619
10620	Bugfix.
10621
10622	* libmailutils/cfg/gocs.c (mu_gocs_register): Avoid registering
10623	same capability twice.
10624
106252015-07-02  Sergey Poznyakoff  <gray@gnu.org>
10626
10627	Version 2.99.99.
10628
10629	* configure.ac: Version 2.99.99
10630	* NEWS: Update.
10631	* libmu_argp/mailutils.c: New file.
10632	* libmu_argp/Makefile.am: Add mailutils.c
10633	* libmu_argp/cmdline.c (all_cmdline_capa): Add
10634	mu_mailutils_cmdline.
10635	(mu_libargp_init): Register modflags function.
10636	* libmu_argp/mu_argp.c (mu_build_argp): Retain negative group
10637	numbers.
10638	(argp_capa): New member: modflags.
10639	(mu_register_argp_capa): Take pointer to modflags function as
10640	3rd parameter.
10641	(mu_build_argp): Use modflags member to alter argp flags.
10642	(mu_argp_build): Take pointer to flags as its third argument.
10643	* libmu_argp/muinit.c (mu_app_init): Pass pointer to flags to
10644	mu_argp_build.
10645	* libmu_cfg/init.c (mu_libcfg_init): Silently ignore unknown
10646	groups
10647	* include/mailutils/libargp.h (mu_mailutils_cmdline): New
10648	extern.
10649	(mu_cmdline_capa): New member: modflags.
10650	(mu_argp_build): Change signature.
10651	(mu_register_argp_capa): Change signature.
10652	* libmailutils/cfg/gocs.c (std_gocs_table): Add dummy entry for
10653	"mailutils"
10654	* mu/Makefile.am (bin_PROGRAMS): Rename to "mailutils".
10655	* mu/dispatch.c (dispatch_docstring): Use mu_program_name
10656	instead of the hardcoded name.
10657	* mu/mu.c: Use "mailutils" capability.
10658	* mu/mailutils-config.in: Rename to mu/mailutils-config
10659	* comsat/comsat.c: Use "mailutils" capability.
10660	* dotlock/dotlock.c: Likewise.
10661	* examples/muauth.c: Likewise.
10662	* examples/muemail.c: Likewise.
10663	* frm/frm.c: Likewise.
10664	* frm/from.c: Likewise.
10665	* imap4d/imap4d.c: Likewise.
10666	* maidag/maidag.c: Likewise.
10667	* mail/mail.c: Likewise.
10668	* messages/messages.c: Likewise.
10669	* mimeview/mimeview.c: Likewise.
10670	* movemail/movemail.c: Likewise.
10671	* pop3d/pop3d.c: Likewise.
10672	* pop3d/popauth.c: Likewise.
10673	* readmsg/readmsg.c: Likewise.
10674	* sieve/sieve.c: Likewise.
10675
106762015-07-02  Sergey Poznyakoff  <gray@gnu.org.ua>
10677
10678	Minor fix.
10679
10680	* mh/prompter.c (main): Use mu_stream_printf instead of printf
10681
106822015-06-29  Sergey Poznyakoff  <gray@gnu.org>
10683
10684	Bugfix.
10685
10686	* libproto/maildir/mbox.c (maildir_msg_finish_delivery): Don't
10687	complain if trying to unlink a nonexistent file.
10688
106892015-06-28  Sergey Poznyakoff  <gray@gnu.org>
10690
10691	Fix compilation warnings.
10692
10693	* configure.ac: Check for intptr_t
10694	* comsat/action.c (need_crlf): Use intermediate cast to
10695	intptr_t.
10696	* imap4d/imap4d.c (cb2_group, mu_get_user_groups): Likewise.
10697	* libmailutils/stream/file_stream.c (fd_ioctl): Likewise.
10698	* libmailutils/stream/mapfile_stream.c (_mapfile_ioctl):
10699	Likewise.
10700	* libmailutils/stream/tcp.c (_tcp_ioctl): Likewise.
10701	* maidag/maidag.c (cb2_group): Likewise.
10702	* frm/common.c (puts_bidi): Fix the type of 3rd parameter to
10703	fribidi_log2vis
10704	* include/mailutils/body.h: Use MU_DEPRECATED instead of
10705	__attribute__ ((deprecated)).
10706	* include/mailutils/cfg.h: Likewise.
10707	* include/mailutils/header.h: Likewise.
10708	* include/mailutils/libargp.h: Likewise.
10709	* include/mailutils/mailbox.h: Likewise.
10710	* include/mailutils/mailer.h: Likewise.
10711	* include/mailutils/registrar.h: Likewise.
10712	* include/mailutils/message.h: Likewise.
10713	(mu_message_set_stream): Remove deprecation marker.
10714
107152015-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10716
10717	python: cleanup.
10718
10719	* python/libmu_py/libmu_py.c (_ro): Remove inline qualifier.
10720	* python/libmu_py/libmu_py.h: Likewise.
10721
107222015-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10723
10724	python: fix returning size_t values.
10725
10726	* python/libmu_py/address.c: Use PyInt_FromSize_t to return
10727	size_t and similar values.
10728	* python/libmu_py/auth.c: Likewise.
10729	* python/libmu_py/body.c: Likewise.
10730	* python/libmu_py/header.c: Likewise.
10731	* python/libmu_py/mailbox.c: Likewise.
10732	* python/libmu_py/mailcap.c: Likewise.
10733	* python/libmu_py/message.c: Likewise.
10734	* python/libmu_py/mime.c: Likewise.
10735	* python/libmu_py/sieve.c: Likewise.
10736	* python/libmu_py/stream.c: Likewise.
10737
107382015-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10739
10740	python: fix passing size_t values on 64-bit architectures.
10741
10742	* lib/python.c (python_proc): Pass a copy of mu_program_name as
10743	argv[0].
10744	* python/libmu_py/libmu_py.h (ASSERT_INDEX_RANGE): New macro.
10745	* python/libmu_py/address.c: Use Py_ssize_t and check returned
10746	value range when getting size_t arguments.
10747	* python/libmu_py/auth.c: Likewise.
10748	* python/libmu_py/folder.c: Likewise.
10749	* python/libmu_py/header.c: Likewise.
10750	* python/libmu_py/mailbox.c: Likewise.
10751	* python/libmu_py/mailcap.c: Likewise.
10752	* python/libmu_py/message.c: Likewise.
10753	* python/libmu_py/mime.c: Likewise.
10754	* python/libmu_py/secret.c: Likewise.
10755	* python/libmu_py/stream.c: Likewise.
10756
107572015-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10758
10759	Fix double-inclusion of config.h in some sources.
10760
10761	* lib/muscript.h: Don't include config.h: the caller is
10762	responsible for that.
10763	* lib/guile.c: Include config.h
10764	* lib/python.c: Likewise.
10765	* lib/script.c: Likewise.
10766	* lib/sieve.c: Likewise.
10767
107682015-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
10769
10770	Minor fix.
10771
10772	* mh/prompter-tty.c: include signal.h
10773
107742015-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
10775
10776	Fix segfault when destroying mu_body_t under certain
10777	conditions.
10778
10779	That's a temporary solution until reference counters are
10780	implemented for mu_body_t
10781
10782	* libmailutils/mailbox/body.c (bstr_close, bstr_done): Don't
10783	close streams.
10784
107852015-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
10786
10787	Bugfixes.
10788
10789	* configure.ac: Fix checks for readline. If it is not present -
10790	bail out if it was explicitly requested and silently disable it
10791	otherwise. Check for dbm_dirfno and dbm_pagfno (see
10792	libmu_dbm/ndbm.c, below).
10793	* examples/mboxidx.c (set_charset_filter): Fix array
10794	dimensions.
10795	* lib/python.c (python_done): add missing return statement.
10796	* libmailutils/address/address.c (mu_address_union): Fix size
10797	argument to memset.
10798	* libmailutils/server/msrv.c (mu_m_server_get_hints): Likewise.
10799	* libmu_compat/vartab.c (vardefn_free): Likewise.
10800	* libmailutils/cfg/parser.y (_set_fun): cast enum to size_t
10801	before comparison
10802	* libmailutils/diag/wd.c (mu_wd): fix while loop.
10803	* libmailutils/tests/url-parse.c (main): Fix printf format.
10804	* libmu_dbm/ndbm.c (_ndbm_get_fd): One of dbm_dirfno or
10805	dbm_pagfno may be missing (on FreeBSD, dbm_pagfno expands to a
10806	non-defined macro, which produces compilation error.
10807	* mail/mailvar.c (mailvar_varptr_comp): Remove.
10808	(mailvar_list_copy): Use mailvar_variable_comp instead of the
10809	removed mailvar_varptr_comp.
10810
108112015-06-24  Sergey Poznyakoff  <gray@gnu.org.ua>
10812
10813	Add gnulib as a module.
10814
108152015-06-24  Sergey Poznyakoff  <gray@gnu.org.ua>
10816
10817	Make libmuaux installable shared library.
10818
10819	This commit converts libmuaux into installable shared library
10820	that includes selected modules from gnulib. Correspondingly,
10821	libmu_argp is also converted into installable shared library,
10822	which is the main purpose of these changes. This should allow
10823	other packages which depend on Mailutils to link against
10824	libmu_argp even on systems that for some reason choose not to
10825	include static libraries in their distribution (vide Debian).
10826	Another side effect is that such packages won't need to bother
10827	about argp being present on the system, as it is now included
10828	in libmuaux.so.
10829
10830	* bootstrap.conf: Don't create Makefile.am Build gnulib using
10831	libtool and use mu_am_flags custom module
10832	* lib/local/modules/mu_am_flags: New file.
10833	* configure.ac (MU_APP_LIBRARIES): Use libmu_argp.la
10834	(TCPWRAP_LIBRARIES): Add libmutcpwrap.a
10835	* lib/Makefile.am: Make libmuaux installable shared library New
10836	static library libmutcpwrap.a
10837	* libmu_argp/Makefile.am: Make libmu_argp installable shared
10838	library
10839	* examples/Makefile.am: Use libmu_argp.la
10840	* examples/cpp/Makefile.am: Likewise.
10841	* imap4d/Makefile.am: Likewise.
10842	* mapi/Makefile.am: Likewise.
10843	* mh/Makefile.am: Likewise,
10844	* pop3d/Makefile.am: Likewise.
10845
108462015-06-23  Sergey Poznyakoff  <gray@gnu.org>
10847
10848	Minor fixes in Scheme scripts.
10849
10850	* scheme/Makefile.am: set executable bit on guimb (fix a typo)
10851	Override the installcheck-binSCRIPTS rule to avoid spurious
10852	output from guile 2.0 when running the program.
10853	* scheme/guimb.scmi: Remove flags specific to guile 1.8
10854
108552015-06-23  Sergey Poznyakoff  <gray@gnu.org>
10856
10857	Fix improper padding in B encoding.
10858
10859	* libmailutils/stream/fltstream.c: stop encoding when no more
10860	input is available.
10861	* libmailutils/tests/encode2047.at: add new tests.
10862	* libmailutils/filter/base64.c (_base64_encoder): detect eof
10863
108642015-05-05  Sergey Poznyakoff  <gray@gnu.org>
10865
10866	Minor fix.
10867
108682015-05-05  Sergey Poznyakoff  <gray@gnu.org>
10869
10870	mail: add tests in a non-interactive mode.
10871
10872	* configure.ac: Configure mail/tests subdirectory.
10873	* mail/Makefile.am (SUBDIRS): Add tests.
10874	* mail/tests/testsuite.at: New file.
10875	* mail/tests/Makefile.am: New file.
10876	* mail/tests/.gitignore: New file.
10877	* mail/tests/atlocal.in: New file.
10878	* mail/tests/cols00.at: New file.
10879	* mail/tests/cols01.at: New file.
10880	* mail/tests/copy00.at: New file.
10881	* mail/tests/nohome.at: New file.
10882	* mail/tests/version.at: New file.
10883
108842015-05-04  Sergey Poznyakoff  <gray@gnu.org>
10885
10886	mail: the "copy" command operates on files by default.
10887
10888	Last argument is treated as a mailbox only if it begins with a
10889	mailbox scheme (mbox://, maildir://, etc).
10890
10891	* mail/copy.c (append_to_mailbox)
10892	(append_to_file): New functions.
10893	(mail_copy0): Depending on whether mailbox scheme is specified,
10894	call one of the above functions.
10895	* doc/texinfo/programs.texi (mail): Fix documentation of the
10896	copy command.
10897	* mail/testsuite/mail/write.exp: Update line/character counts
10898	for [Ss]ave commands.
10899
109002015-05-03  Sergey Poznyakoff  <gray@gnu.org>
10901
10902	Minor change.
10903
10904	* doc/texinfo/programs.texi: Fix description of mail --print
10905
109062015-05-03  Sergey Poznyakoff  <gray@gnu.org>
10907
10908	readmsg: minor fix.
10909
10910	* readmsg/readmsg.c: Bail out unless arguments are present.
10911	* doc/texinfo/programs.texi: Update.
10912
109132015-05-03  Sergey Poznyakoff  <gray@gnu.org>
10914
10915	Fix doc generation.
10916
10917	The Config file applies to all output formats, which is wrong.
10918	Use a dedicated configuration file for html output formats, and
10919	default settings for the rest.
10920
10921	* doc/texinfo/Makefile.am (GENDOCS): Add html-specific
10922	configuration file.
10923	* doc/texinfo/Config: Rename to doc/texinfo/html.init (with
10924	changes).
10925	* doc/texinfo/programs.texi: Fix sectioning.
10926
109272015-05-03  Sergey Poznyakoff  <gray@gnu.org>
10928
10929	mail: honor columns/screen variables.
10930
10931	* mail/util.c (util_command_list): Use util_screen_columns
10932	instead of util_getcols.
10933	(util_getcols): Don't use COLUMNS.
10934	(util_getlines): Don't use LINES.
10935	* mail/mail.c: Don't force COLUMNS and LINES (they are normally
10936	not exported, so setting them will cause util_getcols and
10937	util_getlines to return wrong results). Set variable "columns"
10938	from envvar COLUMNS, if set to a numeric value. Set variable
10939	"screen" from envvar LINES, if set to a numeric value.
10940	* mail/from.c (format_headline): Use util_screen_columns
10941	instead of util_getcols.
10942	* mail/mailvar.c (mailvar_print,mail_variable): Likewise.
10943	* mail/print.c (mail_print_msg): Likewise.
10944
109452015-05-03  Sergey Poznyakoff  <gray@gnu.org>
10946
10947	Honor MAIL and FOLDER envars if _mu_mailbox_pattern is not set.
10948
10949	The _mu_mailbox_pattern variable is supposed to be set only
10950	from configuration file. However, the mu_mailbox_url function
10951	would also set it as a side effect. This produced strange
10952	results; in particular unsetting HOME variable caused mail
10953	utilities to ignore MAIL variable as well (as reported by Dan
10954	Jacobson on 2015-04-30, <87vbgemcc7.fsf@jidanni.org>).
10955
10956	* configure.ac (MU_PATH_MAILDIR): Don't end with a slash.
10957	* libmailutils/mailbox/mbx_default.c
10958	(mu_normalize_mailbox_url): Use mu_make_file_name.
10959	(mu_mailbox_url): Don't set _mu_mailbox_pattern.
10960
109612015-04-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10962
10963	Bugfixes.
10964
10965	Setting non-existing variable in bin/mail at the start of the
10966	session caused further calls to set (without arguments) to
10967	malfunction. This revealed bugs in list mapping functions.
10968
10969	On the other hand, invoking completion after "set var=" caused
10970	bin/mail to coredump.
10971
10972	* libmailutils/list/gmap.c (mu_list_gmap): Initialize rc.
10973	* libmailutils/list/map.c: Always initialize *res.
10974	* mail/mailvar.c (mailvar_list_copy): The call to mu_list_map
10975	does not necessarily create the list. Create it, if it doesn't.
10976	(mailvar_iterate_next): Redo the loop: check if there are items
10977	to iterate over.
10978
109792015-03-02  Sergey Poznyakoff  <gray@gnu.org.ua>
10980
10981	Switch to Texinfo 5.0.
10982
10983	* doc/texinfo/Config: Rewrite.
10984	* doc/texinfo/Makefile.am: Use Makeinfo 5 instead of texi2htm
10985	* doc/texinfo/gendocs_template: Remove ps
10986	* doc/imprimatur: Upgrade.
10987	* doc/texinfo/gendocs.sh: New file.
10988	* doc/texinfo/rendition.texi: Remove.
10989	* doc/texinfo/programs.texi: Bugfixes
10990
109912015-03-02  Sergey Poznyakoff  <gray@gnu.org.ua>
10992
10993	Update copyright years.
10994
109952014-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
10996
10997	Fix alignment issues in mu_fgetpwent_r.
10998
10999	* libmailutils/base/fgetpwent.c: Place struct passwd at the
11000	beginning of the buffer. Account for eventual missing newline
11001	at the end of file.
11002
110032014-12-07  Sergey Poznyakoff  <gray@gnu.org>
11004
11005	New function mu_fgetpwent_r.
11006
11007	* libmailutils/base/fgetpwent.c: Rewrite from scratch.
11008	* ChangeLog.amend: Update.
11009
110102014-12-06  Sergey Poznyakoff  <gray@gnu.org>
11011
11012	Improve diagnostics in maildir.
11013
11014	* libmailutils/mailbox/fsfolder.c: Fix debugging categories
11015	* libproto/maildir/mbox.c (maildir_opendir)
11016	(maildir_msg_finish_delivery)
11017	(maildir_scan0): Log errors.
11018	(maildir_flush,maildir_deliver_new): Return EACCES if the
11019	mailbox is read-only.
11020
110212014-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11022
11023	Fix the use of read-only maildir folders. Imap4d improvements.
11024
11025	New imap4d statement "retain-groups" instructs it to retain the
11026	named supplementary user groups when switching to the user
11027	privileges (previously, imap4d just switched to <user>:mail).
11028	Read-only mailboxes are handled graciously: SELECT succeeds on
11029	such mailboxes, bug marks them explicitly as read-only.
11030
11031	* imap4d/imap4d.c (user_retain_groups): New global. New config
11032	statement "retain-groups".
11033	(mu_get_user_groups): New function.
11034	(imap4d_session_setup0): Use mu_switch_to_privs instead of just
11035	setuid.
11036	* imap4d/list.c (imap4d_list): Fix handling of
11037	 LIST "" "/path/to/mbox"
11038	* imap4d/select.c (imap4d_select0): Retry opening in read-only
11039	mode if failed to open for read-write.
11040	* libproto/maildir/mbox.c (maildir_mkfilename)
11041	(mk_info_filename): Change return value and signature. All uses
11042	changed.
11043	(maildir_scan0): Don't shuffle messages if mailbox is opened
11044	read-only.
11045	* libproto/maildir/folder.c: Update call to maildir_mkfilename.
11046	* libproto/maildir/maildir.h (maildir_mkfilename): Change
11047	prototype.
11048
110492014-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
11050
11051	Fix eventual memory overrun.
11052
11053	* mail/mail.c (mail_mainloop): Check command length before
11054	trying to access its last byte.
11055
110562014-08-14  Sergey Poznyakoff  <gray@gnu.org>
11057
11058	Fix possible coredump in stream library.
11059
11060	* libmailutils/stream/stream.c (mu_stream_strerror): stream can
11061	be NULL.
11062
110632014-08-10  Sergey Poznyakoff  <gray@gnu.org>
11064
11065	imap-related bugfixes.
11066
11067	* imap4d/search.c (imap4d_search0): Use parsebuf.err_mesg if
11068	defined, otherwise fall back to the general "parse error"
11069	message.
11070	* include/mailutils/datetime.h (MU_DATETIME_INTERNALDATE): Use
11071	%e for day. Day can be one-digit decimal.
11072	* libmailutils/datetime/scantime.c (mu_scan_datetime): Skip
11073	initial ws for %e.
11074	* mu/imap.c (com_search): Print newline after the "no matches"
11075	message.
11076
110772014-07-28  Sergey Poznyakoff  <gray@gnu.org>
11078
11079	Add scripting capability to mh/inc.
11080
11081	This patch adds a convenience library libmuscript that provides
11082	scripting capability easy to use in MU applications. Currently
11083	used by maidag and inc.
11084
11085	* include/mailutils/util.h (mu_stpcpy): 2nd arg is const.
11086	* libmailutils/string/stpcpy.c: Likewise.
11087	* lib/.gitignore: Update.
11088	* lib/Makefile.am: New library libmuscript.a
11089	* lib/muscript.h: New file.
11090	* lib/muscript_priv.h: New file.
11091	* lib/script.c: New file.
11092	* maidag/guile.c: Rename to ...
11093	* lib/guile.c: ... this
11094	* maidag/python.c: Rename to ...
11095	* lib/python.c: ... this
11096	* maidag/sieve.c: Rename to ...
11097	* lib/sieve.c: ... this
11098	* maidag/Makefile.am (maidag_LDADD): Add libmuscript.a
11099	(maidag_SOURCES): Update.
11100	* maidag/maidag.c (script_handler): Change type to mu_script_t.
11101	* maidag/maidag.h: Include muscript.h
11102	* maidag/script.c: Rewrite via libmuscript
11103	* mh/Makefile.am (inc_LDADD): New variable.
11104	* mh/inc.c (options): New options --language and --script.
11105	(mh_option): New options -language and -script.
11106	(incdat) <handler,descr>: New members.
11107	(incmbx): Optionally process each message through a script. If
11108	it is marked as deleted upon return, don't incorporate it.
11109	(main): Set mh as the default mailbox scheme. Initialize
11110	scripting subsystem and deallocate it when finished.
11111	* mh/mh_getopt.h (ARG_LANG, ARG_SCRIPT): New constants.
11112
111132014-07-26  Sergey Poznyakoff  <gray@gnu.org>
11114
11115	Move gnulib into a subdir.
11116
11117	* bootstrap.conf: Create and populate lib/gnu, if necessary.
11118	* configure.ac (MU_APP_COMMON_INCLUDES): Update.
11119	(AC_CONFIG_FILES): Build lib/gnu/Makefile
11120	* lib/Makefile.am (libmuaux_a_SOURCES): Add all objects from
11121	gnu/
11122	* po/POTFILES.in: Update.
11123	* examples/.gitignore: Update.
11124
111252014-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11126
11127	Bugfixes.
11128
11129	* examples/echosrv.c: Fix typo.
11130	* libmailutils/sockaddr/url.c: Likewise.
11131	* mh/mhn.c: Likewise.
11132	* mh/folder.c (roll_back): Fix conditional.
11133	* THANKS: Update.
11134
111352014-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11136
11137	Bugfix.
11138
11139	* libmailutils/filter/iconvflt.c: Fix silly errors.
11140
111412014-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11142
11143	Push missing files.
11144
111452014-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11146
11147	New example: mboxidx.
11148
11149	* examples/mboxidx.c: New file
11150	* examples/Makefile.am: Add mboxidx
11151
111522014-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11153
11154	Fix memory overrun in iconv filter.
11155
11156	* libmailutils/filter/iconvflt.c (format_octal): New function.
11157	(_icvt_decoder): Fix size calculations before returning
11158	mu_filter_moreoutput. Use format_octal instead of sprintf to
11159	avoid memory overwrite with the terminating nul character.
11160
111612014-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
11162
11163	Implement the xml filter.
11164
11165	* libmailutils/filter/xml.c: New file.
11166	* include/mailutils/filter.h (mu_xml_filter): New extern.
11167	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
11168	xml.c
11169	* libmailutils/filter/filter.c (mu_filter_get_list): Register
11170	mu_xml_filter.
11171	* libmailutils/tests/xml.at: New file.
11172	* libmailutils/tests/Makefile.am: Add xml.at
11173	* libmailutils/tests/testsuite.at: Likewise.
11174
111752014-07-02  Sergey Poznyakoff  <gray@gnu.org.ua>
11176
11177	New filter: htmlent.
11178
11179	* include/mailutils/filter.h (mu_htmlent_filter): New extern.
11180	* libmailutils/filter/Makefile.am: Add htmlent.c
11181	* libmailutils/filter/filter.c (mu_filter_get_list): Register
11182	mu_htmlent_filter.
11183	* libmailutils/filter/htmlent.c: New file.
11184	* libmailutils/tests/htmlent.at: New testcase.
11185	* libmailutils/tests/Makefile.am: Add new testcase.
11186	* libmailutils/tests/testsuite.at: Likewise.
11187
111882014-06-17  Damien Diederen  <dd@crosstwine.com>
11189
11190	maildir: Keep trailing comma even when no flags are set.
11191
11192	Without this, `mk_info_filename' generates filenames of the
11193	following form when the flag set is empty:
11194
11195	 1402217787.M664911P5957Q143.hostname:2
11196
11197	The original Maildir spec (http://cr.yp.to/proto/maildir.html),
11198	however, mandates that filenames must be of the form
11199	`uniq:info', with `info' starting with "2,"--including a comma.
11200
11201	This patch removes the "cleanup" performed by
11202	`mk_info_filename' as that there is no rationale for it in
11203	mailutils' source code history, and as it breaks Gnus'
11204	"nnmaildir" backend (Cf. `nnmaildir--add-flag').
11205	* libproto/maildir/mbox.c (mk_info_filename): Keep comma at the
11206	end of filename when the flags suffix is empty.
11207
112082014-05-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11209
11210	Bugfixes.
11211
11212	* libmailutils/mailbox/attribute.c (mu_attribute_is_equal): Fix
11213	comparison.
11214	* libmailutils/mailbox/biffnotify.c: Add missing includes.
11215
112162014-04-15  Sergey Poznyakoff  <gray@gnu.org.ua>
11217
11218	frm: fix counters when given multiple mailboxes.
11219
11220	* frm/frm.c (frm): Initialize counters.
11221	* frm/tests/testsuite.at: Test multiple mailboxes.
11222
112232014-02-26  Sergey Poznyakoff  <gray@gnu.org>
11224
11225	Fix compilation without gnutls.
11226
11227	* imap4d/imap4d.c [WITH_TLS] (cb_tls_required): Conditional
11228	compilation.
11229	* imap4d/imap4d.h [!WITH_TLS] (tls_encryption_on): Empty
11230	define.
11231	* pop3d/pop3d.c [!WITH_TLS] (tls_available): Empty define.
11232	* libmu_scm/mu_mailbox.c (mu_scm_mailbox_print): Fix format
11233	string.
11234
112352014-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
11236
11237	imap client: fix handling of ID response without untagged part.
11238
11239	* libproto/imap/id.c: Make sure returned mu_assoc_t is valid
11240	even if no untagged response was received (equivalent to NIL).
11241
112422014-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
11243
11244	Improve tls support.
11245
11246	Remove deprecated types and function calls. Make cipher, mac,
11247	and other priorities configurable.
11248
11249	* include/mailutils/sys/tls-stream.h (_mu_tls_stream): Use
11250	gnutls_session_t.
11251	* include/mailutils/tls.h (mu_tls_module_config): New member:
11252	priorities.
11253	* libmu_auth/tls.c: Remove deprecated types.
11254	(initialize_tls_session): Make priorities configurable.
11255	(prepare_client_session): Set default priorities.
11256	* libmu_cfg/tls.c: New configuration statement: ssl-priorities.
11257
112582014-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
11259
11260	Clean up unused variables.
11261
112622014-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
11263
11264	Use AM_CPPFLAGS instead of INCLUDES; upgrade gint.
11265
112662014-02-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11267
11268	Accept single-dash notify option to inc.
11269
11270	* mh/mh_getopt.c (mh_getopt): Correctly handle traditional
11271	options that begin with "no" (e.g. "notify").
11272	* mh/inc.c (mh_option): Accept -notify (single-dash).
11273
112742014-02-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11275
11276	Move biff notification to the library.	Implement it in inc and
11277	movemail.
11278
11279	* include/mailutils/mailbox.h (mu_mailbox_set_notify)
11280	(mu_mailbox_unset_notify): New protos.
11281	* include/mailutils/sys/mailbox.h (_mu_mailbox) <notify_user>
11282	<notify_fd,notify_sa>: New members.
11283	* libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add
11284	biffnotify.c
11285	* libmailutils/mailbox/biffnotify.c: New file.
11286	* libmailutils/mailbox/mailbox.c (_mailbox_create_from_record):
11287	Initialize notify_fd.
11288	(mu_mailbox_destroy): Free notify_sa.
11289	(mu_mailbox_close): Close notify_fd.
11290	(mu_mailbox_flush): Rewrite to handle append-only mailboxes
11291	effectively.
11292	* libmailutils/server/msrv.c (server_cfg_param): Fix docstring.
11293	* libmailutils/stream/file_stream.c (fd_open): Open fd
11294	read-write if both MU_STREAM_APPEND and MU_STREAM_READ are
11295	requested.
11296	* libproto/mbox/mbox.c (mbox_expunge0): Rescan the mailbox if
11297	messages_count == 0. Special handling for append-only
11298	mailboxes.
11299	* maidag/deliver.c: Use library notification mechanism.
11300	* mh/inc.c: New option --notify.
11301	* movemail/movemail.c: Likewise.
11302
113032014-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
11304
11305	Update copyright years.
11306
113072014-02-04  Sergey Poznyakoff  <gray@gnu.org.ua>
11308
11309	Use global TLS setting in inetd mode (bug #40891)
11310
11311	* imap4d/imap4d.c (imap4d_connection): Use global TLS setting
11312	if no local one was supplied.
11313	(main): Use global TLS setting in inetd mode.
11314	* pop3d/pop3d.c (main): Use global TLS setting in inetd mode.
11315
113162014-02-04  Sergey Poznyakoff  <gray@gnu.org.ua>
11317
11318	Fix coredump if crypt returns NULL.
11319
11320	* libmailutils/auth/system.c: Check return from crypt before
11321	passing it to strcmp.
11322	* libmu_auth/sql.c: Likewise.
11323
113242014-02-04  Sergey Poznyakoff  <gray@gnu.org.ua>
11325
11326	Issue a deprecation warning if tls-required is used in pop3d or
11327	imap4d config.
11328
113292013-12-24  Sergey Poznyakoff  <gray@gnu.org.ua>
11330
11331	Fix bug in handling AUTHENTICATE command (imap4d). Add
11332	user/group ACLs.
11333
11334	The bug was introduced in commit 6e2a3758.
11335
11336	The ACLs allow administrators to limit access to IMAP services
11337	to particular users or users belonging to particular groups.
11338
11339	* imap4d/authenticate.c (imap4d_auth_capability): Take session
11340	pointer as argument. Don't report authentication capabilities
11341	if tls is required.
11342	(imap4d_authenticate): Fix conditional.
11343	* imap4d/capability.c (imap4d_capability): Update call to
11344	imap4d_auth_capability.
11345	* imap4d/imap4d.c (cb_tls_required): Set tls_mode.
11346	(auth_deny_user_list,auth_allow_user_list)
11347	(auth_deny_group_list,auth_allow_group_list): New statics.
11348	(check_user_groups,imap_check_group_list): New static
11349	functions. (imap4d_cfg_param) <allow-users,deny-users>
11350	<allow-groups,deny-groups>: New configuration statements.
11351	(imap4d_session_setup0): Check allow/deny lists.
11352	* imap4d/imap4d.h (imap4d_auth_capability): Change signature.
11353	* pop3d/pop3d.c (cb_tls_required): Set tls_mode.
11354	* bootstrap (gnulib_extra_files): Update.
11355
113562013-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11357
11358	Minor fix in mh/inc.
11359
11360	* mh/inc.c (main): Update the unseen sequence only if some new
11361	messages were incorporated.
11362
113632013-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11364
11365	Fix appending to IMAP[S] mailboxes.
11366
11367	* libproto/imap/appmsg.c (mu_imap_append_message): Fix
11368	conditional.
11369	* libproto/imap/mbox.c (_imap_mbx_append_message): Fix error
11370	checking.
11371	* libproto/imap/url.c (_mu_imap_url_init)
11372	(_mu_imaps_url_init): Set _get_path member. This allows the
11373	user to specify an URL without explicit path, implying INBOX.
11374
113752013-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
11376
11377	Bugfixes.
11378
11379	* imap4d/io.c (io_copy_out): Switch to full buffering before
11380	sending data.
11381	* libmailutils/stream/stream.c (_stream_skip_input_bytes):
11382	Bugfix.
11383
113842013-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
11385
11386	Fix tls_required functionality in imap4d.
11387
11388	* imap4d/imap4d.c (imap4d_mainloop): Add missing break.
11389
113902013-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11391
11392	Bugfix in LDAP code.
11393
11394	* libmu_auth/ldap.c (_mu_conn_setup): Set protocol version
11395	number before trying to initialize TLS. Provide a detailed
11396	diagnostics.
11397
113982013-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11399
11400	Support for RFC 3206.
11401
11402	* pop3d/pop3d.h (ERR_SYS_LOGIN): New error code.
11403	* pop3d/capa.c (pop3d_session_init): Advertise the
11404	AUTH-RESP-CODE capability.
11405	* pop3d/cmd.c (error_table) <ERR_BAD_LOGIN>: Mark with the AUTH
11406	response code.
11407	<ERR_SYS_LOGIN>: New entry.
11408	* pop3d/user.c (pop3d_user): Use mu_get_auth to obtain the
11409	user's identity. On error, the error code is ERR_BAD_LOGIN or
11410	ERR_SYS_LOGIN, depending on its return and return from
11411	mu_authenticate.
11412
114132013-06-19  Sergey Poznyakoff  <gray@gnu.org.ua>
11414
11415	One more fix.
11416
11417	* libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Handle
11418	connection aborted error as well.
11419
114202013-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11421
11422	Bugfixes.
11423
11424	* imap4d/io.c (imap4d_tokbuf_decrlf): Rewrite to run in O(n).
11425	* libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Return 0 on
11426	EINTR (unless srv->f_intr tells otherwise) and EAGAIN. The
11427	caller will retry.
11428	(mu_ip_server_accept): output a diagnostic message before
11429	returning error.
11430
114312013-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11432
11433	Minor fixes.
11434
11435	* mu/Makefile.am (mailutils-config): Fix sed expression
11436	* mu/mailutils-config.in: Replace MUNAME once and assign it to
11437	the variable.
11438
114392013-04-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11440
11441	Implement MH show utility.
11442
11443	* mh/show.c: New file.
11444	* NEWS: Document changes.
11445	* libmailutils/stream/message_stream.c (copy_trimmed_value):
11446	Fix string length calculation to allow for empty lines.
11447	* mh/.gitignore: Update.
11448	* mh/Makefile.am: Build show.
11449	* mh/TODO: Document show.
11450	* mh/mh_getopt.h: Add new option codes.
11451	* mh/mh_init.c (mh_expand_name): Change handling of the last
11452	argument. All callers updated.
11453	(mh_draft_name): Remove.
11454
114552013-04-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11456
11457	Fix MH sequence parser.
11458
11459	* mh/mh_msgset.c (parse_range): Fix resolving non-existing
11460	UIDs.
11461	* mh/tests/mhseq.at: Add more test cases.
11462
114632013-04-03  Sergey Poznyakoff  <gray@gnu.org.ua>
11464
11465	Add support for Unseen-Sequence in inc.
11466
11467	* mh/inc.c (main): Append the numbers of incorporated messages
11468	to Unseen-Sequence, if defined in .mh_profile.
11469
114702013-04-02  Sergey Poznyakoff  <gray@gnu.org.ua>
11471
11472	MH send: improve compatibility with MH/nmh.
11473
114742013-04-02  Sergey Poznyakoff  <gray@gnu.org.ua>
11475
11476	Rewrite mu_utc_offset in a more portable (hopefully) way.
11477
114782013-04-02  Sergey Poznyakoff  <gray@gnu.org.ua>
11479
11480	Minor fix in docs.
11481
114822013-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
11483
11484	MH: Synchronize sequences after removal of messages.
11485
11486	* include/mailutils/msgset.h (mu_msgset_sget_mailbox): New
11487	proto.
11488	* include/mailutils/sys/msgset.h (_MU_MSGSET_MODE): New macro.
11489	* libmailutils/msgset/Makefile.am: Add getmbox.c
11490	* libmailutils/msgset/getmbox.c: New file.
11491	* libmailutils/msgset/addset.c: Use _MU_MSGSET_MODE.
11492	* libmailutils/msgset/create.c: Likewise.
11493	* libmailutils/msgset/foreachmsg.c: Likewise.
11494	* libmailutils/msgset/foreachnum.c: Likewise.
11495	* libmailutils/msgset/negate.c: Likewise.
11496	* libmailutils/msgset/subset.c: Likewise.
11497	* libmailutils/msgset/trans.c: Likewise.
11498	* mh/mh.h (mh_private_sequences_iterate): New proto.
11499	* mh/mh_sequence.c (format_closure) <delim>: New member.
11500	(format_sequence): Use delim to avoid outputting leading space.
11501	(save_sequence): Initialize delim.
11502	(mh_private_sequences_iterate): New function.
11503	* mh/rmm.c (main): Remove message numbers from sequences.
11504	* mh/tests/rmm.at: Update.
11505
115062013-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
11507
11508	Bugfix.
11509
11510	* libmailutils/base/amd.c (_amd_update_message): Return
11511	immediately if the message is not modified. Always use
11512	initialized value of flg.
11513
115142013-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11515
11516	msgchk: assume -date by default.
11517
115182013-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11519
11520	Minor fixes.
11521
11522	* mh/msgchk.c (checkmail): take into account various possible
11523	return codes.
11524
115252013-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11526
11527	Implement IMAP SEARCH. New function mu_mailbox_access_time.
11528
11529	* include/mailutils/imap.h (mu_imap_search): New proto.
11530	* libproto/imap/search.c: New file.
11531	* include/mailutils/sys/imap.h (MU_IMAP_CLIENT_SEARCH_RX): New
11532	state.
11533	* libproto/imap/fetch.c: Fix debugging categories
11534	* libproto/imap/mbox.c (_imap_messages_recent)
11535	(_imap_message_unseen): Use search if information is not
11536	readily available.
11537	* libproto/imap/status.c (_mu_imap_status_name_table): Comment
11538	out UNSEEN: its semantics is entirely different from what we
11539	need.
11540	* libproto/imap/Makefile.am: Add new file.
11541	* mu/imap.c: Implement search.
11542	* include/mailutils/sys/mailbox.h (_mu_mailbox) <_get_atime>:
11543	New method.
11544	* include/mailutils/mailbox.h (mu_mailbox_access_time): New
11545	proto.
11546	* libproto/mbox/mbox.c (_mailbox_mbox_init): Initialize
11547	>_get_atime.
11548	* libmailutils/mailbox/mailbox.c (mu_mailbox_access_time): New
11549	function.
11550	* libmailutils/datetime/utcoff.c (mu_utc_offset): Rewrite using
11551	tzset.
11552	* mh/msgchk.c: Implement --date. Check for new mail using both
11553	recent and unseen messages.
11554
115552013-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11556
11557	Implement msgchk.
11558
11559	* mh/msgchk.c: New file.
11560	* mh/Makefile.am: Build msgchk.
11561	* mh/mh_getopt.h: Update.
11562	* mh/.gitignore: Update.
11563	* mh/TODO: Update.
11564
115652013-03-27  Sergey Poznyakoff  <gray@gnu.org.ua>
11566
11567	Fix the use of localname and localdomain in ~/.mtstailor.
11568
11569	* mh/send.c (read_mts_profile): Fix the handling of localname
11570	vs. localdomain. The localname setting used alone overrides the
11571	hostname as returned by mu_hostname. The value of localdomain,
11572	if set, is appended to the hostname (eventually modified by
11573	localname), with a "." as a separator.
11574
115752013-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11576
11577	Do not ask for ESMTP credentials if unable to handle them.
11578
11579	* libproto/mailer/smtp.c (smtp_open): Disable ESTMP AUTH if
11580	GSASL support is not compiled.
11581	* libproto/mailer/smtp_auth.c (mu_smtp_auth): If compiled
11582	without GSASL, don't attempt to obtain user credentials.
11583
115842013-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11585
11586	Fix interaction with POP3 servers that do not support the CAPA
11587	command.
11588
11589	* libproto/pop/mbox.c (pop_open): Do not bail out if the CAPA
11590	command returns -ERR. Assume a pre-RFC2449 server.
11591	* include/mailutils/pop3.h (mu_pop3_strresp)
11592	(mu_pop3_sget_response,mu_pop3_aget_response)
11593	(mu_pop3_get_response): New protos.
11594	* libproto/pop/pop3_response.c (mu_pop3_response): Don't make
11595	out a fake response in case of a I/O error. (mu_pop3_strresp)
11596	(mu_pop3_sget_response,mu_pop3_aget_response)
11597	(mu_pop3_get_response): New functions.
11598
115992013-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11600
11601	Bugfix.
11602
11603	* libmu_auth/ldap.c (_mu_ldap_search): Fix improper addressing
11604	of env.
11605
116062013-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11607
11608	Raise version number.
11609
116102013-02-16  Sergey Poznyakoff  <gray@gnu.org.ua>
11611
11612	ali: executable file inclusion.
11613
11614	The "< file" construct tests if file is executable and begins
11615	with the shell interpreter magic (#!/ or #! /). If so, this
11616	file is executed and its output is collected. This provides a
11617	way for building aliases on the fly.
11618
11619	* mh/mh_alias.l (buffer_ctx) <exec_p>: New member.
11620	(exec_p): New static variable.
11621	(push_source): If the file is executable and begins with the
11622	"#!/" magic, run it and collect its output.
11623	(pop_source): Use exec_p to decide how to close the file.
11624	* mh/tests/ali.at: Test executable file inclusion.
11625	* NEWS: Update.
11626
116272013-01-03  Sergey Poznyakoff  <gray@gnu.org.ua>
11628
11629	Make sure modifications to a message or its parts become
11630	visible in the message stream.
11631
11632	* include/mailutils/sys/body.h (_mu_body)<rawstream>: New
11633	member.
11634	* include/mailutils/sys/message.h (_mu_message)<rawstream>: New
11635	member.
11636	* libmailutils/mailbox/body.c: Rewrite. Return the specially
11637	crafted "body-stream" for user I/O operations. Writes to that
11638	stream trigger creation of a temporary stream (write-through
11639	mode) which will be used for subsequent I/O.
11640	* libmailutils/mailbox/msgbody.c (mu_message_get_body): Use
11641	msg->rawstream.
11642	* libmailutils/mailbox/msgheader.c (message_header_fill): Do
11643	not call mu_message_get_streamref, as that can result in
11644	endless recursion. Use msg->rawstream instead.
11645	* libmailutils/mailbox/msgref.c (_mu_message_free): Destroy
11646	both rawstream and outstream.
11647	* libmailutils/mailbox/msgstream.c (mu_message_set_stream): Set
11648	rawstream.
11649	(mu_message_get_stream): Create outstream as needed.
11650	(mu_message_get_streamref): If the message has been modified,
11651	create the outstream and return it to the caller. This way, the
11652	modifications become visible via the stream interface.
11653	* libmailutils/tests/Makefile.am: Add new testcases.
11654	* libmailutils/tests/testsuite.at: Likewise.
11655	* libmailutils/tests/modmesg.c: New file.
11656	* libmailutils/tests/modmesg00.at: New file.
11657	* libmailutils/tests/modmesg01.at: New file.
11658	* libmailutils/tests/modmesg02.at: New file.
11659	* libmailutils/tests/modmesg03.at: New file.
11660	* mh/mhn.c: Fix message reference counting.
11661
116622012-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11663
11664	Bugfix.
11665
11666	* mh/folder.c (_fixup): Pass a pointer to mailbox to
11667	mu_msgset_create.
11668
116692012-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
11670
11671	Minor fixes.
11672
11673	* imap4d/imap4d.c: Avoid gcc warnings.
11674	* libmailutils/tests/imapio.c (main): Fix format specifier.
11675	* maidag/mailquota.c (dbm_retrieve_quota): Likewise.
11676	* mail/quit.c (mail_mbox_close): Likewise.
11677	* mail/mail.c (options): Fix improper initialization.
11678	* mu/mu.h (mu_getans): Add proto.
11679	* mu/util.c: Include netinet/in.h
11680
116812012-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11682
11683	Implement editheader sieve extension (RFC 5293).
11684
11685	Also fix iterator synchronization after removing an element and
11686	improve Sieve API.
11687
11688	* include/mailutils/header.h (mu_header_get_itemptr): New
11689	proto.
11690	* include/mailutils/iterator.h (mu_iterator_advance): Remove.
11691	(mu_iterator_delitem): New proto.
11692	(mu_iterator_set_delitem): New proto.
11693	* include/mailutils/sieve.h (mu_sieve_register_t) <opt_args>:
11694	New member. (mu_sieve_register_test_ext)
11695	(mu_sieve_register_action_ext): New protos.
11696	* include/mailutils/sys/iterator.h (_mu_iterator) <curitem_p>:
11697	Remove.
11698	<delitem>: New member. All uses updated.
11699	* libmailutils/base/iterator.c (mu_iterator_set_delitem): New
11700	function.
11701	* libmailutils/mailbox/hdritr.c: Implement bidirectional
11702	iteration. Implement itrctl method.
11703	* libmailutils/mailbox/header.c: Likewise.
11704	* libmailutils/base/assoc.c: Use delitem method instead of
11705	curitem_p.
11706	(mu_iterator_delitem): New function.
11707	* libmailutils/base/opool.c
11708	* libmailutils/diag/debug.c
11709	* libmailutils/list/iterator.c
11710	* libmailutils/list/pop.c
11711	* libmailutils/list/remove.c
11712	* libmailutils/list/removenth.c
11713	* libmailutils/mailbox/imapenv.c
11714	* libmailutils/mailbox/mbxitr.c
11715	* libproto/pop/pop3_iterator.c
11716	* libmu_sieve/extensions/Makefile.am: Add editheader.c
11717	* libmu_sieve/extensions/editheader.c: New file.
11718	* libmu_sieve/prog.c (mu_sv_code_command): Allow for optional
11719	positional arguments.
11720	* libmu_sieve/register.c (mu_sieve_test_lookup)
11721	(mu_sieve_action_lookup): Return NULL if a record with empty
11722	(NULL) handler is found. (mu_sieve_register_test_ext)
11723	(mu_sieve_register_action_ext): New functions.
11724	(mu_sieve_register_test)
11725	(mu_sieve_register_action): Rewrite as wrappers to the above.
11726	* libmu_sieve/util.c (mu_sieve_vlist_do): Allow for SVT_STRING
11727	argument.
11728	* sieve/tests/Makefile.am: Add new testcases.
11729	* sieve/tests/testsuite.at: Include new testcases.
11730	* sieve/tests/addheader.at: New testcase.
11731	* sieve/tests/delheader.at: New testcase.
11732	* NEWS: Update.
11733	* doc/rfc/README: Update.
11734
117352012-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
11736
11737	Improve header stream write method.
11738
11739	* libmailutils/mailbox/header.c (HEADER_STREAMMOD): New flag.
11740	(mu_header_fill): Read data back from mstream if it was
11741	modified.
11742	(mu_header_destroy): Destroy mstream.
11743	(header_write): Rewrite from scratch. Allow for writing at
11744	arbitrary offsets.
11745	* examples/header.c: New commands: "overwrite" and "append",
11746	for testing the new functionality.
11747
117482012-08-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11749
11750	mail: provide a way to set return address.
11751
11752	* mail/mail.c: New option -r (--return-address).
11753	* mail/mailvar.c: New variable "return-address".
11754	* mail/send.c (send_message): Obtain the return mail address
11755	from the "return-address" variable (if set).
11756	* NEWS: Update.
11757	* doc/texinfo/programs.texi: Update.
11758
117592012-08-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11760
11761	Fix a typo.
11762
117632012-08-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11764
11765	mailutils-config: reflect eventual rename of mu, so that
11766	AM_GNU_MAILUTILS works.
11767
11768	* mu/.gitignore: Update.
11769	* mu/Makefile.am: Build mailutils-config
11770	* mu/mailutils-config.in: New file.
11771	* mu/mailutils-config: Remove.
11772
117732012-08-04  Sergey Poznyakoff  <gray@gnu.org.ua>
11774
11775	Ensure consistent stream state before calling its ctl method.
11776
11777	Prior to calling ctl method, mu_stream_ioctl flushes stream
11778	buffer.
11779
11780	* libmailutils/stream/fltstream.c (filter_ctl)
11781	<MU_IOCTL_FILTER_SET_DISABLED>: Flush internal buffer prior to
11782	setting the flag.
11783	* libmailutils/stream/stream.c (mu_stream_ioctl): Flush stream
11784	buffer.
11785
117862012-07-29  Sergey Poznyakoff  <gray@gnu.org.ua>
11787
11788	Port 0b1e16bea to imap4d.
11789
11790	* imap4d/imap4d.c (tls_required): Remove.
11791	(tls_mode): New variable.
11792	(imap4d_srv_config) <tls>: Remove.
11793	(imap4d_srv_config) <tls_mode>: New member.
11794	(imap4d_srv_param): Change the definition of the "tls"
11795	statement. Mark "tls-required" as deprecated.
11796	(imap4d_mainloop): Change type of the tls argument. Initialize
11797	session and pass it to each handler.
11798	* imap4d/imap4d.h (imap4d_session): New struct.
11799	(imap4d_command) <func>: Change signature. All uses changed.
11800	(tls_mode): New enum.
11801	(tls_required): Remove.
11802	(tls_available): New global.
11803	* imap4d/io.c (io_setio): Don't call tls_encryption_on, leave
11804	it to the caller.
11805	* imap4d/login.c (imap4d_login): Use session.
11806	* imap4d/starttls.c (tls_available): Global. Present even if
11807	!WITH_TLS
11808	(tls_encryption_on): Change signature. All callers updated.
11809
118102012-07-28  Sergey Poznyakoff  <gray@gnu.org.ua>
11811
11812	Implement SMTP shell in mu.
11813
11814	* include/mailutils/smtp.h (mu_smtp_get_reply_iterator)
11815	(mu_smtp_cmd,mu_smtp_test_param): New protos.
11816	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
11817	smtp_cmd.c
11818	* libproto/mailer/smtp_cmd.c: New file.
11819	* libproto/mailer/smtp_io.c (mu_smtp_get_reply_iterator): New
11820	function.
11821	* libproto/mailer/smtp_param.c (mu_smtp_set_param): Accept NULL
11822	parameter value.
11823	(mu_smtp_test_param): New function.
11824	* mu/Makefile.am [MU_COND_SUPPORT_SMTP]: Add smtp.c to MODULES.
11825	(mu_SOURCES): Add getans.c, getyn.c and util.c
11826	* mu/getans.c: New file.
11827	* mu/getyn.c: New file.
11828	* mu/smtp.c: New file.
11829	* mu/util.c: New file.
11830	* mu/mu.h (port_from_sa): New proto.
11831	* mu/pop.c (port_from_sa): Move to util.c
11832
118332012-07-28  Sergey Poznyakoff  <gray@gnu.org.ua>
11834
11835	Drop a superfluous dependency on libgcrypt.
11836
11837	* am/tls.m4 (MU_CHECK_GNUTLS): Newer GNU TLS does not require
11838	libgcrypt. It is required only for v. 2.11 and prior versions.
11839
118402012-07-23  Sergey Poznyakoff  <gray@gnu.org.ua>
11841
11842	Minor changes in SMTP and URL code.
11843
11844	* include/mailutils/smtp.h (mu_smtp_replcode)
11845	(mu_smtp_sget_reply)
11846	(mu_smtp_capa_iterator): New protos.
11847	* libmailutils/url/dup.c (mu_url_dup): Bugfix. Obtain the name
11848	using mu_url_sget_name, which will create it if necessary.
11849	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
11850	smtp_capa_itr.c
11851	* libproto/mailer/smtp_capa_itr.c: New file.
11852	* libproto/mailer/smtp_io.c (mu_smtp_response): Fix filling of
11853	smtp->flbuf.
11854	(mu_smtp_replcode,mu_smtp_sget_reply): New functions.
11855
118562012-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>
11857
11858	pop3d: make tls more configurable.
11859
11860	The "tls" statement can be used both within a server
11861	declaration and in the global scope, the former overriding the
11862	latter. Its argument can be one of the following:
11863
11864	 no TLS is not used. The STLS command won't be available even
11865	 if the tls configuration is otherwise complete.
11866	 ondemand TLS is initiated when the user issues the STLS
11867	command.
11868	 This is the default when TLS is configured.
11869	 required Same as above, but the use of STLS is mandatory. The
11870	 authentication state is entered only after TLS negotiation
11871	 has succeeded.
11872	 connection TLS is always forced when the connection is
11873	established (pops).
11874
11875	For compatibility with prior versions the tls-required
11876	statement is retained, but is considered deprecated. It is
11877	synonymous with "tls required". The "tls" statement allows for
11878	the following alias values:
11879	 false, off, 0 same as no
11880	 stls same as ondemand
11881	 yes, true, on, 1 same as connection
11882
11883	Internally, all handler functions receive a pointer to the POP
11884	session structure, which configures the current session. In
11885	particular, it contains the TLS mode and capability list.
11886	* pop3d/capa.c (pop3d_capa): Traverse the capability list,
11887	outputting each of its elements. (pop3d_session_init)
11888	(pop3d_session_free): New functions.
11889	* pop3d/logindelay.c (login_delay_capa): Change signature.
11890	* pop3d/pop3d.c (tls_required): Remove.
11891	(tls_mode): New variable.
11892	(pop3d_srv_config) <tls>: Remove.
11893	(pop3d_srv_config) <tls_mode>: New member.
11894	(pop3d_srv_param): Change definition of the "tls" statement.
11895	(pop3d_cfg_param): New statement "tls". Mark "tls-required" as
11896	deprecated.
11897	(pop3d_mainloop): Change type of the tls argument. Initialize
11898	session and pass it to each handler.
11899	(pop3d_connection): Decide whether and how to use TLS using
11900	global and per-session settings, the latter overriding the
11901	former.
11902	* pop3d/pop3d.h (login_delay_capa): Change signature.
11903	(tls_mode): New enum.
11904	(pop3d_capa_type): New enum.
11905	(pop3d_capa, pop3d_session): New structs. (pop3d_session_init)
11906	(pop3d_session_free): New protos.
11907	(pop3d_command_handler_t): Change signature. All handlers and
11908	their uses are changed accordingly.
11909	* pop3d/stls.c (pop3d_stls): Return error if session does not
11910	allow tls.
11911
119122012-07-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11913
11914	Minor fix.
11915
119162012-07-19  Sergey Poznyakoff  <gray@gnu.org.ua>
11917
11918	mail: provide mechanism for listing and editing attachments
11919	from the shell.
11920
11921	* NEWS: Update.
11922	* mail/escape.c (escape_check_args): Take two additional
11923	arguments specifying minimum and maximum number of parameters
11924	to expect. All uses updated. Remove static qualifier.
11925	* mail/mail.h (send_attach_file): Rename to
11926	send_attach_file_default
11927	(escape_check_args,escape_list_attachments)
11928	(escape_attach,escape_remove_attachment): New protos.
11929	* mail/send.c (send_attach_file): Take encoding and content
11930	type as arguments.
11931	(send_attach_file_default): New function.
11932	(escape_list_attachments)
11933	(escape_attach,escape_remove_attachment): New functions.
11934	* mail/table.c: New escapes: l, +, ^
11935	* include/mailutils/list.h (mu_list_remove_nth)
11936	(mu_list_remove_nth_nd): New protos.
11937	* libmailutils/list/Makefile.am (liblist_la_SOURCES): Add
11938	removenth.c
11939	* libmailutils/list/removenth.c: New file.
11940
119412012-07-18  Sergey Poznyakoff  <gray@gnu.org.ua>
11942
11943	Implement --attach option in mail; fix dead.letter
11944	functionality.
11945
11946	* NEWS: Update.
11947	* doc/imprimatur: Upgrade.
11948	* libmailutils/mime/attachment.c
11949	(mu_message_create_attachment): Bugfixes.
11950	* mail/mail.c: New options --attach, --content-type and
11951	--encoding.
11952	* mail/mail.h (default_encoding, default_content_type): New
11953	externs.
11954	(send_attach_file): New proto.
11955	* mail/send.c (send_attach_file): New function.
11956	(save_dead_message_env): New function.
11957	(save_dead_message): Rewrite.
11958	(mail_send0): Attach files, if requested.
11959
119602012-07-17  Wojciech Polak  <polak@gnu.org>
11961
11962	Update C++ and Python interfaces.
11963
11964	* include/mailutils/prog.h: Add extern "C".
11965	* include/mailutils/wordsplit.h: Likewise.
11966	* libmu_cpp/address.cc (Address::to_string): Use
11967	mu_address_sget_printable.
11968	* libmu_cpp/filter.cc (FilterIconvStream): Use
11969	mu_filter_create_args.
11970	* python/mailutils/folder.py (get_stream, set_stream): Remove.
11971
119722012-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11973
11974	Spelling fixes.
11975
119762012-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11977
11978	Upgrade imprimatur module.
11979
11980	* doc/imprimatur: Upgrade.
11981
119822012-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11983
11984	Improve configuration options.
11985
11986	* am/enable.m4 (MU_ENABLE_BUILD): Change handling of
11987	additional-cond
11988	($4): the --{enable|disable}-build-* argument value overrides
11989	it. This allows to use such configuration shortcuts as:
11990	 --disable-build-clients --enable-build-mail
11991
11992	which will build only mail, but no other client.
11993	* configure.ac: New option --with-dbm can be used to
11994	enable/disable building of all available DBM interfaces. It can
11995	be used in conjunction with implementation-specific options in
11996	the same way as described above, e.g.:
11997	 --without-dbm --with-gdbm
11998
11999	New option --with-mailbindir allows for overriding the
12000	installation directory for mail[x] only.
12001	* mail/Makefile.am (mailbindir): New variable.
12002	(bin_PROGRAMS): Rename to mailbin_PROGRAMS.
12003
120042012-07-16  Sergey Poznyakoff  <gray@gnu.org.ua>
12005
12006	Remove dependency on obstack. Use mu_opool_t instead.
12007
12008	* include/mailutils/opool.h (mu_opool_alloc): New proto.
12009	* libmailutils/base/opool.c (mu_opool_alloc): New function.
12010	(mu_opool_appendz): Do not append trailing null character.
12011	* libmailutils/cfg/parser.y (mu_cfg_tree_create_node): Reflect
12012	the change in mu_opool_appendz.
12013	* comsat/action.c: Use mu_opool_t instead of struct obstack.
12014	* lib/mailcap.c: Likewise.
12015	* libmailutils/url/urlstr.c: Likewise.
12016	* mh/burst.c: Likewise.
12017	* mh/mh_fmtgram.y: Likewise.
12018	* mh/mh_format.c: Likewise.
12019	* mh/mh_format.h: Likewise.
12020	* mh/mhn.c: Likewise.
12021	* mh/repl.c: Likewise.
12022	* mh/whatnowenv.c: Likewise.
12023	* mimeview/mimetypes.l: Likewise.
12024	* mimeview/mimeview.h: Likewise.
12025	* gnulib.modules: Remove obstack.
12026
120272012-07-16  Sergey Poznyakoff  <gray@gnu.org.ua>
12028
12029	Remove dependency on getline.
12030
12031	* gnulib.modules: Remove getline.
12032	* pop3d/apop.c [!ENABLE_DBM] Use mu_stream API instead of FILE.
12033
120342012-07-16  Sergey Poznyakoff  <gray@gnu.org.ua>
12035
12036	Bugfix.
12037
12038	Imap4d would fail to select a nonexistent maildir INBOX,
12039	because the mu_mailbox_uidvalidity would return MU_ERR_NOENT.
12040
12041	* libmailutils/base/amd.c (_amd_scan0): Recompute uidvalidity
12042	if the mailbox is empty.
12043
120442012-06-15  Sergey Poznyakoff  <gray@gnu.org.ua>
12045
12046	inc: bugfix.
12047
12048	* mh/inc.c (incmbx): Fix typos.
12049
120502012-06-11  Sergey Poznyakoff  <gray@gnu.org.ua>
12051
12052	Fix a typo.
12053
12054	* imap4d/copy.c (imap4d_copy0): Invert condition.
12055
120562012-06-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12057
12058	Fix in configuration reduction routines.
12059
12060	* libmailutils/cfg/parser.y (mu_cfg_preorder): Accept null node
12061	lists.
12062
120632012-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
12064
12065	Fix bug in mh testsuite.
12066
12067	We cannot assume that $HOME points to existing directory.
12068
12069	* mh/tests/testsuite.at (MH_SETUP): Override HOME environment
12070	variable. Use it instead of curdir.
12071	* mh/tests/atlocal.in (remove_curdir): Likewise.
12072	* mh/tests/mhn.at: Likewise.
12073
120742012-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12075
12076	Minor fix.
12077
12078	* imap4d/imap4d.c Include mailutils/gsasl.h unconditionally.
12079
120802012-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12081
12082	Fixes: port cfg statement, listen cfg statement in maidag,
12083	final dot recognition in maidag.
12084
12085	* include/mailutils/server.h (mu_m_server_listen)
12086	(mu_m_server_parse_url): New protos.
12087	* libmailutils/server/msrv.c (add_server): Rename to
12088	mu_m_server_listen (now extern). All uses updated.
12089	(get_port): Bugfix: return port in server byte order. This
12090	fixes the use of the "port" configuration statement.
12091	* maidag/lmtp.c (cfun_data): Don't switch to full buffering.
12092	This makes it impossible to note the final dot in time.
12093	* maidag/maidag.c (cb_listen): New callback.
12094	(maidag_cfg_param): Attach cb_listen to the "listen" statement.
12095
120962012-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12097
12098	Implement two new Scheme functions.
12099
12100	* NEWS: Update.
12101	* configure.ac: Version 2.99.97
12102	* libmu_scm/mu_mailbox.c (mu-mailbox-sync)
12103	(mu-mailbox-flush): New functions.
12104
121052012-06-06  Sergey Poznyakoff  <gray@gnu.org.ua>
12106
12107	Fix comsat testsuite.
12108
12109	* comsat/tests/atlocal.in (MH_SUPPORT)
12110	(MAILDIR_SUPPORT): New variables.
12111	* comsat/tests/testsuite.at: Disable test cases if their
12112	prerequisite features are not compiled in.
12113
121142012-06-04  Sergey Poznyakoff  <gray@gnu.org.ua>
12115
12116	Don't use disabled features in mailutils.scm.
12117
12118	* libmu_scm/mailutils/Makefile.am (DISTCLEANFILES): Rename to
12119	CLEANFILES: mailutils.scm should be cleaned as a usual object
12120	file.
12121	(MU_FEATURES): New variable, constructed depending on MU_COND_
12122	variables.
12123	(mailutils.scm goal): Use the value of MU_FEATURES as m4
12124	command line.
12125	* libmu_scm/mailutils/mailutils.scm.in: Include only supported
12126	libraries.
12127
121282012-06-04  Sergey Poznyakoff  <gray@gnu.org.ua>
12129
12130	Bugfix.
12131
12132	* libmailutils/base/symlink.c (mu_readlink): Fix initialization
12133	of size.
12134
121352012-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
12136
12137	Update root ignore list.
12138
121392012-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
12140
12141	Fix typos in the generated ChangeLog.
12142
12143	* ChangeLog.amend: New file.
12144	* Makefile.am: Apply corrections from ChangeLog.amend when
12145	generating ChangeLog file.
12146
121472012-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
12148
12149	Update ignore lists.
12150
121512012-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
12152
12153	inc: accept mail from multiple source mailboxes.
12154
12155	* doc/texinfo/mu-mh.texi: Document changes to inc.
12156	* NEWS: Likewise.
12157	* mh/inc.c: Accept multiple source mailboxes.
12158	(input_file): Remove.
12159	(input_file_list): New variable.
12160	(opt_handler): Multiple -file options augment input_file_list.
12161	(incmbox): New function.
12162	(main): Iterate over input_file_list, incorporating mail from
12163	each mailbox in it.
12164
12165	Bugfix:
12166	* libproto/imap/mbox.c (_imap_env_date): Return a 0-terminated
12167	string.
12168
12169	Fix MH test suite.
12170
12171	The ali-everybody tests fails on machines with user database
12172	kept in a non-standard storage (e.g. LDAP or NIS). This patch
12173	attempts to fix it.
12174	* mh/tests/lu.c: New file.
12175	* mh/tests/.gitignore: Add lu.
12176	* mh/tests/Makefile.am (noinst_PROGRAMS): New variable.
12177	* mh/tests/ali.at: Use lu instead of scanning /etc/passwd
12178	directly.
12179
121802012-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12181
12182	Bugfix in imap4d testsuite.
12183
12184	Reportedly, the test command on 64-bit boxes is unable to
12185	handle unsigned long integers. Install a work over.
12186
12187	* imap4d/tests/IDEF0955.at: Use string comparison in the
12188	invocation of test.
12189	* imap4d/tests/IDEF0956.at: Likewise.
12190
121912012-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12192
12193	Minor change in bootstrap.
12194
12195	* bootstrap.conf: Avoid downloading radius.m4 if it is already
12196	here.
12197
121982012-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12199
12200	Fix SMTP STARTTLS and SMTPS.
12201
12202	* libproto/mailer/smtp.c (smtp_open): Do not use mu_tls_enable,
12203	rely on TLS stream functions to do the right thing. This
12204	complements 325c864eb1b88ac73c39ca3681a02f5194021806.
12205
122062012-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12207
12208	Fix handling of URL authentication credentials in SMTP AUTH.
12209
12210	Provide special functions for storing and retrieving URL from
12211	mu_smtp_t object, instead of using MU_SMTP_PARAM_URL. The major
12212	drawback of the latter is that URLs in textual form can contain
12213	obfuscated access credentials, which makes them unusable for
12214	authentication.
12215
12216	* include/mailutils/smtp.h (mu_smtp_set_url) (mu_smtp_get_url)
12217	(mu_smtp_set_secret,mu_smtp_get_secret): New protos.
12218	* include/mailutils/sys/smtp.h (_mu_smtp) <url>: New member.
12219	* libproto/mailer/smtp_secret.c: New file.
12220	* libproto/mailer/smtp_url.c: New file.
12221	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
12222	new files.
12223	* libproto/mailer/smtp.c (smtp_open): Use mu_smtp_set_url to
12224	preserve URL credentials.
12225	* libproto/mailer/smtp_auth.c (_mu_smtp_fixup_params): Use
12226	smtp->url.
12227	* libproto/mailer/smtp_create.c (mu_smtp_destroy): Destroy
12228	smtp->url.
12229	* libproto/mailer/smtp_param.c (mu_smtp_set_param): Special
12230	handling for MU_SMTP_PARAM_URL.
12231	(mu_smtp_get_param): Likewise.
12232
122332012-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12234
12235	Fix quoted-printable and Q encodings.
12236
12237	The Q encoding in RFC 2047 is not exactly the same as
12238	Quoted-Printable encoding: it differs in its handling of space
12239	characters (ASCII 32), which are encoded as underscores.
12240
12241	* libmailutils/filter/qpflt.c (_qp_decoder): Use xd parameter
12242	to determine whether to treat underscores specially.
12243	(_qp_encoder): Likewise.
12244	(_qp_filter,_Q_filter): Allocate and initialize filter data
12245	accordingly to the kind of encoding.
12246
122472012-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12248
12249	Remove get_stream methods from folder and mailbox.
12250
12251	* doc/texinfo/folder.texi: Update
12252	* include/mailutils/cpp/folder.h (Folder) <set_stream>
12253	<get_stream>: Remove.
12254	* include/mailutils/folder.h (mu_folder_get_stream)
12255	(mu_folder_get_streamref)
12256	(mu_folder_set_stream): Remove.
12257	* include/mailutils/mailbox.h (mu_folder_get_stream)
12258	(mu_folder_get_streamref)
12259	(mu_folder_set_stream): Remove protos.
12260	* include/mailutils/sys/folder.h (_mu_folder)<stream>: Remove.
12261	All uses updated.
12262	* libmailutils/mailbox/folder.c (mu_folder_set_stream)
12263	(mu_folder_get_stream,mu_folder_get_streamref): Remove.
12264	* libmailutils/mailbox/mailbox.c (mu_mailbox_get_stream)
12265	(mu_mailbox_get_streamref): Remove.
12266	* libmu_cpp/folder.cc (get_stream, set_stream): Remove.
12267	* libmu_scm/mu_mailbox.c (mu-mailbox-get-port): Remove.
12268	* python/libmu_py/folder.c (get_stream): Remove.
12269
122702012-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12271
12272	Minor fix.
12273
12274	* configure.ac: Fix quoting in FriBidi test.
12275
122762012-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
12277
12278	Implement a copy method in mailbox.
12279
12280	This method copies given messages (indicated by their sequence
12281	or UID numbers) to the given mailbox. So far this is
12282	implemented only in IMAP[S] folders.
12283
12284	The mh/inc utility uses this method to optionally move
12285	incorporated messages to other folder (mailbox) instead of
12286	simply deleting them.
12287
12288	* include/mailutils/imap.h (mu_imap_response)
12289	(mu_imap_response_code): New protos.
12290	(MU_IMAP_CB_TAGGED_OK,MU_IMAP_CB_TAGGED_NO)
12291	(MU_IMAP_CB_TAGGED_BAD): New callback codes.
12292	* include/mailutils/mailbox.h (MU_MAILBOX_COPY_UID)
12293	(MU_MAILBOX_COPY_CREAT): New constants.
12294	(mu_mailbox_msgset_copy)
12295	(mu_mailbox_message_copy): New protos.
12296	* include/mailutils/sys/imap.h (resp_code): Rename to response
12297	to avoid confusion. All uses updated.
12298	(response_code): New member.
12299	(_mu_imap_process_tagged_response): New proto.
12300	* include/mailutils/sys/mailbox.h (_mu_mailbox) <_copy>: New
12301	member.
12302	* libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add
12303	copy.c
12304	* libmailutils/mailbox/copy.c: New file.
12305	* libproto/imap/err.c (mu_imap_response): New function.
12306	(mu_imap_response_code): New function.
12307	* libproto/imap/mbox.c (_imap_copy_to_mailbox)
12308	(_mu_imap_mailbox_init): Implement _copy method.
12309	* libproto/imap/resplist.c (IS_LBRACE,IS_RBRACE): Fix macros.
12310	* libproto/imap/response.c (_mu_imap_response): Call
12311	_mu_imap_process_tagged_response to process tagged responses.
12312	* libproto/imap/resproc.c (parse_response_code): Bugfix:
12313	expected ']' was set off by one.
12314	(resptab)<code>: New member.
12315	(_mu_imap_process_tagged_response): New function.
12316	* mh/inc.c (options, mh_option, opt_handler): New option
12317	--moveto.
12318	(move_to_mailbox): New variable.
12319	(main): If move_to_mailbox is set, move messages to that
12320	mailbox instead of deleting them.
12321	* mh/mh_getopt.h (mh_arg)<ARG_MOVETO>: New constant.
12322	* NEWS: Update.
12323	* include/mailutils/folder.h: Add a comment.
12324	* libmailutils/mailbox/folder.c: Minor formatting change.
12325
123262012-04-27  Sergey Poznyakoff  <gray@gnu.org.ua>
12327
12328	Minor fix.
12329
12330	* po/POTFILES.in: Remove xmalloc.c
12331
123322012-04-27  Sergey Poznyakoff  <gray@gnu.org.ua>
12333
12334	Avoid using expr in tests with ulong as its argument.
12335
12336	* configure.ac (MU_ULONG_MAX): Rename to MU_ULONG_MAX_1,
12337	decrease by one accordingly.
12338	* imap4d/tests/IDEF0955.at: Use MU_ULONG_MAX_1 instead of
12339	calling expr.
12340	* imap4d/tests/IDEF0956.at: Likewise.
12341	* imap4d/tests/atlocal.in: Define MU_ULONG_MAX_1.
12342
123432012-04-23  Sergey Poznyakoff  <gray@gnu.org.ua>
12344
12345	Bugfixes.
12346
12347	* libproto/mailer/smtp.c (_smtp_set_rcpt): Assign rcpt_to a
12348	copy of the recipient address.
12349	* mail/util.c (util_header_expand): Make sure exp is always
12350	initialized.
12351	* mh/send.c (main): Process mtstailor before checking input
12352	files, so its settings affect creation of additional headers
12353	and addresses. In particular, this allows for setting the
12354	sender address in mtstailor.
12355
123562012-04-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12357
12358	Fix SMTP test on machines with IPv6 enabled.
12359
12360	* testsuite/smtpsend.c: New assignment option `family=' to
12361	force using a specified interface family.
12362	* testsuite/smtp-msg.at: Force IPv4.
12363	* testsuite/smtp-str.at: Likewise.
12364
123652012-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12366
12367	Revise some memory allocation routines.
12368
12369	* examples/aclck.c: Check return values from strdup.
12370	* libmailutils/base/usremail.c: Likewise.
12371	* libmailutils/mailbox/bodystruct.c: Likewise.
12372	* lib/mailcap.c: Likewise.
12373	* libmailutils/mailbox/mbx_default.c: Likewise.
12374	* libmailutils/server/acl.c: Likewise.
12375	* libmailutils/stream/logstream.c: Likewise.
12376	* libmailutils/stream/message_stream.c: Likewise.
12377	* libmu_argp/mu_argp.c: Likewise.
12378	* libmu_auth/ldap.c: Likewise.
12379	* libmu_auth/pam.c: Likewise.
12380	* libmu_auth/sql.c: Likewise.
12381	* libmu_sieve/comparator.c: Likewise.
12382	* libmu_sieve/conf.c: Likewise.
12383	* libmu_sieve/extensions/list.c: Likewise.
12384	* libmu_sieve/extensions/vacation.c: Likewise.
12385	* libproto/mailer/prog.c: Likewise.
12386	* libproto/mailer/smtp_io.c: Likewise.
12387	* maidag/lmtp.c: Likewise.
12388	* python/libmu_py/address.c: Likewise.
12389	* sql/odbc.c
12390	* examples/sfrom.c (main): Avoid unnecessary memory allocation.
12391	* libmailutils/mailbox/mailbox.c: Likewise.
12392	* frm/frm.h: Include mailutils/alloc.h, remove xalloc.h
12393	* mh/mh.h: Likewise.
12394	* imap4d/imap4d.h: Remove xalloc.h
12395	* mail/mail.h: Likewise.
12396	* mimeview/mimeview.h: Likewise.
12397	* mu/acl.c: Likewise.
12398	* readmsg/readmsg.c: Likewise.
12399	* include/mailutils/locker.h
12400	(mu_locker_set_default_external_program): Change returned type.
12401	* include/mailutils/mailbox.h (mu_set_folder_directory): Change
12402	returned type.
12403	* libmailutils/base/locker.c
12404	(mu_locker_set_default_external_program): Return int (error
12405	code).
12406	* libmailutils/base/tilde.c: Add extra checks
12407	* libmailutils/mime/mimehdr.c (_mime_header_parse): Bugfix.
12408	* mail/folders.c: Don't use alloca, use mu_alloc instead. It
12409	was the only use of that function in Mailutils, so this change
12410	allows to withdraw the alloca module.
12411	* gnulib.modules (alloca, malloc)
12412	(realloc, xalloc): Remove.
12413	* frm/common.c: Use mu_alloc and friends instead of xmalloc.
12414	* frm/from.c: Likewise.
12415	* imap4d/append.c: Likewise.
12416	* imap4d/auth_gsasl.c: Likewise.
12417	* imap4d/authenticate.c: Likewise.
12418	* imap4d/fetch.c: Likewise.
12419	* imap4d/imap4d.c: Likewise.
12420	* imap4d/io.c: Likewise.
12421	* imap4d/list.c: Likewise.
12422	* imap4d/namespace.c: Likewise.
12423	* imap4d/parsebuf.c: Likewise.
12424	* imap4d/preauth.c: Likewise.
12425	* imap4d/rename.c: Likewise.
12426	* imap4d/search.c: Likewise.
12427	* imap4d/util.c: Likewise.
12428	* libmu_argp/muinit.c: Likewise.
12429	* mail/alias.c: Likewise.
12430	* mail/alt.c: Likewise.
12431	* mail/copy.c: Likewise.
12432	* mail/decode.c: Likewise.
12433	* mail/escape.c: Likewise.
12434	* mail/file.c: Likewise.
12435	* mail/from.c: Likewise.
12436	* mail/mail.c: Likewise.
12437	* mail/mailline.c: Likewise
12438	* mail/mailvar.c: Likewise
12439	* mail/msgset.y: Likewise
12440	* mail/page.c: Likewise
12441	* mail/send.c: Likewise
12442	* mail/shell.c: Likewise
12443	* mail/unset.c: Likewise
12444	* mail/util.c: Likewise
12445	* mh/folder.c: Likewise
12446	* mh/mh_alias.l: Likewise
12447	* mh/mh_alias.y: Likewise
12448	* mh/mh_fmtgram.y: Likewise
12449	* mh/mh_format.c: Likewise
12450	* mh/mh_global.c: Likewise
12451	* mh/mh_init.c: Likewise
12452	* mh/mh_list.c: Likewise
12453	* mh/mh_whatnow.c: Likewise
12454	* mh/mh_whom.c: Likewise
12455	* mh/mhn.c: Likewise
12456	* mh/pick.y: Likewise
12457	* mh/prompter-rl.c: Likewise
12458	* mh/refile.c: Likewise
12459	* mh/repl.c: Likewise
12460	* mh/send.c: Likewise
12461	* mh/sortm.c: Likewise
12462	* mimeview/mimetypes.y: Likewise
12463	* mu/dbm.c: Likewise
12464	* mu/dispatch.c: Likewise
12465	* mu/imap.c: Likewise
12466	* mu/pop.c: Likewise
12467	* mu/shell.c: Likewise
12468	* pop3d/apop.c: Likewise
12469	* pop3d/bulletin.c: Likewise
12470	* pop3d/popauth.c: Likewise
12471	* pop3d/user.c: Likewise
12472
124732012-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
12474
12475	Minor changes.
12476
124772012-03-23  Sergey Poznyakoff  <gray@gnu.org.ua>
12478
12479	Fix semantics of MU_IOCTL_SUBSTREAM.
12480
12481	This also fixes e75e9123, which broke TLS support in daemons.
12482
12483	* include/mailutils/stream.h (MU_IOCTL_TOPSTREAM): New ioctl.
12484	* imap4d/imap4d.c (set_strerr_flt)
12485	(clr_strerr_flt): Use MU_IOCTL_TOPSTREAM.
12486	* pop3d/pop3d.c: Likewise.
12487	* libmailutils/stream/fltstream.c (filter_ctl): Handle both
12488	MU_IOCTL_SUBSTREAM and MU_IOCTL_TOPSTREAM.
12489	* libmailutils/stream/iostream.c (_iostream_ctl): Likewise.
12490	* libmailutils/stream/logstream.c (_log_ctl): Likewise.
12491	* libmailutils/stream/xscript-stream.c (_xscript_ctl):
12492	Likewise.
12493
124942012-03-23  Sergey Poznyakoff  <gray@gnu.org.ua>
12495
12496	Minor fixes.
12497
12498	* libmailutils/mime/mimehdr.c (free_param_continuation): Change
12499	return type to void.
12500	* mu/shell.c: Include muaux.h
12501	* libproto/imap/logout.c (mu_imap_logout): Logout is valid in
12502	any state, except MU_IMAP_SESSION_INIT.
12503
125042012-03-20  Sergey Poznyakoff  <gray@gnu.org.ua>
12505
12506	Improve conversion between file mode and safety criteria and
12507	vice versa.
12508
12509	* include/mailutils/util.h (mu_file_safety_code_to_name): New
12510	proto.
12511	* libmailutils/base/filesafety.c: Remove static functions which
12512	checked file mode bits. Use safety_checker.mode for that
12513	directly.
12514	(mu_file_safety_code_to_name): New function.
12515	(mu_file_mode_to_safety_criteria): Bugfix.
12516	(mu_safety_criteria_to_file_mode): Change algorithm.
12517	* libmailutils/tests/.gitignore: Update
12518	* libmailutils/tests/fsaftomod.at: New file.
12519	* libmailutils/tests/fsaftomod.c: New file.
12520	* libmailutils/tests/modtofsaf.at: New file.
12521	* libmailutils/tests/modtofsaf.c: New file.
12522	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
12523	fsaftomod and modtofsaf.
12524	(TESTSUITE_AT): Add fsaftomod.at and modtofsaf.at
12525	* libmailutils/tests/testsuite.at: Include fsaftomod.at and
12526	modtofsaf.at
12527
125282012-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
12529
12530	Bugfix.
12531
12532	* libmu_dbm/berkeley.c (do_bdb_open): Fix typo.
12533
125342012-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
12535
12536	Add missing includes.
12537
125382012-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
12539
12540	mh: minor fix in reply formats.
12541
12542	* mh/etc/replcomps: Format Fcc only if coming from myself.
12543	* mh/etc/replgroupcomps: Likewise.
12544
125452012-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
12546
12547	Implement session ID for TCP/UDP servers.
12548
12549	* imap4d/imap4d.c (set_strerr_flt,clr_strerr_flt): New
12550	functions.
12551	(imap4d_connection): Setup session prefix in strerr if
12552	mu_log_session_id is set.
12553	* imap4d/io.c (io_setio): Bugfix: unref debug stream.
12554	* pop3d/extra.c (pop3d_setio): Likewise.
12555	* pop3d/pop3d.c (set_strerr_flt,clr_strerr_flt): New functions.
12556	(pop3d_connection): Setup session prefix in strerr if
12557	mu_log_session_id is set.
12558	* include/mailutils/acl.h (mu_acl_setenv)
12559	(mu_acl_getenv,mu_acl_set_session_id): New functions.
12560	* include/mailutils/server.h (mu_session_id): New extern.
12561	(mu_m_server_configured_count): Fix signature.
12562	* include/mailutils/syslog.h (mu_log_session_id): New extern.
12563	* libmailutils/diag/syslog.c (mu_log_session_id): New global.
12564	* libmailutils/server/acl.c (_mu_acl) <envv,envc,envn>: New
12565	members.
12566	(run_closure) <env>: New member.
12567	(mu_acl_destroy): Free environment.
12568	(_acl_match): Handle "family" variable.
12569	(expand_arg): Propagate ACL environment to wordsplit.
12570	(mu_acl_check_sockaddr): Propagate ACL environment.
12571	(mu_acl_setenv)
12572	(mu_acl_getenv,mu_acl_set_session_id): New functions.
12573	* libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Store session
12574	ID in the ACL.
12575	(mu_ip_udp_accept): Likewise.
12576	* libmailutils/server/msrv.c (mu_m_server_configured_count):
12577	Fix signature.
12578	(mu_m_server_check_acl): Store session ID in the ACL.
12579	* libmailutils/server/server.c (mu_session_id): New global
12580	variable.
12581	(connection_loop): Increment session ID
12582	(mu_acl_set_session_id): New function.
12583	* libmailutils/stream/fltstream.c (filter_ctl): Handle
12584	MU_IOCTL_SUBSTREAM.
12585	* libmailutils/stream/logstream.c (_log_ctl): Likewise.
12586	* libmu_cfg/common.c (mu_logging_param) <session-id>: New
12587	statement.
12588
125892012-03-14  Sergey Poznyakoff  <gray@gnu.org.ua>
12590
12591	Minor fix in smtp transport.
12592
12593	* libproto/mailer/smtp.c (smtp_send_message): Filter out Fcc
12594	and Bcc headers.
12595
125962012-03-14  Sergey Poznyakoff  <gray@gnu.org.ua>
12597
12598	Fix creation of Berkeley db files.
12599
12600	* include/mailutils/util.h (mu_file_mode_to_safety_criteria)
12601	(mu_safety_criteria_to_file_mode): New protos.
12602	* libmailutils/base/filesafety.c (safety_checker) <mode>: New
12603	member.
12604	(file_safety_check_tab): Update.
12605	(mu_file_mode_to_safety_criteria)
12606	(mu_safety_criteria_to_file_mode): New functions.
12607	* libmu_dbm/berkeley.c (do_bdb_open): Create file prior to
12608	locking it.
12609
126102012-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12611
12612	mail: Implement folder completion in "save"
12613
12614	* mail/mailline.c (file_compl_internal): New function (from
12615	file_compl);
12616	(file_compl): Call file_compl_internal.
12617	(msglist_file_compl): Call file_compl_internal.
12618
126192012-03-11  Sergey Poznyakoff  <gray@gnu.org.ua>
12620
12621	Fix the use of struct utmp/utmpx in comsatd.
12622
12623	* am/utmp.m4: Check if struct utmp has ut_user or ut_name
12624	members.
12625	* comsat/comsat.c [HAVE_UTMPX_H]: Define UTMP as a typedef of
12626	struct utmpx. Define ut_user, if necessary.
12627	(find_user): Use ut_user instead of (backward-compatible)
12628	ut_name.
12629
126302012-03-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12631
12632	Fix compilation of pop3d and maidag without DBM.
12633
12634	* maidag/Makefile.am: Load libmu_dbm.la if MU_COND_DBM is true.
12635	* pop3d/apop.c (pop3d_apopuser): Set owner, if specified in the
12636	config.
12637	* pop3d/pop3d.c (apop_database_owner)
12638	(apop_database_owner_set): New globals.
12639	(pop3d_cfg_param) <apop-database-owner>: New keyword.
12640	* pop3d/pop3d.h (apop_database_owner)
12641	(apop_database_owner_set): New declarations.
12642
126432012-03-08  Sergey Poznyakoff  <gray@gnu.org.ua>
12644
12645	Bugfix.
12646
12647	* mu/dbm.c: Include conditionally, depending on ENABLE_DBM.
12648
126492012-02-27  Sergey Poznyakoff  <gray@gnu.org.ua>
12650
12651	Fix locking of Berkeley databases.
12652
12653	* include/mailutils/locker.h (mu_locker_lock_mode): New proto.
12654	* libmailutils/base/locker.c (_mu_locker_lock): Rename to
12655	mu_locker_lock_mode. All callers updated.
12656	* libmu_dbm/berkeley.c (bdb_file) <locker>: New member.
12657	(do_bdb_open): New function. Lock the database file before
12658	opening it. Drop support for version 2.
12659	(_bdb_open): Rewrite as a wrapper over do_bdb_open.
12660	* mu/dbm.c (dbm_doc): Document the "dump" subcommand.
12661	* NEWS: Version 2.99.96
12662	* configure.ac: Likewise.
12663
126642012-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
12665
12666	Fix parsing local URLs.
12667
12668	* include/mailutils/url.h (MU_URL_PARSE_LOCAL): New flag.
12669	* libmailutils/tests/url-parse.c (parse_kwtab): New flag
12670	"local".
12671	* libmailutils/tests/url.at: Add new tests
12672	* libmailutils/url/create.c (_mu_url_ctx_parse_host): Skip
12673	parsing host part if MU_URL_PARSE_LOCAL is set.
12674	(_mu_url_create_internal): Initialize rc. If MU_URL_PARSE_SLASH
12675	is set and URL begins with "./" assume it is file. If either
12676	MU_URL_PARSE_SLASH or MU_URL_PARSE_PIPE are given and the URL
12677	is diagnosed as file or pipe, prefer the scheme from hints.
12678
126792012-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12680
12681	Bugfixes.
12682
12683	* include/mailutils/Makefile.am: Add types to
12684	pkginclude_HEADERS.
12685	* libmailutils/tests/url-comp.at: Add missing dnl.
12686
126872012-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
12688
12689	Bugfix.
12690
12691	* mh/mhn.c (mhn_edit): Destroy output prior to unreferencing
12692	msg, because it may have been taken from it.
12693
126942012-01-22  Sergey Poznyakoff  <gray@gnu.org.ua>
12695
12696	Minor fix.
12697
12698	* libproto/mailer/smtp.c (smtp_send_message): Fix typo.
12699
127002012-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12701
12702	Bugfix in the testsuite.
12703
12704	* testsuite/smtp-msg.at: Ignore output from kill.
12705	* testsuite/smtp-str.at: Likewise.
12706
127072012-01-11  Sergey Poznyakoff  <gray@gnu.org.ua>
12708
12709	Assorted fixes.
12710
12711	* libmailutils/mailer/mailer.c (mu_mailer_send_fragments): Fix
12712	3rd argument to _set_to.
12713	* libproto/mailer/smtp.c (smtp_send_message): SIZE capability
12714	can appear alone, without specifying maximum size.
12715	* mh/mh_whom.c (mh_alias_expand): Recreate domain part for
12716	addresses missing it.
12717
127182012-01-08  Sergey Poznyakoff  <gray@gnu.org.ua>
12719
12720	Restore extra quoting in test mhn-store-pipe of
12721	mh/tests/mhn.at.
12722
12723	Extra quoting is necessary because the argument includes
12724	unbalanced parentheses. It was first implemented in commit
12725	1b5098c9 on 2011-05-05, but was accidentally removed in commit
12726	1e33c774 on 2011-10-16.
12727
127282012-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
12729
12730	Bugfix in the testsuite.
12731
12732	* libmailutils/tests/url-comp.c (main): Initialize URL.
12733
127342012-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
12735
12736	Happy GNU Year.
12737
127382011-12-31  Sergey Poznyakoff  <gray@gnu.org.ua>
12739
12740	Implement SMTPS.
12741
12742	* NEWS: Update.
12743	* include/mailutils/registrar.h (mu_smtps_record): New extern.
12744	(mu_register_all_mailer_formats): Register mu_smtps_record.
12745	* include/mailutils/sys/registrar.h (MU_SMTPS_SCHEME)
12746	(MU_SMTPS_SCHEME_LEN,MU_SMTPS_PORT): New defines.
12747	* libmailutils/address/address.c (mu_address_get_count): Don't
12748	count parts with NULL emails.
12749	(mu_address_contains_email): Validate email before comparison.
12750	(mu_list_copy): New static.
12751	(mu_address_union): Reuse last subaddress if its email is NULL.
12752	* libmailutils/base/nullrec.c (mu_smtps_record): New
12753	placeholder.
12754	* libproto/mailer/smtp.c (mu_smtps_record): New global.
12755	(smtp_open): Implement SMTPS
12756	* mu/send.c: New file.
12757	* mu/Makefile.am (MODULES): Add send.c
12758
127592011-12-31  Sergey Poznyakoff  <gray@gnu.org.ua>
12760
12761	Add SMTP test.
12762
12763	* examples/mta.c: Handle -bD option. Detach from the
12764	controlling terminal if -bd is given. Print pid and port number
12765	in this case.
12766	* testsuite/smtpsend.c: Fix handling of the trace= option.
12767	* testsuite/Makefile.am: Add new tests.
12768	* testsuite/smtp-msg.at: New test case.
12769	* testsuite/smtp-str.at: New test case.
12770	* testsuite/testsuite.at: Include new test cases.
12771
127722011-12-30  Sergey Poznyakoff  <gray@gnu.org.ua>
12773
12774	Fix a bug in DOT decoder.
12775
127762011-12-30  Sergey Poznyakoff  <gray@gnu.org.ua>
12777
12778	Improve msgset interface.  Use it in MH.
12779
12780	* libmailutils/msgset/Makefile.am (libmsgset_la_SOURCES): Add
12781	new files.
12782	* libmailutils/msgset/addset.c: New file.
12783	* libmailutils/msgset/count.c: New file.
12784	* libmailutils/msgset/foreachmsgno.c: New file.
12785	* libmailutils/msgset/foreachuid.c: New file.
12786	* libmailutils/msgset/isempty.c: New file.
12787	* libmailutils/msgset/subset.c: New file.
12788	* libmailutils/msgset/trans.c: New file.
12789	* libmailutils/msgset/add.c (mu_msgset_add_range): Take fourth
12790	argument specifying the conversion mode. Translate numbers as
12791	necessary.
12792	* libmailutils/msgset/foreachmsg.c: Translate numbers as
12793	necessary.
12794	* libmailutils/msgset/foreachnum.c: Rewrite.
12795	* libmailutils/msgset/negate.c (_invert_range)
12796	(mu_msgset_add_range): Update calls to mu_msgset_add_range.
12797	* libmailutils/msgset/parse.c (parse_msgnum_env)<mode>: New
12798	member.
12799	(parse_msgrange): Update calls to mu_msgset_add_range.
12800	(mu_msgset_parse_imap): Change signature. All callers updated.
12801	* libmailutils/msgset/sub.c (mu_msgset_sub_range): Take fourth
12802	argument specifying the conversion mode. Translate numbers as
12803	necessary.
12804	* imap4d/copy.c (imap4d_copy0): Update calls to
12805	mu_msgset_create and mu_msgset_parse_imap.
12806	* imap4d/fetch.c (fetch_thunk): Likewise.
12807	* imap4d/search.c (parse_simple_key): Likewise.
12808	* imap4d/store.c (store_thunk): Likewise.
12809	* include/mailutils/msgset.h (MU_MSGSET_NUM,MU_MSGSET_UID): New
12810	defines.
12811	(mu_msgset_add,mu_msgset_sub): New protos.
12812	(mu_msgset_add_range,mu_msgset_sub_range): Take 4 arguments.
12813	All callers changed.
12814	* include/mailutils/sys/msgset.h (_mu_msgset_translate_pair)
12815	(_mu_msgset_translate_range): New protos.
12816	* libmailutils/tests/msgset.c: Reflect the above changes.
12817	* testsuite/msgset.c: Likewise.
12818	* libproto/imap/mbox.c: Update calls to mu_msgset functions.
12819	* mh/mh.h (mh_msgset_t): Remove.
12820	(mh_iterator_fp): Remove typedef.
12821	(mh_msgset_parse): Change signature.
12822	(mh_msgset_member,mh_msgset_reverse,mh_msgset_negate)
12823	(mh_msgset_current,mh_msgset_free,mh_msgset_uids): Remove
12824	protos.
12825	(mh_msgset_parse_string): New proto.
12826	(mh_msgset_first_current,mh_msgset_first): New proto.
12827	(mh_iterate: Remove proto. Use mu_msgset_foreach* functions
12828	instead.
12829	(mh_seq_add,mh_seq_delete): Change signatures.
12830	* mh/mh_init.c (mh_iterate): Remove.
12831	* mh/mh_msgset.c: Rewrite using mu_msgset_t.
12832	* mh/mh_sequence.c: Likewise.
12833	* mh/anno.c: Use new msgset functions.
12834	* mh/burst.c: Likewise.
12835	* mh/comp.c: Likewise.
12836	* mh/folder.c: Likewise.
12837	* mh/forw.c: Likewise.
12838	* mh/mark.c: Likewise.
12839	* mh/mhn.c: Likewise.
12840	* mh/mhpath.c: Likewise.
12841	* mh/mhseq.c: Likewise.
12842	* mh/pick.c: Likewise.
12843	* mh/refile.c: Likewise.
12844	* mh/repl.c: Likewise.
12845	* mh/rmm.c: Likewise.
12846	* mh/scan.c: Likewise.
12847	* mh/send.c: Likewise.
12848	* mh/sortm.c: Likewise.
12849	* mh/whatnowenv.c: Likewise.
12850	* mh/tests/mark.at: Reflect changes in the format of the saved
12851	sequences, which may contain ranges now.
12852	* mu/imap.c: Update calls to mu_msgset functions.
12853
128542011-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
12855
12856	msgset: implement "foreach" calls.
12857
12858	* imap4d/copy.c (copy_env) <src>: Remove. Not needed now.
12859	(size_sum,do_copy): Change to a mu_msgset_message_action_t.
12860	(try_copy,safe_copy): Change signature; use
12861	mu_msgset_foreach_message.
12862	* imap4d/fetch.c (_fetch_from_message): Change to a
12863	mu_msgset_message_action_t.
12864	(imap4d_fetch0): Use mu_msgset_foreach_message.
12865	* imap4d/imap4d.h (imap4d_message_action_t): Remove typedef.
12866	(util_foreach_message): Remove. Use mu_msgset_foreach_message.
12867	* imap4d/store.c (_do_store): Change to a
12868	mu_msgset_message_action_t.
12869	(imap4d_store0): Use mu_msgset_foreach_message.
12870	* imap4d/util.c (util_foreach_message): Remove.
12871	* include/mailutils/list.h (mu_list_foreach_dir): New proto.
12872	* include/mailutils/msgset.h (mu_msgset_msgno_action_t)
12873	(mu_msgset_message_action_t): New typedefs.
12874	(mu_msgset_negate,mu_msgset_foreach_dir_msgno)
12875	(mu_msgset_foreach_msgno,mu_msgset_foreach_dir_message)
12876	(mu_msgset_foreach_message): New protos.
12877	* libmailutils/list/foreachdir.c: New file.
12878	* libmailutils/list/Makefile.am (liblist_la_SOURCES): Add
12879	foreachdir.c.
12880	* libmailutils/list/head.c (mu_list_head): Fix conditional.
12881	* libmailutils/list/tail.c (mu_list_tail): Likewise.
12882	* libmailutils/msgset/foreachmsg.c: New file.
12883	* libmailutils/msgset/foreachnum.c: New file.
12884	* libmailutils/msgset/negate.c: New file.
12885	* libmailutils/msgset/Makefile.am (libmsgset_la_SOURCES): Add
12886	new files.
12887	* libmailutils/msgset/getitr.c (mu_msgset_get_iterator): Call
12888	mu_msgset_aggregate before doing anything.
12889	* libmailutils/msgset/getlist.c (mu_msgset_get_list): Likewise.
12890	* libmailutils/msgset/locate.c (mu_msgset_locate): Likewise.
12891	* libmailutils/msgset/parse.c (parse_msgrange): Remove
12892	duplicated code.
12893	* testsuite/msgset.c: Implement -neg option.
12894
128952011-12-27  Sergey Poznyakoff  <gray@gnu.org.ua>
12896
12897	Update TODO.
12898
128992011-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
12900
12901	Use mu_msgset_t in imap4d.
12902
12903	* imap4d/util.c (util_parse_msgset): Remove. Use
12904	mu_msgset_parse_imap. All uses changed.
12905	(util_foreach_message): Change first argument to mu_msgset_t.
12906	All uses changed.
12907	* imap4d/imap4d.h: Likewise.
12908	* imap4d/copy.c: Use mu_msgset_t
12909	* imap4d/fetch.c: Likewise.
12910	* imap4d/search.c: Likewise.
12911	* imap4d/store.c: Likewise.
12912
129132011-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
12914
12915	Use mu_msgset_t in imap client for FETCH, STORE and COPY.
12916
12917	* include/mailutils/imap.h (mu_imap_fetch,mu_imap_store)
12918	(mu_imap_store_flags,mu_imap_copy): Take mu_msgset_t as the
12919	message set parameter.
12920	* include/mailutils/imapio.h (mu_imapio_send_msgset): New
12921	proto. (mu_imapio_send_command_v,mu_imapio_send_command)
12922	(mu_imapio_send_command_e): Take additional mu_msgset_t
12923	parameter. All uses changed.
12924	* include/mailutils/msgset.h (mu_msgset_parse_imap): Input
12925	string is const.
12926	* include/mailutils/sys/imap.h (imap_command) <msgset>: New
12927	member.
12928	* libmailutils/imapio/sendmsgset.c: New file.
12929	* libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add
12930	sendmsgset.c.
12931	* libmailutils/imapio/sendcmd.c (mu_imapio_send_command): Take
12932	additional mu_msgset_t parameter.
12933	* libmailutils/imapio/sendcmde.c (mu_imapio_send_command_e):
12934	Likewise.
12935	* libmailutils/imapio/sendcmdv.c (mu_imapio_send_command_v):
12936	Likewise.
12937	* libmailutils/msgset/parse.c (mu_msgset_parse_imap): Input
12938	string is const.
12939	* libproto/imap/copy.c (mu_imap_copy): Take mu_msgset_t as the
12940	message set parameter.
12941	* libproto/imap/fetch.c (mu_imap_fetch): Likewise.
12942	* libproto/imap/store.c (mu_imap_store): Likewise.
12943	* libproto/imap/storeflg.c (mu_imap_store_flags): Likewise.
12944	* libproto/imap/gencom.c (mu_imap_gencom): Send cmd->msgset.
12945
129462011-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
12947
12948	Bugfix.
12949
12950	* libmailutils/mailbox/mailbox.c (_MBOX_CHECK_FLAGS): Fix
12951	return code.
12952
129532011-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
12954
12955	Add functions for operations on message sets.
12956
12957	* configure.ac: Build libmailutils/msgset/Makefile
12958	* include/mailutils/msgset.h: New file.
12959	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
12960	msgset.h
12961	* include/mailutils/mailutils.h: Include mailutils/msgset.h
12962	* include/mailutils/sys/msgset.h: New file.
12963	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
12964	msgset.h
12965	* include/mailutils/types.hin (mu_msgset_t): New type.
12966	* libmailutils/Makefile.am (SUBDIRS): Add msgset.
12967	(libmailutils_la_LIBADD): Add libmsgset.la
12968	* libmailutils/msgset/Makefile.am: New file.
12969	* libmailutils/msgset/add.c: New file.
12970	* libmailutils/msgset/aggr.c: New file.
12971	* libmailutils/msgset/clear.c: New file.
12972	* libmailutils/msgset/create.c: New file.
12973	* libmailutils/msgset/free.c: New file.
12974	* libmailutils/msgset/getitr.c: New file.
12975	* libmailutils/msgset/getlist.c: New file.
12976	* libmailutils/msgset/locate.c: New file.
12977	* libmailutils/msgset/parse.c: New file.
12978	* libmailutils/msgset/print.c: New file.
12979	* libmailutils/msgset/sub.c: New file.
12980	* libmailutils/tests/msgset.at: New file.
12981	* libmailutils/tests/msgset.c: New file.
12982	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add msgset.
12983	(TESTSUITE_AT): Add msgset.at.
12984	* libmailutils/tests/testsuite.at: Include msgset.at.
12985	* testsuite/msgset.c: New file.
12986	* testsuite/Makefile.am (noinst_PROGRAMS): Add msgset.
12987
129882011-12-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12989
12990	imap mbox: minor improvements.
12991
12992	* libproto/imap/mbox.c: Add some debugging messages.
12993	(_imap_mbx_gensync): New function shared among _imap_mbx_sync
12994	and _imap_mbx_expunge. It aggregates message numbers with same
12995	flags to separate message sets, thereby reducing the number of
12996	STORE commands sent to the server.
12997
129982011-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
12999
13000	Minor fixes in imap.
13001
13002	* include/mailutils/imap.h (MU_IMAP_RESPONSE_UNKNOWN)
13003	(MU_IMAP_RESPONSE_TAGGED): New defines.
13004	* libproto/imap/mbox.c (_imap_mbx_open): Fix callback ID.
13005	* libproto/imap/response.c (_mu_imap_response): Call
13006	MU_IMAP_CB_BAD callback on tagged BAD responses as well.
13007	* libproto/imap/storeflg.c (mu_imap_store_flags): Insert space
13008	after item name.
13009
130102011-12-23  Wojciech Polak  <polak@gnu.org>
13011
13012	Update the NEWS file.
13013
130142011-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
13015
13016	Finish imap mailbox implementation.
13017
13018	Some features are missing (notably, quick access), but overall
13019	the implementation offers all necessary features and performs a
13020	lot better than 2.x.
13021
13022	Additionally, this commit fixes a minor bug in the imap4d
13023	implementation: the STORE command did not accept empty flag
13024	list.
13025
13026	* NEWS: Update.
13027	* imap4d/store.c (store_thunk): Accept empty list as "items"
13028	argument.
13029	* include/mailutils/imap.h (mu_imap_store_flags): New proto.
13030	* include/mailutils/imaputil.h (mu_imap_format_flags): Add new
13031	argument.
13032	* include/mailutils/sys/imap.h (_MU_IMAP_MSG_ATTRCHG): New
13033	flag.
13034	* libmailutils/imapio/flags.c: Accept three arguments, last one
13035	being a boolean flag specifying whether we want \Recent in the
13036	output.
13037	* libproto/imap/storeflg.c: New flag.
13038	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add
13039	storeflg.c.
13040	* libproto/imap/mbox.c: Finish the basic implementation.
13041	* imap4d/sync.c: Update calls to mu_imap_format_flags.
13042	* imap4d/util.c: Likewise.
13043	* mu/imap.c: Likewise.
13044	* libmailutils/imapio/sendflg.c (mu_imapio_send_flags):
13045	Likewise.
13046
130472011-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
13048
13049	Implement imap mailbox (read-only, so far).
13050
13051	* include/mailutils/sys/imap.h (_mu_imap_mailbox_init): New
13052	proto.
13053	(_mu_imap_message,_mu_imap_mailbox): New structures.
13054	* libproto/imap/mbox.c: New file.
13055	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Put back
13056	mbox.c
13057	* libproto/imap/fetch.c: Fix body/bodystructure parsing.
13058	* libproto/imap/folder.c (_mu_imap_folder_destroy): Close
13059	folder.
13060	(_mu_imap_folder_open): Implement STARTTLS.
13061	(_imap_record): Accept parameters in URL, use
13062	_mu_imap_mailbox_init to initialize mailbox.
13063
130642011-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
13065
13066	Bugfixes in imap client.
13067
13068	* libproto/imap/fetch.c (_fetch_fold): Fix parsing of BODY[].
13069	(_mu_imap_parse_fetch_response): Fix return value.
13070
130712011-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
13072
13073	mu imap: implement copy command.
13074
13075	* mu/imap.c (com_copy): New function.
13076	(print_list_item): Treat 0 separator as '/' to avoid
13077	preliminary truncating the output.
13078
130792011-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
13080
13081	Implement imap (client) bodystructure and envelope.
13082
13083	* libmailutils/string/wordsplit.c (alloc_space): Fix
13084	reallocation calculations.
13085	* imap4d/fetch.c (bodystructure): Output number of lines for
13086	any TEXT part, not only TEXT/PLAIN.
13087	* include/mailutils/header.h (MU_HEADER_CONTENT_LOCATION): New
13088	define.
13089	* include/mailutils/imap.h (mu_imap_fetch_bodystructure):
13090	Implement.
13091	(mu_imap_fetch_envelope): Replace data fields with a single
13092	pointer to struct mu_imapenvelope.
13093	* include/mailutils/message.h: Include datetime.h
13094	(mu_imapenvelope, mu_bodystructure): New structs.
13095	(mu_message_type): New type.
13096	(mu_message_get_imapenvelope,mu_message_imapenvelope_free)
13097	(mu_message_set_imapenvelope)
13098	(mu_bodystructure_free,mu_list_free_bodystructure)
13099	(mu_message_get_bodystructure)
13100	(mu_message_set_bodystructure): New protos.
13101	* include/mailutils/mime.h (mu_mime_param_assoc_create)
13102	(mu_mime_param_assoc_add): New protos.
13103	* include/mailutils/sys/message.h (_mu_message)<_imapenvelope>
13104	<_bodystructure>: New methods.
13105	* libmailutils/mailbox/bodystruct.c: New file.
13106	* libmailutils/mailbox/imapenv.c: New file.
13107	* libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add
13108	new sources.
13109	* libproto/imap/fetch.c: Implement bodystructure.
13110	* mu/imap.c: Likewise.
13111	* testsuite/bs.c: New file.
13112	* testsuite/Makefile.am (noinst_PROGRAMS): Add bs.
13113
131142011-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13115
13116	Fix API for obtaining full email address.
13117
13118	Old API relied on passing a pointer to the buffer string and
13119	its size, which is defective. The new API, in addition to that,
13120	provides functions for obtaining a pointer to the statically
13121	allocated original value, a pointer to dynamically allocated
13122	copy, and a function for formatting the address directly to a
13123	MU stream.
13124
13125	Two functions are marked as deprecated: mu_address_to_string
13126	and mu_address_format_string. Both assume a pointer to an
13127	allocated string of a fixed size, which is far from being
13128	convenient nor reliable enough.
13129
13130	* include/mailutils/address.h (MU_ADDR_HINT_ADDR): Rename to
13131	MU_ADDR_HINT_PRINTABLE
13132	(mu_address)<addr>: Rename to printable.
13133	(mu_address_sget_printable,mu_address_aget_printable)
13134	(mu_address_get_printable): New protos.
13135	(mu_stream_format_address): New proto. (mu_address_to_string)
13136	(mu_address_format_string): Mark as deprecated.
13137	(mu_validate_email): New proto.
13138	* examples/mta.c: Use mu_address_sget_printable instead of
13139	(mu_address_to_string)
13140	* libmailutils/address/addrstream.c: New file.
13141	* libmailutils/address/Makefile.am (libaddress_la_SOURCES): Add
13142	addrstream.c
13143	* libmailutils/address/address.c (mu_address_format_string):
13144	Rewrite using streams.
13145	(mu_address_to_string): Rewrite as a wrapper over
13146	mu_address_get_printable.
13147	(mu_address_sget_printable,mu_address_aget_printable)
13148	(mu_address_get_printable): New functions.
13149	* libmailutils/mime/mimehdr.c (_mime_header_parse): Initialize
13150	rc.
13151	* mail/util.c (util_merge_addresses): Use
13152	mu_address_aget_printable.
13153	* mh/mh.h (mh_annotate): Both string args are const.
13154	* mh/mh_init.c (mh_annotate): Likewise.
13155	* mh/mh_format.c (builtin_formataddr): Use
13156	mu_address_sget_printable.
13157	* mh/mh_whatnow.c (anno_data)<field,value>: Both are consts.
13158	(annotate): Use mu_address_sget_printable.
13159	* mh/send.c (set_address_header): Use
13160	mu_address_sget_printable.
13161	* mu/imap.c (format_email): Use mu_stream_format_address.
13162	* python/libmu_py/address.c (api_address_to_string): Likewise.
13163
131642011-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13165
13166	imap4d: Fix fetch in case of message/rfc822.
13167
13168	This case requires full recursion.
13169
13170	* imap4d/fetch.c (bodystructure): Call fetch_bodystructure0.
13171
131722011-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13173
13174	Bugfix.
13175
131762011-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13177
13178	Re-implement parser for RFC-2231 header fields.
13179
13180	The new implementation is able to return all parameters at
13181	once, in an associative array. A subset of parameters can be
13182	requested. The data are automatically converted to the output
13183	charset.
13184
13185	In addition, RFC-2047 parser is extended to support language
13186	specifications (RFC-2231, chapter 5).
13187
13188	* include/mailutils/message.h (MU_MIMEHDR_CSINFO)
13189	(MU_MIMEHDR_MULTILINE): Remove, not public anymore.
13190	(mu_mimehdr_get_param,mu_mimehdr_aget_param)
13191	(mu_message_aget_attachment_name)
13192	(mu_message_get_attachment_name): Remove pflags argument.
13193	* include/mailutils/mime.h (mu_mime_param): New struct.
13194	(mu_rfc2047_decode_param)
13195	(mu_mime_header_parse,mu_mime_header_parse_subset): New proto.
13196	* libmailutils/base/rfc2047.c (_rfc2047_decode_param): New
13197	auxiliary function. Use memory stream to collect data.
13198	(mu_rfc2047_decode): Rewrite as a wrapper around the above.
13199	(mu_rfc2047_decode_param): New function.
13200	* libmailutils/filter/decode.c (mu_decode_filter_args): Pass
13201	actual (instead of maximal) number of arguments to
13202	mu_filter_chain_create.
13203	* libmailutils/mime/mimehdr.c: Rewrite from scratch.
13204	* libmailutils/tests/.gitignore: Add mimehdr.
13205	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
13206	mimehdr.
13207	(TESTSUITE_AT): Add mimehdr.at.
13208	* libmailutils/tests/mimehdr.at: New test.
13209	* libmailutils/tests/mimehdr.c: New test program.
13210	* libmailutils/tests/testsuite.at: Include.
13211
132122011-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
13213
13214	Move Python support from experimental to stable features.
13215
132162011-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
13217
13218	Fix the use of the hierarchy delimiter.
13219
13220	* include/mailutils/util.h (MU_HIERARCHY_DELIMITER): New
13221	define.
13222	(mu_tilde_expansion): Change signature. Delimiter is an int.
13223	* libmailutils/base/tilde.c: Likewise. All uses update.
13224	* imap4d/namespace.c (namespace_checkfullpath)
13225	(namespace_getfullpath): Remove delim argument. All uses
13226	updated.
13227	* imap4d/util.c (util_getfullpath): Remove delim argument. All
13228	uses updated.
13229
132302011-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
13231
13232	Use IMAP-stile wildcards in folder matchers by default.
13233
13234	* imap4d/imap4d.h: Include mailutils/imaputil.h
13235	* imap4d/list.c: Use mu_folder_imap_match/mu_imap_wildmatch.
13236	* imap4d/lsub.c: Likewise.
13237	* imap4d/util.c (util_wcard_match): Move as to libmailutils as
13238	mu_imap_wildmatch.
13239	* include/mailutils/imaputil.h: New file.
13240	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
13241	imaputil.h
13242	* include/mailutils/folder.h (mu_folder_imap_match)
13243	(mu_folder_glob_match): New protos.
13244	* include/mailutils/imapio.h (mu_imap_flag_to_attribute)
13245	(mu_imap_format_flags): Move to imaputil.h
13246	* libmailutils/imapio/wildmatch.c: New file.
13247	* libmailutils/imapio/sendflg.c: New file.
13248	* libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add
13249	sendflg.c and wildmatch.c.
13250	* libmailutils/imapio/flags.c (mu_imapio_send_flags): Move to
13251	sendflg.c
13252	* libmailutils/mailbox/folder.c (mu_folder_match): Rename to
13253	mu_folder_glob_match.
13254	(mu_folder_imap_match): New function.
13255	(mu_folder_create_from_record): Use mu_folder_imap_match as the
13256	default matcher.
13257	* libmailutils/tests/fsfolder.c: Start command line options
13258	with a dash. New option "-glob". All uses changed.
13259	* libproto/imap/select.c: Include imaputil.h
13260	* mu/imap.c: Likewise.
13261
132622011-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
13263
13264	Provisions for loading python modules from the source tree.
13265
13266	* python/Makefile.am (EXTRA_DIST): Add usercustomize.py
13267	* python/usercustomize.py: New file.
13268	* python/libmu_py/Makefile.am (pythonexec_LTLIBRARIES): Remove.
13269	* python/mailutils/Makefile.am (pythonexec_LTLIBRARIES): New
13270	variable (moved from ../libmu_py/Makefile.am)
13271	* python/libmu_py/c_api.c: Move ...
13272	* python/mailutils/c_api.c: ... there
13273
132742011-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
13275
13276	Add a test suite for folder delete method.
13277
13278	* testsuite/Makefile.am: Add new test cases.
13279	* testsuite/testsuite.at: Include fldel.at, add banners.
13280	* testsuite/atlocal.in: Define MH_SUPPORT and MAILDIR_SUPPORT
13281	variables depending on whether the corresponding mailbox format
13282	is enabled.
13283	* testsuite/fldel.at: New test case.
13284	* testsuite/mbdel.at: Skip tests which rely on disabled mailbox
13285	formats.
13286
132872011-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
13288
13289	Share folder implementation between mbox, mh and maildir.  Fix
13290	mu_folder_delete.
13291
13292	* include/mailutils/folder.h (_mu_fsfolder_init): New proto.
13293	* include/mailutils/mailbox.h (mu_mailbox_create_at): New
13294	proto.
13295	* libmailutils/mailbox/mailbox.c (mu_mailbox_create_at): New
13296	function.
13297	* libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add
13298	fsfolder.c
13299	* libmailutils/mailbox/folder.c (mu_folder_delete): If folder
13300	does not provide its own method for deletion, use
13301	mu_mailbox_remove. (mu_folder_open, mu_folder_close,
13302	mu_folder_enumerate) (mu_folder_lsub, mu_folder_subscribe,
13303	mu_folder_unsubscribe)
13304	(mu_folder_rename): Return EINVAL if folder is NULL.
13305	(mu_folder_match): Bugfix: don't pass folder flags to fnmatch.
13306	* libmailutils/mailbox/fsfolder.c: New file. Implementation of
13307	file-system based folders.
13308	* libmailutils/mailbox/mailbox (_create_mailbox0): Propagate
13309	error return from mu_registrar_lookup_url.
13310	* libmailutils/tests/fsfolder00.at: New test case.
13311	* libmailutils/tests/fsfolder01.at: New test case.
13312	* libmailutils/tests/fsfolder02.at: New test case.
13313	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
13314	fsfolder.
13315	(TESTSUITE_AT): Add fsfolder tests.
13316	* libmailutils/tests/testsuite.at: Include fsfolder tests.
13317	* libproto/mbox/folder.c: Use fsfolder.
13318	(_mh_is_scheme): Check file even if scheme matches.
13319	* libproto/maildir/folder.c: Likewise.
13320	(_maildir_is_scheme): Check file even if scheme matches.
13321	* libproto/mh/folder.c: Likewise.
13322	* testsuite/fldel.c: New file.
13323	* testsuite/Makefile.am (noinst_PROGRAMS): Build fldel.
13324
133252011-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
13326
13327	Minor cleanup in imap client.
13328
13329	* include/mailutils/imap.h (mu_imap_session_state): Remove.
13330	(mu_imap_state): Rename to mu_imap_session_state.
13331	(mu_imap_state_str): Rename to mu_imap_session_state_str.
13332	* libproto/imap/create.c (mu_imap_session_state)
13333	(mu_imap_iserror,mu_imap_clearerr): Move to state.c
13334	* mu/imap.c: Update accordingly.
13335
133362011-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
13337
13338	imap client: implement folder API.
13339
13340	* libmailutils/list/listlist.c (mu_list_append_list): Do
13341	nothing if the source list is empty.
13342	* include/mailutils/sys/imap.h (_mu_imap_url_init)
13343	(_mu_imaps_url_init): New protos.
13344	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Restore
13345	url.c
13346	* libproto/imap/mbox.c: Deleted
13347	* libproto/imap/url.c: Rewrite.
13348	* libproto/imap/folder.c: Rewrite from scratch.
13349	* configure.ac: Build libproto/imap/tests/Makefile
13350	* include/mailutils/imap.h (mu_imap_session_state)
13351	(mu_imap_iserror, mu_imap_clearerr)
13352	(mu_imap_login_secret): New protos.
13353	* include/mailutils/sys/imap.h (_mu_imap_list_element_is_nil):
13354	New proto.
13355	* libmailutils/mailbox/folder.c (mu_folder_list): Pass
13356	MU_FOLDER_ATTRIBUTE_ALL.
13357	* libproto/imap/fake-folder.c: Remove.
13358	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Remove
13359	fake-folder.c Add url.c and folder.c
13360	* libproto/imap/create.c (mu_imap_session_state)
13361	(mu_imap_iserror, mu_imap_clearerr): New functions.
13362	* libproto/imap/delete.c: Check input parameters.
13363	* libproto/imap/fetch.c: Use _mu_imap_list_element_is_nil to
13364	check for empty lists.
13365	* libproto/imap/genlist.c: Likewise.
13366	* libproto/imap/rename.c: Likewise.
13367	* libproto/imap/subscribe.c: Likewise.
13368	* libproto/imap/unsubscribe.c: Likewise.
13369	* libproto/imap/resplist.c: Treat NIL and () equally.
13370	* libproto/imap/login.c (mu_imap_login_secret): New function.
13371	* mu/imap.c: Fix a typo.
13372
133732011-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
13374
13375	Implement UID command in mu imap.
13376
133772011-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
13378
13379	Imap client: implement starttls.
13380
13381	* include/mailutils/imap.h (mu_imap_starttls): New proto.
13382	* include/mailutils/imapio.h: Use mu_imapio_t instead of struct
13383	_mu_imapio *.
13384	* include/mailutils/sys/imap.h (MU_IMAP_CLIENT_STARTTLS_RX):
13385	New state.
13386	* libmailutils/imapio/transport.c: New file.
13387	* libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add
13388	transport.c
13389	* libproto/imap/starttls.c: New file.
13390	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add
13391	starttls.c.
13392	* libproto/imap/capability.c (mu_imap_capability): Bugfix: set
13393	up comparator and reclaim function after successful return from
13394	mu_list_map.
13395	* libproto/imap/capatst.c (mu_imap_capability_test): Clear
13396	MU_IMAP_RESP bit.
13397	* libproto/imap/err.c (mu_imap_strerror): Return errstr only if
13398	MU_IMAP_RESP is set.
13399	* mu/imap.c: Implement starttls.
13400
134012011-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
13402
13403	Imap client: implement LSUB.
13404
13405	LSUB is pretty similar to LIST, therefore it is implemented as
13406	a wrapper over the latter.
13407
13408	* include/mailutils/imap.h
13409	(mu_imap_genlist,mu_imap_genlist_new)
13410	(mu_imap_lsub,mu_imap_lsub_new): New protos.
13411	* include/mailutils/sys/imap.h (MU_IMAP_CLIENT_LSUB_RX): New
13412	state.
13413	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add new
13414	files.
13415	* libproto/imap/genlist.c: New file.
13416	* libproto/imap/list.c: Rewrite using generalized list
13417	functions.
13418	* libproto/imap/lsub.c: New file.
13419	* mu/imap.c: Implement lsub.
13420
134212011-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
13422
13423	Imap client: Implement SUBSCRIBE and UNSUBSCRIBE.
13424
13425	* include/mailutils/imap.h (mu_imap_subscribe)
13426	(mu_imap_unsubscribe): New protos.
13427	* include/mailutils/sys/imap.h (MU_IMAP_CLIENT_SUBSCRIBE_RX)
13428	(MU_IMAP_CLIENT_UNSUBSCRIBE_RX): New states.
13429	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add
13430	subscribe.c and unsubscribe.c
13431	* libproto/imap/subscribe.c: New file.
13432	* libproto/imap/unsubscribe.c: New file.
13433	* mu/imap.c: Implement subscribe/unsubscribe.
13434
134352011-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
13436
13437	Imap client: quote command arguments as necessary.
13438
13439	* include/mailutils/imapio.h (mu_imapio_send_command)
13440	(mu_imapio_send_command_e,mu_imapio_send_command_v)
13441	(mu_imapio_last_error,mu_imapio_clearerr): New protos.
13442	* include/mailutils/sys/imap.h (imap_command)<uid>: Remove.
13443	<extra>: New member.
13444	* libmailutils/imapio/Makefile.am (libimapio_la_SOURCES): Add
13445	new files.
13446	* libmailutils/imapio/qstring.c
13447	(mu_imapio_send_qstring_unfold): Improve functionality.
13448	* libmailutils/imapio/sendcmd.c: New file.
13449	* libmailutils/imapio/sendcmde.c: New file.
13450	* libmailutils/imapio/sendcmdv.c: New file.
13451	* libmailutils/imapio/errstate.c: New file.
13452	* libproto/imap/gencom.c (mu_imap_gencom): Use
13453	mu_imapio_send_command_v
13454	* libproto/imap/appstrsiz.c: Quote command arguments as
13455	necessary.
13456	* libproto/imap/capability.c: Likewise.
13457	* libproto/imap/check.c: Likewise.
13458	* libproto/imap/close.c: Likewise.
13459	* libproto/imap/copy.c: Likewise.
13460	* libproto/imap/delete.c: Likewise.
13461	* libproto/imap/expunge.c: Likewise.
13462	* libproto/imap/fetch.c: Likewise.
13463	* libproto/imap/list.c: Likewise.
13464	* libproto/imap/login.c: Likewise.
13465	* libproto/imap/mbcreate.c: Likewise.
13466	* libproto/imap/noop.c: Likewise.
13467	* libproto/imap/rename.c: Likewise.
13468	* libproto/imap/select.c: Likewise.
13469	* libproto/imap/store.c: Likewise.
13470	* libproto/imap/unselect.c: Likewise.
13471
134722011-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
13473
13474	Imap client: implement list.
13475
13476	* libmailutils/stdstream/basestr.c (mu_strout): Bugfix:
13477	initialize destroy function.
13478	* include/mailutils/imap.h (imap_command)
13479	(mu_imap_gencom): Move to sys/imap.h
13480	(mu_imap_list,mu_imap_list_new): New protos.
13481	* include/mailutils/sys/imap.h (imap_command): New struct (from
13482	../imap.h).
13483	<handler>: Rename to tagged_handler.
13484	(untagged_handler,untagged_handler_data): New members. All uses
13485	changed.
13486	(mu_imap_gencom): New proto.
13487	* libproto/imap/list.c: New file.
13488	* libproto/imap/Makefile.am: Add list.c
13489	* libproto/imap/gencom.c: Use supplied untagged_handler to
13490	analyze untagged response.
13491	* mu/imap.c: Implement list command.
13492
134932011-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
13494
13495	Bugfixes.
13496
13497	* libmu_sieve/sieve.y (mu_sieve_compile): Initialize rc.
13498	* python/libmu_py/sieve.c (api_sieve_machine_error_text): Fix
13499	type of length.
13500
135012011-12-13  Wojciech Polak  <polak@gnu.org>
13502
13503	Improve Python API. Add MemoryStream class.
13504
13505	* python/libmu_py/sieve.c (api_sieve_machine_init): Improve.
13506	(api_sieve_machine_error_text): Add new function.
13507	* python/libmu_py/stream.c (api_memory_stream_create):
13508	Likewise.
13509	(api_stream_to_message): Likewise.
13510	* python/mailutils/error.py (Error): Add optional str_error
13511	argument.
13512	* python/mailutils/sieve.py: Update.
13513	* python/mailutils/stream.py (to_message): Add new method.
13514	(MemoryStream): Add new class.
13515
135162011-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
13517
13518	Minor changes.
13519
13520	* libmailutils/datetime/streamftime.c (mu_c_streamftime):
13521	Handle %Z separately.
13522	* libmu_sieve/sieve.y (mu_sieve_compile): Return MU_ERR_PARSE
13523	on errors.
13524
135252011-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
13526
13527	Fix possible output buffer overflow in base64 encoder.
13528
13529	* libmailutils/filter/base64.c (_base64_encoder): Continue
13530	after incrementing nbytes.
13531	* mh/mhn.c: Additional error checking.
13532
135332011-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
13534
13535	Fix declaration of mu_sieve_vlist_do in libmu_sieve.
13536
135372011-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
13538
13539	Initialize standard I/O streams statically.
13540
13541	This allows programmers to use them right away, much like their
13542	stdio counterparts. The mu_stdstream_setup and friends can be
13543	used to re-initialize them, should the need be.
13544
13545	* include/mailutils/sys/file_stream.h
13546	(_MU_FILE_STREAM_STATIC_FILENAME): New flag.
13547	(_mu_file_stream_setup): New proto.
13548	* include/mailutils/sys/logstream.h (_mu_log_stream_setup): New
13549	proto.
13550	* include/mailutils/sys/stream.h (_MU_STR_EVENT_BOOTSTRAP): New
13551	event code.
13552	(_mu_stream) <destroy>: New method.
13553	* libmailutils/stdstream/basestr.c: Define the three standard
13554	streams statically, use bootstrap event to initialize them.
13555	* libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create):
13556	Accept tag==NULL.
13557	* libmailutils/stream/file_stream.c (fd_done): Do not free
13558	filename if _MU_FILE_STREAM_STATIC_FILENAME is set.
13559	(_mu_file_stream_setup): New function.
13560	* libmailutils/stream/logstream.c (NEXT): Check size before
13561	advancing buffer pointer.
13562	(_mu_log_stream_setup): New function.
13563	* libmailutils/stream/stream.c (_bootstrap_event): New macro.
13564	(mu_stream_destroy): If .destroy is defined, use it instead of
13565	free(2). (mu_stream_open,mu_stream_seek,mu_stream_set_buffer)
13566	(mu_stream_read,mu_stream_readdelim,mu_stream_getdelim)
13567	(mu_stream_write,mu_stream_size,mu_stream_wait)
13568	(mu_stream_truncate,mu_stream_shutdown): Call _bootstrap_event
13569	at the beginning.
13570	* libmailutils/tests/.gitignore: Add strin, strout.
13571	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add strin,
13572	strout.
13573	(TESTSUITE_AT): Add stdstream tests.
13574	* libmailutils/tests/testsuite.at: Include stdstream tests.
13575	* libmailutils/tests/strerr.at: New test case.
13576	* libmailutils/tests/strin.at: Likewise.
13577	* libmailutils/tests/strout.at: Likewise.
13578	* libmailutils/tests/strin.c: New test program.
13579	* libmailutils/tests/strout.c: Likewise.
13580
135812011-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
13582
13583	Bugfix in imap4d.
13584
13585	* imap4d/util.c (util_getfullpath): Use mu_stpcpy.
13586
135872011-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
13588
13589	Fix UID generation in mboxes (complements f9a034c7)
13590
13591	* libproto/mbox/mboxscan.c (mbox_scan_internal): Fix UID
13592	generation.
13593	* testsuite/lstuid.c: New test program.
13594	* testsuite/lstuid00.at: New test case.
13595	* testsuite/lstuid01.at: Likewise.
13596	* testsuite/lstuid02.at: Likewise.
13597	* testsuite/Makefile.am: Add new test cases.
13598	* testsuite/testsuite.at: Likewise.
13599
136002011-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
13601
13602	Bugfix in libmu_sieve.
13603
13604	* libmu_sieve/sieve.y (mu_sieve_machine_init_ex): Fix typo.
13605	Reference errstream, not mu_strerr.
13606
136072011-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13608
13609	imap4d: remove functions duplicated in the library.
13610
13611	* imap4d/imap4d.h (util_format_attribute_flags)
13612	(util_attribute_to_type): Remove. All uses changed to
13613	mu_imap_format_flags and mu_imap_flag_to_attribute,
13614	respectively.
13615	(util_type_to_attribute): Remove.
13616
136172011-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13618
13619	Redo message set parser in imap4d.
13620
13621	The new parser complies to RFC3501. Its output message sets are
13622	formatted as MU lists of non-overlapping contiguous message
13623	ranges, which reduces memory consumption and imposes less
13624	strain on CPU. The parser automatically translates message UIDs
13625	to sequence numbers and provides better error handling.
13626
13627	* imap4d/imap4d.h (util_msgset): Remove.
13628	(util_parse_msgset): New proto.
13629	(imap4d_message_action_t): New typedef.
13630	(util_foreach_message): New proto.
13631	* imap4d/util.c (util_msgset): Remove.
13632	(util_parse_msgset): New function.
13633	* imap4d/copy.c: Use util_parse_msgset to parse message set
13634	specs and util_foreach_message to iterate over the returned
13635	list.
13636	* imap4d/fetch.c: Likewise.
13637	* imap4d/search.c: Likewise.
13638	* imap4d/store.c: Likewise.
13639	* imap4d/tests/IDEF0955.at: Update the test.
13640	* include/mailutils/list.h (mu_list_action_t): Fix typedef.
13641	* libmailutils/list/foreach.c (mu_list_foreach)
13642	(mu_list_do): Update signatures.
13643
136442011-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13645
13646	Make sure mu_mailbox_get_message returns MU_ERR_NOENT if the
13647	requested message number is not found in the mailbox.
13648
13649	* libmailutils/base/amd.c (amd_get_message): Return
13650	MU_ERR_NOENT if msgno is not found in the mailbox, but not if
13651	it is 0, in which case return EINVAL.
13652	* libproto/mbox/mbox.c (mbox_get_message): Likewise.
13653	* libproto/pop/mbox.c (pop_create_pop3_message): Likewise.
13654	* libproto/mbox/mboxscan.c (mbox_scan_internal): Fix
13655	calculation of UIDs.
13656
136572011-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13658
13659	Bugfix in mu_list_sort.
13660
13661	* libmailutils/list/sort.c (_list_qsort): Fix end-of-list
13662	condition.
13663
136642011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13665
13666	Use UTC in From_ separators in accordance with RFC 4155.
13667
13668	* examples/mta.c (make_tmp): Use gmtime + mu_c_streamftime to
13669	create From_ line.
13670	* libmailutils/mailbox/msgenv.c (message_envelope_date): Use
13671	gmtime.
13672	* maidag/deliver.c (make_tmp): Likewise.
13673	* maidag/lmtp.c (cfun_data): Likewise.
13674	* readmsg/readmsg.c (print_unix_header): Use gmtime.
13675
136762011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13677
13678	New function mu_datetime_tz_local.
13679
13680	The function initializes mu_timezone structure to the local
13681	timezone.
13682
13683	* include/mailutils/datetime.h (mu_utc_offset): Change return
13684	type.
13685	(mu_datetime_tz_local): New proto.
13686	* libmailutils/datetime/tzlocal.c: New file.
13687	* libmailutils/datetime/Makefile.am: Add new file.
13688	* libmailutils/datetime/scantime.c (mu_scan_datetime): Use
13689	mu_datetime_tz_local to initialize local TZ.
13690	* mh/mh_format.c (_parse_date): Likewise.
13691	* libmailutils/datetime/utcoff.c (mu_utc_offset): Returns int.
13692	* libmu_sieve/actions.c (mime_create_ds): Use mu_c_streamftime
13693	to format time directly to stream.
13694
136952011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13696
13697	Rename mu_tm2time to mu_datetime_to_utc.
13698
136992011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13700
13701	Bugfixes.
13702
13703	* imap4d/append.c: Don't reuse msg variable.
13704	* po/POTFILES.in: Remove unneeded file.
13705
137062011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13707
13708	Revamp date/time calculations.
13709
13710	* configure.ac: Build libmailutils/datetime/Makefile.am
13711	* include/mailutils/datetime.h (mu_datetime_julianday)
13712	(mu_datetime_dayofweek,mu_datetime_dayofyear)
13713	(mu_datetime_year_days): New protos.
13714	* libmailutils/Makefile.am (SUBDIRS): Add datetime
13715	(libmailutils_la_LIBADD): Add libdatetime.la
13716	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove
13717	date.c and strftime.c.
13718	* libmailutils/base/date.c: Remove.
13719	* libmailutils/base/strftime.c: Move to libmailutils/datetime
13720	* libmailutils/datetime/Makefile.am: New file.
13721	* libmailutils/datetime/dow.c: New file.
13722	* libmailutils/datetime/doy.c: New file.
13723	* libmailutils/datetime/jd.c: New file.
13724	* libmailutils/datetime/scantime.c: New file.
13725	* libmailutils/datetime/streamftime.c: New file.
13726	* libmailutils/datetime/tab.c: New file.
13727	* libmailutils/datetime/unixtime.c: New file.
13728	* libmailutils/datetime/utcoff.c: New file.
13729	* libmailutils/datetime/yd.c: New file.
13730	* libmailutils/tests/scantime.at: Fix yday numbers.
13731
137322011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13733
13734	Move date/time declarations into a separate header:
13735	mailutils/datetime.h.
13736
13737	Additionally, do not typedef mu_timezone, leave it in struct
13738	namespace.
13739
137402011-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
13741
13742	imap client: implement CREATE and APPEND. Fix APPEND in imap4d.
13743
13744	* imap4d/append.c (imap4d_append0): Use
13745	mu_message_from_stream_with_envelope with crafted envelope. The
13746	effect is that the envelope of the message always reflects the
13747	actual sender, as deduced from the header (X-Envelope-Sender,
13748	Sender, From, in that order) and the date given with the APPEND
13749	command (or current date/time, if not given).
13750	* imap4d/tests/append00.at: Reflect changes in the envelope.
13751	* imap4d/tests/append01.at: Likewise.
13752	* imap4d/io.c (io_format_completion_response): Call imap4d_sync
13753	to emit eventual non-tagged responses before the tagged one.
13754	* include/mailutils/envelope.h (mu_envelope_set_destroy): New
13755	proto.
13756	* include/mailutils/header.h (MU_HEADER_SENDER): Remove
13757	duplicate define.
13758	* include/mailutils/imap.h (mu_imap_mailbox_create)
13759	(mu_imap_append_stream_size,mu_imap_append_stream)
13760	(mu_imap_append_message,mu_imapio_send_flags)
13761	(mu_imapio_send_time): New protos.
13762	* include/mailutils/imapio.h (mu_imapio_send_literal): Remove
13763	proto. (mu_imapio_send_literal_string)
13764	(mu_imapio_send_literal_stream): New protos.
13765	* include/mailutils/message.h
13766	(mu_message_from_stream_with_envelope): New proto.
13767	* include/mailutils/sys/imap.h (MU_IMAP_CLIENT_APPEND_RX): New
13768	state.
13769	* include/mailutils/sys/message_stream.h (_mu_message_stream)
13770	<envelope>: Rename to envelope_string.
13771	<construct_envelope>: New member.
13772	* libmailutils/imapio/literal.c: Remove.
13773	* libmailutils/imapio/litstream.c: New file.
13774	* libmailutils/imapio/litstring.c: New file.
13775	* libmailutils/imapio/time.c: New file.
13776	* libmailutils/imapio/Makefile.am: Add new files.
13777	* libmailutils/imapio/flags.c (mu_imapio_send_flags): New
13778	function.
13779	* libmailutils/imapio/qstring.c
13780	(mu_imapio_send_qstring_unfold): Use
13781	mu_imapio_send_literal_string.
13782	* libmailutils/mailbox/envelope.c (mu_envelope_set_destroy):
13783	New function.
13784	* libmailutils/stream/message_stream.c
13785	(mu_message_from_stream_with_envelope): New function.
13786	(mu_stream_to_message): Rewrite as an alternative entry point
13787	to the above.
13788	* libproto/imap/Makefile.am: Add new files.
13789	* libproto/imap/appmsg.c: New file.
13790	* libproto/imap/appstr.c: New file.
13791	* libproto/imap/appstrsiz.c: New file.
13792	* libproto/imap/mbcreate.c: New file.
13793	* mu/imap.c: Implement create and append.
13794
137952011-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
13796
13797	imap client: implement STORE, DELETE, RENAME, CHECK, EXPUNGE,
13798	COPY, CLOSE and UNSELECT.
13799
13800	* include/mailutils/imap.h (imap_command): New struct.
13801	(mu_imap_gencom): New function. (mu_imap_store,mu_imap_delete)
13802	(mu_imap_rename,mu_imap_mailbox_close,mu_imap_close)
13803	(mu_imap_check): New functions.
13804	(_mu_close_handler): New function.
13805	* include/mailutils/sys/imap.h (mu_imap_client_state): Add new
13806	states.
13807	* libproto/imap/gencom.c: New file.
13808	* libproto/imap/close.c: New file.
13809	* libproto/imap/delete.c: New file.
13810	* libproto/imap/rename.c: New file.
13811	* libproto/imap/store.c: New file.
13812	* libproto/imap/unselect.c: New file.
13813	* libproto/imap/check.c: New file.
13814	* libproto/imap/expunge.c: New file.
13815	* libproto/imap/copy.c: New file.
13816	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add new
13817	files.
13818	* mu/imap.c: Implement new commands.
13819	* mu/shell.c (execute_line): Treat backslash as escape only
13820	before another backslash or double-quote.
13821
138222011-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
13823
13824	imap4d: CLOSE should not send EXPUNGE responses. Fix error
13825	checking in STORE.
13826
13827	* imap4d/imap4d.h (silent_expunge): New global.
13828	* imap4d/sync.c (silent_expunge): New variable.
13829	(action): Suppress EXPUNGE responses if silent_expunge is set.
13830	* imap4d/close.c (imap4d_close0): Set silent_expunge before
13831	calling mu_mailbox_flush.
13832	* imap4d/tests/close-expunge.at: New test.
13833	* imap4d/tests/testsuite.at: Include close-expunge.at.
13834	* imap4d/tests/Makefile.am (TESTSUITE_AT): Add
13835	close-expunge.at.
13836	* imap4d/fetch.c (fetch_thunk): Emit BAD response if failed to
13837	parse message set.
13838	* imap4d/store.c (store_thunk): Emit BAD response if failed to
13839	parse flags.
13840
138412011-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
13842
13843	Minor change.
13844
138452011-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
13846
13847	Improve mu_scan_datetime.
13848
13849	* libmailutils/base/date.c (mu_scan_datetime): Handle optional
13850	blocks (%[ %| %], alternatives %( %| %), "any character"
13851	wildcards (%?) and strict character matches (%\C). Return
13852	MU_ERR_FORMAT on errors in format string. Compute tm->tm_yday.
13853	* libmailutils/diag/errors (MU_ERR_FORMAT): New error code.
13854	* libmailutils/tests/scantime.c: Print yday. Print input line
13855	with diagnostic messages.
13856	* libmailutils/tests/scantime.at: Add more tests.
13857	* include/mailutils/util.h (MU_DATETIME_RFC822): Split into two
13858	formats: MU_DATETIME_FORM_RFC822, for output formatting, and
13859	MU_DATETIME_SCAN_RFC822 for input scanning. All uses changed.
13860
138612011-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
13862
13863	Use list LIFO access where appropriate.
13864
13865	* libmu_sieve/runtime.c (_mu_sv_instr_push)
13866	(_mu_sv_instr_pop): Use mu_list_push and mu_list_pop.
13867	* mail/alias.c (recursive_alias_expand): Likewise.
13868
138692011-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
13870
13871	Implement LIFO access functions for lists.
13872
13873	* include/mailutils/list.h (mu_list_push)
13874	(mu_list_pop): New functions.
13875	* libmailutils/list/pop.c: New file.
13876	* libmailutils/list/push.c: New file.
13877	* libmailutils/list/Makefile.am (liblist_la_SOURCES): Add new
13878	files.
13879	* libmailutils/tests/list.at: Test LIFO access.
13880	* libmailutils/tests/listop.c: Implement push & pop.
13881
138822011-12-05  Sergey Poznyakoff  <gray@gnu.org.ua>
13883
13884	Bugfixes.
13885
13886	* imap4d/util.c (util_parse_internal_date): Use
13887	MU_DATETIME_INTERNALDATE format.
13888	* include/mailutils/util.h (MU_DATETIME_IMAP_SEARCH): Rename to
13889	MU_DATETIME_INTERNALDATE (previous incorrect definition
13890	removed).
13891	(MU_DATETIME_RFC822): New format.
13892	* libmailutils/address/address.c: Accessors for local_part and
13893	domain invalidate email field.
13894	(validate_email): New static function.
13895	(mu_address_sget_email): Reconstruct email, if necessary.
13896	(mu_address_format_string): Likewise.
13897	* libmailutils/base/date.c (mu_c_streamftime): Allow for %$
13898	specifier for compatibility with mu_scan_datetime.
13899	(mu_scan_datetime): Use %$ to indicate optional end of string.
13900	* libmailutils/tests/scantime.at: Update.
13901	* libproto/imap/fetch.c (_fill_response): Use
13902	MU_DATETIME_RFC822 format.
13903	* mu/imap.c (fetch_response_printer): Print subject.
13904
139052011-12-05  Sergey Poznyakoff  <gray@gnu.org.ua>
13906
13907	Implement mu_scan_datetime.
13908
13909	* include/mailutils/stream.h (mu_fixed_memory_stream_create):
13910	New proto.
13911	* libmailutils/stream/memory_stream.c
13912	(mu_fixed_memory_stream_create): New function.
13913	* include/mailutils/util.h (mu_parse_imap_date_time)
13914	(mu_parse_ctime_date_time): Remove.
13915	(mu_scan_datetime): New proto.
13916	(mu_strftime): Remove const from the last arg.
13917	(MU_DATETIME_FROM,MU_DATETIME_IMAP)
13918	(MU_DATETIME_IMAP_SEARCH,MU_DATETIME_INTERNALDATE): New
13919	defines.
13920	* libmailutils/base/strftime.c: New file.
13921	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add
13922	strftime.c.
13923	* libmailutils/base/date.c (mu_scan_datetime): New function.
13924	* libmailutils/base/mutil.c (mu_strftime): Remove.
13925	* libmailutils/tests/scantime.at: New file.
13926	* libmailutils/tests/scantime.c: New file.
13927	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
13928	scantime.
13929	(TESTSUITE_AT): Add scantime.at.
13930	* libmailutils/tests/strftime.c (main): Call
13931	mu_set_program_name.
13932	* libmailutils/tests/testsuite.at: Include scantime.at
13933	* libmu_sieve/actions.c (mime_create_reason): Use
13934	mu_c_streamftime.
13935	* imap4d/fetch.c (_frt_internaldate): Use mu_scan_datetime.
13936	* imap4d/util.c (util_parse_internal_date): Likewise.
13937	* libmu_scm/mu_message.c (mu-message-get-envelope-date):
13938	Likewise.
13939	* libproto/imap/fetch.c (_date_mapper): Likewise.
13940	* mail/from.c (hdr_date): Use mu_scan_datetime.
13941
139422011-12-05  Sergey Poznyakoff  <gray@gnu.org.ua>
13943
13944	Implement locale-independent strftime function.
13945
13946	* include/mailutils/util.h (mu_c_streamftime): New prototype.
13947	* libmailutils/base/date.c (mu_c_streamftime): New function.
13948	* libmailutils/tests/.gitignore: Update.
13949	* libmailutils/tests/strftime.at: New test script.
13950	* libmailutils/tests/strftime.c: New test program.
13951	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
13952	strftime.
13953	(TESTSUITE_AT): Add strftime.at.
13954	* libmailutils/tests/testsuite.at: Include strftime.at.
13955
139562011-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
13957
13958	Split ibmailutils/mailbox/message.c into logically separated
13959	and easily manageable parts.
13960
139612011-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
13962
13963	mail: Use new list functions to simplify vartab-related
13964	operations.
13965
13966	* mail/mailvar.c (_mailvar_symbol_to_array): Remove.
13967	(_mailvar_symbol_to_list): New function.
13968	(mailvar_make_array): Remove.
13969	(mailvar_list_copy): New function.
13970	(mailvar_iterator)<varptr,varcnt,pos>: Remove.
13971	<varlist,varitr>: New members.
13972	(mailvar_iterate_next): Use subordinate iterator.
13973	(mailvar_iterate_first): Likewise.
13974	(mailvar_print): Use mailvar_make_array.
13975
139762011-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
13977
13978	MH: minor change in folder.
13979
13980	* mh/folder.c: Use mu_list_t instead of obstack to keep folder
13981	list.
13982
139832011-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
13984
13985	Implement list sorting.
13986
13987	* include/mailutils/list.h (mu_list_sort): New proto.
13988	* libmailutils/list/sort.c: New file.
13989	* libmailutils/list/Makefile.am (liblist_la_SOURCES): Add
13990	sort.c
13991	* libmailutils/tests/listop.c: Implement the sort command.
13992	* libmailutils/tests/list.at: Test list sorting.
13993
139942011-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
13995
13996	imap client: improve parsing of BODY[] items.
13997
13998	* include/mailutils/imap.h (mu_imap_fetch_body) <key>: Rename
13999	to section.
14000	<fields>: New member.
14001	* libproto/imap/fetch.c: Rewrite response item parser.
14002	* mu/imap.c: Improve fetch_response_printer
14003
140042011-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
14005
14006	Implement list folding functions.
14007
14008	* include/mailutils/list.h (mu_list_folder_t): New typedef.
14009	(mu_list_fold, mu_list_rfold): New functions.
14010	* libmailutils/list/fold.c: New file.
14011	* libmailutils/list/rfold.c: New file.
14012	* libmailutils/list/Makefile.am (liblist_la_SOURCES): Add
14013	fold.c and rfold.c
14014	* libmailutils/list/gmap.c (mu_list_gmap): Access list elements
14015	directly, instead of using iterators.
14016	* libmailutils/tests/list.at: Add test cases for list folding.
14017	* libmailutils/tests/listop.c: Add fold and rfold commands.
14018
140192011-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
14020
14021	Clean-up state changes in imap client.	Fix error handling in
14022	it and in pop3.
14023
14024	* include/mailutils/imap.h (mu_imap_state): Rename to struct
14025	mu_imap_session_state, prefix all values with MU_IMAP_STATE_.
14026	All uses updated.
14027	* include/mailutils/sys/imap.h (mu_imap_client_state): Prefix
14028	all values with MU_IMAP_CLIENT. Rename MU_IMAP_NO_STATE to
14029	MU_IMAP_READY. All uses updated.
14030	(_mu_imap)<state>: Rename to client_state, fix data type.
14031	(imap_state): Rename to imap_state. All uses updated.
14032	(MU_IMAP_CHECK_EAGAIN): Reset state to MU_IMAP_CLIENT_READY if
14033	MU_ERR_REPLY or MU_ERR_BADREPLY is reported.
14034	* include/mailutils/sys/pop3.h (MU_POP3_CHECK_EAGAIN): Reset
14035	state to MU_POP3_NO_STATE, if MU_ERR_REPLY or MU_ERR_BADREPLY
14036	is reported.
14037	* libproto/imap/fetch.c (_date_mapper): Avoid overwriting
14038	resp->type.
14039	* libproto/imap/select.c (_mu_imap_collect_flags): Initialize
14040	*res prior to collecting flags into it.
14041	* mu/imap.c: Install a FETCH callback.
14042
140432011-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
14044
14045	imap client: initial implementation of fetch.
14046
14047	* include/mailutils/imap.h (mu_imap_fetch): New proto.
14048	(MU_IMAP_CB_FETCH): New callback code.
14049	(MU_IMAP_FETCH_BODY,MU_IMAP_FETCH_BODYSTRUCTURE)
14050	(MU_IMAP_FETCH_ENVELOPE,MU_IMAP_FETCH_FLAGS)
14051	(MU_IMAP_FETCH_INTERNALDATE,MU_IMAP_FETCH_RFC822_SIZE)
14052	(MU_IMAP_FETCH_UID): New constants.
14053	(mu_imap_fetch_body,mu_imap_fetch_bodystructure)
14054	(mu_imap_fetch_envelope,mu_imap_fetch_flags)
14055	(mu_imap_fetch_internaldate,mu_imap_fetch_rfc822_size)
14056	(mu_imap_fetch_uid,mu_imap_fetch_response): New structures.
14057	* include/mailutils/sys/imap.h (MU_IMAP_SET_XSCRIPT_MASK)
14058	(MU_IMAP_CLR_XSCRIPT_MASK): New macros.
14059	(mu_imap_client_state)<MU_IMAP_FETCH_RX>: New state.
14060	(_mu_imap_list_nth_element_is_string): New proto.
14061	* libproto/imap/fetch.c: New file.
14062	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add
14063	fetch.c
14064	* libproto/imap/carrier.c (mu_imap_set_carrier): Update call to
14065	mu_imapio_create.
14066	* libproto/imap/resplist.c
14067	(_mu_imap_list_nth_element_is_string): New function.
14068	* libproto/imap/resproc.c (_process_unsolicited_response):
14069	Handle FETCH response.
14070	* libproto/imap/trace.c (mu_imap_trace_mask): Call
14071	mu_imapio_trace_payload if needed.
14072	* mu/imap.c (imap_bad_callback): New function.
14073	(com_disconnect): Register imap_bad_callback.
14074	(com_fetch): New function.
14075	(imap_comtab): Add the "fetch" command.
14076	* mu/mu.h (mutool_command) <flags>: New member.
14077	* mu/pop.c (pop_comtab): Update initializers.
14078	* mu/shell.c (default_comtab): Update initializers.
14079	(execute_line): Rewrite using incremental wordsplit. This
14080	allows for optionally coalescing arguments with indices >=
14081	argmax into one argument. This is useful for such commands as
14082	"prompt" and "fetch".
14083
140842011-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
14085
14086	Add a function for creating an empty email address object.
14087
14088	* include/mailutils/address.h (mu_address_create_null): New
14089	proto.
14090	* libmailutils/address/address.c (mu_address_create_null): New
14091	function.
14092
140932011-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
14094
14095	imapio: fix payload tracing and handling of continuation
14096	responses.
14097
14098	* include/mailutils/imapio.h (mu_imapio_create): Change
14099	signature. All uses updated.
14100	(mu_imapio_trace_payload,mu_imapio_get_trace_payload): New
14101	protos.
14102	* include/mailutils/sys/imapio.h (_mu_imapio) <_imap_server>
14103	<_imap_trace_payload>: New bits.
14104	* libmailutils/imapio/create.c (mu_imapio_create): Take three
14105	arguments, the third one specifying whether the imapio object
14106	is intended for server or client.
14107	* libmailutils/imapio/getline.c (initial_parse): In server
14108	mode, parse everything at once. Handle continuation responses
14109	in client mode.
14110	(mu_imapio_getline): Toggle MU_XSCRIPT_PAYLOAD only if
14111	requested.
14112	* libmailutils/imapio/literal.c: Wait for continuation response
14113	(in client mode).
14114	* libmailutils/imapio/trace.c (mu_imapio_trace_payload)
14115	(mu_imapio_get_trace_payload): New functions.
14116	* libmailutils/tests/imapio.c: New option -server.
14117	* libmailutils/tests/imapio.at: Update literal tests.
14118
141192011-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
14120
14121	Bugfix.
14122
14123	* libmailutils/imapio/getline.c (mu_imapio_getline): Fix the
14124	call to realloc.
14125
141262011-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
14127
14128	Imap4d: fix handling of nested message/rfc822 parts.
14129
14130	* imap4d/fetch.c (fetch_runtime_closure) <msglist>: New member.
14131	(frt_register_message,frt_unregister_messages): New functions.
14132	(fetch_get_part_rfc822): Look into encapsulated rfc822
14133	messages. (_frt_body_text,_frt_header)
14134	(_frt_header_fields): Use frt_unregister_messages.
14135	(imap4d_fetch0): Initialize all fields in struct
14136	fetch_runtime_closure. Destroy msglist when finished using it.
14137	* imap4d/tests/fetch.at: Add test cases for nested
14138	message/rfc822.
14139	* testsuite/spool/msg.mbox: Add a message with nested
14140	message/rfc822 part.
14141
141422011-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
14143
14144	Update ignored file list.
14145
14146	* scheme/.gitignore: Update
14147
141482011-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
14149
14150	Fix a bug in imap4d parser, add more tests.
14151
14152	* imap4d/io.c (gettok): Fix memory overwrite.
14153	* imap4d/tests/fetch.at: Add checks for HEADER, HEADER.FIELDS,
14154	HEADER.FIELDS.NOT, and TEXT applied to message/rfc822 parts.
14155	* testsuite/spool/msg.mbox: New file.
14156	* testsuite/spool/DISTFILES: Add msg.mbox.
14157
141582011-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
14159
14160	imap4d: reimplement fetch tests in Autotest.  Remove
14161	DejaGNU-based testsuite.
14162
14163	* configure.ac: Update.
14164	* imap4d/Makefile.am (SUBDIRS): Remove testsuite.
14165	* imap4d/fetch.c (fetch_thunk): Add a FIXME reference.
14166	* imap4d/tests/fetch.at: New file.
14167	* imap4d/tests/Makefile.am (TESTSUITE_AT): Add fetch.at
14168	* imap4d/tests/testsuite.at: Include fetch.at
14169	* imap4d/tests/atlocal.in (fixup_tz): New filter.
14170	* imap4d/tests/Makefile.am (EXTRA_DIST): Remove unexisting
14171	file.
14172	* imap4d/testsuite: Remove
14173
141742011-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
14175
14176	Minor fix.
14177
141782011-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
14179
14180	imap4d: reimplement append tests.
14181
14182	* imap4d/tests/Makefile.am (TESTSUITE_AT): Add append00.at and
14183	append01.at
14184	* imap4d/tests/testsuite.at: Include append tests.
14185	* imap4d/tests/append00.at: New file.
14186	* imap4d/tests/append01.at: New file.
14187
141882011-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
14189
14190	imap4d: rewrite testsuite in Autotest.
14191
14192	* configure.ac (IMAP_AUTHOBJS): Remove subst variable. Use
14193	conditional instead. Configure imap4d/tests for testing. Build
14194	imap4d/tests/Makefile and imap4d/tests/atlocal.
14195	* imap4d/Makefile.am (SUBDIRS): Add tests.
14196	[MU_COND_GSASL]: Define AUTH_GSASL
14197	[MU_COND_GSSAPI]: Define AUTH_GSSAPI
14198	(imap4d_SOURCES): Include AUTH_GSASL and AUTH_GSSAPI
14199	(imap4d_LDADD,imap4d_DEPENDENCIES): Remove reference to
14200	IMAP_AUTHOBJS.
14201	(EXTRA_DIST): Remove.
14202	* imap4d/tests/.gitignore: New file.
14203	* imap4d/tests/IDEF0955.at: New file
14204	* imap4d/tests/IDEF0956.at: New file
14205	* imap4d/tests/Makefile.am
14206	* imap4d/tests/anystate.at: New file
14207	* imap4d/tests/atlocal.in
14208	* imap4d/tests/create01.at: New file
14209	* imap4d/tests/create02.at: New file
14210	* imap4d/tests/examine.at: New file
14211	* imap4d/tests/expunge.at: New file
14212	* imap4d/tests/id.at: New file
14213	* imap4d/tests/list.at: New file
14214	* imap4d/tests/search.at: New file
14215	* imap4d/tests/select.at: New file
14216	* imap4d/tests/status.at: New file
14217	* imap4d/tests/testsuite.at: New file
14218	* imap4d/fetch.c (fetch_io): Improve range checking. If the
14219	requested number of bytes is greater than maximum, truncate it.
14220	* imap4d/imap4d.c: New option --test.
14221	(test_mode): New global variable.
14222	(imap4d_session_setup0): Fix improperly allocated automatic
14223	variable.
14224	(main): Call GSASL and GSSAPI initializations only if
14225	mu_gsasl_enabled() returns true.
14226	* imap4d/imap4d.h (test_mode): New extern.
14227	* imap4d/preauth.c: Do not complain about failed getpeername in
14228	test mode.
14229	* imap4d/select.c: Fix human-readable response texts.
14230	* include/mailutils/gsasl.h (mu_gsasl_module_data)<enable>: New
14231	member.
14232	(mu_gsasl_enabled): New proto.
14233	* libmailutils/mailbox/mailbox.c (mu_mailbox_flush):
14234	(mu_mailbox_append_message,mu_mailbox_sync)
14235	(mu_mailbox_expunge): Use MU_STREAM_WRITE instead of
14236	MU_STREAM_RDWR.
14237	* libmu_auth/gsasl.c (mu_gsasl_module_data): Fix
14238	initialization.
14239	(mu_gsasl_enabled): New function.
14240	* libmu_cfg/gsasl.c (mu_gsasl_param): New parameter "enable".
14241
142422011-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
14243
14244	imap4d: fix FETCH (BODYSTRUCTURE)
14245
14246	* imap4d/fetch.c (bodystructure): Do not emit CHARSET pair if
14247	there is none in the Content-Type header.
14248	(fetch_get_part_rfc822): Use mu_message_unencapsulate
14249	* libmailutils/mime/attachment.c (mu_message_unencapsulate):
14250	Use mu_stream_to_message to create destination message. This
14251	ensures that the latter can be handled by other MU functions
14252	(e.g. mu_header_* family).
14253
142542011-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
14255
14256	imap4d: Fix the functionality of FETCH BODY sections HEADER,
14257	TEXT and MIME.
14258
14259	According to RFC 3501 HEADER, HEADER.FIELDS, and
14260	HEADER.FIELDS.NOT part specifiers refer to the RFC-2822 header
14261	of the message or of an encapsulated MESSAGE/RFC822 message.
14262	They return NILs if applied to a MIME part other than
14263	MESSAGE/RFC822.
14264
14265	* imap4d/fetch.c (fetch_get_part_rfc822): New function.
14266	(_frt_body): Used only for BODY[]. Consequently, do not try to
14267	resolve message part, use the message itself instead.
14268	(_frt_body_n): New function.
14269	(_frt_mime): New function.
14270	(_frt_body_text,_frt_header,_frt_header_fields): Use
14271	fetch_get_part_rfc822. Unref the retrieved message when
14272	through.
14273	(parse_section_text): Use _frt_mime for BODY[<n>.MIME]
14274	(parse_section): Use _frt_body_n for BODY[<n>].
14275	* imap4d/testsuite/imap4d/fetch.exp: Remove incorrect tests.
14276
142772011-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
14278
14279	Change callback signature in imap client.
14280
14281	The purpose is to avoid using variadic calls in order to let
14282	the compiler do the necessary argument checking.
14283
14284	* include/mailutils/imap.h (mu_imap_callback_t): Take a pair of
14285	size_t and void * arguments instead of the single va_list.
14286	(mu_imap_callback): Likewise.
14287	* libproto/imap/callback.c: Likewise.
14288	* libproto/imap/resproc.c: Update callback calls.
14289	* mu/imap.c: Update callback declarations.
14290
142912011-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14292
14293	Add a test for non-synchronized imap literals.
14294
142952011-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14296
14297	Improve IMAP I/O module.  Add testcase.
14298
14299	* libmailutils/imapio/getline.c (initial_parse): New function.
14300	(mu_imapio_getline): Use initial_parse.
14301	* libmailutils/tests/imapio.c (main): Do not set progname.
14302	* libmailutils/tests/imapio.at: New file.
14303	* libmailutils/tests/Makefile.am: Add imapio.at.
14304	* libmailutils/tests/testsuite.at: Include imapio.at
14305
143062011-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14307
14308	Minor change.
14309
14310	* mu/shell.c: Output newline when EOF is received.
14311
143122011-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14313
14314	imap client: implement noop.
14315
14316	* include/mailutils/imap.h (mu_imap_noop): New proto.
14317	* include/mailutils/sys/imap.h (mu_imap_client_state)
14318	<MU_IMAP_NOOP_RX>: New state.
14319	* libproto/imap/noop.c: New file.
14320	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add noop.c
14321	* mu/imap.c (report_failure): New function.
14322	(com_login,select_mbox,com_status): Use report_failure for
14323	error reporting.
14324	(com_noop): New function.
14325	(imap_comtab)<noop>: New command.
14326
143272011-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14328
14329	Minor change.
14330
14331	* mu/imap.c: Add missing gettext markers.
14332
143332011-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14334
14335	Process untagged responses synchronously.
14336
14337	* include/mailutils/imap.h (mu_imap_response_action_t): Move to
14338	sys/imap.h
14339	(mu_imap_foreach_response): Remove.
14340	* include/mailutils/sys/imap.h (_mu_imap)<untagged_resp>:
14341	Remove. All sources updated.
14342	(_mu_imap_response): Change signature.
14343	(_mu_imap_untagged_response_clear)
14344	(_mu_imap_untagged_response_add): Remove.
14345	(_mu_imap_untagged_response_to_list)
14346	(_mu_imap_process_untagged_response): New protos.
14347	* libproto/imap/connect.c: Use
14348	_mu_imap_untagged_response_to_list and
14349	_mu_imap_process_untagged_response.
14350	* libproto/imap/create.c: Update.
14351	* libproto/imap/destroy.c: Update.
14352	* libproto/imap/disconnect.c: Update.
14353	* libproto/imap/capability.c: Update calls to _mu_imap_response
14354	* libproto/imap/id.c: Likewise.
14355	* libproto/imap/login.c: Likewise.
14356	* libproto/imap/logout.c: Likewise.
14357	* libproto/imap/select.c: Likewise.
14358	* libproto/imap/status.c: Likewise.
14359	* libproto/imap/resplist.c (_mu_imap_untagged_response_clear):
14360	Remove.
14361	(_mu_imap_untagged_response_add): Remove.
14362	(_mu_imap_untagged_response_to_list): New function.
14363	* libproto/imap/response.c (_mu_imap_response): Take
14364	response-processing function and its closure as arguments.
14365	* libproto/imap/resproc.c (_mu_imap_process_untagged_response):
14366	New function.
14367	(mu_imap_foreach_response): Remove.
14368	* mu/imap.c: Install a BYE callback.
14369
143702011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14371
14372	Change callback handling in imap client.
14373
14374	* include/mailutils/imap.h (MU_IMAP_CB_NO)
14375	(MU_IMAP_CB_BAD,MU_IMAP_CB_BYE)
14376	(MU_IMAP_CB_PREAUTH): New callbacks.
14377	(mu_imap_callback_t): Change signature.
14378	(mu_imap_callback): Change signature.
14379	* include/mailutils/sys/imap.h (mu_imap_client_state)
14380	<MU_IMAP_CLOSING>: New state.
14381	* libproto/imap/callback.c (mu_imap_callback): Change
14382	signature. Fix boundary check.
14383	(mu_imap_register_callback_function): Fix boundary check.
14384	* libproto/imap/connect.c (mu_imap_connect): Use
14385	mu_imap_foreach_response to parse response.
14386	* libproto/imap/response.c (_mu_imap_response): Check number of
14387	words before dereferencing them.
14388	* libproto/imap/resproc.c: Handle all server responses.
14389	* mu/imap.c (com_connect): Set POPAUTH callback. Set verbosity
14390	flags after I/O structure has been created.
14391
143922011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14393
14394	list: new operations: head and tail.
14395
14396	* include/mailutils/list.h (mu_list_head, mu_list_tail): New
14397	prototypes.
14398	* libmailutils/list/head.c: New file.
14399	* libmailutils/list/tail.c: New file.
14400	* libmailutils/list/Makefile.am (liblist_la_SOURCES): Add new
14401	files.
14402	* libmailutils/tests/listop.c (head,tail): New commands.
14403	* libmailutils/tests/list.at: Test head and tail.
14404
144052011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14406
14407	imap client: reflect changes to imapio parser.
14408
14409	* include/mailutils/sys/imap.h (_mu_imap_seterrstrz): New
14410	proto.
14411	* libmailutils/imapio/replstr.c: Update.
14412	* libproto/imap/err.c (_mu_imap_seterrstrz): New function.
14413	* libproto/imap/id.c: Remove superfluous calls to
14414	_mu_imap_seterrstr.
14415	* libproto/imap/login.c: Likewise.
14416	* libproto/imap/select.c: Likewise.
14417	* libproto/imap/status.c: Likewise.
14418	* libproto/imap/response.c: Set human-readable text as errstr.
14419	* libproto/imap/resproc.c (ok_response): Reflect changes to
14420	mu_imapio_getline.
14421
144222011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14423
14424	imapio: improve getline parser.
14425
14426	* libmailutils/imapio/create.c (mu_imapio_create): Treat [ and
14427	] as delimiters. Use MU_WRDSF_DQUOTE flag instead of
14428	MU_WRDSF_QUOTE. Use MU_WRDSF_APPEND
14429	* libmailutils/imapio/getline.c (mu_imapio_getline): Use
14430	incremental wordsplit mode. Return human-readable part of
14431	status responses as a single token.
14432
144332011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14434
14435	wordsplit: minor fix in return_delims mode.
14436
14437	* libmailutils/string/wordsplit.c (scan_word): Return only one
14438	delimiter if MU_WRDSF_RETURN_DELIMS is on
14439	* libmailutils/tests/wordsplit.at: Reflect that.
14440
144412011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14442
14443	wordsplit: add incremental mode.
14444
14445	* include/mailutils/wordsplit.h (MU_WRDSF_INCREMENTAL): New
14446	flag.
14447	(MU_WRDSE_NOINPUT): New error code.
14448	* libmailutils/string/wordsplit.c (mu_wordsplit_init0): New
14449	function.
14450	(mu_wordsplit_init): Call mu_wordsplit_init0.
14451	(expvar): Use MU_WRDSF_WS instead of MU_WRDSF_SQUEEZE_DELIMS in
14452	call to subordinate mu_wordsplit.
14453	(skip_delim): If both MU_WRDSF_RETURN_DELIMS and
14454	MU_WRDSF_SQUEEZE_DELIMS are given, squeeze only the same
14455	delimiter characters.
14456	* libmailutils/tests/wordsplit.at: Add tests for incremental
14457	mode.
14458	* libmailutils/tests/wsp.c: Support incremental mode.
14459
144602011-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
14461
14462	tls: do not generate DH params.
14463
14464	* libmu_auth/tls.c: Don't generate DH params at all.
14465
144662011-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
14467
14468	Enable GSASL by default.
14469
14470	* am/gsasl.m4 (MU_CHECK_GSASL): Enable GSASL by default. Other
14471	minor fixes.
14472	* am/tls.m4 (MU_CHECK_TLS): Rename to MU_CHECK_GNUTLS. Check
14473	option arguments. Check for gnutls library version.
14474	* configure.ac: Update.
14475	* README: Document the change.
14476	* NEWS: Document the change.
14477
144782011-11-22  Sergey Poznyakoff  <gray@gnu.org.ua>
14479
14480	Bugfixes.
14481
14482	* libmu_dbm/dbm.c (mu_dbm_create_from_url): Parameter list
14483	beginning with a negative parameter implies default safety
14484	criteria. Fix semantics of the "default" keyword: it is
14485	different from "all".
14486	* libmu_dbm/mudbm.h (DEFAULT_DBM_SAFETY_FLAGS): Remove. Not
14487	needed now.
14488	* pop3d/bulletin.c (read_bulletin_db): Remove a leftover call
14489	to mu_dbm_safety_set_flags.
14490
144912011-11-22  Sergey Poznyakoff  <gray@gnu.org.ua>
14492
14493	Implement new DBM dump format.
14494
14495	The new format, called "C", allows programmers to create input
14496	data for use by mu load using conventional means. It represents
14497	both key and content as C strings (hence its name), with usual
14498	C (literal and octal) escapes to represent non-printable
14499	characters.
14500
14501	* mu/dbm.c (IOBUF_REREAD,IOBUF_EOF): New constants.
14502	(iobuf) <state>: New member.
14503	(input_eof): New macro.
14504	(input_getline): Use iobuf.state to detect EOF.
14505	(input_ungetline): Reset state only if it is 0.
14506	(format_tab): New format "C".
14507	(write_quoted_string,C_writer,C_read_datum)
14508	(C_reader): New functions to implement the C dump format.
14509	* libmailutils/tests/testsuite.at: Minor change.
14510
145112011-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14512
14513	Version 2.99.95.
14514
145152011-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14516
14517	libmu_dbm: Functions for DB creation take default safety flags
14518	in their last argument.
14519
14520	* configure.ac (check_dbm_impl): Fix improper usage of expr in
14521	BDB=* case.
14522	* include/mailutils/dbm.h (mu_dbm_create_from_url)
14523	(mu_dbm_create): Take default safety flags as the last
14524	argument.
14525	* libmailutils/base/filesafety.c (_check_linkwrdir): Check for
14526	both hard and symbolic links. Fix the latter check.
14527	* libmailutils/tests/fsaf.at: Add check for softlink in a
14528	writable dir.
14529	* libmu_dbm/create.c (mu_dbm_create): Take default file safety
14530	as the last argument.
14531	* libmu_dbm/dbm.c (mu_dbm_create_from_url): Likewise.
14532	* maidag/mailquota.c (dbm_retrieve_quota): Update call to
14533	mu_dbm_create. Impose MU_FILE_SAFETY_ALL by default.
14534	* mu/dbm.c (open_db_file): Update call to mu_dbm_create. No
14535	checks by default.
14536	* pop3d/apop.c (pop3d_apopuser): Update call to mu_dbm_create.
14537	Use apop_database_safety as the default checks.
14538	* pop3d/bulletin.c (read_bulletin_db,write_bulletin_db): Update
14539	calls to mu_dbm_create. Use DEFAULT_GROUP_DB_SAFETY as default.
14540	* pop3d/logindelay.c (open_stat_db): Update call to
14541	mu_dbm_create. Use DEFAULT_GROUP_DB_SAFETY as default.
14542	* pop3d/pop3d.c (apop_database_safety): Initialize to
14543	MU_FILE_SAFETY_ALL.
14544	(apop_database_safety_set): Remove.
14545	* pop3d/pop3d.h (apop_database_safety_set): Remove.
14546	* pop3d/popauth.c (open_db_file): Update call to mu_dbm_create.
14547	Use safety_flags by default.
14548
145492011-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
14550
14551	wordsplit: implement separate single- and double-quote parsing.
14552
14553	* include/mailutils/wordsplit.h
14554	(MU_WRDSF_SQUOTE,MU_WRDSF_DQUOTE): New flags.
14555	(MU_WRDSF_QUOTE): Redefine as an OR of the above two.
14556	* libmailutils/string/wordsplit.c (scan_word): Treat '\'' and
14557	'"' separately, depending on the flags.
14558	* libmailutils/tests/wsp.c: Add squote and dquote options.
14559	* libmailutils/tests/wordsplit.at: Test separate quoting
14560	support.
14561
145622011-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
14563
14564	Implement list slicing functions.
14565
14566	* include/mailutils/list.h (mu_list_slice_dup,mu_list_slice)
14567	(mu_list_slice2_dup,mu_list_slice2): New protos.
14568	* libmailutils/list/slice.c: New file.
14569	* libmailutils/list/slice2.c: New file.
14570	* libmailutils/list/Makefile.am: Add slice.c and slice2.c
14571	* libmailutils/tests/list.at: Add slicing tests.
14572	* libmailutils/tests/listop.c: New command: "slice"
14573
145742011-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
14575
14576	Imap client: fix status implementation.
14577
145782011-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
14579
14580	Implement general-purpose processing of unsolicited responses
14581	in imap client.
14582
14583	* include/mailutils/imap.h (mu_imap_response_action_t): New
14584	typedef.
14585	(mu_imap_foreach_response): New proto.
14586	(MU_IMAP_CB_PERMANENT_FLAGS,MU_IMAP_CB_MESSAGE_COUNT)
14587	(MU_IMAP_CB_RECENT_COUNT,MU_IMAP_CB_FIRST_UNSEEN)
14588	(MU_IMAP_CB_UIDNEXT,MU_IMAP_CB_UIDVALIDITY)
14589	(MU_IMAP_CB_OK,_MU_IMAP_CB_MAX): New constants.
14590	(mu_imap_callback_t): New typedef.
14591	(mu_imap_callback,mu_imap_register_callback_function): New
14592	protos. (MU_IMAP_RESPONSE_ALERT,MU_IMAP_RESPONSE_BADCHARSET)
14593	(MU_IMAP_RESPONSE_CAPABILITY,MU_IMAP_RESPONSE_PARSE)
14594	(MU_IMAP_RESPONSE_PERMANENTFLAGS,MU_IMAP_RESPONSE_READ_ONLY)
14595	(MU_IMAP_RESPONSE_READ_WRITE,MU_IMAP_RESPONSE_TRYCREATE)
14596	(MU_IMAP_RESPONSE_UIDNEXT,MU_IMAP_RESPONSE_UIDVALIDITY)
14597	(MU_IMAP_RESPONSE_UNSEEN): New constants.
14598	(mu_imap_response_codes): New extern.
14599	* include/mailutils/sys/imap.h (_mu_imap) <callback>: New
14600	member.
14601	(_mu_imap_collect_flags, _mu_imap_list_at): New protos.
14602	* libproto/imap/resplist.c (_mu_imap_list_at): New function.
14603	* libproto/imap/callback.c: New file.
14604	* libproto/imap/resproc.c: New file.
14605	* libproto/imap/Makefile.am: Add new files.
14606	* libproto/imap/capability.c: Rewrite using
14607	mu_imap_foreach_response.
14608	* libproto/imap/id.c: Likewise.
14609	* libproto/imap/select.c: Likewise.
14610
146112011-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
14612
14613	Rename mu_list_do to mu_list_foreach.  Add comments to
14614	mailutils/list.h.
14615
146162011-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
14617
14618	imap client: implement status command.
14619
14620	* include/mailutils/imap.h (mu_imap_status): New proto.
14621	(_mu_imap_status_name_table): New declaration.
14622	* include/mailutils/sys/imap.h (mu_imap_client_state)
14623	<MU_IMAP_STATUS_RX>: New state.
14624	* libproto/imap/status.c: New file.
14625	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add
14626	status.c
14627	* mu/imap.c: Implement "status"
14628
146292011-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
14630
14631	imap client: implement select/examine.
14632
14633	* include/mailutils/imap.h (mu_imap_stat): New structs.
14634	(MU_IMAP_STAT_DEFINED_FLAGS,MU_IMAP_STAT_PERMANENT_FLAGS)
14635	(MU_IMAP_STAT_MESSAGE_COUNT,MU_IMAP_STAT_RECENT_COUNT)
14636	(MU_IMAP_STAT_FIRST_UNSEEN,MU_IMAP_STAT_UIDNEXT)
14637	(MU_IMAP_STAT_UIDVALIDITY): New flags.
14638	(mu_imap_select): New proto.
14639	* include/mailutils/imapio.h (mu_imap_flag_to_attribute)
14640	(mu_imap_format_flags): New protos.
14641	* include/mailutils/sys/imap.h (mu_imap_client_state)
14642	<MU_IMAP_SELECT_RX>: New state.
14643	(_mu_imap) <mbox_name,mbox_writable,mbox_stat>: New members.
14644	* libmailutils/imapio/flags.c: New file.
14645	* libmailutils/imapio/Makefile.am: Add flags.c
14646	* libproto/imap/select.c: New file.
14647	* libproto/imap/Makefile.am: Add select.c
14648	* libproto/imap/err.c (_mu_imap_seterrstr)
14649	(_mu_imap_clrerrstr, mu_imap_strerror): Allow for imap==NULL.
14650	* libproto/imap/id.c (mu_imap_id): Set errstr on
14651	MU_ERR_BADREPLY
14652	* libproto/imap/login.c (mu_imap_login): Likewise.
14653	* libproto/imap/resplist.c (_mu_imap_list_element_is_string):
14654	New function.
14655	* mu/imap.c: Implement examine and select.
14656
146572011-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
14658
14659	imap client: redo capability and id support via list mappers.
14660
14661	* libproto/imap/capability.c (mu_imap_capability): Use
14662	mu_list_map to create the capability list.
14663	* libproto/imap/id.c (_id_convert): Likewise for ID pairs.
14664
146652011-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
14666
14667	Implement list mapping.
14668
14669	* include/mailutils/list.h (MU_LIST_MAP_OK)
14670	(MU_LIST_MAP_SKIP,MU_LIST_MAP_STOP): New constants.
14671	(mu_list_mapper_t): New typedef.
14672	(mu_list_map): New proto.
14673	* libmailutils/list/gmap.c: New file.
14674	* libmailutils/list/map.c: New file.
14675	* libmailutils/list/Makefile.am: Add gmap.c and map.c
14676	* libmailutils/tests/listop.c: New command "map".
14677	* libmailutils/tests/list.at: Test the list mapping.
14678
146792011-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
14680
14681	Move list support into a separate convenience library.
14682
14683	* configure.ac: Build libmailutils/list/Makefile
14684	* include/mailutils/sys/list.h (DESTROY_ITEM): New define.
14685	(_mu_list_insert_item): New proto.
14686	* libmailutils/Makefile.am (SUBDIRS): Add list.
14687	(libmailutils_la_LIBADD): Add list/liblist.la
14688	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove
14689	list sources.
14690	* libmailutils/base/list.c: Split into smaller files (see
14691	below).
14692	* libmailutils/base/listlist.c: Move to
14693	libmailutils/list/listlist.c
14694	* libmailutils/list/Makefile.am: New file.
14695	* libmailutils/list/append.c: New file.
14696	* libmailutils/list/array.c: New file.
14697	* libmailutils/list/clear.c: New file.
14698	* libmailutils/list/count.c: New file.
14699	* libmailutils/list/create.c: New file.
14700	* libmailutils/list/destroy.c: New file.
14701	* libmailutils/list/do.c: New file.
14702	* libmailutils/list/empty.c: New file.
14703	* libmailutils/list/get.c: New file.
14704	* libmailutils/list/getcomp.c: New file.
14705	* libmailutils/list/insert.c: New file.
14706	* libmailutils/list/intersect.c: New file.
14707	* libmailutils/list/iterator.c: New file.
14708	* libmailutils/list/locate.c: New file.
14709	* libmailutils/list/prepend.c: New file.
14710	* libmailutils/list/remove.c: New file.
14711	* libmailutils/list/replace.c: New file.
14712	* libmailutils/list/setcomp.c: New file.
14713	* libmailutils/list/setdestr.c: New file.
14714
147152011-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
14716
14717	Rewrite existing imap client support using imapio.
14718
147192011-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
14720
14721	Implement mu_imapio_reply_string function.
14722
14723	* include/mailutils/imapio.h (mu_imapio_reply_string): New
14724	proto.
14725	* libmailutils/imapio/replstr.c: New file.
14726	* libmailutils/imapio/Makefile.am: Add replstr.c
14727
147282011-11-17  Sergey Poznyakoff  <gray@gnu.org.ua>
14729
14730	Implement IMAP I/O functions for client and server.
14731
14732	* include/mailutils/imapio.h: New file.
14733	* include/mailutils/sys/imapio.h: New file.
14734	* libmailutils/imapio/create.c: New file.
14735	* libmailutils/imapio/getline.c: New file.
14736	* libmailutils/imapio/literal.c: New file.
14737	* libmailutils/imapio/printf.c: New file.
14738	* libmailutils/imapio/qstring.c: New file.
14739	* libmailutils/imapio/send.c: New file.
14740	* libmailutils/imapio/trace.c: New file.
14741	* libmailutils/imapio/words.c: New file.
14742	* libmailutils/imapio/xscript.c: New file.
14743	* configure.ac: Build libmailutils/imapio/Makefile
14744	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
14745	imapio.h.
14746	* include/mailutils/imapio.h: New file.
14747	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
14748	imapio.h.
14749	* include/mailutils/sys/imapio.h: New file.
14750	* include/mailutils/types.hin (mu_imapio_t): New data type.
14751	* libmailutils/Makefile.am (SUBDIRS): Add imapio.
14752	* libmailutils/tests/Makefile.am: Build imapio
14753	* libmailutils/tests/imapio.c: New source.
14754	* libmailutils/tests/wsp.c: Handle escape argument
14755
147562011-11-17  Sergey Poznyakoff  <gray@gnu.org.ua>
14757
14758	Improve wordsplit.
14759
14760	* include/mailutils/wordsplit.h (mu_wordsplit) <ws_escape>: New
14761	member.
14762	(MU_WRDSF_ESCAPE): New flag.
14763	(mu_wordsplit_general_unquote_copy): New function.
14764	* libmailutils/string/wordsplit.c: Remove empty nodes after
14765	whitespace trimming. If MU_WRDSF_ESCAPE is set, remove only
14766	backslashes appearing in front of a character in ws_escape.
14767	* libmailutils/tests/wordsplit.at: Test new features.
14768
147692011-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
14770
14771	Import error codes directly from libmailutils to Python.
14772
14773	* python/libmu_py/Makefile.am (libmu_py_la_SOURCES): Add
14774	errno.c
14775	* python/libmu_py/errno.c: New file.
14776	* python/libmu_py/libmu_py.c (_mu_py_module_name): New
14777	function.
14778	(_mu_py_attach_module): Use _mu_py_module_name to allocate FQ
14779	module name instead of taking the risk of using fixed size
14780	buffer. Don't call Py_InitModule if methods is NULL.
14781	(mu_py_attach_modules): Call _mu_py_attach_errno.
14782	* python/libmu_py/libmu_py.h (_mu_py_attach_errno): New proto.
14783	* python/mailutils/error.py: Re-export everything from
14784	c_api.errno. Remove hardcoded definitions of error codes.
14785
147862011-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
14787
14788	Minor changes.
14789
14790	* libmu_cfg/tls.c (SSL_KEY_FILE_CHECKS): Mask out
14791	MU_FILE_SAFETY_OWNER_MISMATCH bit.
14792	* mu/shell.c: Handle SIGPIPE and SIGINTR.
14793
147942011-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
14795
14796	Minor change.
14797
14798	* mu/dbm.c (add_records): Set DBM meta-data after populating it
14799	with data.
14800
148012011-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
14802
14803	Minor fix.
14804
14805	* libmu_dbm/dbm.c (mu_dbm_create_from_url): Fix owner=
14806	parameter.
14807
148082011-11-10  Wojciech Polak  <polak@gnu.org>
14809
14810	Update Python interface.
14811
14812	* python/libmu_py/filter.c: Bugfix.
14813	* python/libmu_py/url.c (api_url_parse): Remove.
14814	* python/mailutils/error.py: Update MU_ERR_* values.
14815	* python/mailutils/url.py (Url): Remove parse() method.
14816	* examples/python/iconv.py: Remove open/close method calls.
14817	* examples/python/mailcap.py: Likewise.
14818	* examples/python/url-parse.py: Remove parse() call.
14819
148202011-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14821
14822	Implement _dbm_get_fd in Kyoto cabinet.
14823
14824	* libmu_dbm/kyoto.c: Implement _dbm_get_fd.
14825
148262011-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14827
14828	Minor change.
14829
14830	* libmailutils/base/version.c (mu_conf_option): Reflect BDB
14831	support.
14832
148332011-11-09  Wojciech Polak  <polak@gnu.org>
14834
14835	Add Kyoto Cabinet DBM support.
14836
14837	* libmu_dbm/kyoto.c: New file.
14838	* libmu_dbm/dbm.c: Update.
14839	* libmu_dbm/mudbm.h: Update.
14840	* libmu_dbm/Makefile.am: (libmu_dbm_la_SOURCES): Add kyoto.c
14841	* configure.ac: Add --with-kyotocabinet.
14842	* README: Update.
14843	* doc/texinfo/programs.texi: Likewise.
14844	* libmailutils/base/version.c: Likewise.
14845
148462011-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14847
14848	spamd sieve test: bugfix.
14849
14850	* libmu_sieve/extensions/spamd.c (get_real_message_size): New
14851	function.
14852	(spamd_test): Use get_real_message_size instead of
14853	mu_message_size.
14854
148552011-11-08  Wojciech Polak  <polak@gnu.org>
14856
14857	Fix typos.
14858
148592011-11-08  Wojciech Polak  <polak@gnu.org>
14860
14861	Re-add Tokyo Cabinet DBM support.
14862
14863	* libmu_dbm/tokyo.c: New file.
14864	* libmu_dbm/Makefile.am (libmu_dbm_la_SOURCES): Add tokyo.c.
14865	* doc/texinfo/programs.texi: Update.
14866	* README: Update.
14867
148682011-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
14869
14870	Minor changes in diagnostic messages.
14871
14872	* maidag/maidag.c (cb_delivery_mode): Fix typo.
14873	* mail/mail.c (mail_warranty): Update copyright years.
14874
148752011-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
14876
14877	Bugfix.
14878
14879	* mu/dbm.c (add_records): Reference mu_strin before using it
14880	for input.
14881
148822011-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
14883
14884	Version 2.99.94.
14885
148862011-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
14887
14888	Minor fix.
14889
14890	* pop3d/pop3d.c (pop3d_mainloop): start in AUTHORIZATION if tls
14891	is established.
14892
148932011-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
14894
14895	Update docs + minor changes.
14896
14897	* .gitmodules: Add imprimatur.
14898	* Makefile.am: Likewise.
14899	* configure.ac: Likewise.
14900	* doc/Makefile.am: Likewise.
14901	* bootstrap.conf: Comment out make in doc/texinfo
14902	* doc/texinfo/Makefile.am: Rewrite.
14903	* doc/texinfo/fdl.texi: Minor change.
14904	* doc/texinfo/getdate.texi: Minor change.
14905	* doc/texinfo/mailutils.texi: begin rewrite.
14906	* doc/texinfo/mu-mh.texi: Minor change.
14907	* doc/texinfo/programs.texi: begin rewrite.
14908	* doc/texinfo/sieve.texi: Minor change.
14909	* doc/texinfo/usage.texi: Minor change.
14910	* libmailutils/cfg/lexer.l: Allow for @ in unquoted strings
14911	* pop3d/bulletin.c: Relax safety checks for bulletin.db
14912	* pop3d/logindelay.c: Relax safety checks for stat.sb
14913	* pop3d/pop3d.h (DEFAULT_GROUP_DB_SAFETY): New define.
14914
149152011-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
14916
14917	Write NEWS article describing the recent changes.
14918
149192011-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
14920
14921	Fix MU_EVT_MESSAGE_ADD in pop://
14922
14923	* libproto/pop/mbox.c (pop_scan): Make sure MU_EVT_MESSAGE_ADD
14924	is delivered when it is already possible to retrieve the
14925	message.
14926	* mail/mail.c (default_setup) <headline>: Use %L instead of %l.
14927	* mu/logger.c (logger_options)<priority>: Minor fix.
14928
149292011-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
14930
14931	Implement pop3s and imap4s in respective servers.
14932
14933	* comsat/comsat.c (comsat_prefork,comsat_connection): Change
14934	signatures.
14935	* imap4d/imap4d.c: Implement imaps.
14936	* imap4d/imap4d.h (io_setio): Change signature.
14937	(tls_encryption_on): New proto.
14938	* imap4d/io.c (io_setio): Change signature. Initialize TLS
14939	stream if requested.
14940	* imap4d/starttls.c (tls_encryption_on): New function.
14941	* include/mailutils/server.h (mu_srv_config): New struct.
14942	(mu_m_server_conn_fp, mu_m_server_prefork_fp): Remove typedefs.
14943	(mu_m_server_handler_fp): New typedef.
14944	(mu_m_server_set_conn): Change signature.
14945	(mu_m_server_set_prefork): Change signature.
14946	(mu_m_server_set_app_data_size)
14947	(mu_m_server_set_config_size): New prototype.
14948	(mu_m_server_cfg_init): Change signature.
14949	* include/mailutils/tls.h (mu_init_tls_libs): Change signature.
14950	* lib/tcpwrap.c: Include tcpwrap.h
14951	(mu_tcp_wrapper_daemon): Fix declaration.
14952	(mu_tcp_wrapper_prefork): Change signature.
14953	* lib/tcpwrap.h (mu_tcp_wrapper_prefork): Change signature
14954	* libmailutils/server/msrv.c (_mu_m_server) <conn,prefork>:
14955	Change data type. All uses updated.
14956	<app_data_size>: New member.
14957	(m_srv_config): Remove struct. Replaced with mu_srv_config from
14958	tls.h
14959	(mu_m_server_set_conn): Change signature.
14960	(mu_m_server_set_prefork): Change signature.
14961	(mu_m_server_set_app_data_size)
14962	(mu_m_server_set_config_size): New functions.
14963	(add_server): Allocate app_data_size additional bytes of data.
14964	(mu_m_server_cfg_init): Take one argument.
14965	* libmu_auth/tls.c (mu_tls_module_init): Update call to
14966	mu_init_tls_libs. Don't call mu_file_safety_check with NULL
14967	argument.
14968	(mu_init_tls_libs): Rewrite. Prepare x509 here, instead of
14969	doing it each time a TLS stream is created.
14970	(mu_deinit_tls_libs): Free x509, if exists.
14971	(_tls_server_open): Update call to mu_init_tls_libs. Remove
14972	x509 initialization.
14973	* libmu_cfg/tls.c (cb2_safety_checks): Fix typos.
14974	* maidag/lmtp.c (lmtp_connection): Change signature.
14975	* maidag/maidag.c (main): Update call to mu_m_server_cfg_init.
14976	* maidag/maidag.h (lmtp_connection): Change signature.
14977	* pop3d/extra.c (pop3d_setio): Initialize TLS stream, if
14978	requested.
14979	* pop3d/pop3d.c: Implement pops.
14980	* pop3d/pop3d.h (pop3d_setio): Change prototype.
14981
149822011-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
14983
14984	Implement error_string method in TLS streams.
14985
14986	* include/mailutils/sys/tls-stream.h (_mu_tls_stream_s):
14987	Remove.
14988	* libmailutils/diag/errors (MU_ERR_BAD_RESUMPTION): Remove. Use
14989	EAGAIN instead.
14990	(MU_ERR_DISABLED): New error code.
14991	* libmu_auth/tls.c (_tls_server_open): Return MU_ERR_DISABLED
14992	when needed.
14993	(_mu_tls_stream_create): Implement error_string method.
14994	* libproto/maildir/mbox.c (maildir_msg_init): Fix return value.
14995
149962011-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
14997
14998	Fix TLS usage.
14999
15000	Remove --tls option. Make TLS stream open methods call
15001	mu_init_tls_libs. It is now not necessary to call this function
15002	explicitly, unless the application wishes to ensure TLS is
15003	initialized (e.g. pop3d or imap4d).
15004
15005	* include/mailutils/libargp.h (mu_tls_cmdline): Remove.
15006	* libmu_argp/tls.c
15007	* libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove tls.c
15008	* libmu_argp/cmdline.c (all_cmdline_capa): Remove tls.c
15009	* libmu_auth/tls.c [WITH_TLS] (mu_tls_module_config): Enable by
15010	default.
15011	(mu_check_tls_environment): Return 0 if TLS is disabled.
15012	(mu_init_tls_libs): Always call gnutls_global_init, otherwise
15013	any call to TLS library (especially, handshake) can produce a
15014	coredump.
15015	* libmu_cfg/tls.c: Fix description string for tls.enable.
15016	* mh/mh_init.c (mh_init): Remove call to mu_init_tls_libs, now
15017	unnecessary.
15018	* python/libmu_py/registrar.c: Likewise.
15019	* testsuite/smtpsend.c: Likewise.
15020
150212011-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
15022
15023	Minor changes.
15024
15025	* mu/dbm.c: Remove unused variables.
15026	* mu/wicket.c (wicket_args_doc): Fix argument name.
15027
150282011-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
15029
15030	mu dbm: minor fix.
15031
15032	* mu/dbm.c (add_records): Initialize format.
15033
150342011-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
15035
15036	mu dbm: improve command line interface.
15037
15038	* mu/dbm.c: Use subcommand (not options) to select operation
15039	mode. New subcommand: dump.
15040	* mu/help.c (mutool_help): Make sure argv[0] contains program
15041	and command name.
15042	* mu/mu.c (main): Likewise.
15043
150442011-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
15045
15046	Introduce a better dbm dump format.
15047
15048	* include/mailutils/dbm.h (mu_dbm_get_name): New prototype.
15049	* libmu_dbm/name.c: New file.
15050	* libmu_dbm/Makefile.am (libmu_dbm_la_SOURCES): Add name.c
15051	* mu/dbm.c: New dump format.
15052
150532011-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>
15054
15055	cctype: bugfix.
15056
15057	* include/mailutils/cctype.h (mu_isblank): Use mu_c_is_class.
15058	* libmailutils/string/muctype.c (mu_c_tab): Mark ' ' and '\t'
15059	as MU_CTYPE_BLANK.
15060
150612011-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>
15062
15063	inline-comment: bugfixes.
15064
15065	Fixes following bugs:
15066
15067	1. In whitespace-must-follow mode a comment sequence
15068	immediately followed by a newline caused the next line to be
15069	treated as a comment. Thus the following input:
15070
15071	; text
15072
15073	produced empty output (see test icmt-dec-08).
15074
15075	2. Line number information was not emitted before lines
15076	starting with a comment sequence substring, e.g.:
15077
15078	; comment ;valid line
15079
15080	See test icmt-dec-09.
15081
15082	* libmailutils/filter/inline-comment.c (ilcmt_state) Withdraw
15083	ilcmt_rollback_com state, use ilcmt_rollback instead. Withdraw
15084	ilcmt_newline_ac state, use ILCMT_EMIT_LINE_INFO flag instead.
15085	(ILCMT_EMIT_LINE_INFO): New flag.
15086	(ilcmt_data) <replay>: Remove. <rollback_buffer, rollback_size>
15087	<rollback_index>: New members.
15088	(init_rollback): New function.
15089	(_ilcmt_decoder): Use ilcmt_rollback state.
15090	<ilcmt_comment_ws>: Do not skip newline following the comment.
15091	Emit line info before rolling back, if required.
15092	(_ilcmt_encoder): Use ilcmt_rollback state.
15093	* libmailutils/tests/inline-comment.at: Rename tests. Add tests
15094	for newline after a comment (icmt-dec-08) and line info with
15095	whitespace-follow mode (icmt-dec-09).
15096
150972011-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
15098
15099	Minor change.
15100
151012011-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
15102
15103	Reorganize error codes.
15104
15105	* libmailutils/diag/errors (MU_ERR_TCP_NO_HOST)
15106	(MU_ERR_TCP_NO_PORT): Change wording.
15107	(MU_ERR_UNSAFE_PERMS): Remove error code.
15108	(MU_ERR_NO_HANDLER): Remove. All uses replaced by ENOSYS.
15109	(MU_ERR_OUT_NULL): Remove. MU_ERR_OUT_PTR_NULL is used instead.
15110	(MU_ERR_MBX_NULL): Remove. Use EINVAL instead.
15111	(MU_ERR_BAD_822_FORMAT): Rename to MU_ERR_INVALID_EMAIL. Change
15112	wording.
15113	(MU_ERR_REPLY): Change wording.
15114	* libmailutils/url/create.c: Remove misguiding comments
15115	* libmailutils/url/set-service.c: Likewise.
15116	* libmailutils/mailbox/mailbox.c (mu_mailbox_open): Return
15117	EACCES if trying to update quick-access mailboxes.
15118	(mu_mailbox_get_stream): Mark for deletion.
15119	* libmailutils/stream/fltstream.c (filter_read)
15120	(filter_write_internal): Return MU_ERR_BUFSPACE if requested
15121	more space than available in I/O buffers.
15122	* libproto/mbox/mbox.c (mbox_expunge_unlocked): Send
15123	MU_EVT_MAILBOX_CORRUPT event if the mailbox shrunk.
15124	* libproto/mbox/mboxscan.c (mbox_scan_internal): Return
15125	MU_ERR_NOENT if unable to locate message in quick-access mode.
15126
151272011-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
15128
15129	pop3d: configurable APOP file and safety criteria.
15130
15131	* include/mailutils/dbm.h (mu_dbm_init)
15132	(mu_dbm_get_hint): New prototypes.
15133	* include/mailutils/util.h (mu_stpcpy)
15134	(mu_file_safety_compose): New prototypes.
15135	* libmailutils/string/Makefile.am (libstring_la_SOURCES): Add
15136	stpcpy.c
15137	* libmailutils/string/stpcpy.c: New file.
15138	* libmu_cfg/tls.c (cb2_safety_checks): Use
15139	mu_file_safety_compose.
15140	* libmu_dbm/create.c (mu_dbm_create): Use mu_dbm_init.
15141	* libmu_dbm/dbm.c (_mu_dbm_init): Rename mu_dbm_init. All uses
15142	changed. Use URL composing interface to create hints.
15143	* maidag/maidag.c (mu_dbm_get_hint): New function.
15144	* pop3d/pop3d.c (cb2_forward_file_checks): Use
15145	mu_file_safety_compose. (apop_database_name,
15146	apop_database_safety)
15147	(apop_database_safety_set): New variables. (pop3d_cfg_param)
15148	<apop-database-file>
15149	<apop-database-safety>: New configuration statements.
15150	(main) [ENABLE_DBM]: Initialize dbm safety criteria.
15151	* pop3d/apop.c (pop3d_apopuser): Use configured database name
15152	and safety flags, if set.
15153	* pop3d/pop3d.h [ENABLE_DBM] (APOP_PASSFILE): Add ".db" suffix.
15154	(apop_database_name, apop_database_safety)
15155	(apop_database_safety_set): New variables.
15156
151572011-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
15158
15159	New interface for composing URLs from parts.
15160
15161	* include/mailutils/url.h (mu_url_sget_name)
15162	(mu_url_aget_name,mu_url_get_name)
15163	(mu_url_invalidate,mu_url_create_null)
15164	(mu_url_set_user,mu_url_set_path,mu_url_set_scheme)
15165	(mu_url_set_host,mu_url_set_port,mu_url_set_service)
15166	(mu_url_set_auth,mu_url_set_secret,mu_url_add_param)
15167	(mu_url_clear_param,mu_url_add_query,mu_url_clear_query): New
15168	prototypes.
15169	* libmailutils/tests/url-comp.at: New test case.
15170	* libmailutils/tests/url-comp.c: New test program.
15171	* libmailutils/tests/.gitignore: Update.
15172	* libmailutils/tests/Makefile.am: Add new files.
15173	* libmailutils/tests/testsuite.at: Add new tests.
15174	* libmailutils/url/Makefile.am: Add new files.
15175	* libmailutils/url/add-param.c: New file.
15176	* libmailutils/url/add-query.c: New file.
15177	* libmailutils/url/clr-param.c: New file.
15178	* libmailutils/url/clr-query.c: New file.
15179	* libmailutils/url/null.c: New file.
15180	* libmailutils/url/set-auth.c: New file.
15181	* libmailutils/url/set-host.c: New file.
15182	* libmailutils/url/set-path.c: New file.
15183	* libmailutils/url/set-port.c: New file.
15184	* libmailutils/url/set-scheme.c: New file.
15185	* libmailutils/url/set-secret.c: New file.
15186	* libmailutils/url/set-service.c: New file.
15187	* libmailutils/url/set-user.c: New file.
15188	* libmailutils/url/urlinv.c: New file.
15189	* libmailutils/url/create.c (mu_url_create_hint): Return EINVAL
15190	if purl is NULL.
15191	* libmailutils/url/scheme.c (mu_url_set_scheme): Remove. See
15192	set-scheme.c
15193	* libmailutils/url/urlstr.c (mu_url_sget_name)
15194	(mu_url_aget_name,mu_url_get_name): New functions.
15195	(mu_url_to_string): Rewrite using the above.
15196	* libmailutils/base/Makefile.am: Add fscompose.c
15197	* libmailutils/base/fscompose.c: New file.
15198
151992011-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
15200
15201	Add testcases for file safety checking functions.
15202
15203	* libmailutils/tests/fsaf.at: New testcase.
15204	* libmailutils/tests/fsaf.c: New file.
15205	* libmailutils/tests/.gitignore: Add fsaf
15206	* libmailutils/tests/Makefile.am: Likewise.
15207	* libmailutils/tests/testsuite.at: Include fsaf.at.
15208
152092011-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15210
15211	Use MU_CTYPE_ENDLN to trim \r\n.
15212
152132011-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15214
15215	Reimplement DBM support.
15216
15217	* lib/mu_dbm.c: Remove.
15218	* lib/mu_dbm.h: Remove.
15219	* lib/Makefile.am: Remove mu_dbm.[ch].
15220	* include/mailutils/sys/dbm.h: New file.
15221	* include/mailutils/sys/Makefile.am: Add dbm.h
15222	* include/mailutils/dbm.h: New file.
15223	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
15224	dbm.h.
15225	* include/mailutils/types.hin (mu_dbm_file_t): New data type.
15226	* libmu_dbm/Makefile.am: New file.
15227	* libmu_dbm/berkeley.c: New file.
15228	* libmu_dbm/close.c: New file.
15229	* libmu_dbm/create.c: New file.
15230	* libmu_dbm/datumfree.c: New file.
15231	* libmu_dbm/dbm.c: New file.
15232	* libmu_dbm/delete.c: New file.
15233	* libmu_dbm/destroy.c: New file.
15234	* libmu_dbm/errstr.c: New file.
15235	* libmu_dbm/fetch.c: New file.
15236	* libmu_dbm/firstkey.c: New file.
15237	* libmu_dbm/gdbm.c: New file.
15238	* libmu_dbm/mudbm.h: New file.
15239	* libmu_dbm/ndbm.c: New file.
15240	* libmu_dbm/nextkey.c: New file.
15241	* libmu_dbm/open.c: New file.
15242	* libmu_dbm/safety.c: New file.
15243	* libmu_dbm/store.c: New file.
15244	* Makefile.am [MU_COND_DBM]: Define LIBMU_DBM_DIR
15245	(SUBDIRS): Add $(LIBMU_DBM_DIR)
15246	* configure.ac: Revamp DBM support: several database types can
15247	be specified at once.
15248	(AC_CONFIG_FILES): Build libmu_dbm/Makefile
15249	* libmu_sieve/extensions/vacation.c: Remove inclusion of
15250	mu_dbm.h.
15251	* maidag/Makefile.am (maidag_LDADD): Add DBM libraries.
15252	* maidag/maidag.c: ENABLE_DBM instead of USE_DBM
15253	* maidag/maidag.h: Include <mailutils/dbm.h> instead of
15254	mu_dbm.h.
15255	* maidag/mailquota.c (dbm_retrieve_quota): Rewrite using
15256	libmu_dbm library calls.
15257	* mu/Makefile.am [MU_COND_DBM]: Define DBM_C.
15258	(MODULES): Add $(DBM_C).
15259	(AM_CPPFLAGS): Define DBMLIBS.
15260	* mu/ldflags.c (NEEDAUTH): Change definition.
15261	(lib_descr) <weight>: New member. All uses changed.
15262	(add_entry): Null arguments ignored.
15263	(mutool_ldflags): Rewrite traversal of lib_descr.
15264	* mu/dbm.c: New file.
15265	* pop3d/Makefile.am (pop3d_LDADD, popauth_LDADD): Add DBM
15266	libraries.
15267	* pop3d/apop.c: Rewrite using libmu_dbm library calls.
15268	* pop3d/bulletin.c: Likewise.
15269	* pop3d/logindelay.c: Likewise.
15270	* pop3d/pop3d.c: Change USE_DBM to ENABLE_DBM.
15271	* pop3d/pop3d.h: Include mailutils/dbm.h instead of mu_dbm.h
15272	* pop3d/popauth.c: Rewrite using libmu_dbm library calls.
15273	* include/mailutils/cctype.h (MU_CTYPE_ENDLN): New character
15274	class.
15275	(mu_isendln): New macro.
15276	* libmailutils/string/muctype.c (mu_c_tab): Mark \r and \n as
15277	MU_CTYPE_ENDLN.
15278
152792011-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
15280
15281	Simplify mu_file_safety_check call.
15282
15283	* include/mailutils/util.h (mu_file_safety_check): Change type
15284	of the 3rd argument to uid_t.
15285	* libmailutils/base/filesafety.c: Likewise. All uses updated.
15286
152872011-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
15288
15289	Complement 1e33c774.
15290
15291	* mh/comp.c: Open mailbox in read-only mode.
15292
152932011-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
15294
15295	imap4d: fix reading multi-line literals.
15296
15297	* imap4d/io.c (imap4d_tokbuf_decrlf): New function.
15298	(imap4d_tokbuf_expand): Call imap4d_tokbuf_decrlf for literals.
15299
153002011-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
15301
15302	Minor change.
15303
15304	* mh/tests/atlocal.in (mimeflt): ignore stderr, instead of
15305	reading input from /dev/null, because this function can
15306	theoretically be used as a filter.
15307
153082011-10-22  Sergey Poznyakoff  <gray@gnu.org.ua>
15309
15310	Fixes in the testsuite & some minor fixes.
15311
15312	* comsat/comsat.c (main): Use real UID to determine user name.
15313	Don't rely on environment variables.
15314	* maidag/util.c (maidag_error): Re-initialize va_list before
15315	reusing it.
15316	* mh/ali.c (ali_print_name_list): Change printing loop to
15317	correctly handle empty lists.
15318	* mh/mh_whatnow.c (quit): Print newline before returning.
15319	* comsat/tests/testsuite.at: Skip tests if run as root.
15320	* maidag/tests/forward.at: Skip test if run as root.
15321	* mh/tests/ali.at: Ignore comment lines in /etc/passwd and
15322	/etc/group. Make sure awk is run with a valid stdin. Some
15323	implementations (true awk, in particular) try to close stdin
15324	even if it is not used and bail out if unable to do so.
15325	* mh/tests/atlocal.in (mimeflt): Make sure awk is run with a
15326	valid stdin (see above).
15327	* mh/tests/anno.at: Always use semicolon before closing curly
15328	brace in sed expressions.
15329	* mh/tests/mark.at: Likewise.
15330	* mh/tests/pick.at: Likewise.
15331	* testsuite/testsuite.inc: Likewise.
15332	* mh/tests/comp.at: Reflect changes to mh_whatnow.c.
15333	* mh/tests/mhn.at: Don't rely on a particular tar output
15334	format.
15335
153362011-10-22  Sergey Poznyakoff  <gray@gnu.org.ua>
15337
15338	Make all status flags permanent.
15339
15340	* include/mailutils/attribute.h (MU_STATUS_BUF_SIZE): Add more
15341	status letters.
15342	* libmailutils/mailbox/attribute.c (flagtrans): Keep the same
15343	ordering as in attribute.h. Add missing attributes.
15344	* imap4d/select.c (imap4d_select_status): All flags are now
15345	permanent.
15346	* imap4d/testsuite/imap4d/IDEF0955.exp: Reflect changes in
15347	PERMANENTFLAGS.
15348	* imap4d/testsuite/imap4d/IDEF0956.exp: Likewise.
15349	* imap4d/testsuite/imap4d/append.exp: Likewise.
15350	* imap4d/testsuite/imap4d/create.exp: Likewise.
15351	* imap4d/testsuite/imap4d/examine.exp: Likewise.
15352	* imap4d/testsuite/imap4d/expunge.exp: Likewise.
15353	* imap4d/testsuite/imap4d/fetch.exp: Likewise.
15354	* imap4d/testsuite/imap4d/search.exp: Likewise.
15355
153562011-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15357
15358	Fix locking in pop3 and imap4d.  This complements d0769b4f.
15359
15360	* lib/manlock.c (mailbox_open_and_lock): Open mailbox before
15361	retrieving its locker, otherwise it is always NULL.
15362	* pop3d/pop3d.c (main): Enforce mandatory locking.
15363
153642011-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15365
15366	Testsuite: add banners before groups of related tests.
15367
153682011-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15369
15370	amd: report MU_EVT_MAILBOX_CORRUPT if unable to rename message
15371	file due to ENOENT.
15372
15373	* libmailutils/base/amd.c
15374	* libproto/maildir/mbox.c
15375
153762011-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
15377
15378	Change attribute handling in Maildir format.
15379
15380	* include/mailutils/message.h (MU_MSG_ATTRIBUTE_MODIFIED)
15381	(MU_MSG_HEADER_MODIFIED,MU_MSG_BODY_MODIFIED): New flags.
15382	* libmailutils/mailbox/message.c (mu_message_is_modified):
15383	Return a bitmask from the above values.
15384	* libmailutils/property/create.c (mu_property_create_init):
15385	Return error code.
15386	* include/mailutils/sys/amd.h (_amd_data) <chattr_msg>
15387	<capabilities, prop>: New members.
15388	<uidvalidity>: Remove.
15389	* libmailutils/base/amd.c: Use MH-style proplist to keep the
15390	mailbox properties: uidvalidity, last uid and to cache its
15391	size. Store message attributes in the message header only if
15392	the mailbox implementation is unable to keep them elsewhere.
15393	Use chattr_msg method (if provided) to flush changes in message
15394	attributes.
15395	* libproto/maildir/folder.c (_maildir_list_p): Ignore .mh* and
15396	.mu* files.
15397	* libproto/mh/folder.c (_mh_list_p): Likewise.
15398	* libproto/maildir/mbox.c: Implement all Maildir flags (except
15399	P). Implement the chattr_msg method.
15400	* libproto/mh/mbox.c: Remove special handling for uidvalidity.
15401	* mh/tests/folder.at: Ignore .mu-prop in directory listings.
15402
154032011-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
15404
15405	Bugfix.
15406
15407	* libmu_cfg/tls.c (cb2_safety_checks): Fix handling of "all"
15408	and "none".
15409	* maidag/maidag.c (cb2_forward_file_checks): Likewise.
15410	* maidag/forward.c (maidag_forward): Handle MU_ERR_EXISTS
15411	return properly.
15412
154132011-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
15414
15415	File safety checks: Implement "default" keyword.
15416
154172011-10-17  Sergey Poznyakoff  <gray@gnu.org.ua>
15418
15419	Provide a mechanism for configurable file safety checking.
15420
15421	Use it in maidag (.forward file safety) and in libmu_auth (TLS
15422	files).
15423
15424	* include/mailutils/tls.h (mu_tls_module_config): New members
15425	for safety check flags.
15426	* include/mailutils/util.h
15427	(MU_FILE_SAFETY_NONE,MU_FILE_SAFETY_ALL)
15428	(MU_FILE_SAFETY_OWNER_MISMATCH)
15429	(MU_FILE_SAFETY_GROUP_WRITABLE,MU_FILE_SAFETY_WORLD_WRITABLE)
15430	(MU_FILE_SAFETY_GROUP_READABLE,MU_FILE_SAFETY_WORLD_READABLE)
15431	(MU_FILE_SAFETY_LINKED_WRDIR)
15432	(MU_FILE_SAFETY_DIR_IWGRP,MU_FILE_SAFETY_DIR_IWOTH): New
15433	constants. (mu_file_safety_check,mu_file_safety_name_to_code)
15434	(mu_file_safety_name_to_error): New protos.
15435	* libmailutils/base/checkperms.c: New file.
15436	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add
15437	checkperms.c.
15438	* libmailutils/diag/errors: Add new error codes.
15439	(MU_ERR_UNSAFE_PERMS): change description wording.
15440	* libmu_auth/tls.c (mu_check_tls_environment): Use
15441	mu_file_safety_check.
15442	* libmu_cfg/tls.c (tls_settings): Initialize.
15443	(mu_tls_param): New configuration file statements:
15444	key-file-safety-checks, cert-file-safety-checks,
15445	ca-file-safety-checks.
15446	* maidag/forward.c (maidag_forward): Use mu_file_safety_check.
15447	* maidag/maidag.c (cb2_forward_file_checks): Use
15448	mu_file_safety_name_to_code.
15449
154502011-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
15451
15452	Minor changes, proposed by Jordi Mallach.
15453
15454	* scheme/sieve2scm.scmi: Tailor help output to meet help2man
15455	expectations.
15456	* libmu_scm/mailutils/Makefile.am (EXTRA_DIST): Remove
15457	generated file mailutils.scm.
15458
154592011-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
15460
15461	mh: open mailboxes in read-only mode unless the requested
15462	operation mandates otherwise.
15463
15464	* mh/mhn.c: Open mailbox in read-only mode.
15465	* mh/mhseq.c: Likewise.
15466	* mh/scan.c: Likewise.
15467	* mh/pick.c: If sequences are given, open mailbox for RW,
15468	otherwise open it for reading only.
15469	* testsuite/testsuite.inc (MUT_MBCHMOD): New macro.
15470	(MUT_MBCOPY): Take optional third argument - mailbox mode.
15471	* mh/tests/mhl.at: Make sure mailboxes are r/o.
15472	* mh/tests/mhn.at: Likewise.
15473	* mh/tests/mhseq.at: Likewise.
15474	* mh/tests/scan.at: Likewise.
15475
154762011-10-15  Sergey Poznyakoff  <gray@gnu.org.ua>
15477
15478	Bugfixes.
15479
15480	* libmailutils/base/amd.c (amd_open): Return error if the
15481	mailbox cannot be opened for the required access permissions.
15482	(amd_message_stream_open): Fix condition for determining r/w
15483	access.
15484	* mh/mh_list.c (eval_extras): Break the loop if
15485	mu_header_aget_field_name fails.
15486
154872011-10-15  Sergey Poznyakoff  <gray@gnu.org.ua>
15488
15489	imap4d: fix returned INTERNALDATE and date searches.
15490
15491	INTERNALDATE now includes a meaningful timezone information (it
15492	used to return +0000).
15493
15494	Date searches disregard the time and timezone of the
15495	INTERNALDATE or Date: header, as mandated by RFC 3501.
15496
15497	* libmailutils/base/date.c (mu_parse_ctime_date_time): In the
15498	absence of TZ in ctime strings, return local time zone.
15499	* imap4d/io.c (imap4d_tokbuf_getline): Kill trailing
15500	whitespace.
15501	* imap4d/util.c (adjust_tm): New function.
15502	(util_parse_internal_date) (util_parse_822_date)
15503	(util_parse_ctime_date): Take three arguments, the third one
15504	controlling what information to return. All uses updated.
15505	* imap4d/fetch.c (_frt_internaldate): Return meaningful
15506	timezone. If all else fails, use local TZ.
15507	* imap4d/imap4d.h (datetime_parse_mode): New enum.
15508	(util_parse_internal_date) (util_parse_822_date)
15509	(util_parse_ctime_date): Change signature.
15510	* imap4d/search.c (parse_simple_key)
15511	(_header_date,cond_before,cond_on,cond_since): Use
15512	datetime_date_only mode.
15513	* testsuite/spool/search.mbox: New file.
15514	* testsuite/spool/DISTFILES: Add search.mbox
15515	* imap4d/testsuite/lib/imap4d.exp (imap4d_start): New option
15516	-mbox.
15517	* imap4d/testsuite/imap4d/search.exp: Rewrite.
15518	* imap4d/testsuite/imap4d/create.exp: Account for TZ part in
15519	internaldate strings, which may vary.
15520	* imap4d/testsuite/imap4d/fetch.exp: Likewise.
15521	* imap4d/testsuite/imap4d/list.exp: List the new mailbox.
15522
155232011-09-22  Sergey Poznyakoff  <gray@gnu.org.ua>
15524
15525	Bugfix.
15526
15527	* libmailutils/filter/crlfflt.c (_crlf_encoder): Reset state to
15528	initial if any character other than \r and \n is read.
15529
155302011-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15531
15532	Minor changes.
15533
15534	* doc/texinfo/mailutils.texi: Update.
15535	* doc/texinfo/rendition.texi: Rewrite.
15536
155372011-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15538
15539	Minor fix.
15540
15541	* doc/texinfo/programs.texi: Use @group inside @cartouche, not
15542	vice-versa.
15543
155442011-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15545
15546	Fix generation of the doc files.
15547
15548	* doc/texinfo/Config: New file.
15549	* doc/texinfo/Makefile.am (manual): Use texi2html.
15550	* doc/texinfo/gendocs_template: Rewrite.
15551	* doc/texinfo/maint.mk: Use VPATH to find source files. Add the
15552	`clean' rule.
15553
155542011-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
15555
15556	Fix testsuite.
15557
15558	* mh/tests/burst.at: Remove leading newlines from the test
15559	messages.
15560
155612011-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
15562
15563	Make sure header reads always return the trailing \n, even for
15564	empty headers.
15565
15566	* libmailutils/mailbox/header.c (header_read): Always return
15567	trailing \n.
15568
155692011-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
15570
15571	Minor fix.
15572
15573	* libmailutils/stream/message_stream.c (_message_open): Return
15574	MU_ERR_BAD_822_FORMAT if the input is not a valid RFC822.
15575
155762011-08-28  Sergey Poznyakoff  <gray@gnu.org.ua>
15577
15578	Minor fix.
15579
15580	* libmailutils/stream/fltstream.c: Implement shutdown method.
15581
155822011-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
15583
15584	Version 2.99.93.
15585
155862011-08-26  Sergey Poznyakoff  <gray@gnu.org.ua>
15587
15588	Improve mime support, introduce ref/unref functions for
15589	mu_message_t and mu_mime_t.
15590
15591	* include/mailutils/message.h (mu_message_ref): Change proto.
15592	(mu_message_unref): New proto (instead of macro).
15593	* include/mailutils/mime.h (mu_mime_ref)
15594	(mu_mime_unref, mu_mime_to_message): New protos.
15595	* include/mailutils/sys/message.h (MESSAGE_MODIFIED)
15596	(MESSAGE_INTERNAL_STREAM): New constants (from mime.c)
15597	(MESSAGE_MIME_OWNER): New constant.
15598	(_mu_message) <ref_count>: Rename from ref.
15599	* include/mailutils/sys/mime.h (MIME_SEEK_ACTIVE): New
15600	constant.
15601	(_mu_mime) <ref_count>: New member.
15602	* libmailutils/mailbox/message.c (MESSAGE_MODIFIED)
15603	(MESSAGE_INTERNAL_STREAM): Removed (see above).
15604	* libmailutils/mailer/mailer.c (mu_message_unref): New
15605	function.
15606	(mu_message_destroy): Rewrite.
15607	(mu_message_ref): Returns void.
15608	(mu_message_lines): Don't access header and body directly to
15609	give virtual functions a chance to initialize them.
15610	(mu_message_quick_lines): likewise.
15611	* libmailutils/mailer/mailer.c (send_fragments): Use
15612	mu_mime_to_message instead of mu_message_unref.
15613	* libmailutils/mime/mime.c (_mime_append_part): Set offset only
15614	if mime->stream is not null.
15615	(_mime_body_stream_seek): Implement (albeit inefficiently).
15616	(mu_mime_create): Set ref_count.
15617	(mu_mime_ref, mu_mime_unref): New functions.
15618	(mu_mime_destroy): Reimplement as a wrapper over _mu_mime_free.
15619	(mu_mime_get_message): Increase refcount of the message being
15620	returned.
15621	(mu_mime_to_message): New function.
15622	* libmailutils/stream/message_stream.c (_message_open): Handle
15623	arbitrary text as RFC822 without headers.
15624	* libmu_sieve/actions.c: Unref the message returned by
15625	mu_mime_get_message.
15626	* libmu_sieve/extensions/vacation.c: Likewise.
15627	* mh/mhn.c: Likewise.
15628	* libmailutils/stream/stream.c (mu_stream_seek) <MU_SEEK_CUR>:
15629	Bugfix.
15630
156312011-08-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15632
15633	Bugfixes.
15634
15635	* maidag/lmtp.c: Fix typo in a function name.
15636	* mh/burst.c (burst_digest): Initialize result.
15637
156382011-08-04  Sergey Poznyakoff  <gray@gnu.org.ua>
15639
15640	Various bugfixes.
15641
15642	* libmailutils/base/assoc.c (first): Set index to max value if
15643	tab is NULL to indicate immediate end of iteration.
15644	* libmu_auth/sql.c (mu_auth_sql_by_name)
15645	(mu_auth_sql_by_uid): Check the return from mu_sql_num_tuples.
15646	(mu_sql_getpass): Check the number of returned tuples. Return
15647	failure if returned a NULL password.
15648	* libmu_scm/mu_message.c (string_sloppy_member): Remove.
15649	(mu-message-get-header-fields): Use scm_member instead of
15650	string_sloppy_member.
15651	* sql/postgres.c (chop): Handle NULL argument.
15652
156532011-07-27  Sergey Poznyakoff  <gray@gnu.org.ua>
15654
15655	Fake commit to test whether git mail notification works.
15656
156572011-07-19  Sergey Poznyakoff  <gray@gnu.org.ua>
15658
15659	Minor change.
15660
15661	* bootstrap.conf: Use the latest radius.m4
15662
156632011-07-18  Sergey Poznyakoff  <gray@gnu.org.ua>
15664
15665	Bugfixes.
15666
15667	* libmailutils/base/rfc2047.c (mu_rfc2047_decode): Break if
15668	reading from the filter fails.
15669	* libmailutils/stream/fltstream.c (filter_read): Treat
15670	mu_filter_moreinput in the lastbuf state as error.
15671
156722011-07-14  Sergey Poznyakoff  <gray@gnu.org.ua>
15673
15674	Version 2.99.92.
15675
15676	* NEWS: Update.
15677	* configure.ac: Update.
15678	* po/POTFILES.in: Update.
15679
156802011-07-14  Sergey Poznyakoff  <gray@gnu.org.ua>
15681
15682	Implement optional mailbox-independent locking for pop3d and
15683	imap4d.
15684
15685	* lib/manlock.c: New file.
15686	* lib/Makefile.am (libmuaux_a_SOURCES): Add manlock.c.
15687	* lib/muaux.h (manlock_mandatory_locking)
15688	(manlock_lock_dir): New externs. (manlock_open_mailbox,
15689	manlock_lock)
15690	(manlock_touchlock, manlock_unlock): New protos.
15691	* libmailutils/base/amd.c (amd_cleanup): Remove unbalanced call
15692	to mu_locker_unlock.
15693	* libmailutils/base/locker.c (mu_locker_create): Bugfixes.
15694	* imap4d/imap4d.c (imap4d_cfg_param): Add mandatory-locking
15695	construct.
15696	(main): Call manlock_cfg_init.
15697	* imap4d/select.c (imap4d_select0): Use mandatory locking if
15698	the mailbox is to be opened r/w.
15699	* imap4d/rename.c (imap4d_rename): Note FIXME!
15700	* imap4d/bye.c: Call manlock_unlock after closing the mailbox.
15701	* imap4d/close.c: Likewise.
15702	* imap4d/sync.c (imap4d_sync): Call manlock_touchlock.
15703	* pop3d/lock.c: Remove.
15704	* pop3d/Makefile.am (pop3d_SOURCES): Remove lock.c
15705	* pop3d/extra.c (pop3d_abquit): Unlock mailbox.
15706	* pop3d/pop3d.c (pop3d_cfg_param): Add mandatory-locking
15707	construct.
15708	(main): Call manlock_cfg_init.
15709	(pop3d_mainloop): Call manlock_touchlock.
15710	* pop3d/pop3d.h (pop3d_lock)
15711	(pop3d_touchlock, pop3d_unlock): Remove.
15712	* pop3d/quit.c (pop3d_quit): Unlock the mailbox.
15713	* pop3d/user.c (pop3d_begin_session): Use manlock_open_mailbox.
15714
157152011-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15716
15717	Bugfix.
15718
15719	* libmailutils/string/vasnprintf.c (mu_vasnprintf): Operate on
15720	a fresh copy of va_alist in each new iteration.
15721	* libproto/imap/folder.c: Likewise.
15722	* libproto/nntp/nntp_sendline.c: Likewise.
15723
157242011-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
15725
15726	Allow caller to set up custom in,out,err,progname,tag before
15727	calling mu_app_init.
15728
15729	* include/mailutils/stdstream.h (MU_STDSTREAM_RESET_STRIN)
15730	(MU_STDSTREAM_RESET_STROUT,MU_STDSTREAM_RESET_STRERR)
15731	(MU_STDSTREAM_RESET_NONE,MU_STDSTREAM_RESET_ALL): New flags.
15732	(mu_stdstream_setup): Change signature. All uses updated.
15733	* libmailutils/stdstream/basestr.c (mu_stdstream_setup): Use
15734	the flags argument to decide whether to close existing streams.
15735	Make sure stdstream_flushall enters the onexit queue only once.
15736	* libmu_argp/muinit.c (mu_app_init): Don't override variables
15737	that may be set by the caller (program_name, tag, streams).
15738
157392011-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
15740
15741	Fixes.
15742
15743	* libmailutils/diag/errors: Fix typo.
15744	* libproto/imap/connect.c: Add missing includes.
15745	* mh/tests/mhn.at: Add extra argument quoting.
15746
157472011-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
15748
15749	Minor fix.
15750
15751	* libmailutils/diag/wd.c (mu_wd): Revamp the loop to ensure the
15752	proposed way of connecting with gdb works in case of a non-zero
15753	timeout.
15754
157552011-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
15756
15757	imap4d: bugfix.
15758
15759	* NEWS: Version 2.99.91
15760	* configure.ac: Likewise.
15761	* imap4d/imap4d.h (io_getline): Change return value
15762	* imap4d/io.c (io_getline): Abort if a read error occurs.
15763
157642011-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
15765
15766	Various minor fixes.
15767
15768	* include/mailutils/diag.h (mu_full_program_name): New extern.
15769	* libmailutils/diag/diag.c (mu_full_program_name): New global.
15770	(mu_set_program_name): Set mu_full_program_name.
15771	(mu_diag_at_locus): Fix format specifier.
15772	* libmailutils/diag/bt.c: Use mu_full_program_name instead of
15773	program_invocation_name.
15774	* libmailutils/diag/wd.c (mu_wd): Likewise.
15775	* comsat/comsat.c: Fix format specifiers.
15776	* lib/mailcap.c: Likewise.
15777	* libmu_sieve/util.c: Cast formatted arguments to match format
15778	specs.
15779	* mh/mh_getopt.c: Likewise.
15780	* libmailutils/cidr/fromstr.c: Add missing includes.
15781	* libproto/mailer/smtp.c: Likewise.
15782	* libproto/pop/mbox.c: Likewise.
15783	* testsuite/smtpsend.c: Likewise.
15784	* mu/getarg.c: Likewise.
15785	* mu/imap.c: Likewise.
15786	* mu/pop.c (com_connect): Protect TLS code with #ifdef.
15787	* mu/Makefile.am (EXTRA_DIST): Add mu-setup.awk.
15788	* mail/summary.c (mail_summary): Fix data types of the
15789	counters.
15790
157912011-05-16  Sergey Poznyakoff  <gray@gnu.org.ua>
15792
15793	Bugfixes.
15794
15795	* libmailutils/cfg/parser.y (STRTONUM, STRxTONUM)
15796	(GETSNUM, GETUNUM): Remove unused arguments.
15797	* libmailutils/stream/tcp.c (mu_tcp_stream_create_from_sa):
15798	Take care not to destroy sockaddr arguments in case of failure.
15799
158002011-03-31  Sergey Poznyakoff  <gray@gnu.org.ua>
15801
15802	Bugfixes.
15803
15804	* libmailutils/filter/base64.c (_base64_encoder): Fix for the
15805	case when cmd==mu_filter_lastbuf and isize==0.
15806	* libmailutils/stream/tcp.c
15807	(mu_tcp_stream_create_with_source_ip)
15808	(mu_tcp_stream_create_with_source_host): Don't treat EAGAIN and
15809	EINPROGRESS as errors.
15810	* libproto/mailer/smtp.c (smtp_open): Free sockaddr if
15811	mu_tcp_stream_create_from_sa failed.
15812	* libproto/pop/mbox.c (pop_open): Likewise.
15813	* mu/imap.c (com_connect): Likewise.
15814	* mu/pop.c (com_connect): Likewise.
15815
158162011-03-31  Sergey Poznyakoff  <gray@gnu.org.ua>
15817
15818	cidr: Implement simplified IPv6 formats.
15819
15820	* include/mailutils/cidr.h (MU_CIDR_FMT_SIMPLIFY): New format
15821	flag.
15822	* libmailutils/cidr/tostr.c (format_ipv6_bytes): Take
15823	additional argument, indicating whether to simplify the output.
15824	(format_ipv6_bytes_normal)
15825	(format_ipv6_bytes_simplified): New static functions.
15826	(mu_cidr_to_string): Select appropriate ipv6 printer depending
15827	on the MU_CIDR_FMT_SIMPLIFY bit.
15828	* libmailutils/tests/cidr.c (main): New options -s and -S
15829
158302011-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
15831
15832	Version 2.99.90.
15833
158342011-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
15835
15836	New configuration options to disable groups of utilities.
15837
15838	* am/enable.m4 (MU_ENABLE_BUILD): Take optional 6th argument.
15839	If given, append $1 to it.
15840	* configure.ac: New options: --enable-build-servers and
15841	--enable-build-clients. Print a list of selected utilities at
15842	the end of the run.
15843	* README: Document new options.
15844
158452011-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
15846
15847	Bugfix.
15848
15849	* libmailutils/sockaddr/fromnode.c [!MAILUTILS_IPV6] Handle
15850	AF_UNSPEC same way as AF_INET. Do not bail out if service is
15851	not given, assume port = 0 instead.
15852	* mailutils/base/version.c (mu_conf_option): Reflect IPv6
15853	support.
15854
158552011-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
15856
15857	Implement IPv6 support.
15858
15859	* am/ipv6.m4: New file.
15860	* examples/sa.c: New file.
15861	* include/mailutils/cidr.h: New file.
15862	* include/mailutils/sockaddr.h: New file.
15863	* libmailutils/cidr/Makefile.am: New file.
15864	* libmailutils/cidr/fromsa.c: New file.
15865	* libmailutils/cidr/fromstr.c: New file.
15866	* libmailutils/cidr/match.c: New file.
15867	* libmailutils/cidr/tosa.c: New file.
15868	* libmailutils/cidr/tostr.c: New file.
15869	* libmailutils/sockaddr/Makefile.am: New file.
15870	* libmailutils/sockaddr/copy.c: New file.
15871	* libmailutils/sockaddr/create.c: New file.
15872	* libmailutils/sockaddr/free.c: New file.
15873	* libmailutils/sockaddr/fromnode.c: New file.
15874	* libmailutils/sockaddr/insert.c: New file.
15875	* libmailutils/sockaddr/ipaddr.c: New file.
15876	* libmailutils/sockaddr/str.c: New file.
15877	* libmailutils/sockaddr/unlink.c: New file.
15878	* libmailutils/sockaddr/url.c: New file.
15879	* libmailutils/tests/cidr.c: New file.
15880	* configure.ac: Call MU_ENABLE_IPV6. Build
15881	libmailutils/sockaddr and libmailutils/cidr.
15882	* examples/.gitignore: Add mblconv and sa
15883	* examples/Makefile.am: (noinst_PROGRAMS): Add sa.
15884	* examples/aclck.c: Use new ACL API.
15885	* examples/echosrv.c: Use new mserv API.
15886	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
15887	cidr.h and sockaddr.h
15888	* include/mailutils/acl.h (mu_acl_append, mu_acl_prepend)
15889	(mu_acl_insert): Change signatures.
15890	* include/mailutils/debug.h (mu_sockaddr_to_str): Remove proto.
15891	* include/mailutils/mailutils.h: Include cidr.h and sockaddr.h
15892	* include/mailutils/server.h (mu_ip_server_create): Change
15893	signature.
15894	(mu_ip_server_get_sockaddr): Likewise.
15895	(mu_m_server_set_default_address)
15896	(mu_m_server_get_default_address): Remove.
15897	* include/mailutils/stream.h (mu_tcp_stream_create_from_sa):
15898	New proto.
15899	* include/mailutils/types.hin (mu_cidr, mu_sockaddr): New
15900	structs.
15901	* include/mailutils/url.h (MU_URL_IPV6): New flag.
15902	(MU_URL_PARSE_DSLASH_OPTIONAL): New parse flag.
15903	* libmailutils/Makefile.am: Descend into cidr and sockaddr.
15904	Link in libcidr and libsockaddr.
15905	* libmailutils/diag/debug.c (mu_debug_log_begin): Flush
15906	mu_strerr.
15907	* libmailutils/diag/errors (MU_ERR_NONAME)
15908	(MU_ERR_BADFLAGS,MU_ERR_SOCKTYPE)
15909	(MU_ERR_FAMILY,MU_ERR_SERVICE): New errors.
15910	* libmailutils/server/acl.c: Rewrite API using mu_cidr.
15911	* libmailutils/server/ipsrv.c: Rewrite AI using mu_sockaddr.
15912	* libmailutils/server/msrv.c: Likewise.
15913	* libmailutils/stream/tcp.c: Likewise.
15914	* libmailutils/tests/.gitignore: Add cidr.
15915	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add cidr.
15916	* libmailutils/tests/url-parse.c: Support command line options
15917	to tune the parsing.
15918	* libmailutils/tests/url.at: Pass options to url-parse.
15919	* libmailutils/url/create.c (getkn): Return meaningful error
15920	code.
15921	(_mu_url_ctx_parse_host): Accept IPv6 addresses. Set the
15922	MU_URL_IPV6 flag if one is given.
15923	(_mu_url_ctx_parse): Unless MU_URL_PARSE_DSLASH_OPTIONAL flag
15924	is given, request :// after scheme part.
15925	(mu_url_create): Add MU_URL_PARSE_DSLASH_OPTIONAL flag.
15926	* libmu_cfg/acl.c: Use new ACL API.
15927	* mu/acl.c: Likewise.
15928	* libproto/mailer/smtp.c (smtp_open): Use
15929	mu_tcp_stream_create_from_sa
15930	* libproto/pop/mbox.c (pop_open): Likewise.
15931	* mu/imap.c (com_connect): Likewise.
15932	* mu/pop.c (com_connect): Likewise.
15933	* testsuite/smtpsend.c (main): Likewise.
15934
159352011-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
15936
15937	Minor fix.
15938
15939	* mh/tests/comp.at: Remove trailing whitespace before
15940	comparisons
15941
159422011-03-23  Sergey Poznyakoff  <gray@gnu.org.ua>
15943
15944	New filter "c-escape".
15945
15946	* libmailutils/filter/c-escape.c: New file.
15947	* include/mailutils/filter.h (mu_c_escape_filter): New extern.
15948	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
15949	c-escape.c
15950	* libmailutils/filter/filter.c (mu_filter_get_list): Add
15951	mu_c_escape_filter to the list.
15952
159532011-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
15954
15955	More bugfixes.
15956
15957	* examples/mblconv.c (main): Return 0.
15958	* examples/murun.c (main): Fix iteration body.
15959	* imap4d/append.c: Do not pass constructed string as format
15960	argument to io_completion_response, use %s instead.
15961	* imap4d/close.c: Likewise.
15962	* imap4d/create.c: Likewise.
15963	* imap4d/delete.c: Likewise.
15964	* imap4d/rename.c: Likewise.
15965	* imap4d/status.c: Likewise.
15966	* libmailutils/base/mutil.c (mutil_parse_field_map): Fix return
15967	code in case of wordsplit failure.
15968	* libmailutils/cfg/parser.y (GETSNUM): Initialize sign.
15969	* libmailutils/stream/streamref.c (_streamref_ctl)
15970	<MU_IOCTL_SEEK_LIMITS>: Initialize lim.
15971	* libmailutils/string/wordsplit.c: Typecast format width
15972	arguments to int.
15973	* libmu_sieve/extensions/vacation.c (check_db): Initialize
15974	days. Pass correct time value to test_and_update_prop.
15975	* libproto/pop/mbox.c (pop_create_pop3_message): Fix return
15976	code.
15977	* mail/mail.c (do_and_quit): Pass the command to
15978	util_do_command via the %s format.
15979	* mail/unset.c (mail_unset): Likewise.
15980	* mh/mh_fmtgram.y (function production): Likewise for mu_error.
15981	* mu/logger.c (mutool_logger): Fix return code in case of
15982	mu_stdstream_strerr_create failure.
15983
159842011-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
15985
15986	Bugfixes.
15987
15988	* comsat/action.c (action_echo): Set omit_newline.
15989	* libmailutils/mailbox/mbx_default.c: Return 0 on success. Fix
15990	memory overrun.
15991	* libproto/mailer/smtp.c (smtp_open): Protect tls-related code
15992	with #ifdef WITH_TLS.
15993	* libproto/pop/mbox.c (pop_open): Likewise.
15994	* mu/imap.c (com_connect): Likewise.
15995	* mh/mhn.c (split_args): Preserve quotes.
15996	(mhn_compose_command): Handle type arguments (%a escape).
15997	(mhn_show_command): Likewise.
15998	(store_handler): Fix call to mh_getyn.
15999	(edit_mime): Pass typeargs to mhn_compose_command. Fix test for
16000	missing filename.
16001	* mh/tests/ali.at (ali04): The test wrongly assumed that the
16002	`root' group has some members.
16003	* mh/tests/folder.at: Always sort the output from find.
16004	* mh/tests/rmf.at: Likewise.
16005	* mh/tests/mhn.at: Likewise. Filter out timestamps from the tar
16006	output produced by mhn.
16007	* tests/testsuite.at (MH_SETUP): Define moreproc.
16008	* mh/tests/mhparam.at: Account for changes in mh_profile
16009
160102011-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16011
16012	message_stream: deduce default envelope address from the
16013	current user email.
16014
16015	* libmailutils/stream/message_stream.c: Unless specified
16016	otherwise, set envelope address based on the current user
16017	email.
16018	* mh/tests/burst.at: Remove all X-Envelope headers before
16019	comparison.
16020
160212011-03-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16022
16023	mail: bugfix.
16024
16025	* mail/mailline.c (ml_readline_internal): Remove trailing \n.
16026
160272011-03-07  Sergey Poznyakoff  <gray@gnu.org.ua>
16028
16029	New global variable mu_site_rcfile keeps the name of the
16030	site-wide configuration file.
16031
16032	* include/mailutils/gocs.h (mu_site_rcfile): New extern.
16033	* include/mailutils/libcfg.h (MU_CONFIG_FILE): Remove.
16034	(mu_register_cfg_capa): Remove proto.
16035	(mu_libcfg_register_capa): New proto.
16036	* libmailutils/cfg/gocs.c (mu_site_rcfile): New variable.
16037	* libmu_argp/muinit.c (mu_app_init): Use mu_site_rcfile instead
16038	of MU_CONFIG_FILE. Destroy parse_tree when no longer needed.
16039	* libmu_cfg/init.c (cfg_capa_table): Static.
16040	(find_cfg_capa): Likewise.
16041	(reserved_name): Treat names starting with dot as reserved.
16042	(mu_libcfg_register_capa): New function.
16043	(mu_libcfg_parse_config): Use mu_site_rcfile instead of
16044	MU_CONFIG_FILE.
16045	* mu/query.c (mutool_query): Use mu_site_rcfile instead of
16046	MU_CONFIG_FILE.
16047
160482011-03-05  Sergey Poznyakoff  <gray@gnu.org.ua>
16049
16050	Simplify mu_cfg_tree_reduce.
16051
16052	This function used to handle include/program statements, which
16053	is useless now, as these are expanded by
16054	mu_cfg_tree_postprocess.
16055
16056	* include/mailutils/cfg.h (mu_cfg_tree_reduce): Change
16057	signature.
16058	(mu_format_config_tree): Change signature.
16059	(mu_config_clone_root_container): New proto.
16060	(mu_config_register_section): Rename to
16061	mu_config_root_register_section.
16062	mu_config_container_register_section. All uses changed.
16063	(mu_config_root_register_section): New proto.
16064	* libmailutils/cfg/driver.c (prog_parser)
16065	(_cb_include): Remove unnecessary code.
16066	(mu_build_container): Simplify. All uses updated.
16067	(mu_cfg_tree_reduce): Simplify invocation. All uses updated.
16068	* libmu_argp/muinit.c (mu_app_init): Re-implement --config-help
16069	support.
16070	* sieve/sieve.c (sieve_cfg_param): Fix docstring for "debug".
16071	* sieve/tests/testsuite.at (MUT_SIEVE_DEFAULT_OPTIONS): New
16072	variable.
16073	(MUT_SIEVE_CMDLINE): Include MUT_SIEVE_DEFAULT_OPTIONS.
16074	(MUT_SIEVE_COMPILE): Pass MUT_SIEVE_DEFAULT_OPTIONS to sieve.
16075
160762011-03-05  Sergey Poznyakoff  <gray@gnu.org.ua>
16077
16078	Introduce "parser hints", to provide better control over
16079	configuration parsing.
16080
16081	* include/mailutils/cfg.h (mu_cfg_parse_hints): New struct.
16082	(mu_cfg_tree_postprocess): Change signature. Last argument is
16083	struct mu_cfg_parse_hints *.
16084	(MU_CFG_PARSE_SITE_RCFILE,MU_CFG_PARSE_CUSTOM_RCFILE)
16085	(MU_CFG_PARSE_PROGRAM): New flags.
16086	(mu_cfg_parse_config): New proto.
16087	* libmailutils/cfg/lexer.l (mu_get_config): Fix call to
16088	mu_cfg_tree_postprocess.
16089	* libmailutils/cfg/parser.y (do_include): Takes hints as 2nd
16090	argument.
16091	(mu_cfg_tree_postprocess): Likewise.
16092	(mu_cfg_parse_config): New function.
16093	* libmu_cfg/init.c (mu_libcfg_parse_config): Rewrite as a
16094	wrapper over mu_cfg_parse_config.
16095	* libmu_argp/muinit.c (mu_app_init): Update.
16096	* mu/query.c: New option --program.
16097	(mutool_query): Use mu_cfg_parse_config interface.
16098
160992011-03-04  Sergey Poznyakoff  <gray@gnu.org.ua>
16100
16101	mu: improve query interface.
16102
16103	* include/mailutils/cfg.h (mu_cfg_node) <parent>: New member.
16104	(MU_CFG_FMT_VALUE_ONLY)
16105	(MU_CFG_FMT_PARAM_PATH): New flags.
16106	* libmailutils/cfg/format.c (format_path): New static.
16107	(format_node,format_node_end): Handle new flags.
16108	(mu_cfg_format_node): Clear MU_CFG_FMT_VALUE_ONLY if the
16109	requested node is mu_cfg_node_statement.
16110	* libmailutils/cfg/parser.y: Set node parents.
16111	(mu_cfg_find_node): Fix coredump.
16112	* mu/query.c: New options --value and --path.
16113
161142011-03-04  Sergey Poznyakoff  <gray@gnu.org.ua>
16115
16116	Bugfixes.
16117
16118	* libmailutils/server/acl.c (_run_entry): Fix log output.
16119	* mu/shell.c: Fix compilation without readline.
16120
161212011-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
16122
16123	Minor changes.
16124
16125	* libmu_scm/Makefile.am (DOT_X_FILES, DOT_DOC_FILES): Add
16126	mu_debug.x and mu_debug.doc.
16127	* mail/send.c (fill_body): Remove extra \n after null message
16128	body diagnostics.
16129
161302011-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16131
16132	Scheme: add primitives for manipulating the MU debug levels.
16133
16134	* include/mailutils/debug.h (mu_debug_get_iterator): New proto.
16135	* libmailutils/diag/debug.c (mu_debug_get_iterator): New
16136	function.
16137	* libmu_scm/Makefile.am (lib_LTLIBRARIES): Add mu_debug.c.
16138	* include/mailutils/guile.h (mu_scm_debug_init): New proto.
16139	* libmu_scm/mu_scm.c (mu-register-format): Bugfix.
16140	(mu_scm_init): Call mu_scm_debug_init.
16141
161422011-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
16143
16144	Bugfix.
16145
16146	* libmailutils/base/amd.c: Add more debugging info. Always
16147	check the return from amd_pool_open and amd_check_message
16148	(which returns int now) and act accordingly.
16149
161502011-01-16  Sergey Poznyakoff  <gray@gnu.org.ua>
16151
16152	Add useful debugging hooks.
16153
16154	* libmailutils/diag/bt.c: New file.
16155	* libmailutils/diag/wd.c: New file.
16156	* libmailutils/diag/Makefile.am (libdiag_la_SOURCES): Add bt.c
16157	and wd.c
16158	* include/mailutils/debug.h (mu_gdb_bt, mu_wd): New protos.
16159	* include/mailutils/util.h (mu_getmaxfd): New protos.
16160	* libmailutils/base/getmaxfd.c: New file.
16161	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add
16162	getmaxfd.c
16163	* libmailutils/server/acl.c: Use mu_getmaxfd.
16164	* libmailutils/stream/prog_stream.c: Likewise.
16165	* mh/mh_whatnow.c: Likewise.
16166	* libmu_scm/mu_body.c (mu-body?): Bugfix.
16167
161682011-01-15  Sergey Poznyakoff  <gray@gnu.org.ua>
16169
16170	libmailutils: bugfix.
16171
16172	* libmailutils/mime/attachment.c (_attachment_setup): Remove
16173	improper initialization of msg.
16174	(mu_message_encapsulate): Initialize info->msg.
16175
161762011-01-15  Sergey Poznyakoff  <gray@gnu.org.ua>
16177
16178	imap4d: redo signal handling.
16179
16180	Previously implemented way of signal handling was unsafe
16181	because of the use of unsafe functions in signal handlers. It
16182	also allowed for recursive invocations of MU calls not supposed
16183	to handle recursion (such as mu_mailbox_expunge, for example).
16184	This changeset fixes it.
16185
16186	* imap4d/imap4d.c (imap4d_child_signal_setup): Change signal
16187	set.
16188	(imap4d_mainloop): Set a jump point for signal handling.
16189	Restore default handling for SIGILL, SIGBUS, SIGFPE, SIGSEGV,
16190	SIGSTOP.
16191	(master_jmp): New variable.
16192	(imap4d_master_signal): New function.
16193	(main): Redo signal handling.
16194	* imap4d/imap4d.h (child_jmp): New extern.
16195	(imap4d_enter_critical,imap4d_leave_critical): New protos.
16196	* imap4d/signal.c (imap4d_master_signal): Move to imap4d.c
16197	(imap4d_enter_critical,imap4d_leave_critical): New functions.
16198	(imap4d_child_signal): Rewrite.
16199	* imap4d/append.c: Protect critical sections.
16200	* imap4d/bye.c: Likewise.
16201	* imap4d/close.c: Likewise.
16202	* imap4d/copy.c: Likewise.
16203	* imap4d/delete.c: Likewise.
16204	* imap4d/expunge.c: Likewise.
16205	* imap4d/rename.c: Likewise.
16206	* imap4d/select.c: Likewise.
16207	* imap4d/status.c: Likewise.
16208	* scheme/Makefile.am (sievemod_DATA): Add guimb.scmi.
16209
162102011-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
16211
16212	imap4d: don't issue spurious unsolicited responses after
16213	EXPUNGE.
16214
16215	* imap4d/expunge.c (imap4d_expunge): Clear attribute table
16216	before resynching.
16217	* imap4d/imap4d.h (imap4d_sync_invalidate): New extern.
16218	* imap4d/sync.c (invalidate_attr_table): Rename to
16219	imap4d_sync_invalidate; make extern. All callers updated.
16220
162212011-01-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16222
16223	imap4d: complement 435f1918df.
16224
16225	* imap4d/bye.c (imap4d_bye0): Set iostream to NULL, to avoid
16226	further delivery of the SIGPIPE.
16227
162282011-01-08  Sergey Poznyakoff  <gray@gnu.org.ua>
16229
16230	guimb: further improvements.
16231
16232	* libmu_scm/mu_body.c (mu-body?): New function.
16233	* libmu_scm/mu_mailbox.c (mu-mailbox?): New function.
16234	* libmu_scm/mu_message.c (mu-message?): New function.
16235	* libmu_scm/mu_mime.c (mu-mime?): New function.
16236	* scheme/guimb.scmi (guimb-process-mailbox): guimb-message
16237	returns a message to be appended to the output mailbox.
16238
162392011-01-07  Sergey Poznyakoff  <gray@gnu.org.ua>
16240
16241	Reincarnate guimb as a pure Scheme program.
16242
16243	* libmu_scm/mailutils.scm.in: Move to
16244	libmu_scm/mailutils/mailutils.scm.in. Use the
16245	MAILUTILS_SCM_LIBRARY_ROOT environment variable to load
16246	libraries from the specified location (to be used in tests).
16247	* libmu_scm/mailutils/.gitignore: New file.
16248	* libmu_scm/mailutils/Makefile.am: New file.
16249	* libmu_scm/Makefile.am (SUBDIRS): Add mailutils
16250	(mailutils.scm): Remove goal and associated variables.
16251	* scheme/guimb.scmi: New file. Reincarnation of guimb.
16252	* scheme/Makefile.am: Build guimb from guimb.scmi.
16253	* scheme/sieve2scm.scmi (sieve-version): Use mu-package and
16254	mu-version global variables.
16255	* configure.ac (AC_CONFIG_FILES): Add
16256	libmu_scm/mailutils/Makefile.
16257
162582011-01-06  Sergey Poznyakoff  <gray@gnu.org.ua>
16259
16260	Minor changes in scheme-related code.
16261
16262	* libmu_scm/mu_scm.c (_mu_scm_bugreport, mu-bugreport): New
16263	variable.
16264	(format_table): Add pops and imaps.
16265	* scheme/reject.scm: Minor changes.
16266	* scheme/sieve2scm.scmi: Minor changes.
16267
162682011-01-02  Sergey Poznyakoff  <gray@gnu.org.ua>
16269
16270	Update copyright years.
16271
16272	Happy GNU year!
16273
162742010-12-31  Sergey Poznyakoff  <gray@gnu.org.ua>
16275
16276	Remove guimb.
16277
16278	It was inoperational since 2009-03-27 and nobody complained, so
16279	it seems to not be reclaimed at all. FWIW, it will be easy to
16280	recreate it entirely in Scheme, should the need be.
16281
16282	* guimb/.gitignore: Remove.
16283	* guimb/Makefile.am: Remove.
16284	* guimb/collect.c: Remove.
16285	* guimb/guimb.h: Remove.
16286	* guimb/main.c: Remove.
16287	* guimb/util.c: Remove.
16288	* Makefile.am (GUIMB_DIR): Remove.
16289	[MU_COND_LIBMU_SCM] (SCHEME_DIR): New variable.
16290	(SUBDIRS): Add SCHEME_DIR instead of GUIMB_DIR.
16291	* configure.ac (MU_GUILE_SIEVE_MOD_DATA): Remove substitution.
16292	(AC_CONFIG_FILES): Remove guimb and guimb/scm, add scheme
16293	* guimb/scm/.gitignore: move to scheme/.gitignore
16294	* guimb/scm/Makefile.am: move to scheme/Makefile.am
16295	* guimb/scm/README: move to scheme/README
16296	* guimb/scm/mimeheader.scm: move to scheme/mimeheader.scm
16297	* guimb/scm/numaddr.scm: move to scheme/numaddr.scm
16298	* guimb/scm/redirect.scm: move to scheme/redirect.scm
16299	* guimb/scm/reject.scm: move to scheme/reject.scm
16300	* guimb/scm/sieve-core.scm: move to scheme/sieve-core.scm
16301	* guimb/scm/sieve.scm.in: move to scheme/sieve2scm.scmi
16302	* guimb/scm/vacation.scm: move to scheme/vacation.scm
16303
163042010-12-31  Sergey Poznyakoff  <gray@gnu.org.ua>
16305
16306	imap4d: further improvements.
16307
16308	* imap4d/sync.c (notify): Do not emit FETCH replies for recent
16309	messages.
16310
163112010-12-31  Sergey Poznyakoff  <gray@gnu.org.ua>
16312
16313	imap4d: bugfixes.
16314
16315	* imap4d/imap4d.c (idle_timeout): Initialize to the default
16316	value. (Needed for inetd mode)
16317	* imap4d/sync.c: Revamp table handling.
16318
163192010-12-30  Sergey Poznyakoff  <gray@gnu.org.ua>
16320
16321	Provide a function for quick retrieval of message lines.
16322
16323	* include/mailutils/message.h (mu_message_quick_lines): New
16324	proto.
16325	(mu_message_set_lines): Change signature of the 2nd argument.
16326	* include/mailutils/sys/message.h (_mu_message) <lines>: Change
16327	signature.
16328	* libmailutils/diag/errors (MU_ERR_INFO_UNAVAILABLE): New error
16329	code.
16330	* libmailutils/mailbox/message.c (mu_message_set_lines): Change
16331	signature of the 2nd argument.
16332	(mu_message_lines): Update call to the _lines method.
16333	(mu_message_quick_lines): New function.
16334	* libproto/pop/mbox.c (_POP3_MSG_LINES): New flag.
16335	(_pop3_message)<message_lines>: New member.
16336	(pop_create_pop3_message): New function.
16337	(pop_scan): Use LIST to obtain scan listing.
16338	(pop_message_lines): New function.
16339	(pop_create_message): Set _lines method.
16340	(pop_get_message): Use pop_create_pop3_message.
16341	* mail/from.c (hdr_quick_lines): New function.
16342	(compile_headline): New escape %L
16343	* pop3d/capa.c (pop3d_capa): Show XLINES capability if
16344	configured.
16345	* pop3d/list.c (pop3d_list): Optionally output the number of
16346	lines in the message.
16347	* pop3d/pop3d.c (pop3d_xlines): New global.
16348	(pop3d_cfg_param): New statement "scan-lines".
16349	* pop3d/pop3d.h (pop3d_xlines): New extern.
16350
163512010-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>
16352
16353	amd: bugfixes; speed up expunging.
16354
16355	* libmailutils/base/amd.c (_amd_message_delete): Remove.
16356	(amd_array_expand): Fix element size.
16357	(amd_array_shrink): Rewrite.
16358	(amd_expunge): Shrink the array once, after everything has been
16359	expunged. Generate MU_EVT_MAILBOX_MESSAGE_EXPUNGE for each
16360	expunged message.
16361
163622010-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>
16363
16364	Make sure debugging calls don't dump core even if mu_strerr is
16365	not initialized.
16366
16367	* libmailutils/diag/debug.c (mu_debug_log, mu_debug_log_begin):
16368	Call mu_diag_init.
16369
163702010-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>
16371
16372	Bugfixes.
16373
16374	* libmailutils/url/create.c (_mu_url_create_internal): Fix
16375	parsing of the '|' shortcuts.
16376	* libmailutils/tests/url.at: Fix '|' test. Add 'prog://' test.
16377	* movemail/movemail.c (set_program_id): Call
16378	mu_stdstream_strerr_setup to flush changes.
16379	* frm/common.c: Minor changes
16380
163812010-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
16382
16383	frm: minor cleanup.
16384
16385	* frm/common.c (select_message, msg_index): Remove; use action
16386	data instead.
16387	(action): Use action data to get the selection function and
16388	message index.
16389	(frm_scan): Pass these data in action closure.
16390
163912010-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
16392
16393	imap4d: speed up asynchronous mailbox notifications.
16394
16395	* imap4d/imap4d.h (util_format_attribute_flags): New prototype.
16396	* imap4d/sync.c: Rewrite using flag table to keep attribute
16397	flags, mu_mailbox_translate to convert uids to message numbers
16398	and MU_EVT_MAILBOX_MESSAGE_EXPUNGE event to report expunged
16399	messages.
16400	* imap4d/util.c (_imap4d_attrlist): Remove \Recent
16401	(util_attribute_to_type): Handle \Recent separately.
16402	(util_format_attribute_flags): New function.
16403	(util_print_flags): Rewrite as an extra entry point to the
16404	above.
16405
16406	mailboxes: New event MU_EVT_MAILBOX_MESSAGE_EXPUNGE.
16407	* include/mailutils/observer.h: Rearrange and partially rename
16408	event constants (all uses updated): MU_EVT_MESSAGE_APPEND =>
16409	MU_EVT_MAILBOX_MESSAGE_APPEND MU_EVT_AUTHORITY_FAILED =>
16410	MU_EVT_FOLDER_AUTHORITY_FAILED
16411	(MU_EVT_MAILBOX_MESSAGE_EXPUNGE): New event.
16412	* libproto/mbox/mbox.c: Generate
16413	MU_EVT_MAILBOX_MESSAGE_EXPUNGE.
16414	* libproto/pop/mbox.c: Likewise.
16415	* libmailutils/base/amd.c: Likewise.
16416
164172010-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
16418
16419	mh,maildir: speed up scanning.
16420
16421	* include/mailutils/sys/amd.h (_amd_message_append, amd_sort):
16422	New protos.
16423	* libmailutils/base/amd.c (amd_array_expand): Call memmove only
16424	if there is actually something to move.
16425	(_amd_message_append, amd_sort): New functions.
16426	* libproto/maildir/mbox.c (maildir_scan_dir): Append new
16427	messages to the end of the array, and sort it afterward. This
16428	avoids unnecessary memory moves, which improves performance
16429	considerably, especially on large mailboxes.
16430	* libproto/mh/mbox.c (mh_scan0): Likewise.
16431
164322010-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
16433
16434	Various fixes.
16435
16436	* libmu_sieve/extensions/vacation.c (build_mime): Remove
16437	superfluous seek.
16438	(test_and_update_prop): days==0 means "forever", i.e. send a
16439	replay to each user only once.
16440	(vacation_reply): If :file tag is given, treat the argument as
16441	the name of a file containing the reply message.
16442	(vacation_tags): Add "sender" and "file" tags.
16443	* libmu_sieve/extensions/moderator.c: Always unref transport
16444	stream after passing it to mu_stream_to_message.
16445	* maidag/lmtp.c: Likewise.
16446	* mh/mh_stream.c: Likewise.
16447	* mh/prompter.c: Likewise.
16448	* mh/burst.c (flush_stream): Remove extra unref.
16449	* sieve/sieve.c: Likewise.
16450	* testsuite/smtpsend.c: Likewise.
16451
164522010-12-27  Sergey Poznyakoff  <gray@gnu.org.ua>
16453
16454	vacation: remove dependency on DBM; other minor fixes.
16455
16456	* libmu_sieve/extensions/vacation.c: Use _sget accessors where
16457	possible. Use mu_property_t instead of db database.
16458	* libmu_sieve/sieve.y (mu_sieve_get_mailer): Verbosely report
16459	errors.
16460	* libmailutils/base/locker.c (mu_locker_create): Create the
16461	locker if the file name part of its full name does not exist.
16462
164632010-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
16464
16465	Bugfixes.
16466
16467	* libmu_auth/tls.c (_tls_ioctl): Fix typo (opcode used instead
16468	of code).
16469	* mu/filter.c (mutool_filter): Reference mu_strin to prevent it
16470	from destroying.
16471	* testsuite/smtpsend.c (main): Call mu_stdstream_setup.
16472
164732010-12-25  Sergey Poznyakoff  <gray@gnu.org.ua>
16474
16475	pop client and movemail: bugfixes.
16476
16477	* libproto/pop/mbox.c (pop_close): Destroy the cached data.
16478	(pop_destroy): Avoid freeing the same data twice.
16479	(pop_body_get_stream,pop_body_size,pop_body_lines): Owner is
16480	mu_message_t.
16481	(pop_create_body): Change the owner of the created mu_body_t
16482	object.
16483	* movemail/movemail.c: Correctly close both mailboxes if
16484	unhandled errors occur.
16485
164862010-12-24  Sergey Poznyakoff  <gray@gnu.org.ua>
16487
16488	Minor bugfix.
16489
16490	* mail/escape.c (run_editor): Fix a typo.
16491
164922010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16493
16494	movemail: minor improvements.
16495
16496	* libmailutils/base/list.c (list_itrctl): Accept
16497	mu_itrctl_set_direction and mu_itrctl_qry_direction even if
16498	mu_iterator_first has not been called yet.
16499	* movemail/movemail.c: Rewrite using iterators.
16500	* libmailutils/mailer/mailer.c (safe_address_create): Bugfix.
16501
165022010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16503
16504	Bugfix (complements 6bd92d3c07).
16505
16506	* libmu_sieve/util.c (mu_sieve_error, mu_sieve_debug)
16507	(mu_sieve_log_action): Format location only if locus.mu_file is
16508	not NULL.
16509
165102010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16511
16512	mailbox iterator: implement reverse direction and itrctl.
16513
16514	* libmailutils/mailbox/mbxitr.c (mailbox_iterator)<backwards>:
16515	New member.
16516	(mbx_first): Position to the last message if itr->backwards is
16517	set.
16518	(mbx_next): Decrement index if itr->backwards is set.
16519	(mbx_finished_p): Take into account iteration direction.
16520	(mbx_itrctl): new method.
16521	(mu_mailbox_get_iterator): Set itrctl method.
16522
165232010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16524
16525	movemail: various improvements.
16526
16527	New configuration options allow to specify the maximum number
16528	of messages to be copied and control the actions of movemail
16529	when an error occurs while appending a message.
16530
16531	* movemail/movemail.c (ONERROR_OPTION,MAX_MESSAGES_OPTION): New
16532	option codes.
16533	(options): New options --onerror and --max-messages.
16534	(max_messages_option, onerror_flags): New variable.
16535	(ONERROR_SKIP, ONERROR_DELETE, ONERROR_COUNT): New defines.
16536	(parse_opt): Handle ONERROR_OPTION.
16537	(cb_onerror): New callback.
16538	(movemail_cfg_param): New configuration statements:
16539	"max-messages" and "onerror".
16540	(move_message): Delete the message if ONERROR_DELETE is set.
16541	(main): Handle the limit on the number of processed messages
16542	and onerror flags. Use mu_mailbox_expunge instead of
16543	mu_mailbox_flush. This preserves the attributes of not
16544	processed options (in case max_messages_option is not 0) and
16545	speeds up the things considerably, especially on huge
16546	mailboxes.
16547
165482010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16549
16550	mailer: minor improvement.
16551
16552	Be more liberal when guessing sender and recipient names.
16553	Tolerate deviations from RFC822.
16554
16555	* libmailutils/mailer/mailer.c (copy_fragment)
16556	(recover_email, safe_address_create): New functions.
16557	(_set_from, _set_to): Use safe_address_create.
16558
165592010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16560
16561	Bugfixes.
16562
16563	* frm/common.c [!HAVE_LIBFRIBIDI] (puts_bidi): Fix definition.
16564	* libproto/pop/mbox.c (pop_destroy): Fix coredump (occurred if
16565	the mailbox has not been scanned).
16566
165672010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16568
16569	Bugfixes.
16570
16571	* libmailutils/base/lcall.c (mu_parse_lc_all): Allow for
16572	arg==NULL.
16573	* mh/Makefile.am: Define mhlibdir.
16574	* mh/pick.y (match_header): Use sget accessors.
16575	* mh/repl.c: Accept -noquery silently.
16576
165772010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16578
16579	mail: fix the "shell" ("!") command.
16580
16581	* mail/mail.h (mail_execute): Change signature. All callers
16582	updated.
16583	* mail/shell.c (expand_bang): Change signature. Take the string
16584	to be expanded as the 2nd and the last command as 3rd
16585	arguments. Always allocate the return string, even if there's
16586	nothing to expand.
16587	(mail_execute): fix memory management.
16588	* mail/escape.c: Update.
16589	* mail/escape.c: Update calls to mail_execute.
16590
165912010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16592
16593	Follow-up to the previous commit.
16594
16595	* libmu_sieve/util.c: Update.
16596
165972010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16598
16599	Bugfixes.
16600
16601	* libmailutils/stream/logstream.c (_log_ctl): Handle
16602	MU_IOCTL_SYSLOGSTREAM, pass it to the transport stream.
16603	* libmu_sieve/sieve.l (pop_source): Restore input_stream.
16604	* libmu_sieve/util.c (mu_sieve_error, mu_sieve_debug)
16605	(mu_sieve_log_action): Set location information on the
16606	errstream.
16607
166082010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
16609
16610	sieve: test "list" extension test.
16611
16612	* sieve/tests/list.at: New file.
16613	* sieve/tests/Makefile.am (TESTSUITE_AT): Add list.at.
16614	* sieve/tests/testsuite.at: Include list.at.
16615
166162010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16617
16618	Improve debug parser and output functions.
16619
16620	New parser accepts range specifications (mailbox.trace3-prot).
16621	mu_debug_format_spec outputs specs in the canonical form.
16622
16623	* include/mailutils/debug.h (MU_DEBUG_LEVEL_RANGE): New macro.
16624	(mu_debug_set_category_level): Change return type to int.
16625	(mu_debug_get_category_level): New proto.
16626	* libmailutils/diag/debug.c (mu_debug_set_category_level):
16627	Change return type to int.
16628	(mu_debug_get_category_level): New function.
16629	(mu_debug_level_from_string): New function.
16630	(parse_spec): Accept range specification. Negation at the start
16631	of spec implies 'proto'.
16632	(mu_debug_format_spec): Rewrite.
16633	* libmailutils/tests/debugspec.c: New file.
16634	* libmailutils/tests/debugspec.at: New file.
16635	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
16636	debugspec.
16637	(TESTSUITE_AT): add debugspec.at
16638	* libmailutils/tests/testsuite.at: Include debugspec.at.
16639	* libmailutils/tests/.gitignore: Add debugspec.
16640	* sieve/sieve.c: Do not advertise 'T' and 'P' arguments to
16641	--debug.
16642	(debug_level): Remove.
16643	(set_debug_level): Rewrite the handling of legacy debug
16644	specifiers 'TP'.
16645
166462010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16647
16648	Improve debugging; fix c522de119a.
16649
16650	* include/mailutils/types.hin (mu_debug_handle_t)
16651	(mu_debug_level_t): New data types.
16652	* include/mailutils/debug.h (mu_debug_level_p)
16653	(mu_debug_category_level)
16654	(mu_debug_set_category_level): Change argument types to
16655	mu_debug_handle_t/mu_debug_level_t.
16656	* libmailutils/diag/debug.c: Likewise.
16657	* libmailutils/server/acl.c (_run_entry): Call mu_debug_log_nl
16658	instead of mu_debug_log_end with an empty format string.
16659	* include/mailutils/sieve.h
16660	* libmailutils/filter/base64.c
16661	* libmailutils/stream/stream.c
16662	* libmu_sieve/conf.c
16663	* libmu_sieve/extensions/spamd.c
16664	* libmu_sieve/sieve.y
16665	* sieve/sieve.c: Commit the changes c522de119a failed to
16666	commit.
16667
166682010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16669
16670	Bugfixes.
16671
16672	* libmailutils/filter/iconvflt.c (_icvt_decoder): Do not
16673	iconv_close if cd is -1.
16674	* mh/mboxprop.c (mh_mailbox_get_cur): Ignore whitespace
16675	following the cur value.
16676
166772010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16678
16679	Minor fixes.
16680
16681	* libmu_sieve/extensions/pipe.c: Include sys/wait.h
16682	* testsuite/Makefile.am: Distribute testsuite.inc
16683
166842010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16685
16686	filter stream: make sure all input data get processed.
16687
16688	* include/mailutils/filter.h (MU_FILTER_MAX_AGAIN): Add a
16689	comment.
16690	* libmailutils/stream/fltstream.c (filter_read): Use mu_debug
16691	on the filter.error level, instead of plain mu_error. If the
16692	xcoder returns OK and does not consume all input when
16693	processing the last buffer, assume mu_filter_again. Fix loop
16694	condition.
16695	(filter_write_internal): Use mu_debug on the filter.error
16696	level, instead of plain mu_error.
16697
166982010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16699
16700	sieve: bugfixes.
16701
16702	* include/mailutils/sieve.h (mu_sieve_debug_handle): New
16703	declaration.
16704	(mu_sieve_debug_init): New prototype.
16705	* libmu_sieve/conf.c (mu_sieve_debug_handle): New global.
16706	(mu_sieve_module_init): Call mu_sieve_debug_init.
16707	* libmu_sieve/extensions/spamd.c (spamd_connect_tcp)
16708	(spamd_connect_socket): Fix stream creation.
16709	(spamd_send_message): Switch to full buffering on the transport
16710	stream and indicate it is a payload (in case transcript is
16711	enabled), before copying data. Restore things to their original
16712	state afterward.
16713	(spamd_read_line): Rewrite using mu_stream_getline.
16714	(decode_float): Additional argument endp. Unless NULL, store
16715	there the position in the input string where the parsing has
16716	stopped.
16717	(parse_response_line): New function.
16718	(spamd_test): Rewrite using new API.
16719	* sieve/sieve.c (parser): --dry-run implies --verbose.
16720	* libmailutils/filter/base64.c (_base64_decoder): when not
16721	enough data are available and cmd is not mu_filter_lastbuf,
16722	return mu_filter_lastbuf.
16723	* libmailutils/stream/stream.c (mu_stream_shutdown): Flush the
16724	buffers before shutting the transport down.
16725	* libmailutils/tests/fltst.c (main): New option bufsize=
16726
167272010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16728
16729	Set library version to 4:0:0.
16730
167312010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16732
16733	sieve: implement an option to add directory to the head of the
16734	library search path.
16735
16736	* TODO: Update.
16737	* include/mailutils/sieve.h (mu_sieve_library_path_prefix): New
16738	variable.
16739	* libmu_argp/sieve.c (sieve_argp_option): New option
16740	--libdir-prefix.
16741	(sieve_argp_parser): Handle --libdir-prefix.
16742	* libmu_cfg/sieve.c (cb_library_path_prefix): New callback.
16743	(mu_sieve_param): New statement "library-path-prefix".
16744	* libmu_sieve/conf.c (mu_sieve_library_path_prefix): New
16745	variable.
16746	(mu_sieve_module_init): Process prefix paths. Do not call
16747	mu_sv_load_add_path.
16748	* libmu_sieve/load.c (sieve_init_load_path): Rewrite.
16749	(mu_sv_load_add_path): Remove.
16750	* libmu_sieve/sieve-priv.h (mu_sv_load_add_path): Remove
16751	declaration.
16752	(sieve_searchpath): Remove the unused "add" parameter.
16753	* sieve/tests/moderator.at: Use MUT_SIEVE_OPTIONS in all tests.
16754	* sieve/tests/testsuite.at (MUT_SIEVE_EXT_TEST): Use
16755	--libdir-prefix option to ensure that our version of the
16756	extension appears first in the path.
16757
167582010-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>
16759
16760	Pop3-client bugfixes (mostly).
16761
16762	* libmailutils/stream/fltstream.c (filter_ctl):
16763	MU_IOCTL_TRANSPORT returns filter transport stream.
16764	* libproto/pop/pop3_rdlist.c (mu_pop3_stream_to_list): Make
16765	sure status is initialized and reflects the actual status.
16766	* libproto/pop/pop3_stream.c (mu_pop3_filter_create): Do not
16767	unref transport stream, it is done by the caller.
16768
167692010-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16770
16771	Minor fixes.
16772
16773	* am/enable.m4 (MU_ENABLE_SUPPORT): Add the additional-cond
16774	argument.
16775	(MU_ENABLE_BUILD): Likewise.
16776	* configure.ac: Update 4th args in calls to MU_ENABLE_SUPPORT.
16777	Do not use MU_ENABLE_BUILD within conditionals, use
16778	additional-cond instead.
16779	* libmailutils/stream/mapfile_stream.c: Include sys/stat.h
16780
167812010-12-20  Sergey Poznyakoff  <gray@gnu.org.ua>
16782
16783	Assorted changes.
16784
16785	* include/mailutils/debug.h (mu_debug_format_spec): New
16786	function.
16787	* include/mailutils/stream.h (MU_IOCTL_SYSLOGSTREAM)
16788	(MU_IOCTL_FILTER): New ioctls.
16789	(MU_IOCTL_LOGSTREAM_GET_SEVERITY_MASK)
16790	(MU_IOCTL_LOGSTREAM_SET_SEVERITY_MASK)
16791	(MU_IOCTL_LOGSTREAM_CLONE) (MU_IOCTL_SYSLOGSTREAM_SET_LOGGER)
16792	(MU_IOCTL_SYSLOGSTREAM_GET_LOGGER)
16793	(MU_IOCTL_FILTER_GET_DISABLED)
16794	(MU_IOCTL_FILTER_SET_DISABLED): And their opcodes.
16795	* include/mailutils/sys/filter.h (_MU_FILTER_DISABLED)
16796	(_MU_FILTER_EOF): New defines.
16797	(_mu_filter_stream) <eof>: Replace with fltflag (a bitmask).
16798	* include/mailutils/sys/logstream.h (_mu_log_stream) <sevmask>:
16799	New member.
16800	* include/mailutils/sys/syslogstream.h (_mu_syslog_stream)
16801	<logger>: New member.
16802	* include/mailutils/util.h (mu_onexit_run): New proto.
16803	* libmailutils/base/onexit.c (_mu_onexit_run): Extra safety
16804	check.
16805	(mu_onexit_run): New function.
16806	(mu_debug_level_str): New static.
16807	(mu_debug_format_spec): New function.
16808	* libmailutils/stream/fltstream.c (filter_read, filter_write):
16809	Bypass the xcoder if _MU_FILTER_DISABLED is set. Use fltflag
16810	instead of the removed eof.
16811	(filter_ctl): Handle MU_IOCTL_FILTER.
16812	* libmailutils/stream/logstream.c (_log_write): The sevmask
16813	member masks out severity prefix output for certain severities.
16814	(_log_ctl): Handle new opcodes (see above).
16815	* libmailutils/stream/syslogstream.c (_syslog_stream_write):
16816	Use <logger>, if supplied, instead of the system syslog(3).
16817	(_syslog_ctl): Handle MU_IOCTL_SYSLOGSTREAM.
16818	(mu_syslog_stream_create): Initialize logger to NULL.
16819	* mu/ldflags.c (lib_descr): Protect entries with the
16820	corresponding #ifdef ENABLE_whatever.
16821
168222010-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
16823
16824	Update TODO.
16825
168262010-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
16827
16828	maildir: speed up mailbox scanning.
16829
16830	* include/mailutils/sys/amd.h (_amd_message_lookup_or_insert):
16831	New proto.
16832	* libmailutils/base/amd.c (_amd_message_lookup_or_insert): New
16833	function.
16834	(_amd_message_insert): Rewrite using
16835	_amd_message_lookup_or_insert.
16836	* libproto/maildir/mbox.c (maildir_message_cmp): Stop
16837	comparison on ':'.
16838	(maildir_message_lookup): Remove.
16839	(maildir_scan_dir): Use _amd_message_lookup_or_insert.
16840	* po/POTFILES.in: Update.
16841
168422010-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
16843
16844	Minor fixes.
16845
16846	* include/mailutils/debug.h (mu_debug_log_nl): New proto.
16847	* libmailutils/diag/debug.c (mu_debug_log_nl): New function.
16848	* libmailutils/mailer/progmailer.c: Use mu_debug_log_nl.
16849	* libmailutils/server/acl.c: Likewise. Also, use
16850	MU_DEBUG_TRACE9 instead of the numeric value.
16851	* libmailutils/filter/iconvflt.c (_iconv_filter): Register
16852	encoder (same as decoder).
16853
168542010-12-19  Wojciech Polak  <polak@gnu.org>
16855
16856	Remove more old debug leftovers from the Python interface.
16857
168582010-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
16859
16860	sieve: improve "pipe" action, implement "pipe" test.
16861
16862	* libmu_sieve/extensions/pipe.c: Allow to specify which parts
16863	of the message should be piped. Implement "pipe" test.
16864	* sieve/tests/pipeact.at: New file.
16865	* sieve/tests/pipetest.at: New file.
16866	* sieve/tests/Makefile.am (TESTSUITE_AT): Add pipeact.at and
16867	pipetest.at
16868	* sieve/tests/testsuite.at: Include pipeact.at and pipetest.at
16869	(MUT_SIEVE_EXT_TEST): Redefine MUT_SIEVE_OPTIONS. Set envar
16870	"cwd". Use cat and heredoc to create prog, instead of using
16871	AT_DATA.
16872	* sieve/tests/moderator.at: Update to these changes.
16873
168742010-12-18  Sergey Poznyakoff  <gray@gnu.org.ua>
16875
16876	libmu_sieve: minor fix.
16877
16878	* libmu_sieve/util.c (mu_sieve_error): Fix typo.
16879
168802010-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
16881
16882	sieve: improve moderator extension.
16883
16884	* libmu_sieve/extensions/moderator.c: Implement the :program
16885	tag. Use _sget_ functions to reduce memory requirements.
16886	* sieve/tests/moderator.mbox: New file.
16887	* sieve/tests/moderator.at: New file.
16888	* sieve/tests/Makefile.am (EXTRA_DIST): Add moderator.mbox.
16889	(TESTSUITE_AT): Add moderator.at
16890	* sieve/tests/testsuite.at (MUT_SIEVE_EXT_NAME): New define.
16891	(MUT_SIEVE_EXT_TEST): New macro. Include moderator.at.
16892
168932010-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
16894
16895	Minor change.
16896
16897	* imap4d/util.c (set_xscript_level): Fix typo.
16898
168992010-12-17  Sergey Poznyakoff  <gray@gnu.org.ua>
16900
16901	Improve debugging in the category "auth".
16902
16903	* libmailutils/auth/mu_auth.c: Fix mu_debug calls. Use
16904	different levels.
16905
16906	Remove --debug-auth option. Users should use --debug-level=auth
16907	instead.
16908	* libmu_argp/auth.c: Remove.
16909	* libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove auth.c
16910	* include/mailutils/libargp.h (mu_auth_cmdline): Remove.
16911	* libmu_argp/cmdline.c (all_cmdline_capa): Remove
16912	mu_auth_cmdline.
16913
169142010-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
16915
16916	Mark unfinished interfaces as experimental so they're not built
16917	by default.
16918
16919	* am/enable.m4 (MU_ENABLE_SUPPORT): Fix the usage of the last
16920	argument.
16921	* configure.ac: Check for --enable-experimental before any
16922	other checks. Mark cxx, python and nntp as experimental.
16923	* mh/tests/mhn.at: Make sure all mailboxes are writable.
16924	* mh/tests/testsuite.at (MTSTAILOR): Fix mailer URL.
16925	* po/POTFILES.in: Comment out unused sources.
16926
169272010-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
16928
16929	Remove the leftovers of mu_debug_t and obsoleted sieve
16930	interfaces.
16931
16932	* include/mailutils/cpp/debug.h: Remove.
16933	* include/mailutils/cpp/Makefile.am (cppinclude_HEADERS):
16934	Remove debug.h
16935	* libmu_cpp/debug.cc: Remove
16936	* libmu_cpp/Makefile.am (libmu_cpp_la_SOURCES): Remove
16937	debug.cc.
16938	* python/libmu_py/debug.c: Remove.
16939	* python/libmu_py/Makefile.am (libmu_py_la_SOURCES): Remove
16940	debug.c
16941	* include/mailutils/cpp/mailbox.h: Remove objects and methods
16942	derived from mu_debug_t.
16943	* include/mailutils/cpp/mailer.h: Likewise.
16944	* include/mailutils/cpp/stream.h: Likewise.
16945	* libmu_cpp/mailbox.cc: Likewise.
16946	* libmu_cpp/mailer.cc: Likewise.
16947	* libmu_cpp/sieve.cc: Likewise. Ditto for mu_sieve_printf_t,
16948	mu_sieve_parse_error_t.
16949	* include/mailutils/cpp/sieve.h: Likewise.
16950	* libmu_cpp/stream.cc: Remove objects and methods derived from
16951	mu_debug_t.
16952	(ProgStream::ProgStream): Use mu_command_stream_create (see
16953	FIXME).
16954	(FilterProgStream::FilterProgStream): Rewrite.
16955	* include/mailutils/python.h: Remove objects and methods
16956	derived from mu_debug_t.
16957	* python/libmu_py/filter.c (api_filter_iconv_create): Rewrite
16958	using mu_filter_create_args.
16959	* python/libmu_py/libmu_py.c: Likewise.
16960	* python/libmu_py/libmu_py.h: Likewise.
16961	* python/libmu_py/mailbox.c: Likewise.
16962	* python/libmu_py/mailer.c: Likewise.
16963	* python/libmu_py/stream.c: Likewise.
16964	* python/libmu_py/url.c: Likewise.
16965	* python/libmu_py/sieve.c: Likewise. Same for
16966	mu_sieve_printf_t, mu_sieve_parse_error_t.
16967
169682010-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
16969
16970	Remove mu_filter_iconv_create.
16971
16972	Callers should use mu_filter_create_args instead.
16973
16974	* examples/iconv.c: Rewrite using mu_filter_create_args.
16975	* libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use
16976	mu_decode_filter.
16977	* imap4d/imap4d.h: Include prog.h
16978	* include/mailutils/filter.h (mu_filter_iconv_create): Mark as
16979	deprecated.
16980	* include/mailutils/util.h (mu_decode_filter_args): New proto.
16981	* libmailutils/base/msgid.c (mu_rfc2822_in_reply_to): Silence a
16982	cast warning.
16983	* libmailutils/tests/wicket.c (match_string): Likewise.
16984	* libmailutils/filter/decode.c (mu_decode_filter_args): New
16985	function.
16986	(mu_decode_filter): Rewrite as an alternative entry point to
16987	mu_decode_filter_args.
16988	* ibmailutils/filter/filter_iconv.c: Remove.
16989	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES):
16990	Remove filter_iconv.c
16991	* libmu_compat/filter_iconv.c: New file.
16992	* libmu_compat/Makefile.am (libmu_compat_la_SOURCES): Add
16993	filter_iconv.c
16994	* libmailutils/filter/iconvflt.c (_icvt_decoder): Set errcode
16995	before returning failure.
16996	* libmailutils/stream/fltstream.c (init_iobuf,
16997	filter_stream_init): Provide a default value for io->errcode.
16998
169992010-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
17000
17001	Re-implement iconv converter as a regular filter.
17002
17003	* include/mailutils/filter.h (mu_iconv_filter): New extern.
17004	* libmailutils/filter/iconvflt.c: New file.
17005	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
17006	iconvflt.c
17007	* libmailutils/filter/filter.c (mu_filter_get_list): Register
17008	mu_iconv_filter.
17009
170102010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17011
17012	Remove an ugly debugging hack.
17013
170142010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17015
17016	Minor fixes.
17017
17018	* libmailutils/base/argcvjoin.c (mu_argcv_join): Fix a memory
17019	allocation error.
17020	* libmailutils/base/msgid.c (concat): Remove.
17021	(mu_rfc2822_references,mu_rfc2822_in_reply_to): Use
17022	mu_argcv_join to concatenate strings.
17023
170242010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17025
17026	mh,maildir: Minor fix.
17027
17028	* libmailutils/base/amd.c (amd_envelope_date): Remove the
17029	trailing newline from the ctime output.
17030
170312010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17032
17033	mail: use mu_strout; remove util_error in favor of mu_error.
17034
170352010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17036
17037	mail: rewrite using MU streams.
17038
17039	* libmailutils/base/spawnvp.c (mu_spawnvp): Use fork and _exit,
17040	unconditionally.
17041	* libmailutils/stdstream/basestr.c (mu_stdstream_setup): Borrow
17042	descriptors 0, 1, 2.
17043	* mail/mail.h (compose_env) <filename, file, ofile>: Remove.
17044	<compstr>: New member.
17045	* mail/alias.c: Use MU streams instead of stdlib.
17046	* mail/alt.c: Likewise.
17047	* mail/copy.c: Likewise.
17048	* mail/decode.c: Likewise.
17049	* mail/echo.c: Likewise.
17050	* mail/envelope.c: Likewise.
17051	* mail/eq.c: Likewise.
17052	* mail/escape.c: Likewise.
17053	* mail/followup.c: Likewise.
17054	* mail/from.c: Likewise.
17055	* mail/inc.c: Likewise.
17056	* mail/mail.c: Likewise.
17057	* mail/mailline.c: Likewise.
17058	* mail/mailvar.c: Likewise.
17059	* mail/msgset.y: Likewise.
17060	* mail/print.c: Likewise.
17061	* mail/quit.c: Likewise.
17062	* mail/reply.c: Likewise.
17063	* mail/retain.c: Likewise.
17064	* mail/send.c: Likewise.
17065	* mail/setenv.c: Likewise.
17066	* mail/shell.c: Likewise.
17067	* mail/size.c: Likewise.
17068	* mail/source.c: Likewise.
17069	* mail/summary.c: Likewise.
17070	* mail/top.c: Likewise.
17071	* mail/unset.c: Likewise.
17072	* mail/util.c: Likewise.
17073	* mail/version.c: Likewise.
17074	* mail/write.c: Likewise.
17075	* mail/z.c: Likewise.
17076
170772010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17078
17079	Minor change.
17080
17081	* libmailutils/stream/stream.c (mu_stream_set_stat): Allow for
17082	statbuf==NULL.
17083
170842010-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
17085
17086	Implement mu_onexit functions; use MU stdstream in mh and
17087	mimeview.
17088
17089	* include/mailutils/types.hin (mu_onexit_t): New typedef.
17090	* include/mailutils/util.h (mu_onexit_reset, mu_onexit): New
17091	protos.
17092	* libmailutils/base/onexit.c: New file.
17093	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add
17094	onexit.c
17095	* libmailutils/stdstream/basestr.c (stdstream_flushall): New
17096	function.
17097	(mu_stdstream_setup): Rewrite the fd checking algorithm.
17098	Register stdstream_flushall as an onexit function.
17099	* mh/anno.c: Use MU stdstream.
17100	* mh/mh.h: Include mailutils/stdstream.h.
17101	* mh/mh_init.c (mh_init): Call mu_stdstream_setup; use MU
17102	stdstream.
17103	* mh/mh_whatnow.c (_whatnow): Use MU stdstream.
17104	* mh/mhl.c (open_output,list_message): Likewise.
17105	* mh/mhn.c (mhn_show,store_handler): Likewise.
17106	* pop3d/popauth.c: Use MU stdstream.
17107	* mimeview/mimetypes.y: Use MU stdstream.
17108	* mimeview/mimeview.c: Likewise.
17109	(mimeview_fp): Remove.
17110	(mimeview_stream): New variable.
17111	* mimeview/mimeview.h (mimeview_fp): Remove.
17112	(mimeview_stream): New variable.
17113	* lib/mailcap.c (find_entry): Don't report ENOENT.
17114
171152010-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
17116
17117	Remove the MU_STREAM_FD_AUTOCLOSE stream flag.
17118
17119	This is the default behavior now. The reverse can be requested
17120	by a special MU_IOCTL_FD,MU_IOCTL_FD_SET_BORROW ioctl.
17121
17122	* include/mailutils/stream.h (MU_STREAM_FD_AUTOCLOSE): Remove.
17123	This is the default behavior now.
17124	(MU_IOCTL_FD): New ioctl.
17125	(MU_IOCTL_FD_GET_BORROW, MU_IOCTL_FD_SET_BORROW): New opcodes.
17126	* include/mailutils/sys/file_stream.h
17127	(_MU_FILE_STREAM_FD_BORROWED): New flag.
17128	* libmailutils/stream/file_stream.c (fd_close): Close the fd
17129	unless _MU_FILE_STREAM_FD_BORROWED bit is set.
17130	(fd_open): Clear the _MU_FILE_STREAM_FD_BORROWED bit.
17131	(fd_ioctl): Handle MU_IOCTL_FD.
17132	(mu_file_stream_create): Remove MU_STREAM_FD_AUTOCLOSE.
17133	* ibmailutils/base/version.c (mu_print_options): Set borrow
17134	mode on the temporary stdout stream.
17135	* libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Set borrow
17136	mode on the temporary stderr stream.
17137	* libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create):
17138	Set borrow mode on the stderr stream.
17139	* libmailutils/tests/tempfile.c: set borrow mode on the
17140	temporary stream, because it may be reopened later (verify
17141	mode).
17142	* examples/mta.c: Remove MU_STREAM_FD_AUTOCLOSE.
17143	* imap4d/io.c: Likewise.
17144	* libmailutils/stream/prog_stream.c: Likewise.
17145	* libmailutils/stream/socket_stream.c: Likewise.
17146	* libmailutils/stream/temp_file_stream.c: Likewise.
17147	* maidag/lmtp.c: Likewise.
17148	* pop3d/extra.c: Likewise.
17149
17150	These will disappear when the corresponding utilities are
17151	rewritten to use MU stdstream:
17152	* mail/escape.c (quote0): set borrow mode on the output stream.
17153	* mimeview/mimeview.c (display_file): set borrow mode on the
17154	input stream.
17155
17156	Likewise, these will disappear when MH uses MU stdstream:
17157	* mh/anno.c (main): Set borrow mode on the input stream.
17158	* mh/mh_init.c (mh_real_install): Likewise.
17159	* mh/mh_whatnow.c (_whatnow): Likewise.
17160	* mh/mhl.c (open_output): Set borrow mode on the output stream.
17161	* mh/mhn.c (mhn_show,store_handler): Likewise.
17162
171632010-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
17164
17165	Remove MU_STREAM_AUTOCLOSE flag.  Use mu_stream_unref, if
17166	necessary.
17167
17168	* examples/mta.c: Use MU_STREAM_FD_AUTOCLOSE.
17169	* imap4d/io.c: Likewise.
17170	* libmailutils/stream/file_stream.c: Likewise.
17171	* libmailutils/stream/prog_stream.c: Likewise.
17172	* libmailutils/stream/socket_stream.c: Likewise.
17173	* libmailutils/stream/temp_file_stream.c: Likewise.
17174	* maidag/lmtp.c: Likewise.
17175	* pop3d/extra.c: Likewise.
17176	* imap4d/preauth.c: Do not use MU_STREAM_AUTOCLOSE. Instead
17177	unref the transport stream after creating the derived one.
17178	* libmailutils/base/rfc2047.c: Likewise.
17179	* libmailutils/stream/fltstream.c: Likewise.
17180	* libmailutils/tests/fltst.c: Likewise.
17181	* libmu_auth/ldap.c: Likewise.
17182	* libmu_auth/tls.c: Likewise.
17183	* libmu_sieve/extensions/vacation.c: Likewise.
17184	* libproto/pop/pop3_stream.c: Likewise.
17185	* mail/decode.c: Likewise.
17186	* mh/mhn.c: Likewise.
17187	* libmailutils/filter/filter_iconv.c: Do not handle
17188	MU_STREAM_AUTOCLOSE.
17189	* libmailutils/stream/rdcache_stream.c: Likewise.
17190	* libmailutils/stream/streamref.c: Likewise.
17191	* libmailutils/stream/xscript-stream.c: Likewise.
17192	* include/mailutils/stream.h (MU_STREAM_AUTOCLOSE): Rename to
17193	MU_STREAM_FD_AUTOCLOSE.
17194
171952010-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
17196
17197	Implement filter chains. Revamp filter output length support.
17198
17199	* include/mailutils/filter.h (mu_filter_chain_create_pred)
17200	(mu_filter_chain_create): New prototypes.
17201	(_mu_filter_record)<max_line_length>: Remove.
17202	* libmailutils/filter/fltchain.c: New file.
17203	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
17204	fltchain.c.
17205	* libmailutils/filter/base64.c: Implement line length limit for
17206	encoder.
17207	(base64_state): New enum.
17208	(base64_line): New struct.
17209	(_base64_encoder): xd brings a pointer to struct base64_line.
17210	Use it to limit the output line length.
17211	(alloc_state): New function.
17212	(_base64_filter): Register alloc_state.
17213	(_base64_filter, _B_filter): Remove max_line_length
17214	initialization.
17215	* libmailutils/filter/binflt.c: Remove max_line_length
17216	initialization.
17217	* libmailutils/filter/crlfflt.c: Likewise.
17218	* libmailutils/filter/dot.c: Likewise.
17219	* libmailutils/filter/fromflt.c: Likewise.
17220	* libmailutils/filter/header.c: Likewise.
17221	* libmailutils/filter/inline-comment.c: Likewise.
17222	* libmailutils/filter/linecon.c: Likewise.
17223	* libmailutils/filter/qpflt.c: Likewise.
17224	* libmailutils/filter/linelenflt.c: Redo line filter as a
17225	regular filter.
17226	(mu_linelen_filter): New global.
17227	* libmailutils/filter/filter.c (mu_filter_get_list): Register
17228	mu_linelen_filter.
17229	(filter_create_rd, filter_create_wr): Remove.
17230	(mu_filter_create_args): Use mu_filter_stream_create directly.
17231	* examples/base64.c: Re-implement the -l option via filter
17232	chains.
17233	* libmailutils/tests/fltst.c: Remove the linelen option.
17234	* libmailutils/tests/base64d.at: Remove the linelen option from
17235	fltst invocations.
17236	* mu/filter.c: Remove the --line-length option. Not needed now,
17237	its effect is achieved by "FLT + [~]linelen" chain.
17238
172392010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17240
17241	Minor improvement.
17242
17243	* examples/config/dot.biffrc: Update.
17244	* comsat/comsat.c (main): In test mode, normalize biffrc names
17245	that begin with ./ or ../
17246
172472010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17248
17249	comsat: provide a fine-grained control over where biffrc errors
17250	are output.
17251
17252	* comsat/comsat.c (biffrc_errors): New variable.
17253	(comsat_cfg_param): New statements: biffrc-errors-to-tty and
17254	biffrc-errors-to-err
17255	(main): In test mode, set biffrc_errors to
17256	BIFFRC_ERRORS_TO_ERR.
17257	* comsat/comsat.h (BIFFRC_ERRORS_TO_TTY)
17258	(BIFFRC_ERRORS_TO_ERR): New flags.
17259	(biffrc_errors): New variable.
17260	* comsat/action.c (report_error): Consult biffrc_errors.
17261
172622010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17263
17264	Minor improvements in logstream and related code.
17265
17266	* include/mailutils/stream.h
17267	(MU_IOCTL_LOGSTREAM_SET_LOCUS_LINE)
17268	(MU_IOCTL_LOGSTREAM_SET_LOCUS_COL): New subcodes.
17269	* libmailutils/stream/logstream.c (_log_ctl): Handle two new
17270	subcodes.
17271	* comsat/action.c (eval_biffrc): Use new ioctl subcode to
17272	update the line number.
17273
172742010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17275
17276	Test line info facility.
17277
17278	* libmailutils/tests/inline-comment.at: Add line info tests.
17279	* libmailutils/tests/linecon.at: Likewise.
17280	* libmailutils/filter/linecon.c (LINECON_CONTINUATION): New
17281	flag.
17282	(linecon_newline): Remove.
17283	(_linecon_decoder): Correctly determine the end of continuation
17284	in case when the last line contained standalone escapes.
17285
172862010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17287
17288	Implement line number output in linecon and inline-comment
17289	filters.
17290
17291	* libmailutils/filter/inline-comment.c: Implement line number
17292	info facility.
17293	* libmailutils/filter/linecon.c: Likewise.
17294	* libmailutils/stream/logstream.c (_log_done, _log_close):
17295	Always close/destroy the underlying transport stream.
17296	* comsat/action.c: Rewrite using a table-driven parser. Use
17297	line-info facility of the linecon filter.
17298
172992010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17300
17301	comsat: improve biffrc evaluation.
17302
17303	* comsat/.gitignore: Add biff.rc.h
17304	* comsat/Makefile.am (comsatd_SOURCES, BUILT_SOURCES): Add
17305	biff.rc.h
17306	(EXTRA_DIST): Add biffrc.sed and biff.rc
17307	* comsat/action.c (default_action): Include biff.rc.h.
17308	(biffrc_environ): New struct.
17309	(eval_biffrc): New function.
17310	(run_user_action): Rewrite via eval_biffrc. Default action is
17311	evaluated if biff.rc cannot be opened, or it contains the
17312	"default" keyword.
17313	* comsat/tests/testsuite.at: Add "default" statement where
17314	necessary.
17315
173162010-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
17317
17318	comsat: improve tty handling, add testsuite.
17319
17320	* comsat/action.c (need_crlf, _open_tty, open_tty): Moved from
17321	comsat.c
17322	(open_default_tty): New function.
17323	(run_user_action): Take device name as first argument. Reuse
17324	wordsplit memory.
17325	* comsat/comsat.c (notify_user): Update invocation of
17326	run_user_action.
17327	* comsat/comsat.h (open_tty): Remove prototype.
17328	(run_user_action): Change signature.
17329	* configure.ac: Add comsat tests.
17330	* comsat/Makefile.am (SUBDIRS): Add tests.
17331	* comsat/tests/.gitignore: New file.
17332	* comsat/tests/Makefile.am: New file.
17333	* comsat/tests/atlocal.in: New file.
17334	* comsat/tests/testsuite.at: New file.
17335
173362010-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
17337
17338	comsat: add a way to specify alternative biffrc file name; new
17339	biffrc statement: tty.
17340
17341	* comsat/comsat.c (options): New option --file.
17342	(biffrc): New variable.
17343	(comsatd_parse_opt): Handle the --file option.
17344	(open_tty): New function.
17345	(notify_user): Open the tty using open_tty function and a
17346	default set of filters.
17347	(main): Handle --file option.
17348	* comsat/action.c (run_user_action): Implement the `tty'
17349	statement.
17350	* comsat/comsat.h (biffrc): New extern.
17351	(open_tty): New function.
17352
17353	mu: accept a chain of filters.
17354	* mu/filter.c (filter_doc, filter_docstring): Update.
17355	(mutool_filter): Accept a filter chain.
17356
173572010-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
17358
17359	Rewrite prog stream support.
17360
17361	Two interfaces are provided: mu_prog_stream_create offers full
17362	control over the program execution environment (i.e. running
17363	privileges, cwd, resource limits) via a set of hints. A simpler
17364	interface, mu_command_stream_create, runs the command in the
17365	current environment.
17366
17367	mu_filter_prog_stream_create is removed, because its
17368	functionality can be achieved by a correspondingly crafted set
17369	of hints to mu_prog_stream_create.
17370
17371	* include/mailutils/prog.h: New file.
17372	* include/mailutils/mailutils.h: Include mailutils/prog.h
17373	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
17374	prog.h
17375	* include/mailutils/stream.h (mu_prog_stream_create)
17376	(mu_filter_prog_stream_create): Remove prototypes.
17377	* include/mailutils/sys/prog_stream.h (_mu_prog_stream): Change
17378	structure.
17379	(_mu_prog_limit_codes, _mu_prog_limit_flags): New externs.
17380	* include/mailutils/util.h (mu_set_user_privileges)
17381	(mu_switch_to_privs): New prototypes.
17382	* lib/userprivs.c: Move to libmailutils/base.
17383	* lib/Makefile.am (libmuaux_a_SOURCES): Remove userprivs.c
17384	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add
17385	userprivs.c
17386	* libmailutils/base/userprivs.c (mu_set_user_privileges): New
17387	function.
17388	(mu_switch_to_privs): Rewrite as another entry point to
17389	mu_set_user_privileges.
17390	* libmailutils/stream/prog_stream.c (_mu_prog_limit_flags)
17391	(_mu_prog_limit_codes): New global variables.
17392	(start_program_filter): Use hints to control execution
17393	environment.
17394	(_prog_stream_create): Save hints.
17395	(mu_prog_stream_create): Change signature.
17396	(mu_command_stream_create): New function (corresponds to the
17397	prior mu_prog_stream_create).
17398	(mu_filter_prog_stream_create): Remove function.
17399	* comsat/action.c (action_exec): Use new mu_prog_stream_create
17400	calling convention.
17401	* examples/murun.c: Rewrite.
17402	* mh/mhn.c (show_internal): Use new mu_prog_stream_create
17403	calling convention.
17404	* mh/tests/mhn.at: Reflect changes to mhn.
17405	* imap4d/preauth.c: Use mu_command_stream_create.
17406	* libmu_sieve/extensions/pipe.c
17407	* mail/decode.c
17408	* mail/pipe.c
17409	* mail/send.c
17410	* mh/mhl.c
17411	* mu/shell.c
17412	* mail/mail.h: Include mailutils/prog.h
17413	* mh/mh.h
17414	* po/POTFILES.in: Add libmailutils/base/userprivs.c.
17415
174162010-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
17417
17418	comsat: Use mu streams instead of stdio.
17419
17420	* comsat/action.c (action_beep, echo_string)
17421	(action_echo, action_exec): Take mu_stream_t as first argument.
17422	(open_rc): Take mu_stream_t as tty, return mu_stream_t as well.
17423	Install the linecon filter.
17424	(run_user_action): Take mu_stream_t as first arg. Pass it to
17425	all invoked actions.
17426	* comsat/comsat.c (get_newline_str): Remove.
17427	(need_crlf): New function.
17428	(notify_user): Use mu_stream_t instead of FILE. Install a 7bit
17429	filter and CRLF filter (if the device requires it).
17430	* comsat/comsat.h: Include mailutils/filter.h.
17431	(run_user_action): Change signature.
17432
174332010-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
17434
17435	file_stream: Bugfixes.
17436
17437	* libmailutils/stream/file_stream.c (fd_open): Remove file
17438	state checks: it is the responsibility of the caller. Set
17439	autoclose on the *stream* flags (bugfix, previously the
17440	underlying fd was never closed). Clear MU_STREAM_SEEK flag if
17441	seek fails.
17442	(_mu_file_stream_create): Remove assignment to
17443	stream.error_string
17444	* include/mailutils/stream.h (MU_STREAM_ALLOW_LINKS): Remove
17445	flag.
17446	* libmailutils/base/amd.c (amd_message_stream_open): Initialize
17447	flags to 0.
17448
174492010-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
17450
17451	comsat: minor changes.
17452
17453	* libmailutils/mailbox/mailbox.c (mu_mailbox_open): Fix error
17454	checking condition.
17455	* comsat/action.c (act_getline): Remove.
17456	(open_rc): Return mu_stream_t. Use linecon filter.
17457
174582010-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
17459
17460	Implement a "line continuation" filter.
17461
17462	Line continuation filter removes from its input any sequence of
17463	'\\\n' (a backslash followed by a newline). It is useful for
17464	reading various UNIX configuration files.
17465
17466	* include/mailutils/filter.h (mu_linecon_filter): New extern.
17467	* libmailutils/filter/linecon.c: New file.
17468	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
17469	linecon.c
17470	* libmailutils/filter/filter.c (mu_filter_get_list): Register
17471	mu_linecon_filter.
17472	* libmailutils/tests/linecon.at: New test.
17473	* libmailutils/tests/Makefile.am (TESTSUITE_AT): Add linecon.at
17474	* libmailutils/tests/testsuite.at: Include linecon.at
17475
174762010-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
17477
17478	frm,messages,readmsg: Use MU streams instead of stdio.
17479
17480	* frm/common.c: Use MU streams instead of stdio.
17481	* frm/frm.c: Likewise.
17482	* messages/messages.c: Likewise.
17483	* readmsg/readmsg.c: Likewise.
17484	* frm/frm.h: Include mailutils/stdstream.h
17485	* readmsg/readmsg.h: Likewise.
17486
174872010-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
17488
17489	Revise stream ioctl support.
17490
17491	The mu_stream_ioctl function gets two argument that identify
17492	the ioctl in question: "family", which identifies a family of
17493	ioctls in question, and "opcode", which indicates the requested
17494	operation within that family.
17495
17496	* include/mailutils/stream.h: Define ioctl families and
17497	opcodes.
17498	(mu_stream_ioctl): Change signature.
17499	* include/mailutils/sys/stream.h (_mu_stream)<ctl>: Change
17500	signature.
17501	* include/mailutils/log.h (mu_severity_from_string)
17502	(mu_severity_to_string): New protos.
17503	* libmailutils/stream/stream.c (mu_stream_ioctl): Change
17504	signature.
17505	* libmailutils/filter/filter_iconv.c: Rewrite ioctl support.
17506	* libmailutils/stream/file_stream.c: Likewise.
17507	* libmailutils/stream/fltstream.c: Likewise.
17508	* libmailutils/stream/iostream.c: Likewise.
17509	* libmailutils/stream/logstream.c: Likewise.
17510	* libmailutils/stream/mapfile_stream.c: Likewise.
17511	* libmailutils/stream/memory_stream.c: Likewise.
17512	* libmailutils/stream/nullstream.c: Likewise.
17513	* libmailutils/stream/prog_stream.c: Likewise.
17514	* libmailutils/stream/rdcache_stream.c: Likewise.
17515	* libmailutils/stream/streamref.c: Likewise.
17516	* libmailutils/stream/syslogstream.c: Likewise.
17517	* libmailutils/stream/tcp.c: Likewise.
17518	* libmailutils/stream/xscript-stream.c: Likewise.
17519	* libmu_auth/tls.c: Likewise.
17520	* comsat/action.c: Change calls to mu_stream_ioctl.
17521	* imap4d/auth_gsasl.c: Likewise.
17522	* imap4d/io.c: Likewise.
17523	* imap4d/util.c: Likewise.
17524	* libmailutils/base/getpass.c: Likewise.
17525	* libmailutils/cfg/parser.y: Likewise.
17526	* libmailutils/mailbox/body.c: Likewise.
17527	* libmailutils/mime/mime.c: Likewise.
17528	* libmailutils/stdstream/dbgstream.c: Likewise.
17529	* libmailutils/stdstream/strerr.c: Likewise.
17530	* libmu_sieve/runtime.c: Likewise.
17531	* libmu_sieve/sieve.y: Likewise.
17532	* libmu_sieve/util.c: Likewise.
17533	* libproto/imap/trace.c: Likewise.
17534	* libproto/mailer/smtp_data.c: Likewise.
17535	* libproto/mailer/smtp_starttls.c: Likewise.
17536	* libproto/mailer/smtp_trace.c: Likewise.
17537	* libproto/pop/pop3_stls.c: Likewise.
17538	* libproto/pop/pop3_stream.c: Likewise.
17539	* libproto/pop/pop3_trace.c: Likewise.
17540	* maidag/lmtp.c: Likewise.
17541	* mail/source.c: Likewise.
17542	* mu/logger.c: Likewise.
17543	* pop3d/extra.c: Likewise.
17544	* pop3d/retr.c: Likewise.
17545	* TODO: Update.
17546	* doc/texinfo/nullstream.texi: Update.
17547
175482010-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
17549
17550	Implement severity suppression in log streams; other minor
17551	fixes.
17552
17553	* include/mailutils/stream.h (MU_LOGSTREAM_ADVANCE_LOCUS_LINE)
17554	(MU_LOGSTREAM_ADVANCE_LOCUS_COL): Rename to MU_IOCTL_.*. All
17555	uses updated. (MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY)
17556	(MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY_NAME): New ioctls.
17557	* include/mailutils/sys/logstream.h
17558	(_mu_log_stream)<threshold>: New member.
17559	* include/mailutils/syslog.h (mu_log_severity_threshold): New
17560	extern.
17561	* libmailutils/cfg/parser.y (_cfg_default_printer): Remove
17562	leftover static function.
17563	* libmailutils/stream/logstream.c (mu_severity_from_string)
17564	(mu_severity_to_string): New functions.
17565	(_log_write): Fix double free. Implement severity suppression.
17566	(_log_ioctl): Handle MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY.
17567	* libmu_cfg/common.c (mu_logging_param): New parameter
17568	"severity".
17569
175702010-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
17571
17572	Improve imap4d and pop3d testsuites.
17573
17574	* imap4d/testsuite/imap4d.rcin: Suppress syslog, use stderr.
17575	* pop3d/testsuite/pop3d.rcin" Likewise.
17576
175772010-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
17578
17579	mh: testsuite fix.
17580
17581	* mh/tests/mhn.at: Bugfix.
17582
175832010-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
17584
17585	Rewrite debugging and logging support.
17586
17587	The mu_debug_t object and associated functions have been
17588	removed. New debugging functions are based on the logstream
17589	interface.
17590
17591	* include/mailutils/debug.hm4: Remove.
17592	* include/mailutils/debug.h: New file.
17593	* include/mailutils/Makefile.am (BUILT_SOURCES,EXTRA_DIST):
17594	Remove debug.h, debug.hm4.
17595	* mu-aux/debugdef.m4: Remove.
17596	* mu-aux/debcat.awk: New file.
17597	* mu-aux/Makefile.am (EXTRA_DIST): Replace debugdef.m4 with
17598	debcat.awk.
17599	* include/mailutils/sys/dbgstream.h: Remove.
17600	* include/mailutils/sys/debug.h: Remove.
17601	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS):
17602	Remove debug.h and dbgstream.h, add debcat.h
17603	* include/mailutils/sys/.gitignore: Add debcat.h.
17604	* libmailutils/diag/dbgstderr.c: Remove.
17605	* libmailutils/diag/dbgsyslog.c: Remove.
17606	* libmailutils/diag/gdebug.c: Remove.
17607	* libmailutils/diag/debcat: New file.
17608	* libmailutils/diag/Makefile.am (libdiag_la_SOURCES): Remove
17609	these sources.
17610	* libmailutils/diag/debug.c: Rewrite from scratch.
17611	* libmailutils/diag/diag.c: Rewrite from scratch.
17612	* libmailutils/diag/syslog.c (mu_diag_syslog_printer): Remove
17613	function.
17614	(mu_log_syslog, mu_log_print_severity): New variables.
17615	* libmailutils/stream/dbgstream.c: Remove.
17616	* libmailutils/stream/Makefile.am (libstream_la_SOURCES):
17617	Remove dbgstream.c..
17618	* libmailutils/stdstream/Makefile.am (libstdstream_la_SOURCES):
17619	Add dbgstream.c.
17620	* libmailutils/stream/logstream.c (_mu_severity_str): Change
17621	strings to lower case.
17622	(_log_write): Improve handling of unrecognized escapes.
17623	(_log_ctl): Handle MU_LOGSTREAM_ADVANCE_LOCUS_LINE and
17624	MU_LOGSTREAM_ADVANCE_LOCUS_COL.
17625	* libmailutils/mailbox/folder.c (mu_folder_has_debug)
17626	(mu_folder_get_debug, mu_folder_set_debug): Remove functions.
17627	* mu-aux/debcat.awk: New file.
17628	* libmailutils/stdstream/dbgstream.c: New file.
17629	* comsat/action.c: Use new debug/log functions.
17630	* comsat/comsat.c: Likewise.
17631	* examples/aclck.c: Likewise.
17632	* examples/echosrv.c: Likewise.
17633	* examples/msg-send.c: Likewise.
17634	* examples/nntpclient.c: Likewise.
17635	* examples/numaddr.c: Likewise.
17636	* frm/common.c: Likewise.
17637	* imap4d/imap4d.c: Likewise.
17638	* imap4d/io.c: Likewise.
17639	* imap4d/util.c: Likewise.
17640	* libmailutils/auth/mu_auth.c: Likewise.
17641	* libmailutils/base/amd.c: Likewise.
17642	* libmailutils/cfg/driver.c: Likewise.
17643	* libmailutils/cfg/format.c: Likewise.
17644	* libmailutils/cfg/lexer.l: Likewise.
17645	* libmailutils/cfg/parser.y: Likewise.
17646	* libmailutils/mailbox/mailbox.c: Likewise.
17647	* libmailutils/mailbox/mbx_default.c: Likewise.
17648	* libmailutils/mailer/mailer.c: Likewise.
17649	* libmailutils/mailer/progmailer.c: Likewise.
17650	* libmailutils/server/acl.c: Likewise.
17651	* libmailutils/server/ipsrv.c: Likewise.
17652	* libmailutils/server/msrv.c: Likewise.
17653	* libmailutils/tests/wicket.c: Likewise.
17654	* libmu_argp/auth.c: Likewise.
17655	* libmu_argp/cmdline.c: Likewise.
17656	* libmu_argp/common.c: Likewise.
17657	* libmu_auth/ldap.c: Likewise.
17658	* libmu_cfg/acl.c: Likewise.
17659	* libmu_cfg/auth.c: Likewise.
17660	* libmu_cfg/common.c: Likewise.
17661	* libmu_cfg/ldap.c: Likewise.
17662	* libmu_cfg/sieve.c: Likewise.
17663	* libmu_cfg/sql.c: Likewise.
17664	* libmu_scm/mu_message.c: Likewise.
17665	* libmu_sieve/prog.c: Likewise.
17666	* libmu_sieve/runtime.c: Likewise.
17667	* libproto/imap/trace.c: Likewise.
17668	* libproto/mailer/mbox.c: Likewise.
17669	* libproto/mailer/prog.c: Likewise.
17670	* libproto/mailer/sendmail.c: Likewise.
17671	* libproto/mailer/smtp.c: Likewise.
17672	* libproto/mailer/smtp_trace.c: Likewise.
17673	* libproto/mbox/folder.c: Likewise.
17674	* libproto/mbox/mbox.c: Likewise.
17675	* libproto/nntp/folder.c: Likewise.
17676	* libproto/nntp/nntp_debug.c: Likewise.
17677	* libproto/pop/mbox.c: Likewise.
17678	* libproto/pop/pop3_trace.c: Likewise.
17679	* maidag/guile.c: Likewise.
17680	* maidag/lmtp.c: Likewise.
17681	* maidag/maidag.c: Likewise.
17682	* maidag/util.c: Likewise.
17683	* mail/mail.c: Likewise.
17684	* mail/mailvar.c: Likewise.
17685	* mail/send.c: Likewise.
17686	* mail/source.c: Likewise.
17687	* mh/mh_argp.c: Likewise.
17688	* mh/send.c: Likewise.
17689	* mimeview/mimeview.c: Likewise.
17690	* movemail/movemail.c: Likewise.
17691	* mu/wicket.c: Likewise.
17692	* pop3d/extra.c: Likewise.
17693	* pop3d/pop3d.c: Likewise.
17694	* readmsg/readmsg.c: Likewise.
17695	* sieve/sieve.c: Likewise.
17696	* testsuite/mimetest.c: Likewise.
17697	* libmu_sieve/sieve-priv.h (mu_sieve_machine)
17698	<parse_error_printer>
17699	<error_printer, debug_printer, debug>: Remove.
17700	<errstream>: New member. (mu_sv_compile_error,
17701	mu_sv_print_value_list)
17702	(mu_sv_print_tag_list): Change prototypes.
17703	* libmu_sieve/actions.c: Use new sieve debug functions.
17704	* libmu_sieve/extensions/list.c: Likewise.
17705	* libmu_sieve/extensions/moderator.c: Likewise.
17706	* libmu_sieve/extensions/pipe.c: Likewise.
17707	* libmu_sieve/extensions/spamd.c: Likewise.
17708	* libmu_sieve/extensions/timestamp.c: Likewise.
17709	* libmu_sieve/extensions/vacation.c: Likewise.
17710	* libmu_sieve/sieve.y : Likewise.
17711	* libmu_sieve/sieve.l: Likewise.
17712	* libmu_sieve/tests.c: Likewise.
17713	* libmu_sieve/util.c: Rewrite diagnostic support.
17714	* /maidag/sieve.c: Use new debug/log and sieve diagnostic
17715	functions.
17716	* mu/mu.c (main): Remove call to mu_stdstream_setup. It is
17717	called by mu_app_init now.
17718	* libmailutils/base/wicket.c (mu_wicket_stream_match_url):
17719	Change signature.
17720	* libmailutils/cfg/gocs.c (mu_gocs_logging_init): Rewrite.
17721	* libmailutils/mailbox/message.c (mu_message_save_to_mailbox):
17722	Remove mu_debug_t argument.
17723	* libmailutils/stdstream/basestr.c (mu_stdstream_setup): Minor
17724	fixes.
17725	* libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create):
17726	Do not install filter stream if tag is NULL.
17727	(mu_stdstream_strerr_setup): New function.
17728	* libmu_argp/muinit.c (mu_app_init): Set mu_log_tag. Call
17729	mu_stdstream_setup.
17730	* libmu_scm/mu_dbgport.c: Rewrite port support.
17731	* include/mailutils/acl.h (mu_acl_get_debug)
17732	(mu_acl_set_debug): Remove prototypes.
17733	* include/mailutils/auth.h (mu_wicket_stream_match_url): Change
17734	signature.
17735	* include/mailutils/cfg.h (mu_cfg_locus_t): Remove typedef, use
17736	struct mu_locus instead.
17737	(mu_cfg_locus): Remove declaration.
17738	(mu_cfg_node)<locus>: Change type.
17739	(mu_cfg_node)<debug>: Remove. (mu_cfg_vperror,mu_cfg_perror)
17740	(mu_cfg_parse_error,mu_cfg_format_error): Remove prototypes.
17741	(mu_cfg_callback_t): Change signature. All uses updated.
17742	(mu_cfg_get_debug): Remove prototype.
17743	(mu_cfg_assert_value_type, mu_cfg_string_value_cb): Change
17744	signature.
17745	(mu_cfg_tree_set_debug): Remove prototype.
17746	(mu_cfg_tree_create_node): Change signature.
17747	* include/mailutils/diag.h (MU_DIAG_): Redefine via MU_LOG_
17748	constants.
17749	(mu_diag_get_debug,mu_diag_set_debug): Remove.
17750	(mu_diag_cont_vprintf, mu_diag_cont_printf)
17751	(mu_diag_at_locus): New functions.
17752	* include/mailutils/folder.h (mu_folder_has_debug)
17753	(mu_folder_get_debug, mu_folder_set_debug): Remove prototypes.
17754	* include/mailutils/gocs.h (mu_gocs_logging): Remove structure.
17755	(mu_gocs_debug)<errpfx>: Remove.
17756	* include/mailutils/guile.h (mu_scm_make_debug_port): Change
17757	prototype.
17758	* include/mailutils/mailbox.h (mu_mailbox_has_debug)
17759	(mu_mailbox_get_debug,mu_mailbox_set_debug): Remove.
17760	* include/mailutils/mailer.h (mu_mailer_get_debug)
17761	(mu_mailer_set_debug): Remove.
17762	* include/mailutils/message.h (mu_message_save_to_mailbox):
17763	Change signature.
17764	* include/mailutils/mu_auth.h (mu_auth_set_debug): Remove
17765	proto.
17766	* include/mailutils/nntp.h (mu_nntp_set_debug): Remove.
17767	* include/mailutils/progmailer.h (mu_progmailer_set_debug):
17768	Remove proto.
17769	* include/mailutils/server.h (mu_ip_server_set_debug)
17770	(mu_ip_server_get_debug): Remove proto.
17771	* include/mailutils/sieve.h (mu_sieve_locus_t): Remove. Use
17772	struct mu_locus instead.
17773	(mu_sieve_printf_t, mu_sieve_parse_error_t): Remove.
17774	(mu_sieve_action_log_t): Change signature.
17775	(mu_sieve_machine_init): Change signature.
17776	(mu_sieve_machine_init_ex): New function.
17777	(mu_sieve_get_diag_stream)
17778	(mu_sieve_set_diag_stream): New functions.
17779	(mu_sieve_set_data): New function.
17780	(mu_sieve_get_locus): Change signature.
17781	(mu_sieve_set_error,mu_sieve_set_parse_error)
17782	(mu_sieve_set_debug,mu_sieve_set_debug_object): Remove protos.
17783	* include/mailutils/stdstream.h (mu_stdstream_strerr_setup):
17784	New proto.
17785	* include/mailutils/stream.h (MU_LOGSTREAM_ADVANCE_LOCUS_LINE)
17786	(MU_LOGSTREAM_ADVANCE_LOCUS_COL): New ioctls.
17787	(mu_dbgstream_create): Change signature.
17788	* include/mailutils/sys/folder.h (_mu_folder) <debug>: Remove.
17789	* include/mailutils/sys/mailbox.h (_mu_mailbox) <debug>:
17790	Remove.
17791	* include/mailutils/sys/mailer.h (_mu_mailer) <debug>: Remove.
17792	* include/mailutils/sys/nntp.h (_mu_nntp) <debug>: Remove.
17793	* include/mailutils/syslog.h (mu_log_syslog)
17794	(mu_log_print_severity): New externs.
17795	* include/mailutils/types.hin (_mu_debug, mu_debug_t): Remove.
17796	* lib/tcpwrap.h: Remove unused prototypes.
17797	* imap4d/imap4d.h: Include mailutils/stdstream.h
17798	* mail/mail.h: Likewise.
17799	* pop3d/pop3d.h: Likewise.
17800	* mh/comp.c (main): Bugfix.
17801	* po/POTFILES.in: Update.
17802	* TODO: Update.
17803
178042010-12-04  Sergey Poznyakoff  <gray@gnu.org.ua>
17805
17806	Remove deprecated interfaces.
17807
17808	* include/mailutils/error.h (mu_error_pfn_t,
17809	mu_default_error_printer)
17810	(mu_syslog_error_printer): Remove deprecated interfaces.
17811	* libmailutils/diag/muerror.c: Likewise.
17812	* libmailutils/stream/logstream.c (_log_write): Send
17813	MU_IOCTL_LOGSTREAM_SET_SEVERITY to the transport stream.
17814	* libmailutils/stream/syslogstream.c (_syslog_ctl): Translate
17815	MU severity to syslog priority level and vice versa.
17816	* mu/logger.c (mutool_logger): Bugfix.
17817
178182010-12-04  Sergey Poznyakoff  <gray@gnu.org.ua>
17819
17820	mu: use stdstream functions.
17821
17822	* include/mailutils/stdstream.h (mu_printf): New prototype.
17823	* include/mailutils/version.h: Include mailutils/types.h
17824	instead of stdio.h
17825	(mu_fprint_options, mu_fprint_conf_option): Remove protos.
17826	(mu_format_options, mu_format_conf_option): New protos.
17827	* libmailutils/base/version.c (mu_fprint_options): Replace with
17828	mu_format_options, which outputs formatted data to a
17829	mu_stream_t.
17830	(mu_fprint_conf_option): Ditto. Replaced by
17831	mu_format_conf_option.
17832	(mu_print_options): Update accordingly.
17833	* libmailutils/stdstream/basestr.c (mu_printf): New function.
17834	* mu/acl.c: Replace stdio calls with stdstream ones.
17835	* mu/cflags.c: Likewise.
17836	* mu/filter.c: Likewise.
17837	* mu/flt2047.c: Likewise.
17838	* mu/imap.c: Likewise.
17839	* mu/info.c: Likewise.
17840	* mu/ldflags.c: Likewise.
17841	* mu/logger.c: Likewise.
17842	* mu/mu.c: Likewise.
17843	* mu/mu.h: Likewise.
17844	* mu/pop.c: Likewise.
17845	* mu/query.c: Likewise.
17846	* mu/shell.c: Likewise.
17847	* mu/verbose.c: Likewise.
17848	* mu/wicket.c: Likewise.
17849
178502010-12-04  Sergey Poznyakoff  <gray@gnu.org.ua>
17851
17852	Introduce stdstream module; move deprecated functions to
17853	libmu_compat.
17854
17855	* include/mailutils/log.h: New file.
17856	* include/mailutils/stdstream.h: New file.
17857	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
17858	stdstream.h and log.h.
17859	* include/mailutils/argcv.h: Include mailutils/types.h
17860	* include/mailutils/mailutils.h: Include stdstream.h Remove
17861	vartab.h
17862	* include/mailutils/types.hin (MU_DEPRECATED): New define.
17863	* include/mailutils/vartab.h: Mark this header and all
17864	prototypes it defines as deprecated.
17865	* libmailutils/stdstream/Makefile.am: New file.
17866	* libmailutils/stdstream/basestr.c: New file.
17867	* libmailutils/stdstream/strerr.c: New file.
17868	* libmu_compat/Makefile.am: New file.
17869	* libmu_compat/tests/.gitignore: New file.
17870	* libmu_compat/tests/Makefile.am: New file.
17871	* libmu_compat/tests/atlocal.in: New file.
17872	* libmu_compat/tests/testsuite.at: New file.
17873	* libmailutils/base/Makefile.am (noinst_LTLIBRARIES): Remove
17874	argcv.c and vartab.c.
17875	* libmailutils/Makefile.am (SUBDIRS): Add stdstream.
17876	(libmailutils_la_LIBADD): Add stdstream/libstdstream.la.
17877	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Remove
17878	argcv
17879	(TESTSUITE_AT): Remove argcv.at
17880	* libmailutils/tests/testsuite.at: Do not include argcv.at.
17881	* libmailutils/base/argcv.c: Move to libmu_compat/argcv.c
17882	* libmailutils/tests/argcv.at: Move to
17883	libmu_compat/tests/argcv.at
17884	* libmailutils/tests/argcv.c: Move to
17885	libmu_compat/tests/argcv.c
17886	* libmailutils/base/vartab.c: Move to libmu_compat/vartab.c
17887	* Makefile.am (SUBDIRS): Add libmu_compat.
17888	* configure.ac: Add libmu_compat/tests,
17889	libmu_compat/tests/Makefile, libmu_compat/tests/atlocal,
17890	libmu_compat/Makefile and libmailutils/stdstream/Makefile to
17891	config file list.
17892	* mu/ldflags.c (lib_descr): Add mu_compat.
17893	* mu/logger.c (logger_parse_opt): -t does not imply --syslog.
17894	(mutool_logger): Use inline-comment filter to insert "tag: "
17895	prefix. Flush and destroy both streams before returning.
17896	* po/POTFILES.in: Add libmailutils/stream/logstream.c,
17897	libmailutils/stdstream/baseio.c,
17898	libmailutils/stdstream/strerr.c and mu/logger.c.
17899
179002010-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
17901
17902	Initial implementation of log streams.
17903
17904	* include/mailutils/mailutils.h: Include mailutils/log.h.
17905	* include/mailutils/stream.h (MU_IOCTL_LOGSTREAM_GET_SEVERITY)
17906	(MU_IOCTL_LOGSTREAM_SET_SEVERITY)
17907	(MU_IOCTL_LOGSTREAM_GET_LOCUS,MU_IOCTL_LOGSTREAM_SET_LOCUS)
17908	(MU_IOCTL_LOGSTREAM_GET_MODE,MU_IOCTL_LOGSTREAM_SET_MODE): New
17909	ioctls.
17910	* include/mailutils/sys/logstream.h: New file.
17911	* include/mailutils/sys/syslogstream.h: New file.
17912	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
17913	logstream.h and syslogstream.h
17914	* include/mailutils/types.hin (mu_locus): New struct.
17915	* libmailutils/stream/Makefile.am (libstream_la_SOURCES): Add
17916	logstream.c and syslogstream.c.
17917	* mu/logger.c: New file.
17918	* mu/template.c: New file.
17919	* mu/Makefile.am (MODULES): Add logger.c
17920	(EXTRA_DIST): Add template.c.
17921
179222010-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
17923
17924	streams: introduce setbuf hooks.
17925
17926	* include/mailutils/sys/stream.h (_mu_stream) <setbuf_hook>:
17927	New member.
17928	* libmailutils/stream/stream.c (mu_stream_set_buffer): Use
17929	setbuf_hook to decide whether the operation is allowed.
17930
179312010-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
17932
17933	streams: introduce setbuf hooks.
17934
17935	* include/mailutils/sys/stream.h (_mu_stream) <setbuf_hook>:
17936	New member.
17937	* libmailutils/stream/stream.c (mu_stream_set_buffer): Use
17938	setbuf_hook to decide whether the operation is allowed.
17939
179402010-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
17941
17942	mail: further improvements in quoting code.
17943
17944	* mail/escape.c (quote0): Simplify by using iterators.
17945
179462010-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
17947
17948	Improve the inline-comment filter.
17949
17950	* libmailutils/filter/inline-comment.c: Recognize multi-char
17951	comment sequences. Implement encode mode.
17952	* libmailutils/tests/inline-comment.at: Test the new modes.
17953	* mail/escape.c (quote0): Re-implement using inline-comment
17954	encode mode.
17955	* mail/mailvar.c (mailvar_tab): Fix a typo.
17956
179572010-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
17958
17959	Minor change.
17960
17961	* configure.ac: Remove checks for strtok_r, strchrnul, strndup,
17962	asprintf, vasprintf: none of these is used any more.
17963	* maidag/lmtp.c (lmtp_reply): Use mu_vasnprintf.
17964	* mh/mh.h (strchrnul): Remove proto.
17965	* mh/mh_list.c (want_header): Rewrite.
17966	(print): Use strcspn.
17967
179682010-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
17969
17970	Avoid using strtok(_r)
17971
17972	* TODO: Update.
17973	* gnulib.modules: Remove strtok_r
17974	* imap4d/auth_gsasl.c (auth_gsasl_capa_init): Use mu_wordsplit
17975	instead of strtok.
17976	* imap4d/imap4d.h (strtok_r): Remove declaration.
17977	* lib/mailcap.c (mime_context) <no_ask_str>: Remove. All uses
17978	updated.
17979	(mime_context_fill): Use mu_wordsplit instead of strtok.
17980	(mime_context_write_input): Tolerate ENOSYS return from
17981	mu_stream_seek.
17982	(display_stream_mailcap): Use mu_wordsplit instead of strtok.
17983	* libmailutils/diag/gdebug.c (mu_debug_level_from_string)
17984	(mu_global_debug_from_string): Use mu_wordsplit instead of
17985	strtok.
17986	* libmu_cfg/sieve.c (_add_path): Likewise.
17987	* libmu_sieve/extensions/list.c: Likewise.
17988	* mail/escape.c (quote0): Likewise.
17989	* mail/util.c (util_header_expand): Likewise.
17990	(util_rfc2047_decode): Use mu_parse_lc_all.
17991	* mh/mh_init.c (mh_charset): Use mu_parse_lc_all.
17992	* frm/common.c (get_charset): Use mu_parse_lc_all.
17993	* libmailutils/base/lcall.c: New file.
17994	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add
17995	lcall.c
17996	* libmailutils/string/strlst.c: New file.
17997	* libmailutils/string/Makefile.am (libstring_la_SOURCES): Add
17998	strlst.c.
17999	* include/mailutils/cstr.h: Include mailutils/types.h
18000	(mu_string_split): New proto.
18001	* include/mailutils/nls.h (MU_LC_LANG, MU_LC_TERR)
18002	(MU_LC_CSET,MU_LC_MOD): New flags.
18003	(mu_lc_all): New struct.
18004	(mu_parse_lc_all, mu_lc_all_free): New protos.
18005	(mu_charset_lookup): New proto (from util.h).
18006	* include/mailutils/util.h (mu_charset_lookup): Move to nls.h
18007	* libmailutils/base/tempfile.c (mu_tempname): Shut up compiler
18008	warning.
18009
180102010-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
18011
18012	Fixes in message_stream.
18013
18014	* libmailutils/mailbox/message.c (_message_stream_seek): Fix
18015	ESPIPE conditional.
18016	(_message_stream_read): Keep running until buffer is full or
18017	_mss_eof state is reached.
18018	(_message_stream_readdelim): Keep running until buffer is full,
18019	_mss_eof state is reached or delimiter is found.
18020
180212010-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
18022
18023	sieve: rewrite lexer to use MU streams API.
18024
18025	* libmu_sieve/sieve.l (input_string_ptr, input_string_level):
18026	Remove.
18027	(input_stream): New static variable.
18028	(fillbuf): Use mu_stream_read
18029	(buffer_ctx)<yyin>: Replace with mu_stream_t input;
18030	(push_source, pop_source): Use stream API.
18031	(mu_sv_lex_begin_string): Likewise.
18032	* sieve/sieve.c (options): New option --expression.
18033	(expression_option): New variable.
18034	(parser): Handle the --expression option.
18035	(main): Treat SCRIPT as program text if given the --expression
18036	option.
18037
180382010-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
18039
18040	Revise TODO.
18041
180422010-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
18043
18044	imap4d: various fixes.
18045
18046	* imap4d/lsub.c (imap4d_lsub): Fix untagged responses.
18047	* imap4d/imap4d.h (make_interdir): New proto.
18048	* imap4d/create.c (mkdir_p): Remove function.
18049	(MKDIR_PERMISSIONS): Move macro definition to imap4d.h
18050	(imap4d_create): Use make_interdir instead of mkdir_p.
18051	* imap4d/rename.c (make_interdir): New function.
18052	(imap4d_rename): Create intermediate directories as required by
18053	RFC 3501. Issue additional diagnostics if rename fails. Fix OK
18054	response text.
18055	* imap4d/imap4d.c (imap4d_mainloop): Implement idle timeout.
18056	* imap4d/bye.c (imap4d_bye0): Reset the SIGPIPE before sending
18057	the OK response in order to avoid recursion.
18058
18059	Unrelated changes:
18060	* maidag/tests/forward.at: Fix the expected reply (see
18061	f5374bc2ff).
18062
180632010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18064
18065	Minor fix.
18066
180672010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18068
18069	imap4d: rewrite subscription support from scratch.
18070
18071	This still needs some more work because imap4d does not check
18072	whether the objects being subscribed to are valid folders or
18073	mailboxes.
18074
18075	* imap4d/imap4d.h (open_subscription): New prototype.
18076	* imap4d/lsub.c (imap4d_lsub): Rewrite using MU properties.
18077	* imap4d/subscribe.c (open_subscription): New function.
18078	(imap4d_subscribe): Rewrite using MU properties.
18079	* imap4d/unsubscribe.c (imap4d_unsubscribe): Rewrite using MU
18080	properties.
18081	* examples/mblconv.c: New file.
18082	* examples/Makefile.am: Add mblconv.c
18083
180842010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18085
18086	sortm: update current message number; add testsuite.
18087
18088	* mh/sortm.c (current_num): New variable.
18089	(sort): Keep track of the current message UID. Store it back to
18090	mailbox if in reorder mode.
18091	(main): Save initial current message UID. Save global and
18092	mailbox status before exiting.
18093	* mh/mh.h (mh_open_folder): Change last argument name.
18094	* mh_open_folder (mh_open_folder): Change meaning of the 2nd
18095	argument: it contains usual stream flags now. All uses changed.
18096	* mh/tests/sortm.at: New file.
18097	* mh/tests/testsuite.at: Include sortm.at
18098	* mh/tests/Makefile.am (TESTSUITE_AT): Add sortm.at.
18099
181002010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18101
18102	send: fix draftfolder support; add testsuite.
18103
18104	* examples/mta.c (mta_send): Don't print trailing spaces
18105	instead of empty lines.
18106	* mh/send.c: Redo draftfolder support.
18107	(read_mts_profile): If MTSTAILOR environment variable is set,
18108	it names the mtstailor file to use instead of the standard
18109	ones.
18110	* mh/tests/send.at: New file.
18111	* mh/tests/Makefile.am (TESTSUITE_AT): Add send.at
18112	* mh/tests/testsuite.at (MH_SETUP): Set MTSTAILOR.
18113	(MH_MTSTAILOR): New macro Include send.at
18114
181152010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18116
18117	Bugfix in libstream.
18118
18119	* libmailutils/stream/message_stream.c (_message_open): Don't
18120	clobber len.
18121
181222010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18123
18124	Minor fix in libstring.
18125
18126	* libmailutils/string/mkfilename.c (mu_make_file_name_suf):
18127	Don't add leading / if dir=="".
18128
181292010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18130
18131	mhn: fixes in compose mode.
18132
18133	* mh/mhn.c (edit_forw): Accept directives without explicit
18134	folder spec. Fix creation of individual mime parts; set
18135	Content-Type: message/rfc822 for each of them.
18136	(mhn_edit): Fix some coredumps.
18137	(main): Use -file argument, if it is given.
18138	* mh/tests/atlocal.in (mimeflt): New function.
18139	* mh/tests/mhn.at: Add tests for compose mode.
18140
181412010-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
18142
18143	mime creation: bugfixes.
18144
18145	* libmailutils/mime/mime.c (_mime_append_part): All numeric
18146	args are of type size_t.
18147	(_mime_part_size): Fix calculations.
18148	(mu_mime_get_part): Avoid coredump if stream is NULL.
18149
181502010-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
18151
18152	mhn: minor fix in edit mode.
18153
18154	* mh/mhn.c (mhn_edit): Increase line_count after outputting a
18155	line with a stripped-off initial #.
18156
181572010-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
18158
18159	mh: improve testsuite.
18160
18161	* mh/mhn.c (mhn_pause): Fix type of the local buffer variable.
18162	* mh/tests/mhn.at: Add more -show tests.
18163	* testsuite/mh/mime/1: New file.
18164	* testsuite/mh/mime/2: New file.
18165	* testsuite/Makefile.am (EXTRA_DIST): Add mime.
18166
181672010-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
18168
18169	streams: fix mu_stream_wait operation for buffered streams.
18170
18171	* libmailutils/stream/stream.c (mu_stream_wait): Fix condition
18172	to determine if the buffer contains some data. Avoid passing
18173	empty flags to the wait method.
18174
181752010-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
18176
18177	Minor fixes.
18178
181792010-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
18180
18181	mhn: compatibility fixes in show mode.
18182
18183	* mh/mhn.c (OPT_PAUSE): Remove define.
18184	(pause_option): New variable.
18185	(opt_handler): -pause/-nopause sets pause_option. If stdin is
18186	not a tty, set pause_option to 0.
18187	(check_type): New function.
18188	(mhn_show_command): If mhn-show-<type>[/<subtype>] is not set,
18189	use %pmoreproc '%F' for text/plain and message/rfc822 parts. If
18190	content type is application/octet-stream and type=tar, use tar
18191	to list the archive. Otherwise, complain and return NULL.
18192	(MHN_CONFIRM): Rename to MHN_PAUSE.
18193	(mhn_pause): New function.
18194	(show_handler): The value of pause_option controls the %p
18195	escape. Rewrite the MHN_PAUSE handling to avoid the use of the
18196	fixed-size buffer. Implement C-c handling, as in other mhns. If
18197	mhn_show_command returns NULL, do not attempt to show the
18198	content. Remove dubious usage of mu_transport_t.
18199	(mhn_store_command): handle application/octet-stream with
18200	type=tar.
18201	* mh/tests/mhn.at: Add a test for show mode.
18202
182032010-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
18204
18205	mh: further improvements in mnh & mh testsuite.
18206
18207	* mh/mhn.c (_mhn_profile_get): Try mhn-<prefix>-<type> if
18208	mhn-<prefix>-<type>/<subtype> does not exist.
18209	(normalize_path): Use mu_normalize_path.
18210	(store_handler) <store_to_file>: Honor mhn-<prefix>, if set.
18211	* tests/atlocal.in (remove_curdir): New function.
18212	* mh/tests/mhn.at: Implement more -store tests.
18213	* mh/tests/testsuite.at (MH_SETUP): Set curdir for use by other
18214	testcases.
18215	* mh/tests/comp.at: Use remove_curdir to sort out the cwd.
18216	* mh/tests/forw.at: Likewise.
18217	* mh/tests/mark.at: Likewise.
18218	* mh/tests/mhpath.at: Likewise.
18219	* mh/tests/repl.at: Likewise.
18220
182212010-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
18222
18223	mh: improve mhn store mode.
18224
18225	* mh/mhn.c (options): Add --build as an alias to --compose.
18226	(options): Likewise.
18227	(store_destination): New enum.
18228	(mhn_store_command): Support all variants of mhn-store-*
18229	components. Return store_destination type.
18230	(store_handler): Rewrite accordingly.
18231	(main): Consistently use mh_expand_name to expand the value of
18232	input_file.
18233	* mh/tests/mhn.at: New file.
18234	* mh/tests/Makefile.am (TESTSUITE_AT): Add mhn.at.
18235	* mh/tests/testsuite.at: Include mhn.at.
18236
182372010-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
18238
18239	mhn: minor improvements.
18240
18241	* mh/mhn.c: Use _sget_ calls where appropriate. Eliminate
18242	unnecessary memory allocations.
18243
182442010-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
18245
18246	mhn: implement mhn-suffix-<type> profile component.
18247
18248	* mh/mhn.c (_mhn_profile_get): All arguments are const.
18249	(mhn_tempfile_name): New function.
18250	(mhn_show_command): Use mhn_tempfile_name.
18251
182522010-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
18253
18254	Remove obsolete function.
18255
18256	* include/mailutils/body.h (mu_body_get_filename): Remove
18257	proto.
18258	* include/mailutils/sys/body.h (_mu_body) <filename>: Remove.
18259	* libmailutils/mailbox/body.c (mu_body_get_filename): Remove
18260	obsolete function.
18261	(_body_get_stream): Use mu_temp_file_stream_create.
18262	* libmailutils/stream/temp_file_stream.c
18263	(mu_temp_file_stream_create): Return EINVAL if flags is set,
18264	but hints is NULL.
18265	* libmu_scm/mu_body.c (mu_scm_body_print): Don't use
18266	mu_body_get_filename.
18267
182682010-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
18269
18270	temp_file_stream: Use mu_tempfile_hints to control how the file
18271	name is created.
18272
18273	* include/mailutils/stream.h (mu_temp_file_stream_create):
18274	Change signature.
18275	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
18276	temp_file_stream.h
18277	* include/mailutils/util.h (mu_tempfile_hints): Remove const
18278	qualifiers.
18279	* libmailutils/stream/temp_file_stream.c: Include
18280	sys/temp_file_stream.h.
18281	(fd_temp_open): Use data from struct _mu_temp_file_stream.
18282	(fd_temp_done): New function.
18283	(mu_temp_file_stream_create): Take hints and flags as
18284	arguments.
18285	* examples/mta.c: Update calls to mu_temp_file_stream_create.
18286	* libproto/mbox/mbox.c: Likewise.
18287	* libproto/pop/mbox.c: Likewise.
18288	* maidag/deliver.c: Likewise.
18289	* maidag/lmtp.c: Likewise.
18290	* mh/burst.c: Likewise.
18291	* mh/prompter.c: Likewise.
18292
182932010-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
18294
18295	Rewrite temporary file handling.
18296
18297	* include/mailutils/util.h (mu_make_file_name_suf): New proto.
18298	(mu_make_file_name): Replace with a macro.
18299	(MU_TEMPFILE_TMPDIR,MU_TEMPFILE_SUFFIX)
18300	(MU_TEMPFILE_MKDIR): New flags.
18301	(mu_tempfile_hints): New struct.
18302	(mu_tempfile): Change signature.
18303	* libmailutils/base/tempfile.c (mu_create_temp_file): New
18304	function.
18305	(mu_tempfile): Rewrite from scratch. Change signature. All
18306	callers changed.
18307	* libmailutils/string/mkfilename.c (mu_make_file_name): Remove.
18308	(mu_make_file_name_suf): New function.
18309	* libmailutils/stream/streamcpy.c (mu_stream_copy): Don't
18310	return EIO on EOF.
18311	* libmailutils/stream/file_stream.c (mu_fd_stream_create): If
18312	MU_STREAM_SEEK is set, position fd to 0.
18313	* guimb/collect.c: Update calls to mu_tempfile.
18314	* lib/mailcap.c: Likewise.
18315	* libmailutils/base/amd.c (_amd_tempfile): Rewrite using
18316	mu_tempfile.
18317	* libmailutils/tests/tempfile.c: New file.
18318	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add
18319	tempfile.
18320
183212010-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
18322
18323	mhn: minor changes.
18324
18325	* mh/etc/mhl.headers: New file.
18326	* mh/etc/Makefile.am (MH_FILES): Add mhl.headers.
18327	* mh/mhn.c (opt_handler): Use mh_find_file to resolve format
18328	file name.
18329	(mhn_show): Always open the formfile.
18330	(copy_header_to_stream): Rewrite using mu_stream_copy + HEADER
18331	filter.
18332
183332010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18334
18335	mh: add a forgotten file.
18336
18337	* mh/tests/movemsg: add to the repository.
18338
183392010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18340
18341	mh: minor changes in forw and repl; provide a set of
18342	traditional scan formats.
18343
18344	* mh/.gitignore: Update.
18345	* mh/compcommon.c (mh_comp_draft): Rewrite using mh_find_file
18346	and simplify. All callers changed.
18347	* mh/mh.h (mh_comp_draft): Change signature.
18348	* mh/comp.c (opt_handler) <ARGP_KEY_FINI>: Make sure formfile
18349	is initialized.
18350	* mh/forw.c: Likewise.
18351	* mh/repl.c (opt_handler): Remove unused variable.
18352	* mh/tests/comp.at (compcmd): Remove -form.
18353	* mh/tests/forw.at (forwcmd): Likewise.
18354	* mh/etc/.gitignore: New file.
18355	* mh/etc/Makefile.am: New file.
18356	* mh/etc/forwcomps: New file.
18357	* mh/etc/scan.default: New file.
18358	* mh/etc/scan.mailx: New file.
18359	* mh/etc/scan.size: New file.
18360	* mh/etc/scan.time: New file.
18361	* mh/etc/scan.timely: New file.
18362
183632010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18364
18365	mh: move format files to a separate directory.
18366
18367	* mh/etc: New directory.
18368	* mh/Makefile.am: New file.
18369	* mh/components: Move to mh/etc.
18370	* mh/mailutils-mh.eli: Move to mh/etc.
18371	* mh/mhl.format: Move to mh/etc.
18372	* mh/mhl.forward: Move to mh/etc.
18373	* mh/mhl.repl: Move to mh/etc.
18374	* mh/mhl.usenet: Move to mh/etc.
18375	* mh/replcomps: Move to mh/etc.
18376	* mh/replgroupcomps: Move to mh/etc.
18377	* configure.ac (AC_CONFIG_FILES): Add mh/etc/Makefile.
18378	* mh/Makefile.am (SUBDIRS): Add etc. Move mhlib_DATA and
18379	related statements to mh/etc/Makefile.am
18380	* mh/comp.c (formfile): Remove const qualifier.
18381	(opt_handler): Use mh_find_file to set formfile.
18382	* mh/forw.c: Likewise.
18383	* mh/mh_init.c (mh_find_file): Make sure *resolved_name is
18384	always set to the last tried name.
18385	* mh/tests/comp.at: Remove directory components from the -from
18386	argument.
18387	* mh/tests/forw.at: Likewise.
18388	* mh/tests/mhl.at: Likewise.
18389	* mh/tests/testsuite.at (MH_SETUP): Change mhetcdir value.
18390
183912010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18392
18393	mh: set a compatible search path for format files; other minor
18394	fixes.
18395
18396	* mh/mh_format.c (builtin_friendly): If personal part is
18397	present, return it. Otherwise, leave the address untouched.
18398	(builtin_pers): Do not quote the return.
18399	* mh/tests/inc.at: Reflect the above changes.
18400	* mh/tests/scan.at: Likewise.
18401	* mh/mh_list.c (eval_body): Offset each line.
18402	* mh/tests/mhl.at: Test this change.
18403	* mh/mhl.c: Use mh_find_file to resolve the argument to -form.
18404	* mh/repl.c: Likewise. Same for replgroupcomps, mhl.repl and
18405	-filter.
18406	* mh/mhl.repl: New file.
18407	* mh/mhl.usenet: New file.
18408	* mh/Makefile.am (mhlib_DATA, EXTRA_DIST): Add new files.
18409
184102010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18411
18412	wordsplit: fix whitespace trimming.
18413
18414	* libmailutils/string/wordsplit.c (mu_wordsplit_trimws): Do not
18415	touch quoted nodes.
18416	* libmailutils/tests/wordsplit.at: Test the above change.
18417
184182010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18419
18420	mh: fix the use of mhl.forward in forw.
18421
18422	* mh/mhl.forward: New file.
18423	* mh/forw.c (mh_option): the -format option is boolean.
18424	(mhl_filter): Rename to mhl_filter_file.
18425	(opt_handler) <ARG_FORMAT>: Use default mhl.filter.
18426	<ARG_NOFORMAT>: Set encap_clear.
18427	<ARG_FILTER>: Use mh_find_file to determine filter file name.
18428	(finish_draft): Use MHL filter file if encap == encap_mhl.
18429	* mh/mh.h (mh_find_file): New prototype.
18430	* mh/mh_init.c (mh_find_file): New file.
18431	(mh_read_formfile): Use mh_find_file to locate the file.
18432	* mh/tests/forw.at: Test forw -format.
18433	* mh/tests/mhparam.at: Update the -all test.
18434	* tests/testsuite.at (MH_SETUP): Set the "mhetcdir" component.
18435	* mh/scan.c (opt_handler): Exit if mh_read_formfile failed.
18436
184372010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18438
18439	New type of stream: static memory stream.
18440
18441	Static memory stream is a read-only stream whose transport is
18442	an arbitrary area of memory. Such streams allow the programmer
18443	to access C strings using streams interface.
18444
18445	* include/mailutils/stream.h (mu_static_memory_stream_create):
18446	New proto.
18447	* libmailutils/stream/memory_stream.c
18448	(mu_static_memory_stream_create): New function.
18449	* imap4d/append.c (imap4d_append0): Use static memory stream to
18450	create a temporary message.
18451	* imap4d/preauth.c (decode64_buf): Use static memory stream.
18452	* libmailutils/base/rfc2047.c (mu_rfc2047_decode): Likewise.
18453	* libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param):
18454	Likewise.
18455	* libmu_auth/ldap.c (chk_md5, chk_sha, chk_ssha): Likewise.
18456	* libmu_sieve/extensions/vacation.c (build_mime): Likewise.
18457
184582010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18459
18460	Fix body start calculation in message_stream. Fix compose
18461	parser in mhn.
18462
18463	* libmailutils/stream/message_stream.c (scan_stream): Merge
18464	with _message_open.
18465	* mh/mhn.c (edit_forw): Do not set ws_delim. Fix message
18466	addressing.
18467	(mhn_edit): Remove the trailing newline.
18468
184692010-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
18470
18471	mh: implement rmmproc.
18472
18473	* include/mailutils/sys/amd.h (_amd_data) <delete_msg>: New
18474	method.
18475	* libmailutils/base/amd.c (amd_expunge): If delete_msg is
18476	defined, use it.
18477	* libproto/mh/mbox.c (_mh_msg_delete): New method.
18478	(_mailbox_mh_init): Set delete_msg if "rmmproc" component is
18479	defined.
18480	* mh/tests/movemsg: New file.
18481	* mh/tests/Makefile.am (EXTRA_DIST): Add movemsg.
18482	* mh/tests/rmm.at: Test rmmproc effects.
18483	* mh/tests/rmf.at (MH_KEYWORDS): Fix copy-n-paste error.
18484	* doc/texinfo/mu-mh.texi: Document rmmproc.
18485	* mh/TODO: Update.
18486
184872010-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
18488
18489	mh: add repl tests.
18490
18491	* mh/repl.c: Minor changes.
18492	* tests/repl.at: New file.
18493	* tests/Makefile.am (TESTSUITE_AT): Add repl.at
18494	* mh/tests/testsuite.at: Include repl.at.
18495	* mh/TODO: Update.
18496
184972010-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
18498
18499	mh: improve forw; add tests.
18500
18501	* mh/forw.c (options): New option --file.
18502	(input_file): New variable.
18503	(opt_handler): Handle --file.
18504	(finish_draft): Remove a leftover path hack. Implement raw file
18505	forwarding.
18506	(main): Minor fix.
18507	* mh/mh_getopt.c (mh_option_init): Limit match_len to the
18508	actual length of the option string.
18509	* mh/tests/forw.at: New file.
18510	* mh/tests/Makefile.am (TESTSUITE_AT): Add forw.at.
18511	* mh/tests/testsuite.at: Include forw.at.
18512	* mh/tests/comp.at: Add more keywords.
18513
185142010-11-22  Sergey Poznyakoff  <gray@gnu.org.ua>
18515
18516	Provide a library function for translating message UIDs to
18517	numbers and vice versa.
18518
18519	* include/mailutils/mailbox.h (MU_MAILBOX_UID_TO_MSGNO)
18520	(MU_MAILBOX_MSGNO_TO_UID): New defines.
18521	(mu_mailbox_translate): New proto.
18522	* include/mailutils/sys/mailbox.h (_mu_mailbox) <_translate>:
18523	New method.
18524	* libmailutils/mailbox/mailbox.c (mu_mailbox_translate): New
18525	function.
18526	* libproto/mh/mbox.c (mh_translate): New function. Implements
18527	the _translate method.
18528	* mh/mh_msgset.c (mh_uid_to_msgno, mh_msgno_to_uid): Remove.
18529	All callers updated to use mu_mailbox_translate instead.
18530	(mh_search_message): Remove.
18531	(mh_get_message): Rewrite using mu_mailbox_translate.
18532	* mh/comp.c (copy_message): Check return from
18533	mu_mailbox_get_message.
18534	* mh/mh_init.c (mh_draft_message): Rewrite using
18535	mu_url_sget_path.
18536	* mh/tests/comp.at: Test draftfolder functionality.
18537
185382010-11-22  Sergey Poznyakoff  <gray@gnu.org.ua>
18539
18540	mh: fix msgset parser and some more comp compatibility issues;
18541	provide testsuite for comp. * mh/Makefile.am (bin_PROGRAMS):
18542	Add mhseq. * mh/comp.c (main): Rewrite to fix compatibility
18543	issues. * mh/mh.h (MH_MSGSET_UID): New define. (mh_msgset_t)
18544	<flags,size>: New members. * mh/mh_init.c (mh_draft_message):
18545	Bugfix: convert msgset to UIDs. * mh/mh_msgset.c: Rewrite from
18546	scratch.
18547
18548	* mh/tests/comp.at: New file.
18549	* mh/tests/mhseq.at: New file.
18550	* mh/tests/Makefile.am (TESTSUITE_AT): Add comp.at, mhseq.at.
18551	* mh/tests/testsuite.at: Include comp.at and mhseq.at.
18552	* libmailutils/property/mhprop.c (_mh_prop_read_stream): Minor
18553	fix. Do remove empty lines.
18554	* mh/mh_whatnow.c (_whatnow): Detect EOF.
18555	(call_send): Quit after successful send.
18556
185572010-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
18558
18559	mh: Fix compatibility issues in the draftfolder facility.
18560	Implement whatnowproc.
18561
18562	* mh/whatnowenv.c: New source.
18563	* mh/Makefile.am (libmh_a_SOURCES): Add whatnowenv.c
18564	* mh/TODO: Update.
18565	* mh/comp.c: Implement draftfolder, whatnowproc and the -use
18566	option.
18567	* mh/forw.c: Likewise.
18568	* mh/repl.c: Likewise.
18569	* mh/compcommon.c (check_draft_disposition): Fix typo.
18570	* mh/mh.h (mh_whatnow_env) <draftfolder>: Remove.
18571	<mbox>: New member.
18572	(mh_whatnowproc): New proto. (mh_whatnow_env_from_environ)
18573	(mh_whatnow_env_to_environ): New proto.
18574	* mh/mh_global.c (prop_merger): Bugfix: initialize dst.
18575	* mh/mh_init.c (mh_draft_message): Update cur msg.
18576	* mh/mh_whatnow.c (mh_whatnowproc): New function.
18577	* mh/whatnow.c (opt_handler): Do not read Draft-Folder
18578	variable.
18579	(main): Initialize data from the environment.
18580
185812010-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
18582
18583	mh: improve component reading (profile, context and whom).
18584
18585	* libmailutils/filter/header.c: New file.
18586	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
18587	header.c.
18588	* libmailutils/filter/filter.c (mu_filter_get_list): Register
18589	mu_header_filter.
18590	* libmailutils/filter/inline-comment.c: (ilcmt_ws)
18591	(ilcmt_rollback): New states.
18592	(ILCMT_REMOVE_EMPTY_LINES,ILCMT_SQUEEZE_WS): New flags.
18593	(ilcmt_data)<buf,size,level,replay>: New members.
18594	(ilcmt_action): New enum
18595	(new_ilcmt_state): Return enum ilcmt_action.
18596	(_ilcmt_decoder): Optionally remove empty lines and squeeze
18597	leading white space.
18598	* libmailutils/property/mhprop.c (_mh_prop_read_stream): Remove
18599	empty lines from the input.
18600	* libmailutils/tests/Makefile.am (TESTSUITE_AT): Add hdrflt.at
18601	and inline-comment.at.
18602	* libmailutils/tests/testsuite.at: Include hdrflt.at and
18603	inline-comment.at.
18604	* libmailutils/tests/fltst.c: Pass optional arguments to the
18605	filter creation procedure.
18606	* mh/mh_whom.c (read_header): New function.
18607	(mh_whom): Rewrite using headers.
18608	* include/mailutils/filter.h: Fix a typo.
18609	* libmailutils/stream/fltstream.c: Likewise.
18610	* libmu_auth/gsasl.c: Likewise.
18611
186122010-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
18613
18614	Move MH profile & context support to libproto.
18615
18616	* mh/mh_ctx.c: Remove.
18617	* mh/Makefile.am (libmh_a_SOURCES): Remove mh_ctx.c
18618	* mh/folder.c (read_seq_file): Use mu_property_t.
18619	* mh/mh.h (mh_context_iterator): Remove typedef.
18620	(mh_global_profile_get, mh_global_profile_set)
18621	(mh_global_profile_iterate)
18622	(mh_global_context_set,mh_global_context_set)
18623	(mh_global_context_iterate): Rewrite as macros.
18624	(mh_global_sequences_iterate): Change signature.
18625	(mh_read_property_file,mh_property_merge): New protos.
18626	(mh_context_create,mh_context_read,mh_context_write)
18627	(mh_context_get_value,mh_context_set_value,mh_context_iterate)
18628	(mh_context_destroy,mh_context_merge): Remove protos.
18629	* mh/mh_global.c (mh_global_profile_get, mh_global_profile_set)
18630	(mh_global_profile_iterate)
18631	(mh_global_context_set,mh_global_context_set)
18632	(mh_global_context_iterate): Remove.
18633	(mh_read_property_file,mh_property_merge): New functions.
18634	(_mh_init_global_context,mh_read_profile)
18635	(mh_set_current_folder,mh_global_sequences_iterate): Rewrite.
18636	(mh_global_save_state): Rewrite.
18637	* mh/mh_whom.c (mh_whom): Use mu_property_t.
18638	* mh/send.c: Use mu_property_t.
18639	* po/POTFILES.in: Add mh/mboxprop.c.
18640
186412010-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
18642
18643	Re-implement MH sequences via mailbox properties.
18644
18645	* libmailutils/mailbox/header.c (mu_header_clear): New
18646	function.
18647	(mu_header_sget_value_n): Tolerate pval == NULL.
18648	* libmailutils/property/assocprop.c (_assoc_prop_setval):
18649	Bugfix.
18650	(_assoc_prop_clear): New method.
18651	(mu_assoc_property_init): Reference the stream.
18652	(mu_assoc_property_init): Initialize _prop_clear.
18653	* libmailutils/property/create.c (_mu_property_init): Now
18654	extern.
18655	* libmailutils/property/propset.c (mu_property_set_value): Null
18656	value means unset.
18657	* libmailutils/tests/prop.at: Test property clear and
18658	invalidate.
18659	* libmailutils/tests/prop.c: New commands: 0 for property clear
18660	and ! for invalidate.
18661	* libmailutils/property/mhprop.c: New file.
18662	* libmailutils/property/propclr.c: New file.
18663	* libmailutils/property/propinv.c: New file.
18664	* libmailutils/property/Makefile.am (noinst_LTLIBRARIES): Add
18665	new files.
18666	* include/mailutils/header.h (mu_header_clear): New proto.
18667	* include/mailutils/property.h (mu_property_clear)
18668	(mu_property_invalidate): New protos.
18669	(mu_mh_prop): New struct.
18670	(mu_mh_property_init): New proto.
18671	* include/mailutils/sys/property.h (_mu_property)
18672	<_prop_clear>: New member.
18673	(_mu_property_init): New proto.
18674	* include/mailutils/mh.h: New file.
18675	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add mh.h
18676	* libproto/mh/profile.c: New file.
18677	* libproto/mh/Makefile.am (libmu_mh_la_SOURCES): Add new files.
18678	* libproto/mh/mbox.c (mh_get_property): New static function.
18679	(_mailbox_mh_init): Set _get_property.
18680	* mh/mh_global.c (current_message, sequences): Remove. Use mbox
18681	properties instead. (mh_global_sequences_get)
18682	(mh_global_sequences_set) (mh_global_sequences_iterate)
18683	(mh_global_sequences_drop): Take mbox as first argument. All
18684	callers updated.
18685	* mh/mh_init.c (mh_init2): Remove call to
18686	mh_global_sequences_get.
18687	* mh/mh_msgset.c (msgset_cur): Use mh_mailbox_get_cur.
18688	* mh/mh_sequence.c (mh_seq_read, write_sequence)
18689	(delete_sequence, mh_seq_add, mh_seq_delete): Take mbox as
18690	first argument. All callers updated.
18691	* mh/mh.h: Include mailutils/property.h.
18692	(current_message): Remove.
18693	(mh_mailbox_cur_default): New extern. (mh_global_sequences_get)
18694	(mh_global_sequences_set) (mh_global_sequences_iterate)
18695	(mh_global_sequences_drop): Take mbox as first argument. All
18696	callers updated.
18697	* mh/mh_format.c (builtin_cur): Rewrite using
18698	mh_message_number.
18699	* mh/mboxprop.c: New file.
18700	* mh/Makefile.am (libmh_a_SOURCES): Add new file.
18701	* mh/folder.c: Update calls to sequence management functions.
18702	* mh/mark.c: Likewise.
18703	* mh/pick.c: Likewise.
18704	* mh/inc.c (main): Set mh_mailbox_cur_default to 1. Invalidate
18705	properties if changecur is not set.
18706	* mh/prompter.c (main): Destroy the iterator.
18707	* mh/rmf.c: Rewrite using mu_mailbox_remove.
18708	* mh/scan.c: Always close the mailbox.
18709	* mh/tests/folder.at: Update.
18710	* mh/tests/inc.at: Update. Inc now sets cur to 1 if it was not
18711	originally set. This is what others MHs do.
18712
187132010-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
18714
18715	Rewrite property support.
18716
18717	* configure.ac: Add libmailutils/property/Makefile to config
18718	files.
18719	* include/mailutils/property.h (mu_property_create)
18720	(mu_property_destroy): Change signature.
18721	(mu_property_get_owner): Remove. (mu_property_create_init)
18722	(mu_property_set_init, mu_property_set_init_data)
18723	(mu_property_ref, mu_property_unref)
18724	(mu_property_save): New protos. (mu_property_get_iterator)
18725	(mu_assoc_property_init): New protos.
18726	* include/mailutils/sys/property.h (property_item): Remove
18727	definition.
18728	(MU_PROP_INIT, MU_PROP_FILL, MU_PROP_MODIFIED): New flags.
18729	(_mu_property): Rewrite from scratch.
18730	(_mu_property_check): New proto.
18731	* libmailutils/property/Makefile.am: New file.
18732	* libmailutils/property/assocprop.c: New file.
18733	* libmailutils/property/create.c: New file.
18734	* libmailutils/property/propget.c: New file.
18735	* libmailutils/property/propitr.c: New file.
18736	* libmailutils/property/propset.c: New file.
18737	* libmailutils/Makefile.am (SUBDIRS): Add property.
18738	(libmailutils_la_LIBADD): Add property/libproperty.la.
18739	* libmailutils/base/property.c: Remove.
18740	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove
18741	property.c
18742	* libmailutils/base/assoc.c (first): Avoid coredumping on empty
18743	hash table.
18744	* include/mailutils/folder.h (mu_folder_set_property)
18745	(mu_folder_get_property): New protos.
18746	* include/mailutils/sys/folder.h (_mu_folder) <property>
18747	<_get_property>: New members.
18748	* libmailutils/mailbox/folder.c (mu_folder_destroy): Destroy
18749	the property. (mu_folder_get_property)
18750	(mu_folder_set_property): New functions.
18751	* include/mailutils/mailbox.h (mu_mailbox_set_property): New
18752	proto.
18753	* libmailutils/mailbox/mailbox.c (mu_mailbox_set_property): New
18754	function.
18755	(mu_mailbox_get_property): Use _get_property method.
18756	* include/mailutils/mailer.h (mu_mailer_set_property): New
18757	proto.
18758	* include/mailutils/sys/mailer.h (_mu_mailer) <_get_property>:
18759	New member.
18760	* libmailutils/mailer/mailer.c (mu_mailer_set_property): New
18761	function.
18762	(mu_mailer_get_property): Use _get_property method.
18763	* include/mailutils/iterator.h (mu_iterator_set_dataptr): New
18764	proto.
18765	* include/mailutils/sys/iterator.h (_mu_iterator) <dataptr>:
18766	New method.
18767	* libmailutils/base/iterator.c (mu_iterator_set_dataptr): New
18768	function.
18769	(mu_iterator_current): Rewrite as a wrapper around
18770	mu_iterator_current_kv.
18771	(mu_iterator_current_kv): Use dataptr method (if defined) to
18772	extract the data pointer.
18773	* libmailutils/tests/prop.c: New file.
18774	* libmailutils/tests/prop.at: New file.
18775	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add prop.
18776	(TESTSUITE_AT): Add prop.at.
18777	* libmailutils/tests/testsuite.at: Include prop.at.
18778
187792010-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
18780
18781	mh: Minor fixes.
18782
187832010-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
18784
18785	Minor fix.
18786
18787	* mh/prompter.c (main): Append terminating \0 to the opool.
18788
187892010-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
18790
18791	mh: implement prompter.
18792
18793	* configure.ac (MU_COND_READLINE): New cond.
18794	* mh/prompter.c: New file.
18795	* mh/prompter-rl.c: New file.
18796	* mh/prompter-tty.c: New file.
18797	* mh/prompter.h: New file.
18798	* mh/TODO: Update.
18799	* mh/Makefile.am: Build prompter.
18800	* doc/texinfo/mu-mh.texi: Document prompter
18801	* po/POTFILES.in: Update.
18802
188032010-11-17  Sergey Poznyakoff  <gray@gnu.org.ua>
18804
18805	Implement "inline-comment" filter.
18806
18807	* include/mailutils/filter.h (mu_filter_xcode_t): Change
18808	signature.
18809	(mu_filter_create_args): New proto.
18810	(mu_inline_comment_filter): New extern.
18811	* libmailutils/filter/inline-comment.c: New file.
18812	* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add
18813	inline-comment.c.
18814	* libmailutils/filter/crlfdot.c (alloc_state): Update
18815	declaration.
18816	* libmailutils/filter/crlfflt.c: Likewise.
18817	* libmailutils/filter/dot.c: Likewise.
18818	* libmailutils/filter/fromflt.c (_from_alloc_state): Likewise.
18819	* libmailutils/filter/filter.c (mu_filter_create_args): New
18820	function.
18821	(mu_filter_create): Rewrite via mu_filter_create_args.
18822
18823	mh: inline comments are allowed for use in components and
18824	forwcomp files.
18825	* mh/compcommon.c (mh_comp_draft): Fix erroneous conditional.
18826	* mh/components: Add comments.
18827	* mh/mh_init.c (mh_file_copy): Rewrite using new API.
18828
18829	mu filter: new option to list supported filters.
18830	* mu/filter.c (filter_options): New option --list (-L).
18831	(filter_parse_opt): Handle the -L option.
18832	(filter_printer, list_filters): New functions.
18833	(main): Print a list of filters if --list was given.
18834
188352010-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
18836
18837	mh: Optimize for speed.
18838
18839	* mh/burst.c (transtab): Revamp as a proper translation table.
18840	It is indexed by the current state offset by 1 and the last
18841	read character.
18842	(token_num): Remove.
18843	(finish_stream, flush_stream): Inline functions.
18844	(burst_digest): Change transtab indexing.
18845
188462010-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
18847
18848	mh: further fixes in burst testsuite.
18849
18850	* mh/burst.c: Minor changes.
18851	* mh/tests/burst.at: Remove host-specific information.
18852
188532010-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
18854
18855	mh: minor fix in traditional option handler.
18856
18857	* mh/mh_getopt.c (mh_option_init): Enforce the computed minlen
18858	on each option which begins on the same letter as the sample.
18859
188602010-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
18861
18862	mh: rmm now saves state before returning.
18863
18864	* mh/rmm.c (main): Call mh_global_save_state.
18865
188662010-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
18867
18868	mh: fix burst, provide test cases.
18869
18870	* mh/burst.c (burst_stream): New struct.
18871	(finish_stream): Change signature. Keep track of current part
18872	number and flags.
18873	(flush_stream): Rewrite.
18874	(burst_digest): Remove extra buffering code. Rely on the stream
18875	buffering instead. Fixed length-based EB detection. Return 0 if
18876	the message has been burst successfully, 1 if it is not in
18877	digest format.
18878	(burst_or_copy): Revert the condition on burst_digest.
18879	* tests/burst.at: New test.
18880	* tests/Makefile.am (TESTSUITE_AT): Add burst.at
18881	* tests/testsuite.at: Include burst.at
18882
188832010-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
18884
18885	message_stream: Bugfix.
18886
18887	* libmailutils/stream/message_stream.c (copy_trimmed_value):
18888	Fix memory allocation.
18889
188902010-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
18891
18892	mh: fix testsuite, add new tests.
18893
18894	* mh/ali.c (ali_print_name_list): Print -list output.
18895	* mh/tests/ali.at: New test case.
18896	* mh/tests/Makefile.am (TESTSUITE_AT): Add ali.at
18897	* mh/tests/testsuite.at: Include ali.at.
18898	* mh/tests/anno.at: Fix MH_KEYWORDS definition.
18899	* mh/tests/folder.at: Likewise.
18900	* mh/tests/inc.at: Likewise.
18901	* mh/tests/mark.at: Likewise.
18902	* mh/tests/mhl.at: Likewise.
18903	* mh/tests/mhparam.at: Likewise.
18904	* mh/tests/mhpath.at: Likewise.
18905	* mh/tests/refile.at: Likewise.
18906	* mh/tests/rmf.at: Likewise.
18907	* mh/tests/pick.at: Fix MH_KEYWORDS definition. Add more tests.
18908
189092010-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
18910
18911	mh: Add new tests.
18912
18913	* mh/mh_init.c (mh_install): Exit with code 1 on errors.
18914	* mh/tests/install-mh.at: New file.
18915	* mh/tests/pick.at: New file.
18916	* mh/tests/Makefile.am (TESTSUITE_AT): Add install-mh.at,
18917	pick.at.
18918	* mh/tests/testsuite.at: Include install-mh.at and pick.at.
18919
189202010-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
18921
18922	mh: improve GNU option parser and help output.
18923
18924	* mh/mh_argp.c (mh_argp_children): Set group number -2, to
18925	place help output between the application help and
18926	informational options.
18927	* mh/mhn.c (options): Regroup options,
18928	* mh/pick.c: Likewise.
18929	* mh/ali.c: Reword arg docs.
18930	* mh/anno.c: Likewise.
18931	* mh/burst.c: Likewise.
18932	* mh/comp.c: Likewise.
18933	* mh/fmtcheck.c: Likewise.
18934	* mh/folder.c: Likewise.
18935	* mh/forw.c: Likewise.
18936	* mh/inc.c: Likewise.
18937	* mh/install-mh.c: Likewise.
18938	* mh/mark.c: Likewise.
18939	* mh/mh_argp.c: Likewise.
18940	* mh/mhl.c: Likewise.
18941	* mh/mhn.c: Likewise.
18942	* mh/mhparam.c: Likewise.
18943	* mh/mhpath.c: Likewise.
18944	* mh/pick.c: Likewise.
18945	* mh/refile.c: Likewise.
18946	* mh/repl.c: Likewise.
18947	* mh/rmf.c: Likewise.
18948	* mh/rmm.c: Likewise.
18949	* mh/scan.c: Likewise.
18950	* mh/send.c: Likewise.
18951	* mh/sortm.c: Likewise.
18952	* mh/whom.c: Likewise.
18953
189542010-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
18955
18956	mh: improve traditional option parser and help output.
18957
18958	* mh/mh_getopt.h (mh_option): Move match_len to the end of the
18959	structure. It should not be initialized.
18960	(mh_option_init): New prototype.
18961	* mh/mh_getopt.c (mh_option_init): New function.
18962	* mh/mh_argp.c (mh_argp_parse): Call mh_option_init.
18963	* mh/ali.c: Update mh_option declaration.
18964	* mh/anno.c: Likewise.
18965	* mh/burst.c: Likewise.
18966	* mh/comp.c: Likewise.
18967	* mh/fmtcheck.c: Likewise.
18968	* mh/folder.c: Likewise.
18969	* mh/forw.c: Likewise.
18970	* mh/inc.c: Likewise.
18971	* mh/install-mh.c: Likewise.
18972	* mh/mark.c: Likewise.
18973	* mh/mhl.c: Likewise.
18974	* mh/mhn.c: Likewise.
18975	* mh/mhparam.c: Likewise.
18976	* mh/mhpath.c: Likewise.
18977	* mh/pick.c: Likewise.
18978	* mh/refile.c: Likewise.
18979	* mh/repl.c: Likewise.
18980	* mh/rmf.c: Likewise.
18981	* mh/rmm.c: Likewise.
18982	* mh/scan.c: Likewise.
18983	* mh/send.c: Likewise.
18984	* mh/sortm.c: Likewise.
18985	* mh/whatnow.c: Likewise.
18986	* mh/whom.c: Likewise.
18987
189882010-11-14  Sergey Poznyakoff  <gray@gnu.org.ua>
18989
18990	pick: improve compatibility.
18991
18992	The traditional component matching syntax, `--COMP STRING', is
18993	accepted, provided at least one of the following conditions is
18994	met:
18995
18996	1. The word `COMP' contains at least one capital letter; 2. The
18997	word `COMP' ends with a colon; 3. Standard input is not
18998	connected to a terminal.
18999
19000	* mh/mh_getopt.c (mh_help_hook): New global variable.
19001	(mh_help): Call mh_help_hook, if set.
19002	* mh/mh_getopt.h (mh_help_hook): New extern.
19003	* mh/pick.c (doc): Update.
19004	(opt_handler): Remove ARGP_KEY_ERROR case.
19005	(pick_help_hook): New function.
19006	(main): Convert any instance of `--comp string' to
19007	`--component=comp --pattern=string', if comp contains a capital
19008	letter or ends with a colon, or fd 0 is not connected to
19009	terminal.
19010	* doc/texinfo/mu-mh.texi: Document changes to pick.
19011
190122010-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
19013
19014	Minor fix in the test suite.
19015
19016	Replace 'Mirddin.farlep.net' with 'example.net' throughout the
19017	testsuite. Change expected message/part sizes accordingly.
19018	Files changed:
19019
19020	* imap4d/testsuite/imap4d/fetch.exp
19021	* mail/testsuite/mail/folder.exp
19022	* mail/testsuite/mail/read.exp
19023	* mail/testsuite/mail/write.exp
19024	* mh/tests/scan.at
19025	* readmsg/tests/all.at
19026	* testsuite/maildir/mbox1/new/1284628225.M20118P3883Q2.Trurl
19027	* testsuite/maildir/mbox1/new/1284628225.M21284P3883Q3.Trurl
19028	* testsuite/maildir/mbox1/new/1284628225.M22502P3883Q4.Trurl
19029	* testsuite/mh/mbox1/3
19030	* testsuite/mh/mbox1/4
19031	* testsuite/mh/mbox1/5
19032	* testsuite/mime.at
19033	* testsuite/spool/mbox
19034	* testsuite/spool/mbox1
19035	* testsuite/spool/relational.mbox
19036
190372010-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
19038
19039	Document null streams.
19040
19041	* doc/texinfo/nullstream.texi: New file.
19042	* mh/mh_init.c (mh_real_install): Use mu_stream_t instead of
19043	FILE.
19044	* mh/mh_whatnow.c (_whatnow): Likewise.
19045
190462010-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
19047
19048	anno: Minor improvements.
19049
19050	* mh/mh_init.c (mh_init): Make sure stdin is open.
19051	* mh/anno.c (main): Use mu_stream_t to read the answer from
19052	stdin. Do not display prompt if stdin is not connected to a
19053	tty.
19054	* mh/tests/anno.at: New testcase.
19055	* mh/tests/Makefile.am (TESTSUITE_AT): Add anno.at
19056	* mh/tests/testsuite.at: Include anno.at.
19057	* doc/texinfo/mu-mh.texi: Document the changes in the behavior
19058	of anno.
19059
190602010-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
19061
19062	mhl: Improve backward compatibility.  Provide a test case.
19063
19064	Mhl now accepts the traditional use of "ignores=", i.e. as a
19065	single statement on a line and without double-quotes around the
19066	argument.
19067
19068	Additional quotes around variable values are not needed in most
19069	cases.
19070
19071	The name of a component is not printed if that component is not
19072	present.
19073
19074	The offset variable works as in MH and nmh.
19075
19076	* mh/mh_list.c (parse_variable): Accept traditional use of
19077	"ignores=", as a single statement on a line, without
19078	double-quotes around the argument.
19079	(mhl_format_compile): Use mu_streams instead of FILE. Fix line
19080	counting.
19081	(header_is_printed, want_header): Last argument is const char
19082	*.
19083	(ovf_print): Move to the specified offset no matter what the
19084	value of prefix is.
19085	(print_component_name): New function.
19086	(eval_component): Call print_component_name and newline, if
19087	necessary
19088	(eval_body): Likewise.
19089	(eval_extras): Likewise.
19090	(eval_comp): Do not print component name, leave that to the
19091	called function. Ditto for the trailing newline.
19092	* mh/mhl.c: Ignore empty moreproc value.
19093	* mh/mhl.format: Remove extra double-quotes.
19094	* mh/tests/mhl.at: New testcase.
19095	* mh/tests/Makefile.am (TESTSUITE_AT): Add mhl.at
19096	* mh/tests/testsuite.at: Include mhl.at
19097	* libmailutils/string/wordsplit.c (scan_qstring): Force
19098	_WSNF_EMPTYOK.
19099	(mu_wordsplit_len): Make sure the tail element is not joinable
19100	* libmailutils/tests/wordsplit.at: Test these changes.
19101	* doc/texinfo/mu-mh.texi: Update the description of mhl.
19102
191032010-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
19104
19105	Add MH testsuite.
19106
19107	* configure.ac (mh/tests): New testdir
19108	* mh/Makefile.am (SUBDIRS): Add tests
19109	* tests/Makefile.am: New file.
19110	* mh/tests/Makefile.am: New file.
19111	* mh/tests/atlocal.in: New file.
19112	* mh/tests/folder.at: New file.
19113	* mh/tests/inc.at: New file.
19114	* mh/tests/mark.at: New file.
19115	* mh/tests/mhparam.at: New file.
19116	* mh/tests/mhpath.at: New file.
19117	* mh/tests/refile.at: New file.
19118	* mh/tests/rmf.at: New file.
19119	* mh/tests/rmm.at: New file.
19120	* mh/tests/scan.at: New file.
19121	* mh/tests/testsuite.at: New file.
19122	* mh/tests/.gitignore: New file.
19123	* testsuite/testsuite.inc (MUT_MBCOPY): Work correctly if DST
19124	is a directory name (for MH and maildir formats).
19125	* mh/folder.c (action_list): Treat empty value as equal to no
19126	value.
19127	* mh/install-mh.c (main): Honor MH environment variable.
19128	* mh/mh_ctx.c (mh_context_read, mh_context_write): Use MU
19129	streams instead of stdio FILE.
19130	(mh_context_iterate): Add error checking. Do not coredump on
19131	NULL header.
19132	* mh/mh_global.c (_mh_init_global_sequences): Destroy
19133	sequences.
19134	* mh/TODO: Update.
19135	* libmailutils/stream/message_stream.c (copy_trimmed_value):
19136	New static function.
19137	(scan_stream): Strip final newline from the saved envelope
19138	values.
19139	* mu/Makefile.am (BUILD_SOURCES, EXTRA_DIST): Add mu-setup.c
19140	and mu-setup.h.
19141
191422010-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
19143
19144	mhn: optimize using new API.
19145
19146	* mh/mhn.c (_get_hdr_value): Remove. All callers modified to
19147	use mu_header_aget_value_unfold instead.
19148	(mhn_message_size): Type of 2nd arg is mu_off_t *. Use null
19149	stream & stream stats in realsize mode.
19150	(list_handler): Fix rounding of the message size.
19151	(copy_header): Use mu_header_sget* to avoid unnecessary memory
19152	allocations.
19153
191542010-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
19155
19156	Improve stream statistics interface. Introduce "null stream".
19157
19158	* include/mailutils/stream.h (MU_IOCTL_NULLSTREAM_SET_PATTERN)
19159	(MU_IOCTL_NULLSTREAM_SET_PATCLASS)
19160	(MU_IOCTL_NULLSTREAM_SETSIZE)
19161	(MU_IOCTL_NULLSTREAM_CLRSIZE): New ioctl opcodes.
19162	(mu_nullstream_pattern): New struct.
19163	(MU_STREAM_STAT_IN,MU_STREAM_STAT_OUT)
19164	(MU_STREAM_STAT_READS,MU_STREAM_STAT_WRITES)
19165	(MU_STREAM_STAT_SEEKS,_MU_STREAM_STAT_MAX): New defines.
19166	(MU_STREAM_STAT_MASK): New macro.
19167	(MU_STREAM_STAT_MASK_ALL): New define.
19168	(mu_stream_stat_buffer): New typedef. (mu_stream_set_stat,
19169	mu_stream_get_stat)
19170	(mu_nullstream_create): New protos.
19171	(mu_stream_bytes_in, mu_stream_bytes_out): Remove protos.
19172	* include/mailutils/sys/nullstream.h: New file.
19173	* include/mailutils/sys/stream.h (_mu_stream) <bytes_in>,
19174	<bytes_out>: Remove.
19175	<statmask,statbuf>: New members.
19176	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
19177	nullstream.h.
19178	* libmailutils/stream/nullstream.c: New file.
19179	* libmailutils/stream/stream.c (_stream_read, _stream_write)
19180	(_stream_seek, _stream_stat_incr): New macros.
19181	(_stream_fill_buffer, mu_stream_seek) (_stream_read_unbuffered)
19182	(_stream_write_unbuffered): Use _stream_read, _stream_write and
19183	_stream_seek instead of calling the corresponding methods
19184	directly.
19185	(mu_stream_bytes_in, mu_stream_bytes_out): Remove.
19186	(mu_stream_unref): Clear statbuf, if provided.
19187	(mu_stream_set_stat, mu_stream_get_stat): New functions.
19188	* libmailutils/stream/Makefile.am (libstream_la_SOURCES): Add
19189	nullstream.c.
19190	* libmailutils/stream/fltstream.c (filter_wr_close): Check for
19191	fs->eof.
19192	* examples/base64.c (c_copy): Use new statistics interface.
19193	* libmailutils/tests/fltst.c: Likewise.
19194
191952010-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
19196
19197	attachment.c: redesign/simplify using the new API.
19198
19199	* libmailutils/mime/attachment.c (BUF_SIZE): Remove.
19200	(_mu_mime_io_buffer)<buf, bufsize>: Remove members.
19201	(MSG_HDR): Remove.
19202	(mu_message_create_attachment): Use mu_asprintf instead of
19203	manually crafting the string. (mu_mime_io_buffer_set_size)
19204	(mu_mime_io_buffer_get_size): Remove.
19205	(mu_message_save_attachment) (mu_message_encapsulate)
19206	(mu_message_unencapsulate): Use mu_header_sget to avoid
19207	unnecessary memory allocations. Use mu_stream_copy instead of
19208	(ineffective) loops.
19209	* include/mailutils/message.h (mu_mime_io_buffer_set_size)
19210	(mu_mime_io_buffer_get_size): Remove prototypes.
19211	* include/mailutils/header.h (MU_HEADER_RESENT_SENDER)
19212	(MU_HEADER_CONTENT_TRANSFER_ENCODING) (MU_HEADER_DELIVERY_DATE)
19213	(MU_HEADER_ENVELOPE_TO): Normalize spelling.
19214
192152010-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19216
19217	filter subsystem: bugfixes.
19218
19219	* include/mailutils/sys/filter.h (_mu_filter_stream)<eof>: New
19220	member.
19221	* libmailutils/filter/binflt.c (_bit8_filter): Change name
19222	initializer to "8bit".
19223	(_bit7_filter): Change name initializer to "7bit".
19224	* libmailutils/filter/filter.c (mu_filter_create): Limit line
19225	length for encoding streams only.
19226	* libmailutils/stream/fltstream.c (filter_read): Use fs->eof
19227	instead of the regular stream EOF marker.
19228	* libmailutils/stream/stream.c (mu_stream_eof): Bugfix: take
19229	into account eventual buffered data.
19230	(_stream_read_unbuffered): Call mu_stream_eof instead of
19231	checking the _MU_STR_EOF bit.
19232
192332010-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19234
19235	imap client: implement login and id commands.
19236
19237	* libproto/imap/id.c: New file.
19238	* libproto/imap/login.c: New file.
19239	* libproto/imap/Makefile.am: Add new files.
19240	* libproto/imap/capability.c (mu_imap_capability): Clear
19241	MU_IMAP_RESP before reading response. Add MU_WRDSF_QUOTE to
19242	mu_wordsplit flags.
19243	* libproto/imap/err.c (_mu_imap_seterrstr): Bugfix: initialize
19244	imap->errstr.
19245	* libproto/imap/logout.c (mu_imap_logout): Clear MU_IMAP_RESP
19246	before reading response.
19247	* libproto/imap/response.c (_mu_imap_response): Set error
19248	string.
19249	* mu/imap.c (com_login, com_id): New functions.
19250	(imap_comtab) <login, id>: New keywords.
19251
192522010-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19253
19254	Make sure stream->offset points to the position in stream
19255	corresponding to the start of the buffer.
19256
19257	* libmailutils/stream/stream.c (_stream_fill_buffer): Keep
19258	track of the current offset.
19259	(mu_stream_seek): avoid unnecessary seeks.
19260	(_stream_skip_input_bytes): Call _stream_flush_buffer before
19261	_stream_fill_buffer.
19262	(_stream_write_unbuffered): Do not modify current offset.
19263	(mu_stream_read,mu_stream_write): For unbuffered streams,
19264	modify current offset after invoking the corresponding I/O
19265	call.
19266	(_stream_scandelim): Call _stream_flush_buffer before
19267	_stream_fill_buffer.
19268
192692010-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19270
19271	Fix the "UNIX mailbox first message symptom".
19272
19273	UFMS, or "UNIX mailbox first message symptom", is a
19274	long-standing bug that existed in all previous versions of
19275	Mailutils: under certain circumstances, a fragment of the
19276	message headers would get prepended to the body of the very
19277	first message in a UNIX mailbox. See the detailed description
19278	in testsuite/ufms.c.
19279
19280	Along with fixing this bug, this change also ensures a proper
19281	restoring of UIDs from UNIX mailboxes.
19282
19283	* libproto/mbox/mbox.c (_msg_body_setup): Call
19284	mu_body_clear_modified after constructing the body.
19285	(new_message): Ditto for mu_message_clear_modified.
19286	(mbox_reset): Rewrite. Drop all cached messages and rescan
19287	entire mailbox to avoid the "1st message symptom".
19288	(mbox_expunge0): Change the call to mbox_reset.
19289	* libproto/mbox/mboxscan.c (IS_X_UID, IS_X_IMAPBASE): New
19290	macros.
19291	(mbox_scan_internal): Change handling of min_uid. Attempt to
19292	get UID and imapbase from the corresponding message headers.
19293	(mbox_scan0): Reflect the above changes.
19294	* testsuite/.gitignore: Add ufms.
19295	* testsuite/Makefile.am (noinst_PROGRAMS): Add ufms.
19296	(TESTSUITE_AT): Add ufms.at.
19297	* testsuite/testsuite.at: Include ufms.at.
19298	* testsuite/ufms.at: New test case.
19299	* testsuite/ufms.c: New test program.
19300	* imap4d/testsuite/imap4d/expunge.exp: Fix UIDNEXT expectation.
19301
193022010-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
19303
19304	Begin imap client implementation.
19305
19306	* include/mailutils/imap.h: New file.
19307	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
19308	imap.h
19309	* libproto/imap/capability.c: New file.
19310	* libproto/imap/capatst.c: New file.
19311	* libproto/imap/carrier.c: New file.
19312	* libproto/imap/connect.c: New file.
19313	* libproto/imap/create.c: New file.
19314	* libproto/imap/destroy.c: New file.
19315	* libproto/imap/disconnect.c: New file.
19316	* libproto/imap/err.c: New file.
19317	* libproto/imap/fake-folder.c: New file.
19318	* libproto/imap/logout.c: New file.
19319	* libproto/imap/response.c: New file.
19320	* libproto/imap/state.c: New file.
19321	* libproto/imap/tag.c: New file.
19322	* libproto/imap/trace.c: New file.
19323	* libproto/imap/Makefile.am (libmu_imap_la_SOURCES):
19324	Temporarily remove folder.c, mbox.c and url.c. Add new files.
19325	* mu/getarg.c: New file.
19326	* mu/imap.c: New file.
19327	* mu/verbose.c: New file.
19328	* mu/Makefile.am (IDLE_MODULES): New variable.
19329	(IMAP_C): New variable.
19330	(MODULES): Add $(IMAP_C).
19331	(mu_SOURCES): Add getarg.c and verbose.c
19332	(mu-setup.h, mu-setup.c): Add IDLE_MODULES both to the
19333	dependencies and to the mu-setup.awk command line.
19334	* mu/mu-setup.awk: New keyword mu-cond.
19335	* mu/pop.c: Add mu-cond keyword.
19336	* include/mailutils/sys/imap.h: Rewrite.
19337	* include/mailutils/sys/pop3.h (MU_POP3_CHECK_EAGAIN): Take
19338	into account MU_ERR_REPLY and MU_ERR_BADREPLY, which are
19339	recoverable errors.
19340	* libmailutils/base/list.c (mu_list_clear): Return immediately
19341	if list is NULL.
19342	* libmu_auth/sql.c (sql_escape_string): Remove unused variable.
19343	* libproto/pop/pop3_carrier.c (mu_pop3_get_carrier): Increase
19344	refcount on the returned stream.
19345	* libproto/pop/pop3_response.c (mu_pop3_response): Check POP3
19346	reply code.
19347
193482010-11-03  Sergey Poznyakoff  <gray@gnu.org.ua>
19349
19350	Improve command module system in mu.  Add a `help' command.
19351
19352	* mu/Makefile.am (MODULES): New variable. Put all commands
19353	there.
19354	(mu_SOURCES): Include $(MODULES).
19355	(EXTRA_DIST): Add mu-setup.h mu-setup.c mu-setup.awk
19356	(BUILT_SOURCES): New variable.
19357	(mu-setup.h, mu-setup.c): New goals.
19358	* mu/mu.c (doc): Remove command description: it is generated
19359	automatically.
19360	(mu_help_filter): New function.
19361	(argp): Use mu_help_filter.
19362	(mutool_action_tab): Remove.
19363	(mutool_nosys,find_action): Remove.
19364	(mu_help): New function.
19365	(main): Use dispatch_find_action.
19366	* mu/mu.h: Include mailutils/types.h (mutool_pop,
19367	mutool_filter, mutool_flt2047) (mutool_info, mutool_query,
19368	mutool_acl)
19369	(mutool_wicket, mutool_ldflags, mutool_cflags): Remove protos.
19370	(mu_help, dispatch_find_action, dispatch_docstring): New
19371	protos.
19372	* mu/acl.c: Add MU Setup comment.
19373	* mu/cflags.c: Likewise.
19374	* mu/filter.c: Likewise.
19375	* mu/flt2047.c: Likewise.
19376	* mu/info.c: Likewise.
19377	* mu/ldflags.c: Likewise.
19378	* mu/pop.c: Likewise.
19379	* mu/query.c: Likewise.
19380	* mu/wicket.c: Likewise.
19381	* mu/mu-setup.awk: New file.
19382	* mu/help.c: New file.
19383	* mu/dispatch.c: New file.
19384	* mu/.gitignore: Add mu-status.[ch]
19385	* po/POTFILES.in: Add mu/dispatch.c and mu/help.c.
19386
193872010-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
19388
19389	Remove the --license option.
19390
19391	It is not needed because the --version option shows a terse
19392	info about the license, as well as a link to its full text.
19393
193942010-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
19395
19396	Minor change.
19397
19398	* po/POTFILES.in: Fix erroneous filenames.
19399
194002010-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
19401
19402	Use full buffering for streamrefs.
19403
19404	* libmailutils/stream/streamref.c
19405	(mu_streamref_create_abridged): Set full buffering by default.
19406
194072010-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
19408
19409	Minor changes.
19410
19411	* include/mailutils/wordsplit.h (mu_wordsplit_free_words): New
19412	proto.
19413	* libmu_auth/sql.c: Include wordsplit.h
19414
194152010-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
19416
19417	Remove all uses of vartab, replacing them with wordsplit.
19418
19419	* libmailutils/string/wordsplit.c (mu_wordsplit_init): Call
19420	mu_wordsplit_free_words to reclaim the memory.
19421	(mu_wordsplit_free_words): New function.
19422	(mu_wordsplit_free): Use mu_wordsplit_free_words.
19423	* imap4d/imap4d.c (imap4d_session_setup0): Use wordsplit
19424	instead of vartab.
19425	* imap4d/imap4d.h: Don't include vartab.h.
19426	* imap4d/preauth.c (do_preauth_ident): Use mu_str_stripws
19427	instead of the static trimcrlf, which is removed.
19428	(do_preauth_program): Use wordsplit instead of vartab and
19429	mu_prog_stream_create instead of popen.
19430	* libmailutils/mailbox/mbx_default.c: Include nls.h Don't
19431	include vartab.h
19432	(mu_construct_user_mailbox_url): Use wordsplit instead of
19433	vartab.
19434	* libmailutils/server/acl.c (expand_arg): Use wordsplit instead
19435	of vartab.
19436	* libmu_auth/ldap.c (_mu_ldap_search):L Likewise.
19437	* libmu_auth/radius.c (_expand_query): Likewise.
19438	* libmu_auth/sql.c (mu_sql_expand_query): Likewise.
19439	* libproto/mailer/prog.c (_expand_sender, _expand_rcpt):
19440	Rewrite.
19441	(url_to_argv): : Use wordsplit instead of vartab.
19442	* po/POTFILES.in: Add more files.
19443
194442010-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
19445
19446	Use wordsplit to expand command prompt in mu.
19447
19448	* mu/mu.h (mutool_prompt_vartab): Remove.
19449	(mutool_prompt_env): New extern.
19450	* mu/pop.c (pop_prompt_vartab): Rewrite as pop_prompt_env. All
19451	callers changed.
19452	* mu/shell.c (mutool_prompt_vartab): Remove variable.
19453	(mutool_prompt_env): New variable.
19454	(expand_prompt): Remove function.
19455	(input_line_interactive): Use mu_wordsplit to expand command
19456	prompt.
19457
194582010-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
19459
19460	Implement a Key/Value environment.
19461
19462	K/V is a new type of environment where variable names (keys)
19463	and values are stored separately in adjacent environment
19464	elements. This should simplify wordsplit initialization in many
19465	cases.
19466
19467	* include/mailutils/wordsplit.h (MU_WRDSF_ENV_KV): New flag.
19468	* libmailutils/string/wordsplit.c (mu_wordsplit_find_env):
19469	Implement search in a K/V environment.
19470	* libmailutils/tests/wordsplit.at: Test K/V environments.
19471	* libmailutils/tests/wsp.c (bool_keytab): Implement env_kv.
19472	(make_env_kv): New function.
19473	(main): Convert environment if env_kv is given.
19474
194752010-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
19476
19477	Fixes in wordsplit.  Use wordsplit instead of vartab in
19478	movemail.
19479
19480	Eventually this will lead to vartab fading out until it is
19481	removed in some point in the future. Wordsplit provides a much
19482	better variable substitution mechanism.
19483
19484	* include/mailutils/wordsplit.h (mu_wordsplit) <ws_getvar>:
19485	Change signature.
19486	<ws_closure>: New member.
19487	(MU_WRDSF_CLOSURE): New flag.
19488	* libmailutils/string/wordsplit.c (mu_wordsplit_init):
19489	Initialize ws_closure to NULL, unless MU_WRDSF_CLOSURE is set.
19490	Do not modify ws_wordn if MU_WRDSF_DOOFFS is set.
19491	(wsnode_remove): Clear _WSNF_JOIN on the previous node if the
19492	node being deleted is the last one in chain.
19493	(expvar): Pass ws_closure as 3rd argument to ws_getvar. Insert
19494	a NULL node if the variable is not defined.
19495	* movemail/movemail.c: Use wordsplit instead of vartab. Note a
19496	side effect: the "source:*" and "dest:*" variables are now
19497	written as "source_*" and "dest_*", correspondingly.
19498	(movemail_getvar_closure): New structure.
19499	(DCL_VTX): Remove macro and its uses.
19500	(get_url_part, movemail_getvar): New functions.
19501	(set_program_id): Rewrite using wordsplit.
19502
195032010-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
19504
19505	Add wordsplit module.
19506
19507	The wordsplit module (borrowed from another project of mine,
19508	called 'grecs') provides a flexible and powerful mechanism for
19509	parsing input in a way similar to posix-shell. In particular,
19510	the POSIX function wordexp is a subset of the wordsplit
19511	functionality.
19512
19513	The argcv module is now deprecated.
19514
19515	* include/mailutils/wordsplit.h: New file.
19516	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
19517	wordsplit.h
19518	* libmailutils/string/wordsplit.c: New file.
19519	* libmailutils/string/Makefile.am (libstring_la_SOURCES): Add
19520	wordsplit.c.
19521	* include/mailutils/argcv.h (mu_argcv_join): New proto.
19522	(mu_argcv_get, mu_argcv_get_n, mu_argcv_get_np)
19523	(mu_argcv_unquote_char, mu_argcv_quote_char)
19524	(mu_argcv_quoted_length, mu_argcv_unquote_copy)
19525	(mu_argcv_quote_copy): Mark as deprecated.
19526	* include/mailutils/mailutils.h: Include wordsplit.h.
19527	* libmailutils/tests/wsp.c: New file.
19528	* libmailutils/tests/.gitignore: List wsp.
19529	* libmailutils/tests/wordsplit.at: New file.
19530	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wsp
19531	(TESTSUITE_AT): Add wordsplit.at.
19532	* libmailutils/tests/argcv.c: Define MU_ARCGV_DEPRECATED to
19533	avoid deprecation warnings.
19534	* libmailutils/tests/testsuite.at: Include wordsplit.at.
19535	* libmailutils/base/argcvfree.c: New file.
19536	* libmailutils/base/argcvjoin.c: New file.
19537	* libmailutils/base/argcvrem.c: New file.
19538	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Add new
19539	files.
19540	* libmailutils/base/argcv.c: Define MU_ARCGV_DEPRECATED to
19541	avoid deprecation warnings. (argcv_string, argcv_free,
19542	argv_free)
19543	(mu_argcv_remove): Rewrite in separate modules.
19544	* comsat/comsat.h: Include wordsplit.h.
19545	* imap4d/imap4d.h: Likewise.
19546	* mail/mail.h: Likewise.
19547	* mh/mh.h: Likewise.
19548	* readmsg/readmsg.h: Likewise.
19549	* comsat/action.c: Use wordsplit.
19550	* imap4d/fetch.c: Likewise.
19551	* lib/mailcap.c: Likewise.
19552	* libmailutils/auth/mu_auth.c: Likewise.
19553	* libmailutils/base/mutil.c: Likewise.
19554	* libmailutils/cfg/format.c: Likewise.
19555	* libmailutils/cfg/lexer.l: Likewise.
19556	* libmailutils/cfg/parser.y: Likewise.
19557	* libmailutils/diag/gdebug.c: Likewise.
19558	* libmailutils/mailer/mailer.c: Likewise.
19559	* libmailutils/server/acl.c: Likewise.
19560	* libmailutils/stream/prog_stream.c: Likewise.
19561	* libmailutils/tests/listop.c: Likewise.
19562	* libmailutils/url/create.c: Likewise.
19563	* libmu_auth/ldap.c: Likewise.
19564	* libmu_auth/radius.c: Likewise.
19565	* libmu_sieve/sieve.l: Likewise.
19566	* libproto/mailer/mbox.c: Likewise.
19567	* libproto/mailer/smtp.c: Likewise.
19568	* libproto/mailer/smtp_gsasl.c: Likewise.
19569	* mail/mailline.c: Likewise.
19570	* mail/mailvar.c: Likewise.
19571	* mail/send.c: Likewise.
19572	* mail/util.c: Likewise.
19573	* mh/folder.c: Likewise.
19574	* mh/mh_alias.y: Likewise.
19575	* mh/mh_argp.c: Likewise.
19576	* mh/mh_init.c: Likewise.
19577	* mh/mh_list.c: Likewise.
19578	* mh/mh_msgset.c: Likewise.
19579	* mh/mh_sequence.c: Likewise.
19580	* mh/mh_whatnow.c: Likewise.
19581	* mh/mh_sequence.c: Likewise.
19582	* mh/mh_whatnow.c: Likewise.
19583	* mh/mhn.c: Likewise.
19584	* mh/send.c: Likewise.
19585	* movemail/movemail.c: Likewise.
19586	* mu/shell.c: Likewise.
19587	* readmsg/readmsg.c: Likewise.
19588	* testsuite/smtpsend.c: Likewise.
19589	* pop3d/popauth.c: Use wordsplit. Use simplified input format
19590	(username and password delimited by any amount of whitespace).
19591	Read/produce old format if invoked with the --compatibility
19592	option.
19593	* examples/aclck.c: Use wordsplit instead of argcv.
19594	* examples/header.c: Likewise.
19595	* examples/mta.c: Likewise.
19596	* examples/.gitignore: Remove pop3client.
19597	* examples/Makefile.am: Remove pop3client.
19598	* po/POTFILES.in: Add new files.
19599
196002010-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
19601
19602	Fix allowed URL parts for local mailboxes.
19603
19604	Parameters are allowed: they are used to expand hashed or
19605	indexed mailbox names.
19606
19607	* libproto/maildir/folder.c (_maildir_record): Add
19608	MU_URL_PARAM.
19609	* libproto/mbox/folder.c (_mbox_record): Likewise.
19610	* libproto/mh/folder.c (_mh_record): Likewise.
19611
196122010-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
19613
19614	Use mu_asprintf and mu_vasnprintf instead of asprintf and
19615	vasprintf.
19616
19617	*gnulib.modules (snprintf, vasprintf): Remove.
19618	*sieve/tests/reject.at: Use AT_PACKAGE_VERSION instead of the
19619	hardcoded version number.
19620	*lib/mu_asprintf.h: Remove.
19621	* imap4d/auth_gss.c: Replace asprintf with mu_asprintf and
19622	vasprintf by mu_vasnprintf.
19623	* guimb/guimb.h: Likewise.
19624	* imap4d/imap4d.h: Likewise.
19625	* imap4d/unsubscribe.c: Likewise.
19626	* lib/Makefile.am
19627	* lib/mailcap.c: Likewise.
19628	* libmu_argp/muinit.c: Likewise.
19629	* maidag/deliver.c: Likewise.
19630	* maidag/maidag.h: Likewise.
19631	* mail/escape.c: Likewise.
19632	* mail/mail.c: Likewise.
19633	* mail/mail.h: Likewise.
19634	* mail/util.c: Likewise.
19635	* mail/write.c: Likewise.
19636	* mh/burst.c: Likewise.
19637	* mh/forw.c: Likewise.
19638	* mh/mh.h: Likewise.
19639	* mh/mh_alias.l: Likewise.
19640	* mh/mh_format.c: Likewise.
19641	* mh/mh_getopt.c: Likewise.
19642	* mh/mh_init.c: Likewise.
19643	* mh/mh_msgset.c: Likewise.
19644	* mh/mh_sequence.c: Likewise.
19645	* mh/mh_whatnow.c: Likewise.
19646	* mh/mhn.c: Likewise.
19647	* mh/send.c: Likewise.
19648	* mimeview/mimetypes.l: Likewise.
19649	* mimeview/mimetypes.y: Likewise.
19650	* mimeview/mimeview.c: Likewise.
19651	* movemail/movemail.c: Likewise.
19652	* mu/ldflags.c: Likewise.
19653	* pop3d/expire.c: Likewise.
19654	* pop3d/pop3d.h: Likewise.
19655	* sieve/sieve.c: Likewise.
19656
196572010-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
19658
19659	Remove tcp wrapper configuration keywords that did not actually
19660	change anything.
19661
19662	The allow_severity and deny_severity variables are valid only
19663	for tcpd and related applications, hosts_access does not use
19664	them.
19665
19666	* lib/tcpwrap.c (mu_tcp_wrapper_cb_hosts_allow_syslog)
19667	(mu_tcp_wrapper_cb_hosts_deny_syslog): Remove functions.
19668	(allow_severity, deny_severity): Remove variables.
19669	(tcpwrapper_param): Remove allow-syslog-priority and
19670	deny-syslog-priority.
19671
196722010-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
19673
19674	Version 2.9.90.
19675
19676	* NEWS, configure: Set version number to 2.9.90 to avoid
19677	confusion with 2.2.x branch.
19678
196792010-10-26  Sergey Poznyakoff  <gray@gnu.org.ua>
19680
19681	Rewrite URL support.
19682
19683	The purpose is to make it modular and flexible. URLs are parsed
19684	out as they are created. Missing URL parts can be supplied via
19685	a "URL hint" at creation time (similar to the approach used in
19686	creating mu_address_t). Ports can be specified either as
19687	numbers or as service names. Original port string
19688	representation can be retrieved from the URL, as well as its
19689	numeric value.
19690
19691	* libmailutils/url/accessor.h: New file.
19692	* libmailutils/url/copy.c: New file.
19693	* libmailutils/url/create.c: New file.
19694	* libmailutils/url/decode.c: New file.
19695	* libmailutils/url/destroy.c: New file.
19696	* libmailutils/url/dup.c: New file.
19697	* libmailutils/url/expand.c: New file.
19698	* libmailutils/url/flag.c: New file.
19699	* libmailutils/url/get-auth.c: New file.
19700	* libmailutils/url/get-host.c: New file.
19701	* libmailutils/url/get-param.c: New file.
19702	* libmailutils/url/get-path.c: New file.
19703	* libmailutils/url/get-portstr.c: New file.
19704	* libmailutils/url/get-query.c: New file.
19705	* libmailutils/url/get-scheme.c: New file.
19706	* libmailutils/url/get-secret.c: New file.
19707	* libmailutils/url/get-user.c: New file.
19708	* libmailutils/url/match.c: New file.
19709	* libmailutils/url/port.c: New file.
19710	* libmailutils/url/scheme.c: New file.
19711	* libmailutils/url/uplevel.c: New file.
19712	* libmailutils/url/urlstr.c: New file.
19713	* configure.ac (AC_CONFIG_FILES): Add libmailutils/url/Makefile
19714	* libmailutils/Makefile.am (SUBDIRS): Add url.
19715	(libmailutils_la_LIBADD): Link with liburl.
19716	* libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove
19717	url.c
19718	* libmailutils/base/url.c: Remove.
19719	* libmailutils/string/Makefile.am (libstring_la_SOURCES): Add
19720	xdecode.c
19721	* libmailutils/string/xdecode.c: New file.
19722	* include/mailutils/sys/url.h (_mu_url): Change type to short.
19723	<_get_port>: Change second argument to unsigned.
19724	<_get_portstr>: New method.
19725	* include/mailutils/url.h (MU_URL_SCHEME): New flag.
19726	(MU_URL_PARSE_HEXCODE, MU_URL_PARSE_HIDEPASS)
19727	(MU_URL_PARSE_PORTSRV, MU_URL_PARSE_PORTWC)
19728	(MU_URL_PARSE_PIPE, MU_URL_PARSE_SLASH): New flags.
19729	(mu_url_create_hint, mu_url_copy_hints): New prototypes.
19730	(mu_url_parse): Remove.
19731	(mu_url_get_port): Change second argument to unsigned.
19732	(mu_url_decode_len,mu_url_decode): Remove.
19733	(mu_url_decode): New proto. (mu_url_sget_portstr,
19734	mu_url_aget_portstr)
19735	(mu_url_get_portstr): New protos.
19736	* include/mailutils/util.h (mu_str_url_decode)
19737	(mu_str_url_decode_inline): New protos.
19738	* libproto/pop/mbox.c (pop_open): Port is unsigned.
19739	* libproto/imap/folder.c: Use MU_URL_SCHEME in url_may_have.
19740	* libproto/maildir/folder.c: Likewise.
19741	* libproto/mailer/prog.c: Likewise.
19742	* libproto/mailer/remote.c: Likewise.
19743	* libproto/mailer/sendmail.c: Likewise.
19744	* libproto/mailer/smtp.c: Likewise.
19745	* libproto/mbox/folder.c: Likewise.
19746	* libproto/mh/folder.c: Likewise.
19747	* libproto/nntp/folder.c: Likewise.
19748	* libproto/pop/folder.c: Likewise.
19749	* imap4d/imap4d.c: Remove calls to mu_url_parse.
19750	* libmailutils/base/registrar.c: Likewise.
19751	* libmailutils/base/wicket.c: Likewise.
19752	* libmailutils/mailbox/folder.c: Likewise.
19753	* libmailutils/mailbox/mailbox.c: Likewise.
19754	* libmailutils/mailer/mailer.c: Likewise.
19755	* libmailutils/tests/url-parse.c: Likewise.
19756	* libmailutils/tests/wicket.c: Likewise.
19757	* libproto/mailer/smtp_auth.c: Likewise.
19758	* maidag/deliver.c: Likewise.
19759	* mu/wicket.c: Likewise.
19760	* libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use
19761	mu_str_url_decode, instead of mu_url_decode.
19762	* libmailutils/stream/tcp.c (_tcp_instance)<port>: Change type
19763	to unsigned short. All uses updated.
19764	(mu_tcp_stream_create_with_source_ip)
19765	(mu_tcp_stream_create_with_source_host)
19766	(mu_tcp_stream_create): Port is unsigned.
19767	* include/mailutils/stream.h
19768	(mu_tcp_stream_create_with_source_ip)
19769	(mu_tcp_stream_create_with_source_host)
19770	(mu_tcp_stream_create): Port is unsigned.
19771	* include/mailutils/cpp/url.h (get_port): Return unsigned.
19772	* libmu_cpp/url.cc (get_port): Return unsigned.
19773	(parse): Empty function. Schedule for removal.
19774	* python/libmu_py/url.c (api_url_parse): Empty function.
19775	Schedule for removal.
19776	(api_url_get_port): Port is unsigned.
19777	* libmailutils/base/wicket.c (mu_wicket_file_match_url)
19778	(mu_wicket_file_match_url): New parameter: parse_flags.
19779	* mu/wicket.c (wicket_match): Use parse_flags to control
19780	whether or not to show the plaintext password.
19781	* doc/texinfo/url.texi: Update.
19782
197832010-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
19784
19785	Minor fix.
19786
19787	* mh/mh_init.c (mh_safe_make_file_name): Avoid gcc warnings.
19788
197892010-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
19790
19791	Improve URL matching code.
19792
19793	* libmailutils/base/url.c (mu_url_matches_ticket): Use
19794	different weight values, depending on the missing part.
19795	* libmailutils/base/wicket.c (mu_wicket_stream_match_url):
19796	Refuse URLs that lack host and password parts.
19797
197982010-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
19799
19800	Move `mailutils-config' functionality to `mu'.	Retain
19801	`mailutils-config' for backward compatibility.
19802
19803	* config/.gitignore: Remove.
19804	* config/Makefile.am: Remove.
19805	* config/mailutils-config.c: Remove.
19806	* config/maint.mk: Remove.
19807	* config/mailutils.m4: Move to mu-aux/mailutils.m4
19808	* mu-aux/Makefile.am (m4datadir, dist_m4data_DATA): New
19809	variables.
19810	* Makefile.am (SUBDIRS) <config>: Remove.
19811	* configure.ac (AC_CONFIG_FILES): Remove config.
19812	* mu/mailutils-config: New file.
19813	* mu/cflags.c: New file.
19814	* mu/ldflags.c: New file.
19815	* mu/Makefile.am (dist_bin_SCRIPTS, EXTRA_DIST): Add
19816	mailutils-config.
19817	(mu_SOURCES): Add cflags.c and ldflags.c.
19818	(AM_CPPFLAGS): New variable.
19819	* mu/mu.c: Add new modes: cflags and ldflags.
19820	* mu/mu.h (mutool_ldflags, mutool_cflags): New protos.
19821	* po/POTFILES.in: Update.
19822
198232010-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
19824
19825	New `mu' mode: wicket.
19826
19827	* mu/wicket.c: New file.
19828	* mu/mu.h (mutool_wicket): New proto.
19829	* mu/mu.c (mutool_action_tab): Add an entry for wicket mode.
19830	* mu/Makefile.am (mu_SOURCES): Add wicket.c
19831	* .gitignore: Update.
19832
198332010-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
19834
19835	Improve the algorithm for URL look up in wickets.
19836
19837	The new algorithm always returns the best match, i.e. the one
19838	with the smallest number of wildcard comparisons.
19839
19840	* include/mailutils/auth.h (mu_wicket_stream_match_url)
19841	(mu_wicket_file_match_url): New protos. Remove unnecessary
19842	'extern' qualifiers.
19843	* include/mailutils/url.h (mu_url_is_ticket): Remove.
19844	(mu_url_matches_ticket): New proto.
19845	* libmailutils/base/url.c (mu_url_parse): Fix name corruption
19846	during password obfuscation.
19847	(defined): Remove static function.
19848	(mu_url_is_ticket): Remove function.
19849	(mu_url_matches_ticket): New function.
19850	* libmailutils/base/wicket.c (get_ticket_url): Remove.
19851	(mu_wicket_stream_match_url)
19852	(mu_wicket_file_match_url): New functions.
19853	(file_ticket_get_cred): Use mu_wicket_file_match_url.
19854	* libmailutils/tests/wicket.c: New file.
19855	* libmailutils/tests/Wicketfile: New file.
19856	* libmailutils/tests/wicket.at: New file.
19857	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wicket.
19858	(EXTRA_DIST): Add Wicketfile
19859	(TESTSUITE_AT): Add wicket.at
19860	* libmailutils/tests/testsuite.at: Include wicket.at
19861	* libmailutils/tests/.gitignore: Update.
19862
198632010-10-22  Sergey Poznyakoff  <gray@gnu.org.ua>
19864
19865	Improve SMTP client.
19866
19867	* include/mailutils/smtp.h (mu_smtp_dot): New proto.
19868	* libproto/mailer/smtp_dot.c: New file.
19869	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
19870	smtp_dot.c.
19871	* libproto/mailer/smtp.c (smtp_send_message): Send RSET after
19872	an unexpected SMTP reply. Call mu_smtp_dot after successful
19873	sending.
19874	* libproto/mailer/smtp_data.c (_mu_smtp_data_end): Set state to
19875	MU_SMTP_DOT.
19876	* libproto/mailer/smtp_rset.c (mu_smtp_rset): Improve state
19877	selection algorithm.
19878	* libproto/mailer/smtp_send.c (mu_smtp_send_stream): Don't
19879	reset state: it is done by _mu_smtp_data_end.
19880	* testsuite/smtpsend.c (main): Call mu_smtp_dot after sending
19881	message.
19882
198832010-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
19884
19885	Allow for `notls' parameter in pop URLs.
19886
19887	* libproto/pop/folder.c (_pop_record): Accept URL parameters.
19888	* libproto/pop/mbox.c (pop_open): Don't start TLS if the
19889	`notls' parameter is present in the URL.
19890
198912010-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
19892
19893	Improve registrar/url interaction.  Fix SMTP URLs to comply to
19894	draft-earhart-url-smtp-00.  Minor fix in maidag (url mode).
19895
19896	* include/mailutils/registrar.h (MU_RECORD_DEFAULT)
19897	(MU_RECORD_LOCAL): New flags.
19898	(_mu_record) <flags,url_may_have,url_must_have>: New members.
19899	Remove unnecessary externs.
19900	(mu_record_set_.*): Remove all protos.
19901	(mu_record_check_url, mu_registrar_test_local_url): New protos.
19902	* include/mailutils/sys/url.h (_mu_url) <flags>: New member.
19903	(MU_URL_USER, MU_URL_SECRET, MU_URL_AUTH) (MU_URL_HOST,
19904	MU_URL_PORT, MU_URL_PATH) (MU_URL_PARAM, MU_URL_QUERY)
19905	(MU_URL_CRED, MU_URL_INET, MU_URL_ALL): New flags.
19906	(mu_url_get_flags, mu_url_has_flag): New protos.
19907	* libmailutils/base/registrar.c (mu_record_set_.*): Remove all.
19908	(mu_record_check_url): New function.
19909	(mu_registrar_test_local_url): New function.
19910	* libmailutils/base/url.c (mu_url_copy0): Copy flags.
19911	(mu_url_parse): Use flags intead of inspecting each structure
19912	member. Set flags.
19913	(mu_url_get_flags, mu_url_has_flag): New functions.
19914	* libmailutils/diag/errors (MU_ERR_URL_MISS_PARTS)
19915	(MU_ERR_URL_EXTRA_PARTS): New error codes.
19916	* libmailutils/mailbox/folder.c (mu_folder_create_from_record):
19917	Check the URL using mu_record_check_url.
19918	* libproto/imap/folder.c (_imap_record, _imaps_record):
19919	Initialize new fields.
19920	* libproto/maildir/folder.c (_maildir_record): Likewise.
19921	* libproto/mbox/folder.c (_mbox_record): Likewise.
19922	* libproto/mh/folder.c (_mh_record): Likewise.
19923	* libproto/nntp/folder.c (_nntp_record): Likewise.
19924	* libproto/pop/folder.c (_pop_record, _pops_record): Likewise.
19925	* libproto/mailer/prog.c (_prog_record): Likewise.
19926	(_url_prog_init): Remove extra checks, rely on
19927	mu_record_check_url.
19928	* libproto/mailer/remote.c (_mu_remote_smtp_record)
19929	(_mu_remote_sendmail_record,_mu_remote_prog_record): Initialize
19930	new fields.
19931	* libproto/mailer/sendmail.c (_url_sendmail_init): Remove extra
19932	checks, rely on mu_record_check_url.
19933	(_sendmail_record): Initialize new fields.
19934	* libproto/nntp/url.c (url_nntp_destroy): Remove.
19935	(_nntp_url_init): Remove extra checks.
19936	* libproto/pop/url.c (url_pop_destroy): Remove.
19937	(_url_pop_init, _url_pops_init): Remove extra checks.
19938	* libproto/mailer/smtp.c (_url_smtp_init): Remove extra checks.
19939	(_smtp_record): Initialize new fields.
19940	(smtp_mailer_add_auth_mech): New function.
19941	(smtp_open): Allow for auth= part before the host name.
19942	* maidag/deliver.c (is_remote_url): New function.
19943	(do_delivery): Do not try to switch user privileges if the URL
19944	refers to a remote mailbox.
19945	* maidag/maidag.c (main): Initialize TLS.
19946
199472010-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>
19948
19949	Provide an easy way of setting sender/recipient addresses in
19950	smtp URLs.
19951
19952	* libmailutils/mailer/mailer.c (_set_from): Parameter from= can
19953	be used to set the sender address explicitly.
19954	(_set_to): New function. Parameter to= sets recipient addresses
19955	explicitly.
19956	(create_part): Use _set_to.
19957	* libproto/mailer/mbox.c (remote_mbox_append_message): Use the
19958	to= parameter.
19959
199602010-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
19961
19962	Improve the algorithm of obtaining sender name from messages.
19963
19964	* include/mailutils/header.h: Remove unnecessary externs.
19965	(mu_url_sget_param, mu_url_aget_param): New protos.
19966	* libmailutils/base/url.c (mu_url_sget_param,
19967	mu_url_aget_param): New functions.
19968	* libmailutils/mailbox/hdrfirst.c: New file.
19969	* libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add
19970	hdrfirst.c.
19971	* libmailutils/mailbox/message.c (message_envelope_sender): Try
19972	to restore the envelope sender from X-Envelope-Sender,
19973	X-Envelope-From, X-Original-Sender, and From headers, in that
19974	order.
19975	* libmailutils/mailer/mailer.c (_set_from): Try to obtain
19976	sender from the message envelope. If that fails, fall back to
19977	the From header.
19978	* libproto/mailer/mbox.c (parse_received,
19979	guess_message_recipient): New static functions.
19980	(remote_mbox_append_message): Get recipient address from the
19981	first of X-Envelope-To, Delivered-To, X-Original-To headers, in
19982	that order. If that fails, try to deduce it from the Received
19983	header. If that fails too, fall back to the To header. If
19984	recipient-headers URL parameter is defined, its value (a
19985	comma-separated list of names) overrides this list. The
19986	strip-domain parameter, if present, instructs the function to
19987	strip domain part from the recipient address before resolving
19988	it. The domain parameter, if present, supplies the domain name
19989	which overrides the domain obtained from the URL.
19990
199912010-10-17  Wojciech Polak  <polak@gnu.org>
19992
19993	Minor PEP 8 changes in Python API.
19994
199952010-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
19996
19997	movemail: accept "smtp://" and "sendmail://" as a destination
19998	mailbox.
19999
20000	* movemail/Makefile.am (movemail_LDADD): Add MU_LIB_MAILER.
20001	* movemail/movemail.c: Register *all* mailbox formats,
20002	including remote ones.
20003
200042010-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
20005
20006	maidag/tests/forward.at: forgotten to add (see db1ee5e0a).
20007
200082010-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
20009
20010	Improve mu_unroll_symlink interface.
20011
20012	* include/mailutils/util.h (mu_readlink): New function.
20013	(mu_unroll_symlink): Change prototype.
20014	* libmailutils/base/symlink.c (mu_qualify_link): Remove.
20015	(mu_readlink): New function.
20016	(mu_unroll_symlink): Rewrite. Don't use statically allocated
20017	buffers.
20018	* libmailutils/base/locker.c (mu_locker_create): Update calls
20019	to mu_unroll_symlink.
20020
200212010-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
20022
20023	Use mu_make_file_name where necessary.
20024
20025	* comsat/action.c (run_user_action): Use mu_make_file_name.
20026	* imap4d/lsub.c (imap4d_lsub): Likewise.
20027	* imap4d/subscribe.c (imap4d_subscribe): Likewise.
20028	* imap4d/unsubscribe.c (imap4d_unsubscribe): Likewise.
20029	* libmailutils/base/filename.c (mu_get_full_path): Likewise.
20030	* libmailutils/base/tempfile.c (mu_tempfile): Likewise.
20031	* libmailutils/base/url.c (_url_path_default): Likewise.
20032	* libmu_auth/virtual.c (getpwnam_virtual)
20033	(mu_auth_virt_domain_by_name): Likewise.
20034	* libmu_sieve/extensions/vacation.c (check_db): Likewise.
20035	* libmu_sieve/sieve.l (_try_include): Likewise.
20036	* maidag/forward.c (maidag_forward): Likewise.
20037	* mh/mh.h (mh_safe_make_file_name): New proto.
20038	* mh/mh_init.c (mh_audit_open,mh_get_dir)
20039	(mh_expand_name,mh_real_install): Use mh_safe_make_file_name.
20040	(mh_safe_make_file_name): New function.
20041	* mh/folder.c (read_seq_file, _scan): Use
20042	mh_safe_make_file_name.
20043	* mh/mh_global.c (mh_read_profile, _mh_init_global_sequences):
20044	Likewise.
20045	* mh/install-mh.c (main): Likewise.
20046	* mh/mhn.c (normalize_path, store_handler, main): Likewise.
20047	* mh/repl.c (make_draft): Likewise.
20048	* mh/rmf.c (rmf): Likewise.
20049	* mh/sortm.c (swap_message): Likewise.
20050	* mimeview/mimetypes.l (mimetypes_open): Likewise.
20051	* lib/mailcap.c: Add error checking.
20052
200532010-10-10  Wojciech Polak  <polak@gnu.org>
20054
20055	Update Python API and the examples.
20056
20057	* python/libmu_py/folder.c (api_folder_set_stream): Remove.
20058	* python/libmu_py/message.c (api_message_set_stream): Remove.
20059	* python/libmu_py/stream.c (api_stream_ref, api_stream_unref):
20060	Add.
20061	(api_stream_sequential_readline, api_stream_sequential_write):
20062	Remove.
20063
200642010-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
20065
20066	Minor fix.
20067
20068	* libmailutils/base/getcwd.c: Add missing include file.
20069
200702010-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
20071
20072	Rename mu_strcasestr to mu_c_strcasestr.
20073
20074	* include/mailutils/cstr.h (mu_strcasestr): Rename to
20075	mu_c_strcasestr.
20076	* libmailutils/string/cstrcasestr.c: Likewise. All uses
20077	changed.
20078
200792010-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
20080
20081	Split the mess in mutil.c into logically separated units.
20082
20083	* libmailutils/base/mutil.c (mu_hex2ul, mu_hexstr2ul): Move to
20084	string/hexstr.c. (mu_get_homedir, mu_get_full_path)
20085	(mu_expand_path_pattern): Move to base/filename.c.
20086	(mu_getcwd): Move to base/getcwd.c.
20087	(mu_tilde_expansion): Move to base/tilde.c
20088	(mu_cpystr): Move to string/cpystr.c.
20089	(mu_get_host_name): Move to base/hostname.c.
20090	(mu_set_user_email,mu_set_user_email_domain)
20091	(mu_get_user_email_domain,mu_aget_user_email_domain)
20092	(mu_get_user_email,mu_normalize_path): Move to base/usremail.c.
20093	(mu_tempfile,mu_tempname): Move to base/tempfile.c.
20094	(mu_spawnvp): Move to base/spawnvp.c.
20095	(mu_qualify_link,mu_unroll_symlink): Move to base/symlink.c.
20096	(mu_rfc2822_references,mu_rfc2822_msg_id)
20097	(mu_rfc2822_in_reply_to): Move to base/msgid.c.
20098	(mu_strcasestr): Move to string/cstrcasestr.c.
20099	(mu_string_unfold): Move to string/unfold.c.
20100	(mu_true_answer_p): Move to string/trueans.c.
20101	(mu_scheme_autodetect_p): Move to base/schemeauto.c.
20102	(mu_fd_wait): Move to base/fdwait.c.
20103	(mu_set_default_fallback,mu_decode_filter): Move to
20104	filter/decode.c.
20105	(__argp_base_name): Move to lib/argp_base.c.
20106	* libmailutils/base/fdwait.c: New file.
20107	* libmailutils/base/filename.c: New file.
20108	* libmailutils/base/getcwd.c: New file.
20109	* libmailutils/base/hostname.c: New file.
20110	* libmailutils/base/msgid.c: New file.
20111	* libmailutils/base/schemeauto.c: New file.
20112	* libmailutils/base/spawnvp.c: New file.
20113	* libmailutils/base/symlink.c: New file.
20114	* libmailutils/base/tempfile.c: New file.
20115	* libmailutils/base/tilde.c: New file.
20116	* libmailutils/base/usremail.c: New file.
20117	* libmailutils/base/Makefile.am: Add new files.
20118	* libmailutils/filter/decode.c: New file.
20119	* libmailutils/filter/Makefile.am: Add new files.
20120	* libmailutils/string/cpystr.c: New file.
20121	* libmailutils/string/cstrcasestr.c: New file.
20122	* libmailutils/string/hexstr.c: New file.
20123	* libmailutils/string/trueans.c: New file.
20124	* libmailutils/string/unfold.c: New file.
20125	* libmailutils/string/Makefile.am: Add new files.
20126	* lib/argp_base.c: New file.
20127	* lib/Makefile.am: Add new files.
20128	* include/mailutils/io.h: Include stdarg.h
20129	* include/mailutils/mutil.h: Rename to util.h. Reorder
20130	prototypes and declarations in logical groups. All uses
20131	changed.
20132	* include/mailutils/cstr.h (mu_strcasestr): New proto, moved
20133	from include/mailutils/mutil.h.
20134
201352010-10-09  Sergey Poznyakoff  <gray@gnu.org.ua>
20136
20137	Fix copyleft notices to follow the GNU standards.
20138
201392010-10-09  Sergey Poznyakoff  <gray@gnu.org.ua>
20140
20141	Reorganize libmailutils directory structure.
20142
20143	* configure.ac (AC_CONFIG_FILES): Add libmailutils/ subdirs.
20144	* include/mailutils/Makefile.am: Update references to
20145	libmailutils.
20146	* po/POTFILES.in: Likewise.
20147	* libmailutils/.gitignore: Update.
20148	* libmailutils/Makefile.am: Use convenience libraries in
20149	subdirs.
20150	* libmailutils/string/Makefile.am: New file.
20151	* libmailutils/cstrcasecmp.c: Move to libmailutils/string.
20152	* libmailutils/cstrlower.c: Likewise.
20153	* libmailutils/cstrupper.c: Likewise.
20154	* libmailutils/strltrim.c: Likewise.
20155	* libmailutils/strskip.c: Likewise.
20156	* libmailutils/stripws.c: Likewise.
20157	* libmailutils/strrtrim.c: Likewise.
20158	* libmailutils/asnprintf.c: Likewise.
20159	* libmailutils/asprintf.c: Likewise.
20160	* libmailutils/muctype.c: Likewise.
20161	* libmailutils/vasnprintf.c: Likewise.
20162	* libmailutils/mkfilename.c: Likewise.
20163	* libmailutils/stream/Makefile.am: New file.
20164	* libmailutils/dbgstream.c: Move to libmailutils/stream.
20165	* libmailutils/file_stream.c: Likewise.
20166	* libmailutils/fltstream.c: Likewise.
20167	* libmailutils/iostream.c: Likewise.
20168	* libmailutils/mapfile_stream.c: Likewise.
20169	* libmailutils/memory_stream.c: Likewise.
20170	* libmailutils/message_stream.c: Likewise.
20171	* libmailutils/prog_stream.c: Likewise.
20172	* libmailutils/rdcache_stream.c: Likewise.
20173	* libmailutils/socket_stream.c: Likewise.
20174	* libmailutils/stdio_stream.c: Likewise.
20175	* libmailutils/stream.c: Likewise.
20176	* libmailutils/stream_printf.c: Likewise.
20177	* libmailutils/stream_vprintf.c: Likewise.
20178	* libmailutils/streamcpy.c: Likewise.
20179	* libmailutils/streamref.c: Likewise.
20180	* libmailutils/tcp.c: Likewise.
20181	* libmailutils/temp_file_stream.c: Likewise.
20182	* libmailutils/xscript-stream.c
20183	* libmailutils/cfg/Makefile.am: New file.
20184	* libmailutils/cfg/.gitignore: New file.
20185	* libmailutils/cfg_driver.c: Move to libmailutils/cfg/driver.c.
20186	* libmailutils/cfg_format.c: Move to libmailutils/cfg/format.c.
20187	* libmailutils/cfg_lexer.l: Move to libmailutils/cfg/lexer.l.
20188	* libmailutils/cfg_parser.y: Move to libmailutils/cfg/parser.y.
20189	* libmailutils/gocs.c: Move to libmailutils/cfg/gocs.c.
20190	* libmailutils/diag/Makefile.am: New file.
20191	* libmailutils/diag/.gitignore: New file.
20192	* libmailutils/debug.c: Move to libmailutils/diag.
20193	* libmailutils/diag.c: Likewise.
20194	* libmailutils/gdebug.c: Likewise.
20195	* libmailutils/errors: Likewise.
20196	* libmailutils/muerrno.cin: Likewise.
20197	* libmailutils/syslog.c: Likewise.
20198	* libmailutils/dbgstderr.c: Likewise.
20199	* libmailutils/dbgsyslog.c: Likewise.
20200	* libmailutils/address/Makefile.am: New file.
20201	* libmailutils/address.c: Move to libmailutils/address.
20202	* libmailutils/parse822.c: Likewise.
20203	* libmailutils/mailbox/Makefile.am: New file.
20204	* libmailutils/mailbox.c: Move to libmailutils/mailbox.
20205	* libmailutils/mbx_default.c: Likewise.
20206	* libmailutils/mbxitr.c: Likewise.
20207	* libmailutils/attribute.c: Likewise.
20208	* libmailutils/body.c: Likewise.
20209	* libmailutils/envelope.c: Likewise.
20210	* libmailutils/folder.c: Likewise.
20211	* libmailutils/hdritr.c: Likewise.
20212	* libmailutils/header.c: Likewise.
20213	* libmailutils/message.c: Likewise.
20214	* libmailutils/msgscan.c: Likewise.
20215	* libmailutils/mailer/Makefile.am: New file.
20216	* libmailutils/mailer.c: Move to libmailutils/mailer.
20217	* libmailutils/progmailer.c: Likewise.
20218	* libmailutils/mime/Makefile.am: New file.
20219	* libmailutils/attachment.c: Move to libmailutils/mime.
20220	* libmailutils/mime.c: Likewise.
20221	* libmailutils/mimehdr.c: Likewise.
20222	* libmailutils/server/Makefile.am: New file.
20223	* libmailutils/acl.c: Move to libmailutils/server.
20224	* libmailutils/server.c: Likewise.
20225	* libmailutils/msrv.c: Likewise.
20226	* libmailutils/ipsrv.c: Likewise.
20227	* libmailutils/auth/Makefile.am: New file.
20228	* libmailutils/auth.c: Move to libmailutils/auth.
20229	* libmailutils/mu_auth.c: Likewise.
20230	* libmailutils/system.c: Likewise.
20231	* libmailutils/base/Makefile.am: New file.
20232	* libmailutils/base/.gitignore: New file.
20233	* libmailutils/alloc.c: Move to libmailutils/base.
20234	* libmailutils/amd.c: Likewise.
20235	* libmailutils/argcv.c: Likewise.
20236	* libmailutils/assoc.c: Likewise.
20237	* libmailutils/daemon.c: Likewise.
20238	* libmailutils/date.c: Likewise.
20239	* libmailutils/fgetpwent.c: Likewise.
20240	* libmailutils/freeitem.c: Likewise.
20241	* libmailutils/getpass.c: Likewise.
20242	* libmailutils/iterator.c: Likewise.
20243	* libmailutils/kwd.c: Likewise.
20244	* libmailutils/list.c: Likewise.
20245	* libmailutils/listlist.c: Likewise.
20246	* libmailutils/locale.c: Likewise.
20247	* libmailutils/locker.c: Likewise.
20248	* libmailutils/mailcap.c: Likewise.
20249	* libmailutils/md5.c: Likewise.
20250	* libmailutils/monitor.c: Likewise.
20251	* libmailutils/munre.c: Likewise.
20252	* libmailutils/mutil.c: Likewise.
20253	* libmailutils/nls.c: Likewise.
20254	* libmailutils/nullrec.c: Likewise.
20255	* libmailutils/observer.c: Likewise.
20256	* libmailutils/opool.c: Likewise.
20257	* libmailutils/parsedate.y: Likewise.
20258	* libmailutils/permstr.c: Likewise.
20259	* libmailutils/property.c: Likewise.
20260	* libmailutils/registrar.c: Likewise.
20261	* libmailutils/refcount.c: Likewise.
20262	* libmailutils/rfc2047.c: Likewise.
20263	* libmailutils/sha1.c: Likewise.
20264	* libmailutils/secret.c: Likewise.
20265	* libmailutils/ticket.c: Likewise.
20266	* libmailutils/url.c: Likewise.
20267	* libmailutils/vartab.c: Likewise.
20268	* libmailutils/version.c: Likewise.
20269	* libmailutils/wicket.c: Likewise.
20270
202712010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20272
20273	mu: compile pop support conditionally.
20274
20275	* mu/Makefile.am [MU_COND_SUPPORT_POP]: Compile pop.c
20276	conditionally.
20277	* mu/mu.c (mutool_nosys): New function.
20278	(mutool_action_tab): Compile pop support conditionally.
20279
202802010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20281
20282	examples/mta.c: use streams instead of FILE; exit with codes
20283	from sysexits.h.
20284
202852010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20286
20287	maidag: improve forwarding capability, add a testcase for it.
20288
20289	* maidag/forward.c (check_forward_permissions): Keep track of
20290	the processed files. Refuse to process a file twice.
20291	(process_forward): Rewrite using streams instead of FILE.
20292	(maidag_forward): Accept absolute file names (mainly for
20293	testing).
20294	* maidag/maidag.c (forward_checks): New keyword "owner".
20295	(cb2_forward_file_checks): New keyword "none".
20296	(main): Require at least one recipient in MDA mode.
20297	* maidag/maidag.h (FWD_OWNER): New mask.
20298	* maidag/tests/forward.at: New file.
20299	* maidag/tests/Makefile.am (TESTSUITE_AT): Add forward.at
20300	* maidag/tests/testsuite.at: Include forward.at.
20301
203022010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20303
20304	Improve mta simulator output.
20305
20306	* examples/mta.c (mta_send): A line number refers to the start
20307	of each line, not end of it.
20308	* mail/testsuite/mail/send.exp: Reflect this change.
20309	* sieve/tests/redirect.at: Likewise.
20310	* sieve/tests/reject.at: Likewise.
20311
203122010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20313
20314	maidag: optimize mda mode.
20315
20316	* maidag/deliver.c (make_tmp): Return mu_message_t. Use
20317	mu_stream_to_message function.
20318	(mda): Remove.
20319	(maidag_stdio_delivery): Inline mda.
20320	* maidag/maidag.h (mda): Remove.
20321
203222010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20323
20324	maidag: remove `default' mode (superseded by --mda).
20325
203262010-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
20327
20328	Maidag cleanup.
20329
20330	* maidag/maidag.c (mda_mode,lmtp_mode,url_option): Remove.
20331	(maidag_mode): New variable.
20332	(parse_opt): The --lmtp, --url and --mda options set the
20333	delivery-mode configuration statement.
20334	(cb_delivery_mode): New callback.
20335	(maidag_cfg_param) <delivery-mode>: New statement.
20336	(main): Redo delivery mode selection.
20337	* maidag/maidag.h (maidag_mode): New enum.
20338	(maidag_mode): New extern.
20339	(mda_mode,lmtp_mode,url_option): Remove.
20340	(maidag_delivery_fn): New typedef.
20341	(maidag_stdio_delivery,mda): Change signature.
20342	(deliver_to_url, deliver_to_user): New prototypes.
20343	* maidag/deliver.c (mda): Take delivery function as a
20344	parameter.
20345	(maidag_stdio_delivery): Likewise.
20346	(deliver_to_user): Rename to deliver_to_mailbox.
20347	(deliver_url): Rename to do_delivery.
20348	(deliver): Rename to deliver_to_url.
20349	(deliver_to_user): New function.
20350	* maidag/forward.c (process_forward): Use deliver_to_user.
20351	* maidag/lmtp.c (dot_deliver): Likewise.
20352
203532010-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
20354
20355	Improve maidag, add testsuite.
20356
20357	* configure.ac: Add maidag/tests
20358	* maidag/Makefile.am (SUBDIRS): Add tests.
20359	* maidag/deliver.c (make_tmp): Write a message delimiter.
20360	(is_remote_url, is_mailer_url): Remove.
20361	(deliver_url): Allow for URLs without user name.
20362	* maidag/lmtp.c (lmtp_set_privs): Empty group list means do not
20363	switch to any groups.
20364	* maidag/maidag.c (mda_mode): New variable.
20365	(options): New option --mda.
20366	(cb_group, cb2_group): Create the list even if it is empty.
20367	(main): Handle --mda.
20368	* maidag/tests/.gitignore: New file.
20369	* maidag/tests/Makefile.am: New file.
20370	* maidag/tests/atlocal.in: New file.
20371	* maidag/tests/input.msg: New file.
20372	* maidag/tests/lmtp.at: New file.
20373	* maidag/tests/mda.at: New file.
20374	* maidag/tests/testsuite.at: New file.
20375	* maidag/tests/url-mbox.at: New file.
20376	* maidag/tests/input.msg: New file.
20377
203782010-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
20379
20380	Fix a silly copy-paste error.
20381
203822010-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
20383
20384	Implement a filter for quoting ^From.  Use it for appending to
20385	UNIX mailboxes.
20386
20387	* libmailutils/fromflt.c: New file.
20388	* libmailutils/Makefile.am (libmailutils_la_SOURCES): Add
20389	fromflt.c
20390	* libmailutils/tests/testsuite.at: Include fromflt.at.
20391	* include/mailutils/filter.h (mu_from_filter): New filter type.
20392	* libmailutils/filter.c (mu_filter_get_list): Register
20393	mu_from_filter.
20394	* libmailutils/fromflt.at: New file.
20395	* libmailutils/tests/Makefile.am (TESTSUITE_AT): Add
20396	fromflt.at.
20397	* libmailutils/tests/base64d.at: Mention `filter' in the
20398	keywords.
20399	* libmailutils/tests/base64e.at: Likewise.
20400	* libmailutils/tests/fltst.c (main): Fix argc check.
20401	* libproto/mbox/mbox.c (append_message_to_stream): Use "FROM"
20402	filter.
20403
204042010-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
20405
20406	Fixes in stream subsystem.  Rewrite and optimize maidag lmtp
20407	mode using streams.
20408
20409	* libmailutils/file_stream.c (mu_fd_stream_create): Mark stream
20410	as open, do not call mu_stream_open explicitly.
20411	* libmailutils/message_stream.c (mu_stream_to_message):
20412	Bugfixes, wrong owner given to mu_envelope_set_ calls.
20413	* libmailutils/stream.c (_MU_STR_FLUSH_ALL)
20414	(_MU_STR_FLUSH_KEEP): New macros for _stream_flush_buffer.
20415	(_stream_flush_buffer): Change the meaning of the last
20416	argument. All callers updated.
20417	(mu_stream_seek): Fix operation with MU_SEEK_END. Call
20418	_mu_stream_cleareof on success.
20419	(mu_stream_read): Call _stream_flush_buffer in buffered mode.
20420	(mu_stream_getdelim, mu_stream_readdelim): Call
20421	_stream_flush_buffer.
20422	* libmailutils/streamcpy.c (mu_stream_copy): Reset size if
20423	mu_stream_seek fails.
20424	* libmailutils/temp_file_stream.c (mu_temp_file_stream_create):
20425	Set full buffering mode by default.
20426	* maidag/mailtmp.c: Remove.
20427	* maidag/Makefile.am (maidag_SOURCES): Remove mailtmp.c
20428	* po/POTFILES.in: Likewise.
20429	* maidag/deliver.c (make_tmp): Rewrite. Return mu_mailbox_t.
20430	All callers changed.
20431	* maidag/lmtp.c (lmtp_transcript): Remove static.
20432	(lmpt_transcript): New function.
20433	(lmtp_reply): Use mu_stream_t instead of FILE.
20434	(xlatnl): Remove. Superseded by mu_rtrim_cset and family.
20435	(mtmp, mbox): Remove globals.
20436	(mesg): New global. (cfun_unknown, cfun_mail_from,
20437	cfun_rcpt_to) (dot_temp_fail, dot_deliver, cfun_rset)
20438	(cfun_lhlo, cfun_quit, cfun_help): Use mu_stream_t instead of
20439	FILE.
20440	(cfun_data): Rewrite.
20441	(cfun_dot): Remove.
20442	(to_fgets): Rewrite using mu_stream_t.
20443	(lmtp_loop): Change signature. Rewrite using mu_stream_t.
20444	(lmtp_connection, maidag_lmtp_server): Update accordingly.
20445	* maidag/maidag.c (maidag_transcript): New global.
20446	(options, parse_opt): New option --transcript.
20447	* maidag/maidag.h (maidag_transcript): New extern.
20448	(mail_tmp_begin, mail_tmp_add_line, mail_tmp_finish)
20449	(mail_tmp_destroy): Remove.
20450
204512010-10-06  Sergey Poznyakoff  <gray@gnu.org.ua>
20452
20453	Improve scripting in mu pop shell.
20454
20455	* mu/pop.c (com_apop, com_pass): Require password in
20456	non-interactive mode.
20457
204582010-10-06  Sergey Poznyakoff  <gray@gnu.org.ua>
20459
20460	Minor changes.
20461
20462	* mu/shell.c (input_line_script): Use mu_getline.
20463	* libmu_argp/compat.c: Remove.
20464	* libmu_argp/Makefile.am: Remove compat.c
20465	* po/POTFILES.in: Likewise.
20466
204672010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20468
20469	Improve mu shell interface.
20470
20471	* mu/mu.h (mutool_command) <doc>: Rename to docstring.
20472	<argdoc>: New member.
20473	* mu/pop.c (com_apop): 2nd arg (password) is optional. If not
20474	supplied, ask for it using the mu_getpass function.
20475	(pop_comtab): Add argdocs. Use N_ wrappers around translatable
20476	strings.
20477	* mu/shell.c (default_comtab: Add argdocs. Use N_ wrappers
20478	around translatable strings.
20479	(print_comtab): Rewrite.
20480	(shell_history): Use pager.
20481
204822010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20483
20484	Minor bugfixes in pop client code.
20485
20486	* libproto/pop/pop3_carrier.c (mu_pop3_set_carrier): Switch to
20487	MU_POP3_CONNECT state.
20488	* libproto/pop/pop3_disconnect.c (mu_pop3_disconnect): Check if
20489	the stream is actually open before trying to close it.
20490
204912010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20492
20493	Add a missing function.
20494
20495	* libmailutils/strskip.c (mu_str_skip_cset): New function.
20496
204972010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20498
20499	Implement echo control on fd streams.  Implement mu_getpass
20500	function.
20501
20502	* configure.ac: Test for tcgetattr and tcsetattr.
20503	* gnulib.modules (getpass-gnu): Remove.
20504	* include/mailutils/mutil.h (mu_getpass): New proto.
20505	* include/mailutils/stream.h (MU_IOCTL_GET_ECHO)
20506	(MU_IOCTL_SET_ECHO): New ioctls.
20507	* include/mailutils/sys/file_stream.h
20508	(_MU_FILE_STREAM_ECHO_OFF): New flag.
20509	(_mu_file_stream) <echo_state>: New member.
20510	* libmailutils/getpass.c: New file.
20511	* libmailutils/Makefile.am (libmailutils_la_SOURCES): Add
20512	getpass.c.
20513	* libmailutils/file_stream.c (fd_done): Free echo_state.
20514	(fd_ioctl): Implement MU_IOCTL_GET_ECHO and MU_IOCTL_SET_ECHO.
20515	* mu/mu.h (mustrin): New extern.
20516	* mu/pop.c (com_pass): Use mu_getpass.
20517	* mu/shell.c (mustrin): New variable.
20518	(readline): Use mu_stream_getline instead of getline.
20519	(mutool_shell): Create mustrin.
20520	* pop3d/popauth.c (options): Fix typo.
20521	(fill_pass): Use mu_getpass.
20522
205232010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20524
20525	Implement pager in mu shell.
20526
20527	* mu/mu.h (mutool_shell_interactive): New extern.
20528	(mutool_open_pager): New proto.
20529	* mu/pop.c (com_list, com_top, com_retr): Use pager.
20530	* mu/shell.c (mutool_shell_interactive, mustrout): New
20531	variables.
20532	(print_comtab, print_help): Print to stream.
20533	(shell_help): Use pager if necessary.
20534	(mutool_open_pager): New function.
20535	(mutool_shell): Create mutool_stream_out and destroy it before
20536	returning.
20537	(all functions): Use mu_stream_printf instead of printf.
20538
205392010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20540
20541	Remove the use of MAXHOSTNAMELEN macro.
20542
20543	* comsat/comsat.c (hostname): Change type.
20544	(comsat_init): Use mu_get_host_name.
20545	* comsat/comsat.h (hostname): Change declaration.
20546	* libmailutils/locker.c (lock_dotlock): Use mu_get_host_name.
20547	* libmailutils/mutil.c (mu_get_host_name): Rewrite.
20548	* pop3d/pop3d.c (pop3d_mainloop): Remove unnecessary call to
20549	gethostbyname.
20550	* pop3d/pop3d.h (MAXHOSTNAMELEN): Remove definition.
20551
205522010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
20553
20554	Minor bugfixes.
20555
205562010-10-04  Sergey Poznyakoff  <gray@gnu.org.ua>
20557
20558	New mu submode: acl.  Supersedes examples/aclck.c.
20559
20560	* mu/acl.c: New file.
20561	* mu/Makefile.am: Add acl.c
20562	* po/POTFILES.in: Add acl.c
20563	* mu/mu.c (mutool_action_tab): Add acl mode.
20564	* mu/mu.h (mutool_acl): New proto.
20565	* mu/flt2047.c: Fix docstrings.
20566	* mu/pop.c: Likewise.
20567
205682010-10-04  Sergey Poznyakoff  <gray@gnu.org.ua>
20569
20570	Improve path parsing in mu_cfg_find_node.
20571
20572	* libmailutils/cfg_parser.y (split_cfg_path): New static.
20573	(mu_cfg_find_node): Use the same parsing algorithm as
20574	mu_cfg_create_subtree. This complements 68b7dc9dac.
20575	(mu_cfg_create_subtree): Use split_cfg_path. Handle escaped '='
20576	as a regular character.
20577	* mu/mu.c (args_doc): Remove spurious word.
20578	(main): Disable --version option in action handlers.
20579	* mu/query.c (query_args_doc): Use `path' instead of `keyword'.
20580
205812010-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
20582
20583	Fix docstrings in mu.
20584
205852010-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
20586
20587	Bugfix.
20588
20589	* mu/filter.c (filter_options): Add missing arguments.
20590	* mu/flt2047.c (flt2047_options): Likewise.
20591
205922010-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
20593
20594	Bugfix.
20595
20596	* examples/http.c (main): Fix open/wait loop.
20597	* libmailutils/stream.c (mu_stream_wait): May be used on
20598	not-open streams.
20599	* examples/.gitignore: Add more files.
20600
206012010-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
20602
20603	New utility: mu.
20604
20605	The `mu' program is a multi-purpose tool for doing various
20606	mail- and mailutils-related operations. It includes a pop3
20607	shell, a coder/decoder for all filter formats supported by
20608	Mailutils, a utility to extract arbitrary values from the MU
20609	configuration files, a configuration information utility and
20610	many more, in the short run. It supercedes examples/pop3client
20611	and (partially) mailutils-config, both of which will be removed
20612	in the future.
20613
20614	* Makefile.am (SUBDIRS): Add mu.
20615	* configure.ac: Likewise.
20616	* po/POTFILES.in: Add new files.
20617	* mu/.gitignore: New file.
20618	* mu/Makefile.am: New file.
20619	* mu/filter.c: New file.
20620	* mu/flt2047.c: New file.
20621	* mu/info.c: New file.
20622	* mu/mu.c: New file.
20623	* mu/mu.h: New file.
20624	* mu/pop.c: New file.
20625	* mu/query.c: New file.
20626	* mu/shell.c: New file.
20627
206282010-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
20629
20630	Improve stream creation consistency.
20631
20632	One of stream flags bits indicates whether the stream is open
20633	or not. The mu_stream_open function refuses to act if it
20634	already is. The rest of functions (including mu_stream_close)
20635	refuses to act if the stream was not open. A special function
20636	(mu_stream_is_open) is provided to check if the stream is in
20637	open state.
20638
20639	Any stream creation function returns an already open stream.
20640	The function mu_stream_open should be called only if the stream
20641	was previously closed by a call to mu_stream_close.
20642
20643	* include/mailutils/stream.h (mu_stream_is_open): New proto.
20644	* include/mailutils/sys/stream.h (_MU_STR_OPEN): New flag.
20645	* libmailutils/stream.c (_mu_stream_create): Permit setting the
20646	_MU_STR_OPEN flag.
20647	(_stream_init): New static.
20648	(mu_stream_open): Return MU_ERR_OPEN if the stream is already
20649	open.
20650	(mu_stream_is_open): New function. (mu_stream_seek,
20651	mu_stream_read, mu_stream_readdelim) (mu_stream_getdelim,
20652	mu_stream_write, mu_stream_flush) (mu_stream_close,
20653	mu_stream_size, mu_stream_wait)
20654	(mu_stream_truncate): Check if the stream is open. Return
20655	MU_ERR_NOT_OPEN otherwise.
20656	* libmailutils/errors (MU_ERR_OPEN): Reword the diagnostics.
20657	* libmailutils/dbgstream.c (mu_dbgstream_create): Open the
20658	stream.
20659	* libmailutils/file_stream.c (mu_file_stream_create)
20660	(mu_fd_stream_create): Open the stream.
20661	* libmailutils/filter_iconv.c (mu_filter_iconv_create): Open
20662	the stream.
20663	* libmailutils/mapfile_stream.c (mu_mapfile_stream_create):
20664	Open the stream.
20665	* libmailutils/fltstream.c (mu_filter_stream_create): Mark the
20666	stream as open.
20667	* libmailutils/iostream.c (mu_iostream_create): Likewise.
20668	* libmailutils/memory_stream.c: Likewise.
20669	* libmailutils/message.c (_message_stream_create): Likewise.
20670	* libmailutils/message_stream.c (mu_message_stream_create):
20671	Likewise.
20672	* libmailutils/prog_stream.c (mu_prog_stream_create): Likewise.
20673	* libmailutils/socket_stream.c (mu_socket_stream_create):
20674	Likewise.
20675	* libmailutils/temp_file_stream.c (mu_temp_file_stream_create):
20676	Likewise.
20677	* libmailutils/amd.c (_amd_attach_message): Mark stream as
20678	open.
20679	* libmailutils/body.c (_body_get_stream): Likewise.
20680	* libmailutils/memory_stream.c: Likewise.
20681	* libmailutils/rdcache_stream.c (mu_rdcache_stream_create:
20682	Likewise.
20683	* libmailutils/stdio_stream.c (mu_stdio_stream_create):
20684	Likewise.
20685	* libmailutils/streamref.c (mu_streamref_create_abridged):
20686	Likewise.
20687	* libmailutils/tcp.c (mu_tcp_stream_create_with_source_ip):
20688	Likewise.
20689	* libmailutils/xscript-stream.c (mu_xscript_stream_create):
20690	Likewise.
20691	* libmu_auth/tls.c (_mu_tls_io_stream_create): Likewise.
20692	(_mu_tls_stream_create): Likewise.
20693	* libproto/pop/pop3_stream.c (mu_pop3_stream_create): Likewise.
20694	* examples/base64.c: Remove unnecessary mu_stream_open.
20695	* examples/http.c: Likewise.
20696	* examples/iconv.c: Likewise.
20697	* examples/msg-send.c: Likewise.
20698	* examples/murun.c: Likewise.
20699	* examples/musocio.c: Likewise.
20700	* examples/pop3client.c: Likewise.
20701	* imap4d/append.c: Likewise.
20702	* imap4d/io.c: Likewise.
20703	* imap4d/preauth.c: Likewise.
20704	* lib/mailcap.c: Likewise.
20705	* libmailutils/attachment.c: Likewise.
20706	* libmailutils/cfg_driver.c: Likewise.
20707	* libmailutils/header.c: Likewise.
20708	* libmailutils/mailcap.c: Likewise.
20709	* libmailutils/mimehdr.c: Likewise.
20710	* libmailutils/mutil.c: Likewise.
20711	* libmailutils/tests/fltst.c: Likewise.
20712	* libmailutils/tests/mailcap.c: Likewise.
20713	* libmailutils/vartab.c: Likewise.
20714	* libmailutils/wicket.c: Likewise.
20715	* libmu_argp/muinit.c: Likewise.
20716	* libmu_auth/ldap.c: Likewise.
20717	* libmu_sieve/extensions/pipe.c: Likewise.
20718	* libmu_sieve/extensions/spamd.c: Likewise.
20719	* libmu_sieve/extensions/vacation.c: Likewise.
20720	* libproto/imap/folder.c: Likewise.
20721	* libproto/mailer/smtp.c: Likewise.
20722	* libproto/mailer/smtp_starttls.c: Likewise.
20723	* libproto/mbox/mbox.c: Likewise.
20724	* libproto/nntp/nntp_connect.c: Likewise.
20725	* libproto/pop/mbox.c: Likewise.
20726	* libproto/pop/pop3_connect.c: Likewise.
20727	* libproto/pop/pop3_stls.c: Likewise.
20728	* maidag/mailtmp.c: Likewise.
20729	* mail/decode.c: Likewise.
20730	* mail/pipe.c: Likewise.
20731	* mail/send.c: Likewise.
20732	* mail/send.c: Likewise.
20733	* mail/write.c: Likewise.
20734	* mh/burst.c: Likewise.
20735	* mh/comp.c: Likewise.
20736	* mh/compcommon.c: Likewise.
20737	* mh/forw.c: Likewise.
20738	* mh/mh_init.c: Likewise.
20739	* mh/mh_whatnow.c: Likewise.
20740	* mh/mhl.c: Likewise.
20741	* mh/mhn.c: Likewise.
20742	* mh/repl.c: Likewise.
20743	* mimeview/mimeview.c: Likewise.
20744	* pop3d/extra.c: Likewise.
20745	* sieve/sieve.c: Likewise.
20746	* testsuite/smtpsend.c: Likewise.
20747
207482010-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
20749
20750	Fix the SMTP SASL (client) without trace.
20751
20752	* include/mailutils/sys/smtp.h (_mu_smtp_get_streams)
20753	(_mu_smtp_set_streams): New protos.
20754	* libproto/mailer/smtp_gsasl.c (insert_gsasl_stream): Use
20755	_mu_smtp_get_streams and _mu_smtp_set_streams to change
20756	streams.
20757	* libproto/mailer/smtp_starttls.c (smtp_get_streams): Rename to
20758	_mu_smtp_get_streams. All callers changed.
20759	(smtp_set_streams): Rename to _mu_smtp_set_streams. All callers
20760	changed.
20761
207622010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20763
20764	Disable installchecks for sieve.scm.
20765
20766	* guimb/scm/Makefile.am: Add sieve.scm to
20767	AM_INSTALLCHECK_STD_OPTIONS_EXEMPT.
20768
207692010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20770
20771	Redo the code for installing tls/sasl transport streams.
20772
20773	* include/mailutils/stream.h (MU_IOCTL_SWAP_STREAM): Remove.
20774	(MU_IOCTL_GET_STREAM, MU_IOCTL_SET_STREAM): New ioctls.
20775	* include/mailutils/sys/stream.h (_MU_SWAP_FIRST_ONLY)
20776	(_MU_SWAP_IOCTL_MUST_SUCCEED): Remove.
20777	(_mu_stream_swap_streams): Remove.
20778	* libmailutils/stream.c (_mu_stream_swap_streams): Remove.
20779	* libmailutils/filter_iconv.c (_icvt_ioctl): Handle
20780	MU_IOCTL_GET_STREAM, MU_IOCTL_SET_STREAM instead of
20781	MU_IOCTL_SWAP_STREAM.
20782	* libmailutils/iostream.c (_iostream_ctl): Likewise.
20783	* libmailutils/xscript-stream.c (_xscript_ctl): Likewise.
20784	* imap4d/auth_gsasl.c (restore_and_return): Unref the contents
20785	of str.
20786	(auth_gsasl): Use MU_IOCTL_GET_STREAM/MU_IOCTL_SET_STREAM to
20787	change the underlying transport streams.
20788	* imap4d/io.c (imap4d_init_tls_server): Likewise.
20789	* libproto/mailer/smtp_gsasl.c (insert_gsasl_stream): Likewise.
20790	* pop3d/extra.c (pop3d_init_tls_server): Likewise.
20791	* libproto/mailer/smtp_starttls.c (smtp_get_streams)
20792	(smtp_set_streams): New functions.
20793	(smtp_swap_streams): Remove.
20794	(mu_smtp_starttls): Use smtp_get_streams and smtp_set_streams
20795	instead of smtp_swap_streams.
20796	* libproto/pop/pop3_stls.c (pop3_get_streams)
20797	(pop3_set_streams): New functions.
20798	(pop3_swap_streams): Remove.
20799	(mu_pop3_stls): Use pop3_get_streams and pop3_set_streams.
20800	* testsuite/smtpsend.c (main): Uncomment mu_stream_unref on the
20801	carrier.
20802
208032010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20804
20805	Fix prog streams.
20806
20807	* libmailutils/prog_stream.c (REDIRECT_STDIN_P)
20808	(REDIRECT_STDOUT_P): Fix macros.
20809	* libmailutils/stream.c (mu_stream_open): If stream is open
20810	with MU_STREAM_APPEND, reposition to its end.
20811	(_stream_write_unbuffered): Do not signal EACCES for
20812	MU_STREAM_APPEND streams.
20813	* mail/pipe.c (mail_pipe): Rewrite using streams instead of
20814	FILEs.
20815	* mail/send.c (fill_body): Likewise.
20816	* mail/write.c (mail_write): Likewise.
20817
208182010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20819
20820	Remove unnecessary use of FILEs in imap4d and pop3d.
20821
20822	* imap4d/imap4d.c (imap4d_mainloop): Take two file descriptor
20823	as arguments. All uses updated.
20824	* imap4d/imap4d.h (io_setio): Change signature.
20825	* imap4d/io.c (io_setio): Take two file descriptor as
20826	arguments. All uses updated.
20827	* pop3d/extra.c (pop3d_setio): Take two file descriptor as
20828	arguments. All uses updated.
20829	* pop3d/pop3d.c (pop3d_mainloop): Likewise.
20830	* pop3d/pop3d.h (pop3d_setio): Change signature.
20831
208322010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20833
20834	Cleanup in bufferization code.
20835
20836	* examples/musocio.c: Use default stream buffer size.
20837	* imap4d/io.c: Likewise.
20838	* libmailutils/dbgstream.c: Likewise.
20839	* libmailutils/iostream.c: Likewise.
20840	* libmailutils/xscript-stream.c: Likewise.
20841	* libmu_auth/gsasl.c: Likewise.
20842	* libmu_auth/tls.c: Likewise.
20843	* libproto/pop/mbox.c: Likewise.
20844	* libproto/pop/pop3_stream.c: Likewise.
20845	* pop3d/extra.c: Likewise.
20846	* libmailutils/file_stream.c (mu_file_stream_create)
20847	(mu_fd_stream_create): File streams are fully buffered by
20848	default.
20849	* libmailutils/stdio_stream.c (mu_stdio_stream_create): Stdio
20850	streams are line buffered by default.
20851
208522010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20853
20854	Bugfixes.
20855
20856	* libmailutils/streamcpy.c (mu_stream_copy): Use the number of
20857	bytes actually read.
20858	* libmailutils/base64.c (_base64_encoder): Return
20859	mu_filter_again if not all data has been consumed on
20860	mu_filter_lastbuf.
20861	* libmailutils/message_stream.c (scan_stream): Fix calculation
20862	of body_end.
20863	(_body_obj_size): Fix calculation of body size.
20864	* libproto/mailer/smtp_data.c (_mu_smtp_data_begin): Set full
20865	buffering on the MU_TRANSPORT_OUTPUT stream.
20866
208672010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20868
20869	Finish switching to new gnulib (see 52d2552d23).
20870
20871	* configure.ac: Use libmuaux.a instead of libmuaux.la.
20872	* examples/Makefile.am: Likewise.
20873	* examples/cpp/Makefile.am: Likewise.
20874	* imap4d/Makefile.am: Likewise.
20875	* mapi/Makefile.am: Likewise.
20876	* mh/Makefile.am: Likewise.
20877	* pop3d/Makefile.am: Likewise.
20878
20879	Remove old files from POTFILES.in (see c42bddb0b8).
20880	* po/POTFILES.in: Remove comsat/oldcfg.c.
20881
20882	Build testsuites after the programs they are to test.
20883	* frm/Makefile.am (SUBDIRS): Put . before tests.
20884	* messages/Makefile.am: Likewise.
20885	* readmsg/Makefile.am: Likewise.
20886	* sieve/Makefile.am: Likewise.
20887
20888	Remove leftovers from CVS times:
20889	* .cvsignore: Remove.
20890	* am/.cvsignore: Remove.
20891	* lib/.cvsignore: Remove.
20892	* po/.cvsignore
20893
208942010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20895
20896	Add back testsuite/etc/DISTFILES.
20897
20898	It is needed for the remaining DejaGNU tests and will go away
20899	later, when they are rewritten.
20900
209012010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20902
20903	Fix hex (%XX) expansion in URLs.
20904
20905	* mailbox/url.c (url_parse0): Take three arguments. Return in
20906	the third one a boolean indicating whether to expand %XX
20907	notations in the URL. Do not decode absolute file names and
20908	pipes.
20909	(mu_url_parse): Use this value to decide.
20910	* movemail/movemail.c (main): In emacs mode: force UNIX mbox
20911	format as a default. Send debugging output to stderr.
20912	* libmailutils/tests/url.at: Add new tests.
20913
209142010-09-25  Sergey Poznyakoff  <gray@gnu.org.ua>
20915
20916	Minor changes.
20917
20918	* am/debug.m4 (MU_DEBUG_MODE): Rewrite. Use
20919	-Wdeclaration-after-statement if supported.
20920	* comsat/oldcfg.c: Remove.
20921	* comsat/Makefile.am (comsatd_SOURCES): Remove oldcfg.c.
20922	* comsat/comsat.c: Remove the obsolete --config and
20923	--convert-config options.
20924	* comsat/comsat.h (convert_config): Remove.
20925
209262010-09-21  Sergey Poznyakoff  <gray@gnu.org.ua>
20927
20928	Various SMTP improvements.
20929
20930	* Makefile.am: Shut up cmp's stderr.
20931	* libmailutils/body.c (_body_get_stream): Set full buffering
20932	mode on the body stream.
20933	* libmailutils/errors (MU_ERR_AUTH_NO_CRED): New error code.
20934	* libproto/mailer/smtp.c (smtp_open): Do not treat ENOSYS or
20935	MU_ERR_AUTH_NO_CRED (returned by mu_smtp_auth) as errors.
20936	(smtp_send_message): Do not try to submit the message if it is
20937	bigger than the maximum imposed by the server.
20938	* libproto/mailer/smtp_auth.c (mu_smtp_auth): Return
20939	MU_ERR_AUTH_NO_CRED if neither user name nor password are
20940	supplied.
20941	* mail/send.c (mail_send0): Issue diagnostics if sending
20942	attempt has failed.
20943
209442010-09-21  Wojciech Polak  <polak@gnu.org>
20945
20946	Update C++ API and the examples.
20947
20948	* include/mailutils/cpp/pop3.h (capa): Add reread parameter.
20949	(getline): Add new prototype.
20950	(send, readline): Remove.
20951	(response, stat): Change prototype.
20952	* libmu_cpp/pop3.cc: Likewise.
20953	* include/mailutils/cpp/stream.h
20954	(read, write, readline): Change prototype.
20955	(sequential_readline, sequential_write): Remove.
20956	* libmu_cpp/stream.cc: Likewise.
20957
209582010-09-21  Sergey Poznyakoff  <gray@gnu.org.ua>
20959
20960	Rewrite SMTP mailer.
20961
20962	* libproto/mailer/smtp.c: Rewrite using new SMTP API.
20963	* libproto/mailer/smtp_quit.c (mu_smtp_quit): Return
20964	immediately if already in closed state.
20965	* libmailutils/ticket.c (mu_ticket_get_cred): Return
20966	MU_ERR_FAILURE if all methods fail.
20967	* mail/send.c: Port 23321cf7 from patches-2.2
20968	(msg_to_pipe): Return status code.
20969	(save_dead_message, send_message): New functions, extracted
20970	from mail_send0.
20971	(mail_send0): Call save_dead_message if sending failed.
20972
209732010-09-20  Sergey Poznyakoff  <gray@gnu.org.ua>
20974
20975	Improve smtp sending functions.
20976
20977	* include/mailutils/smtp.h (mu_smtp_write): Mark as
20978	printf-like.
20979	(mu_smtp_mail_basic, mu_smtp_rcpt_basic): Take variable number
20980	of arguments. Mark as printf-like.
20981	(mu_smtp_data): New prototype.
20982	* include/mailutils/sys/smtp.h (_MU_SMTP_SAVEBUF): New flag.
20983	(_mu_smtp) <savebuf>: New member.
20984	(_mu_smtp_data_begin, _mu_smtp_data_end): New protos.
20985	* libproto/mailer/smtp_send.c: New file.
20986	* libproto/mailer/smtp_data.c (_mu_smtp_data_begin)
20987	(_mu_smtp_data_end, mu_smtp_data): New functions.
20988	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
20989	smtp_send.c.
20990	* libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): Switch to
20991	MU_SMTP_EHLO only if in MU_SMTP_MAIL state.
20992	* libproto/mailer/smtp_mail.c (mu_smtp_mail_basic): Take
20993	variable number of arguments.
20994	* libproto/mailer/smtp_param.c (mu_smtp_get_param): Add missing
20995	typecast.
20996	* libproto/mailer/smtp_rcpt.c (mu_smtp_rcpt_basic): Take
20997	variable number of arguments.
20998	* libproto/mailer/smtp_send.c (_smtp_data_send): Use
20999	_mu_smtp_data_begin and _mu_smtp_data_end.
21000	* testsuite/smtpsend.c: Emulate sending from a MU message.
21001
210022010-09-20  Sergey Poznyakoff  <gray@gnu.org.ua>
21003
21004	Stream improvements.
21005
21006	* include/mailutils/stream.h (mu_stream_printf): Mark as
21007	printf-like.
21008	* include/mailutils/sys/stream.h (_MU_STR_EVENT_CLOSE): New
21009	event.
21010	(_mu_stream) <event_cb_data>: New member.
21011	* libmailutils/stream.c (mu_stream_seek): Avoid unnecessary
21012	seeks in mu_buffer_none mode. Complements 906499db.
21013	(mu_stream_close): Mark _MU_STR_EVENT_CLOSE event.
21014
210152010-09-20  Sergey Poznyakoff  <gray@gnu.org.ua>
21016
21017	Bugfix in message_stream.c.
21018
21019	* libmailutils/message_stream.c (scan_stream): Change
21020	signature. All uses updated. Correct the calculation of
21021	body_start.
21022	(mu_message_stream_create): Return the stream.
21023
210242010-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
21025
21026	Improve authentication interface in SMTP client.
21027
21028	* include/mailutils/smtp.h (MU_SMTP_PARAM_URL): New parameter
21029	code.
21030	* include/mailutils/sys/smtp.h (_MU_SMTP_CLNPASS): New flag.
21031	(_mu_smtp) <secret>: New member.
21032	* libproto/mailer/smtp_auth.c (get_ticket)
21033	(_mu_smtp_fixup_params): New static functions.
21034	(mu_smtp_auth): Call _mu_smtp_fixup_params to supply missing
21035	parameters.
21036	* libproto/mailer/smtp_create.c (mu_smtp_destroy): Destroy
21037	secret. Take care to erase eventual plaintext representation of
21038	the password.
21039	* libproto/mailer/smtp_gsasl.c (_smtp_callback): Use
21040	mu_smtp_get_param to obtain parameters.
21041	* libproto/mailer/smtp_param.c (mu_smtp_set_param): Setting
21042	MU_SMTP_PARAM_PASSWORD updates secret.
21043	param[MU_SMTP_PARAM_PASSWORD] points (temporarily and on
21044	request only) to plaintext password.
21045	(mu_smtp_get_param): Likewise for retrieving password.
21046	* testsuite/smtpsend.c (main): New parameter url=.
21047
210482010-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
21049
21050	Bugfixes.
21051
21052	* libmu_auth/gsasl.c (_gsasl_encoder,_gsasl_decoder): Do not
21053	free flt.
21054	* include/mailutils/stream.h [__cplusplus]: Protect contents by
21055	extern "C".
21056
210572010-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
21058
21059	Avoid unnecessary rebuilds of git-describe and git-describe.h.
21060
21061	* Makefile.am: Avoid unnecessary rebuilds of git-describe and
21062	git-describe.h
21063
210642010-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
21065
21066	Bugfix.
21067
21068	* libmailutils/stream.c (_mu_stream_create): Mask out internal
21069	flags.
21070	* pop3d/pop3d.c (main): Do not handle SIGPIPE, to avoid
21071	infinite recursion.
21072
210732010-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
21074
21075	* testsuite/smtpsend.c (main): Retry ehlo after successful
21076	authentication.
21077
210782010-09-18  Sergey Poznyakoff  <gray@gnu.org.ua>
21079
21080	Implement SMTP AUTH (via GSASL).
21081
21082	* configure.ac (MU_COND_GSASL): New cond.
21083	* include/mailutils/smtp.h (MU_SMTP_PARAM_DOMAIN)
21084	(MU_SMTP_PARAM_USERNAME, MU_SMTP_PARAM_PASSWORD)
21085	(MU_SMTP_PARAM_SERVICE, MU_SMTP_PARAM_REALM)
21086	(MU_SMTP_PARAM_HOST, MU_SMTP_MAX_PARAM): New constants.
21087	(mu_smtp_set_domain, mu_smtp_get_param): Remove.
21088	(mu_smtp_set_param, mu_smtp_get_param): New prototypes.
21089	(mu_smtp_auth, mu_smtp_add_auth_mech)
21090	(mu_smtp_add_auth_mech_list, mu_smtp_mech_select): New
21091	prototypes.
21092	* include/mailutils/sys/smtp.h (_mu_smtp) <domain>: Remove.
21093	(_mu_smtp) <authimpl, param, authmech>: New members.
21094	(_mu_smtp_gsasl_auth, _mu_smtp_mech_impl): New prototypes.
21095	* libproto/mailer/Makefile.am [MU_COND_GSASL]: Define
21096	SMTP_GSASL.
21097	(libmu_mailer_la_SOURCES): Add new sources.
21098	* libproto/mailer/smtp_domain.c: Remove.
21099	* libproto/mailer/smtp_param.c: New file.
21100	* libproto/mailer/smtp_mech.c: New file.
21101	* libproto/mailer/smtp_auth.c: New file.
21102	* libproto/mailer/smtp_gsasl.c: New file.
21103	* libproto/mailer/smtp_create.c (mu_smtp_destroy): Free new
21104	members of struct _mu_smtp.
21105	* libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): Use
21106	param[MU_SMTP_PARAM_DOMAIN] instead of domain.
21107	* testsuite/smtpsend.c: Handle SMTP AUTH.
21108	* libmu_auth/gsasl.c (mu_gsasl_stream_create): Bugfix.
21109	* libmailutils/xscript-stream.c (_xscript_ctl)
21110	<MU_IOCTL_SWAP_STREAM>: If instream!=outstream, combine them
21111	first into an iostream.
21112
211132010-09-18  Sergey Poznyakoff  <gray@gnu.org.ua>
21114
21115	smtp client: implement more functions.
21116
21117	* include/mailutils/smtp.h (mu_smtp_mail_basic)
21118	(mu_smtp_rcpt_basic, mu_smtp_send_stream)
21119	(mu_smtp_rset, mu_smtp_quit): New prototypes.
21120	* include/mailutils/sys/smtp.h (MU_SMTP_RCPT)
21121	(MU_SMTP_MORE, MU_SMTP_DOT, MU_SMTP_QUIT, MU_SMTP_CLOS): New
21122	states.
21123	(_mu_smtp_xscript_level): New proto.
21124	* libmailutils/errors (MU_ERR_REPLY): New error code.
21125	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
21126	new sources.
21127	* libproto/mailer/smtp_data.c: New file.
21128	* libproto/mailer/smtp_mail.c: New file.
21129	* libproto/mailer/smtp_quit.c: New file.
21130	* libproto/mailer/smtp_rcpt.c: New file.
21131	* libproto/mailer/smtp_rset.c: New file.
21132	* libproto/mailer/smtp_ehlo.c: Return MU_ERR_REPLY if the
21133	server replied with a code other than 2xx.
21134	* libproto/mailer/smtp_open.c: Likewise.
21135	* testsuite/smtpsend.c: Implement full sending cycle (excepting
21136	authorization).
21137
211382010-09-18  Sergey Poznyakoff  <gray@gnu.org.ua>
21139
21140	Bugfixes in the sieve testsuite.
21141
21142	* sieve/tests/reject.at: Fix dependency on TZ.
21143	* sieve/tests/relational.at: Ensure that fileintos go to the
21144	test folder.
21145	* sieve/tests/mul-addr.at: Remove unneeded require.
21146
211472010-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
21148
21149	Begin new implementation of the SMTP client.
21150
21151	* include/mailutils/smtp.h: New file.
21152	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
21153	smtp.h.
21154	* include/mailutils/list.h (mu_list_clear): New proto.
21155	* include/mailutils/sys/smtp.h: New file.
21156	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
21157	smtp.h.
21158	* libmailutils/errors (MU_ERR_BADREPLY, MU_ERR_SEQ): New error
21159	codes.
21160	* libmailutils/list.c (mu_list_clear): New function.
21161	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
21162	new sources.
21163	* libproto/mailer/smtp_capa.c: New file.
21164	* libproto/mailer/smtp_carrier.c: New file.
21165	* libproto/mailer/smtp_create.c: New file.
21166	* libproto/mailer/smtp_disconnect.c: New file.
21167	* libproto/mailer/smtp_domain.c: New file.
21168	* libproto/mailer/smtp_ehlo.c: New file.
21169	* libproto/mailer/smtp_io.c: New file.
21170	* libproto/mailer/smtp_open.c: New file.
21171	* libproto/mailer/smtp_starttls.c: New file.
21172	* libproto/mailer/smtp_trace.c: New file.
21173	* testsuite/smtpsend.c: New file.
21174	* testsuite/Makefile.am (noinst_PROGRAMS): Add smtpsend.
21175
211762010-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
21177
21178	Update for gnulib v0.0-4270-g18aae5b.
21179
21180	* bootstrap.conf: Build included listings in doc/texinfo.
21181	* configure.ac: Require gettext 0.18
21182	* doc/texinfo/Makefile.am: Remove the .c.inc rules.
21183	* doc/texinfo/maint.mk: New file.
21184	* lib/Makefile.am (libmuaux_la_SOURCES): Replace with
21185	libmuaux_a_SOURCES.
21186
211872010-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
21188
21189	testsuite: recreate missing maildir entries.
21190
21191	Git does not keep empty subdirectories, so we need to recreate
21192	/cur and /tmp subdirs in maildir mailboxes retrieved from the
21193	repo.
21194
21195	* bootstrap.conf: Recreate missing maildir parts.
21196	* testsuite/testsuite.inc (MUT_MBCOPY): New macro.
21197	* sieve/tests/ext.at: Use MUT_MBCOPY to copy mailboxes.
21198	* sieve/tests/redirect.at: Likewise.
21199	* sieve/tests/reject.at: Likewise.
21200	* sieve/tests/testsuite.at: Likewise.
21201	* testsuite/mbdel.at: Likewise.
21202	* frm/tests/Makefile.am: Testsuite depends on
21203	$(top_srcdir)/testsuite/testsuite.inc.
21204	* libmailutils/tests/Makefile.am: Likewise.
21205	* messages/tests/Makefile.am: Likewise.
21206	* readmsg/tests/Makefile.am: Likewise.
21207	* sieve/tests/Makefile.am: Likewise.
21208	* testsuite/Makefile.am: Likewise.
21209
212102010-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
21211
21212	Further improvement of the testsuite + some bugfixes.
21213
21214	That's the first commit since the merge six days ago that
21215	passes distcheck (with python, cxx, imap and nntp disabled, of
21216	course).
21217
21218	* testsuite/folder/DISTFILES: Restore. It is needed for some of
21219	the remaining DejaGNU tests.
21220	* testsuite/spool/DISTFILES: Likewise.
21221	* testsuite/testsuite.at: New file.
21222	* testsuite/atlocal.in: New file.
21223	* libmailutils/tests/mbdel.at: Move to testsuite/.
21224	* libmailutils/tests/mbdel.c: Likewise.
21225	* libmailutils/tests/mime.at: Likewise.
21226	* libmailutils/tests/mimetest.c: Likewise.
21227	* Makefile.am (SUBDIRS): Place testsuite after libproto.
21228	* configure.ac (AM_INIT_AUTOMAKE): Remove dist-lzma.
21229	(AC_CONFIG_FILES): Add testsuite/atlocal.
21230	* libmailutils/base64.c (_base64_decoder)
21231	(_base64_encoder): Fix the use of uninitialized variables.
21232	* libmailutils/tests/.gitignore: Remove mbdel and mimetest.
21233	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Remove
21234	mbdel and mimetest.
21235	(LDADD): Leave only MU_LIB_MAILUTILS.
21236	(TESTSUITE_AT): Remove mbdel.at and mime.at
21237	* libmailutils/tests/atlocal.in (PATH): Bugfix.
21238	* libmailutils/tests/testsuite.at: Remove inclusion of mbdel.at
21239	and mime.at.
21240	* po/POTFILES.in: Replace mailbox/ with libmailutils/.
21241	* testsuite/.gitignore: Rewrite.
21242	* testsuite/Makefile.am: Rewrite.
21243	* testsuite/mbdel.at: Set +w on all copied mailboxes.
21244	* testsuite/mimetest.c (main): Open mailbox for reading only.
21245	* sieve/Makefile.am: Add examples/ to the distribution.
21246	* libproto/mbox/mbox.c (mbox_open): Create locker only if the
21247	mailbox is open for modification. All users updated to check
21248	for mailbox->locker!=NULL before using it.
21249
212502010-09-16  Sergey Poznyakoff  <gray@gnu.org.ua>
21251
21252	Test mailbox deletion.
21253
21254	* libmailutils/tests/mbdel.at: New testcase.
21255	* libmailutils/tests/Makefile.am (TESTSUITE_AT): Add mbdel.at.
21256	* libmailutils/tests/testsuite.at: Include mbdel.at.
21257	* libproto/mbox/mbox.c (mbox_remove): Fix return code.
21258	* testsuite/maildir/mbox1: New test mailbox.
21259	* testsuite/mh/mbox1: New test mailbox.
21260	* testsuite/etc/DISTFILES: Remove.
21261	* testsuite/folder/DISTFILES: Remove.
21262	* testsuite/lib/DISTFILES: Remove.
21263	* testsuite/Makefile.am: Use EXTRA_DIST to distribute subdirs.
21264
212652010-09-16  Sergey Poznyakoff  <gray@gnu.org.ua>
21266
21267	Minor fix.
21268
21269	* libmailutils/mailbox.c (mu_mailbox_open): Return MU_ERR_OPEN
21270	if the mailbox has already been opened.
21271
212722010-09-16  Sergey Poznyakoff  <gray@gnu.org.ua>
21273
21274	Implement `remove' method for mailboxes.
21275
21276	* include/mailutils/mailbox.h (mu_mailbox_remove): New
21277	function.
21278	* include/mailutils/stream.h: Add some comments.
21279	* include/mailutils/sys/amd.h (_amd_data)<remove>: New method.
21280	(amd_remove_dir): New function.
21281	* include/mailutils/sys/mailbox.h (_mu_mailbox)<_remove>: New
21282	method.
21283	* libmailutils/amd.c (amd_remove_mbox): New function.
21284	(amd_init_mailbox): Initialize the _remove method.
21285	(amd_remove_dir): New function.
21286	* libmailutils/errors (MU_ERR_MBX_REMOVED)
21287	(MU_ERR_NOT_OPEN, MU_ERR_OPEN): New error codes.
21288	* libmailutils/mailbox.c: Keep state of the mailbox (open vs.
21289	not open, removed). Check it before doing anything on it.
21290	(_MU_MAILBOX_OPEN, _MU_MAILBOX_REMOVED, _MU_MAILBOX_MASK): New
21291	defines.
21292	(mu_mailbox_open): Set _MU_MAILBOX_OPEN if the operation
21293	succeeds.
21294	(mu_mailbox_close): Clear _MU_MAILBOX_OPEN if the operation
21295	succeeds. Refuse to run if the mailbox was not opened.
21296	(mu_mailbox_remove): New function.
21297	(all functions): return MU_ERR_MBX_NULL if the mbox argument is
21298	NULL. Check mailbox state on entry and proceed accordingly.
21299	* libproto/maildir/mbox.c: Implement _remove method.
21300	(maildir_remove): New function.
21301	(_mailbox_maildir_init): Initialize amd->_remove.
21302	* libproto/mbox/mbox.c: Implement _remove method.
21303	(mbox_remove): New function.
21304	(_mailbox_mbox_init): Initialize amd->_remove.
21305	* libproto/mh/mbox.c: Implement _remove method.
21306	(mh_remove): New function.
21307	(_mailbox_mh_init): Initialize amd->_remove.
21308	* libmailutils/tests/mbdel.c: New file.
21309	* libmailutils/tests/.gitignore: Add mbdel.
21310	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Likewise.
21311	(LDADD): List all mailbox formats.
21312	* imap4d/delete.c (imap4d_delete): Use mu_mailbox_remove to
21313	delete the folder. Fall back to remove() if it does not appear
21314	to be a mailbox.
21315
213162010-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
21317
21318	libmailutils/tests: test list and iterator operations.
21319
21320	* examples/listop.c: Move to libmailutils/tests.
21321	* examples/Makefile.am (noinst_PROGRAMS): Remove listop.
21322	* libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add listop.
21323	(TESTSUITE_AT): Add list.at.
21324	* libmailutils/tests/.gitignore: New file.
21325	* libmailutils/tests/list.at: New file.
21326	* libmailutils/tests/testsuite.at: Include list.at.
21327	* libmailutils/list.c (list_itrctl): Fix mu_itrctl_replace.
21328
213292010-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
21330
21331	Optimize libmailutils testsuite.
21332
21333	* libmailutils/tests/testsuite.at (MU_TEST_GROUP)
21334	(MU_TEST_KEYWORDS, MU_TEST_COMMAND): New defines.
21335	(mu_trimstr, mu_firstline): New macros.
21336	(MU_GENERIC_TEST): New macro.
21337	* libmailutils/tests/addr.c: Accept addresses from stdin.
21338	* libmailutils/tests/address.at (TESTADDR): If the address
21339	contains single quotes, pass it to the program via stdin.
21340	Uncomment all such tests.
21341	* libmailutils/tests/argcv.at (TESTARGS): Rewrite as a wrapper
21342	over MU_GENERIC_TEST.
21343	* libmailutils/tests/decode2047.at (TESTDEC2047): Likewise.
21344	* libmailutils/tests/mailcap.at (MAILCAP): Likewise.
21345	* libmailutils/tests/url.at (TESTURL): Likewise.
21346	* libmailutils/tests/mailcap.c: Accept data from stdin.
21347
213482010-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
21349
21350	Bugfix.
21351
21352	* libmailutils/Makefile.am (SUBDIRS): Make sure tests are
21353	descended into only when the libmailutils library is already
21354	built.
21355
213562010-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
21357
21358	Rewrite testsuite for messages in Autotest.
21359
21360	* configure.ac: Remove messages/testsuite
21361	* messages/Makefile.am (SUBDIRS): Replace testsuite with tests.
21362	* messages/tests/.gitignore: New file.
21363	* messages/tests/Makefile.am: New file.
21364	* messages/tests/atlocal.in: New file.
21365	* messages/tests/testsuite.at: New file.
21366	* messages/testsuite: Remove.
21367
213682010-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
21369
21370	Rewrite libmailutils testsuite in Autotest.
21371
21372	* configure.ac: Create libmailutils/tests/atlocal and
21373	libmailutils/tests/Makefile. Remove libmailutils/testsuite.
21374	* examples/Makefile.am (noinst_PROGRAMS): Remove programs moved
21375	to libmailutils/tests.
21376	* examples/argcv.c -> libmailutils/tests/argcv.c
21377	* libmailutils/testsuite/Decode -> libmailutils/tests/Decode
21378	* libmailutils/testsuite/Encode -> libmailutils/tests/Encode
21379	* examples/decode2047.c: Move to libmailutils/tests
21380	* examples/encode2047.c: Move to libmailutils/tests
21381	* examples/mailcap.c: Likewise.
21382	* examples/url-parse.c: Likewise.
21383	* include/mailutils/Makefile.am: Minor changes.
21384	* libmailutils/Makefile.am (SUBDIRS): Replace testsuite with
21385	tests.
21386	* libmailutils/tests/Makefile.am: New file.
21387	* libmailutils/tests/addr.c: New file.
21388	* libmailutils/tests/address.at: New file.
21389	* libmailutils/tests/argcv.at: New file.
21390	* libmailutils/tests/atlocal.in: New file.
21391	* libmailutils/tests/base64d.at: New file.
21392	* libmailutils/tests/base64e.at: New file.
21393	* libmailutils/tests/decode2047.at: New file.
21394	* libmailutils/tests/encode2047.at: New file.
21395	* libmailutils/tests/fltst.c: New file.
21396	* libmailutils/tests/mailcap.at: New file.
21397	* libmailutils/tests/mime.at: New file.
21398	* libmailutils/tests/testsuite.at: New file.
21399	* libmailutils/tests/url.at: New file.
21400	* libmailutils/testsuite/: Delete.
21401	* frm/tests/Makefile.am: Prefix package.m4 creation commands
21402	with $(AM_V_GEN).
21403	* readmsg/tests/Makefile.am: Likewise.
21404	* sieve/tests/Makefile.am: Likewise.
21405	* frm/tests/testsuite.at: Minor changes.
21406	* readmsg/tests/testsuite.at: Include testsuite.inc.
21407	* sieve/tests/testsuite.at: Likewise.
21408	* sieve/tests/version.at: Comment out inclusion of
21409	testsuite.inc.
21410	* testsuite/testsuite.inc: Add m4_version_prereq.
21411
214122010-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
21413
21414	Rename mailbox/ to libmailutils/.
21415
21416	This change has been waiting since 2005-08-16
21417	(aaab88142c8193f1), when libmailbox had been renamed to
21418	libmailutils. Back then MU was still under CVS, which didn't
21419	like renames.
21420
214212010-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
21422
21423	Rewrite readmsg testsuite in Autotest.
21424
21425	* configure.ac: Add readmsg/tests/
21426	* readmsg/Makefile.am: New file.
21427	* readmsg/tests/.gitignore: New file.
21428	* readmsg/tests/Makefile.am: New file.
21429	* readmsg/tests/all.at: New file.
21430	* readmsg/tests/atlocal.in: New file.
21431	* readmsg/tests/hdr.at: New file.
21432	* readmsg/tests/nohdr.at: New file.
21433	* readmsg/tests/testsuite.at: New file.
21434	* readmsg/tests/twomsg.at: New file.
21435	* readmsg/tests/weed.at: New file.
21436	* readmsg/testsuite: Remove.
21437	* testsuite/testsuite.inc (AT_SKIP_TEST): New macro.
21438	* testsuite/spool/mbox1: Remove trailing whitespace after
21439	Received headers.
21440	* imap4d/testsuite/imap4d/fetch.exp: Reflect changes in mbox1.
21441	* mail/testsuite/mail/read.exp: Likewise.
21442	* mail/testsuite/mail/write.exp: Likewise.
21443	* mailbox/testsuite/Mime: Likewise.
21444
214452010-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
21446
21447	Rewrite frm testsuite in Autotest.
21448
21449	* configure.ac: Build frm/testsuite/Makefile.am and atlocal.
21450	Remove frm/testsuite/Makefile.
21451	* testsuite/testsuite.inc: New file.
21452	* frm/testsuite: Remove DejaGNU-based testsuite.
21453	* frm/tests: Autotest-based testsuite.
21454	* frm/tests/.gitignore
21455	* frm/tests/Makefile.am
21456	* frm/tests/atlocal.in
21457	* frm/tests/testsuite.at
21458	* frm/Makefile.am (SUBDIRS): Replace testsuite with tests.
21459	* sieve/tests/Makefile.am (TESTSUITE): Add an include option.
21460	* sieve/tests/version.at: Use macro from testsuite.inc.
21461
214622010-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
21463
21464	Remove files that are not necessary any more.
21465
21466	* sieve/examples/INBOX.orig
21467	* sieve/examples/Test
21468	* sieve/examples/test.out
21469
214702010-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
21471
21472	Rewrite Sieve testsuite in Autotest.
21473
21474	* mailbox/cfg_parser.y (mu_cfg_create_subtree): Optional prefix
21475	character may be used to alter the separator or to suppress
21476	value splitting.
21477
214782010-09-13  Sergey Poznyakoff  <gray@gnu.org.ua>
21479
21480	Optimize stream seeks and I/O.	Expand stream event handlers.
21481	Rewrite xscript stream.
21482
21483	* include/mailutils/sys/stream.h (_MU_STR_EVENT_SET): Rename to
21484	_MU_STR_EVENT_SET.
21485	(_MU_STR_EVENT_CLR): Rename to _MU_STR_EVENT_CLRFLAG.
21486	(_MU_STR_EVENT_FILLBUF, _MU_STR_EVENT_FLUSHBUF): New event
21487	codes.
21488	(_MU_STR_EVMASK): New macro.
21489	(_mu_stream) <cur>: Replace with pos, indicating current
21490	position in the buffer.
21491	(event_cb): Change signature.
21492	(mu_stream_read_unbuffered): Remove.
21493	(mu_stream_write_unbuffered): Remove.
21494	* mailbox/iostream.c (mu_iostream_create): Provide the
21495	readdelim method only if the underlying input transport stream
21496	provides it.
21497	* mailbox/streamref.c (mu_streamref_create_abridged): Likewise.
21498	* mailbox/stream.c (_stream_event): New macro.
21499	(mu_stream_read_unbuffered): Rename to static
21500	_stream_read_unbuffered.
21501	(mu_stream_write_unbuffered): Rename to static
21502	_stream_write_unbuffered. (_stream_advance_buffer,
21503	_stream_buffer_offset)
21504	(_stream_orig_level): Remove macros.
21505	(_stream_buffer_freespace): Rewrite.
21506	(_stream_curp): New macro.
21507	(_stream_fill_buffer): Make sure the `offset' indicates the
21508	offset int the transport, corresponding to the beginning of the
21509	current buffer.
21510	(_stream_flush_buffer): Essentially rewritten.
21511	(mu_stream_seek): Reflect changes to the _mu_stream structure.
21512	Optimize calls to the seek method.
21513	(_stream_skip_input_bytes): Likewise.
21514	(mu_stream_read, _stream_scandelim, mu_stream_write): Rewrite
21515	using new _mu_stream structure.
21516	* mailbox/xscript-stream.c: Rewrite using stream events.
21517	* mailbox/base64.c (_base64_encoder): Bugfix.
21518	* libproto/pop/pop3_stream.c (_pop3_event_cb): Update signature
21519	to match the changes above.
21520	* examples/mimetest.c (main): Add more error checking.
21521	* mail/testsuite/mail/write.exp: Minor fix.
21522
215232010-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
21524
21525	Mailbox quota support in imap4d: initial implementation.
21526
21527	* imap4d/quota.c: New file.
21528	* imap4d/Makefile.am (imap4d_SOURCES): Add quota.c
21529	* imap4d/append.c (imap4d_append0): Refuse to append if the
21530	quota is exceeded or would be exceeded after completing the
21531	operation.
21532	* imap4d/copy.c (imap4d_copy0): Refuse to copy messages if the
21533	quota is exceeded or would be exceeded after completing the
21534	operation. Return a meaningful textual description. Attempt to
21535	restore mailbox to its original size if the operation failed.
21536	* imap4d/imap4d.c (imap4d_session_setup0): Call quota_setup.
21537	* imap4d/imap4d.h (quota_setup, quota_check, quota_update): New
21538	functions.
21539	* include/mailutils/folder.h (mu_list_response) <format>: New
21540	member.
21541	* include/mailutils/mailbox.h (mu_mailbox_create_from_record):
21542	New function.
21543	* include/mailutils/types.hin (MU_FOLDER_ATTRIBUTE_LINK): New
21544	flag.
21545	* libproto/mbox/folder.c (list_helper): Do not return symbolic
21546	links unless MU_FOLDER_ATTRIBUTE_LINK is set. Fill in the
21547	resp->format member.
21548	* mailbox/mailbox.c (_mailbox_create_from_record): New static
21549	function.
21550	(_create_mailbox0): Rewrite as a wrapper over
21551	_mailbox_create_from_record.
21552	(mu_mailbox_create_from_record): New function.
21553
215542010-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
21555
21556	movemail: bugfix.
21557
21558	* movemail/movemail.c (guess_mbox_owner): Fix setting GID with
21559	--owner=set-id.
21560	(main): Don't attempt to expunge source mailbox if
21561	preserve_mail is set.
21562
215632010-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
21564
21565	amd: bugfix.
21566
21567	* mailbox/amd.c (read_size_file): Fix return value.
21568
215692010-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
21570
21571	Bugfix.
21572
21573	* libproto/pop/pop3_stream.c (_pop3_event_cb)
21574	(mu_pop3_filter_create): Fix buffer size manipulation.
21575	* libmu_auth/tls.c: Protect gnutls debugging code with
21576	DEBUG_TLS.
21577
215782010-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
21579
21580	Reimplement POP3 I/O over the DOT and CRLFDOT filters.
21581
21582	As a side note, previous versions of pop3d did not do
21583	byte-stuffing when sending RETR output. This commit fixes it.
21584
21585	* include/mailutils/filter.h (mu_dot_filter): New filter.
21586	* mailbox/dot.c: New file.
21587	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add dot.c
21588	* mailbox/crlfdot.c (_crlfdot_encoder): Bugfix. Do not
21589	dereference iobuf until we know it is not NULL.
21590	* mailbox/filter.c (mu_filter_get_list): Register
21591	mu_dot_filter.
21592	* mailbox/fltstream.c (filter_wr_close, filter_rd_close): New
21593	close methods, depending on the filter stream mode.
21594	(mu_filter_stream_create): Set filter_rd_close for
21595	MU_STREAM_READ and filter_wr_close for MU_STREAM_WRITE streams.
21596	* mailbox/stream.c (mu_stream_readdelim): Update stream offset
21597	when using stream->readdelim.
21598	* pop3d/pop3d.h (pop3d_send_payload): New proto.
21599	* pop3d/retr.c (pop3d_send_payload): Change function to be
21600	optionally used in pop3d_top. Use DOT filter on output.
21601	* pop3d/top.c (pop3d_top): Rewrite using pop3d_send_payload.
21602	* libproto/pop/pop3_retr.c (mu_pop3_retr): Default return code
21603	is EINPROGRESS.
21604	* libproto/pop/pop3_stream.c: Remove the filter stuff. Use
21605	CRLFDOT instead.
21606	* mailbox/amd.c (amd_body_stream_readdelim): Bugfix. Increase
21607	offset by nread bytes.
21608
216092010-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
21610
21611	Improve filter framework. Implement a CRLFDOT filter.
21612
21613	* include/mailutils/filter.h (mu_filter_command)
21614	<mu_filter_flush> New command.
21615	(mu_filter_result) <mu_filter_again>: New result code.
21616	(MU_FILTER_MAX_AGAIN): New constant.
21617	(mu_crlfdot_filter): New filter.
21618	* include/mailutils/sys/stream.h (_MU_STR_DIRTY, _MU_STR_WRT)
21619	(_MU_STR_ERR, _MU_STR_EOF, _MU_STR_INTERN_MASK): Avoid
21620	conflicts with MU_STREAM_ constants from mailutils/stream.h
21621	* mailbox/crlfdot.c: New source.
21622	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add crlfdot.c.
21623	* mailbox/filter.c (mu_filter_get_list): Register
21624	mu_crlfdot_filter.
21625	* mailbox/fltstream.c (init_iobuf): Fix initialization of isize
21626	and input.
21627	(filter_read): Redo the loop, allowing xcode to request a new
21628	iteration by returning mu_filter_again.
21629	(filter_write_internal): Likewise.
21630	(filter_wr_flush): Call filter_write_internal with
21631	mu_filter_flush, reserving mu_filter_lastbuf for really last
21632	buffers.
21633	(filter_close): Call filter_write_internal with
21634	mu_filter_lastbuf.
21635	* mailbox/stream.c (mu_stream_skip_input_bytes): Clear
21636	MU_STREAM_SEEK bit before actually doing anything.
21637	* include/mailutils/sys/pop3.h [DMALLOC]: Remove unneeded cond.
21638
216392010-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
21640
21641	Version 2.2.90.
21642
216432010-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
21644
21645	Optimize I/O bufferization.
21646
21647	New ioctls MU_IOCTL_GET_TRANSPORT_BUFFER and
21648	MU_IOCTL_SET_TRANSPORT_BUFFER return and modify bufferization
21649	mode in the lowest level transport stream. Both server and
21650	client programs use this to switch to full buffering before
21651	sending large amounts of data. This has a particular impact on
21652	the output speed and CPU usage when TLS is in use.
21653
21654	* include/mailutils/stream.h (MU_IOCTL_GET_TRANSPORT_BUFFER)
21655	(MU_IOCTL_SET_TRANSPORT_BUFFER): New ioctls.
21656	(MU_TRANSPORT_INPUT, MU_TRANSPORT_OUTPUT): New constants.
21657	(MU_TRANSPORT_VALID_TYPE): New macro.
21658	(mu_buffer_query): New struct.
21659	(mu_stream_get_buffer): New proto.
21660	* libmu_auth/tls.c (_tls_io_ioctl): Return ENOSYS if op is not
21661	supported.
21662	(_tls_ioctl): Support MU_IOCTL_[GS]ET_TRANSPORT_BUFFER.
21663	* mailbox/file_stream.c (fd_ioctl): Support
21664	MU_IOCTL_[GS]ET_TRANSPORT_BUFFER. Return ENOSYS if op is not
21665	supported.
21666	* mailbox/filter_iconv.c (_icvt_ioctl): Likewise.
21667	* mailbox/iostream.c (_iostream_ctl): Likewise.
21668	* mailbox/mapfile_stream.c (_mapfile_ioctl): Likewise.
21669	* mailbox/memory_stream.c (_memory_ioctl): Likewise.
21670	* mailbox/rdcache_stream.c (rdcache_ioctl): Likewise.
21671	* mailbox/xscript-stream.c (_xscript_ctl): Likewise.
21672	* mailbox/prog_stream.c (_prog_ioctl): Return ENOSYS if op is
21673	not supported.
21674	* mailbox/tcp.c (_tcp_ioctl): Likewise.
21675	* mailbox/stream.c (mu_stream_default_buffer_size): New global.
21676	(mu_stream_seek): Do not call seek method if the requested
21677	offset is the same as the current one.
21678	(mu_stream_set_buffer): Size==0 means use the default value.
21679	(mu_stream_get_buffer): New function.
21680	(mu_stream_truncate): Flush the buffer before truncating.
21681	* mailbox/mime.c (mime_reset_state): New function.
21682	(_mime_body_stream_seek): Rewrite using mime_reset_state.
21683	(_mime_body_stream_ioctl): Return ENOSYS if op is not
21684	supported.
21685	(create_mime_body_stream): Reset mime state
21686	(_mime_body_stream_seek may not be called due to the
21687	optimization in mu_stream_seek.
21688	* mailbox/header.c (header_parse): Exit correctly if the buffer
21689	is not terminated with a \n.
21690	* libproto/mbox/mbox.c (mbox_open): Enforce full buffering on
21691	the mailbox stream.
21692	* libproto/pop/mbox.c (pop_header_fill): Minor fix.
21693	* libproto/pop/pop3_stream.c (_POP3F_DONE)
21694	(_POP3F_CHBUF): New constants.
21695	(mu_pop3_stream)<done>: Remove. Replaced with flags.
21696	<oldbuf>: New member.
21697	(_pop3_event_cb): If _POP3F_CHBUF flag is set, restore the
21698	initial buffering mode on the transport stream.
21699	(mu_pop3_filter_create): Save away current buffering mode and
21700	enforce full buffering while transferring bulk data.
21701	* mail/from.c (hdr_from): Check return value from
21702	mu_message_get_header.
21703	* mail/mail.c (main): Allow for MAILRC having empty value.
21704	Always close the mailbox before exiting.
21705	* pop3d/pop3d.c (pop3d_cfg_param): New statement
21706	output-buffer-size.
21707	* pop3d/pop3d.h (pop3d_output_bufsize): New global.
21708	* pop3d/retr.c (pop3d_send_payload): New function.
21709	(pop3d_retr): Rewrite using pop3d_send_payload. Save away
21710	current buffering mode and enforce full buffering while
21711	transferring bulk data.
21712	* pop3d/top.c (pop3d_top_: Likewise.
21713
217142010-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
21715
21716	Bugfix.
21717
21718	* mailbox/url.c (ACCESSOR(is_same,field)): Fix coredump if one
21719	of the accessors returned MU_ERR_NOENT.
21720
217212010-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
21722
21723	Remove leftovers of ARG_LICENSE option from MH.
21724
217252010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21726
21727	Rename XSCRIPT_ macros to MU_XSCRIPT.
21728
217292010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21730
21731	Improve transcript stream.
21732
21733	* include/mailutils/stream.h (MU_IOCTL_LEVEL): New ioctl op.
21734	(XSCRIPT_NORMAL, XSCRIPT_SECURE, XSCRIPT_PAYLOAD): New
21735	constants.
21736	* include/mailutils/sys/xscript-stream.h (_mu_xscript_stream)
21737	<level>: New member.
21738	* mailbox/xscript-stream.c (TRANS_DISABLED): New flag.
21739	(print_transcript): Amount of output varies depending on the
21740	current output level. For secure data, try to recognize
21741	passwords and to replace them with *** on output.
21742	(_xscript_ctl): Support MU_IOCTL_LEVEL.
21743	* pop3d/extra.c (set_xscript_level): New function.
21744	* pop3d/pop3d.h (set_xscript_level): New proto.
21745	* pop3d/retr.c (pop3d_retr): Set XSCRIPT_PAYLOAD level before
21746	sending actual data and reset it to XSCRIPT_NORMAL afterward.
21747	* pop3d/top.c (pop3d_top): Likewise.
21748	* pop3d/user.c: Set XSCRIPT_SECURE level while expecting the
21749	PASS command.
21750	* imap4d/fetch.c (imap4d_fetch): Run imap4d_fetch0 in
21751	XSCRIPT_PAYLOAD level.
21752	* imap4d/uid.c (imap4d_uid): Likewise.
21753	* imap4d/imap4d.c (imap4d_mainloop): Unless started in preauth
21754	mode, select XSCRIPT_SECURE mode until authentication has been
21755	passed.
21756	* imap4d/imap4d.h (set_xscript_level): New proto.
21757	* imap4d/io.c (io_format_completion_response): Switch to
21758	XSCRIPT_NORMAL level when changing to the authenticated state.
21759	(imap4d_readline): Read literals in XSCRIPT_PAYLOAD level.
21760	* imap4d/util.c (set_xscript_level): New function.
21761	* include/mailutils/pop3.h (mu_pop3_trace_mask): New prototype.
21762	(MU_POP3_XSCRIPT_MASK): New macro.
21763	(_mu_pop3_xscript_level): New proto.
21764	* libproto/pop/pop3_pass.c (mu_pop3_pass): Set XSCRIPT_SECURE
21765	while sending the password.
21766	* libproto/pop/pop3_retr.c (mu_pop3_retr): Set XSCRIPT_PAYLOAD
21767	before going to MU_POP3_RETR_RX state.
21768	* libproto/pop/pop3_stream.c (_pop3_event_cb): Set
21769	XSCRIPT_NORMAL.
21770	* libproto/pop/pop3_top.c (mu_pop3_top): Set XSCRIPT_PAYLOAD
21771	before going to MU_POP3_TOP_RX state.
21772	* libproto/pop/pop3_trace.c (mu_pop3_trace_mask)
21773	(_mu_pop3_xscript_level): New functions.
21774	* libproto/pop/mbox.c (pop_open): Set trace masks depending on
21775	the trace6 and trace7 debug levels.
21776	* examples/pop3client.c (com_verbose): Allow to mask/unmask
21777	transcript levels.
21778
217792010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21780
21781	Finish pop3 mailbox implementation.
21782
21783	* mailbox/msgscan.c: New file.
21784	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add it.
21785	* include/mailutils/body.h (mu_body_set_get_stream): New
21786	prototype.
21787	* include/mailutils/message.h (MU_SCAN_SEEK, MU_SCAN_SIZE): New
21788	defines.
21789	(mu_message_scan): New structure.
21790	(mu_stream_scan_message): New prototype.
21791	(mu_message_set_get_stream): New prototype.
21792	* include/mailutils/stream.h (mu_stream_copy): Change
21793	signature: takes 4 arguments now.
21794	* include/mailutils/sys/body.h (_mu_body) <_get_stream>: New
21795	method.
21796	* include/mailutils/sys/message.h (_mu_message) <_get_stream>:
21797	New method.
21798	* mailbox/body.c (_body_get_stream): Call _get_stream, if
21799	provided.
21800	* mailbox/message.c (_message_get_stream): Call _get_stream, if
21801	provided.
21802	* mailbox/stream.c (_stream_flush_buffer): Avoid infinite
21803	recursion: call stream->seek directly.
21804	* mailbox/streamcpy.c (mu_stream_copy): Return the number of
21805	bytes actually copied in the fourth argument. All uses updated.
21806	* mailbox/streamref.c (streamref_return): Do not propagate
21807	internal flags.
21808	(_streamref_readdelim): Ensure there is enough buffer space for
21809	the mu_stream_readdelim call.
21810	* libproto/pop/mbox.c: Finish client implementation.
21811	* mail/print.c (mail_print_msg): Close pager before returning
21812	on error.
21813
218142010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21815
21816	Implement "read cache" streams. Rewrite stdio and socket
21817	streams.
21818
21819	* include/mailutils/sys/stdio_stream.h: Remove.
21820	* include/mailutils/sys/socket_stream.h: Remove.
21821	* include/mailutils/sys/rdcache_stream.h: New file.
21822	* include/mailutils/sys/Makefile.am: Update.
21823	* mailbox/rdcache_stream.c: New file.
21824	* mailbox/Makefile.am: Update.
21825	* examples/mucat.c: New example.
21826	* examples/musocio.c: New example.
21827	* examples/Makefile.am (noinst_PROGRAMS): Build new examples.
21828	* include/mailutils/stream.h (mu_fd_stream_create): New proto.
21829	(mu_rdcache_stream_create): New proto.
21830	* include/mailutils/sys/file_stream.h (_mu_file_stream_create):
21831	Change prototype.
21832	* mailbox/file_stream.c (fd_open): Raise the
21833	MU_STREAM_AUTOCLOSE bit.
21834	(fd_ioctl): Support MU_IOCTL_SET_TRANSPORT.
21835	(_mu_file_stream_create): Change signature. All uses updated.
21836	Allocate a copy of the filename argument, unless it is NULL.
21837	(mu_fd_stream_create): New function.
21838	* mailbox/socket_stream.c: Rewrite using file_stream directly.
21839	* mailbox/stdio_stream.c: Rewrite. Use rdcache_stream if the
21840	seek capability is required on an input stream.
21841	* mailbox/streamcpy.c (mu_stream_copy): Handle eventual EACCES
21842	return from mu_stream_seek as equivalent to ENOSYS.
21843
218442010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21845
21846	Further improvements in pop3client: readline & history.
21847
218482010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21849
21850	Begin rewriting pop3 mailbox support. Several bugfixes.
21851
21852	* examples/pop3client.c (com_capa): Call mu_pop3_capa_test.
21853	(com_stat): Count is size_t.
21854	* include/mailutils/opool.h (mu_opool_copy): New proto.
21855	* mailbox/opool.c (mu_opool_copy): New function.
21856	* mailbox/xscript-stream.c (_xscript_ctl)
21857	<MU_IOCTL_SWAP_STREAM>: Avoid coredumping if sp->transport is
21858	NULL.
21859	* include/mailutils/pop3.h (pop3_capa_test): Rename to
21860	mu_pop3_capa_test.
21861	(mu_pop3_stat): Third argument is a pointer to mu_off_t.
21862	* libproto/pop/pop3_capatst.c (pop3_capa_test): Rename to
21863	mu_pop3_capa_test.
21864	* libproto/pop/pop3_stat.c (mu_pop3_stat): Third argument is a
21865	pointer to mu_off_t.
21866	* libproto/pop/Makefile.am (libmu_pop_la_SOURCES): Put back
21867	folder.c, url.c and mbox.c.
21868	* libproto/pop/mbox.c: Begin rewriting.
21869
218702010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21871
21872	Minor change in stream API.  Improve POP3 client interface.
21873
21874	* include/mailutils/sys/stream.h (_MU_STR_EVENT_SET)
21875	(_MU_STR_EVENT_CLR): New defines.
21876	(_mu_stream) <event_cb, event_mask>: New members.
21877	* mailbox/stream.c (_stream_setflag, _stream_clrflag): New
21878	static functions. All functions use these instead of
21879	setting/clearing flags directly.
21880	(_mu_stream_cleareof, _mu_stream_seteof): New extern functions.
21881	(_stream_cleareof): Remove define, use _mu_stream_cleareof
21882	instead.
21883	(_stream_fill_buffer): Set EOF marker when end of stream is
21884	reached.
21885	* mailbox/fltstream.c (filter_read): Call _mu_stream_seteof to
21886	set EOF flag.
21887	* include/mailutils/pop3.h: Get rid of the superfluous "extern"
21888	in front of function prototypes. Add new prototypes. Remove
21889	extra whitespace.
21890	* libproto/pop/pop3_capatst.c: New file.
21891	* libproto/pop/pop3_list_cmd.c: New file.
21892	* libproto/pop/pop3_listas.c: New file.
21893	* libproto/pop/pop3_rdlist.c: New file.
21894	* libproto/pop/pop3_uidl_cmd.c: New file.
21895	* libproto/pop/pop3_uidlas.c: New file.
21896	* libproto/pop/Makefile.am: Add new files.
21897	* libproto/pop/pop3_capa.c (_mu_pop3_fill_list): Remove. Use
21898	mu_pop3_read_list instead.
21899	(capa_comp): New comparator for capa lists.
21900	* libproto/pop/pop3_list.c (mu_pop3_list): Fix format
21901	specifier.
21902	* libproto/pop/pop3_lista.c (mu_pop3_list_all): Rewrite.
21903	* libproto/pop/pop3_retr.c (mu_pop3_retr) <MU_POP3_RETR_RX>: do
21904	not reset state, this is done by the EOF event callback.
21905	* libproto/pop/pop3_top.c (mu_pop3_top) <MU_POP3_TOP_RX>:
21906	Likewise.
21907	* libproto/pop/pop3_stream.c (pop3_decode_state): New state
21908	pds_char. Change semantics of pds_init.
21909	(newstate, _pop3_decoder): Handle .\r\n in the initial state.
21910	(_pop3_event_cb): New event callback.
21911	(mu_pop3_filter_create): Set event callback on the filter
21912	stream.
21913	* libproto/pop/pop3_uidla.c (mu_pop3_uidl_all): Rewrite.
21914	* examples/Makefile.am (pop3client_CPPFLAGS): Add
21915	MU_APP_COMMON_INCLUDES.
21916	* examples/pop3client.c: Rewrite command parser.
21917
219182010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21919
21920	Further fixes in pop3.
21921
21922	* libproto/pop/pop3_create.c (_mu_pop3_init): Fix return value.
21923	* libproto/pop/pop3_destroy.c: Add missing includes.
21924	* libproto/pop/pop3_stream.c (_pop3_decoder): Remove the final
21925	.\r\n altogether.
21926	* mailbox/fltstream.c (filter_read): Remove the hack for
21927	supporting buggy filters.
21928
219292010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21930
21931	Fix TLS support in smtp.
21932
21933	* include/mailutils/tls.h (mu_tls_readline_fn)
21934	(mu_tls_writeline_fn, mu_tls_stream_ctl_fn): Remove typedefs.
21935	(mu_tls_begin): Remove prototype.
21936	* libmu_auth/tls.c (mu_tls_begin): Remove function.
21937	* libproto/mailer/smtp.c: Revamp STARTTLS support.
21938
219392010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
21940
21941	Re-implement pop3 client functions.
21942
21943	* include/mailutils/filter.h (mu_filter_io) <eof>: New member.
21944	* mailbox/fltstream.c (init_iobuf): Initialize eof to 0.
21945	(filter_read): Break the loop if the decoder has set eof.
21946	* mailbox/xscript-stream.c (_xscript_ctl)
21947	<MU_IOCTL_SWAP_STREAM>: Handle a special case when the
21948	transport does not support stream swapping.
21949	* include/mailutils/pop3.h (mu_pop3_set_debug): Remove.
21950	(MU_POP3_TRACE_CLR, MU_POP3_TRACE_SET, MU_POP3_TRACE_QRY): New
21951	macros.
21952	(mu_pop3_trace): New proto.
21953	(mu_pop3_readline): Remove.
21954	(mu_pop3_getline): New proto.
21955	(mu_pop3_capa): Change signature.
21956	* include/mailutils/sys/pop3.h (mu_pop3_state): Remove the
21957	*_ACK states.
21958	(mu_pop3_work_buf): Remove.
21959	(MU_POP3_ACK, MU_POP3_TRACE): New defines.
21960	(_mu_pop3): Rewrite the structure.
21961	(mu_pop3_debug_cmd, mu_pop3_debug_ack): Remove functions.
21962	(MU_POP3_FISSET, MU_POP3_FSET, MU_POP3_FCLR): New macros.
21963	(_mu_pop3_trace_enable, _mu_pop3_trace_disable)
21964	(_mu_pop3_init): New protos.
21965	* include/mailutils/tls.h (mu_tls_stream_ctl_fn)
21966	(mu_tls_writeline_fn): Change typedefs.
21967	* libmu_auth/tls.c (mu_tls_begin): Update function calls
21968	accordingly.
21969	* libproto/pop/pop3_debug.c: Remove.
21970	* libproto/pop/pop3_trace.c: New function.
21971	* libproto/pop/Makefile.am (libmu_pop_la_SOURCES): Temporarly
21972	comment out folder.c, mbox.c and url.c. Remove pop3_debug.c.
21973	Add pop3_trace.c.
21974	* libproto/pop/pop3_capa.c: Rewrite.
21975	* libproto/pop/pop3_create.c: Rewrite.
21976	* libproto/pop/pop3_iterator.c: Rewrite.
21977	* libproto/pop/pop3_response.c: Rewrite.
21978	* libproto/pop/pop3_sendline.c: Rewrite.
21979	* libproto/pop/pop3_stls.c: Rewrite.
21980	* libproto/pop/pop3_stream.c: Rewrite.
21981	* libproto/pop/pop3_apop.c: Reflect changes to the pop3
21982	framework.
21983	* libproto/pop/pop3_carrier.c: Likewise.
21984	* libproto/pop/pop3_connect.c: Likewise.
21985	* libproto/pop/pop3_dele.c: Likewise.
21986	* libproto/pop/pop3_destroy.c: Likewise.
21987	* libproto/pop/pop3_disconnect.c: Likewise.
21988	* libproto/pop/pop3_list.c: Likewise.
21989	* libproto/pop/pop3_lista.c: Likewise.
21990	* libproto/pop/pop3_noop.c: Likewise.
21991	* libproto/pop/pop3_pass.c: Likewise.
21992	* libproto/pop/pop3_quit.c: Likewise.
21993	* libproto/pop/pop3_retr.c: Likewise.
21994	* libproto/pop/pop3_readline.c: Likewise.
21995	* libproto/pop/pop3_rset.c: Likewise.
21996	* libproto/pop/pop3_stat.c: Likewise.
21997	* libproto/pop/pop3_top.c: Likewise.
21998	* libproto/pop/pop3_uidl.c: Likewise.
21999	* libproto/pop/pop3_uidla.c: Likewise.
22000	* libproto/pop/pop3_user.c: Likewise.
22001	* examples/pop3client.c: Implement the stls command.
22002	(main) [WITH_TLS]: Call mu_init_tls_libs.
22003	(com_verbose): Redo verbose support.
22004	(com_capa): Implement "reread" option.
22005
220062010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22007
22008	Reorganize directory tree.
22009
22010	Move libproto/include/(*)0.h to include/mailutils/sys/\1.h
22011	Remove libproto/include.
22012
220132010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22014
22015	Remove unused constants.
22016
22017	* pop3d/pop3d.h (POP_MAXCMDLEN, BUFFERSIZE): Remove constants.
22018	(_QNX_SOURCE): Remove define.
22019
220202010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22021
22022	pop3d: bugfixes.
22023
22024	* pop3d/apop.c (pop3d_apopuser, pop3d_apopuser): Remove
22025	statically allocated buffers.
22026	* pop3d/pop3d.c (pop3d_mainloop): Likewise.
22027	* pop3d/user.c (pop3d_begin_session): Likewise.
22028
220292010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22030
22031	pop3d: optimize apop support.
22032
22033	* pop3d/apop.c (pop3d_apopuser): Fix highly ineffective
22034	resource usage in both branches.
22035	* pop3d/pop3d.c: Remove misleading comment.
22036
220372010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22038
22039	Re-implement GSASL support.
22040
22041	* libmu_auth/lbuf.c: Removed.
22042	* libmu_auth/lbuf.h: Removed.
22043	* libmu_auth/Makefile.am : Remove lbuf stuff.
22044	* include/mailutils/sys/gsasl-stream.h: New file.
22045	* include/mailutils/sys/Makefile.am: Add gsasl-stream.h.
22046	* include/mailutils/gsasl.h (mu_gsasl_stream_create): Remove.
22047	(gsasl_encoder_stream, gsasl_decoder_stream): New prototypes.
22048	* libmu_auth/gsasl.c: Rewrite.
22049	* imap4d/authenticate.c (auth_data): Remove. Use struct
22050	imap4d_auth instead.
22051	(_auth_try): Use new authentication API.
22052	(imap4d_authenticate): Likewise.
22053	* imap4d/imap4d.h (util_register_event, util_event_remove)
22054	(util_run_events): Remove.
22055	(imap4d_auth_handler_fp): Change prototype.
22056	(imap4d_auth): New struct.
22057	(imap4d_auth_result): New enum.
22058	* imap4d/io.c (io_format_completion_response)
22059	(io_stream_completion_response): New functions.
22060	(io_completion_response): Rewrite using
22061	io_format_completion_response.
22062	* imap4d/util.c (sc2string): Remove leftover prototype.
22063	(util_register_event, util_event_remove)
22064	(util_run_events): Remove.
22065	* imap4d/auth_gsasl.c: Revamp using new streams and the new
22066	authentication interface.
22067	* imap4d/auth_gss.c: Likewise (though yet untested).
22068	* mailbox/xscript-stream.c (_xscript_ctl): Remove unused
22069	variables.
22070
220712010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22072
22073	Port the new I/O scheme from pop3d to imap4d.
22074
22075	* mailbox/fltstream.c (filter_wr_flush): Fix erroneous
22076	conditional.
22077	(filter_wait): New method.
22078	(mu_filter_stream_create): Set wait method.
22079	* imap4d/io.c: New source.
22080	* imap4d/Makefile.am: Add io.c
22081	* imap4d/*: Update I/O function calls.
22082
220832010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22084
22085	Minor change.
22086
22087	* pop3d/extra.c (pop3d_setio): Use the canonic name of the CRLF
22088	filter, instead of the legacy "rfc822".
22089	* imap4d/fetch.c: Likewise.
22090	* imap4d/util.c: Likewise.
22091
220922010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22093
22094	Implement an ioctl for replace bottom-level transport layers in
22095	a stream chain.
22096
22097	* include/mailutils/stream.h (MU_IOCTL_SWAP_STREAM): New ioctl
22098	op.
22099	(mu_stream_seterr): New function.
22100	* include/mailutils/sys/stream.h (_MU_SWAP_FIRST_ONLY)
22101	(_MU_SWAP_IOCTL_MUST_SUCCEED): New defines.
22102	(_mu_stream_swap_streams): New proto.
22103	* mailbox/amd.c (amd_body_stream_read): Always update *pnread.
22104	* mailbox/errors (MU_ERR_NO_TRANSPORT): New error code.
22105	* mailbox/stream.c (_stream_seterror): Rename to
22106	mu_stream_seterr, remove static qualifier. All uses updated.
22107	(_mu_stream_swap_streams): New function.
22108	* mailbox/filter_iconv.c (_icvt_ioctl): Implement
22109	MU_IOCTL_SWAP_STREAM.
22110	* mailbox/iostream.c (_iostream_ctl): Likewise.
22111	* mailbox/xscript-stream.c (_xscript_ctl): Likewise.
22112	* pop3d/extra.c (real_istream, real_ostream): Remove statics.
22113	(pop3d_init_tls_server): Use MU_IOCTL_SWAP_STREAM to replace
22114	bottom-level transport layers without recreating the entire
22115	stream chain.
22116
221172010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22118
22119	Redo the support for transport-based streams.
22120
22121	If a stream takes another stream(s) as a transport, it always
22122	increases its reference count. This means that when that stream
22123	is destroyed the underlying stream is not destroyed by default
22124	(its refcount is decreased, that's all). To force destruction
22125	of the underlying stream, the caller must explicitly
22126	unreference it after creating the stream that uses it (or give
22127	its creation function the MU_STREAM_AUTOCLOSE flag, if it
22128	supports flags).
22129
22130	Similarly, if a stream uses a non-stream object (e.g. a file
22131	descriptor) as the transport, it will not destroy it, unless it
22132	has been created with the MU_STREAM_AUTOCLOSE flag. This
22133	differs from the previous behavior.
22134
22135	The MU_STREAM_NO_CHECK and MU_STREAM_NO_CLOSE flags are
22136	removed.
22137
22138	* examples/base64.c (main): Call mu_filter_create with the
22139	MU_STREAM_AUTOCLOSE flag.
22140	* examples/mimetest.c (message_display_parts): Likewise.
22141	* examples/murun.c (main): Unref the input stream after passing
22142	it to mu_filter_prog_stream_create.
22143	* imap4d/fetch.c (fetch_io): Update arguments to
22144	mu_filter_create and mu_memory_stream_create.
22145	* imap4d/preauth.c (decode64_buf)
22146	(do_preauth_ident): Update arguments to mu_memory_stream_create
22147	and mu_tcp_stream_create.
22148	* imap4d/util.c (util_setio): Update arguments to
22149	mu_filter_create and mu_stdio_stream_create.
22150	* include/mailutils/stream.h (MU_STREAM_NO_CLOSE)
22151	(MU_STREAM_NO_CHECK): Remove.
22152	(MU_STREAM_AUTOCLOSE): New flag.
22153	(mu_iostream_create): Remove the `flags' argument.
22154	* libmu_argp/muinit.c (mu_app_init): Update arguments to
22155	mu_stdio_stream_create.
22156	* libmu_auth/ldap.c: Update arguments to
22157	mu_memory_stream_create and mu_filter_create.
22158	* libmu_auth/tls.c (_tls_io_close, _tls_close): Always try to
22159	close the transport stream. Rely on refcount to protect it.
22160	(_tls_io_done, _tls_done): Likewise, always unreference it.
22161	(_mu_tls_io_stream_create): Increase reference counter on the
22162	transport stream, unless MU_STREAM_AUTOCLOSE is requested.
22163	(_mu_tls_stream_create): Rewrite using the new
22164	MU_STREAM_AUTOCLOSE logic.
22165	* libmu_sieve/extensions/spamd.c (spamd_connect_tcp): Update
22166	arguments to mu_tcp_stream_create.
22167	(spamd_connect_tcp): Update arguments to
22168	mu_socket_stream_create and mu_filter_create.
22169	* libmu_sieve/extensions/vacation.c (build_mime): Update
22170	arguments to mu_filter_create.
22171	* mail/decode.c (display_submessage): Update arguments to
22172	mu_filter_create.
22173	* mailbox/attachment.c (mu_message_save_attachment): Update
22174	arguments to mu_filter_create.
22175	* mailbox/cfg_driver.c (mu_cfg_tree_reduce): Update arguments
22176	to mu_stdio_stream_create.
22177	* mailbox/dbgstream.c (_dbg_done): Use MU_STREAM_AUTOCLOSE bit
22178	to decide whether to destroy the debug object.
22179	(mu_dbgstream_create): Use MU_STREAM_AUTOCLOSE instead of
22180	MU_STREAM_NO_CLOSE.
22181	* mailbox/file_stream.c (fd_close): Use MU_STREAM_AUTOCLOSE bit
22182	to decide whether to close the descriptor.
22183	(mu_file_stream_create): Force MU_STREAM_AUTOCLOSE bit.
22184	* mailbox/filter.c (filter_create_rd, filter_create_wr): Change
22185	substream creation logic.
22186	* mailbox/filter_iconv.c (_icvt_close): Always try to close the
22187	transport stream. Rely on refcount to protect it.
22188	(_icvt_done): Ditto for destroying it.
22189	(mu_filter_iconv_create): Increase refcount on the transport
22190	stream, unless MU_STREAM_AUTOCLOSE is requested.
22191	* mailbox/fltstream.c (filter_done): Always dereference the
22192	transport stream. Rely on refcount to protect it.
22193	(filter_close): Ditto for closing it.
22194	(mu_filter_stream_create): Increase refcount on the transport
22195	stream, unless MU_STREAM_AUTOCLOSE is requested.
22196	* mailbox/iostream.c (_iostream_close) : Always try to close
22197	the transport stream. Rely on refcount to protect it.
22198	(_iostream_done): Ditto for closing it.
22199	(mu_iostream_create): Remove the use of MU_STREAM_NO_CLOSE.
22200	* mailbox/mimehdr.c (mu_mimehdr_decode_param): Remove the use
22201	of MU_STREAM_NO_CLOSE.
22202	* mailbox/mutil.c (mu_decode_filter) Change substream creation
22203	logic.
22204	* mailbox/prog_stream.c (_prog_open): Use MU_STREAM_AUTOCLOSE
22205	bit in arguments to mu_stdio_stream_create.
22206	(mu_filter_prog_stream_create): Increase refcount on the
22207	transport (input) stream.
22208	* mailbox/rfc2047.c (mu_rfc2047_decode): Dereference in_stream
22209	after passing it to mu_decode_filter. Pass MU_STREAM_AUTOCLOSE
22210	in flags to mu_filter_create.
22211	* mailbox/socket_stream.c (mu_socket_stream_create): Force
22212	MU_STREAM_AUTOCLOSE bit.
22213	* mailbox/streamref.c (_streamref_close): Always close the
22214	transport stream (refcount will protect it, if necessary).
22215	(mu_streamref_create_abridged): Mask out the
22216	MU_STREAM_AUTOCLOSE bit.
22217	* mailbox/temp_file_stream.c (mu_temp_file_stream_create: Force
22218	MU_STREAM_AUTOCLOSE bit.
22219	* mailbox/xscript-stream.c (_xscript_close): Always close the
22220	transport stream (refcount will protect it, if necessary).
22221	(mu_xscript_stream_create): Increase refcounts on both
22222	underlying streams, unless MU_STREAM_AUTOCLOSE is set.
22223	* pop3d/extra.c (pop3d_setio): Remove uses of
22224	MU_STREAM_NO_CLOSE.
22225	* examples/nntpclient.c: Remove uses of
22226	MU_STREAM_NO_CHECK/MU_STREAM_NO_CLOSE.
22227	* examples/pop3client.c: Likewise.
22228	* libmu_auth/gsasl.c: Likewise.
22229	* libproto/nntp/nntp_stream.c: Likewise.
22230	* libproto/pop/pop3_stream.c: Likewise.
22231	* mailbox/tcp.c: Likewise.
22232	* mailbox/vartab.c: Likewise.
22233	* mh/mh_list.c: Likewise.
22234	* mimeview/mimeview.c: Likewise.
22235	* mh/mhn.c: Likewise.
22236	(edit_mime): Use MU_STREAM_AUTOCLOSE.
22237
22238	Bugfixes:
22239	* mailbox/fltstream.c (init_iobuf): Fix input initialization.
22240	(filter_write_internal): Bugfix.
22241	* mailbox/stream.c (_stream_buffer_freespace): New macro.
22242	(_stream_buffer_is_full): New macro.
22243	(BUFFER_FULL_P): Remove, use _stream_buffer_is_full instead.
22244	All callers updated.
22245	(_stream_flush_buffer): Operation for full buffered streams
22246	does not depend on the `all' flag.
22247	(mu_stream_write): Fix calculation of the bytes available in
22248	the buffer.
22249
222502010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22251
22252	Add a framework for printing I/O transcripts; modify pop3d to
22253	use it.
22254
22255	* include/mailutils/stream.h (MU_STREAM_RDTHRU)
22256	(MU_STREAM_WRTHRU,MU_IOCTL_SET_TRANSPORT): New flags.
22257	(mu_xscript_stream_create, mu_iostream_create)
22258	(mu_dbgstream_create): New prototypes.
22259	* include/mailutils/sys/dbgstream.h: New header.
22260	* include/mailutils/sys/iostream.h: New header.
22261	* include/mailutils/sys/xscript-stream.h: New header.
22262	* include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add
22263	dbgstream.h, iostream.h and xscript-stream.h
22264	* mailbox/dbgstream.c: New file.
22265	* mailbox/iostream.c: New file.
22266	* mailbox/xscript-stream.c: New file.
22267	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add
22268	dbgstream.c, iostream.c and xscript-stream.c
22269	* mailbox/filter_iconv.c (_icvt_ioctl): Simplify the
22270	declaration of ptrans.
22271	* mailbox/mapfile_stream.c (_mapfile_ioctl): Likewise.
22272	* mailbox/memory_stream.c (_memory_ioctl): Likewise.
22273	* mailbox/prog_stream.c (_prog_ioctl): Likewise.
22274	* mailbox/tcp.c (_tcp_ioctl): Likewise.
22275	* mailbox/fltstream.c (filter_ctl): Likewise.
22276	(filter_read_through, filter_write_through): New methods.
22277	(mu_filter_stream_create): Allow for use of MU_STREAM_RDTHRU
22278	and MU_STREAM_WRTHRU to create two-way filters (writing
22279	triggers filtering while reading is transparent or vice versa).
22280	* pop3d/extra.c (istream, ostream): Remove globals.
22281	(iostream): New variable.
22282	(real_istream, real_ostream): New variables.
22283	(pop3d_setio): Set transcript stream on top of the I/O one, if
22284	required.
22285	(pop3d_init_tls_server): Rewrite. Revert the meaning of the
22286	return code to match the usual convention (0 - success).
22287	(transcript): Removed.
22288	(pop3d_outf): Remove calls to transcript.
22289	* pop3d/pop3d.h (istream, ostream): Remove externs.
22290	(iostream): New extern.
22291	* pop3d/retr.c: Use iostream, instear of ostream.
22292	* pop3d/top.c: Likewise.
22293	* pop3d/stls.c: Update the call to pop3d_init_tls_server.
22294	* mailbox/stream_vprintf.c (mu_stream_vprintf): Fix return
22295	value to match the usual convention.
22296
222972010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22298
22299	Re-implement server TLS support.
22300
22301	STLS in pop3d is already working.
22302
22303	* include/mailutils/sys/tls-stream.h: New header.
22304	* include/mailutils/tls.h (mu_tls_stream_create)
22305	(mu_tls_stream_create_client)
22306	(mu_tls_stream_create_client_from_tcp): Remove.
22307	(mu_tls_server_stream_create, mu_tls_client_stream_create): New
22308	protos.
22309	* libmu_auth/tls.c: Rewrite.
22310	* imap4d/util.c: Use mu_tls_server_stream_create.
22311	* libproto/pop/mbox.c: Use mu_tls_server_stream_create/
22312	mu_tls_client_stream_create.
22313	* libproto/pop/pop3_stls.c: Use mu_tls_client_stream_create.
22314	* libproto/imap/folder.c: Use mu_tls_client_stream_create.
22315	* pop3d/capa.c (pop3d_capa): CAPA is allowed in both states.
22316	* pop3d/extra.c (pop3d_setio): Rewrite.
22317
223182010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22319
22320	amd, pop3d: bugfixes.
22321
22322	* mailbox/amd.c (amd_body_stream_readdelim): Fix the logic.
22323	* mailbox/message.c (_message_stream_seek): Fix seeks in
22324	backward direction.
22325	* pop3d/top.c: Fix output of the body.
22326
223272010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22328
22329	Bugfix.
22330
22331	* imap4d/append.c: Add a comment.
22332	* imap4d/imap4d.h (imap4d_child_signal_setup): New proto.
22333	* libmu_sieve/extensions/pipe.c (sieve_action_pipe): Use
22334	mu_stream_copy, rewrite error handling.
22335	* libmu_sieve/extensions/spamd.c (spamd_send_message): se
22336	mu_stream_copy.
22337	(spamd_test): Honor dry-run mode.
22338	* libmu_sieve/extensions/vacation.c (build_mime): Remove
22339	misleading FIXME. Use mu_stream_copy.
22340	* libmu_sieve/extensions/moderator.c
22341	(moderator_message_get_part): Use mu_body_get_streamref.
22342	* examples/header.c (hstream): New global.
22343	(cmd_load, cmd_free, cmd_remove, cmd_insert): Discard hstream.
22344	(cmd_readline): Use hstream. Obtain it using
22345	mu_stream_readline.
22346	* libproto/mbox/mbox.c (mbox_envelope_date): Remove trailing
22347	newline from the obtained envelope line.
22348	* mailbox/amd.c (amd_body_stream_seek): Allow for off == size
22349	(important for empty bodies).
22350
223512010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22352
22353	libmu_sieve: cleanup.
22354
22355	* libmu_sieve/actions.c (mime_create_quote): Use
22356	mu_stream_copy.
22357
223582010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22359
22360	pop3d: cleanup.
22361
22362	* pop3d/pop3d.h: Include filter.h.
22363	(istream, ostream): New externs.
22364	* pop3d/extra.c (pop3d_setio): Set a crlf filter on the output
22365	stream. This allows to forget about \r in the rest of the code.
22366	* pop3d/retr.c (pop3d_retr): Use mu_stream_copy instead of
22367	copying streams manually.
22368	* pop3d/top.c (pop3d_top): Rewrite using streamrefs and
22369	mu_stream_copy.
22370	* all sources: Use \n instead of \r\n in output strings.
22371
223722010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22373
22374	Fix mime creation and Sieve reject/redirect actions.
22375
22376	* examples/mta.c (finalize_option): New variable.
22377	(message_finalize): Don't modify the message if finalize_option
22378	is 0.
22379	* include/mailutils/sys/message.h (_mu_message)
22380	<orig_header_size>: New member.
22381	* include/mailutils/sys/mime.h (_mu_mime) <part_stream>: New
22382	member.
22383	* libmu_sieve/actions.c (mime_create_reason)
22384	(mime_create_ds): Use mu_body_get_streamref.
22385	(mime_create_quote): Use
22386	mu_body_get_streamref/mu_message_get_streamref.
22387	(sieve_action_reject): Set the To: header.
22388	* mailbox/message.c (mu_message_get_header): Set
22389	orig_header_size.
22390	(mu_message_get_body): Use orig_header_size instead of relying
22391	on mu_header_size.
22392	* mailbox/mime.c (_mime_part_size): New static.
22393	(_mime_body_stream_size): New method.
22394	(_mime_body_seek): Rename to _mime_body_stream_seek.
22395	(_mime_body_read): Rewrite and rename to
22396	_mime_body_stream_read.
22397	(_mime_body_ioctl): Rename to _mime_body_stream_ioctl.
22398	(create_mime_body_stream): Take mu_mime_t as the 2nd parameter.
22399	Initialize sp->stream.size and sp->mime.
22400	(_mime_body_size): Rewrite using _mime_part_size.
22401	(mu_mime_destroy): Destroy part_stream.
22402	* sieve/testsuite/Redirect: Reflect new mta behavior.
22403	* sieve/testsuite/Reject: Likewise.
22404
224052010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22406
22407	Further bugfixes.
22408
22409	* libproto/mbox/mbox.c (_msg_stream_setup): Fix abridgment
22410	limits.
22411	(mbox_expunge_unlocked): Don't write extra newline after each
22412	message.
22413	* mailbox/stream.c (mu_stream_seek): ESPIPE does not constitute
22414	a permanent error.
22415
224162010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22417
22418	Fix mime test.
22419
22420	* mailbox/mime.c (mu_mime_get_part): Fix the end limit for the
22421	part's abridgment.
22422	* mailbox/streamref.c (_streamref_seek): Fix ESPIPE condition.
22423
224242010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22425
22426	pop3d: bugfixes.
22427
22428	* include/mailutils/message.h (mu_message_set_stream): Mark as
22429	deprecated.
22430	* pop3d/retr.c (pop3d_retr): Rewind the stream obtained from
22431	mu_message_get_stream.
22432	* pop3d/top.c (pop3d_top): Rewind the streams obtained from
22433	mu_body_get_stream and mu_header_get_stream.
22434
224352010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22436
22437	Fix encode2047 test.
22438
22439	* mailbox/base64.c (_base64_encoder): Fix the use of
22440	uninitialized variable.
22441	* mailbox/rfc2047.c (mu_rfc2047_encode): Rewind the input
22442	stream before reading from it.
22443
224442010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22445
22446	Fix decode2047 test.
22447
22448	* mailbox/filter_iconv.c (mu_filter_iconv_create): Set filter
22449	flags.
22450	* mailbox/fltstream.c (mu_filter_stream_create): Likewise.
22451	* mailbox/qpflt.c (_qp_decoder): Handle '_'.
22452
224532010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22454
22455	Fix base64 test.
22456
22457	* examples/base64.c (c_copy): Handle printable mode (-p).
22458	(reset_line_length): New function.
22459	(main): New option -lN sets the maximum length for output lines
22460	to N (0 means unlimited).
22461	* mailbox/testsuite/mailbox/base64.exp: Use -l0 in the Decode
22462	test.
22463
224642010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22465
22466	Bugfixes.
22467
22468	* include/mailutils/header.h (mu_header_invalidate): New proto.
22469	* mailbox/header.c (mu_header_invalidate): New function.
22470	* libmu_argp/muinit.c (get_canonical_name): Avoid coredumping
22471	if argp_program_version is NULL.
22472	* mailbox/base64.c (mu_base64_decode): Fix inconsistent return
22473	code.
22474	* mailbox/debug.c (mu_debug_destroy): Allow for debug->stream
22475	== NULL.
22476	* mailbox/mapfile_stream.c (_mapfile_truncate): Incorrect size
22477	was used when unmapping.
22478	* mailbox/message.c (mu_message_create_copy): Use a temporary
22479	memory stream.
22480	(mu_message_get_body): Comment out the check for
22481	MESSAGE_INTERNAL_STREAM.
22482	(_message_get_stream): Initialize message header and body.
22483	* mailbox/progmailer.c (mu_progmailer_send): Check return from
22484	the mu_header_get_streamref.
22485	* mailbox/stream.c (_stream_scandelim, _stream_readdelim): If
22486	size is 0, return MU_ERR_BUFSPACE.
22487
224882010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22489
22490	Fix readmsg.
22491
22492	Readmsg passes all tests successfully.
22493
22494	* readmsg/msglist.c (msglist): Check return from
22495	mu_message_get_streamref.
22496	* readmsg/readmsg.c (print_header, print_body): Check return
22497	values.
22498
224992010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22500
22501	Bugfixes.
22502
22503	* mailbox/header.c (header_seek): Do not dereference
22504	hstr->hdr->size directly, because it may not be initialized
22505	yet. Use mu_header_size instead.
22506	* mailbox/message.c (_message_stream_readdelim): Break the loop
22507	if mu_stream_readdelim returned error or EOF.
22508
225092010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22510
22511	Various fixes in imap4d.
22512
22513	Imap4d successfully passes all tests.
22514
22515	* imap4d/close.c (imap4d_close0): Fix improper use of
22516	MU_STREAM_READ (flags changed their semantics since then).
22517	* imap4d/fetch.c: Send \n terminated lines, rely on filters to
22518	recode line terminators to \r\n.
22519	(fetch_io): Rewrite using CRLF encoder and util_copy_out.
22520	(_frt_header_fields): Rewind memory stream before reading from
22521	it.
22522	* imap4d/auth_gsasl.c: Send \n terminated lines, rely on
22523	filters to recode line terminators to \r\n.
22524	* imap4d/auth_gss.c: Likewise.
22525	* imap4d/capability.c: Likewise.
22526	* imap4d/copy.c: Likewise.
22527	* imap4d/id.c: Likewise.
22528	* imap4d/idle.c: Likewise.
22529	* imap4d/list.c: Likewise.
22530	* imap4d/namespace.c: Likewise.
22531	* imap4d/preauth.c: Likewise.
22532	* imap4d/search.c: Likewise.
22533	* imap4d/status.c: Likewise.
22534	* imap4d/store.c: Likewise.
22535	* imap4d/select.c: Likewise.
22536	(imap4d_select_status): Fix improper use of MU_STREAM_READ.
22537	* imap4d/util.c: Send \n terminated lines, rely on filters to
22538	recode line terminators to \r\n.
22539	(util_setio): Apply CRLF filters to both input and output
22540	streams (in opposite directions).
22541	(util_copy_out): New function.
22542	(remove_cr): Remove.
22543	* imap4d/imap4d.h (util_copy_out): New prototype.
22544
225452010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22546
22547	Fix for mbox read/write consistency.
22548
22549	* libproto/mbox/mbox.c (append_message_to_stream): Add \n after
22550	each message (scanner relies on this to determine message
22551	sizes).
22552
225532010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22554
22555	Bugfixes in stream-related code.
22556
22557	* mailbox/fltstream.c (filter_read): Do not try to get more
22558	input until the output buffer is drained.
22559	* mailbox/mapfile_stream.c (_mapfile_seek): Fix conditional.
22560	* mailbox/stream.c (_stream_fill_buffer): Fix increment.
22561	(mu_stream_skip_input_bytes): Bugfixes.
22562
225632010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22564
22565	Implement seek on filters in read-only mode.
22566
22567	* include/mailutils/stream.h (mu_stream_skip_input_bytes): New
22568	proto.
22569	* mailbox/stream.c (mu_stream_skip_input_bytes): New function.
22570	* mailbox/fltstream.c (filter_seek): Re-implement on top of
22571	mu_stream_skip_input_bytes.
22572	(mu_filter_stream_create): Fix flag validity checking.
22573	* examples/base64.c: Add new option (-s) for testing seek
22574	operations on filters.
22575
225762010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22577
22578	Make version output of the MH utilities more informative.
22579
22580	* mh/mh_argp.c [MU_ALPHA_RELEASE}: Include git-describe.h
22581	(mh_program_version_hook): New function.
22582	(mh_argp_init): Take no arguments. Set
22583	argp_program_version_hook.
22584	* mh/mh_getopt.h (ARG_LICENSE): Remove.
22585	(mh_argp_init): Change proto.
22586
22587	All sources: Fix calls to mh_argp_init, remove --license
22588	option.
22589
225902010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22591
22592	For alpha version, include git tag info in the version output.
22593
22594	* include/mailutils/libargp.h (mu_program_version_hook): New
22595	proto.
22596	* libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove
22597	mu_argp.h.
22598	* libmu_argp/mu_argp.h: Remove.
22599	* libmu_argp/muinit.c [MU_ALPHA_RELEASE]: Include
22600	git-describe.h
22601	(mu_program_version_hook): New function.
22602	(mu_argp_init): Set mu_program_version_hook, unless vers is
22603	given.
22604	* comsat/comsat.c (main): Call mu_argp_init with NULL
22605	arguments.
22606	* config/mailutils-config.c: Likewise.
22607	* dotlock/dotlock.c: Likewise.
22608	* examples/muauth.c: Likewise.
22609	* frm/frm.c: Likewise.
22610	* frm/from.c: Likewise.
22611	* guimb/main.c: Likewise.
22612	* imap4d/imap4d.c: Likewise.
22613	* maidag/maidag.c: Likewise.
22614	* mail/mail.c: Likewise.
22615	* messages/messages.c: Likewise.
22616	* mimeview/mimeview.c: Likewise.
22617	* movemail/movemail.c: Likewise.
22618	* pop3d/pop3d.c: Likewise.
22619	* pop3d/popauth.c: Likewise.
22620	* readmsg/readmsg.c: Likewise.
22621	* sieve/sieve.c: Likewise.
22622
226232010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22624
22625	Fix conditional compilation.
22626
22627	* .gitignore: Add git-describe and git-describe.h.
22628	* Makefile.am (MU_COND_LIBMU_CPP): Replaced with
22629	MU_COND_SUPPORT_CXX
22630	(SUBDIRS): Begin with .
22631	(EXTRA_DIST, BUILT_SOURCES): Add git-describe and
22632	git-describe.h.
22633	(git-describe, git-describe.h): New rules.
22634	(alpha, alphacheck): Use git-describe to produce additional
22635	suffix.
22636	* enable.m4 (MU_ENABLE_SUPPORT): Create an Automake condition.
22637	* configure.ac: Fix MU_ENABLE_SUPPORT calls.
22638	(--without-python): Replace with --disable-python.
22639	* examples/Makefile.am: Disable components based on MU_COND
22640	conditions.
22641	* libproto/Makefile.am: Likewise.
22642	* include/mailutils/Makefile.am (MU_COND_LIBMU_CPP): Replace
22643	with MU_COND_SUPPORT_CXX.
22644	* mailbox/nullrec.c: New file.
22645	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add nullrec.c.
22646	* mail/decode.c: Remove unused variable.
22647	* mailbox/streamref.c: Likewise.
22648
226492010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22650
22651	Simplify stream->seek.
22652
22653	* include/mailutils/sys/stream.h (_mu_stream) <seek>: Remove
22654	the `whence' parameter.
22655	* mailbox/stream.c (mu_stream_seek): Update the seek method
22656	call.
22657	* mailbox/streamref.c (_streamref_seek): Fix the signature.
22658	Remove unnecessary code.
22659	* mailbox/amd.c (amd_body_stream_seek): Likewise.
22660	* mailbox/body.c (_body_seek): Likewise.
22661	* mailbox/file_stream.c (fd_seek): Likewise.
22662	* mailbox/filter_iconv.c (_icvt_seek): Likewise.
22663	* mailbox/fltstream.c (filter_seek): Likewise.
22664	* mailbox/header.c (header_seek): Likewise.
22665	* mailbox/mapfile_stream.c (_mapfile_seek): Likewise.
22666	* mailbox/memory_stream.c (_memory_seek): Likewise.
22667	* mailbox/message.c (_message_stream_seek): Likewise.
22668	* mailbox/message_stream.c (_message_stream_seek): Likewise.
22669	* mailbox/mime.c (_mime_body_seek): Likewise.
22670	* mailbox/stdio_stream.c (stdio_seek): Likewise.
22671
226722010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22673
22674	Improve CRLF filter.
22675
22676	* include/mailutils/filter.h (mu_filter_new_data_t): Change
22677	prototype.
22678	* mailbox/filter.c (mu_filter_create): Reflect the above.
22679	* mailbox/crlfflt.c (crlf_state): New enum.
22680	(_crlf_encoder): Keep state info in xd. Do not modify eventual
22681	input CRLFs.
22682	(alloc_state): New function.
22683	(_rfc822_filter,_crlf_filter): Provide the `newdata' method.
22684
226852010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22686
22687	Bugfixes.
22688
22689	* mailbox/rfc2047.c (mu_rfc2047_decode): Rewind in_stream.
22690	* mailbox/stream.c (_stream_scandelim): Break the loop when the
22691	delimiter is found.
22692	* mailbox/streamref.c (_streamref_readdelim): Take into account
22693	the abridgment.
22694
226952010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22696
22697	Optimize readline/readdelim/getdelim calls.
22698
22699	This speeds up common reading operations by factor of 4-6.
22700
22701	* include/mailutils/stream.h (mu_stream_readdelim): New proto.
22702	* include/mailutils/sys/stream.h (_mu_stream) <readdelim>: New
22703	method.
22704	* mailbox/stream.c (_stream_scandelim, _stream_readdelim): New
22705	functions.
22706	(mu_stream_readdelim): New function.
22707	(mu_stream_readline): Rewrite using mu_stream_readdelim.
22708	(mu_stream_getdelim): Optimize.
22709	* mailbox/amd.c (amd_body_stream_readdelim): New function.
22710	(_amd_attach_message): Set the readdelim method.
22711	* mailbox/header.c: Add a placeholder for readdelim method.
22712	* mailbox/message.c (_message_stream_readdelim): New function.
22713	(_message_stream_create): Set the readdelim method.
22714	* mailbox/streamref.c (_streamref_readdelim): New function.
22715	(mu_streamref_create_abridged): Set the readdelim method.
22716
227172010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22718
22719	Fix amd.
22720
22721	* mailbox/amd.c (_amd_attach_message): Store body.
22722	(amd_scan_message): Scan the message only if it has been
22723	modified after the last scan. Fix loop condition. Store
22724	mhm->mtime on success.
22725	(amd_message_stream_open): Enforce full buffering.
22726	(amd_body_stream_read): Fix.
22727	(amd_body_stream_seek): Don't call mu_stream_seek on
22728	mhm->stream.
22729
227302010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22731
22732	Bugfixes.
22733
22734	* mailbox/message.c (_check_stream_state): Bugfix.
22735	(_message_stream_seek): Bugfix.
22736	(_message_stream_read): Always try to fill out the buffer.
22737	(_message_stream_create): Set MU_STREAM_SEEK flag bit.
22738
227392010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22740
22741	Bugfix in filter_iconv.
22742
22743	* mailbox/filter_iconv.c (mu_filter_iconv_create): Return the
22744	created stream in *s.
22745
227462010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22747
22748	Keep track of the current offset in the _mu_stream structure.
22749
22750	* include/mailutils/sys/stream.h (_mu_stream)<offset>: New
22751	member.
22752	* mailbox/stream.c (_stream_fill_buffer): Propagate return
22753	value from mu_stream_read_unbuffered.
22754	(_stream_flush_buffer): Use stream->offset. Honor the `all'
22755	argument.
22756	(mu_stream_seek): Rewrite using the `offset' member.
22757	(mu_stream_read_unbuffered)
22758	(mu_stream_write_unbuffered): Update offset.
22759	(mu_stream_readline): Return EINVAL if size is 0.
22760
227612010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22762
22763	Use stringrefs, add some guidelines for further editing.
22764
22765	* comsat/action.c
22766	* imap4d/fetch.c
22767	* imap4d/search.c
22768	* mh/burst.c
22769	* mh/comp.c
22770	* mh/forw.c
22771	* mh/mh_ctx.c
22772	* mh/mh_format.c
22773	* mh/mh_list.c
22774	* mh/mhn.c
22775	* mh/pick.y
22776	* pop3d/retr.c
22777	* pop3d/top.c
22778	* readmsg/msglist.c
22779	* readmsg/readmsg.c
22780
227812010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22782
22783	Fix compilation of libmu_scm.
22784
22785	* libmu_scm/mu_body.c (mu_scm_body_free): Unref the stream.
22786	Return 0.
22787	(mu-body-read-line, mu-body-write): Use stringrefs.
22788	* libmu_scm/mu_mailbox.c (mu-mailbox-get-port): Use stringrefs.
22789	* libmu_scm/mu_message.c (mu-message-copy): Use stringrefs. Use
22790	mu_stream_copy instead of manually copying stream contents.
22791	(mu-message-get-port): Use stringrefs.
22792	* libmu_scm/mu_port.c (mu_port_free): Unref the stream.
22793
227942010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22795
22796	Fix compilation of several example programs.
22797
22798	* examples/header.c: Use streamrefs.
22799	* examples/mimetest.c: Likewise.
22800	* examples/mta.c: Likewise.
22801	* examples/nntpclient.c: Remove an unused variable.
22802
228032010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22804
22805	Fix compilation of mimeview.
22806
22807	* mimeview/mimeview.c (mimeview_fp): Restore the variable.
22808
228092010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22810
22811	Fix UNIX mbox driver and mail utility.
22812
22813	The `mail' and `frm' utilities pass tests.
22814
22815	* include/mailutils/stream.h (mu_stream_err): New proto.
22816	* libproto/mbox/mbox.c (_msg_stream_setup)
22817	(_msg_body_setup): Fix stream abridgment.
22818	(mbox_envelope_date, mbox_envelope_sender): Fix seek position.
22819	(uid_to_stream): Fix invocation of mu_stream_printf.
22820	(append_message_to_stream): Likewise.
22821	(mbox_expunge_unlocked): Rewind tempstr before copying its
22822	contents back to the mailbox.
22823	(mbox_expunge0): Open tempstr.
22824	* libproto/mbox/mbox0.h (_mbox_message)<header_from>: Rename to
22825	envel_from.
22826	<header_from_end>: Rename to envel_from_end. All uses changed.
22827	* libproto/mbox/mboxscan.c: Minor changes.
22828	* mail/decode.c: Use streamrefs.
22829	* mail/escape.c: Likewise.
22830	* mail/msgset.y: Likewise.
22831	* mail/pipe.c: Likewise.
22832	* mail/print.c: Likewise.
22833	* mail/top.c: Likewise.
22834	* mail/write.c: Likewise.
22835	* mail/send.c: Use streamrefs.
22836	(mail_send0): Reset env->header after assigning it to the
22837	message.
22838	* mailbox/body.c (_body_seek): Fix a typo which produced a
22839	recursive call.
22840	* mailbox/file_stream.c (fd_truncate): New function.
22841	(_mu_file_stream_create): Initialize str->stream.truncate.
22842	* mailbox/header.c (header_parse): Fix parsing of blurbs
22843	lacking terminating empty line.
22844	(header_seek): Fix boundary checks. Return new position in
22845	presult.
22846	* mailbox/message.c (string_find_eoh): Rewrite to handle \n\n
22847	split between two successive invocations.
22848	(_header_fill): Update the invocation of string_find_eoh.
22849	* mailbox/stream.c (mu_stream_destroy): Call mu_stream_close.
22850	(mu_stream_get_flags, mu_stream_set_flags)
22851	(mu_stream_clr_flags): Ignore internal bits.
22852	(mu_stream_err): New function.
22853	(mu_stream_close): Close the stream only if it is not used by
22854	anyone else.
22855	* mailbox/streamref.c (_streamref_read): Clear transport error
22856	if ESPIPE is returned.
22857	(_streamref_size): Take into account sp->end and sp->start.
22858	(mu_streamref_create_abridged): Set pointer to 0.
22859
228602010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22861
22862	Bugfixes in stream code.
22863
22864	* mailbox/amd.c (amd_body_stream_seek): Fix boundary checking.
22865	Return ESPIPE on boundary error.
22866	* mailbox/header.c (header_seek): Likewise.
22867	* mailbox/memory_stream.c (_memory_seek): Likewise.
22868	* mailbox/message.c (_message_stream_seek): Likewise.
22869	* mailbox/message_stream.c (_message_seek): Likewise.
22870	* mailbox/stdio_stream.c (stdio_seek): Likewise.
22871	* mailbox/file_stream.c (fd_open): Invert error condition. Fix
22872	computation of open flags. Return immediately if open returns
22873	-1.
22874	(fd_seek): Fix boundary checking. Return ESPIPE on boundary
22875	error.
22876	* mailbox/mapfile_stream.c (_mapfile_open): Fix flags
22877	calculation.
22878	(_mapfile_seek): Fix boundary checking. Return ESPIPE on
22879	boundary error.
22880	* mailbox/streamref.c (_streamref_read): Fix calculation of the
22881	top size boundary. Return 0 bytes if seek returns ESPIPE.
22882	(_streamref_seek): Return ESPIPE on boundary error.
22883	* mailbox/base64.c (_base64_decoder, _base64_encoder): Do not
22884	dereference iobuf if cmd is mu_filter_init or mu_filter_done.
22885	* mailbox/binflt.c (_copy_codec, _bit7_coder): Likewise.
22886	* mailbox/crlfflt.c (_crlf_encoder, _crlf_decoder): Likewise.
22887	* mailbox/linelenflt.c (_ll_encoder): Likewise.
22888	* mailbox/qpflt.c (_qp_decoder, _qp_encoder): Likewise.
22889	* mailbox/mailcap.c (mu_mailcap_parse): Fix loop condition.
22890
228912010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22892
22893	Bugfixes.
22894
22895	* examples/sfrom.c (main): Check return from
22896	mu_mailbox_messages_count.
22897	* include/mailutils/sys/stream.h (_MU_STR_WRT): New constant.
22898	* libproto/mbox/mbox.c (_msg_stream_setup): Fix 3rd argument to
22899	mu_streamref_create_abridged.
22900	* libproto/mbox/mboxscan.c (mbox_scan_internal): Don't use
22901	mailbox->stream directly, because its offsets may get shifted
22902	by observers. Use streamref instead.
22903	* mailbox/argcv.c (argcv_get): Do nothing if argc <= 0.
22904	* mailbox/mapfile_stream.c (_mapfile_seek): Fill the *presult.
22905	* mailbox/memory_stream.c (_memory_done): Remove leftover free.
22906	* mailbox/stream.c: Reorder functions.
22907	(_mu_stream_create): Increase reference count (i.e. set it to
22908	1) before returning.
22909	(mu_stream_seek): Call _stream_flush_buffer instead of
22910	mu_stream_flush.
22911	(mu_stream_read_unbuffered): Return 0 on EOF.
22912	(mu_stream_write_unbuffered): Set _MU_STR_WRT bit.
22913	(mu_stream_readline, mu_stream_getdelim): Check the actual
22914	number of bytes read.
22915	(mu_stream_flush): Call flush method only if _MU_STR_WRT is
22916	set. Clear it.
22917	* mailbox/streamref.c (_streamref_seek): Optimization for
22918	off==0 and whence == MU_SEEK_CUR.
22919	(_streamref_seek): Return new offset in ppos.
22920	(mu_streamref_create_abridged): Set MU_STREAM_NO_CLOSE.
22921	* mailbox/memory_stream.c (_memory_seek) : Return new offset in
22922	presult.
22923	* mailbox/message_stream.c (_message_seek): Likewise.
22924	* mailbox/stdio_stream.c (stdio_seek): Fix prototype.
22925
229262010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
22927
22928	Stream support rewritten from scratch.
22929
22930	Does not compile yet.
22931
22932	New files:
22933
22934	* mailbox/streamref.c
22935	* include/mailutils/sys/streamref.h
22936	* include/mailutils/sys/file_stream.h
22937	* include/mailutils/sys/header_stream.h
22938	* include/mailutils/sys/mapfile_stream.h
22939	* include/mailutils/sys/memory_stream.h
22940	* include/mailutils/sys/message_stream.h
22941	* include/mailutils/sys/prog_stream.h
22942	* include/mailutils/sys/socket_stream.h
22943	* include/mailutils/sys/stdio_stream.h
22944	* include/mailutils/sys/stream.h
22945	* include/mailutils/sys/streamtrans.h
22946	* mailbox/prog_stream.c
22947	* mailbox/stdio_stream.c
22948	* mailbox/stream_printf.c
22949	* mailbox/stream_vprintf.c
22950	* mailbox/temp_file_stream.c
22951	* mailbox/streamcpy.c
22952	* mailbox/binflt.c
22953	* mailbox/crlfflt.c
22954	* mailbox/fltstream.c
22955	* mailbox/qpflt.c
22956	* mailbox/linelenflt.c
22957
22958	Removed files:
22959	* mailbox/filter_rfc822.c
22960	* mailbox/filter_trans.c
22961
22962	Moved files (with edits):
22963	* libproto/include/filter0.h -> include/mailutils/sys/filter.h
22964	* libproto/include/header0.h -> include/mailutils/sys/header.h
22965	* libproto/include/message0.h ->
22966	include/mailutils/sys/message.h
22967	* libproto/include/mime0.h -> include/mailutils/sys/mime.h
22968
22969	Modified files:
22970	* comsat/action.c
22971	* config/mailutils-config.c
22972	* examples/base64.c
22973	* examples/cpp/msg-send.cc
22974	* examples/header.c
22975	* examples/http.c
22976	* examples/iconv.c
22977	* examples/mimetest.c
22978	* examples/msg-send.c
22979	* examples/mta.c
22980	* examples/murun.c
22981	* examples/nntpclient.c
22982	* examples/pop3client.c
22983	* imap4d/append.c
22984	* imap4d/auth_gsasl.c
22985	* imap4d/fetch.c
22986	* imap4d/preauth.c
22987	* imap4d/search.c
22988	* imap4d/util.c
22989	* include/mailutils/body.h
22990	* include/mailutils/folder.h
22991	* include/mailutils/header.h
22992	* include/mailutils/mailbox.h
22993	* include/mailutils/mailer.h
22994	* include/mailutils/mailutils.h
22995	* include/mailutils/message.h
22996	* include/mailutils/stream.h
22997	* include/mailutils/sys/Makefile.am
22998	* include/mailutils/sys/filter.h
22999	* include/mailutils/sys/header.h
23000	* include/mailutils/sys/message.h
23001	* include/mailutils/sys/mime.h
23002	* include/mailutils/sys/nntp.h
23003	* include/mailutils/sys/pop3.h
23004	* include/mailutils/sys/stream.h
23005	* include/mailutils/types.hin
23006	* lib/mailcap.c
23007	* lib/mu_dbm.h
23008	* libmu_argp/muinit.c
23009	* libmu_auth/ldap.c
23010	* libmu_auth/tls.c
23011	* libmu_scm/Makefile.am
23012	* libmu_scm/mu_body.c
23013	* libmu_scm/mu_message.c
23014	* libmu_scm/mu_port.c
23015	* libmu_sieve/actions.c
23016	* libmu_sieve/extensions/pipe.c
23017	* libmu_sieve/extensions/spamd.c
23018	* libmu_sieve/extensions/vacation.c
23019	* libproto/mailer/smtp.c
23020	* libproto/mbox/mboxscan.c
23021	* libproto/mbox/mbox.c
23022	* libproto/mbox/mbox0.h
23023	* libproto/nntp/nntp_article.c
23024	* libproto/nntp/nntp_carrier.c
23025	* libproto/nntp/nntp_destroy.c
23026	* libproto/nntp/nntp_ihave.c
23027	* libproto/nntp/nntp_post.c
23028	* libproto/nntp/nntp_readline.c
23029	* libproto/nntp/nntp_sendline.c
23030	* libproto/pop/pop3_carrier.c
23031	* libproto/pop/pop3_destroy.c
23032	* libproto/pop/pop3_readline.c
23033	* libproto/pop/pop3_sendline.c
23034	* libproto/pop/pop3_stat.c
23035	* maidag/mailtmp.c
23036	* mail/decode.c
23037	* mail/escape.c
23038	* mail/msgset.y
23039	* mail/pipe.c
23040	* mail/print.c
23041	* mail/send.c
23042	* mail/top.c
23043	* mail/util.c
23044	* mail/write.c
23045	* mailbox/Makefile.am
23046	* mailbox/amd.c
23047	* mailbox/attachment.c
23048	* mailbox/body.c
23049	* mailbox/cfg_driver.c
23050	* mailbox/cfg_format.c
23051	* mailbox/debug.c
23052	* mailbox/file_stream.c
23053	* mailbox/folder.c
23054	* mailbox/hdritr.c
23055	* mailbox/header.c
23056	* mailbox/mailbox.c
23057	* mailbox/mailcap.c
23058	* mailbox/mailer.c
23059	* mailbox/mapfile_stream.c
23060	* mailbox/memory_stream.c
23061	* mailbox/message.c
23062	* mailbox/message_stream.c
23063	* mailbox/mime.c
23064	* mailbox/mimehdr.c
23065	* mailbox/mutil.c
23066	* mailbox/prog_stream.c
23067	* mailbox/progmailer.c
23068	* mailbox/rfc2047.c
23069	* mailbox/socket_stream.c
23070	* mailbox/stream.c
23071	* mailbox/stream_vprintf.c
23072	* mailbox/tcp.c
23073	* mailbox/vartab.c
23074	* mailbox/wicket.c
23075	* mh/burst.c
23076	* mh/comp.c
23077	* mh/compcommon.c
23078	* mh/forw.c
23079	* mh/mh_ctx.c
23080	* mh/mh_format.c
23081	* mh/mh_init.c
23082	* mh/mh_list.c
23083	* mh/mh_whatnow.c
23084	* mh/mhl.c
23085	* mh/mhn.c
23086	* mh/pick.y
23087	* mh/repl.c
23088	* mimeview/mimeview.c
23089	* mu-aux/generr.awk
23090	* pop3d/extra.c
23091	* pop3d/pop3d.h
23092	* pop3d/retr.c
23093	* pop3d/top.c
23094	* readmsg/msglist.c
23095	* readmsg/readmsg.c
23096	* sieve/sieve.c
23097
230982010-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
23099
23100	Version 2.2.
23101
23102	* NEWS, configure.ac: Update.
23103
231042010-09-07  Sergey Poznyakoff  <gray@gnu.org.ua>
23105
23106	imap4d: fetch body with a nonempty section spec returns section
23107	body without headers.
23108
23109	* imap4d/fetch.c (fetch_function_closure) <section_tag>: New
23110	member.
23111	(_frt_body_text): Output ffc->section_tag after the section
23112	part by default.
23113	(_frt_header, _frt_mime): Remove.
23114	(_frt_header0): Rewrite as a general-purpose _frt_header
23115	function.
23116	(parse_section_text): Set _frt_header as a driver function and
23117	set section_tag accordingly, instead of selecting
23118	_frt_header/_frt_mime. Set section_tag when selecting
23119	_frt_body_text.
23120	(parse_section): Default to _frt_body_text and fall back to
23121	_frt_body only when an empty section specifier is given.
23122	* imap4d/testsuite/imap4d/fetch.exp: Update accordingly.
23123
231242010-08-26  Sergey Poznyakoff  <gray@gnu.org.ua>
23125
23126	Bugfix.
23127
23128	* mailbox/acl.c (expand_arg): Fix a memory leak.
23129
231302010-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
23131
23132	Minor change.
23133
23134	* examples/mimetest.c (message_display_parts): Remove not
23135	needed locals.
23136
231372010-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
23138
23139	Bugfixes.
23140
23141	* mailbox/mime.c (mu_mime_get_num_parts): Assume MIME message
23142	is not scanned if nmtp_parts are 0 and boundary is NULL.
23143	* mailbox/rfc2047.c (mu_rfc2047_decode): Free the buffer prior
23144	to returning a non-zero status.
23145	* mailbox/message.c (mu_message_destroy): Install a kludge to
23146	work over the sloppy ref semantics.
23147	* mailbox/auth.c (mu_authority_destroy): Free auth_methods
23148	list.
23149	* mailbox/locker.c (destroy_dotlock): Free data.dot.nfslock.
23150
231512010-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>
23152
23153	Minor fix.
23154
23155	* examples/Makefile.am (mta_CPPFLAGS): New variable.
23156
231572010-06-02  Sergey Poznyakoff  <gray@gnu.org.ua>
23158
23159	Implement mu-mailbox-get-size function.
23160
23161	* libmu_scm/mu_mailbox.c (mu-mailbox-get-size): New function.
23162
231632010-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
23164
23165	Fix mailbox corruption in imap4d.
23166
23167	Delivery of a signal when a previous signal was being handled
23168	caused mailbox corruption.
23169
23170	* imap4d/imap4d.c (imap4d_child_signal_setup): New function.
23171	(imap4d_mainloop): Call imap4d_child_signal_setup.
23172	* imap4d/signal.c (imap4d_child_signal): Reset all signal
23173	handlers before doing actual job.
23174	* lib/signal.c (mu_set_signals): Use sigaction.
23175
231762010-05-20  Sergey Poznyakoff  <gray@gnu.org.ua>
23177
23178	Movemail improved.
23179
23180	* movemail/movemail.c: New options: --ignore-errors and
23181	--program-id.
23182	(_compare_msgno): Remove now unneeded static.
23183	(main): Handle --ignore-errors and --program-id settings.
23184	Optimize the main loop for the case when --uidls is given.
23185	Return 1 on errors.
23186	* doc/texinfo/programs.texi: Document new features.
23187
231882010-05-20  Sergey Poznyakoff  <gray@gnu.org.ua>
23189
23190	Allow to use `CALL proc' in MySQL queries.
23191
23192	* sql/mysql.c (mu_mysql_connect): Set CLIENT_MULTI_RESULTS
23193	flag.
23194
231952010-05-18  Sergey Poznyakoff  <gray@gnu.org.ua>
23196
23197	Bugfix.
23198
23199	* mailbox/url.c (_url_path_default): Fix improper use of sizeof
23200	(a typo, probably).
23201
232022010-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>
23203
23204	MH: Improve handling of not implemented options.
23205
23206	* mh/mh_getopt.c (mh_opt_notimpl, mh_opt_notimpl_warning): New
23207	functions.
23208	* mh/mh_getopt.h (mh_opt_notimpl, mh_opt_notimpl_warning): New
23209	protos.
23210	* mh/ali.c (doc): Remove 'not implemented' stanza.
23211	* mh/pick.c: Likewise.
23212	* mh/anno.c: Use mh_opt_notimpl and mh_opt_notimpl_warning for
23213	not implemented options.
23214	* mh/comp.c: Likewise.
23215	* mh/forw.c: Likewise.
23216	* mh/mhn.c: Likewise.
23217	* mh/refile.c: Likewise.
23218	* mh/repl.c: Likewise.
23219	* mh/scan.c: Likewise.
23220	* mh/send.c: Likewise.
23221
232222010-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>
23223
23224	MH: a bugfix.
23225
23226	* mh/mh_global.c (mh_read_profile): Set MU folder directory to
23227	mh_get_dir. This fixes the bug reported by Peter S Galbraith
23228	(Id. <15312.1273667793@mixed>, ref.
23229	http://sourceforge.net/mailarchive/forum.php?thread_name=15904.
23230	1273699954%40mixed&forum_name=mh-e-devel)
23231
232322010-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>
23233
23234	Upgrade gint to a5774356.
23235
232362010-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>
23237
23238	Fix GINT_INIT usage.
23239
23240	* gint: Update to 4e48677eee5a
23241	* configure.ac (--without-guile): Remove option. Handled by
23242	GINT_INIT.
23243	(GINT_INIT): Don't call it within a conditional.
23244
232452010-05-07  Sergey Poznyakoff  <gray@gnu.org.ua>
23246
23247	Minor fix.
23248
23249	* mailbox/rfc2047.c (getword): Initialize *pret to NULL after
23250	freeing it.
23251
232522010-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
23253
23254	Minor change.
23255
23256	* libproto/include/mime0.h (struct _mu_mime): Use size_t for
23257	offsets, ssize_t for line_ndx.
23258
232592010-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
23260
23261	Allow for a sequence of semicolons before kw/value pair in a
23262	structured header.
23263
23264	* mailbox/mimehdr.c (_header_get_param): Skip superfluous
23265	semicolons.
23266
232672010-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
23268
23269	Remove line length limitation in mime parser.
23270
23271	* libproto/include/mime0.h (struct _mu_mime): New member
23272	line_size.
23273	* mailbox/mime.c (_mime_setup_buffers): Use line_size instead
23274	of MIME_MAX_HDR_LEN.
23275	(_mime_parse_mpart_message): Reallocate cur_line as necessary.
23276	(mu_mime_create): Initialize line_size.
23277
232782010-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
23279
23280	Allow for certain class of broken headers.
23281
23282	* mailbox/mimehdr.c (_header_get_param): Tolerate unquoted
23283	value parts which contain tspecials, except ';'.
23284
232852010-04-26  Sergey Poznyakoff  <gray@gnu.org.ua>
23286
23287	Accept additional whitespace and quotes in the disposition part
23288	of MIME headers.
23289
23290	* mailbox/mimehdr.c (disp_segment_len): New function.
23291	(mu_mimehdr_get_disp, mu_mimehdr_aget_disp): Use
23292	disp_segment_len. Unquote the returned string.
23293	(_header_get_param): Allow for whitespace before '"'. Unquote
23294	the string before comparison.
23295
232962010-04-18  Sergey Poznyakoff  <gray@gnu.org.ua>
23297
23298	Bugfix.
23299
23300	* mailbox/cfg_lexer.l (mu_cfg_parse_file): Parse only regular
23301	files.
23302
233032010-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
23304
23305	Fix indirect memory leak in mu_decode_filter.
23306
23307	* include/mailutils/stream.h (mu_stream_clr_flags): New
23308	function.
23309	* mailbox/stream.c (mu_stream_clr_flags): New function.
23310	* mailbox/mapfile_stream.c (_mapfile_open): Avoid unnecessary
23311	boolean operation.
23312	* mailbox/mutil.c (mu_decode_filter): Use mu_stream_clr_flags
23313	to clear bits.
23314
233152010-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
23316
23317	Improve mu_mimehdr_a?get_disp.
23318
23319	* mailbox/mimehdr.c (mu_mimehdr_get_disp)
23320	(mu_mimehdr_aget_disp): Return disposition even if no
23321	parameters have been given.
23322
233232010-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
23324
23325	Fix memory leaks in filter and filter_iconv code.
23326
23327	* mailbox/filter.c (filter_destroy): Destroy the underlying
23328	stream, unless flag is given.
23329	(mu_filter_create): Treat last argument as stream flags.
23330	* mailbox/filter_iconv.c (_icvt_destroy): Free the icvt_stream
23331	structure.
23332	* examples/mimetest.c (message_display_parts): Pass
23333	MU_STREAM_NO_CLOSE to the invocation of mu_filter_create.
23334	* mail/decode.c (display_submessage): Likewise.
23335	* mailbox/attachment.c (mu_message_save_attachment): Likewise.
23336	* mh/mh_list.c (eval_body): Likewise.
23337	* mh/mhn.c (mhn_message_size, show_internal): Likewise.
23338	(finish_text_msg): Likewise; call mu_stream_destroy
23339	* imap4d/preauth.c (decode64_buf): remove unnecessary call to
23340	mu_stream_destroy.
23341	* libmu_auth/ldap.c (chk_md5, chk_smd5)
23342	(chk_sha, chk_ssha): Likewise.
23343	* mailbox/mutil.c: Fix indentation.
23344
233452010-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
23346
23347	Fix memory leak in mu_rfc2047_decode.
23348
23349	* mailbox/rfc2047.c (getword): Change signature; return error
23350	code.
23351	(mu_rfc2047_decode): Reflect the above change.
23352
233532010-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
23354
23355	Further improvements in the Guile-related code.
23356
23357	* gint: Upgrade.
23358	* libmu_scm/Makefile.am: Initialize BUILT_SOURCES.
23359	* libmu_scm/mu_address.c (address_get_fp): Change signature to
23360	match those of mu_address_aget family.
23361	(all functions): Use functions from mu_address_aget family.
23362	Downcase argument names. Refer to them in the docstring using
23363	@var notation.
23364	* libmu_scm/mu_body.c: Downcase argument names. Refer to them
23365	in the docstring using @var notation.
23366	* libmu_scm/mu_logger.c: Likewise.
23367	* libmu_scm/mu_mailbox.c: Likewise.
23368	* libmu_scm/mu_message.c: Likewise.
23369	* libmu_scm/mu_mime.c: Likewise.
23370	* libmu_scm/mu_scm.c: Likewise.
23371	* libmu_scm/mu_util.c: Likewise.
23372
233732010-04-12  Sergey Poznyakoff  <gray@gnu.org.ua>
23374
23375	Migrate Guile support to GINT.
23376
23377	* gint: New module.
23378	* am/guile.m4: Remove.
23379	* mu-aux/guile-doc-snarf: Remove.
23380	* mu-aux/guile-doc-snarf.awk: Remove.
23381	* mu-aux/Makefile.am (EXTRA_DIST): Remove guile-doc-snarf,
23382	guile-doc-snarf.awk
23383	* Makefile.am: Add gint.
23384	* bootstrap.conf: Init gint submodule.
23385	* configure.ac: Rewrite Guile support using GINT_INIT.
23386	(AC_CONFIG_FILES): Add gint/Makefile.
23387	* guimb/scm/Makefile.am (sitedir): Change.
23388	* guimb/scm/Makefile.am: Likewise.
23389	* libmu_scm/Makefile.am: Include ../gint/gint.mk Adjust all
23390	variables. Remove unnecessary rules.
23391	* libmu_scm/mailutils.scm.in: Remove exports and includes.
23392	Remove obsolete code.
23393	* libmu_scm/mu_address.c: Use SCM_DEFINE_PUBLIC to declare
23394	public interfaces.
23395	* libmu_scm/mu_body.c: Likewise.
23396	* libmu_scm/mu_mailbox.c: Likewise.
23397	* libmu_scm/mu_message.c: Likewise.
23398	* libmu_scm/mu_mime.c: Likewise.
23399	* libmu_scm/mu_util.c: Likewise.
23400	* libmu_scm/mu_logger.c: Likewise.
23401	(mu_scm_logger_init): Make all constants public.
23402	* libmu_scm/mu_scm.c: Likewise.
23403	* libmu_scm/mu_guile.c: Use scm_c_catch instead of the obsolete
23404	scm_internal_lazy_catch.
23405
234062010-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
23407
23408	Fix all FIXMEs from b2c1b1ff.  Revise attachment API.
23409
23410	* include/mailutils/message.h (mu_message_save_attachment)
23411	(mu_message_encapsulate, mu_message_unencapsulate): Change type
23412	of the last argument.
23413	(mu_mime_io_buffer_create,mu_mime_io_buffer_destroy)
23414	(mu_mime_io_buffer_set_size,mu_mime_io_buffer_get_size)
23415	(mu_mime_io_buffer_set_charset,mu_mime_io_buffer_sget_charset)
23416	(mu_mime_io_buffer_aget_charset): New prototypes.
23417	(mu_mimehdr_get_disp,mu_mimehdr_aget_disp): Remove unneeded
23418	parameter.
23419	* include/mailutils/types.hin (mu_mime_io_buffer_t): New type.
23420	* mailbox/attachment.c (_msg_info): Rename structure to
23421	_mu_mime_io_buffer.
23422	<header_buf,header_len,mu_header_size>: Remove unreferenced
23423	members.
23424	<refcnt,bufsize,charset>: New members.
23425	<ioffset,ooffset>: Change type to size_t.
23426	(mu_mime_io_buffer_create,mu_mime_io_buffer_destroy)
23427	(mu_mime_io_buffer_set_size,mu_mime_io_buffer_get_size)
23428	(mu_mime_io_buffer_set_charset,mu_mime_io_buffer_sget_charset)
23429	(mu_mime_io_buffer_aget_charset): New functions.
23430	(mu_message_save_attachment)
23431	(mu_message_encapsulate, mu_message_unencapsulate): Take
23432	mu_mime_io_buffer_t as the last argument.
23433	* mailbox/mimehdr.c (mu_mimehdr_get_disp): Remove unneeded
23434	parameter.
23435	(mu_mimehdr_aget_disp): Remove unneeded parameter. Store return
23436	value into pvalue.
23437	* examples/mimetest.c (message_display_parts): Use
23438	mu_mimehdr_aget_disp and mu_mime_io_buffer_* functions.
23439	* mailbox/testsuite/Mime: Update.
23440	* mh/mhn.c (options, opt_handler): New option --charset.
23441	(store_handler): Use mu_message_aget_decoded_attachment_name.
23442
234432010-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
23444
23445	Minor change.
23446
23447	* mailbox/rfc2047.c: Minor style fix.
23448
234492010-04-08  Wojciech Polak  <polak@gnu.org>
23450
23451	Reflect recent RFC compatibility changes in Python/C++.
23452
23453	* examples/python/mimetest.py: Update.
23454	* include/mailutils/cpp/message.h (get_attachment_name):
23455	Overload.
23456	* libmu_cpp/message.cc (Message::get_attachment_name):
23457	Overload.
23458	* python/libmu_py/message.c (api_message_get_attachment_name):
23459	Update.
23460	* python/mailutils/message.py (Message.get_attachment_name):
23461	Add optional charset parameter. Return (name, lang) tuple.
23462
234632010-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
23464
23465	Bugfix in mu_rfc2047_decode.
23466
23467	* mailbox/rfc2047.c (mu_rfc2047_decode): Use temporary buffer
23468	for reading from the filter stream, to avoid preliminary
23469	breaking from the read loop when end of the buffer is reached.
23470	Realloc the buffer as necessary.
23471
234722010-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
23473
23474	Bugfixes.
23475
23476	* mailbox/mimehdr.c (_header_get_param): If buf is NULL on
23477	entry, make sure it always points to allocated memory
23478	afterward.
23479	* examples/mimetest.c (charset): New variable.
23480	(main): New command line option -c.
23481	(message_display_parts): Use
23482	mu_message_aget_decoded_attachment_name. Pass fname to
23483	mu_message_save_attachment.
23484
234852010-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
23486
23487	Improve MIME parameter parsing.
23488
23489	* mailbox/mimehdr.c (_header_get_param): Improve error
23490	checking. Allow for optional whitespace around the '='.
23491	* mailbox/rfc2047.c (mu_rfc2047_decode): tocode=NULL is OK.
23492
234932010-04-06  Sergey Poznyakoff  <gray@gnu.org.ua>
23494
23495	Improve compatibility with RFC 2231 and RFC 2047.
23496
23497	* mailbox/mimehdr.c: New file.
23498	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add
23499	mailbox/mimehdr.c.
23500	* mailbox/attachment.c (_header_get_param)
23501	(_get_attachment_name, mu_message_aget_attachment_name)
23502	(mu_message_get_attachment_name: Move to mailbox/mimehdr.c
23503	(with edits).
23504	(mu_message_save_attachment): Add a FIXME comment.
23505	* include/mailutils/message.h (MU_MIMEHDR_MULTILINE)
23506	(MU_MIMEHDR_CSINFO): New defines.
23507	(mu_mimehdr_get_disp,mu_mimehdr_aget_disp)
23508	(mu_mimehdr_get_param,mu_mimehdr_aget_param)
23509	(mu_mimehdr_decode_param)
23510	(mu_mimehdr_aget_decoded_param): New prototypes.
23511	(mu_message_aget_attachment_name): Change signature.
23512	(mu_message_aget_decoded_attachment_name): New prototype.
23513	* mailbox/mutil.c (mu_hex2ul): Fix a silly bug (have anybody
23514	ever tried to use that function?!?)
23515	* mailbox/testsuite/Urls: Update.
23516	* examples/mimetest.c (message_display_parts): Add a FIXME
23517	comment.
23518	* libmu_cpp/message.cc (Message::get_attachment_name):
23519	Likewise.
23520	* mh/mhn.c (store_handler): Likewise.
23521	* python/libmu_py/message.c (api_message_get_attachment_name):
23522	Likewise.
23523
235242010-04-03  Sergey Poznyakoff  <gray@gnu.org.ua>
23525
23526	Make mu_message_(a?)get_attachment_name RFC-compatible.
23527
23528	* mailbox/attachment.c (_header_get_param): Rewrite.
23529	(_get_attachment_name): New auxiliary function.
23530	(mu_message_aget_attachment_name)
23531	(mu_message_get_attachment_name): Rewrite using
23532	_get_attachment_name.
23533	* mh/mhn.c (store_handler): Use
23534	mu_message_aget_attachment_name.
23535
235362010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23537
23538	Implement mailbox iterators in Scheme.
23539
23540	* libmu_scm/mu_mailbox.c (struct mu_mailbox)<itr>: New member.
23541	(mu_scm_mailbox_free): Destroy the iterator.
23542	(mu_scm_mailbox_create0): Initialize itr to NULL.
23543	(mu-mailbox-first-message, mu-mailbox-next-message)
23544	(mu-mailbox-more-messages?): New function.
23545	* guimb/scm/sieve-core.scm (sieve-run): Rewrite main loop in
23546	the True Schemish Way.
23547
235482010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23549
23550	Implement mailbox iterators.
23551
23552	* include/mailutils/mailbox.h (mu_mailbox_get_iterator): New
23553	function.
23554	* libproto/include/mailbox0.h (struct _mu_mailbox)<iterator>:
23555	New member.
23556	* mailbox/mbxitr.c: New file.
23557	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add mbxitr.c
23558
235592010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23560
23561	Bugfix.
23562
23563	* mailbox/attachment.c (_ISSPECIAL): Fix definition.
23564
235652010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23566
23567	Style fix.
23568
23569	* mailbox/attachment.c: Fix indentation.
23570
235712010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23572
23573	Fix the use of deprecated Guile interfaces in port code.
23574
23575	* am/guile.m4 (MU_CHECK_GUILE): Check for SCM_DEVAL_P et al.
23576	* libmu_scm/mu_guile.c (mu_guile_init): Protect calls to
23577	SCM_DEVAL_P &c. by #ifdef GUILE_DEBUG_MACROS
23578	* libmu_scm/mu_port.c [!HAVE_SCM_T_OFF](scm_t_off): New
23579	typedef.
23580	(mu_port_make_from_stream): Use scm_new_port_table_entry
23581	instead of the deprecated scm_add_to_port_table
23582
235832010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23584
23585	Fix SCM syslog interface.
23586
23587	* libmu_scm/mu_logger.c (log_tag): New static.
23588	(mu-openlog): Preserve log tag in log_tag, because openlog
23589	stores its first argument as-is. Simplify argument handling.
23590	(mu-logger): Simplify argument handling.
23591	(mu-closelog): Free log_tag.
23592
235932010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23594
23595	Remove the uses of deprecated Guile functions.
23596
23597	* am/guile.m4 (MU_CHECK_GUILE): Check for scm_t_off.
23598	* include/mailutils/guile.h (mu_scm_makenum)
23599	(mu_set_variable): Remove prototypes.
23600	* libmu_scm/mu_address.c: Remove calls to deprecated Guile
23601	functions.
23602	* libmu_scm/mu_body.c: Likewise.
23603	* libmu_scm/mu_guile.c: Likewise.
23604	* libmu_scm/mu_mailbox.c: Likewise.
23605	* libmu_scm/mu_message.c: Likewise.
23606	* libmu_scm/mu_mime.c: Likewise.
23607	* libmu_scm/mu_util.c: Likewise.
23608	* libmu_scm/mu_scm.c (mu_scm_makenum): Remove.
23609	(mu_set_variable): Remove. Use scm_c_define instead.
23610
236112010-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
23612
23613	Add missing include.
23614
23615	* mailutils/mutil.h: Include mailutils/mutil.h
23616
236172010-03-31  Sergey Poznyakoff  <gray@gnu.org.ua>
23618
23619	Fix parsing of per-user configuration files.
23620
23621	The mu_cfg_parse_file function ignored special meaning of the
23622	initial "~/" in file names. This led to user configuration
23623	files not being read (mu_libcfg_parse_config creates such names
23624	if mu_load_user_rcfile is set).
23625
23626	* mailbox/cfg_lexer.l (mu_cfg_parse_file): Expand initial tilde
23627	in the file name. Store expanded file name in the opool.
23628	(mu_get_config): Destroy tree only if it has actually been
23629	created.
23630	* mailbox/cfg_parser.y (mu_cfg_parse): Free allocated memory in
23631	case of error.
23632	(do_include): Fix memory leak.
23633
236342010-03-19  Sergey Poznyakoff  <gray@gnu.org.ua>
23635
23636	Minor change.
23637
23638	* bootstrap.conf: Define COPYRIGHT_HOLDER.
23639
236402010-03-19  Simon Josefsson  <simon@josefsson.org>
23641
23642	Bugfix.
23643
23644	* imap4d/auth_gsasl.c (auth_gsasl): Fix memory management.
23645
236462010-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
23647
23648	Bugfix.
23649
23650	* mailbox/cfg_parser.y (mu_cfg_tree_union): Fix coredump on
23651	b->nodes==NULL.
23652
236532010-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
23654
23655	Re-do configuration tree support using mu_list_t.
23656
23657	* include/mailutils/cfg.h (mu_cfg_node)
23658	<next,node>: Remove members.
23659	<nodes>: New member.
23660	(mu_cfg_tree)<head,tail>: Remove.
23661	<nodes>: New member.
23662	(mu_cfg_iter_closure): New struct.
23663	(mu_cfg_preorder): Change prototype.
23664	(mu_cfg_postorder): Remove.
23665	(mu_cfg_create_node_list): New proto.
23666	(mu_cfg_tree_create_node): Change signature.
23667	(mu_cfg_tree_add_nodelist): New proto.
23668	(mu_cfg_find_node): Change signature.
23669	* include/mailutils/libargp.h (mu_argp_node_list): Remove
23670	struct. (mu_argp_node_list_init, mu_argp_node_list_add)
23671	(mu_argp_node_list_new, mu_argp_node_list_finish): Change
23672	signature.
23673	* libmu_argp/cmdline.c (mu_argp_node_list_init,
23674	mu_argp_node_list_add)
23675	(mu_argp_node_list_new, mu_argp_node_list_finish): Take
23676	mu_list_t as the nodelist argument.
23677	* mailbox/cfg_parser.y (parse_head,parse_tail): Remove.
23678	(parse_node_list): New static, used instead of the above. All
23679	uses updated.
23680	(mu_cfg_alloc_node): Last argument is mu_list_t.
23681	(mu_cfg_create_node_list): New function.
23682	(mu_cfg_tree_postprocess): Rewrite.
23683	(mu_cfg_preorder): Rewrite.
23684	(mu_cfg_postorder): Remove.
23685	(mu_cfg_destroy_tree): Use mu_list_destroy to free the node
23686	list.
23687	(mu_cfg_scan_tree): Update calls to mu_cfg_preorder.
23688	(mu_cfg_tree_add_node): Rewrite.
23689	(mu_cfg_tree_add_nodelist): New function.
23690	(mu_cfg_find_node): Change type of the first argument.
23691	(mu_cfg_create_subtree): Rewrite.
23692	* mailbox/cfg_format.c (mu_cfg_format_parse_tree)
23693	(mu_cfg_format_node): Use new mu_cfg_preorder function.
23694	* libmu_argp/common.c: Update calls to mu_argp_node_ functions.
23695	* libmu_argp/auth.c: Likewise.
23696	* comsat/comsat.c: Likewise.
23697	* config/mailutils-config.c: Likewise.
23698	* dotlock/dotlock.c: Likewise.
23699	* imap4d/imap4d.c: Likewise.
23700	* libmu_argp/sieve.c: Likewise.
23701	* libmu_argp/tls.c: Likewise.
23702	* maidag/maidag.c: Likewise.
23703	* mimeview/mimeview.c: Likewise.
23704	* movemail/movemail.c: Likewise.
23705	* pop3d/pop3d.c: Likewise.
23706	* readmsg/readmsg.c: Likewise.
23707	* sieve/sieve.c: Likewise.
23708
237092010-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
23710
23711	Bugfixes.
23712
23713	* mailbox/listlist.c (mu_list_append_list)
23714	(mu_list_prepend_list): Initialize head.next and head.prev if
23715	the destination list was empty.
23716	* mailbox/freeitem.c: Include stdlib.h.
23717	* mailbox/list.c: Minor style fix.
23718
237192010-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
23720
23721	Implement bidirectional iteration over lists.
23722
23723	* include/mailutils/iterator.h (mu_itrctl_qry_direction)
23724	(mu_itrctl_set_direction): New mu_itrctl_req constants.
23725	* mailbox/iterator.c (mu_iterator_dup): Bugfix: copy dup as
23726	well.
23727	* mailbox/list.c (struct list_iterator)
23728	<backwards>: New member.
23729	(first, next): Move direction depends on the value of
23730	list_iterator.backwards.
23731	(list_itrctl): Handle mu_itrctl_qry_direction and
23732	mu_itrctl_set_direction
23733	* examples/listop.c (ictl_dir): New function.
23734	(ictl_ins): Handle new subcommand "dir".
23735	(help): Show new subcommand "dir".
23736	* mailbox/testsuite/mailbox/list.exp: Add tests for iteration
23737	backwards.
23738
237392010-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
23740
23741	Mu_list_replace and mu_list_remove actually reclaim the memory
23742	associated with the item.
23743
23744	* include/mailutils/iterator.h (mu_itrctl_delete_nd)
23745	(mu_itrctl_replace_nd): New mu_itrctl_req constants.
23746	* include/mailutils/list.h (mu_list_remove_nd)
23747	(mu_list_replace_nd): New prototypes.
23748	(mu_list_destroy_item_t): New typedef.
23749	(mu_list_set_destroy_item): Return mu_list_destroy_item_t.
23750	* mailbox/list.c (DESTROY_ITEM): New macro.
23751	(mu_list_destroy): Use DESTROY_ITEM.
23752	(mu_list_remove, mu_list_replace): Actually destroy the item
23753	being removed.
23754	(mu_list_remove_nd, mu_list_replace_nd): New functions.
23755	(mu_list_set_destroy_item): Return previous value of
23756	destroy_item.
23757	(list_itrctl): Handle mu_itrctl_delete_nd and
23758	mu_itrctl_replace_nd.
23759	* mailbox/observer.c (mu_observable_create): Register
23760	destroy_item function.
23761	(mu_observable_destroy): Remove explicit loop. Rely on
23762	destroy_item instead.
23763	(mu_observable_detach): Use mu_iterator_ctl to actually remove
23764	the event.
23765	* mh/mh_alias.y (_insert_list): Remove.
23766	(alias_expand_list): Use mu_iterator_ctl to insert replacement
23767	list and remove the current item.
23768	* mh/sortm.c (addop): Register destroy_item function.
23769	(remop): Remove call to free.
23770	* movemail/movemail.c (main): <uidl loop>: Use mu_itrctl_delete
23771	to remove items.
23772	* libmu_sieve/util.c: Minor change.
23773	* mail/util.c (util_slist_compare): New static function.
23774	(util_slist_add): Register destroy_item and comparison
23775	functions for the new list.
23776	(util_slist_remove,util_slist_destroy): Rewrite.
23777	* imap4d/authenticate.c (auth_add): Use mu_list_free_item as
23778	destroy_item function.
23779	* imap4d/util.c (util_register_event): Likewise.
23780	* include/mailutils/cpp/list.h (List)<set_destroy_item>: Change
23781	return value.
23782	* libmu_cpp/list.cc (List::set_destroy_item): Reflect changes
23783	to mu_list_set_destroy_item.
23784	* libmu_argp/common.c: Include stdlib.h
23785
237862010-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
23787
23788	Implement `iterator_ctl' function.
23789
23790	* include/mailutils/iterator.h (mu_itrctl_req): New enum.
23791	(mu_iterator_skip, mu_iterator_ctl)
23792	(mu_iterator_set_itrctl): New prototypes.
23793	* include/mailutils/list.h (mu_list_free_item): New prototype.
23794	* libproto/include/iterator0.h (struct _mu_iterator)<itrctl>:
23795	New method.
23796	* libproto/include/list0.h (_mu_list_clear): New proto.
23797	* mailbox/iterator.c (mu_iterator_set_itrctl): New function.
23798	(mu_iterator_skip, mu_iterator_ctl): New functions.
23799	* mailbox/list.c (_insert_item): Re-implement function.
23800	(mu_list_insert): Use _insert_item again.
23801	(mu_list_remove): Don't keep track of the previous item.
23802	(list_itrctl): New function.
23803	(mu_list_get_iterator): Set itrctl method.
23804	* mailbox/listlist.c (clear_list): Rename to _mu_list_clear,
23805	remove static qualifier. All uses updated.
23806	* mailbox/freeitem.c: New file.
23807	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add
23808	freeitem.c.
23809	* examples/listop.c (read_list): Rewrite to simplify calling
23810	convention. All callers updated.
23811	(inctl_tell,ictl_del,ictl_repl)
23812	(ictl_ins,ictl): New functions.
23813	(help): Add new commands.
23814	(shell): Handle "inctl" command.
23815	(delete): Fix memory leak.
23816	(main): Set mu_list_free_item as a destroy_item function.
23817	* mailbox/testsuite/mailbox/listop.c: Add ictl tests.
23818	* libmu_cfg/sieve.c (_add_path): Set mu_list_free_item as a
23819	destroy_item function.
23820	* mailbox/gocs.c (mu_gocs_store): Likewise.
23821	* maidag/lmtp.c (cfun_rcpt_to): Likewise.
23822	* imap4d/namespace.c (namespace_init): Likewise.
23823	* libmu_sieve/conf.c (_path_append): Likewise.
23824
238252010-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
23826
23827	Implement new list functions.
23828
23829	* include/mailutils/list.h (_mu_list_ptr_comparator)
23830	(mu_list_insert_list, mu_list_append_list)
23831	(mu_list_prepend_list): New prototypes.
23832	* libproto/include/list0.h (_mu_list_insert_sublist): New
23833	prototype.
23834	* mailbox/listlist.c: New function.
23835	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add
23836	listlist.c.
23837	* mailbox/list.c: Remove unnecessary parentheses.
23838	(def_comp): Rename to _mu_list_ptr_comparator. Remove static
23839	qualifier. All uses updated.
23840	(_insert_item): Remove.
23841	(mu_list_insert): Use _mu_list_insert_sublist instead of
23842	_insert_item.
23843	* examples/listop.c (print): Print number of elements.
23844	(count): New function.
23845	(ins): Use mu_list_insert if only one new element was given,
23846	mu_list_insert_list otherwise.
23847	(help): Update.
23848	(main)<count>: New keyword.
23849	* mailbox/testsuite/mailbox/list.exp: Update. Add new tests.
23850
238512010-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
23852
23853	Minor fixes.
23854
23855	* mailbox/attachment.c (MAX_HDR_LEN): Remove unused define.
23856	* sieve/sieve.c (parser) <ARGP_KEY_NO_ARGS>: Don't check for
23857	the script,
23858	(main): ... do it here, instead.
23859
238602010-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
23861
23862	Work around a libtool bug.
23863
23864	* configure.ac [WITH_GSSAPI]: Remove any -Wl directives from
23865	GSSAPI_LIBS.
23866
238672010-02-17  Sergey Poznyakoff  <gray@gnu.org.ua>
23868
23869	Minor fix.
23870
23871	* mail/send.c (mail_send0): Pipe message to the program if the
23872	value of sendmail variable begins with a slash. Otherwise,
23873	issue meaningful error messages if the mailer cannot be created
23874	or opened.
23875
238762010-02-17  Sergey Poznyakoff  <gray@gnu.org.ua>
23877
23878	Bugfix.
23879
23880	* libproto/mbox/mbox.c (mbox_append_message): Fix qid
23881	calculation.
23882
238832010-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
23884
23885	Bugfix.
23886
23887	* libproto/mailer/smtp.c (cram_md5): Remove left-over
23888	assignment to challenge_len.
23889
238902010-02-10  Sergey Poznyakoff  <gray@gnu.org.ua>
23891
23892	Fix memory override in smtp.c code. Fix ESMTP capability
23893	parsing.
23894
23895	* mailbox/base64.c (mu_base64_encode): Make sure output buffer
23896	is null-terminated.
23897	* imap4d/auth_gss.c (auth_gssapi): Assume buffer returned by
23898	mu_base64_encode is null-terminated.
23899	* libproto/mailer/smtp.c (cram_md5): Take challenge_len as
23900	argument. All callers updated.
23901	(smtp_auth): Fix eventual memory override. Assume buffer
23902	returned by mu_base64_encode is nul-terminated.
23903	(smtp_parse_ehlo_ack): Fix capability parsing: (a) do not
23904	depend on the continuation marker ('-' or ' ') and (b) fix
23905	parsing of the SIZE capability. Move call to mu_rtrim_cset out
23906	of the internal loop.
23907
239082010-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
23909
23910	Fix TLS stream leak.
23911
23912	* libmu_auth/tls.c (_tls_destroy): Destroy underlying streams,
23913	unless MU_STREAM_NO_CLOSE is set.
23914	(_tls_close): Likewise for close.
23915
239162010-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
23917
23918	Bugfixes.
23919
23920	* libproto/imap/mbox.c (imap_append_message0): Send trailing
23921	CRLF, not just LF.
23922	* mailbox/cfg_parser.y (mu_cfg_parse): Zero out _mu_cfg_debug
23923	to avoid destroying it doubly.
23924	* mailbox/mbx_default.c (plus_expand): Remove unused variable.
23925
239262010-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
23927
23928	Fix improperly placed variable declarations.
23929
23930	* imap4d/id.c
23931	* libproto/imap/folder.c
23932	* libproto/pop/mbox.c
23933	* sieve/sieve.c
23934
239352010-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
23936
23937	Minor fix.
23938
23939	* sieve/testsuite/sieve/ext.exp [!HAVE_LIBLTDL]: Use
23940	unsupported instead of returning 0.
23941
239422010-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
23943
23944	Fix compilation without sendmail.
23945
23946	* libproto/mailer/remote.c: Fix compilation with
23947	--disable-sendmail.
23948	* mail/testsuite/mail/send.exp: Ignore test (return
23949	UNSUPPORTED), if sendmail support is not compiled.
23950	* sieve/testsuite/sieve/redirect.exp: Likewise.
23951	* sieve/testsuite/sieve/reject.exp: Likewise.
23952
239532010-01-27  Sergey Poznyakoff  <gray@gnu.org.ua>
23954
23955	MH-related bugfixes.
23956
23957	* mailbox/mbx_default.c (plus_expand): Do not treat the part
23958	between initial + and / as user name.
23959	* mh/mh_format.c (print_fmt_segment): New function.
23960	(print_fmt_string): Correctly handle multi-line inputs.
23961
239622010-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
23963
23964	More fixes in libmu_scm.
23965
23966	* libmu_scm/mu_mailbox.c (mu-mailbox-get-port): Fix return
23967	value.
23968	* libmu_scm/mu_port.c (mu_port_flush): Avoid warnings on
23969	passing arg 2 to mu_stream_write.
23970	(mu_port_free): Return 0.
23971	* libmu_scm/mu_message.c (mu_scm_message_free): Return 0.
23972
239732010-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>
23974
23975	Do not use deprecated Guile functions.
23976
23977	* libmu_scm/mu_address.c: Use scm_to_locale_string instead of
23978	relying on scm_i_string_chars.
23979	* libmu_scm/mu_logger.c: Likewise.
23980	* libmu_scm/mu_mailbox.c: Likewise.
23981	* libmu_scm/mu_scm.c: Likewise.
23982	* libmu_scm/mu_util.c: Likewise.
23983	* libmu_scm/mu_message.c: Likewise.
23984	(mu_scm_message_add_owner): Don't use SCM_NEWCELL.
23985	(mu-message-get-envelope)
23986	(mu-message-get-envelope-date): New functions.
23987	(string_sloppy_member): Compare scm_i_string_length bytes from
23988	the car.
23989	(mu-message-get-header-fields): Don't use SCM_NEWCELL.
23990	* libmu_scm/mu_port.c (mu_port_make_from_stream): Don't use
23991	SCM_NEWCELL.
23992
239932010-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
23994
23995	Bugfixes.
23996
23997	* mailbox/stream.c (mu_stream_readline): Account for
23998	terminating null (fixes buffer overrun).
23999	(mu_stream_getline): Fix reallocation condition.
24000
240012010-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
24002
24003	Remove incompatibly-copyrighted material.
24004
24005	* configure.ac: Remove doc/rfc/Makefile.am
24006	* doc/Makefile.am (SUBDIRS): Remove rfc.
24007	(EXTRA_DIST): Add rfc/README.
24008	* doc/rfc/README: New file.
24009	* doc/rfc/CMC_V1.PS.gz: Remove.
24010	* doc/rfc/Makefile.am: Remove.
24011	* doc/rfc/rfc1413.txt: Remove.
24012	* doc/rfc/rfc1521.txt: Remove.
24013	* doc/rfc/rfc1731.txt: Remove.
24014	* doc/rfc/rfc1734.txt: Remove.
24015	* doc/rfc/rfc1738.txt: Remove.
24016	* doc/rfc/rfc1870.txt: Remove.
24017	* doc/rfc/rfc1891.txt: Remove.
24018	* doc/rfc/rfc1892.txt: Remove.
24019	* doc/rfc/rfc1893.txt: Remove.
24020	* doc/rfc/rfc1894.txt: Remove.
24021	* doc/rfc/rfc1939.txt: Remove.
24022	* doc/rfc/rfc1957.txt: Remove.
24023	* doc/rfc/rfc2045.txt: Remove.
24024	* doc/rfc/rfc2046.txt: Remove.
24025	* doc/rfc/rfc2047.txt: Remove.
24026	* doc/rfc/rfc2049.txt: Remove.
24027	* doc/rfc/rfc2060-errata
24028	* doc/rfc/rfc2060.txt: Remove.
24029	* doc/rfc/rfc2087.txt: Remove.
24030	* doc/rfc/rfc2088.txt: Remove.
24031	* doc/rfc/rfc2111.txt: Remove.
24032	* doc/rfc/rfc2177.txt: Remove.
24033	* doc/rfc/rfc2180.txt: Remove.
24034	* doc/rfc/rfc2192.txt: Remove.
24035	* doc/rfc/rfc2193.txt: Remove.
24036	* doc/rfc/rfc2195.txt: Remove.
24037	* doc/rfc/rfc2221.txt: Remove.
24038	* doc/rfc/rfc2222.txt: Remove.
24039	* doc/rfc/rfc2231.txt: Remove.
24040	* doc/rfc/rfc2245.txt: Remove.
24041	* doc/rfc/rfc2298.txt: Remove.
24042	* doc/rfc/rfc2342.txt: Remove.
24043	* doc/rfc/rfc2368.txt: Remove.
24044	* doc/rfc/rfc2384.txt: Remove.
24045	* doc/rfc/rfc2444.txt: Remove.
24046	* doc/rfc/rfc2449.txt: Remove.
24047	* doc/rfc/rfc2595.txt: Remove.
24048	* doc/rfc/rfc2683.txt: Remove.
24049	* doc/rfc/rfc2808.txt: Remove.
24050	* doc/rfc/rfc2821.txt: Remove.
24051	* doc/rfc/rfc2822.txt: Remove.
24052	* doc/rfc/rfc2831.txt: Remove.
24053	* doc/rfc/rfc3028.txt: Remove.
24054	* doc/rfc/rfc3206.txt: Remove.
24055	* doc/rfc/rfc3348.txt: Remove.
24056	* doc/rfc/rfc3431.txt: Remove.
24057	* doc/rfc/rfc3501.txt: Remove.
24058	* doc/rfc/rfc3691.txt: Remove.
24059	* doc/rfc/rfc4314.txt: Remove.
24060	* doc/rfc/rfc821.txt: Remove.
24061	* doc/rfc/rfc822.txt: Remove.
24062	* doc/rfc/rfc934.txt: Remove.
24063	* doc/rfc/sasl-mechanisms: Remove.
24064
240652010-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
24066
24067	Fix indentation in Sieve scripts.
24068
24069	* sieve/examples/ex-1.10.2.sv: Use GNU indentation style
24070	* sieve/examples/ex-2.3a.sv: Likewise.
24071	* sieve/examples/ex-2.5.1.sv: Likewise.
24072	* sieve/examples/ex-2.7.3.sv: Likewise.
24073	* sieve/examples/ex-3.1a.sv: Likewise.
24074	* sieve/examples/ex-3.1b.sv: Likewise.
24075	* sieve/examples/ex-3.2.sv: Likewise.
24076	* sieve/examples/ex-4.1.sv: Likewise.
24077	* sieve/examples/ex-4.2.sv: Likewise.
24078	* sieve/examples/ex-4.4a.sv: Likewise.
24079	* sieve/examples/ex-4.4b.sv: Likewise.
24080	* sieve/examples/ex-4.5.sv: Likewise.
24081	* sieve/examples/ex-5.1.sv: Likewise.
24082	* sieve/examples/ex-5.7.sv: Likewise.
24083	* sieve/examples/ex-9.sv: Likewise.
24084	* sieve/examples/ex-save-all.sv: Likewise.
24085	* sieve/examples/example.sv: Likewise.
24086	* sieve/examples/exn-5.4.sv: Likewise.
24087	* sieve/examples/t-complex.sv: Likewise.
24088	* sieve/examples/t-exists.sv: Likewise.
24089	* sieve/examples/t-fileinto.sv: Likewise.
24090	* sieve/examples/t-mailutils.sv: Likewise.
24091
240922010-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
24093
24094	Update copyright years.
24095
24096	Happy GNU year!
24097
240982010-01-02  Sergey Poznyakoff  <gray@gnu.org.ua>
24099
24100	Bugfixes.
24101
24102	* libmu_cfg/init.c (mu_libcfg_parse_config): Do not produce
24103	error if user configuration file is absent.
24104	* libmu_sieve/sieve.l: Include config.h in %top section.
24105	* mh/mh_alias.l: Likewise.
24106	* mimeview/mimetypes.l: Likewise.
24107	* mailbox/cfg_lexer.l: Likewise.
24108	(mu_get_config): Call mu_cfg_tree_postprocess.
24109
241102009-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>
24111
24112	Version 2.1.90.
24113
24114	* configure.ac, NEWS: Set version number 2.1.90
24115	* testsuite/lib/mailutils.exp: Quote arguments to the --set
24116	option.
24117	(mu_exec): escape backslashes and double-quotes in $sw.
24118	* frm/testsuite/frm/test.exp: Quote arguments to the --set
24119	option.
24120	* mail/testsuite/lib/mail.exp: Likewise.
24121	* mailbox/testsuite/lib/mailbox.exp: Likewise.
24122	* messages/testsuite/messages/test.exp: Likewise.
24123	* sieve/testsuite/sieve/action.exp: Likewise.
24124	* readmsg/testsuite/readmsg/test.exp: Remove extra backslashes,
24125	not needed due to the changes in mu_exec
24126
241272009-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>
24128
24129	Support for multibyte-encoding in MH.
24130
24131	* gnulib.modules (mbchar, mbiter, mbslen): New modules.
24132	* mh/mh.h (mh_charset): New function.
24133	* mh/mh_format.c (DFLWIDTH): New macro.
24134	(mbsubstrlen, mbsnlen): New functions.
24135	(compress_ws): Handle multibyte strings.
24136	(put_string): Use number of characters, not octets, to update
24137	ind.
24138	(print_hdr_segment): Handle multibyte strings.
24139	(print_simple_segment, print_fmt_string): Likewise.
24140	(reset_fmt_defaults): Restore default WS compression.
24141	(mh_format): Set LC_TYPE based on the settings of profile
24142	variables Charset and LC_BASE (new variable).
24143	* mh/mh_init.c (mh_charset): New function.
24144	(mh_decode_2047): Use mh_charset.
24145
241462009-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
24147
24148	Improve configuration parsing (step 1).
24149
24150	Remove obsolete options (these have been made hidden in v.
24151	2.0). Handle "include" and "program" after parsing the sources,
24152	not while reducing the tree, as was previously. Retain,
24153	however, old functions for compatibility, making them
24154	deprecated. Add "query" mode to mailutils-config.
24155
24156	* include/mailutils/cfg.h (mu_cfg_node_tag): Remove
24157	(mu_cfg_statement): Rename to mu_cfg_node_statement.
24158	(mu_cfg_tree): New member: tail.
24159	(mu_cfg_perror): Change signature.
24160	(mu_cfg_vperror, mu_cfg_parse_error): New protos.
24161	(MU_CFG_PATH_DELIM, MU_CFG_PATH_DELIM_STR): New defines.
24162	(MU_PARSE_CONFIG_PLAIN,MU_CFG_FMT_LOCUS): New constant.
24163	(MU_CFG_DEPRECATED): New macro.
24164	(mu_parse_config,mu_get_config): Deprecated.
24165	(mu_cfg_format_parse_tree): Change signature.
24166	(mu_cfg_format_node, mu_cfg_parse_file): New protos.
24167	(mu_cfg_tree_free): Remove stale proto.
24168	(mu_cfg_find_node, mu_cfg_create_subtree): New protos.
24169	* include/mailutils/libcfg.h (mu_libcfg_parse_config): New
24170	proto.
24171	(mu_parse_config_files): Deprecated.
24172	* include/mailutils/mutil.h (mu_make_file_name): New proto.
24173	(mu_retrieve_fp, mu_register_retriever)
24174	(mu_retrieve): Remove unused prototypes.
24175	* include/mailutils/opool.h (mu_opool_union): New proto.
24176	* libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove sources
24177	(see below):
24178	* po/POTFILES.in: Likewise.
24179	* libmu_argp/gsasl.c: Remove.
24180	* libmu_argp/pam.c: Remove.
24181	* libmu_argp/radius.c: Remove.
24182	* libmu_argp/sql.c: Remove.
24183	* libmu_argp/tls.c: Remove.
24184	* libmu_argp/virtdomain.c: Remove.
24185	* config/mailutils-config.c: New option --query (-q)
24186	(main): Handle query mode.
24187	* comsat/comsat.c: Define MU_CFG_COMPATIBILITY to suppress
24188	deprecation warnings.
24189	* bootstrap.conf (XGETTEXT_OPTIONS): Add mu_cfg error reporting
24190	functions.
24191	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add
24192	mkfilename.c
24193	* mailbox/mkfilename.c: New file.
24194	* imap4d/imap4d.c: Remove obsolete option (hidden since 2.0)
24195	* libmu_argp/auth.c: Likewise.
24196	* libmu_argp/cmdline.c: Likewise.
24197	* libmu_argp/tls.c: Likewise.
24198	* pop3d/pop3d.c: Likewise.
24199	* libmu_argp/common.c: Likewise.
24200	(mu_common_argp_options): New option --set.
24201	* libmu_argp/muinit.c (mu_app_init): Rewrite using parse tree
24202	as a principal entity.
24203	* libmu_cfg/init.c (mu_libcfg_parse_config): New function.
24204	* mailbox/cfg_driver.c (make_file_name): Remove.
24205	(_cb_include): Use mu_make_file_name.
24206	(mu_build_container): Use deprecated code only unless
24207	MU_PARSE_CONFIG_PLAIN flag is set.
24208	(mu_cfg_tree_reduce): Do nothing if the tree is NULL.
24209	* mailbox/cfg_format.c (format_node): Print locus optionally.
24210	(mu_cfg_format_parse_tree): Take additional argument.
24211	(mu_cfg_format_node): New function.
24212	* mailbox/cfg_lexer.l: Update calls to diagnostic functions.
24213	(mu_cfg_parse_file): New function.
24214	(mu_get_config): Rewrite.
24215	* mailbox/cfg_parser.y (parse_tree): Replace with parse_head,
24216	parse_tail. All usages updated.
24217	(mu_cfg_free_node): New function.
24218	(mu_cfg_vperror): New function.
24219	(mu_cfg_perror,mu_cfg_parse_error): New function.
24220	(mu_cfg_tree_union): New function.
24221	(mu_cfg_tree_postprocess): New function.
24222	(mu_cfg_find_section): Use MU_CFG_PATH_DELIM instead of
24223	hardcoded slash.
24224	(mu_cfg_value_eq): New function.
24225	(mu_cfg_find_node): New function. Redesign of an old idea.
24226	(mu_cfg_create_subtree): New function.
24227	* mailbox/opool.c (mu_opool_union): New function.
24228	* frm/testsuite/frm/test.exp: use --set option instead of the
24229	obsolete --mail-folder.
24230	* messages/testsuite/messages/test.exp: Likewise.
24231	* sieve/testsuite/sieve/action.exp: Likewise.
24232	* mail/testsuite/lib/mail.exp: use --set option instead of the
24233	obsolete --mail-spool.
24234	* mailbox/testsuite/lib/mailbox.exp: Likewise.
24235	* testsuite/lib/mailutils.exp: Likewise.
24236	* mailbox/mutil.c (mu_register_retriever)
24237	(mu_retrieve): Remove unused functions.
24238
24239	Minor fix:
24240	* frm/common.c (frm_abort): Initialize URL before usage.
24241	(frm_scan): Don't call frm_abort on a mailbox that was not
24242	opened successfully.
24243
242442009-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
24245
24246	Disable whitespace compression in MH formatting code.
24247
24248	Whitespace compression in its current form interacts badly with
24249	wide-character encodings. To prevent it from spoiling wide
24250	character text, it is disabled by default. The user may turn it
24251	back on by setting "Compress-WS: yes" in his .mh_profile.
24252
24253	* mh/mh.h (MH_FMT_COMPWS): New format flag.
24254	* mh/mh_format.c (COMPRESS_WS): New macro.
24255	(reset_fmt_defaults): Set MH_FMT_COMPWS flag if Compress-WS
24256	global parameter is set to true.
24257	(mh_format, builtin_concat): Call COMPRESS_WS.
24258
242592009-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
24260
24261	Fix format specifiers and usage of const char*
24262	arguments/variables.
24263
24264	Affected files:
24265
24266	* comsat/comsat.c
24267	* examples/header.c
24268	* examples/mailcap.c
24269	* examples/pop3client.c
24270	* examples/url-parse.c
24271	* imap4d/fetch.c
24272	* imap4d/id.c
24273	* imap4d/list.c
24274	* imap4d/select.c
24275	* imap4d/status.c
24276	* imap4d/store.c
24277	* imap4d/sync.c
24278	* imap4d/util.c
24279	* include/mailutils/sieve.h
24280	* libmu_argp/common.c
24281	* libmu_argp/muinit.c
24282	* libmu_sieve/actions.c
24283	* libmu_sieve/extensions/pipe.c
24284	* libmu_sieve/extensions/vacation.c
24285	* libmu_sieve/prog.c
24286	* libmu_sieve/require.c
24287	* libmu_sieve/runtime.c
24288	* libmu_sieve/sieve-priv.h
24289	* libmu_sieve/sieve.y
24290	* libproto/imap/folder.c
24291	* libproto/imap/mbox.c
24292	* libproto/mailer/sendmail.c
24293	* libproto/mbox/mbox.c
24294	* libproto/pop/pop3_list.c
24295	* libproto/pop/pop3_stat.c
24296	* maidag/lmtp.c
24297	* maidag/sieve.c
24298	* mail/copy.c
24299	* mail/decode.c
24300	* mail/envelope.c
24301	* mail/eq.c
24302	* mail/escape.c
24303	* mail/from.c
24304	* mail/mail.h
24305	* mail/mailline.c
24306	* mail/mailvar.c
24307	* mail/size.c
24308	* mail/util.c
24309	* mail/write.c
24310	* mailbox/cfg_format.c
24311	* mailbox/folder.c
24312	* mailbox/parse822.c
24313	* mailbox/system.c
24314	* messages/messages.c
24315	* mh/folder.c
24316	* mh/forw.c
24317	* mh/inc.c
24318	* mh/mh.h
24319	* mh/mh_alias.l
24320	* mh/mh_fmtgram.y
24321	* mh/mh_getopt.h
24322	* mh/mh_init.c
24323	* mh/mh_msgset.c
24324	* mh/mh_whatnow.c
24325	* mh/mhn.c
24326	* mh/pick.y
24327	* mimeview/mimetypes.y
24328	* python/libmu_py/debug.c
24329	* sieve/sieve.c
24330
243312009-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
24332
24333	Add TLS to MH.	Handle --debug-level and --debug-line-info
24334	options.
24335
24336	* mailbox/mbx_default.c (attach_auth_ticket): Do not proceed if
24337	auth is NULL.
24338	* mh/mh_getopt.h (struct mh_argp_data): Change return type and
24339	signature of handler.
24340	(mh_argp_parse): Likewise.
24341	* mh/mh_argp.c (parse_opt): Rewrite using new handler
24342	prototype.
24343	(mh_argp_parse): Use new handler type. Assign argp children.
24344	* mh/mh_init.c (mh_init): Call mu_init_tls_libs.
24345	* mh/ali.c: Update opt_handler
24346	* mh/anno.c: Update opt_handler
24347	* mh/burst.c: Update opt_handler
24348	* mh/comp.c: Update opt_handler
24349	* mh/fmtcheck.c: Update opt_handler
24350	* mh/folder.c: Update opt_handler
24351	* mh/forw.c: Update opt_handler
24352	* mh/inc.c: Update opt_handler
24353	* mh/install-mh.c: Update opt_handler
24354	* mh/mark.c: Update opt_handler
24355	* mh/mhl.c: Update opt_handler
24356	* mh/mhn.c: Update opt_handler
24357	* mh/mhparam.c: Update opt_handler
24358	* mh/mhpath.c: Update opt_handler
24359	* mh/pick.c: Update opt_handler
24360	* mh/refile.c: Update opt_handler
24361	* mh/repl.c: Update opt_handler
24362	* mh/rmf.c: Update opt_handler
24363	* mh/rmm.c: Update opt_handler
24364	* mh/scan.c: Update opt_handler
24365	* mh/send.c: Update opt_handler
24366	* mh/sortm.c: Update opt_handler
24367	* mh/whatnow.c: Update opt_handler
24368	* mh/whom.c: Update opt_handler
24369
243702009-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
24371
24372	Bugfix.
24373
24374	* libproto/mailer/smtp.c (smtp_open): Don't issue second EHLO
24375	if STARTTLS failed.
24376
243772009-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
24378
24379	Fix reusability of smtp mailers.
24380
24381	* libproto/mailer/smtp.c (_smtp_set_rcpt): Initialize smtp->ptr
24382	to smtp->buffer, not NULL.
24383	(smtp_close): Reset smtp->state.
24384
243852009-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
24386
24387	Bugfix.
24388
24389	* mail/mail.c (parse_opt): Fix handling of the --user option.
24390
243912009-10-31  Jordi Mallach  <jordi@gnu.org>
24392
24393	Spelling fixes.
24394
243952009-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>
24396
24397	Bugfixes.
24398
24399	* libmu_scm/mu_guile.c: Include setjmp.h.
24400	* readmsg/readmsg.c (readmsg_parse_opt): Bugfixes. Patch by
24401	Steve Cotton.
24402
244032009-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
24404
24405	Revamp common mu_gsasl_module_data as extern.
24406
24407	* include/mailutils/gsasl.h (mu_gsasl_module_data): Mark as
24408	extern.
24409
244102009-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
24411
24412	Various fixes (mostly to placate gcc)
24413
24414	* examples/base64.c, examples/mta.c, imap4d/auth_gss.c,
24415	imap4d/imap4d.c, imap4d/preauth.c, libmu_auth/ldap.c,
24416	libmu_auth/virtual.c, libmu_scm/mu_body.c, libmu_scm/mu_port.c,
24417	libproto/mailer/smtp.c, mailbox/acl.c, mailbox/secret.c,
24418	pop3d/pop3d.c, python/libmu_py/address.c, sql/odbc.c: Fix
24419	argument signedness.
24420	* imap4d/fetch.c, imap4d/store.c (closures): Change type of
24421	`count' to int, to match the signature of util_msgset.
24422	* include/mailutils/guile.h (mu_scm_message_get): Fix return
24423	type (const is useless here).
24424	* libmu_scm/mu_message.c (mu_scm_message_get): Likewise.
24425	(scm_mu_message_copy): Fix type of the `wr' automatic variable.
24426	* libmu_scm/mu_mime.c (mu_scm_mime_get): Remove const qualifier
24427	from the return type.
24428	* libmu_argp/cmdline.c: Include stdlib.h.
24429
244302009-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
24431
24432	Bugfixes.
24433
24434	* mailbox/assoc.c (assoc_remove): Fix incorrect copying between
24435	assoc slots.
24436	* mailbox/cfg_parser.y (STRTONUM): Remove useless
24437	dereferencing. Change the loop from `while' to `for'.
24438
244392009-09-28  Sergey Poznyakoff  <gray@gnu.org.ua>
24440
24441	Fix program descriptions (docstings).
24442
24443	* config/mailutils-config.c: Terminate docstring with a period.
24444	* dotlock/dotlock.c: Likewise.
24445	* frm/frm.c: Likewise.
24446	* frm/from.c: Likewise.
24447	* imap4d/imap4d.c: Likewise.
24448	* maidag/maidag.c: Likewise.
24449	* pop3d/pop3d.c: Likewise.
24450	* readmsg/readmsg.c: Likewise.
24451	* sieve/sieve.c: Likewise.
24452
244532009-09-28  Jordi Mallach  <jordi@gnu.org>
24454
24455	Harmonise --help output.
24456
24457	* comsat/comsat.c: Add docstring.
24458	* movemail/movemail.c: Add docstring.
24459
244602009-09-24  Sergey Poznyakoff  <gray@gnu.org.ua>
24461
24462	Minor fixes.
24463
24464	* include/mailutils/cfg.h (mu_cfg_perror): Mark as printflike.
24465	(mu_cfg_format_error): Likewise.
24466	* libmu_argp/radius.c (mu_radius_argp_option): Fix typo in the
24467	docstring.
24468	* mail/mail.h [!WITH_READLINE] (mailvar_set_compl): New define.
24469
244702009-09-24  Simon Josefsson  <simon@josefsson.org>
24471
24472	SASL related fixes.
24473
24474	* imap4d/auth_gsasl.c (auth_gsasl): Make IMAP server wait for
24475	empty final client response.
24476	* include/mailutils/gsasl.h (mu_gsasl_stream_create): Don't use
24477	deprecated GNU SASL types.
24478
244792009-09-24  Sergey Poznyakoff  <gray@gnu.org.ua>
24480
24481	Implement global transcript settings in imap4d and pop3d.
24482
24483	* imap4d/imap4d.c (imap4d_cfg_param): New global statement
24484	'transcript'.
24485	(imap4d_connection): The transcript parameter overrides global
24486	imap4d_transcript settings.
24487	* pop3d/pop3d.c (pop3d_cfg_param, pop3d_connection): Likewise.
24488
244892009-09-24  Sergey Poznyakoff  <gray@gnu.org.ua>
24490
24491	Bugfixes.
24492
24493	* imap4d/util.c (imap4d_getline): Do not report ERR_NO_IFILE if
24494	an empty line is read.
24495	* mailbox/msrv.c (server_section_parser): Catch null tags.
24496
24497	Bugs reported by Simon Josefsson.
24498
244992009-09-24  Sergey Poznyakoff  <gray@gnu.org.ua>
24500
24501	Bugfix.
24502
24503	* libproto/mbox/mboxscan.c (mbox_scan_internal): Fix body size
24504	calculation: -1 was returned for empty body. Bug reported by
24505	Con Tassios <ct@swin.edu.au>.
24506	* po/POTFILES.in: Add mail/mailvar.c
24507
245082009-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
24509
24510	Version 2.1 "Ten Years Later"
24511
24512	* NEWS: Update for version 2.1
24513	* configure.ac: Update for version 2.1
24514	(AM_INIT_AUTOMAKE): Add dist-lzma and dist-xz.
24515	* bootstrap (slurp): Remove call to silentize: not needed with
24516	recent gnulib.
24517
245182009-09-08  Wojciech Polak  <polak@gnu.org>
24519
24520	Correct some pydocs.
24521
245222009-09-02  Wojciech Polak  <polak@gnu.org>
24523
24524	Python: Allow to set mu_pam_service.
24525
24526	* python/libmu_py/auth.c (api_set_pam_service): New function.
24527	* python/mailutils/auth.py (set_pam_service): New function.
24528
245292009-09-01  Wojciech Polak  <polak@gnu.org>
24530
24531	Update NEWS.
24532
245332009-09-01  Sergey Poznyakoff  <gray@gnu.org.ua>
24534
24535	Bugfixes.
24536
24537	* mailbox/assoc.c (mu_assoc_count): Initialize count.
24538	* NEWS: Update.
24539
245402009-08-29  Wojciech Polak  <polak@gnu.org>
24541
24542	Update pydocs.
24543
24544	* python/mailutils/__init__.py: Update pydocs.
24545	* python/mailutils/mailbox.py: Likewise.
24546	* python/mailutils/mailcap.py: Likewise.
24547	* python/mailutils/registrar.py: Likewise.
24548	* python/mailutils/sieve.py: Likewise.
24549
245502009-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
24551
24552	Minor fixes.
24553
24554	* libproto/mailer/smtp.c: fix indentation
24555
245562009-08-28  Sergey Poznyakoff  <gray@gnu.org.ua>
24557
24558	Minor fix.
24559
24560	* libmu_scm/Makefile.am (install-data-hook): Make sure
24561	libguile-mailutils links to the versioned .so file.
24562
245632009-08-27  Wojciech Polak  <polak@gnu.org>
24564
24565	Fix RPM spec.
24566
24567	* mu-aux/mailutils.spec.in: Fix.
24568
245692009-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
24570
24571	Improve configure script.
24572
24573	* configure.ac: New option --with-pythondir
24574	(PYTHON_SITE_DIR, PYTHON_EXEC_DIR): New subst variables.
24575	* python/libmu_py/Makefile.am: use pythonexec_LTLIBRARIES,
24576	instead of pythonexec_LTLIBRARIES.
24577	(pythonexecdir): New variable.
24578	* python/mailutils/Makefile.am: use pythonsite_PYTHON, instead
24579	of pkgpython_PYTHON.
24580	(pythonsitedir): New variable.
24581
245822009-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
24583
24584	Fix leftover diagnostic messages.
24585
24586	* movemail/movemail.c (_cb_mailbox_ownership): Fix leftover
24587	diagnostic messages.
24588	* config/mailutils-config.c (options): Fix typo.
24589
245902009-08-27  Wojciech Polak  <polak@gnu.org>
24591
24592	Update docs.
24593
24594	* doc/texinfo/programs.texi: Update maidag scripting info.
24595
245962009-08-25  Sergey Poznyakoff  <gray@gnu.org.ua>
24597
24598	Minor improvements in comsat and frm.
24599
24600	* comsat/action.c (action_exec): Remove `line' argument. Do not
24601	explicitly add locus to the messages.
24602	(run_user_action): Add locus to diagnostics mu_debug_t, so it
24603	is prepended to all diagnostic messages automatically.
24604	* comsat/comsat.c: Improve help output
24605	* frm/frm.c (attr_help): Remove unnecessary variable.
24606
246072009-08-25  Sergey Poznyakoff  <gray@gnu.org.ua>
24608
24609	Fix help messages.
24610
24611	Option descriptions in `--help' output do not constitute
24612	conceptual sentences. Therefore, they should not begin with a
24613	capital letter, nor end with a final point.
24614
24615	Affected files:
24616
24617	comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c,
24618	frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c,
24619	libmu_argp/auth.c, libmu_argp/common.c, libmu_argp/gsasl.c,
24620	libmu_argp/pam.c, libmu_argp/radius.c, libmu_argp/sieve.c,
24621	libmu_argp/sql.c, libmu_argp/tls.c, libmu_argp/virtdomain.c,
24622	libmu_auth/sql.c, libmu_cfg/sql.c, maidag/maidag.c,
24623	maidag/mailquota.c, maidag/mailtmp.c, mail/mail.c,
24624	messages/messages.c, mh/ali.c, mh/anno.c, mh/burst.c,
24625	mh/comp.c, mh/fmtcheck.c, mh/folder.c, mh/forw.c, mh/inc.c,
24626	mh/install-mh.c, mh/mark.c, mh/mh_init.c, mh/mhl.c, mh/mhn.c,
24627	mh/mhparam.c, mh/mhpath.c, mh/pick.c, mh/refile.c, mh/repl.c,
24628	mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c, mh/sortm.c,
24629	mh/whatnow.c, mh/whom.c, mimeview/mimeview.c,
24630	movemail/movemail.c, pop3d/pop3d.c, pop3d/popauth.c,
24631	readmsg/readmsg.c, sieve/sieve.c
24632
246332009-08-25  Sergey Poznyakoff  <gray@gnu.org.ua>
24634
24635	Change error messages to comply with the GNU standards.
24636
24637	 The string MESSAGE should not begin with a capital letter when
24638	it
24639	 follows a program name and/or file name, because that isn't
24640	the
24641	 beginning of a sentence. (The sentence conceptually starts at
24642	the
24643	 beginning of the line.) Also, it should not end with a period.
24644	* include/mailutils/diag.h (mu_diag_funcall): New prototype.
24645	* mailbox/diag.c: New function.
24646	* comsat/action.c, comsat/comsat.c, comsat/oldcfg.c,
24647	config/mailutils-config.c, configure.ac, dotlock/dotlock.c,
24648	frm/common.c, frm/from.c, guimb/collect.c, guimb/main.c,
24649	guimb/util.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c,
24650	imap4d/bye.c, imap4d/close.c, imap4d/imap4d.c, imap4d/login.c,
24651	imap4d/preauth.c, imap4d/signal.c, imap4d/starttls.c,
24652	imap4d/util.c, lib/mailcap.c, lib/tcpwrap.c,
24653	libmu_argp/mu_argp.c, libmu_auth/ldap.c, libmu_auth/radius.c,
24654	libmu_auth/sql.c, libmu_auth/tls.c, libmu_cfg/acl.c,
24655	libmu_cfg/common.c, libmu_cfg/init.c, libmu_cfg/ldap.c,
24656	libmu_cfg/sql.c, libmu_sieve/actions.c,
24657	libmu_sieve/comparator.c, libmu_sieve/extensions/moderator.c,
24658	libmu_sieve/prog.c, libmu_sieve/sieve.l,
24659	libproto/imap/folder.c, libproto/mbox/mbox.c, maidag/deliver.c,
24660	maidag/lmtp.c, maidag/maidag.c, maidag/mailquota.c,
24661	maidag/mailtmp.c, maidag/script.c, mail/alias.c, mail/cd.c,
24662	mailbox/cfg_lexer.l, mailbox/cfg_parser.y,
24663	mailbox/file_stream.c, mailbox/gocs.c, mailbox/msrv.c,
24664	mailbox/mutil.c, mailbox/registrar.c, messages/messages.c,
24665	mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c, mh/mh_ctx.c,
24666	mh/mh_fmtgram.y, mh/mh_format.c, mh/mh_init.c, mh/mh_list.c,
24667	mh/mh_msgset.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhl.c,
24668	mh/mhn.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c,
24669	mh/scan.c, mh/send.c, mimeview/mimetypes.l,
24670	mimeview/mimeview.c, movemail/movemail.c, pop3d/apop.c,
24671	pop3d/bulletin.c, pop3d/extra.c, pop3d/lock.c,
24672	pop3d/logindelay.c, pop3d/pop3d.c, pop3d/popauth.c,
24673	pop3d/quit.c, pop3d/signal.c, pop3d/user.c, readmsg/readmsg.c,
24674	sieve/sieve.c: Fix error messages.
24675
246762009-08-21  Wojciech Polak  <polak@gnu.org>
24677
24678	Python: Bugfixes.
24679
24680	* python/libmu_py/mailbox.c (api_mailbox_append_message):
24681	Bugfix.
24682	* python/libmu_py/header.c (api_header_get_value_n): New
24683	function.
24684	* python/mailutils/header.py (Header.get_value_n): New method.
24685	* python/mailutils/mailbox.py (Mailbox.__str__): New method.
24686	* python/mailutils/message.py (Message.__str__): Likewise.
24687
246882009-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
24689
24690	Minor fixes.
24691
24692	* .gitignore: Add pathdefs.h
24693	* examples/Makefile.am (muauth_CPPFLAGS)
24694	(muemail_CPPFLAGS): New variables.
24695	* examples/argcv.c (main): Remove unused local.
24696	* include/mailutils/gsasl.h [USE_GSASL]: Change to WITH_GSASL.
24697	* include/mailutils/libcfg.h (mu_acl_cfg_init): New prototype.
24698	* include/mailutils/mu_auth.h (mu_authenticate): Password is
24699	const.
24700	* include/mailutils/python.h: Fix indentation.
24701	(mu_py_script_data): module_name is const char *.
24702	* libmu_auth/radius.c: Include radius/debug.h
24703	* libproto/mailer/smtp.c: Include io.h and secret.h
24704	* mail/mail.c: Fix indentation.
24705	* mail/util.c (util_rfc2047_decode): Fix local variable
24706	declaration.
24707	* mailbox/mu_auth.c (mu_authenticate): Password is const.
24708	* mh/mh.h (mh_alias_get, mh_alias_get_address)
24709	(mh_alias_get_alias): Name is const.
24710	* mh/mh_alias.y: Likewise.
24711	* mh/mh_list.c (print_header_value): Fix improper use of
24712	mu_toupper.
24713	* mh/mh_whatnow.c (invoke): Add typecasts.
24714	* python/libmu_py/nls.c (api_nls_set_locale): Remove unused
24715	automatic.
24716	* python/libmu_py/sieve.c (_sieve_error_printer): Provide
24717	missing return value.
24718	(_sieve_debug_printer): Likewise.
24719
247202009-08-20  Sergey Poznyakoff  <gray@gnu.org.ua>
24721
24722	Movemail: allow to copy mailbox ownership when run as root.
24723
24724	* movemail/movemail.c: Implement new configuration keyword
24725	"mailbox-ownership" (and the --owner command line option).
24726	* doc/texinfo/programs.texi: Document new movemail features.
24727	(Ownership): New subsection stub.
24728	* NEWS: Update
24729
247302009-08-20  Sergey Poznyakoff  <gray@gnu.org.ua>
24731
24732	Fix in configure.ac.
24733
24734	* configure.ac: Use PATH_MAILDIR (without leading underscore).
24735
247362009-08-15  Sergey Poznyakoff  <gray@gnu.org.ua>
24737
24738	Mail: bugfixes.
24739
24740	* mail/file.c: Use "headers" instead of non-standard "z."
24741	* mail/mail.c: Avoid % interpretation in the argument to
24742	util_cache_command.
24743	* mail/util.c (_run_and_free): Avoid % interpretation in the
24744	argument to util_do_command.
24745
247462009-08-14  Sergey Poznyakoff  <gray@gnu.org.ua>
24747
24748	Mail: configurable `headers' output format.
24749
24750	* mail/from.c: Rewrite using format string.
24751	* mail/mail.c (default_setup): Set default value for
24752	`headline'.
24753	(main): Fix call to util_do_command.
24754	* mail/mail.h [HAVE_STDARG_H]: Remove conditions.
24755	(mail_compile_headline): New proto.
24756	* mail/mailvar.c (mailvar_tab): New variable "headline".
24757	* mail/util.c: Minor fixes.
24758	* NEWS, doc/programs.texi: Update.
24759
247602009-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
24761
24762	Minor fixes.
24763
24764	* comsat/comsat.h: Include confpaths.h, not paths.h.
24765	* lib/utmp.c: Likewise.
24766	* libmu_scm/mu_scm.h: Likewise.
24767	* libproto/mailer/sendmail.c: Likewise.
24768	* mail/mail.h: Likewise.
24769	* mailbox/mbx_default.c: Likewise.
24770	* mailbox/version.c: Likewise.
24771	* lib/daemon.c: Likewise.
24772	* include/mailutils/mailer.h (struct timeval): forward decl.
24773
247742009-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
24775
24776	Improve memory allocation in pop3d.
24777
24778	* pop3d/pop3d.c (pop3d_alloc_die): New function.
24779	(main): Set mu_alloc_die_hook.
24780	(pop3d_mainloop): Use mu_alloc.
24781	* pop3d/pop3d.h: Include mailutils/alloc.h
24782
247832009-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
24784
24785	Further improvements of the configure system.
24786
24787	* Makefile.am (MU_COND_LIBMU_CPP): New cond.
24788	(SUBDIRS): Use LIBMU_CPP_DIR
24789	* configure.ac: Rename --disable-c++ to --disable-cxx: autoconf
24790	cannot handle the former.
24791	(MU_COND_LIBMU_CPP): New cond.
24792	(AC_CONFIG_FILES): Add include/mailutils/cpp/Makefile
24793	* include/mailutils/Makefile.am (nobase_pkginclude_HEADERS):
24794	Remove
24795	(MU_COND_LIBMU_CPP): New cond.
24796	(SUBDIRS): Add CPP_DIR
24797	* include/mailutils/cpp/Makefile.am: Remove substitution vars.
24798	(cppincludedir, cppinclude_HEADERS): New variables.
24799	* include/mailutils/sys/Makefile.am (sysincludedir)
24800	(sysinclude_HEADERS): New variables.
24801
248022009-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
24803
24804	Fix building with fribidi2.
24805
24806	* configure.ac: Check for wcwidth and wchar.h.
24807	* frm/common.c (get_charset): Aways allocate output_charset.
24808	Provide a substitution for fribidi_wcwidth if it is not
24809	available.
24810	(puts_bidi): Use mu_fribidi_wcwidth.
24811
248122009-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
24813
24814	Fixes in configure.ac.
24815
24816	* am/enable.m4 (MU_ENABLE_SUPPORT): Change semantics of the
24817	last argument.
24818	(MU_ENABLE_BUILD): 4th argument gives additional conditions for
24819	AM_CONDITIONAL.
24820	* configure.ac: Enable building c++ interface when possible.
24821	Fix checks for guimb and mh utilities.
24822	* libmu_cpp/Makefile.am: Remove unnecessary substitution
24823	variables.
24824
248252009-08-12  Wojciech Polak  <polak@gnu.org>
24826
24827	Restore old CVS ChangeLog.
24828
248292009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
24830
24831	Rewrite conditional compilation support.
24832
24833	* Makefile.am: Conditionally add directories to SUBDIRS.
24834	* am/enable.m4 (MU_ENABLE_BUILD): New macro.
24835	* configure.ac: Require automake 1.11 Add MU_ENABLE_BUILDs for
24836	each utility. Remove unused substitution variables.
24837	* guimb/Makefile.am: Remove substitution variables.
24838	* guimb/scm/Makefile.am: Likewise.
24839	* libmu_scm/Makefile.am: Likewise.
24840	* mh/Makefile.am: Likewise.
24841	* python/libmu_py/Makefile.am: Likewise.
24842	* python/mailutils/Makefile.am: Likewise.
24843	* README: Document --disable-build-* options.
24844
248452009-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>
24846
24847	Minor fix.
24848
24849	* mailbox/mu_auth.c (mu_auth_runlist): Do not overwrite last
24850	meaningful error code by ENOSYS.
24851
248522009-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>
24853
24854	Improve command line and error handling in pop3d.
24855
24856	* pop3d/pop3d.h: Remove unused includes.
24857	(ABORT): New state.
24858	(pop3d_command_handler_t, struct pop3d_command): New types.
24859	(pop3d_find_command): New function.
24860	(pop3d_stat,pop3d_top,pop3d_uidl,pop3d_user,pop3d_apop)
24861	(pop3d_auth,pop3d_capa,pop3d_dele,pop3d_list,pop3d_noop)
24862	(pop3d_quit,pop3d_retr,pop3d_rset): Remove const from the
24863	arguments. Functions are free to modify it.
24864	(pop3d_parse_command): New function.
24865	* pop3d/cmd.c: New file.
24866	* pop3d/Makefile.am: Link in cmd.o
24867	* pop3d/apop.c: Use pop3d_parse_command to parse commands
24868	* pop3d/auth.c: Likewise.
24869	* pop3d/extra.c (pop3d_args, pop3d_cmd): Remove.
24870	(pop3d_parse_command): New function.
24871	(pop3d_abquit): use pop3d_error_string to convert error numbers
24872	to messages.
24873	* pop3d/pop3d.c (cb_bulletin_db): Protect by #ifdef USE_DBM
24874	(pop3d_mainloop): Change loop condition. Use
24875	pop3d_parse_command to parse commands, pop3d_find_command to
24876	lookup handlers in the command table and pop3d_error_string to
24877	convert error numbers to messages.
24878	(main): Call enable_stls if necessary.
24879	* pop3d/capa.c, pop3d/dele.c, pop3d/list.c, pop3d/noop.c,
24880	pop3d/quit.c, pop3d/retr.c, pop3d/rset.c, pop3d/stat.c,
24881	pop3d/stls.c, pop3d/top.c, pop3d/uidl.c, pop3d/user.c: Remove
24882	const qualifier from the command handler argument.
24883
248842009-08-10  Sergey Poznyakoff  <gray@gnu.org.ua>
24885
24886	Minor fixes.
24887
24888	* examples/argcv.c (main): Use fgets instead of getline.
24889	* mail/decode.c (mime_descend): Use util_get_hdr_value which
24890	does not cut off the additional arguments after the ';'.
24891
248922009-08-09  Wojciech Polak  <polak@gnu.org>
24893
24894	Improve C++ and Python APIs.
24895
24896	* include/mailutils/cpp/header.h (Header.has_key): New method.
24897	* libmu_cpp/header.cc: Likewise.
24898	* include/mailutils/cpp/mailbox.h (MailboxDefault): Make name
24899	optional.
24900	* libmu_cpp/mailbox.cc: Likewise.
24901	* python/mailutils/header.py (__contains__, has_key): New
24902	method.
24903
249042009-08-09  Wojciech Polak  <polak@gnu.org>
24905
24906	Update descriptions.
24907
24908	* README: Update.
24909	* doc/texinfo/mailutils.texi: Update.
24910	* mu-aux/mailutils.spec.in: Update.
24911	* direntry: Not used anymore. Remove.
24912
249132009-08-08  Wojciech Polak  <polak@gnu.org>
24914
24915	* mailbox/version.c: Add missing TC DBM info.
24916
249172009-08-08  Wojciech Polak  <polak@gnu.org>
24918
24919	Bugfix.
24920
24921	* python/libmu_py/mailbox.c (api_mailbox_create_default): Make
24922	name optional.
24923	* python/mailutils/mailbox.py (MailboxDefault.__init__):
24924	Likewise.
24925
249262009-08-08  Wojciech Polak  <polak@gnu.org>
24927
24928	Add ESMTP AUTH support.
24929
24930	* libproto/mailer/smtp.c (smtp_auth, cram_md5): New function.
24931
249322009-08-08  Wojciech Polak  <polak@gnu.org>
24933
24934	Move base64 routines to libmailutils.
24935
24936	* mailbox/base64.c: New file.
24937	* imap4d/auth_gss.c: Use mu_base64_encode() and
24938	mu_base64_decode().
24939	* imap4d/util.c (util_base64_encode, util_base64_decode):
24940	Remove.
24941
249422009-08-08  Wojciech Polak  <polak@gnu.org>
24943
24944	Add Tokyo Cabinet DBM support.
24945
24946	* configure.ac: Add new option --with-tokyocabinet.
24947	* lib/mu_dbm.c: Add Tokyo Cabinet support.
24948	* lib/mu_dbm.h: Likewise.
24949	* pop3d/popauth.c: Likewise.
24950
249512009-08-05  Wojciech Polak  <polak@gnu.org>
24952
24953	* configure.ac: Fix typo.
24954
249552009-08-04  Wojciech Polak  <polak@gnu.org>
24956
24957	Fix readmsg's printing the last message in the mailbox ($).
24958
24959	* readmsg/msglist.c (msglist): Bugfix.
24960
249612009-08-04  Wojciech Polak  <polak@gnu.org>
24962
24963	Fix movemail --uidl.
24964
24965	* mailbox/message.c (mu_message_get_uidl): Do not remove angle
24966	brackets from X-UIDL header.
24967
249682009-08-04  Sergey Poznyakoff  <gray@gnu.org.ua>
24969
24970	Minor changes.
24971
24972	* NEWS: Reword some passages.
24973	* mail/mail.c: Fix indentation.
24974	* mailbox/folder.c (mu_folder_create): Return meaningful error
24975	code.
24976
249772009-08-01  Wojciech Polak  <polak@gnu.org>
24978
24979	Enable GNU TLS by default.
24980
24981	* am/tls.m4: Use --without-gnutls instead of --with-gnutls.
24982
249832009-07-31  Wojciech Polak  <polak@gnu.org>
24984
24985	* Makefile.am: Bugfix. Build libmu_sieve before libmu_py.
24986
249872009-07-29  Wojciech Polak  <polak@gnu.org>
24988
24989	Add SieveMachine to C++/Python.
24990
24991	* include/mailutils/cpp/sieve.h: New file.
24992	* libmu_cpp/sieve.cc: New file.
24993	* python/libmu_py/sieve.c: New file.
24994	* python/mailutils/sieve.py: New file.
24995	* include/mailutils/cstr.h: Do not use C++ keywords.
24996	* include/mailutils/tls.h: Likewise.
24997
249982009-07-14  Wojciech Polak  <polak@gnu.org>
24999
25000	Add NLS to libmu_py.
25001
25002	* python/libmu_py/nls.c: New file.
25003	* python/mailutils/nls.py: Likewise.
25004
250052009-07-13  Wojciech Polak  <polak@gnu.org>
25006
25007	Add more is/set/unset attribute methods (Python).
25008
25009	* python/libmu_py/attribute.c: Add userflag functions.
25010	* python/mailutils/attribute.py: Add more is/set/unset methods.
25011	* python/mailutils/mailbox.py (open): Bugfix.
25012
250132009-07-13  Sergey Poznyakoff  <gray@gnu.org.ua>
25014
25015	Fixes in client pop3.
25016
25017	* libproto/pop/mbox.c (pop_get_message): Make sure the mailbox
25018	is scanned.
25019	(pop_top): Handle -ERR case.
25020
250212009-07-13  Sergey Poznyakoff  <gray@gnu.org.ua>
25022
25023	mail: implement struct command.
25024
25025	* NEWS, doc/texinfo/programs.texi: Document struct command.
25026	* mail/struct.c: New file.
25027	* mail/Makefile.am (mail_SOURCES): Add struct.c
25028	* mail/decode.c (fprint_msgset, mime_descend): New functions.
25029	Rewrite the rest using mime_descend.
25030	* mail/mail.h (mail_struct): New function.
25031	(MDHINT_SELECTED_HEADERS): New define.
25032	(struct mime_descend_closure, mime_descend_fn): New types.
25033	(mime_descend): New proto.
25034	(util_get_content_type): Get two arguments.
25035	* mail/table.c (mail_command_table): Add st[ruct].
25036	* mail/util.c (util_get_content_type): Get two arguments. All
25037	callers updated.
25038	(util_get_hdr_value): use mu_header_aget_value_unfold and
25039	mu_rtrim_class.
25040
250412009-07-12  Paul Vojta  <vojta@math.berkeley.edu>
25042
25043	Fix the way mail accounts for the status of messages.
25044
25045	* mail/mail.h (MAIL_ATTRIBUTE_PRESERVED)
25046	(MAIL_ATTRIBUTE_TOUCHED): New define.
25047	* mail/from.c (mail_from0): Mark with 'R' only those messages
25048	that have been read in this mail session.
25049	* mail/hold.c (hold0): Set MAIL_ATTRIBUTE_PRESERVED
25050	* mail/mbox.c (mbox0): Don't mark message as read.
25051	* mail/quit.c (mail_mbox_commit): Force keepsave on not system
25052	mailboxes.
25053	* mail/touch.c: Use MAIL_ATTRIBUTE_TOUCHED
25054	* mail/undelete.c: Clear MAIL_ATTRIBUTE_PRESERVED and
25055	MAIL_ATTRIBUTE_MBOXED bits.
25056	* mail/testsuite/mail/write.exp: Account for the above changes.
25057
250582009-07-12  Sergey Poznyakoff  <gray@gnu.org.ua>
25059
25060	Implement `mail -F'.
25061
25062	* NEWS, doc/texinfo/programs.texi: Update.
25063	* mail/mail.c (parse_opt): Remove the fixme.
25064	* mail/mailvar.c (mailvar_tab): Add `byname'.
25065	* mail/reply.c (reply0): Use `byname' when deciding where to
25066	save the message.
25067	* mail/util.c: Fix comment.
25068
250692009-07-12  Sergey Poznyakoff  <gray@gnu.org.ua>
25070
25071	Further improvements in `mail'.
25072
25073	* NEWS: Update.
25074	* mail/mail.h (MOPTF_UNSET): New constant.
25075	* mail/mailvar.c (MAILVAR_TYPEMASK): New define.
25076	(struct mailvar_symbol): Remove `type'. Add `handler'. The
25077	latter supplies special handling for certain variables.
25078	(mailvar_tab): Update accordingly. Implement "debug" variable.
25079	(mailvar_set): Enforce correct variable type in variable-strict
25080	mode. Handle MOPTF_UNSET flag. Remove kludgy special handling
25081	for some attributes, use sym->handler instead.
25082	(set_decode_fallback, set_replyregex)
25083	(set_screen, set_mailbox_debug_level, set_debug): New
25084	functions.
25085	(describe_symbol): Handle alternative symbol types.
25086	* mail/set.c: Use MOPTF_UNSET when unsetting the variable.
25087	* mail/source.c: Set correct locus. This allows to display
25088	locations along with error messages.
25089
250902009-07-12  Sergey Poznyakoff  <gray@gnu.org.ua>
25091
25092	Improve mail compliance to POSIX standard.
25093
25094	* mail/mail.c: Redo -f option handling to fully comply to POSIX
25095	Set default diagnostics printer for interactive mode.
25096	* NEWS, doc/texinfo/programs.texi: Document the use of -f
25097	option.
25098
250992009-07-11  Sergey Poznyakoff  <gray@gnu.org.ua>
25100
25101	Improve internal variable handling in mail. Implement envelope
25102	and variable commands.
25103
25104	* NEWS: Update.
25105	* doc/texinfo/programs.texi: Document new variables and
25106	commands.
25107	* mail/envelope.c: New file.
25108	* mail/mailvar.c: New file.
25109	* mail/Makefile.am (mail_SOURCES): Add envelope.c and
25110	mailvar.c.
25111	* mail/mail.h (EF_HIDDEN): New constant (mail_env_data_t,
25112	mail_env_entry, mail_env_entry_is_set) (mail_env_entry,
25113	util_getenv, util_printenv, util_setenv) (var_iterator_t,
25114	var_iterate_next, var_iterate_first)
25115	(var_iterate_end, var_compl): Removed.
25116
25117	(union mailvar_value, struct mailvar_variable (mail_variable,
25118	mail_envelope, print_envelope) (mailvar_find_variable,
25119	mailvar_get, mailvar_print)
25120	(mailvar_variable_format, mailvar_set, mailvar_set_compl): Add
25121	prototypes. (MOPTF_OVERWRITE, MOPTF_QUIET)
25122	* mail/table.c: List new commands: envelope, setq, variable.
25123	Implement completion for `set'.
25124	* mail/testsuite/mail/if.exp: Use setq to set a read-only
25125	variable.
25126
25127	mail/alias.c, mail/decode.c, mail/delete.c, mail/escape.c
25128	mail/file.c, mail/folders.c, mail/from.c, mail/if.c,
25129	mail/mail.c, mail/mailline.c, mail/msgset.y, mail/pipe.c,
25130	mail/print.c, mail/quit.c, mail/reply.c, mail/send.c,
25131	mail/set.c, mail/shell.c, mail/top.c, mail/unset.c,
25132	mail/util.c: Use mailvar functions.
25133
251342009-07-11  Wojciech Polak  <polak@gnu.org>
25135
25136	Add mailbox.get_uidls() to Python/C++.
25137
25138	* libmu_cpp/mailbox.cc (get_uidls): New method.
25139	* python/libmu_py/mailbox.c (api_mailbox_get_uidls): New
25140	function.
25141	* python/mailutils/mailbox.py (get_uidls): New method.
25142
251432009-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
25144
25145	Minor fixes.
25146
25147	* libmu_auth/ldap.c: Include mailutils/cstr.h.
25148	* libmu_auth/sql.c: Likewise.
25149	* mimeview/mimetypes.y: Use mu_tolower, instead of tolower.
25150
251512009-07-08  Sergey Poznyakoff  <gray@gnu.org.ua>
25152
25153	Implement the mu_mailbox_get_uidls function and --uidl option
25154	in movemail.
25155
25156	* include/mailutils/mailbox.h (MU_UIDL_LENGH)
25157	(MU_UIDL_BUFFER_SIZE): New defines.
25158	(struct mu_uidl): New struct.
25159	(mu_mailbox_get_uidls): New prototype.
25160	* libproto/include/mailbox0.h (struct _mu_mailbox): New member
25161	_get_uidls.
25162	* libproto/pop/mbox.c: Implement _get_uidls.
25163	* libproto/pop/folder.c: Include mailutils/cctype.h.
25164	* mailbox/mailbox.c (mu_mailbox_get_uidls): New function.
25165	* movemail/movemail.c: Implement --uidl option: use UIDLs to
25166	avoid downloading same messages twice. Based on the idea of
25167	Alfred M. Szmidt. Implement --verbose option.
25168	* libproto/imap/mbox.c: Fix comment.
25169	* NEWS: Update.
25170	* doc/texinfo/programs.texi: Update.
25171
251722009-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
25173
25174	Update include/.gitignore.
25175
251762009-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
25177
25178	Use new string trimming functions in parsers.
25179
25180	* include/mailutils/cstr.h (mu_str_stripws): New function.
25181	* mailbox/stripws.c: New file.
25182	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add stripws.c
25183	* examples/nntpclient.c (stripwhite): Remove. Use
25184	mu_str_stripws instead.
25185	(execute_line): Rewrite using new string functions.
25186	* examples/pop3client.c: Likewise.
25187	* mailbox/mailcap.c (stripwhite): Remove. Use mu_str_stripws
25188	instead.
25189	* mailbox/mime.c (_strltrim, _strttrim, _strtrim): Remove. Use
25190	mu_str_stripws instead.
25191	* mail/mail.c: Use mu_str_stripws.
25192	* mail/mail.h (util_stripwhite): Remove prototype.
25193	* mail/util.c (util_stripwhite): Remove
25194	* examples/pop3client.c: Likewise.
25195	* imap4d/util.c: Use new string functions.
25196	* maidag/forward.c: Likewise.
25197	* maidag/lmtp.c: Likewise.
25198	* mh/mhn.c: Likewise.
25199	* libproto/imap/folder.c: Remove unused local.
25200	* libproto/mailer/smtp.c (smtp_writeline): Minor optimization.
25201
252022009-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
25203
25204	Minor changes.
25205
25206	* include/mailutils/cstr.h (mu_str_skip_class_comp)
25207	(mu_str_skip_cset_comp): New prototypes.
25208	* mailbox/strskip.c (mu_str_skip_class_comp)
25209	(mu_str_skip_cset_comp): New functions.
25210	* libmu_auth/ldap.c (find_pwcheck): Fix typo in function call.
25211	* libproto/pop/mbox.c: Fix typos in diagnostic messages.
25212
252132009-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
25214
25215	Introduce locale-independent character type and string
25216	functions.
25217
25218	* include/mailutils/cctype.h: New file.
25219	* include/mailutils/cstr.h: New file.
25220	* include/mailutils/Makefile.am: Add new files.
25221	* mailbox/cstrcasecmp.c: New file.
25222	* mailbox/cstrlower.c: New file.
25223	* mailbox/cstrupper.c: New file.
25224	* mailbox/muctype.c: New file.
25225	* mailbox/strltrim.c: New file.
25226	* mailbox/strrtrim.c: New file.
25227	* mailbox/strskip.c: New file.
25228	* mailbox/Makefile.am: Add new files.
25229	* .gitignore: Update
25230	* gnulib.modules: Remove strcase.
25231	* comsat/comsat.h, imap4d/imap4d.h,
25232	include/mailutils/mailutils.h, include/mailutils/mutil.h,
25233	include/mailutils/sys/pop3.h, libmu_scm/mu_scm.h, mail/mail.h:
25234	Include cstr.h and cctype.h.
25235	* comsat/oldcfg.c, config/mailutils-config.c,
25236	examples/mimetest.c, examples/mta.c, examples/nntpclient.c,
25237	examples/pop3client.c, imap4d/append.c, imap4d/create.c,
25238	imap4d/delete.c, imap4d/fetch.c, imap4d/id.c, imap4d/idle.c,
25239	imap4d/list.c, imap4d/namespace.c, imap4d/rename.c,
25240	imap4d/search.c, imap4d/status.c, imap4d/store.c, imap4d/uid.c,
25241	imap4d/util.c, libmu_argp/compat.c, libmu_auth/ldap.c,
25242	libmu_auth/sql.c, libmu_scm/mu_message.c,
25243	libmu_sieve/actions.c, libmu_sieve/comparator.c,
25244	libmu_sieve/extensions/list.c, libmu_sieve/extensions/spamd.c,
25245	libmu_sieve/extensions/vacation.c, libmu_sieve/load.c,
25246	libmu_sieve/sieve.l, libmu_sieve/tests.c,
25247	libproto/imap/folder.c, libproto/mailer/smtp.c,
25248	libproto/mbox/mbox.c, libproto/mh/folder.c, libproto/mh/mbox.c,
25249	libproto/pop/folder.c, libproto/pop/mbox.c,
25250	libproto/pop/pop3_connect.c, maidag/forward.c, maidag/lmtp.c,
25251	maidag/maidag.c, maidag/maidag.h, maidag/mailquota.c,
25252	mail/alt.c, mail/copy.c, mail/decode.c, mail/escape.c,
25253	mail/followup.c, mail/mail.c, mail/mailline.c, mail/msgset.y,
25254	mail/print.c, mail/reply.c, mail/send.c, mail/shell.c,
25255	mail/util.c, mail/write.c, mailbox/address.c, mailbox/amd.c,
25256	mailbox/assoc.c, mailbox/attachment.c, mailbox/attribute.c,
25257	mailbox/cfg_lexer.l, mailbox/date.c, mailbox/filter.c,
25258	mailbox/gdebug.c, mailbox/header.c, mailbox/kwd.c,
25259	mailbox/locale.c, mailbox/mailcap.c, mailbox/mailer.c,
25260	mailbox/message.c, mailbox/message_stream.c, mailbox/mime.c,
25261	mailbox/msrv.c, mailbox/mutil.c, mailbox/parse822.c,
25262	mailbox/progmailer.c, mailbox/rfc2047.c, mailbox/syslog.c,
25263	mailbox/url.c, mailbox/version.c, mh/mh.h, mh/mh_alias.l,
25264	mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_init.c, mh/mh_list.c,
25265	mh/mh_msgset.c, mh/mh_sequence.c, mh/mh_whatnow.c,
25266	mh/mh_whom.c, mh/mhn.c, mh/mhparam.c, mh/pick.y, mh/sortm.c,
25267	mimeview/mimetypes.y, pop3d/bulletin.c, pop3d/expire.c,
25268	pop3d/pop3d.c, pop3d/pop3d.h, pop3d/popauth.c, pop3d/user.c,
25269	readmsg/msglist.c, readmsg/readmsg.c, readmsg/readmsg.h,
25270	sql/mysql.c, sql/postgres.c: Use locale-independent cclass and
25271	str functions.
25272
252732009-07-06  Sergey Poznyakoff  <gray@gnu.org.ua>
25274
25275	Define the necessary PATH_ constants.
25276
25277	* paths: New file.
25278	* am/config_paths.m4: New file.
25279	* include/confpaths.h.in: New file.
25280	* Makefile.am (EXTRA_DIST): Add paths.
25281	(DISTCLEANFILES): Add pathdefs.h
25282	* configure.ac: Invoke MU_CONFIG_PATHS
25283	(AC_CONFIG_FILES): Add include/confpaths.h
25284	* include/Makefile.am (EXTRA_DIST): Add confpaths.h.in
25285	* lib/utmp.c, libmu_scm/mu_scm.c, libproto/mailer/sendmail.c,
25286	mail/mail.c: Use PATH_* constants.
25287	* mail/mail.h: Remove definition of _PATH_SENDMAIL.
25288	* .gitignore, include/.gitignore: Update.
25289
252902009-07-05  Wojciech Polak  <polak@gnu.org>
25291
25292	Fix libmu_cpp compilation.
25293
25294	* examples/cpp/http.cc, examples/cpp/iconv.cc,
25295	examples/cpp/lsf.cc, examples/cpp/mailcap.cc,
25296	examples/cpp/msg-send.cc, examples/cpp/sfrom.cc,
25297	libmu_cpp/message.cc, libmu_cpp/mutil.cc, libmu_cpp/pop3.cc:
25298	Include missing <cstdlib>.
25299
253002009-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
25301
25302	Add maintainer-specific files.
25303
25304	* maint.mk: New file.
25305	* config/maint.mk: New file.
25306	* README-hacking: Update.
25307
253082009-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
25309
25310	Fix namespaces and inclusion directories.
25311
25312	* README-hacking: Update.
25313	* configure.ac (MU_COMMON_INCLUDES): Remove.
25314	(MU_LIB_COMMON_INCLUDES,MU_APP_COMMON_INCLUDES): New variables.
25315	Link lib/gettext.h and lib.intprops.h to include.
25316	* gnulib.modules: Remove fnmatch.
25317	* comsat/Makefile.am, config/Makefile.am, dotlock/Makefile.am,
25318	frm/Makefile.am, guimb/Makefile.am, imap4d/Makefile.am,
25319	maidag/Makefile.am, mail/Makefile.am, movemail/Makefile.am,
25320	pop3d/Makefile.am, python/libmu_py/Makefile.am,
25321	readmsg/Makefile.am sieve/Makefile.am (INCLUDES): Use
25322	MU_APP_COMMON_INCLUDES
25323	* lib/Makefile.am, examples/Makefile.am,
25324	libmu_argp/Makefile.am, libmu_auth/Makefile.am,
25325	libmu_cpp/Makefile.am, libmu_sieve/Makefile.am,
25326	libproto/imap/Makefile.am, libproto/mailer/Makefile.am,
25327	libproto/mh/Makefile.am, libproto/nntp/Makefile.am,
25328	libproto/pop/Makefile.am, mailbox/Makefile.am,
25329	mapi/Makefile.am, messages/Makefile.am, mh/Makefile.am,
25330	sql/Makefile.am (INCLUDES): Use MU_LIB_COMMON_INCLUDES
25331
253322009-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
25333
25334	Minor changes.
25335
25336	* examples/mta.c: Remove include mu_asprintf.h.
25337	* libmu_auth/radius.c: Remove include inttostr.h.
25338	* libmu_scm/mu_dbgport.c: Silence gcc warnings.
25339	* libmu_sieve/extensions/pipe.c: Remove include <mu_dbm.h>.
25340	* libmu_sieve/sieve-priv.h: Remove include mu_asprintf.h.
25341	* maidag/python.c: Remove unused locals.
25342	* python/libmu_py/address.c: Likewise.
25343	* python/libmu_py/auth.c: Likewise.
25344	* python/libmu_py/body.c: Likewise.
25345	* python/libmu_py/secret.c: Likewise.
25346	* python/libmu_py/stream.c: Likewise.
25347	* python/libmu_py/url.c: Likewise.
25348	* python/libmu_py/util.c: Likewise.
25349
253502009-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
25351
25352	Bugfixes.
25353
25354	* mailbox/debug.c (mu_debug_printv): use mu_debug_vprintf
25355	* mailbox/message_stream.c (restore_envelope): supplied sender
25356	address must be a single word.
25357
253582009-06-18  Sergey Poznyakoff  <gray@gnu.org.ua>
25359
25360	Bugfix.
25361
25362	* mailbox/mutil.c (mu_fd_wait): Handle exceptions.
25363
253642009-05-28  Wojciech Polak  <polak@gnu.org>
25365
25366	Add Secret class to Python interface.
25367
25368	* python/libmu_py/secret.c: New file.
25369	* python/mailutils/secret.py: New file.
25370	* python/mailutils/url.py (get_secret): New method.
25371	(get_passwd): Remove.
25372	* python/mailutils/mailbox.py (MailboxBase.open): Access mode
25373	argument value can be now one of the following strings: "r",
25374	"w", "a", "c".
25375
253762009-05-26  Wojciech Polak  <polak@gnu.org>
25377
25378	Add Secret class to libmu_cpp.
25379
253802009-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
25381
25382	Enable Makefile silent rules.
25383
25384	* Makefile.am (AUTOMAKE_OPTIONS): Remove.
25385	* bootstrap: Import from mailfromd.
25386	* configure.ac: Require autoconf 2.63 Enable silent-rules mode
25387	by default.
25388	* guimb/scm/Makefile.am: Add silent-rules markers.
25389	* include/mailutils/Makefile.am: Likewise.
25390	* libmu_scm/Makefile.am: Likewise.
25391	* testsuite/Makefile.am: Likewise.
25392
253932009-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
25394
25395	Bugfix.
25396
253972009-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
25398
25399	Minor changes.
25400
25401	* guimb/main.c (main_sym): Remove const qualifier.
25402	* imap4d/imap4d.h (util_getfullpath): 1st arg is const.
25403	* imap4d/util.c: Likewise.
25404	* include/mailutils/guile.h (mu_guile_load): 1st arg is const.
25405	* include/mailutils/sql.h (mu_sql_get_field): 3rd arg is const.
25406	* libmu_auth/radius.c: Cleanup trailing whitespace.
25407	* libmu_scm/mu_guile.c (mu_guile_load): 1st arg is const.
25408	(struct load_closure): Filename is const. All uses updated.
25409	* mailbox/monitor.c (RWLOCK_TRYRDLOCK, RWLOCK_TRYWRLOCK):
25410	Remove
25411	[!WITH_PTHREAD] (RWLOCK_DESTROY): Empty define.
25412	* mailbox/mutil.c (mu_aget_user_email_domain): Minor fix.
25413	* sql/sql.c (mu_sql_get_field): 3rd arg is const.
25414
254152009-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
25416
25417	* include/mailutils/secret.h: New file. *
25418	include/mailutils/types.hin (mu_secret_t): New type. *
25419	include/mailutils/auth.h (mu_ticket_destroy): Remove 2nd arg
25420	(owner). (mu_ticket_ref, mu_ticket_unref): New functions.
25421	(mu_ticket_set_destroy): New function. (mu_ticket_set_pop):
25422	Remove. (mu_ticket_get_cred, mu_ticket_set_get_cred): New
25423	functions. (mu_ticket_get_data): Return data pointer.
25424	(mu_ticket_set_secret, mu_ticket_set_plain): New functions.
25425	(mu_wicket_create): Remove 2nd arg. (mu_wicket_set_filename,
25426	mu_wicket_get_filename): Remove. (mu_wicket_set_ticket):
25427	Remove. (mu_wicket_get_ticket): Change proto.
25428	(mu_wicket_set_destroy, mu_wicket_set_data)
25429	(mu_wicket_get_data, mu_wicket_set_get_ticket): New functions.
25430	(mu_file_wicket_create): New function. *
25431	include/mailutils/mailutils.h: Include secret.h [MU_COMPAT]:
25432	Remove. * include/mailutils/url.h (mu_url_sget_passwd,
25433	mu_url_aget_passwd) (mu_url_get_passwd) (mu_url_get_secret):
25434	New function.
25435
25436	* libproto/include/auth0.h: Rewrite.
25437	* libproto/include/imap0.h (struct _f_imap): Replace passwd
25438	with mu_secret_t secret.
25439	* libproto/include/url0.h (struct _mu_url): Replace passwd with
25440	mu_secret_t secret.
25441	(_get_passwd): Replace with _get_secret
25442	* mailbox/secret.c: New function.
25443	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add secret.c.
25444	* mailbox/ticket.c: Rewrite from scratch.
25445	* mailbox/wicket.c: Rewrite from scratch.
25446	* libproto/imap/folder.c: Rewrite using mu_secret_t.
25447	* libproto/pop/mbox.c: Rewrite using mu_secret_t.
25448	* libproto/mailer/prog.c, libproto/mailer/sendmail.c,
25449	mailbox/auth.c, mailbox/url.c, movemail/movemail.c: Reflect
25450	changes to ticket/wicket system.
25451	* mailbox/mbx_default.c: Use new mu_wicket_t functions.
25452	* python/libmu_py/auth.c (api_wicket_get_filename)
25453	(api_wicket_set_filename): Remove. Not applicable any more.
25454	* python/libmu_py/url.c (api_url_get_passwd): Temporarily
25455	commented out.
25456	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
25457	secret.h.
25458	* examples/url-parse.c: Use mu_secret_t calls.
25459	* imap4d/namespace.c: Minor changes.
25460	* libmu_auth/pam.c: Likewise.
25461
254622009-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
25463
25464	Fix some special cases of using mu_app_init.
25465
25466	* libmu_argp/muinit.c (mu_app_init): Allow capa==NULL.
25467	* mailbox/cfg_driver.c (mu_config_clone_container): Do nothing
25468	if cont == NULL.
25469
254702009-05-19  Sergey Poznyakoff  <gray@gnu.org.ua>
25471
25472	Bugfixes.
25473
25474	* maidag/deliver.c: Run filter scripts with user privileges.
25475	* maidag/script.c (apply_script): Use stat, not access, to
25476	check for the existence of the script file. Access takes into
25477	account accessibility of intermediate directories, which is
25478	irrelevant in this case.
25479	* mailbox/mutil.c (mu_expand_path_pattern): Bugfix. Remove the
25480	% format specifiers after expanding them.
25481
254822009-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>
25483
25484	Bugfixes.
25485
25486	* mailbox/filter.c (filter_close): Do not close transport
25487	stream if the MU_STREAM_NO_CLOSE flag is set.
25488	* imap4d/fetch.c (fetch_io): Fix memory leak: open the filter
25489	with MU_STREAM_NO_CLOSE flag and destroy it after use.
25490	* include/mailutils/header.h (mu_header_set_stream): Comment
25491	out. There is no such function, but perhaps there should be?
25492	* libproto/mbox/folder.c (_folder_mbox_init): If there is no
25493	explicit path in the URL, use ".". This makes it possible to
25494	use URLs like: mbox:file.
25495	* mailbox/nls.c (mu_set_locale) [ENABLE_NLS]: Remove ifdef.
25496	Setlocale must be enabled whenever possible, otherwise we
25497	cannot relay on mu_strftime malfunctions in non-english
25498	locales.
25499	* mh/mh_whom.c (mh_alias_expand): Handle NULL or empty inputs.
25500
255012009-04-16  Sergey Poznyakoff  <gray@gnu.org.ua>
25502
25503	Minor changes.
25504
25505	* include/mailutils/address.h (struct _mu_address): Rename to
25506	struct mu_address: it is public interface.
25507	* include/mailutils/types.hin: Likewise.
25508	* examples/addr.c: Likewise.
25509	* mailbox/address.c: Likewise.
25510	* mailbox/parse822.c: Likewise.
25511	* libmu_sieve/extensions/vacation.c (vacation_reply): Fix
25512	memory leaks.
25513	* libproto/mailer/mbox.c (remote_mbox_append_message): Use
25514	mu_address_create_hint instead of
25515	mu_set_user_email_domain/mu_address_create.
25516	* maidag/maidag.c (main): Set both diag and debug printers
25517	explicitly.
25518	* mail/from.c (mail_from0): minor change.
25519	* mail/reply.c (reply0): Fix memory leak.
25520	* mailbox/header.c: minor change.
25521
255222009-04-15  Sergey Poznyakoff  <gray@gnu.org.ua>
25523
25524	Improve RFC822 address parsing.
25525
25526	* examples/addr.c: Allow to modify hints via command line (-v)
25527	and within the shell (\...).
25528	* include/mailutils/address.h (MU_ADDR_HINT_*): New defines.
25529	(struct _mu_address): Definition.
25530	(mu_address_create_hint): New prototype.
25531	* include/mailutils/parse822.h (mu_parse822_address_list)
25532	(mu_parse822_mail_box, mu_parse822_group) (mu_parse822_address,
25533	mu_parse822_route_addr) (mu_parse822_route,
25534	mu_parse822_addr_spec)
25535	(mu_parse822_unix_mbox, mu_parse822_local_part): Take hint and
25536	hint flags.
25537	* mailbox/parse822.c: Likewise.
25538	* libproto/include/Makefile.am (noinst_HEADERS): Remove
25539	address0.h
25540	* libproto/include/address0.h: Removed.
25541	* mailbox/address.c (mu_address_create_hint): New function.
25542	(mu_address_create): Rewrite using mu_address_create_hint.
25543	* mh/mh_init.c (mh_expand_aliases): Use
25544	mu_header_sget_field_name
25545	* mh/mh_whom.c (mh_alias_expand): Rewrite using
25546	mu_address_create_hint. This fixes parsing addresses similar to
25547	"a@b <a@b>".
25548	* mh/send.c: New command line option --preserve (--keep)
25549
255502009-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
25551
25552	Allow to set user's personal namespace in imap4d.
25553
25554	* imap4d/imap4d.c (homedir): Remove variable.
25555	(real_homedir, imap4d_homedir, modify_homedir): New variables.
25556	(imap4d_cfg_param): New statements: homedir,
25557	personal-namespace.
25558	(imap4d_session_setup0): Initialize real_homedir and
25559	imap4d_homedir.
25560	* imap4d/imap4d.h (homedir, rootdir): Remove declarations.
25561	(real_homedir, imap4d_homedir, modify_homedir): New
25562	declarations. Include mailutils/vartab.h.
25563	* imap4d/list.c, imap4d/lsub.c, imap4d/namespace.c,
25564	imap4d/subscribe.c, imap4d/unsubscribe.c, imap4d/util.c: Use
25565	imap4d_homedir and real_homedir, where appropriate.
25566	* NEWS: Update.
25567	* imap4d/preauth.c: Remove inclusion of mailutils/vartab.h
25568
255692009-04-13  Sergey Poznyakoff  <gray@gnu.org.ua>
25570
25571	Bugfix.
25572
25573	* libproto/imap/folder.c (imap_list): Fix memory overrun. Set
25574	response->level.
25575
255762009-04-07  Sergey Poznyakoff  <gray@gnu.org.ua>
25577
25578	Bugfix.
25579
25580	* mailbox/mbx_default.c (mu_mailbox_create_default): Reset mail
25581	to NULL if it is "".
25582
255832009-04-07  Sergey Poznyakoff  <gray@gnu.org.ua>
25584
25585	Allow to use mailer URLs as append-only mailboxes (deprecates
25586	remote+ mailboxes)
25587
25588	* NEWS: Update.
25589	* configure.ac (MU_LIB_REMOTE): Remove.
25590	(AC_CONFIG_FILES): Remove libproto/remote/Makefile.
25591	* include/mailutils/registrar.h (mu_remote_mbox_record):
25592	Remove.
25593	(MU_REMOTE_MBOX_PRIO): Remove.
25594	* libproto/Makefile.am (SUBDIRS): Remove remote.
25595	* libproto/include/mailer0.h (_mu_mailer_mailbox_init)
25596	(_mu_mailer_folder_init): New protos.
25597	* libproto/include/registrar0.h (_url_smtp_init)
25598	(_mailer_smtp_init): Remove.
25599	(_mu_mailer_sendmail_init, _mu_mailer_prog_init): Add
25600	prototype.
25601	* libproto/include/url0.h (struct _mu_url._uplevel): New
25602	member.
25603	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Remove
25604	url_sendmail.c and url_smtp.c.
25605	* libproto/mailer/mbox.c: Move from ../remote.
25606	* libproto/mailer/url_sendmail.c: Remove.
25607	* libproto/mailer/url_smtp.c: Remove.
25608	* libproto/mailer/prog.c: Fix namespace.
25609	* libproto/mailer/sendmail.c: Likewise.
25610	* libproto/mailer/smtp.c: Likewise.
25611	* libproto/mailer/remote.c: New file.
25612	* libproto/remote/: Remove.
25613	* maidag/Makefile.am (maidag_LDADD): Remove ${MU_LIB_REMOTE}.
25614	* maidag/deliver.c (deliver_url): Remove `remote+' hack.
25615	(deliver): Fix error message.
25616	* maidag/guile.c: Fix indentation.
25617	* maidag/maidag.c: Support `remote+' mailboxes for backward
25618	compatibility.
25619	* mailbox/mailbox.c (_create_mailbox0): Call u_init after
25620	ensuring that url->scheme coincides with record->scheme.
25621	* mailbox/url.c (mu_url_uplevel): Use url->_uplevel, if
25622	defined.
25623	* libmu_argp/mu_argp.h (mu_check_option): Remove duplicate and
25624	incorrect prototype.
25625
256262009-04-06  Sergey Poznyakoff  <gray@gnu.org.ua>
25627
25628	Bugfix.
25629
25630	* libproto/remote/folder.c (_remote_is_scheme): Fix invalid
25631	return value.
25632
256332009-03-30  Wojciech Polak  <polak@gnu.org>
25634
25635	Capture Python output in maidag.
25636
25637	* include/mailutils/python.h (mu_py_capture_stdout,
25638	mu_py_capture_stderr): New prototypes.
25639	* maidag/python.c (python_check_msg): Redirect output.
25640
256412009-03-28  Sergey Poznyakoff  <gray@gnu.org.ua>
25642
25643	Bugfixes.
25644
25645	* libmu_scm/mailutils.scm.in: Remove leftover reference to
25646	mu_guimb.inc
25647
256482009-03-28  Sergey Poznyakoff  <gray@gnu.org.ua>
25649
25650	Bugfixes.
25651
25652	* imap4d/copy.c: Set target mailbox permissions.
25653	* imap4d/rename.c: Remove useless variable. Add some comments.
25654
256552009-03-27  Sergey Poznyakoff  <gray@gnu.org.ua>
25656
25657	Implement guile output redirection in maidag.
25658
25659	* libmu_scm/mu_guimb.c: Remove
25660	* libmu_scm/mu_dbgport.c: New file.
25661	* libmu_scm/Makefile.am: Update.
25662	* include/mailutils/guile.h (mu_process_mailbox): Remove.
25663	(mu_scm_make_debug_port, mu_scm_debug_port_init): New
25664	prototypes.
25665	* libmu_scm/mu_scm.c (mu_scm_init): Call
25666	mu_scm_debug_port_init.
25667	* maidag/guile.c (scheme_check_msg): Redirect error/output to
25668	MU port.
25669	* mailbox/mutil.c (mu_expand_path_pattern): Expand ~.
25670
256712009-03-27  Sergey Poznyakoff  <gray@gnu.org.ua>
25672
25673	Finish removing mail.local and mail.remote.
25674
256752009-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
25676
25677	Remove mail.local and mail.remote, Maidag should be used
25678	instead.
25679
25680	* mail.local: Remove.
25681	* mail.remote: Remove.
25682	* Makefile.am, configure.ac: Update.
25683	* doc/texinfo/mailutils.texi: Rebuild master menu.
25684	* doc/texinfo/programs.texi: Update.
25685
256862009-03-25  Wojciech Polak  <polak@gnu.org>
25687
25688	Return int from mu_py_init_*()
25689
256902009-03-25  Wojciech Polak  <polak@gnu.org>
25691
25692	Update mailutils.spec.in.
25693
256942009-03-25  Wojciech Polak  <polak@gnu.org>
25695
25696	Add python to mailutils-config.
25697
256982009-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
25699
25700	Remove vestiges of scripts/ in Makefiles.
25701
257022009-03-24  Wojciech Polak  <polak@gnu.org>
25703
25704	Add Python scripting to maidag.
25705
25706	* maidag/python.c: New file.
25707	* maidag/script.c (script_tab): Add Python.
25708	* maidag/maidag.h (python_check_msg): New prototype.
25709	* configure.ac: Conditionally define python-related variables.
25710
257112009-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
25712
25713	Rewrite scripting support in maidag.
25714
25715	* include/mailutils/guile.h (mu_guile_init, mu_guile_load)
25716	(mu_guile_eval, mu_guile_mailbox_apply, mu_guile_message_apply)
25717	(mu_guile_safe_exec, mu_guile_safe_proc_call): New protos.
25718	* libmu_scm/Makefile.am: Add mu_guile.c
25719	* libmu_scm/mu_guile.c: New file.
25720	* libmu_scm/mu_mailbox.c (struct mu_mailbox): Kludge: new
25721	member noclose.
25722	(mu_scm_mailbox_free): Do not close/destroy mailbox if it is
25723	marked noclose.
25724	(mu_scm_mailbox_create0): Kludge: new function.
25725	* libmu_scm/mu_message.c (mu_scm_message_print): Bugfix.
25726	* maidag/Makefile.am: Add guile.c and sieve.c.
25727	* maidag/deliver.c (maidag_stdio_delivery) [WITH_GUILE]: Remove
25728	block.
25729	(deliver_url): Call script_apply, instead of sieve_test.
25730	* maidag/maidag.c: Rewrite scripting support in a modular way.
25731	Remove options: --sieve, --source (and the corresponding config
25732	statements). Add options: --language, --script. Add configure
25733	statement: filter (block).
25734	* maidag/maidag.h (progfile_pattern, sieve_pattern): Remove.
25735	(script_list, sieve_debug_flags, message_id_header,
25736	sieve_enable_log): New prototypes.
25737	[WITH_GUILE]: Remove.
25738	(maidag_script_fun, struct maidag_script): New data type.
25739	(script_handler): New extern. (script_lang_handler,
25740	script_suffix_handler)
25741	(script_register, script_apply): New protos.
25742	(scheme_check_msg, sieve_check_msg): New protos.
25743	* maidag/script.c: Rewrite. Provide general-purpose serialized
25744	script support.
25745	* guimb/guimb.h (struct guimb_data): Remove.
25746	* guimb/main.c: Rewrite in a cleaner way, using functions from
25747	mu_guile.c.
25748	* guimb/collect.c (guimb_catch_body, guimb_catch_handler)
25749	(guimb_exit): Remove.
25750	* guimb/scm/sieve-core.scm (sieve-current-message,
25751	sieve-mailbox): Public.
25752	(sieve-run-current-message): New public function.
25753	(sieve-run): Call sieve-run-current-message for each message.
25754	* guimb/scm/sieve.scm.in (sieve-save-program): Change code
25755	generation to suit both per-mailbox and per-message invocation.
25756	This kicks mail.local out of whack.
25757	* maidag/guile.c: New file.
25758	* maidag/sieve.c: New file.
25759
257602009-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
25761
25762	Minor fixes.
25763
25764	* configure.ac (GUIMB): Rename to MU_SCM_BIN_PROGRAMS_BUILD.
25765	* guimb/Makefile.am: Likewise.
25766
257672009-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
25768
25769	Fix imap4d input tokenizer.
25770
25771	The proper delimiters are ( and ), listed in RFC as
25772	atom_specials. The characters "[]<>." are delimiters for FETCH,
25773	and "." is a delimiter for STORE. Fix tokenizer to recognize
25774	these only in the corresponding contexts.
25775
25776	In particular, it fixes parsing of input atoms containing dots,
25777	as foo@bar.baz, which previous versions incorrectly split in
25778	three.
25779
25780	* imap4d/util.c (ISDELIM): Delimiters are only ( and )
25781	* imap4d/imap4d.h (struct imap4d_parsebuf): new data type.
25782	(imap4d_parsebuf_t): New data type. (imap4d_parsebuf_exit,
25783	imap4d_parsebuf_peek) (imap4d_parsebuf_next,
25784	imap4d_parsebuf_token)
25785	(imap4d_parsebuf_data, imap4d_with_parsebuf): New prototypes.
25786	* imap4d/parsebuf.c: New file.
25787	* imap4d/Makefile.am: Add parsebuf.c
25788	* imap4d/fetch.c, imap4d/store.c: Rewrite using parsebuf
25789	functions.
25790
257912009-03-22  Sergey Poznyakoff  <gray@gnu.org.ua>
25792
25793	Bugfix.
25794
25795	* mailbox/stream.c (mu_stream_readline): Fix byte counting.
25796
257972009-03-22  Sergey Poznyakoff  <gray@gnu.org.ua>
25798
25799	Improve autoconf machinery, drop support for Guile < 1.8.
25800
25801	* scripts/guile-1.4: Removed.
25802	* scripts/guile-1.6/guile-doc-snarf: Move to the parent dir.
25803	* scripts/guile-1.6/guile-doc-snarf.awk: Move to the parent
25804	dir.
25805	* scripts: Rename to mu-aux. All references updated.
25806	* am/enable.m4 (MU_ENABLE_SUPPORT): add fourth argument,
25807	action-default Translate + to x.
25808	* am/guile.m4 (MU_RESULT_ACTIONS): Remove.
25809	(MU_CHECK_GUILE): Rewrite. Drop support for versions < 1.8
25810	* am/lib.m4 (MU_CHECK_LIB): Rewrite using a cleaner approach.
25811	* bootstrap.conf: Remove build_aux assignment.
25812	* configure.ac: Assume a new naming scheme for optional builds:
25813	for each subst variable named MU_whatever_BUILD there is a
25814	corresponding Makefile.am variable named MU_whatever_LIST, if
25815	`whatever' is to be built MU_whatever_BUILD is set to
25816	'$(MU_whatever_LIST)' New option --disable-c++. Improve status
25817	output.
25818	* examples/Makefile.am, examples/cpp/Makefile.am,
25819	include/mailutils/Makefile.am, libmu_cpp/Makefile.am,
25820	libmu_scm/Makefile.am, libmu_sieve/Makefile.am,
25821	libmu_sieve/extensions/Makefile.am, libmu_sieve/load.c,
25822	mail.remote/Makefile.am, mail.remote/testsuite/Makefile.am,
25823	mailbox/Makefile.am, mh/Makefile.am, mimeview/Makefile.am,
25824	mu-aux/Makefile.am, python/mailutils/Makefile.am: Reflect
25825	changes to autoconf machinery.
25826	* /include/mailutils/guile.h: Drop support for versions < 1.8
25827	* libmu_scm/mu_util.c: Likewise.
25828
258292009-03-19  Sergey Poznyakoff  <gray@gnu.org.ua>
25830
25831	Mail: fix parsing of arguments containing =.
25832
25833	* mail/util.c (util_do_command): Do not use = as a delimiter.
25834	* mail/set.c (mail_set): = is no longer returned as a token.
25835	* mail/setenv.c (mail_setenv): Likewise.
25836
258372009-03-18  Wojciech Polak  <polak@gnu.org>
25838
25839	Add scripting to libmu_py.
25840
25841	* python/libmu_py/script.c: New file.
25842
258432009-03-14  Wojciech Polak  <polak@gnu.org>
25844
25845	Split Python interface into libmu_py and c_api.so.
25846
25847	* include/mailutils/python.h: New file.
25848	* python/c_api: Rename to python/libmu_py.
25849
258502009-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
25851
25852	Bugfixes.
25853
25854	* imap4d/bye.c: Discern between input and output errors.
25855	* imap4d/imap4d.h (ERR_NO_IFILE): New error code.
25856	* imap4d/util.c: Discern between input and output errors.
25857	Improve trace output.
25858	(imap4d_getline): Signal ERR_NO_IFILE on EOF.
25859	* movemail/movemail.c: Fix include statements.
25860
258612009-03-08  Wojciech Polak  <polak@gnu.org>
25862
25863	Add new Python interface and example programs.
25864
258652009-03-07  Wojciech Polak  <polak@gnu.org>
25866
25867	Improve libmu_cpp.
25868
25869	* libmu_cpp/address.cc, libmu_cpp/envelope.cc,
25870	libmu_cpp/header.cc, libmu_cpp/url.cc: Use sget instead of
25871	aget.
25872	* libmu_cpp/list.cc (mulist_to_stl): New function.
25873	(List::to_stl): New method.
25874	* include/mailutils/cpp/list.h: Likewise.
25875
258762009-03-05  Wojciech Polak  <polak@gnu.org>
25877
25878	Add Envelope class to libmu_cpp. Add new methods.
25879
25880	* include/mailutils/cpp/envelope.h, libmu_cpp/envelope.cc: New
25881	files.
25882
258832009-03-05  Sergey Poznyakoff  <gray@gnu.org.ua>
25884
25885	Fix coredumps on null passwords in pam and ldap auth.
25886
25887	* libmu_auth/pam.c (mu_pam_service): Initialize to package
25888	name.
25889	(mu_pam_conv): Raise PAM_AUTHTOK_RECOVER_ERR, if password is
25890	NULL. Fix memory leak on errors.
25891	(mu_authenticate_pam): Fix return value.
25892	* libmu_auth/ldap.c (mu_ldap_authenticate): Prevent coredump on
25893	empty password.
25894
258952009-03-04  Sergey Poznyakoff  <gray@gnu.org.ua>
25896
25897	Fix the return of get_ticket.
25898
258992009-03-04  Sergey Poznyakoff  <gray@gnu.org.ua>
25900
25901	Fix semantics of mu_attribute_to_string.
25902
25903	* include/mailutils/attribute.h (MU_STATUS_BUF_SIZE): New
25904	define.
25905	* libproto/mbox/mbox.c: Update use of mu_attribute_to_string.
25906	* mailbox/amd.c: Likewise.
25907	* mailbox/attribute.c (mu_string_to_flags): Rewrite.
25908	(mu_attribute_to_string): Fill the string with flag letters
25909	only, without "Status:" prefix and final newline.
25910	* NEWS: Update.
25911
259122009-03-03  Sergey Poznyakoff  <gray@gnu.org.ua>
25913
25914	All client utilities: read ~/.mu-tickets.
25915
25916	* NEWS: Update.
25917	* include/mailutils/mailbox.h (mu_ticket_file): New extern.
25918	* include/mailutils/message.h (mu_message_save_to_mailbox):
25919	Change proto.
25920	* include/mailutils/sieve.h (mu_sieve_get_ticket,
25921	mu_sieve_set_ticket): Remove.
25922	* libmu_sieve/actions.c (sieve_action_fileinto): Update call to
25923	mu_message_save_to_mailbox.
25924	* libmu_sieve/sieve-priv.h (struct mu_sieve_machine): Remove
25925	ticket.
25926	* libmu_sieve/sieve.y (mu_sieve_get_ticket,
25927	mu_sieve_set_ticket): Remove.
25928	* mailbox/mbx_default.c (mu_mailbox_create_default): Read a
25929	wicket file and attach a ticket if mailbox opened successfully.
25930	* mailbox/wicket.c: Re-format.
25931	* sieve/sieve.c: Remove special wicket-handling code.
25932	* libmu_auth/radius.c, movemail/movemail.c: Add missing
25933	includes
25934
259352009-02-27  Wojciech Polak  <polak@gnu.org>
25936
25937	Update libmu_cpp.
25938
25939	* libmu_cpp/filter.cc, include/mailutils/cpp/filter.h,
25940	include/mailutils/cpp/stream.h: Split FilterStream.
25941	* libmu_cpp/mailbox.cc, include/mailutils/cpp/mailbox.h: Add
25942	new methods.
25943	* examples/cpp/iconv.cc: Reflect changes in filter.h.
25944	* examples/cpp/mimetest.cc: Likewise.
25945	* examples/cpp/http.cc: Bugfix.
25946
259472009-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
25948
25949	Bugfixes in AMD code.
25950
25951	* libproto/include/amd.h (new_msg_file_name): Add an argument
25952	indicating whether an actual expunging is going to take place,
25953	as opposed to saving message flags.
25954	* libproto/maildir/mbox.c (maildir_new_message_name): Sync with
25955	above changes.
25956	* libproto/mh/mbox.c (_mh_new_message_name): Likewise.
25957	* mailbox/amd.c (_amd_message_save): Handle unlink requests
25958	(new_msg_file_name returning NULL name). This avoids creating
25959	temp files.
25960	(amd_expunge): Remove messages that have had
25961	MU_ATTRIBUTE_DELETED on mailbox open, if the underlying mailbox
25962	implementation allows that.
25963
259642009-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
25965
25966	Define LOG_AUTHPRIV if syslog.h does not.
25967
259682009-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
25969
25970	Remove leftover dependencies of libmailutils from gnulib.
25971
25972	* bootstrap.conf (gnulib_extra_files): Remove.
25973	* gnulib.modules (inttostr): Add module.
25974	* include/mailutils/io.h: New file.
25975	* include/mailutils/Makefile.am: Add io.h
25976	* mailbox/inttostr.c, mailbox/inttostr.h: Remove
25977	* mailbox/imaxtostr.c, mailbox/offtostr.c, mailbox/umaxtostr.c:
25978	Remove
25979	* mailbox/intprops.h: Remove
25980	* mailbox/asnprintf.c, mailbox/asprintf.c,
25981	mailbox/vasnprintf.c: New files.
25982	* mailbox/Makefile.am: Update.
25983	* mailbox/mu_umaxtostr.c: rename to lib/mu_umaxtostr.c
25984	* mailbox/mu_umaxtostr.h: rename to lib/mu_umaxtostr.h
25985	* lib/Makefile.am (libmuaux_la_SOURCES): Add mu_umaxtostr.[ch]
25986	* libmu_auth/radius.c, libmu_cfg/common.c, libmu_scm/mu_port.c,
25987	libproto/imap/folder.c, libproto/imap/mbox.c,
25988	libproto/mbox/mbox.c, libproto/mh/mbox.c, libproto/pop/mbox.c,
25989	mailbox/acl.c, mailbox/daemon.c, mailbox/mailer.c,
25990	mailbox/message.c, mailbox/mutil.c, mailbox/stream.c: Use
25991	mu_strerror. Avoid using mu_umaxtostr.
25992
259932009-02-19  Wojciech Polak  <polak@gnu.org>
25994
25995	* imap4d/util.c (imap4d_readline): Bugfix.
25996
259972009-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
25998
25999	Bugfix.
26000
26001	* libproto/mailer/prog.c (_expand_sender): Allocate memory.
26002
260032009-02-18  Wojciech Polak  <polak@gnu.org>
26004
26005	Update mailutils-config after renaming libraries.
26006
260072009-02-18  Sergey Poznyakoff  <gray@gnu.org.ua>
26008
26009	Update timestamp.
26010
260112009-02-18  Sergey Poznyakoff  <gray@gnu.org.ua>
26012
26013	Bugfix.
26014
26015	* libproto/imap/folder.c (imap_parse): fix parsing of numeric
26016	values after UIDNEXT, UIDVALIDITY and UNSEEN.
26017	* NEWS: Sync with configure.ac
26018
260192009-02-18  Sergey Poznyakoff  <gray@gnu.org.ua>
26020
26021	Bugfix.
26022
26023	* libproto/imap/folder.c (imap_parse): fix parsing of numeric
26024	values after UIDNEXT, UIDVALIDITY and UNSEEN.
26025
260262009-02-17  Wojciech Polak  <polak@gnu.org>
26027
26028	Update RPM spec.
26029
260302009-02-16  Wojciech Polak  <polak@gnu.org>
26031
26032	* am/lib.m4 (MU_CHECK_LIB): Switch to AC_TRY_LINK_FUNC.
26033
260342009-02-14  Wojciech Polak  <polak@gnu.org>
26035
26036	Update docs.
26037
26038	* doc/texinfo/libmuauth.texi: Move to libmu_auth.texi
26039	* doc/texinfo/libsieve.texi: Move to libmu_sieve.texi
26040
260412009-02-14  Wojciech Polak  <polak@gnu.org>
26042
26043	Rename libraries.
26044
26045	Rename libmuauth to libmu_auth, libargp to libmu_argp, libcfg
26046	to libmu_cfg, and libsieve to libmu_sieve.
26047
26048	* auth/*: Move to libmu_auth/*
26049	* libargp/*: Move to libmu_argp/*
26050	* libcfg/*: Move to libmu_cfg/*
26051	* libsieve/*: Move to libmu_sieve/*
26052	* libmu_sieve/sieve.h: Rename to sieve-priv.h
26053	* include/mailutils/libsieve.h: Rename to sieve.h
26054	* configure.ac: Update, bump to 2.0.90.
26055
260562009-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
26057
26058	Find best matching registrar records.
26059
26060	* mailbox/registrar.c (mu_registrar_lookup_url): Find best
26061	matching record.
26062
260632009-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
26064
26065	Update THANKS.
26066
260672009-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
26068
26069	Bugfix.
26070
26071	* libproto/imap/mbox.c (imap_envelope_sender): Bugfix. Address
26072	was freed before using its member.
26073
260742009-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
26075
26076	Fix opening remote mailbox URLs with path component.
26077
26078	* include/mailutils/folder.h (mu_folder_create_from_record):
26079	Change type of the 2nd argument to mu_url_t.
26080	* include/mailutils/url.h (mu_url_uplevel): New proto.
26081	* mailbox/folder.c (mu_folder_create_from_record): Change type
26082	of the 2nd argument to mu_url_t.
26083	(mu_folder_create): Reflect changes to
26084	mu_folder_create_from_record.
26085	* mailbox/mailbox.c (mailbox_folder_create): Use
26086	mu_url_uplevel.
26087	* mailbox/url.c (mu_url_uplevel): New function.
26088
260892009-02-10  Sergey Poznyakoff  <gray@gnu.org.ua>
26090
26091	Bugfix.
26092
26093	* libproto/imap/mbox.c (imap_envelope_sender): Fix operation
26094	when buf == NULL or buflen == 0.
26095
260962009-02-10  Serge Monkewitz  <smm@ipac.caltech.edu>
26097
26098	Fix alignment bug in assoc.c.
26099
261002009-01-30  Wojciech Polak  <polak@gnu.org>
26101
26102	Add Folder class to libmu_cpp. Provide new examples lsf.cc and
26103	msg-send.cc.
26104
26105	* examples/cpp/lsf.cc, examples/cpp/msg-send.cc,
26106	include/mailutils/cpp/folder.h, libmu_cpp/folder.cc: New files.
26107
261082009-01-04  Wojciech Polak  <polak@gnu.org>
26109
26110	Add Debug class to libmu_cpp.
26111
26112	* include/mailutils/cpp/debug.h, libmu_cpp/debug.cc: New files.
26113	* examples/cpp/mimetest.cc, examples/cpp/sfrom.cc,
26114	libmu_cpp/header.cc, include/mailutils/cpp/header.h: Accept
26115	default header value if missing.
26116
261172009-01-03  Wojciech Polak  <polak@gnu.org>
26118
26119	libmu_cpp refactoring and improvements.
26120
26121	* examples/cpp/mimetest.cc, include/mailutils/cpp/attribute.h,
26122	include/mailutils/cpp/body.h, include/mailutils/cpp/mime.h,
26123	include/mailutils/cpp/mutil.h,
26124	include/mailutils/cpp/registrar.h, libmu_cpp/attribute.cc,
26125	libmu_cpp/body.cc, libmu_cpp/mime.cc, libmu_cpp/mutil.cc,
26126	libmu_cpp/registrar.cc: New files.
26127
261282008-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
26129
26130	Version 2.0.
26131
26132	* NEWS, configure.ac: Version 2.0
26133	* README: Update
26134	* doc/texinfo/mailutils.texi: Update.
26135	* doc/texinfo/programs.texi: Update.
26136	* doc/Makefile.am: Add usage.texi.
26137	* imap4d/imap4d.c (imap4d_cfg_param): Fix typo.
26138	* auth/tls.c (mu_tls_module_init): Add missing break.
26139
261402008-12-25  Sergey Poznyakoff  <gray@gnu.org.ua>
26141
26142	Update docs.
26143
261442008-12-24  Sergey Poznyakoff  <gray@gnu.org.ua>
26145
26146	Minor fix.
26147
261482008-12-24  Sergey Poznyakoff  <gray@gnu.org.ua>
26149
26150	Fix TLS support, improve GOCS subsystem.
26151
26152	* include/mailutils/gocs.h (gocs_init_fp): Rename to
26153	mu_gocs_init_fp. Change signature. (mu_gocs_mailbox_init,
26154	mu_gocs_locking_init, mu_gocs_source_email_init)
26155	(mu_gocs_mailer_init, mu_gocs_logging_init)
26156	(mu_gocs_debug_init): Fix prototypes.
26157	* include/mailutils/gsasl.h (mu_gsasl_module_init): Update
26158	prototype.
26159	* include/mailutils/libsieve.h (mu_sieve_module_init): Update
26160	prototype.
26161	* include/mailutils/mu_auth.h (struct mu_auth_module.init):
26162	Update type to mu_gocs_init_fp.
26163	* include/mailutils/radius.h (mu_radius_module_init): Update
26164	prototype.
26165	* include/mailutils/tls.h (struct
26166	mu_tls_module_config.client_enable): Replace with .enable. It
26167	affects entire TLS subsystem, not only client part.
26168	(mu_tls_module_init): Update prototype.
26169	* include/mailutils/types.hin (mu_gocs_op): New enum.
26170	* mailbox/gocs.c (mu_gocs_dummy, mu_gocs_mailbox_init)
26171	(mu_gocs_locking_init, mu_gocs_source_email_init)
26172	(mu_gocs_mailer_init, mu_gocs_logging_init)
26173	(mu_gocs_debug_init): Take two arguments.
26174	(mu_gocs_flush): After running set stage, call all init
26175	callbacks with mu_gocs_op_flush.
26176	* auth/tls.c (mu_tls_module_config): Initialize .enable to 1.
26177	(mu_tls_module_init): Rewrite using new prototype. Use
26178	mu_gocs_op_flush to initialize the library.
26179	(mu_init_tls_libs): Initialize the library only if
26180	mu_tls_module_config.enable is set.
26181	* auth/gsasl.c (mu_gsasl_module_init): Update.
26182	* auth/ldap.c (mu_ldap_module_init): Update.
26183	* auth/pam.c (mu_pam_module_init): Update.
26184	* auth/radius.c (mu_radius_module_init): Update.
26185	* auth/sql.c (mu_sql_module_init): Update.
26186	* auth/virtual.c (mu_virtual_module_init): Update.
26187	* libcfg/tls.c (mu_tls_param): Update.
26188	* libsieve/conf.c (mu_sieve_module_init): Update.
26189	* doc/texinfo/programs.texi: Update.
26190
261912008-12-24  Sergey Poznyakoff  <gray@gnu.org.ua>
26192
26193	Fixes.
26194
26195	* doc/texinfo/Makefile.am (final): Add fix-sentence-spacing.
26196	* doc/texinfo/mailutils.texi: Update.
26197	* doc/texinfo/programs.texi: Update.
26198	* pop3d/pop3d.c, sieve/sieve.c: Use mu_cfg_bool, where
26199	appropriate.
26200
262012008-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
26202
26203	Update the docs.
26204
262052008-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
26206
26207	Bugfix.
26208
26209	* mailbox/parsedate.y (DATE_SET): Change >= comparison to
26210	strict >.
26211	(__SET_SECOND,__SET_MINUTE,__SET_HOUR): Fix upper limit.
26212
262132008-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
26214
26215	Update .gitignores.
26216
262172008-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
26218
26219	Makefile.am: Remove gen_start_date.
26220
262212008-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
26222
26223	Switched to Git repository.
26224
26225	* m4: Rename to am.
26226	* README-alpha, README-hacking: Reflect the switch.
26227	* */.cvsignore: Rename to .gitignore, update.
26228	* gnulib.modules: Add gitlog-to-changelog.
26229	* ChangeLog: Remove.
26230
262312008-12-04  Wojciech Polak  <polak@gnu.org>
26232
26233	* include/mailutils/cpp/url.h, libmu_cpp/url.cc,
26234	examples/cpp/addr.cc, examples/cpp/url-parse.cc:
26235	Reflect recent API changes.
26236
262372008-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
26238
26239	* testsuite/etc/mailutils.rc.in: New file.
26240	* testsuite/etc/DISTFILES: Add mailutils.rc.in
26241	* testsuite/lib/mailutils.exp (mu_copy_file): Define $arg
26242	variable to simplify using $ in template files.
26243
26244	* sieve/testsuite/lib/sieve.exp (SIEVE_ETC_DIR): New global
26245	(sieve_test): Explicitly pass -f.
26246	Use SIEVE_ETC_DIR/mailutils.rc as configuration file.
26247
26248	* imap4d/testsuite/imap4d/list.exp: Update the '*' test to match
26249	new contents of $MU_DATA_DIR/etc
26250	* libproto/pop/url.c (_url_pop_init): Remove obsolete call to
26251	mu_url_init.
26252	* sieve/sieve.c (sieve_mailbox): Print actual mailbox URL in case
26253	of failure.
26254
262552008-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
26256
26257	* include/mailutils/opool.h (mu_opool_set_bucket_size)
26258	(mu_opool_get_bucket_size): New protos.
26259	* mailbox/opool.c (struct _mu_opool.bucket_size): New member.
26260	(alloc_pool, copy_chars): Use opool->bucket_size to set bucket
26261	size.
26262	(mu_opool_create): Initialize bucket_size with the default
26263	value.
26264	(mu_opool_set_bucket_size,mu_opool_get_bucket_size): New
26265	functions.
26266
262672008-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
26268
26269	Add iterator support to opool.
26270
26271	* include/mailutils/opool.h (mu_opool_get_iterator): New function.
26272	* mailbox/opool.c (mu_opool_get_iterator): New function.
26273	* mailbox/hdritr.c (hdr_data_dup): Bugfix: notify owner about the
26274	new iterator.
26275
262762008-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
26277
26278	* auth/sql.c (get_field): NULL value in an optional field is
26279	equivalent to MU_ERR_NOENT.
26280
262812008-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
26282
26283	* mailbox/amd.c (_amd_attach_message): Call mu_body_clear_modified
26284	and mu_message_clear_modified after constructing the message to
26285	make sure it is not marked as modified.
26286
262872008-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
26288
26289	* mailbox/argcv.c (quote_transtab): Add vertical tabulation
26290	character.
26291
262922008-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
26293
26294	* mailbox/cfg_driver.c (mu_cfg_tree_reduce): Format parse tree
26295	before scanning the tree.
26296	* mailbox/cfg_parser.y (block rule): Accept empty blocks.
26297	(parse_param): bail out if callback is not declared when it
26298	should.
26299	* mailbox/daemon.c (mu_daemon_create_pidfile)
26300	(mu_daemon_remove_pidfile): If running with UID=0 and EUID != 0,
26301	temporarily switch to EUID=0 for accessing pidfile (when
26302	creating or deleting).
26303
263042008-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
26305
26306	* mailbox/cfg_parser.y (mu_cfg_format_error): Raise
26307	mu_cfg_error_count only if level is less or equal to error.
26308	(_scan_tree_helper): "unknown section" is a warning.
26309
26310	* configure.ac, NEWS: Version 1.9.93.
26311	* include/mailutils/libargp.h (mu_app_cfg_verifier): New extern.
26312	* libargp/muinit.c (mu_app_cfg_verifier): New variable.
26313	(mu_app_init): Call mu_app_cfg_verifier if in lint mode.
26314	* mailbox/cfg_driver.c (mu_cfg_tree_reduce): Return 0 if no
26315	configuration is supplied.
26316
263172008-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
26318
26319	* libargp/muinit.c (mu_app_init): Do not parse configs if
26320	--config-help was given.
26321
263222008-11-09  Wojciech Polak  <polak@gnu.org>
26323
26324	Fix typos.
26325
26326	* doc/texinfo/mailcap.texi, doc/texinfo/mailutils.texi
26327	doc/texinfo/mom.texi, doc/texinfo/mu-mh.texi,
26328	doc/texinfo/mu_message.texi, doc/texinfo/programs.texi,
26329	doc/texinfo/sieve.texi: Fix typos.
26330
263312008-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
26332
26333	Rewrite default mailbox format support to make sure it does not
26334	break format autodetection. Improve the docs.
26335
26336	* configure.ac (MU_DEFAULT_SCHEME): New configuration variable.
26337	* mailbox/version.c (mu_conf_opt): Include default scheme.
26338
26339	* examples/mimetest.c, examples/mta.c, libmu_scm/mu_scm.c: Remove
26340	mu_path_record. Use mu_registrar_set_default_record.
26341
26342	* libproto/mbox/folder.c (_path_is_scheme): Rename to
26343	_mbox_is_scheme. Minor changes as well.
26344	(_path_record, mu_path_record): Removed.
26345	(_mbox_record): Use _mbox_is_scheme.
26346
26347	* libsieve/actions.c: Remove unused variable.
26348
26349	* include/mailutils/Makefile.am (types.h rule): Replace
26350	_MU_DEFAULT_RECORD_. Change MU_OFF_TYPE replacement pattern to
26351	_MU_OFF_TYPE_.
26352
26353	* include/mailutils/mailbox.h (mu_mailbox_set_default_proto)
26354	(mu_mailbox_get_default_proto): Remove. See below.
26355	* include/mailutils/registrar.h (mu_registrar_set_default_scheme)
26356	(mu_registrar_get_default_scheme)
26357	(mu_registrar_get_default_record)
26358	(mu_registrar_set_default_record)
26359	(mu_registrar_lookup_scheme): New prototypes.
26360	(mu_path_record): Remove.
26361	(mu_register_all_mbox_formats): Remove mu_path_record.
26362	Set default scheme using mu_registrar_set_default_record.
26363	(mu_register_local_mbox_formats): Likewise.
26364	* include/mailutils/types.hin (MU_OFF_TYPE): Rename to
26365	_MU_OFF_TYPE_.
26366	(MU_DEFAULT_RECORD): New define.
26367
26368	* mailbox/mailbox.c (mu_mailbox_set_default_proto)
26369	(mu_mailbox_get_default_proto): Remove.
26370	(mu_mailbox_create): Remove default_proto kludge. mu_registrar
26371	stuff is responsible for finding the correct record.
26372	* mailbox/registrar.c (mu_registrar_set_default_record)
26373	(mu_registrar_get_default_record)
26374	(mu_registrar_set_default_scheme)
26375	(mu_registrar_get_default_scheme)
26376	(mu_registrar_lookup_scheme): New functions.
26377	(mu_registrar_lookup_url): Fall back to default record if no
26378	matching record is found and the URL was not set explicitly
26379	(i.e. does not begin with a scheme).
26380
26381	* mailbox/gocs.c: Use mu_registrar_set_default_scheme instead of
26382	mu_mailbox_set_default_proto.
26383	* libsieve/extensions/pipe.c, libsieve/extensions/spamd.c,
26384	libsieve/extensions/vacation.c: Fix comments.
26385
26386	* doc/texinfo/getdate.texi: New file (from gnulib).
26387	* doc/texinfo/Makefile.am (mailutils_TEXINFOS): Add getdate.texi
26388	(fix-sentence-spacing): New rule. Forces single-space
26389	inter-sentence spacing.
26390	(check-tabs, check-sentence-spacing): New rules.
26391	(check-format): Depend on the above two.
26392	(check-refs, check-fixmes, check-unrevised): Fix copy-paste
26393	errors. Print diagnostics to stderr.
26394
26395	* doc/texinfo/auth.texi, doc/texinfo/fdl.texi,
26396	doc/texinfo/framework.texi, doc/texinfo/imap4.texi,
26397	doc/texinfo/libmuauth.texi, doc/texinfo/mailbox.texi,
26398	doc/texinfo/mailcap.texi, doc/texinfo/mailutils.texi,
26399	doc/texinfo/mbox.texi, doc/texinfo/message.texi,
26400	doc/texinfo/mom.texi, doc/texinfo/mu_message.texi,
26401	doc/texinfo/mu_mime.texi, doc/texinfo/mu_scm.texi,
26402	doc/texinfo/muint.texi, doc/texinfo/pop3.texi,
26403	doc/texinfo/rendition.texi, doc/texinfo/sieve.texi,
26404	doc/texinfo/url.texi, doc/texinfo/usage.texi: Use GNU instead of
26405	@sc{gnu}, because latter looks awful when typeset (especially when
26406	followed by a capitalized word). Fix format by running `make final'.
26407
26408	* doc/texinfo/programs.texi: Document more config statements.
26409	* doc/texinfo/libsieve.texi: Document loadable actions and tests.
26410
264112008-11-07  Sergey Poznyakoff  <gray@gnu.org.ua>
26412
26413	Bugfix
26414
26415	* mailbox/amd.c (_amd_message_save): Make sure message files have
26416	right permissions.
26417	(amd_message_stream_open): Remove useless flags addition.
26418	Permissions are taken care of in _amd_message_save.
26419
26420	Allow to set mailbox permissions using fileinto Sieve action.
26421
26422	* mailbox/permstr.c: New file.
26423	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add permstr.c.
26424	* imap4d/imap4d.c (parse_mode_spec): Remove function.
26425	(cb_mailbox_mode): Use mu_parse_stream_perm_string instead of
26426	parse_mode_spec.
26427	* imap4d/imap4d.h (namespace_getfullpath)
26428	(namespace_checkfullpath): First arg is const.
26429	* imap4d/namespace.c (namespace_getfullpath)
26430	(namespace_checkfullpath): First arg is const.
26431	* include/mailutils/message.h (mu_message_save_to_mailbox): Add
26432	5th argument (permissions).
26433	* mailbox/message.c: Likewise.
26434	* include/mailutils/mutil.h (mu_parse_stream_perm_string): New
26435	proto.
26436	(mu_stream_flags_to_mode): Add isdir argument.
26437	* libsieve/actions.c (sieve_action_fileinto): New tag :permissions
26438	allows to set permissions to the mailbox being created.
26439	* mailbox/mutil.c (mu_stream_flags_to_mode): Add 2nd argument
26440	(isdir). Any bits in [go] sets imply raising 'x' bit for
26441	directories (i.e. if isdir != 0).
26442
26443	* libproto/maildir/mbox.c, mailbox/amd.c: Update calls to
26444	mu_stream_flags_to_mode.
26445
26446	* NEWS, doc/texinfo/sieve.texi: Update.
26447
26448	Allow to set file permissions of the local mailboxes during
26449	creation.
26450
26451	* include/mailutils/stream.h (MU_STREAM_IRGRP, MU_STREAM_IWGRP)
26452	(MU_STREAM_IROTH, MU_STREAM_IWOTH, MU_STREAM_IMASK): New defines.
26453	* include/mailutils/mutil.h (mu_stream_flags_to_mode): New
26454	prototype.
26455	* libproto/maildir/mbox.c (maildir_create, maildir_flush)
26456	(maildir_scan0): Consider mailbox flags	to determine its file
26457	mode.
26458	* mailbox/amd.c (amd_open, amd_message_stream_open): Likewise.
26459	* mailbox/file_stream.c (_file_open): Likewise.
26460	* mailbox/mutil.c (mu_stream_flags_to_mode): New file.
26461
26462	* imap4d/namespace.c (namespace_getfullpath)
26463	(namespace_checkfullpath): Return the namespace number in the last
26464	argument (if not null).
26465	* imap4d/append.c, imap4d/copy.c, imap4d/delete.c, imap4d/list.c,
26466	imap4d/rename.c, imap4d/select.c, imap4d/status.c: Update calls to
26467	namespace_getfullpath.
26468	* imap4d/create.c (imap4d_create): Set mailbox flags depending on
26469	the namespace it is created in.
26470	* imap4d/imap4d.c (mailbox_mode): New variable.
26471	(parse_mode_spec): New function.
26472	(imap4d_cfg_param): New statements other-mailbox-mode and
26473	shared-mailbox-mode.
26474	* imap4d/imap4d.h (mailbox_mode): New proto.
26475	(namespace_getfullpath, namespace_checkfullpath): Add a parameter.
26476
26477	* mailbox/progmailer.c (mu_progmailer_set_debug): Add missing
26478	return statement.
26479
264802008-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
26481
26482	Implement forwarding functionality in Maidag.
26483
26484	* maidag/forward.c: New file.
26485	* maidag/Makefile.am (maidag_SOURCES): Add forward.c.
26486	* maidag/deliver.c (deliver_url): Call maidag_forward for local
26487	users.
26488	* maidag/maidag.c (forward_file, forward_file_checks): New
26489	variables.
26490	(maidag_cfg_param): New keywords forward-file and
26491	forward-file-checks.
26492	* maidag/maidag.h (FWD_IWGRP, FWD_IWOTH, FWD_LINK, FWD_DIR_IWGRP)
26493	(FWD_DIR_IWOTH, FWD_ALL): New defines.
26494	(forward_file, forward_file_checks): New variables.
26495	(enum maidag_forward_result): New data type.
26496	(maidag_forward): New prototype.
26497
26498	Simplify calls to final delivery functions.
26499
26500	* maidag/deliver.c (mda): Pass msg as a 1st argument to deliver.
26501	(deliver_to_user): Remove 1st argument.
26502	(deliver): Change type of the 1st argument to mu_message_t.
26503	* maidag/lmtp.c (dot_deliver): Pass msg as a 1st argument to
26504	deliver.
26505	* maidag/maidag.c (sieve_test): Change type of the 2nd argument to
26506	mu_message_t.
26507	* maidag/maidag.h (sieve_test, deliver): Pass mu_message_t,
26508	instead of mu_message_t.
26509
26510	* mailbox/mailer.c (mu_mailer_create_from_url): Set default debug
26511	level.
26512	* sql/mysql.c (mu_mysql_connect): Avoid coredumps if conn->server
26513	is NULL.
26514
265152008-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
26516
26517	Make maidag handle mailer URLs.
26518
26519	This makes it possible to `deliver' mails to mailers without
26520	explicitly specifying `remote+mailer' mailbox URLs.  In
26521	particular, it is handy for implementing mailing lists using
26522	`prog' mailers (as with Mailman).
26523
26524	* maidag/deliver.c (notify_action): Do nothing if biff_user_name
26525	is empty.
26526	(deliver_to_user): Remove `name' argument.  Allow for auth==NULL.
26527	(is_remote_url): Use case-sensitive comparison.
26528	(is_mailer_url): New function.
26529	(deliver_url): Handle mailer URLs as if they were corresponding
26530	`remote+' mailbox URLs.  This allows to handle mailing lists.
26531	* maidag/lmtp.c (lmtp_groups): New global.
26532	(lmtp_set_privs): New function. Sets primary and
26533	supplementary group privileges.
26534	(maidag_lmtp_server): Call lmtp_set_privs.
26535	* maidag/maidag.c (lmtp_group): Remove.  It is superseded by
26536	lmtp_groups.
26537	(maidag_cfg_param): Allow to specify supplementary groups.
26538	* maidag/maidag.h (lmtp_group): Replace with lmtp_groups.
26539
26540	Change mailer creation mechanism.
26541
26542	* include/mailutils/mailer.h (mu_mailer_create_from_url): New
26543	proto.
26544	* mailbox/mailer.c (mu_mailer_create_from_url): New
26545	function.
26546	(mu_mailer_create): Rewrite using mu_mailer_create_from_url.
26547	* libproto/mailer/prog.c (_url_prog_init): Do not call
26548	mu_url_init.
26549	(url_to_argv): Reflect changes to mu_url functions.
26550	* libproto/mailer/url_sendmail.c (_url_sendmail_init): Do not call
26551	mu_url_init.
26552	* libproto/mailer/url_smtp.c (_url_smtp_init): Likewise.
26553
26554	Minor fixes.
26555
26556	* mailbox/mailbox.c (_create_mailbox0): Take care not to destroy
26557	url, if creation of the mailbox failed.
26558	(_create_mailbox): Destroy url if unable to create mailbox.
26559
26560	* mailbox/mutil.c (mu_is_proto): Take starting | as a protocol
26561	specification. A kludge.
26562
26563	* include/mailutils/argcv.h: Fix indentation.
26564
26565	Change handling of query part in a URL.
26566
26567	Queries are now parsed into arguments and returned as arrays
26568	of arguments.
26569
26570	* libproto/include/url0.h (struct _mu_url): Replace query with
26571	array of query arguments.
26572	* include/mailutils/url.h (mu_url_dup): New proto.
26573	(mu_url_get_query): Remove.
26574	(mu_url_sget_query, mu_url_aget_query): Return query split into
26575	arguments.
26576	(mu_url_set_scheme): New function.
26577	(mu_url_decode_len): New function.
26578	* mailbox/url.c (mu_url_dup): New function.
26579	(mu_url_get_query): Remove.
26580	(mu_url_sget_query, mu_url_aget_query): Return query split into
26581	arguments.
26582	(mu_url_set_scheme): New function.
26583	(mu_url_decode_len): New function.
26584
26585	* libproto/remote/mbox.c (remote_mbox_init): Use parsed out URL,
26586	instead of the full URL string.
26587
26588	* examples/url-parse.c: Change query output.
26589	* mailbox/testsuite/Urls: Reflect changes to url-parse.  Add new
26590	testcases.
26591
26592	* libproto/imap/url.c, libproto/pop/url.c: Reflect changes to URL
26593	functions.
26594
265952008-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
26596
26597	Initial implementation of a `prog' mailer.
26598
26599	* configure.ac: Enable/disable prog mailer support.
26600	* include/mailutils/progmailer.h: New file.
26601	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add
26602	progmailer.h
26603	* include/mailutils/mailutils.h: Include progmailer.h
26604	* include/mailutils/registrar.h (MU_PROG_PRIO): New define.
26605	(mu_prog_record): New extern.
26606	(mu_register_all_mailer_formats): Register mu_prog_record.
26607	* include/mailutils/types.hin (mu_progmailer_t): New typedef.
26608	* libproto/include/registrar0.h (MU_PROG_SCHEME)
26609	(MU_PROG_SCHEME_LEN): New defines.
26610	* libproto/mailer/prog.c: New file.
26611	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
26612	prog.c
26613	* libproto/mailer/sendmail.c: Rewrite using mu_progmailer_t
26614	* libproto/remote/folder.c (_remote_is_scheme): Remove unused
26615	variable.
26616	* mailbox/progmailer.c: New file
26617	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add progmailer.c
26618
26619	* mailbox/acl.c (_expand_aclno): Add a fixme.
26620	* mail/send.c (msg_to_pipe): Bugfix: use pclose, instead of fclose.
26621	* examples/config/mailutils.schema: Update.
26622
266232008-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
26624
26625	* examples/config/mailutils.dict: Use GNU OID number.
26626	* examples/config/mailutils.schema: Use sub-OID assigned to GNU
26627	Mailutils.
26628
26629	* libsieve/prog.c (mu_sv_code_command): Ensure tag arguments have
26630	the proper type.
26631
26632	Fix handling of stdin stream (in particular, in sieve).
26633
26634	* libsieve/extensions/spamd.c (spamd_test): Fix typo.
26635	*  mailbox/file_stream.c (struct _file_stream): New members
26636	size and size_computed.
26637	(_stdin_file_read, _stdin_file_readline): Fix types of fs_offset.
26638	(_stdin_file_size): New function.
26639	(_stdout_file_write): Register _stdin_file_size as stream_size
26640	method if seekable flag is set.
26641	* mailbox/message_stream.c (struct _mu_rfc822_message): Remove
26642	unused member.
26643	* sieve/sieve.c (sieve_message): Create a seekable stream.
26644
266452008-10-23  Sergey Poznyakoff  <gray@gnu.org.ua>
26646
26647	* libsieve/extensions/spamd.c: New tag :user.
26648
26649	* sieve/sieve.c: New working mode: if `-f -' is given, treat
26650	stdin as an RFC2822 message, apply the script to it and exit with
26651	1 if the message gets deleted, 0 if it is not and EX_SOFTWARE on
26652	software errors.
26653	In traditional mode, exit with standard sysexit codes.
26654	* testsuite/sieve/i-numeric.exp: Reflect changes in sieve.
26655	* NEWS: Update.
26656
266572008-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>
26658
26659	* auth/sql.c (decode_tuple): Use new tuple parsing mode, unless
26660	`positional' is set to true.
26661	* include/mailutils/sql.h (struct mu_sql_module_config)
26662	(struct mu_internal_sql_config): New member `positional'.
26663	* libcfg/sql.c (mu_sql_param): New statement `positional'.
26664
26665	* auth/virtual.c (getpwnam_virtual): Close file.
26666	* doc/texinfo/programs.texi: Document virtmode.
26667	* testsuite/Makefile.am (EXTRA_DIST): Remove
26668	* testsuite/makespool: Remove.
26669
26670	* NEWS: Update.
26671	* doc/texinfo/libmuauth.texi: Update.
26672	* doc/texinfo/mailutils.texi: Update.
26673	* doc/texinfo/programs.texi: Update.
26674
26675	* include/mailutils/mailbox.h (mu_mailbox_create_from_url): New
26676	function.
26677	* include/mailutils/mutil.h (mu_aget_user_email_domain): New
26678	function.
26679	* libproto/include/address0.h: Remove obsolete comment.
26680	* libproto/remote/mbox.c (remote_mbox_append_message): If
26681	recipient address is not given, try to construct it from the URL.
26682	* mailbox/mailbox.c (mu_mailbox_create_from_url): New function.
26683	* mailbox/mutil.c (mu_aget_user_email_domain): New function.
26684
26685	* maidag/deliver.c (deliver_to_user): Mailbox and auth must be
26686	freed by the caller.
26687	(deliver_url): New function.
26688	(deliver): Rewrite to allow for delivering to mailboxes explicitly
26689	specified by URLs (--url command line option).
26690	* maidag/maidag.c (options): New option --url.
26691	(main): Handle --url.
26692	* maidag/maidag.h (url_option): New global.
26693	* maidag/mailquota.c (check_quota): Return if auth == NULL.
26694
266952008-10-17  Sergey Poznyakoff  <gray@gnu.org.ua>
26696
26697	* include/mailutils/libsieve.h (mu_sieve_match_part_checker): New
26698	prototype.
26699	* libsieve/comparator.c (mu_sv_match_part_checker): Rename back to
26700	mu_sieve_match_part_checker.  The function was mistakingly renamed
26701	on 2008-07-19.  All references updated.
26702	* libsieve/tests.c: Likewise.
26703	* libsieve/sieve.h (mu_sv_match_part_checker): Remove prototype.
26704
26705	* doc/texinfo/programs.texi: Update.
26706
267072008-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
26708
26709	* libproto/mailer/smtp.c: Implement SIZE extension (RFC 1870).
26710	* doc/rfc/rfc1870.txt: New file.
26711
267122008-10-15  Sergey Poznyakoff  <gray@gnu.org.ua>
26713
26714	* po/POTFILES.in: Change cfg_lexer.c to cfg_lexer.l
26715
267162008-10-14  Sergey Poznyakoff  <gray@gnu.org.ua>
26717
26718	* mailbox/url.c (url_parse0): Allow for
26719	<user>:<password>;AUTH=<auth> syntax.
26720
267212008-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
26722
26723	Fix remote+ records.
26724
26725	* libproto/remote/folder.c (remote_url_init): Remove.
26726	(_remote_is_scheme): New function.
26727	(_remote_mbox_record): Add _is_scheme method.
26728	* libproto/remote/mbox.c (remote_mbox_init): Remove useless
26729	check.
26730	* mailbox/assoc.c (mu_assoc_clear): Return immediately if assoc
26731	tab is NULL.
26732	* mailbox/mailbox.c (_create_mailbox0): Do not enforce exact record
26733	scheme match if the scheme ends with a plus sign.
26734
26735	Minor fixes in configuration.
26736
26737	* doc/texinfo/programs.texi: Document Locking, ACL, and
26738	Tcp-wrappers.
26739	* mailbox/cfg_driver.c (mu_cfg_assert_value_type): Convert
26740	MU_CFG_STRING to MU_CFG_ARRAY.
26741	* mailbox/cfg_parser.y: Replace `tag: value' with `tag: vallist'.
26742	This allows for constructs like `acl a b c {', which were
26743	understood by the previous version.
26744	* mailbox/version.c (mu_conf_opt): Add WITH_LIBWRAP.
26745
267462008-09-29  Sergey Poznyakoff  <gray@gnu.org.ua>
26747
26748	* config/mailutils-config.c (main): Do not print flag descriptions
26749	on --info, this breaks existing scripts.
26750	New option --verbose makes --info print verbose descriptions.
26751	* include/mailutils/version.h (mu_fprint_options)
26752	(mu_fprint_conf_option): Take additional argument.
26753	* mailbox/argcv.c (quote_transtab): Handle \".
26754	* mailbox/cfg_driver.c (mu_cfg_string_value_cb): Bugfix
26755	* mailbox/cfg_lexer.l: Allow * and = in non-quoted words.
26756	Improve 'stray character' diagnostics'.
26757	(unescape_to_line): Handle \\ and \".
26758	* mailbox/version.c (mu_fprint_options)
26759	(mu_fprint_conf_option): New argument `verbose' instructs whether
26760	to print textual descriptions.
26761	(mu_fprint_conf_option): Print single space after the flag to
26762	facilitate writing parser scripts.
26763	* testsuite/lib/mailutils.exp: Reflect this change.
26764
267652008-09-22  Sergey Poznyakoff  <gray@gnu.org.ua>
26766
26767	* configure.ac: Define LOG_FACILITY_STRING, a string
26768	representation of syslog facility.
26769	* mailbox/cfg_lexer.l: Re-introduce pragmatic comment
26770	#debug=, for setting debugging level in config module.
26771	* mailbox/cfg_parser.y: Likewise.
26772	* mailbox/gdebug.c (mu_debug_level_from_string): Ignore trailing
26773	newline.
26774	* mailbox/version.c (mu_conf_option): Add SYSCONFDIR, MAILSPOOLDIR
26775	and LOG_FACILITY.
26776
26777	* mh/mh_init.c (mh_list_format): Reformat to make it more
26778	readable. Use decode primitive on header fields that may be
26779	encoded.
26780
26781	* doc/texinfo/mailutils.texi: Further update.
26782	* doc/texinfo/programs.texi: Likewise.
26783
267842008-09-21  Sergey Poznyakoff  <gray@gnu.org.ua>
26785
26786	* configure.ac: Configure doc hints.
26787	* config/mailutils-config.c (main): Use mu_fprint_conf_option.
26788	* mailbox/version.c (mu_conf_option): Change type.
26789	(mu_fprint_conf_option): New function.
26790	(mu_fprint_options): Use mu_fprint_conf_option.
26791	(mu_print_options): Fix signature
26792	(mu_check_option): Change return type.
26793	* testsuite/lib/mailutils.exp (mu_version): Reflect changes in the
26794	output produced by --show-config-options.
26795
26796	* include/mailutils/version.h (struct mu_conf_option): New data
26797	type.
26798	(mu_check_option): Change return type.
26799	(mu_fprint_conf_option): New prototype.
26800	* libargp/common.c (mu_common_argp): Rename --rcfile-* options
26801	to --config-*. Retain old names for a while.
26802
26803	* doc/texinfo/Makefile.am (RENDITION_TEXI): New variable.
26804	(check-format, check-refs, check-fixmes, check-unrevised)
26805	(all-check-docs, check-docs): New rules.
26806	* doc/texinfo/rendition.texi: New file.
26807	* doc/texinfo/macros.texi: New file.
26808	* doc/texinfo/mailutils.texi: Start rewriting
26809	* doc/texinfo/programs.texi: Likewise.
26810
26811	* doc/texinfo/c-api.texi: Reformat.
26812	* doc/texinfo/fdl.texi: Likewise.
26813	* doc/texinfo/libmuauth.texi: Likewise.
26814	* doc/texinfo/libsieve.texi: Likewise.
26815	* doc/texinfo/mu-mh.texi: Likewise.
26816	* doc/texinfo/sieve.texi: Likewise.
26817
26818	* doc/texinfo/gendocs_template: Rewrite.
26819
268202008-08-24  Sergey Poznyakoff  <gray@gnu.org.ua>
26821
26822	Fix testsuite to avoid spawning /bin/cp.
26823	* imap4d/testsuite/imap4d.rcin: New file.
26824	* imap4d/testsuite/Makefile.am (EXTRA_DIST): Add imap4d.rcin
26825	* imap4d/testsuite/.cvsignore: Add imap4d.rc
26826	* imap4d/testsuite/lib/imap4d.exp: Use mu_makespool to prepare
26827	mailspools and mu_create_config to create test configuration
26828	file.  Specify the maximum amount of configuration data in the
26829	latter, instead of using command line options.
26830	* mail.local/testsuite/lib/mail.local.exp: Likewise.
26831	* pop3d/testsuite/lib/pop3d.exp: Likewise.
26832
26833	* pop3d/testsuite/pop3d.rcin: New file.
26834	* pop3d/testsuite/Makefile.am (EXTRA_DIST): Add pop3d.rcin
26835	* pop3d/testsuite/.cvsignore: Add pop3d.rc.
26836
26837	* testsuite/etc/passwd.in: Use Tcl variable for expansion.
26838	* testsuite/lib/mailutils.exp (mu_copy_file): New function.
26839	(mu_makespool, mu_create_config): New function.
26840	(mu_init): Remove unused variable MU_MAKESPOOL.
26841	(mu_prepare_spools): Use mu_makespool.
26842	(mu_cleanup_spools): Remove.
26843
26844	* libcfg/init.c (mu_parse_config_files): Minor change.
26845	* mailbox/cfg_lexer.l (mu_get_config): Fix return value.
26846
268472008-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
26848
26849	* include/mailutils/mutil.h, mailbox/mutil.c (mu_normalize_path):
26850	Remove useless second argument.  All uses changed.
26851
26852	Rewrite IMAP namespace support.
26853	* imap4d/imap4d.c (imap4d_cfg_param): other-namespace and
26854	shared-namespace take proper lists as arguments.
26855	(imap4d_session_setup0): Call namespace_init_session.
26856	(main): Call namespace_init.
26857	* imap4d/imap4d.h (set_namespace): Remove.
26858	(namespace_init): Change proto.
26859	(namespace_init_session): New prototype.
26860	(namespace): New declaration.
26861	* imap4d/namespace.c: Rewrite using lists.
26862	* mailbox/cfg_parser.y (parse_param): Cast string to lists if
26863	the parameter has list type.
26864
268652008-08-20  Sergey Poznyakoff  <gray@gnu.org.ua>
26866
26867	Implement ID extension.
26868	* imap4d/id.c: New file.
26869	* imap4d/Makefile.am (imap4d_SOURCES): Add id.c, remove version.c.
26870	* imap4d/commands.c: Add ID command.
26871	Remove X-VERSION command.
26872	(SELECT,EXAMINE): Switch to authenticated mode on failure.
26873	* imap4d/imap4d.c (imap4d_argc, imap4d_argv): New variables.
26874	(imap4d_cfg_param): New keyword `id-fields'.
26875	(main): Save command line arguments.
26876	* imap4d/imap4d.h (imap4d_argc, imap4d_argv): New declarations.
26877	* imap4d/select.c (imap4d_select0): Do not reset state to auth on
26878	failure, this is done by util_finish.
26879	* imap4d/version.c: Remove.
26880	* imap4d/capability.c: Announce ID capability, remove X-VERSION.
26881	* imap4d/testsuite/imap4d/x.exp: Use ID instead of X-VERSION.
26882
26883	* TODO, NEWS: Update.
26884
26885	* mailbox/cfg_parser.y (_set_fun,parse_param): Bugfix.
26886
268872008-08-19  Sergey Poznyakoff  <gray@gnu.org.ua>
26888
26889	Bugfixes.
26890
26891	* libcfg/acl.c (parsearg): Initialize size.
26892	* mailbox/cfg_driver.c (mu_cfg_assert_value_type): Bugfix.
26893	* mailbox/cfg_lexer.l (mu_get_config): Close file.
26894	* mailbox/cfg_parser.y: Fix array creation.
26895
26896	Change configuration file parser based on the lexer/parser from
26897	GNU Dico.
26898
26899	* auth/gsasl.c: Remove deprecated data types.
26900	* imap4d/auth_gsasl.c (retrieve_password): Minor fix.
26901
26902	* imap4d/imap4d.c, imap4d/imap4d.h, imap4d/namespace.c,
26903	lib/tcpwrap.c, libcfg/acl.c, libcfg/auth.c, libcfg/common.c,
26904	libcfg/ldap.c, libcfg/sieve.c, libcfg/sql.c, maidag/maidag.c,
26905	mail.local/main.c, mailbox/gdebug.c, mailbox/msrv.c,
26906	mimeview/mimeview.c, pop3d/bulletin.c, pop3d/pop3d.c,
26907	pop3d/pop3d.h, sieve/sieve.c: Reflect changes to the configuration
26908	system.
26909
26910	* mailbox/Makefile.am (AM_LFLAGS): New variable.
26911	(EXTRA_DIST) Add cfg_lexer.l.
26912	(libmailutils_la_SOURCES): Add alloc.c and opool.c
26913	(BUILT_SOURCES): Add cfg_lexer.c.
26914	(cfg_lexer.c): New goal.
26915	* mailbox/alloc.c, mailbox/opool.c: New files.
26916	* mailbox/cfg_lexer.c: Remove.
26917	* mailbox/cfg_lexer.l: New file.
26918	* mailbox/.cvsignore: Add cfg_lexer.c.
26919
26920	* include/mailutils/Makefile.am: Add alloc.h and opool.h
26921	* include/mailutils/alloc.h: New file.
26922	* include/mailutils/opool.h: New file.
26923
26924	* include/mailutils/cfg.h (mu_cfg_lexer_t,mu_cfg_alloc_t)
26925	(mu_cfg_free_t): Remove types.
26926	(MU_CFG_STRING, MU_CFG_LIST, MU_CFG_ARRAY): New defines.
26927	(mu_config_value_t): New data type.
26928	(struct mu_cfg_node): Change type of `label'.
26929	(struct mu_cfg_tree): Remove `alloc', `free'.
26930	New member `pool'.
26931	(mu_cfg_parse): Simplify the signature by removing superfluous
26932	arguments.
26933	(mu_cfg_tie_in): Remove.
26934	(mu_cfg_lexer_pool): New function.
26935	(mu_cfg_find_node, mu_cfg_find_node_label): Remove.
26936	(mu_cfg_callback_t): Change signature.
26937	(MU_CFG_LIST_MASK): New define.
26938	(MU_CFG_LIST_OF, MU_CFG_TYPE, MU_CFG_IS_LIST): New defines.
26939	(mu_cfg_get_debug): New function.
26940	(mu_cfg_assert_value_type, mu_cfg_string_value_cb): New functions.
26941	(mu_cfg_tree_set_alloc, mu_cfg_tree_alloc): Remove.
26942	* mailbox/cfg_driver.c: Adapt for new node structure.
26943	(mu_cfg_assert_value_type, mu_cfg_string_value_cb): New function.
26944	* mailbox/cfg_format.c: Adapt for new node structure.
26945	* mailbox/cfg_parser.y: Adapt for changes in cfg data types and
26946	lexer.
26947
26948	* include/mailutils/mailutils.h: Include alloc.h and opool.h
26949	* include/mailutils/mu_auth.h (mu_authorization_add_module)
26950	(mu_authentication_add_module): New prototypes.
26951
26952	* include/mailutils/syslog.h (mu_string_to_syslog_facility)
26953	(mu_string_to_syslog_priority): First argument is const char *.
26954	* mailbox/syslog.c: Likewise.
26955
26956	* include/mailutils/types.hin (mu_opool_t): New type.
26957	* mailbox/list.c (mu_list_get_comparator): Add missing return
26958	statement.
26959
269602008-08-18  Sergey Poznyakoff  <gray@gnu.org.ua>
26961
26962	Autobuild setup.
26963	* configure.ac: Add AB_INIT.
26964	* gnulib.modules: Add autobuild.
26965
26966	Bugfixes.
26967	* TODO: Update.
26968	* imap4d/fetch.c: Prevent coredumps on inexpected end of statement
26969	(e.g. `FETCH 1:* (uid')
26970
26971	* imap4d/imap4d.h (imap4d_select0): Update prototype.
26972	* imap4d/select.c (imap4d_select0): Do not advertise actual
26973	mailbox name with a NO response.
26974	Return to authenticated state on failure.
26975
26976	* doc/rfc/Makefile.am (EXTRA_DIST): Add new rfcs.
26977	* doc/rfc/rfc1413.txt, doc/rfc/rfc2087.txt, doc/rfc/rfc2180.txt,
26978	doc/rfc/rfc2683.txt, doc/rfc/rfc3348.txt,
26979	doc/rfc/rfc4314.txt: New files.
26980
269812008-08-17  Sergey Poznyakoff  <gray@gnu.org.ua>
26982
26983	Bugfix.
26984	* lib/tcpwrap.c (mu_tcp_wrapper_cb_hosts_deny_syslog):
26985	(mu_tcp_wrapper_cb_hosts_allow_syslog): Use syslog priorities,
26986	not facilities.
26987	(tcpwrapper_param): Rename allow-syslog-level and
26988	deny-syslog-level to allow-syslog-priority and
26989	deny-syslog-priority, correspondingly.
26990
26991	Version 1.9.92.
26992
26993	* imap4d/list.c (imap4d_list): Fix addslash condition.
26994
26995	Improve folder listing.
26996	* include/mailutils/registrar.h (_mu_record): New method
26997	`_list_p'.
26998	(mu_record_list_p): New function.
26999	* libproto/include/amd.h (MU_AMD_SIZE_FILE_NAME): New define.
27000	* libproto/maildir/folder.c (_maildir_is_scheme): Return
27001	MU_FOLDER_ATTRIBUTE_FILE|MU_FOLDER_ATTRIBUTE_DIRECTORY, on
27002	success.
27003	Implement _list_p method.
27004	* libproto/mbox/folder.c (list_helper): Change semantics of the
27005	2nd argument.  The record is used to determine whether or not
27006	to list a particular file.
27007	* libproto/mh/folder.c: Implement _list_p method.
27008	* mailbox/amd.c (SIZE_FILE_NAME): Replace with
27009	MU_AMD_SIZE_FILE_NAME from amd.h.
27010	* mailbox/registrar.c (mu_record_list_p): New function.
27011
27012	Bugfix.
27013	* libproto/maildir/mbox.c (info_to_flags): Fix return value.
27014
27015	Implement UNSELECT extension.
27016	* doc/rfc/Makefile.am: Add rfc3691.txt
27017	* doc/rfc/rfc3691.txt: New file.
27018	* imap4d/capability.c: Announce UNSELECT capability.
27019	* imap4d/close.c: Implement UNSELECT command.
27020	* imap4d/commands.c: Add UNSELECT command.
27021	* imap4d/imap4d.h (imap4d_unselect): New proto.
27022	* imap4d/testsuite/imap4d/anystate.exp: Reflect UNSELECT
27023	capability.
27024	* imap4d/testsuite/imap4d/examine.exp: Reflect yesterday's changes
27025	to STATUS output.
27026
270272008-08-16  Sergey Poznyakoff  <gray@gnu.org.ua>
27028
27029	* imap4d/status.c (imap4d_status): Remove extra whitespace
27030	before closing parenthesis in untagged reply.
27031
27032	Bugfixes.
27033	* imap4d/fetch.c (parse_fetch_body): Bugfix, allow another tokens
27034	after BODY.
27035	* imap4d/util.c (util_msgset): Make sure returned number of
27036	elements in set is always correct.
27037	* mailbox/folder.c (is_known_folder): Compare paths as well.  It
27038	was commented out on 2001-04-10 (7 years ago!!!) for unknown
27039	reasons.
27040	* mailbox/url.c (DECL_CMP): Bugfix. The macro effectively created
27041	a scheme comparator, no matter what its second argument was.
27042
270432008-08-14  Sergey Poznyakoff  <gray@gnu.org.ua>
27044
27045	New functions.
27046	* include/mailutils/list.h (mu_list_get_comparator)
27047	(mu_list_intersect_dup, mu_list_intersect): New prototypes.
27048	* mailbox/list.c (mu_list_get_comparator)
27049	(mu_list_intersect_dup, mu_list_intersect): New functions.
27050
27051	Fix GSASL in imap4d.
27052	* auth/gsasl.c (_gsasl_readline): Prevent getting stuck in
27053	blocking streams.
27054	* imap4d/auth_gsasl.c: Remove deprecated functions and data types.
27055	* imap4d/auth_gss.c (auth_gssapi): Fix signature.
27056	* imap4d/copy.c (imap4d_copy0): Fix return value.
27057	* imap4d/imap4d.c (imap4d_cfg_param): Fix type of login-disabled.
27058	* include/mailutils/gsasl.h (struct mu_gsasl_module_data): New
27059	members: service, realm, hostname, anon_user.
27060	* libcfg/gsasl.c (mu_gsasl_param): New keywords: service,
27061	realm, hostname, anonymous-user.
27062
270632008-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
27064
27065	* imap4d/util.c (imap4d_readline): Fix loop break condition.
27066	* imap4d/testsuite/lib/imap4d.exp: Send newline after a literal.
27067
27068	Bugfixes.
27069	* imap4d/copy.c, imap4d/fetch.c, imap4d/store.c: Do not report
27070	error on non-existing message sets (RFC 3501, section 6.4.8).
27071	* imap4d/testsuite/imap4d/IDEF0955.exp: Reflect this behavior.
27072	* imap4d/testsuite/imap4d/fetch.exp: Header names in replies
27073	to BODY[HEADER.FIELDS...] are no longer quoted.
27074
270752008-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>
27076
27077	More bugfixes in imap4d.
27078	* imap4d/authenticate.c (_auth_try): Fix call to p->handler.
27079	* imap4d/fetch.c (fetch_send_section_part): New argument
27080	close_bracket.
27081	Never print .PEEK, it confuses some clients (notably Thunderbird).
27082	I need to verify RFC, though.
27083	All callers updated.
27084	* imap4d/idle.c: Use imap4d_getline to get the reply, to avoid
27085	modifying tok and command.
27086	* imap4d/imap4d.h (util_send_bytes, util_trim_nl): New prototypes.
27087	* imap4d/util.c (util_trim_nl): New function.
27088	(imap4d_getline): Use util_trim_nl.
27089
27090	Bugfixes.
27091	* imap4d/fetch.c (fetch_send_section_part): Make sure the item tag
27092	always reflects peek status.  All callers updated.
27093	(fetch_io): Try to allocate as large a buffer as possible.
27094	Use util_send_bytes where fit.
27095	* imap4d/imap4d.h (imap4d_auth_handler_fp): Remove unused argument.
27096	* imap4d/store.c (imap4d_store0): Take into account eventual UID
27097	prefix.
27098	* imap4d/util.c (util_send_bytes): New function.
27099	(util_send): Comment out transcript.
27100	(util_do_command): Fix coredump on invalid commands.
27101	(imap4d_readline): Transcript only first line of the input.
27102	Ensure entire literal is read.
27103
27104	Fix input operations and RFC-compliance in imap4d.
27105
27106	* imap4d/util.c (util_getword, util_getitem, util_token)
27107	(util_unquote): Remove.
27108	(imap4d_readline): Rewrite to reduce memory reallocation.  Add
27109	support for non-synchronizing literals (RFC 2088).
27110	(imap4d_readline_ex): Remove.
27111	(util_do_command): Rewrite using new imap4d_readline.
27112	(util_parse_internal_date0): Remove.
27113	(imap4d_tokbuf_init, imap4d_tokbuf_destroy, imap4d_tokbuf_argc)
27114	(imap4d_tokbuf_getarg, util_isdelim)
27115	(imap4d_tokbuf_from_string): New functions.
27116	* imap4d/append.c, imap4d/auth_gss.c, imap4d/authenticate.c,
27117	imap4d/check.c, imap4d/close.c, imap4d/commands.c, imap4d/copy.c,
27118	imap4d/create.c, imap4d/delete.c, imap4d/examine.c,
27119	imap4d/imap4d.h, imap4d/list.c, imap4d/login.c, imap4d/logout.c,
27120	imap4d/lsub.c, imap4d/expunge.c, imap4d/idle.c, imap4d/noop.c,
27121	imap4d/rename.c, imap4d/search.c, imap4d/select.c,
27122	imap4d/starttls.c, imap4d/status.c, imap4d/store.c,
27123	imap4d/subscribe.c, imap4d/uid.c, imap4d/unsubscribe.c,
27124	imap4d/version.c: Rewrite using new imap4d_readline.
27125	* imap4d/namespace.c: Use new imap4d_readline.  Ensure that
27126	each reported prefix ends with a hierarchy delimiter.
27127	* imap4d/imap4d.c (imap4d_mainloop): Use new imap4d_readline.
27128	* imap4d/fetch.c: Rewrite parser from scratch.
27129	* imap4d/capability.c (imap4d_capability_init): Report LITERAL+
27130	capability.
27131
27132	* imap4d/testsuite/imap4d/anystate.exp: Account for the LITERAL+
27133	capability.
27134	* imap4d/testsuite/imap4d/append.exp: Fix APPEND arguments (imap4d
27135	requires exactly three arguments, as per RFC3501.
27136	Fix octet count in literals returned by fetch (previous versions
27137	failed to include the trailing CRLF).
27138	* imap4d/testsuite/imap4d/create.exp: Likewise.
27139	* imap4d/testsuite/imap4d/fetch.exp: Fix FETCH arguments (previous
27140	versions incorrectly accepted header-list without parentheses.
27141	Fix result of FETCH 4 BODY[2.2.1]: it returns entire part, in the
27142	contrast to previous versions, which treated it as
27143	BODY[2.2.1.TEXT].
27144
27145	* maidag/mailtmp.c (mail_tmp_finish): Ensure /dev/null is treated
27146	as mailbox.
27147
271482008-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
27149
27150	Fix imap appends for AMD mailboxes.
27151
27152	* imap4d/append.c (imap4d_append0): Provide size method for the
27153	message	stream.
27154	* imap4d/select.c (imap4d_select0): Call mu_mailbox_create_default.
27155	* mailbox/amd.c (amd_append_message): Improve error checking.
27156
271572008-08-07  Sergey Poznyakoff  <gray@gnu.org.ua>
27158
27159	* imap4d/create.c: Rewrite to create mailboxes honoring
27160	mailbox-type.
27161	* mailbox/mailbox.c (mu_mailbox_create): Bugfix.
27162
271632008-08-04  Sergey Poznyakoff  <gray@gnu.org.ua>
27164
27165	* pop3d/retr.c (pop3d_retr): Use constant-size buffer.  This
27166	avoids running out of memory on messages that do not contain
27167	trailing newline.
27168	* pop3d/top.c (pop3d_top): Likewise.
27169
271702008-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>
27171
27172	* libproto/include/amd.h: Fix indentation.
27173	* libproto/maildir/mbox.c (maildir_scan_dir): Do not assign uids
27174	before inserting message, it breaks their ordering.
27175	(maildir_scan0): Assign uids here.  A temporary solution.
27176
271772008-07-19  Sergey Poznyakoff  <gray@gnu.org.ua>
27178
27179	Minor fix.
27180
27181	* mh/mhn.c (normalize_path): First arg is const char *.
27182	(store_handler): Avoid unnecessary allocations (and coredumps,
27183	if mhn-storage profile is not set.
27184
27185	Finish namespace cleanup in libsieve.
27186
27187	* libsieve/actions.c, libsieve/comparator.c, libsieve/conf.c,
27188	libsieve/load.c, libsieve/prog.c, libsieve/register.c,
27189	libsieve/relational.c, libsieve/require.c, libsieve/runtime.c,
27190	libsieve/sieve.h, libsieve/sieve.l, libsieve/sieve.y,
27191	libsieve/tests.c, libsieve/util.c: Prefix all external
27192	identifiers, that are not intended for use by application
27193	programs, with mu_sv_.
27194
27195	Minor fixes.
27196
27197	* NEWS, configure.ac: Raise version to 1.9.91
27198	* mail/mailline.c (ml_getc): Fix indentation.
27199	* mailbox/mime.c (mu_mime_get_part): Return MU_ERR_NOENT if part
27200	is out of range.
27201
27202	Keep namespace clean
27203
27204	* libsieve/comparator.c, libsieve/prog.c, libsieve/require.c,
27205	libsieve/runtime.c, libsieve/sieve.h, libsieve/sieve.l,
27206	libsieve/sieve.y, libsieve/util.c: Prefix instr_ functions with
27207	mu_.
27208	(sieve_filename, sieve_line_num): Removed.  Use new global
27209	mu_sieve_locus instead.
27210
272112008-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
27212
27213	Fix converting RFC822 streams to messages.
27214
27215	* mailbox/message_stream.c (_mu_rfc822_stream): New members
27216	envelope, and envelope_length.
27217	(_mu_rfc822_read, _mu_rfc822_readline, _mu_rfc822_size): Skip
27218	eventual envelope string.
27219	(_mu_rfc822_open): Save envelope.
27220	(_mu_rfc822_destroy): Free envelope.
27221	(restore_envelope): Use message envelope, if it is present.
27222
272232008-06-17  Sergey Poznyakoff  <gray@gnu.org.ua>
27224
27225	* mailbox/header.c (header_readline): Revert yesterday's change.
27226
272272008-06-16  Sergey Poznyakoff  <gray@gnu.org.ua>
27228
27229	* auth/ldap.c (chk_sha): Remove useless return.
27230	* mailbox/header.c (mu_hdrent_find_stream_pos): Check for
27231	hrd->tail != NULL.
27232	(header_readline): Return immediately if header size is 0.
27233
272342008-06-03  Sergey Poznyakoff  <gray@gnu.org.ua>
27235
27236	* auth/radius.c (mu_grad_logger): New function.
27237	(mu_radius_module_init): Install a custom logger function.
27238
272392008-05-31  Sergey Poznyakoff  <gray@gnu.org.ua>
27240
27241	* libproto/include/amd.h (struct _amd_message.has_new_msg): New
27242	field.
27243	* mailbox/amd.c (amd_append_message): Cache information about
27244	mailbox size in file .mu-size.
27245	(make_size_file_name, read_size_file, write_size_file): New
27246	functions.
27247	(amd_expunge, amd_sync): Update size cache file.
27248	(amd_get_size): Use size cache file if no mailbox_size method is
27249	provided.
27250	* mailbox/mbx_default.c (mu_normalize_mailbox_url): Accept `='
27251	suffix for all mailbox types.
27252	* movemail/movemail.c (main): Call mu_mailbox_sync before closing
27253	destination mailbox.
27254
272552008-05-28  Sergey Poznyakoff  <gray@gnu.org.ua>
27256
27257	* lib/Makefile.am (libmuaux_la_SOURCES): Add userprivs.c.
27258	* lib/userprivs.c: New file.
27259	* lib/muaux.h (mu_switch_to_privs): New prototype.
27260
27261	* libproto/include/amd.h (_amd_data.msg_finish_delivery): Pass
27262	original message as the 3rd argument.
27263	* libproto/maildir/mbox.c (maildir_msg_finish_delivery): Take
27264	original message as the 3rd argument.
27265	Use message attributes to select the subdirectory to place it
27266	into.
27267	* mailbox/amd.c (amd_append_message): Pass original message as the
27268	3rd argument to msg_finish_delivery.
27269
27270	* mailbox/filter_trans.c (SOFTBRK): Remove unused macro.
27271
27272	* movemail/movemail.c: New option --copy-permissions (-P).
27273
272742008-04-07  Sergey Poznyakoff  <gray@gnu.org.ua>
27275
27276	Implement compilation of Sieve sources from the memory.
27277
27278	* include/mailutils/libsieve.h (mu_sieve_compile_buffer): New
27279	function.
27280	* libsieve/sieve.h (sieve_lex_begin_string): New function.
27281	* libsieve/sieve.l: Remove support for AT&T lex.
27282	(sieve_lex_begin_string): New function.
27283	* libsieve/sieve.y (mu_sieve_compile_buffer): New
27284	function.
27285
27286	* mailbox/header.c: Fix indentation.
27287
272882008-03-15  Sergey Poznyakoff  <gray@gnu.org.ua>
27289
27290	* libargp/tls.c (_tls_argp_parser): Take care not to pass NULL as
27291	the argument to the "tls" statement.
27292
272932008-03-07  Sergey Poznyakoff  <gray@gnu.org.ua>
27294
27295	* comsat/comsat.c, imap4d/imap4d.c, imap4d/preauth.c,
27296	libargp/sieve.c, libcfg/ldap.c, libcfg/sieve.c: Fix translatable
27297	strings.
27298
272992008-03-07  Sergey Poznyakoff  <gray@gnu.org.ua>
27300
27301	* configure.ac: Require gettext 0.17
27302	* auth/ldap.c, auth/radius.c, libargp/tls.c, mailbox/cfg_lexer.c,
27303	pop3d/logindelay.c: Fix diagnostic messages.
27304
273052008-03-03  Sergey Poznyakoff  <gray@gnu.org.ua>
27306
27307	* maidag/maidag.c (main): Fix autodetection of log_to_stderr.
27308	* maidag/deliver.c, maidag/maidag.h, maidag/mailtmp.c: Rename
27309	mailer_err to maidag_error.
27310	* maidag/util.c (mailer_err): Rename to maidag_error. Print to
27311	stderr only if log_to_stderr is set.
27312
27313	Fix bootstrapping with gettext 0.17.
27314
27315	* bootstrap.conf (avoided_gnulib_modules): Remove size_max
27316	(excluded_files): Remove m4/size_max.m4.
27317	(gnulib_extra_files): Add m4/inttostr.m4
27318	* gnulib.modules: Add intprops and stdint.
27319
27320	* m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4, m4/inttypes-h.m4,
27321	m4/inttypes-pri.m4, m4/inttypes.m4, m4/inttypes_h.m4: Remove
27322
273232008-03-02  Sergey Poznyakoff  <gray@gnu.org.ua>
27324
27325	* bootstrap.conf (XGETTEXT_OPTIONS): Update flags.
27326	* configure.ac, NEWS: Version 1.9.90
27327	* m4/.cvsignore: Add environ.m4
27328
27329	* po/ca.po, po/es.po, po/fr.po, po/pl.po, po/ro.po, po/ru.po,
27330	po/rw.po, po/sv.po, po/uk.po, po/LINGUAS, po/ChangeLog: Remove.
27331	We will get po files directly from translationproject.org.
27332
273332008-03-01  Sergey Poznyakoff  <gray@gnu.org.ua>
27334
27335	* mh/folder.c, mh/mh_argp.c, mh/mh_getopt.c, mh/mh_init.c,
27336	mh/rmf.c: Use mu_program_name instead of
27337	program_invocation_short_name.
27338
273392008-02-29  Sergey Poznyakoff  <gray@gnu.org.ua>
27340
27341	* mh/mh_ctx.c (mh_context_read): Allow for header continuation
27342	lines.
27343	* mh/mh_whom.c (mh_whom): Improve diagnostics.
27344
273452008-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>
27346
27347	* examples/Makefile.am (AM_LDFLAGS): Remove.
27348	(LDADD): Add the necessary libraries.
27349	(aclck_LDADD, argcv_LDADD): Remove.
27350	(muemail_LDADD): Needs MU_APP_LIBRARIES.
27351
273522008-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
27353
27354	* libcfg/init.c: Fix error reporting.
27355	* mailbox/cfg_driver.c (mu_parse_config): Fix memory leak.
27356
273572008-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
27358
27359	* libsieve/load.c: Add forward declaration of _add_load_dir
27360	* mailbox/parsedate.y (DATE_SET): Fix bug introduced 2008-01-02:
27361	val can sometimes be negative.
27362	* examples/Makefile.am (aclck_LDADD): Define.
27363
273642008-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
27365
27366	* comsat/comsat.c (comsat_cfg_param): Reword a help message
27367	for require-tty.
27368	* examples/header.c (cmd_readline): New function.
27369	New command 'readline'.
27370	* po/POTFILES.in: Remove stray reference to muerrno.c
27371
273722008-02-08  Sergey Poznyakoff  <gray@gnu.org.ua>
27373
27374	* comsat/action.c (act_getline): Bugfix. Do not return eof
27375	on an empty line. Reported by Damon Harper.
27376
273772008-02-06  Sergey Poznyakoff  <gray@gnu.org.ua>
27378
27379	* examples/pop3client.c: Implement variable expansions in the
27380	prompt.
27381
27382	* NEWS: Update.
27383
27384	* pop3d/bulletin.c (read_bulletin_db): Return success if db does
27385	not exist.
27386	* lib/strexit.c: New file.
27387	* lib/signal.c: New file.
27388
273892008-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
27390
27391	* pop3d/extra.c (pop3d_readline): After a failed authorization
27392	attempt many clients simply disconnect without issuing QUIT.
27393	Do not count this as a protocol error.
27394
27395	* NEWS: Update.
27396	* imap4d/bye.c, imap4d/starttls.c, imap4d/util.c: Use exit codes
27397	from sysexits.h
27398	* imap4d/imap4d.c: Use mu_set_signals to install signals.
27399	Use exit codes from sysexits.h.
27400	* imap4d/imap4d.h: Include sysexits.h and muaux.h
27401	(ERR_TERMINATE): New define.
27402	(imap4d_sigchld,imap4d_signal): Remove.
27403	(imap4d_master_signal,imap4d_child_signal): New prototypes.
27404	* imap4d/signal.c (imap4d_master_signal,imap4d_child_signal): New
27405	functions.
27406
27407	* pop3d/pop3d.h Include sysexits.h and muaux.h
27408	(ERR_TERMINATE): New define.
27409	(pop3d_signal): Remove.
27410	(pop3d_master_signal, pop3d_child_signal): New protos.
27411	* pop3d/signal.c (pop3d_master_signal, pop3d_child_signal): New
27412	functions.
27413
27414	* pop3d/extra.c, pop3d/popauth.c
27415	* pop3d/pop3d.c: Use mu_set_signals to install signals.
27416	Use exit codes from sysexits.h.
27417
27418	* include/mailutils/server.h (mu_m_server_set_strexit): New
27419	prototype.
27420	* include/mailutils/types.hin (MU_ARRAY_SIZE): New define.
27421
27422	* lib/Makefile.am (libmuaux_la_SOURCES): Add signal.c, strexit.c.
27423	(noinst_HEADERS): Add muaux.h
27424	* lib/muaux.h: New file.
27425
27426	* libsieve/extensions/spamd.c: Add NLS markers.
27427
27428	* mailbox/header.c (header_readline): Minor rewrite.
27429	* mailbox/msrv.c (struct _mu_m_server): New member `strexit'.
27430	(mu_m_server_begin): Call alloc_children.
27431	(mu_m_server_restore_signals): New function.
27432	(mu_m_server_end): Call mu_m_server_restore_signals.
27433	(m_srv_conn): Reset signals in child branch.
27434
27435	* po/POTFILES.in: Update.
27436
27437	* mailbox/header.c (header_readline): Bugfix: account for
27438	multi-line headers.
27439
27440	* imap4d/list.c (imap4d_list): Speed up LIST "" INBOX.
27441	* libproto/imap/folder.c (folder_imap_list): Remove erroneous
27442	assignments to f_imap->folder.
27443
27444	Fix handling of remote mailboxes in clients:
27445
27446	* libproto/imap/url.c (_url_imap_init,_url_imaps_init): Remove
27447	call to mu_url_init.
27448	* libproto/pop/url.c (_url_pop_init): Remove call to mu_url_init.
27449	* mailbox/mailbox.c (mailbox_folder_create): Bugfix: Lack of path
27450	component is not an error.
27451
274522008-02-04  Sergey Poznyakoff  <gray@gnu.org.ua>
27453
27454	* mailbox/msrv.c (struct _mu_m_server): New member `num_children'.
27455	New member `child_pid'.
27456	(children): Remove global.
27457	(m_server_list): New variable. Keeps track of created m_servers.
27458	(alloc_children, register_child, unregister_child)
27459	(terminate_children): New functions.
27460	(m_server_cleanup): New function.
27461	(mu_m_server_idle): Iterate over all registered m-servers until
27462	one of them recognizes the child.
27463	(mu_m_server_create,mu_m_server_destroy): Keep track of existing
27464	m-servers using m_server_list.
27465	(mu_m_server_set_max_children): Rewrite using alloc_children.
27466	(mu_m_server_run): Terminate all children before returning.
27467	(m_srv_conn): Use register_child to remember created children.
27468
27469	* NEWS: Update.
27470	* examples/header.c: New command `itr'.
27471	(main): Empty input repeats the recent command.
27472	* include/mailutils/header.h (mu_header_get_iterator): New
27473	function.
27474	* libproto/include/header0.h (struct _mu_header): New member itr.
27475	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add hdritr.c
27476	* mailbox/hdritr.c: New file.
27477	* mailbox/header.c (mu_header_remove): Bugfix. Invalidate the
27478	header after removal.
27479
274802008-01-31  Sergey Poznyakoff  <gray@gnu.org.ua>
27481
27482	* auth/radius.c (_expand_query): Fix typo.
27483	* mailbox/cfg_lexer.c (copy_string0): New function.
27484	(copy_string): Rewrite using copy_string0.
27485	(copy_to): Parse strings correctly.
27486	(default_lexer): Bugfix. Return string if tag is quoted.
27487
274882008-01-28  Sergey Poznyakoff  <gray@gnu.org.ua>
27489
27490	* pop3d/bulletin.c (open_bulletin_mailbox): Bugfix.
27491
274922008-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>
27493
27494	* mailbox/cfg_driver.c (mu_cfg_section_add_params): Initialize
27495	section.target with param->data;
27496	* mailbox/stream.c (mu_stream_vprintf): Bugfix.
27497
274982008-01-22  Sergey Poznyakoff  <gray@gnu.org.ua>
27499
27500	* examples/listop.c (find): Fix copy-n-paste error.
27501	(iter): Return error code.
27502	(main): Create iterators on demand.
27503	New command `close'.
27504
27505	* mailbox/iterator.c (mu_iterator_detach): Bugfix.
27506
275072008-01-16  Sergey Poznyakoff  <gray@gnu.org.ua>
27508
27509	* include/mailutils/acl.h, include/mailutils/debug.hm4,
27510	mailbox/acl.c (mu_sockaddr_to_str, mu_sockaddr_to_astr)
27511	(mu_acl_check_sockaddr, mu_acl_check_inaddr): Use const pointers
27512	when appropriate.
27513
27514	* include/mailutils/cfg.h (mu_offsetof): Move mu_offsetof to
27515	types.hin.
27516	* include/mailutils/types.hin (mu_offsetof): New macro.
27517	* mailbox/acl.c (MU_S_UN_NAME): New macro.
27518	(debug_sockaddr, mu_sockaddr_to_str, _acl_match)
27519	(_run_entry): Take into account salen for AF_UNIX.
27520
275212008-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
27522
27523	* include/mailutils/gocs.h (log_facility): Remove.
27524	* include/mailutils/syslog.h (mu_log_facility, mu_log_tag): New
27525	declarations.
27526	(MU_LOG_TAG): New define.
27527	* mailbox/gocs.c (mu_gocs_logging_init): Set mu_log_tag.
27528	* mailbox/syslog.c (mu_log_facility, mu_log_tag): New variables.
27529	* libcfg/common.c (mu_logging_param): New statement `tag'.
27530	* comsat/comsat.c, imap4d/imap4d.c, imap4d/login.c,
27531	maidag/maidag.c, mail.local/main.c, pop3d/pop3d.c, pop3d/user.c,
27532	sieve/sieve.c: Use MU_LOG_TAG in openlog, and
27533	program_version in mu_m_server_create calls.
27534
27535	* libsieve/conf.c (mu_sieve_module_init): Remove initial call to
27536	_path_append.
27537	* libsieve/load.c (sieve_init_load_path): New function.
27538	(load_module,sieve_load_add_path,sieve_load_add_dir): Call
27539	sieve_init_load_path.
27540	* mail.local/main.c (parse_opt): Bugfix. Translate -S option to
27541	sieve-filter configuration statement.
27542
275432008-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>
27544
27545	Fix NLS issues.
27546
27547	* configure.ac: Define DEFAULT_TEXT_DOMAIN
27548	* comsat/comsat.c, dotlock/dotlock.c, frm/frm.c, frm/from.c,
27549	guimb/main.c, imap4d/imap4d.c, maidag/maidag.c, mail/mail.c,
27550	mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c,
27551	mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c,
27552	mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c,
27553	mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
27554	mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
27555	mh/sortm.c, mh/whatnow.c, mh/whom.c, mimeview/mimeview.c,
27556	movemail/movemail.c, pop3d/pop3d.c, pop3d/popauth.c,
27557	readmsg/readmsg.c, sieve/sieve.c,
27558	Use MU_APP_INIT_NLS instead of mu_init_nls.
27559	* mailbox/nls.c (mu_init_nls): Do not call textdomain.
27560
27561	* guimb/guimb.h, guimb/util.c (util_error): fmt is const.
27562	* include/mailutils/debug.hm4: include <mailutils/error.h>
27563	* include/mailutils/nls.h: Define _ and N_ only if
27564	DEFAULT_TEXT_DOMAIN is defined (for use in the library).
27565	* maidag/maidag.h, maidag/util.c (mailer_err) : fmt is const.
27566	* mail.local/mail.local.h (mailer_err): All mandatory args are
27567	consts.
27568	* mailbox/msrv.c: Include limits.h
27569
275702008-01-12  Sergey Poznyakoff  <gray@gnu.org.ua>
27571
27572	* NEWS, configure.ac: Version 1.2.91.
27573
27574	* mailbox/gdebug.c (mu_debug_level_from_string): Bugfix.
27575
275762008-01-09  Sergey Poznyakoff  <gray@gnu.org.ua>
27577
27578	* auth/ldap.c (_mu_ldap_search): Provide %u expansion for backward
27579	compatibility with other modules.
27580	* auth/radius.c, auth/sql.c: Use mu_vartab_t for expansion.
27581	* include/mailutils/mailutils.h: Include mailutils/assoc.h
27582	* lib/tcpwrap.c (mu_tcpwrapper_access): Ignore local sockets.
27583	* libargp/muinit.c (mu_app_init): Re-assign mu_program_name after
27584	command line parsing, so that --program-name takes effect.
27585	* libcfg/sql.c (mu_sql_param): Fix typo in statement name.
27586	* libproto/include/amd.h (struct _amd_message.create): New member.
27587	* libproto/maildir/mbox.c (maildir_create): New function.
27588	(_mailbox_maildir_init): Set amd->create.
27589	* mailbox/amd.c (amd_open): Call amd->create after successfully
27590	creating the directory.
27591	* mailbox/cfg_driver.c (_cb_include): Mask out
27592	MU_PARSE_CONFIG_GLOBAL in the flags.
27593	(mu_build_container): Bugfix. Take struct include_data as
27594	argument, instead of using an auto variable. All callers updated.
27595	* mailbox/ipsrv.c (mu_ip_tcp_accept): Bugfix: use client address,
27596	not server, to print diagnostics.
27597	* mailbox/msrv.c (m_srv_conn): Fix prefork condition for
27598	single-process mode.
27599
27600	* TODO: Update.
27601	* include/mailutils/server.h (mu_m_server_set_foreground)
27602	(mu_m_server_foreground,mu_m_server_pidfile)
27603	(mu_m_server_set_default_address)
27604	(mu_m_server_get_srvlist)
27605	(mu_m_server_get_default_address): New functions.
27606	* libargp/muinit.c (get_canonical_name): Do not use xmalloc.
27607	* mailbox/ipsrv.c (mu_ip_server_get_sockaddr): Return
27608	MU_ERR_BUFSPACE if provided buffer is not long enough to
27609	accommodate the result.
27610	* mailbox/msrv.c (mu_m_server_set_foreground)
27611	(mu_m_server_foreground,mu_m_server_pidfile)
27612	(mu_m_server_set_default_address)
27613	(mu_m_server_get_srvlist)
27614	(mu_m_server_get_default_address)
27615	(mu_m_server_parse_url): New functions.
27616
276172008-01-06  Sergey Poznyakoff  <gray@gnu.org.ua>
27618
27619	Fix message delivery to maildir boxes.
27620
27621	* libproto/include/amd.h (struct _amd_message): Remove `deleted',
27622	add `orig_flags' instead.
27623	(struct _amd_data): Remove `msg_file_name', add `cur_msg_file_name'
27624	and `new_msg_file_name'.
27625	Add `mailbox_size'.
27626	* libproto/maildir/mbox.c (struct _maildir_message): Remove
27627	`newflag', add `dir'.
27628	(maildir_name_info_ptr): New function.
27629	(mk_info_filename): Bugfix.
27630	(maildir_cur_message_name, maildir_new_message_name): New
27631	functions.
27632	(maildir_msg_init): Set ->dir
27633	(maildir_msg_finish_delivery): Handle error conditions.
27634	(maildir_scan_dir): New argument `dirname'. Initialize orig_flags.
27635	(maildir_qfetch): Initialize dir.
27636	(_mailbox_maildir_init): Set cur_msg_file_name and
27637	new_msg_file_name.
27638	* libproto/mh/mbox.c (_mh_cur_message_name)
27639	(_mh_new_message_name): New functions.
27640	(mh_scan0): Initialize orig_flags.
27641	(_mailbox_mh_init): Set cur_msg_file_name and
27642	new_msg_file_name.
27643	* mailbox/amd.c (amd_message_qid, _amd_message_save)
27644	(amd_append_message, amd_expunge, amd_scan_message)
27645	(amd_pool_open, amd_header_fill): Use appropriate msg_file_name
27646	functions.
27647	(amd_get_size): Implemented.
27648	* mailbox/mailbox.c (mu_mailbox_flush): Bugfix.
27649
276502008-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
27651
27652	* NEWS: Update.
27653
27654	* mailbox/Makefile.am: Replace tcpsrv.c with ipsrv.c.
27655	* mailbox/tcpsrv.c: Replace with ...
27656	* mailbox/ipsrv.c: ... this file, which supports both TCP and UDP.
27657
27658	* mailbox/msrv.c: Use mu_ip_server_t.
27659	* mailbox/server.c (mu_server_destroy): Bugfix.
27660	* comsat/comsat.c, comsat/comsat.h: Use m-server.
27661
27662	* maidag/lmtp.c, maidag/maidag.h, pop3d/pop3d.c: Update to match
27663	changed m-server types.
27664
27665	* include/mailutils/server.h (mu_tcp_*): Replace with mu_ip_*.
27666	Add new prototypes.
27667	* include/mailutils/types.hin: Likewise.
27668
27669	* lib/tcpwrap.c, lib/tcpwrap.h (mu_tcp_wrapper_prefork): Update
27670	signature to match mu_m_server_prefork_fp.
27671
27672	* examples/echosrv.c: Use mu_ip_server_t
27673	* imap4d/idle.c, imap4d/imap4d.c, imap4d/imap4d.h,
27674	imap4d/preauth.c, imap4d/util.c: Remove mu_gocs_daemon.
27675	* include/mailutils/gocs.h, include/mailutils/libargp.h,
27676	include/mailutils/libargp.h, libargp/cmdline.c,
27677	libargp/common.c, libcfg/common.c, libcfg/init.c,
27678	mailbox/daemon.c, mailbox/gocs.c: Remove mu_gocs_daemon.
27679
27680	* mailbox/amd.c (amd_open): Provide a null-locker.
27681	* include/mailutils/locker.h, mailbox/locker.c
27682	(mu_locker_mod_flags): New function.
27683
27684	* examples/config/mailutils.schema: LDAP schema for Mailutils.
27685	* examples/config/Makefile.am: Add mailutils.schema
27686
27687	* dotlock/dotlock.c (main): Remove superfluous invocation of
27688	mu_locker_set_flags.
27689
27690	* libproto/mbox/mbox.c (mbox_quick_get_message): Return
27691	MU_ERR_NOENT if mailbox is empty.
27692
27693	* mailbox/tcpsrv.c (family_to_proto): Rename to
27694	mu_address_family_to_domain.
27695	* po/POTFILES.in: Update.
27696	* pop3d/lock.c (pop3d_lock): use mu_locker_mod_flags, instead of
27697	mu_locker_set_flags.
27698
27699	* include/mailutils/server.h (mu_m_server_prefork_fp): New
27700	function type.
27701	(mu_m_server_destroy, mu_m_server_set_prefork)
27702	(mu_m_server_configured_count, mu_m_server_end): New functions.
27703	* mailbox/msrv.c (struct _mu_m_server.prefork): New member.
27704	(mu_m_server_set_prefork): New function.
27705	(m_srv_conn): Use prefork to decide whether to proceed with a
27706	connection.
27707
27708	* lib/tcpwrap.c, lib/tcpwrap.h (mu_tcp_wrapper_prefork): New
27709	function.
27710
27711	* imap4d/imap4d.c, maidag/lmtp.c, maidag/maidag.c,
27712	pop3d/pop3d.c: Use m-server prefork to handle TCP wrappers.
27713
27714	* po/POTFILES.in: Add more files.
27715
277162008-01-04  Sergey Poznyakoff  <gray@gnu.org.ua>
27717
27718	* TODO, NEWS: Update.
27719	* mailbox/msrv.c: New file.
27720	* mailbox/Makefile.am: Add msrv.c.
27721	* include/mailutils/server.h (mu_tcp_server_conn_fp): Take
27722	sockaddr as argument
27723	(mu_tcp_server_create,mu_tcp_server_get_sockaddr): Likewise.
27724	(mu_m_server_*): New prototypes.
27725	* include/mailutils/types.hin (mu_m_server_t): New type.
27726	* mailbox/acl.c: Fix debugging output.
27727	(mu_sockaddr_to_str, mu_sockaddr_to_astr): New functions.
27728
27729	* mailbox/tcpsrv.c: Handle AF_INET and AF_UNIX sockets.
27730	* examples/echosrv.c: Update mu_tcp_server_* calls.
27731	* examples/config/Makefile.am: Remove comsat.conf and
27732	mailutils.rc.
27733
27734	* imap4d/imap4d.c, imap4d/imap4d.h, imap4d/signal.c,
27735	maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h, pop3d/extra.c,
27736	pop3d/pop3d.c, pop3d/pop3d.h, pop3d/signal.c: Rewrite using
27737	m-server.
27738
27739	* include/mailutils/cfg.h (mu_offsetof): Bug fix.
27740	* mailbox/cfg_driver.c (dup_container): Bugfix. Offset was not
27741	copied.
27742	(mu_cfg_section_add_params): If identifier starts with a dot, it
27743	is hidden, i.e. its substatements are copied directly into the
27744	parent structure.
27745	* mailbox/cfg_lexer.c (isword): Take care of opening braces.
27746	(default_lexer): Several fixes.
27747	* mailbox/cfg_parser.y (mu_cfg_parse): Initialize debugging level
27748	from global settings.
27749	(_scan_tree_helper): Ensure debugging object has correct locus
27750	information before calling the section parser.
27751	(mu_cfg_scan_tree): If no debugging object is supplied, use the
27752	one from diag.c
27753	* mailbox/daemon.c (mu_daemon_create_pidfile): Return a meaningful
27754	error code.
27755	* mailbox/debug.c (mu_debug_create): Initialize printer to NULL.
27756	(mu_debug_vprintf): If printer is NULL, use
27757	mu_debug_default_printer.
27758	(mu_debug_check_level): Bugfix.
27759
27760	* mailbox/server.c: Minor indentation fix.
27761	* mailbox/syslog.c (mu_diag_syslog_printer): Chop off \r as well.
27762	* mailbox/folder.c (mu_folder_create_from_record): Bugfixes.
27763
27764	* include/mailutils/debug.hm4 (mu_sockaddr_to_str)
27765	(mu_sockaddr_to_astr): New functions.
27766
27767	* include/mailutils/.cvsignore: Add debug.h
27768
27769	* po/POTFILES.in: Update.
27770
277712008-01-02  Sergey Poznyakoff  <gray@gnu.org.ua>
27772
27773	* include/mailutils/property.h: Update
27774	* libproto/include/property0.h (struct property_item): Remove
27775	key, set and next.
27776	(struct _mu_property): Use mu_assoc_t to keep the items.
27777	* mailbox/property.c: Rewrite using mu_assoc_t for storage.
27778
27779        * mailbox/parsedate.y (DATE_SET): Take an additional argument
27780	specifying upper limit for the value. Bail out if val is out of
27781	range. All callers updated.
27782        (SET_.*): Rewrite via __SET_.*
27783
277842007-12-30  Sergey Poznyakoff  <gray@gnu.org.ua>
27785
27786	* comsat/comsat.c: New config statement require-tty.
27787	(main): Use /dev/null as the tty if require-tty is false.
27788
27789	* examples/config/comsat.conf: Remove obsolete example file.
27790	* examples/config/mailutils.rc: Remove obsolete example file.
27791
27792	* comsat/oldcfg.c: New file.
27793	* comsat/Makefile.am: Add oldcfg.c.
27794	* comsat/comsat.c: Handle old -c option and provide a new option
27795	for converting old-style config file to the new format.
27796
27797	* comsat/Makefile.am: Remove cfg.c
27798	* comsat/cfg.c: Remove.
27799	* comsat/comsat.c: Use MU configuration and acls.
27800	* comsat/comsat.h: Include acl.h
27801	* libproto/maildir/mbox.c (maildir_qfetch): Bugfix.
27802
27803	* NEWS: Update.
27804
27805	* frm/testsuite/frm/test.exp: Call mu_init with -noflags option.
27806	Use --mail-folder option when necessary.
27807	* messages/testsuite/messages/test.exp: Likewise.
27808	* readmsg/testsuite/readmsg/test.exp: Likewise.
27809	* sieve/testsuite/lib/sieve.exp: Likewise.
27810	* sieve/testsuite/sieve/action.exp: Likewise.
27811	* sieve/testsuite/scripts/fileinto.sv: Use +file, instead of
27812	%file.
27813
27814	* imap4d/imap4d.c: Register mailbox formats before parsing
27815	configuration.
27816	* imap4d/util.c (util_wcard_match): Replaced with a more efficient
27817	implementation, based on wildmat from GNU Radius.
27818	* imap4d/testsuite/imap4d/list.exp: Expect two non-mailbox files
27819	to appear in the list output (see libproto/mbox/folder.c, 2007-12-28).
27820
27821	* libargp/common.c: New option --mail-folder.
27822	* libcfg/common.c: New statement mailbox/folder
27823
27824	* libproto/maildir/folder.c (_maildir_is_scheme): Never return
27825	MU_FOLDER_ATTRIBUTE_DIRECTORY bit: maildir folders cannot contain
27826	subfolders.
27827	* libproto/maildir/mbox.c (maildir_msg_init): Bugfix: use full
27828	file name.
27829	Print additional diagnostics if stat fails.
27830	* libproto/mbox/folder.c (list_helper): Take additional argument,
27831	record, specifying a mu_record_t object to match entries
27832	against. If it is NULL, mu_registrar_lookup is used.
27833	Fix descending into subdirectories.
27834
27835	* maidag/deliver.c (deliver): Split off deliver_to_user function;
27836	call it with user privileges. This fixes privileges of any created
27837	maildir folders.
27838	* maidag/maidag.c (set_debug_flags): Bugfix.
27839
27840	* mail/mail.c (main): Open the mailbox with MU_STREAM_CREAT flag.
27841
27842	* mailbox/amd.c (amd_open): Do not initialize amd->mtime to
27843	trigger initial scanning.
27844	(_amd_message_save): Check rename return value.
27845	(amd_is_updated): Do not check for msg_count==0, rely on the
27846	timestamp.
27847
27848	* mailbox/mailbox.c (mu_mailbox_set_default_proto): Accept an
27849	argument without trailing semicolon.
27850	* mailbox/mbx_default.c (mu_set_mail_directory): Accept NULL
27851	argument.
27852	(mu_set_mailbox_pattern): Likewise.
27853	(mu_mailbox_create_default): Use FOLDER or MAIL environment
27854	variables only if _mu_mailbox_pattern is not set. In other words,
27855	setting mail-spool in the configuration file overrides these
27856	variables.
27857
278582007-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
27859
27860	Additional mailbox URL parameters `type', `user' and `param' can
27861	appear in any local URLs.
27862
27863	* TODO, NEWS: Update.
27864
27865	* examples/url-parse.c: Print field/value pairs.
27866	* include/mailutils/argcv.h (MU_ARGCV_RETURN_DELIMS): New macro.
27867	(mu_argcv_get_np): New function.
27868	(mu_argcv_remove): New function.
27869	* include/mailutils/mutil.h (mu_scheme_autodetect_p): Change
27870	prototype.
27871	* include/mailutils/registrar.h (mu_registrar_lookup_url): New
27872	function.
27873	(struct _mu_record._is_scheme): Change signature.
27874	* include/mailutils/url.h (mu_url_sget_fvpairs)
27875	(mu_url_aget_fvpairs): New functions.
27876	(mu_url_expand_path): New function.
27877
27878	* libproto/imap/folder.c (folder_imap_list): Fix signature.
27879	* libproto/nntp/folder.c (nntp_folder_list): Fix signature.
27880	* libproto/include/amd.h (amd_url_init): Remove.
27881	* libproto/include/registrar0.h: Fix scheme defines.
27882	* libproto/include/url0.h (struct _mu_url.fvpairs,fvcount): New
27883	members.
27884	* libproto/maildir/folder.c (_maildir_is_scheme): Change
27885	signature.
27886	(_maildir_url_init): Remove
27887	(_maildir_record): Remove url_init.
27888	* libproto/mbox/folder.c (_path_record): Remove url_init.
27889	(_mbox_record): Use mu_url_expand_path as url_init.
27890	(_path_is_scheme): Change signature.
27891	* libproto/mh/folder.c (_mh_is_scheme): Change signature.
27892	(_mh_url_init): Remove.
27893	(_mh_record): Use
27894	mu_url_expand_path as url_init.
27895	* libproto/mbox/Makefile.am (libmu_mbox_la_SOURCES): Remove url.c
27896	* libproto/mbox/url.c: Remove.
27897
27898	* mail/mail.h, mail/util.c (util_url_to_string): New function.
27899	* mail/quit.c, mail/summary.c: Use util_url_to_string where
27900	appropriate.
27901	* mailbox/amd.c (amd_url_destroy, amd_url_init): Remove.
27902	* mailbox/argcv.c (mu_argcv_get_np): New function.
27903	(argcv_scan): Change signature. All callers updated.
27904	(argcv_get_n): Rewrite using argcv_get_np.
27905	(mu_argcv_remove): New function.
27906
27907	* mailbox/file_stream.c (struct _prog_stream.argc): Fix data type.
27908	* mailbox/folder.c (mu_folder_create_from_record): URL initializer
27909	is optional.
27910	* mailbox/gdebug.c (mu_global_debug_from_string): Fix datatype of
27911	argc.
27912	* mailbox/mailbox.c (mailbox_folder_create): Rewrite.
27913	(_create_mailbox): Split off _create_mailbox0 function.
27914	Make URL initializer optional.
27915	* mailbox/mutil.c (mu_scheme_autodetect_p): Rewrite.
27916	* mailbox/registrar.c (mu_registrar_lookup_url): New function.
27917	(mu_registrar_lookup): Rewrite using mu_registrar_lookup_url.
27918	(mu_record_is_scheme,mu_record_set_is_scheme): Change signature.
27919	* mailbox/url.c (mu_url_destroy): Destroy fvpairs.
27920	(url_parse0): Use scheme "file" for URLs beginning with a /.
27921	Parse parameters.
27922	(mu_url_sget_fvpairs, mu_url_aget_fvpairs): New functions.
27923	(mu_url_expand_path): New function.
27924	* mailbox/testsuite/Urls: Update.
27925
27926	* pop3d/bulletin.c (set_bulletin_db,set_bulletin_source): Allocate
27927	string storage.
27928	(read_bulletin_db): Return 0 if no record was found.
27929	(get_last_delivered_num): Return error code.
27930	(deliver_pending_bulletins): Rewrite.
27931	* pop3d/capa.c (pop3d_capa): Bugfix.
27932
279332007-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
27934
27935	* examples/lsf.c: Use mu_folder_enumerate + callback function, for
27936	speed up.
27937	* imap4d/imap4d.h (WCARD_NOMATCH,WCARD_MATCH)
27938	(WCARD_RECURSE_MATCH): Remove.
27939	* imap4d/list.c: Rewrite using mu_folder_enumerate.
27940	* imap4d/lsub.c (imap4d_lsub): Fix call to util_wcard_match.
27941	* imap4d/util.c (util_wcard_match): Return 0 for match, 1
27942	otherwise.
27943	* imap4d/testsuite/imap4d/list.exp: Fix two testcases to match
27944	the new (stricter RFC-compliant) behavior.
27945	* include/mailutils/folder.h (mu_folder_match_fp): New typedef.
27946	(mu_folder_enumerate_fp): New typedef.
27947	(mu_folder_enumerate): New function.
27948	(mu_folder_set_match, mu_folder_get_match): New functions.
27949
27950	* libproto/imap/folder.c, libproto/include/imap0.h,
27951	libproto/nntp/folder.c : Use new folder list framework.
27952	* libproto/include/folder0.h (struct _mu_folder._list): Change
27953	signature.
27954	(_match): New member.
27955	* libproto/mbox/folder.c (_path_is_scheme): Improve automatic
27956	mailbox	format detection.
27957	(folder_mbox_list): Do not use glob, recursively scan
27958	subdirectories instead.
27959	* mailbox/folder.c (mu_folder_match): New function.
27960	(mu_folder_create_from_record): Set mu_folder_match as the default
27961	matcher.
27962	(mu_folder_set_match, mu_folder_get_match): New functions.
27963	(mu_folder_enumerate): New function.
27964	(mu_folder_list): Rewrite using mu_folder_enumerate.
27965
279662007-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
27967
27968	* NEWS: Update.
27969	* configure.ac (MU_LIB_REMOTE): New substitution variable.
27970	(AC_CONFIG_FILES): Add libproto/remote/Makefile.
27971	* imap4d/copy.c, imap4d/create.c, imap4d/delete.c, imap4d/fetch.c,
27972	imap4d/imap4d.c, imap4d/list.c, imap4d/lsub.c, imap4d/rename.c,
27973	imap4d/subscribe.c, imap4d/unsubscribe.c, imap4d/util.c: Spelling
27974	fixes.
27975	* include/mailutils/cfg.h (mu_cfg_error_count): New variable.
27976	* include/mailutils/gocs.h (struct mu_gocs_mailbox):  New member
27977	mailbox_pattern
27978	* include/mailutils/libargp.h (mu_rcfile_lint): New variable.
27979	* include/mailutils/mailbox.h (mu_set_mailbox_pattern): New
27980	function.
27981	(mu_mail_directory): Removed.
27982	(mu_mailbox_url): New function.
27983	* include/mailutils/mutil.h (mu_normalize_mailbox_url): Remove.
27984	* include/mailutils/registrar.h (mu_0_6_registrar_lookup): Remove.
27985
27986	* libargp/common.c: New options --rcfile-lint and
27987	--mailbox-pattern.
27988	* libargp/muinit.c: Handle --rcfile-lint.
27989	* libcfg/common.c: New statement mailbox-pattern
27990	* libmu_scm/mu_mailbox.c (mu-mail-directory): Deprecated.
27991	(mu-user-mailbox-url): New function.
27992
27993	* libproto/remote: New directory.
27994	* libproto/remote/folder.c: New file.
27995	* libproto/remote/mbox.c: New file.
27996	* libproto/remote/.cvsignore: New file.
27997
27998	* libproto/Makefile.am (SUBDIRS): Add remote
27999	* libproto/mbox/folder.c, libproto/mbox/url.c: Indentation and
28000	spelling fixes.
28001	* maidag/Makefile.am (maidag_LDADD): Add MU_LIB_REMOTE.
28002	* maidag/maidag.c: Register mu_remote_mbox_record.
28003	* mailbox/cfg_parser.y (mu_cfg_error_count): New variable.
28004	(mu_cfg_format_error,_mu_cfg_vperror): Increment
28005	mu_cfg_error_count.
28006	* mailbox/debug.c (mu_debug_check_level): Do not mask out
28007	inheritance bit.
28008	* mailbox/gocs.c (mu_gocs_mailbox_init): Set mailbox pattern.
28009	* mailbox/mailbox.c (_create_mailbox): Bugfix.
28010	* mailbox/mbx_default.c (mu_set_mailbox_pattern): New function.
28011	(mu_set_mail_directory): Rewrite.
28012	(user_mailbox_name): Rewrite.
28013	* mailbox/mutil.c (mu_normalize_mailbox_url): Remove.
28014	* mailbox/registrar.c (mu_0_6_registrar_lookup): Remove.
28015	* guimb/scm/sieve-core.scm (sieve-main): Use mu-user-mailbox-url.
28016
280172007-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
28018
28019	* libcfg/acl.c (getword): Bugfix.
28020	* maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h: Use ACLs.
28021	* pop3d/pop3d.c (pop3d_cfg_param): Add acl section.
28022
280232007-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
28024
28025	* examples/aclck.c, examples/addr.c, examples/base64.c,
28026	examples/decode2047.c, examples/echosrv.c, examples/encode2047.c,
28027	examples/header.c, examples/http.c, examples/iconv.c,
28028	examples/listop.c, examples/lsf.c, examples/mailcap.c,
28029	examples/mimetest.c, examples/msg-send.c, examples/muemail.c,
28030	examples/murun.c, examples/nntpclient.c, examples/pop3client.c,
28031	examples/sfrom.c, examples/url-parse.c: Include config.h. Use
28032	MU_ASSERT instead of assert.
28033
28034	* include/mailutils/cfg.h (struct mu_cfg_section.offset): New
28035	member.
28036	* include/mailutils/debug.hm4 (MU_ASSERT): New member.
28037	* lib/utmp.c: Include config.h.
28038	* libcfg/Makefile.am (libmucfg_la_SOURCES): Add acl.c.
28039	* libcfg/acl.c: New file.
28040	* libcfg/common.c (cb_debug_level): Immediately set debugging
28041	level.
28042	* mailbox/acl.c: mu_acl_log expands its argument.
28043	* mailbox/cfg_driver.c (mu_create_canned_section)
28044	(mu_create_canned_param): Avoid creating container twice.
28045	* mailbox/cfg_format.c (format_param): Do not print type if
28046	argname contains a colon.
28047	* mailbox/cfg_parser.y (_scan_tree_helper): Compute target
28048	pointer.
28049
28050	* imap4d/imap4d.c, imap4d/imap4d.h, pop3d/pop3d.c,
28051	pop3d/pop3d.h: Use MU ACLs
28052
28053
280542007-12-11  Sergey Poznyakoff  <gray@gnu.org.ua>
28055
28056	* comsat/comsat.c, imap4d/imap4d.c, maidag/maidag.c,
28057	pop3d/pop3d.c: Call mu_tcpwrapper_cfg_init.
28058
28059	* include/mailutils/cfg.h (mu_cfg_section_add_container)
28060	(mu_cfg_section_add_params, mu_create_canned_section)
28061	(mu_create_canned_param, mu_get_canned_container): New functions.
28062	* lib/tcpwrap.c (mu_tcpwrapper_cfg_init): New function.
28063	* lib/tcpwrap.h (TCP_WRAPPERS_CONFIG): Change definition.
28064	* mailbox/cfg_driver.c (mu_create_canned_section)
28065	(mu_create_canned_param): Change prototypes.
28066	(add_parameters): Rename to mu_cfg_section_add_params, make
28067	extern. All callers changed.
28068
28069
28070	* include/mailutils/cfg.h (mu_cfg_section): New type.
28071	(struct mu_cfg_param.offset): New member
28072	(mu_offsetof): New define
28073	(mu_cfg_section_fp): Change signature
28074	(struct mu_cfg_section.label,target): New members.
28075	(struct mu_cfg_section.data): Remove.
28076	(struct mu_cfg_section.children): New member, instead of
28077	param and subsec which are removed.
28078	(mu_cfg_scan_tree): Change signature.
28079	(mu_config_register_section): Change signature.
28080	(mu_parse_config): Change signature.
28081	(mu_parse_config_tree): Rename to mu_cfg_tree_reduce.
28082	(mu_get_config): New proto.
28083
28084	* include/mailutils/libcfg.h (mu_parse_config_files): Change
28085	prototype.
28086
28087	* dotlock/dotlock.c, imap4d/imap4d.c, lib/tcpwrap.h,
28088	libargp/muinit.c, libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c,
28089	libcfg/init.c, libcfg/ldap.c, libcfg/pam.c, libcfg/radius.c,
28090	libcfg/sieve.c, libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c,
28091	maidag/maidag.c, mail.local/main.c, mail.remote/mail.remote.c,
28092	mailbox/cfg_format.c, mailbox/cfg_parser.y, mimeview/mimeview.c,
28093	movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
28094	sieve/sieve.c: Reflect changes to the cfg framework.
28095
28096	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add cfg_driver.c.
28097	* mailbox/cfg_driver.c: New file.
28098	* mailbox/cfg_lexer.c: Move driver part into a separate file.
28099
28100	* examples/Makefile.am (AM_LDFLAGS): Remove libmuaux
28101	* examples/echosrv.c: Remove getopt.h
28102
281032007-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
28104
28105	* examples/Makefile.am: add echosrv.c.
28106	* examples/echosrv.c: New file.
28107	* include/mailutils/Makefile.am: Add server.h.
28108	* include/mailutils/server.h: New file.
28109	* include/mailutils/acl.h (mu_acl_t): Move to types.hin
28110	* include/mailutils/types.hin (mu_acl_t,mu_server_t)
28111	(mu_tcp_server_t): New types.
28112	* mailbox/Makefile.am: Add server.c and tcpsrv.c.
28113	* mailbox/server.c: New file.
28114	* mailbox/tcpsrv.c: New file.
28115	* mailbox/acl.c: Include <sys/wait.h>
28116	Rename all `sin' and `sun' to avoid name clashes.
28117	* mailbox/errors (MU_ERR_LOCK_EXT_FAIL): Do not abbreviate
28118	anything in error description.
28119
28120	* auth/ldap.c (_construct_attr_array): Use mu_vartab_* to expand
28121	filter.
28122	* imap4d/preauth.c: Fix misleading comment.
28123	* mailbox/vartab.c (mu_vartab_expand): Support old prefix (%) for
28124	single-character variables.
28125
281262007-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
28127
28128	* NEWS, TODO: Update.
28129	* examples/Makefile.am: Add aclck
28130	* examples/aclck.c: New file. Test program for ACLs.
28131	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add acl.h,
28132	kwd.h and vartab.h.
28133	* include/mailutils/acl.h: New file. ACL declarations.
28134	* include/mailutils/kwd.h: New file. Declarations for simple
28135	string to token conversion.
28136	* include/mailutils/vartab.h: New file. Declarations of functions
28137	for variable expansion.
28138	* include/mailutils/mailutils.h: Include acl.h, kwd.h and
28139	vartab.h.
28140	* include/mailutils/types.hin: Define mu_vartab_t
28141
28142	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add acl.c, kwd.c,
28143	and vartab.c.
28144	* mailbox/acl.c: New file.
28145	* mailbox/kwd.c: New file.
28146	* mailbox/vartab.c: New file.
28147
28148	* mailbox/cfg_parser.y (parse_cidr): Fix typo.
28149	* mailbox/list.c: Fix indentation.
28150	* mailbox/mailbox.c (_create_mailbox): Fix type of level.
28151	* mailbox/syslog.c: Use mu_kwd_* functions.
28152
281532007-12-05  Sergey Poznyakoff  <gray@gnu.org.ua>
28154
28155	* configure.ac: Add TCP wrappers support.
28156	* imap4d/Makefile.am, mu_daemon_argp_parser (LDADD): Add
28157	TCPWRAP_LIBRARIES.
28158	* imap4d/imap4d.c: Include tcpwrap.h
28159	(imap4d_mainloop): Check the connection using tcp wrappers.
28160	* imap4d/preauth.c: Fix a typo in the comment.
28161	* maidag/maidag.h: Include tcpwrap.h
28162	* maidag/maidag.c, maidag/lmtp.c: Add TCP wrappers support.
28163	* pop3d/pop3d.c: Include tcpwrap.h
28164	(pop3d_mainloop): Check the connection using tcp wrappers.
28165	* lib/Makefile.am: Add tcpwrap.c and tcpwrap.h
28166	* lib/tcpwrap.c: New file.
28167	* lib/tcpwrap.h: New file.
28168	* libargp/common.c (mu_daemon_argp_parser): Bugfix.
28169
281702007-12-04  Sergey Poznyakoff  <gray@gnu.org.ua>
28171
28172	II. Extend --config-help output.  Each configuration parameter
28173	has a docstring which is displayed as a comment before it.
28174	A docstring is also added to the configuration group structure,
28175	for use in future.
28176
28177	* include/mailutils/cfg.h (struct mu_cfg_param): New members
28178	`docstring' and `argname'.
28179	(struct mu_cfg_section): New member `docstring'.
28180	(mu_cfg_format_docstring): New function.
28181	* include/mailutils/libargp.h (mu_help_config_mode): New
28182	declaration.
28183	* libargp/cmdline.h (mu_help_config_mode): Remove.
28184	* libargp/muinit.c (mu_app_init): Better format the initial
28185	comment.
28186	* mailbox/cfg_format.c (mu_cfg_data_type_string): Use NLS.
28187	(mu_cfg_format_docstring): New function.
28188	(format_param,format_section): Use mu_cfg_format_docstring.
28189	* mailbox/cfg_lexer.c (mu_config_create_container): Initialize
28190	allocated memory chunk with zeros.
28191	(dup_container): Duplicate docstring.
28192	(mu_build_container): Document include statement.
28193
28194	* dotlock/dotlock.c, imap4d/imap4d.c, libargp/tls.c,
28195	libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c, libcfg/ldap.c,
28196	libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c,
28197	libcfg/tls.c, libcfg/virtdomain.c, maidag/maidag.c,
28198	mail.local/main.c, mail.remote/mail.remote.c, mimeview/mimeview.c,
28199	movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
28200	sieve/sieve.c: Document configuration file statements.
28201
28202	* pop3d/pop3d.h (expire): Change type to unsigned int.
28203
28204	* po/POTFILES.in: Add missing files.
28205
28206	I. Implement --config-help option, which displays configuration
28207	file statements understood by the given program.
28208
28209	* imap4d/imap4d.h: Include xalloc.h
28210	* frm/common.c, imap4d/imap4d.c: Shut compiler warnings.
28211	* include/mailutils/cfg.h (mu_cfg_format_tree): Rename to
28212	mu_cfg_format_parse_tree.
28213	(mu_cfg_format_container,mu_format_config_tree): New functions.
28214	(mu_parse_config_tree): New prototype.
28215	(mu_cfg_tree_create_node): Change signature (const char* instead
28216	of char*).
28217	* include/mailutils/gocs.h (mu_gocs_register): First arg is const.
28218	* include/mailutils/libargp.h (mu_argp_node_list_new): Mark
28219	invariable arguments as const.
28220	* include/mailutils/libcfg.h (mu_libcfg_init): Remove const from
28221	the arg.
28222	* include/mailutils/mutil.h (mu_spawnvp): Remove const from the
28223	2nd arg.
28224	* libargp/cmdline.c (mu_argp_node_list_new): Mark invariable
28225	arguments as const.
28226
28227	* lib/mailcap.h: New file.
28228	* lib/Makefile.am (libmuaux_la_SOURCES): Add mailcap.h
28229	* libargp/cmdline.h (mu_help_config_mode): New extern.
28230	* libargp/common.c: New option --config-help displays a
28231	configuration file summary.
28232	* libargp/muinit.c (mu_app_init): Handle --config-help.
28233	* libcfg/init.c (mu_libcfg_init): Remove const from the arg.
28234	* maidag/maidag.h (mda): New prototype.
28235	* mail/decode.c: Include mailcap.h
28236	* mail/mail.h: Define _GNU_SOURCE before including stdio.h
28237	* mail/send.c: Fix includes.
28238	* mail.remote/mail.remote.c: Include mu_umaxtostr.h
28239
28240	* mailbox/cfg_format.c (mu_cfg_data_type_string)
28241	(mu_cfg_format_container): New function.
28242	* mailbox/cfg_lexer.c (mu_build_container): New function.
28243	(mu_parse_config_tree): Use mu_build_container.
28244	(mu_format_config_tree): New function.
28245	* mailbox/cfg_parser.y (mu_cfg_tree_create_node): Change proto.
28246	* mailbox/gocs.c (struct mu_gocs_entry): Name is const.
28247	(mu_gocs_register): 1st arg (capa) is const.
28248	* mailbox/mutil.c (mu_spawnvp): Remove const from the 2nd arg.
28249	* mh/mh_whatnow.c (invoke): Shut compiler warnings.
28250	* mimeview/mimetypes.l (mimetypes_open): Shut compiler warnings.
28251	* mimeview/mimeview.c: Include mailcap.h
28252	(display_file): Shut compiler warnings.
28253	* readmsg/readmsg.c: Include mu_umaxtostr.h
28254	* sieve/sieve.c (parser): Remove unused variable.
28255
282562007-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
28257
28258	* auth/virtual.c (site_virtual_pwddir): Replace with global
28259	struct mu_gocs_virtual mu_virtual_module_config
28260
28261	* include/mailutils/cfg.h (MU_PARSE_CONFIG_GLOBAL)
28262	(MU_PARSE_CONFIG_VERBOSE, MU_PARSE_CONFIG_DUMP): New defines.
28263	(mu_cfg_tree_create,mu_cfg_tree_set_debug,mu_cfg_tree_set_alloc)
28264	(mu_cfg_tree_alloc,mu_cfg_tree_free)
28265	(mu_cfg_tree_create_node,mu_cfg_tree_add_node): New functions.
28266	* include/mailutils/gocs.h (struct mu_gocs_virtual): New data
28267	type.
28268	* include/mailutils/libargp.h (struct mu_argp_node_list): New data
28269	type.
28270	(mu_argp_node_list_init, mu_argp_node_list_add)
28271	(mu_argp_node_list_new, mu_argp_node_list_finish): New functions.
28272	* libargp/cmdline.h: New header.
28273	* libargp/Makefile.am (libmuargp_a_SOURCES): Add cmdline.h.
28274
28275	* dotlock/dotlock.c, imap4d/imap4d.c, libargp/auth.c,
28276	libargp/cmdline.c, libargp/common.c, libargp/compat.c,
28277	libargp/gsasl.c, libargp/mu_argp.c, libargp/muinit.c,
28278	libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c,
28279	libargp/tls.c, libargp/virtdomain.c, libcfg/common.c,
28280	libcfg/init.c, libcfg/virtdomain.c, maidag/maidag.c,
28281	mail.local/main.c, mail.remote/mail.remote.c, mimeview/mimeview.c,
28282	movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
28283	sieve/sieve.c: Change option parsing, using mu_cfg_tree_ functions.
28284
28285	* mailbox/argcv.c: Fix a typo in comment.
28286	* mailbox/cfg_lexer.c (mu_parse_config_tree): New function.
28287	(_mu_parse_config): Rewrite using mu_parse_config_tree.
28288	* mailbox/cfg_parser.y (mu_cfg_format_error,_mu_cfg_vperror)
28289	(debug_print_node): Use default diag debug_t object, if the passed
28290	one is NULL. Reset locus after formatting.
28291	(mu_cfg_postorder): Return immediately if node == NULL.
28292	(mu_cfg_tree_create,mu_cfg_tree_set_debug,mu_cfg_tree_set_alloc)
28293	(mu_cfg_tree_alloc,mu_cfg_tree_free,mu_cfg_tree_create_node)
28294	(mu_cfg_tree_add_node): New functions.
28295	* mailbox/gocs.c (mu_gocs_store): Make sure no capa/data tuple
28296	gets registered twice.
28297
28298	* NEWS: Update.
28299	* gnulib.modules: Add des. Sort lines.
28300	* imap4d/Makefile.am (imap4d_SOURCES): Add preauth.c
28301	* imap4d/preauth.c: New file.
28302	* imap4d/authenticate.c (imap4d_authenticate): Use
28303	imap4d_session_setup.
28304	* imap4d/imap4d.c (imap4d_session_setup)
28305	(imap4d_session_setup0): New functions.
28306	(imap4d_mainloop): Implement PREAUTH mode.
28307	* imap4d/imap4d.h (RESP_PREAUTH): New define.
28308	(enum imap4d_preauth): New data type.
28309	(preauth_mode,preauth_program,preauth_only,ident_port): New
28310	globals.
28311	(imap4d_session_setup,imap4d_session_setup0): New functions.
28312	* imap4d/login.c (imap4d_login): Use imap4d_session_setup0.
28313	* imap4d/util.c (sc2string): Handle RESP_PREAUTH
28314
28315	* lib/.cvsignore, m4/.cvsignore: Update.
28316
28317	* mailbox/tcp.c: Fix indentation.
28318
283192007-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>
28320
28321	* mailbox/cfg_format.c: New file.
28322	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add cfg_format.c
28323	* mailbox/cfg_parser.y (mu_cfg_print_tree): Remove
28324	* include/mailutils/cfg.h (mu_cfg_format_tree): New prototype.
28325
283262007-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
28327
28328	* configure.ac (AC_CONFIG_FILES): Remove include/gnu/Makefile.
28329
283302007-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
28331
28332	* NEWS, TODO: Update
28333	* include/mailutils/types.hin: New type mu_log_level_t.
28334	* include/mailutils/debug.hm4, include/mailutils/diag.h,
28335	mailbox/cfg_lexer.c, mailbox/cfg_parser.y, mailbox/dbgstderr.c,
28336	mailbox/dbgsyslog.c, mailbox/debug.c, mailbox/diag.c,
28337	mailbox/gdebug.c, mailbox/muerror.c, mailbox/syslog.c,
28338	sieve/sieve.c: Use mu_log_level_t instead of size_t for debugging
28339	and logging levels.
28340
283412007-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
28342
28343	* comsat/action.c, comsat/comsat.c, imap4d/auth_gsasl.c,
28344	imap4d/auth_gss.c, imap4d/authenticate.c, imap4d/bye.c,
28345	imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/search.c,
28346	imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, maidag/lmtp.c,
28347	maidag/maidag.c, maidag/script.c, mail.local/main.c,
28348	mail.local/script.c, pop3d/apop.c, pop3d/bulletin.c,
28349	pop3d/extra.c, pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c,
28350	pop3d/quit.c, pop3d/signal.c, pop3d/user.c, libsieve/util.c: Use
28351	mu_diag_output instead of syslog.
28352
28353	* sieve/sieve.c: New option --no-program-name, for testsuite.
28354	* sieve/testsuite/lib/sieve.exp: Call sieve with the
28355	--no-program-name option.
28356
28357	* mailbox/cfg_lexer.c, mailbox/cfg_parser.y: Improve debugging.
28358	* mailbox/diag.c: New file.
28359	* mailbox/gdebug.c (mu_debug_level_from_string): New function.
28360	* mailbox/muerror.c (mu_verror, mu_error): Rewrite using mu_diag
28361	functions.
28362	* mailbox/syslog.c (mu_diag_level_to_syslog): New function.
28363	(mu_diag_syslog_printer): New function.
28364
28365	* mh/mh_argp.c (mh_argp_parse): Set program name using
28366	mu_set_program_name.
28367	* mh/mh_init.c (mu_error_printer): No longer needed.
28368	* movemail/movemail.c (movemail_error_printer): No longer needed.
28369
28370	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add diag.h
28371	* include/mailutils/diag.h: New file.
28372	* include/mailutils/cfg.h (mu_cfg_lexer_t): Take mu_debug_t as its
28373	second argument.
28374	* include/mailutils/error.h: Include diag.h
28375	(mu_program_name,mu_set_program_name): Remove. Already declared in
28376	diag.h.
28377	(mu_error_set_print): Deprecated.
28378
28379	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add diag.c
28380
283812007-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
28382
28383	III. Use mu_debug_t for diagnostics in cfg framework.
28384
28385	* include/mailutils/cfg.h, mailbox/cfg_lexer.c,
28386	mailbox/cfg_parser.y (mu_cfg_tree_t):
28387	New data type.
28388	(mu_cfg_perror_t): Remove
28389	(mu_cfg_parse): Change prototype.
28390	(mu_cfg_perror): Change type.
28391	(mu_cfg_format_error): New function.
28392	(mu_cfg_destroy_tree): Change signature.
28393	(mu_cfg_callback_t): Take mu_debug_t as its first argument,
28394	instead of mu_cfg_locus_t. The mu_debug_t is to be used for error
28395	reporting and debugging diagnostics. The cfg_lexer is responsible
28396	for storing the necessary locus data into it before calling
28397	callbacks.
28398	(mu_cfg_section_fp): Take an additional argument.
28399	(mu_cfg_scan_tree): Simplified prototype. The mu_cfg_tree_t passed
28400	as its first argument already contains all necessary data that
28401	were passed as arguments previously.
28402	(mu_parse_config): First two args are consts.
28403
28404	* include/mailutils/libcfg.h, imap4d/imap4d.c, libcfg/auth.c,
28405	libcfg/common.c, libcfg/ldap.c, libcfg/sieve.c, libcfg/sql.c,
28406	maidag/maidag.c, mail.local/main.c, mimeview/mimeview.c,
28407	pop3d/pop3d.c, sieve/sieve.c: Reflect changes to the cfg
28408	framework.
28409
28410	* mailbox/debug.c (mu_debug_vprintf): Make sure the locus info is
28411	formatted on the first call.
28412
28413	II. Further improvement of mu_debug_t.
28414
28415	* include/mailutils/debug.hm4 (struct mu_debug_locus): New data
28416	type.
28417	(mu_debug_set_locus, mu_debug_get_locus)
28418	(mu_debug_set_function, mu_debug_get_function): New prototypes.
28419	(mu_debug_printer_fp, mu_debug_syslog_printer)
28420	(mu_debug_stderr_printer): Change type of the first argument.
28421	(mu_debug_set_data): New function.
28422	(all proto): Remove argument names, use only types to avoid
28423	problems on some broken systems (FreeBSD comes to mind).
28424	* libproto/include/debug0.h (struct _mu_debug): printer: change
28425	type of the first argument.
28426	locus, function, data, destroy: New fields.
28427
28428	* mailbox/dbgstderr.c (mu_debug_stderr_printer): Change type of
28429	the first argument.
28430	* mailbox/dbgsyslog.c (mu_debug_syslog_printer): Change type of
28431	the first argument.
28432
28433	* mailbox/debug.c (mu_debug_destroy): Flush any left over data.
28434	Call destroy, if supplied.
28435	(mu_debug_set_data): New function.
28436	(mu_debug_vprintf): Print locus and function (if supplied) at the
28437	beginning of the buffer.
28438	(mu_debug_set_locus, mu_debug_get_locus, mu_debug_set_function)
28439	(mu_debug_get_function): New functions.
28440
28441	* scripts/debugdef.m4 (MKDEBUG): Use mu_debug_set_locus and
28442	mu_debug_set_function to print source locations. This allows for
28443	easy i18n of the MU_DEBUG[0-9]* format strings.
28444
28445	I. Introduce "global debug settings". Mailutils objects are supposed
28446	to set their default mu_debug_t objects basing on these settings.
28447
28448	* include/mailutils/Makefile.am: Add debug.hm4. Build debug.h from
28449	it.
28450	* include/mailutils/debug.hm4: New file.
28451	* include/mailutils/debug.h: Remove generated file.
28452	* scripts/Makefile.am (EXTRA_DIST): Add debugdef.m4
28453	* scripts/debugdef.m4: New file.
28454
28455	* include/mailutils/gocs.h (struct mu_gocs_debug): New data type.
28456	(mu_gocs_register_std): Argument is const.
28457	(mu_gocs_debug_init): New function.
28458	* include/mailutils/libargp.h (mu_debug_cmdline): New extern.
28459	* include/mailutils/libcfg.h (mu_debug_cfg_capa): New extern.
28460	* libargp/cmdline.c: Add mu_debug_cmdline
28461	* libargp/common.c: Add debug settings.
28462	* libargp/mu_argp.c (struct cap_buf.capa): Remove const qualifier.
28463	* libcfg/common.c (mu_locking_param): Remove superfluous `lock-'
28464	prefix from the statement names.
28465	(mu_debug_param): New parameter group.
28466	* libcfg/init.c: Add mu_debug_param.
28467	* mailbox/gocs.c (mu_gocs_debug_init): New function.
28468
28469	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add gdebug.c
28470	* mailbox/gdebug.c: New file
28471	* mailbox/debug.c (mu_debug_printf, mu_debug_vprintf)
28472	(mu_debug_check_level): New functions.
28473	(mu_debug_printv, mu_debug_print): Rewrite using new basic calls.
28474
28475	* comsat/comsat.c, dotlock/dotlock.c, examples/muauth.c,
28476	mail.remote/mail.remote.c: Add debug capability.
28477	* frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c,
28478	mail/mail.c, mail.local/main.c, messages/messages.c,
28479	pop3d/pop3d.c, readmsg/readmsg.c: Add locking and debug capabilities.
28480
28481	* examples/mimetest.c, examples/msg-send.c, frm/common.c,
28482	libargp/auth.c, libmu_scm/mu_message.c, mail/send.c, mh/send.c,
28483	mimeview/mimeview.c, movemail/movemail.c, sieve/sieve.c: Update
28484	invocation of mu_debug_set_level.
28485
28486	* libproto/imap/folder.c, libproto/imap/mbox.c,
28487	libproto/include/folder0.h, libproto/include/mailbox0.h,
28488	libproto/include/mailer0.h, libproto/mailer/sendmail.c,
28489	libproto/mailer/smtp.c, libproto/mbox/mbox.c,
28490	libproto/nntp/folder.c, libproto/nntp/nntp_debug.c,
28491	libproto/pop/mbox.c, libproto/pop/pop3_debug.c, mailbox/amd.c,
28492	mailbox/mailer.c, mailbox/message.c, mailbox/mu_auth.c: Use
28493	MU_DEBUG[0-9] for debugging.
28494
28495	* mailbox/muerror.c: Include string.h
28496	* mailbox/syslog.c (syslog_to_n): Remove unused variable.
28497	* mailbox/assoc.c (struct _mu_assoc_elem): name is not const.
28498	* mailbox/cfg_lexer.c: Quoted strings can be continued to the
28499	following line either by using a trailing backslash or by
28500	concatenating strings together, as in C.
28501	* mailbox/mailbox.c (_create_mailbox): Initialize debug object
28502	using global "mailbox" level.
28503	(mu_mailbox_create): Fix bug introduced on 2007-11-26.
28504
28505	* include/mailutils/libsieve.h (mu_sieve_set_debug_level): Change
28506	prototype.
28507	(mu_sieve_set_debug_object): New prototype.
28508	* libsieve/sieve.y (mu_sieve_machine_init): Initialize debug
28509	object from "sieve" global level.
28510	(mu_sieve_set_debug_level): Set only debug_level.
28511	(mu_sieve_set_debug_object): New function.
28512
28513	* maidag/maidag.c: Remove explicit setting of debug object. Add
28514	"debug" group, which provides the required functionality.
28515	(set_debug_flags): Likewise. This function and the corresponding
28516	command line option are fading out in favor of global debug
28517	settings.
28518
285192007-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
28520
28521	* configure.ac (MU_APP_LIBRARIES): Load libmuaux after libmuargp
28522	and libcfg.
28523	(fgetpwent): Use AC_CHECK_FUNCS
28524	* auth/virtual.c: Use mu_fgetpwent if fgetpwent is not available.
28525
28526	* lib/Makefile.am: Add back utmp.c
28527	* lib/utmp.c: Restore after unintended remove.
28528	* m4/utmp.m4: Fix quoting.
28529
28530	* libcfg/gsasl.c, libcfg/ldap.c, libcfg/pam.c, libcfg/radius.c,
28531	libcfg/sieve.c, libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c:
28532	Include stdlib.h
28533
28534	* libproto/imap/folder.c, libproto/mbox/mbox.c,
28535	libproto/mbox/mbox0.h, libproto/pop/mbox.c, mailbox/attachment.c,
28536	mailbox/mailbox.c, mailbox/parsedate.y:	Do not use alloca.
28537
28538	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add fgetpwent.c
28539	and intprops.h.
28540	* mailbox/fgetpwent.c (fgetpwent): Rename to mu_fgetpwent.
28541	* mailbox/gocs.c: Revert recent change. It broke the testsuite in
28542	sieve.
28543	* mailbox/syslog.c (log_facility): Initialize to LOG_FACILITY.
28544
28545	* configure.ac, NEWS: Add LDAP support.
28546	* auth/Makefile.am (libmuauth_la_SOURCES): Add ldap.c.
28547	* auth/ldap.c: New file.
28548	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add ldap.h.
28549	* include/mailutils/ldap.h: New file.
28550	* include/mailutils/libcfg.h (mu_ldap_cfg_capa): New extern.
28551	* include/mailutils/mu_auth.h (mu_auth_ldap_module): New extern.
28552	(MU_AUTH_REGISTER_ALL_MODULES): Register ldap.
28553	* libcfg/Makefile.am (libmucfg_la_SOURCES): Add ldap.
28554	* libcfg/ldap.c: New file.
28555	* libcfg/init.c (cfg_capa_table): Add ldap.
28556	* mailbox/gocs.c (mu_gocs_logging_init): Initialize log_facility
28557	to default if not specified otherwise. Need to revise this later.
28558	* mailbox/version.c (mu_conf_option): Reveal ldap, if supported.
28559
28560	* mailbox/mu_auth.c (mu_auth_data_alloc): Add safety
28561	checks. Provide reasonable defaults for missing arguments.
28562	* mailbox/mutil.c (mutil_parse_field_map): Bugfix - increment by 2
28563	on each loop.
28564
28565	* libargp/mu_argp.c (mu_build_argp): Do not bail out if an unknown
28566	capability is requested.
28567
28568	* include/mailutils/assoc.h (mu_assoc_count): New function.
28569	* mailbox/assoc.c: Likewise.
28570
28571	* auth/radius.c (_expand_query): Static
28572
28573	* mailbox/cfg_lexer.c: Fixed memory management during cloning.
28574
285752007-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
28576
28577	Improve debugging.
28578
28579	* imap4d/login.c, pop3d/user.c: Print user db source along with
28580	the login name.
28581	* include/mailutils/debug.h (mu_debug_set_print): Change
28582	prototype.
28583	(mu_debug_printer_fp): New data type.
28584	(mu_debug_default_printer): New extern.
28585	(mu_debug_syslog_printer,mu_debug_stderr_printer): New prototypes.
28586
28587	* libproto/include/debug0.h (struct _mu_debug): Remove unused
28588	`buffer' and `buflen'. Add `stream'. Change signature of `_print' and
28589	rename it to `printer'.
28590	* mailbox/debug.c: Rewrite debugging support.
28591	(mu_debug_default_printer): New global.
28592
28593	* mailbox/gocs.c (mu_gocs_logging_init): Initialize
28594	mu_debug_default_printer.
28595
28596	* mailbox/memory_stream.c (_memory_truncate): Bugfix.
28597	(_memory_get_transport2): Implement method.
28598
28599	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add dbgstderr.c
28600	and dbgsyslog.c
28601	* mailbox/dbgstderr.c, mailbox/dbgsyslog.c: New files.
28602	* maidag/maidag.c, mail.local/main.c, sieve/sieve.c: Remove
28603	_mu_debug_printer, the default implementation will do.
28604
28605	* mailbox/mu_auth.c: Improve debugging.
28606
28607	* libsieve/comparator.c, libsieve/load.c, libsieve/sieve.l:
28608	Include ctype.h
28609
28610	* include/mailutils/libargp.h: Remove option declarations.
28611	* include/mailutils/mu_auth.h (struct mu_auth_data): New member
28612	`source'.
28613	(mu_auth_set_debug): New proto.
28614	* libargp/common.c: Define option values. New option --debug-auth.
28615	* libargp/auth.c, libargp/gsasl.c,
28616	libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c,
28617	libargp/tls.c, libargp/virtdomain.c: Define option values.
28618
286192007-11-22  Sergey Poznyakoff  <gray@gnu.org.ua>
28620
28621	* libsieve/conf.c (mu_sieve_module_init): Initialize
28622	mu_sieve_library_path with SIEVE_MODDIR.
28623
286242007-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
28625
28626	* mail.local/mail.local.h, mail.local/main.c: Limit verbosity of
28627	messages printed to stderr.
28628
28629	* libsieve/extensions/pipe.c: Fix indentation.
28630	* libsieve/extensions/spamd.c: Use socket stream.
28631	* mailbox/socket_stream.c (_s_open): Default to RDWR mode.
28632
28633	* libcfg/common.c (mu_logging_param): Use callback to parse the
28634	facility.
28635
28636	* README-alpha: Update.
28637	* auth/pam.c (mu_pam_module_init): Use struct.
28638	* include/mailutils/gocs.h (struct mu_gocs_pam): New data type.
28639	* include/mailutils/libcfg.h (mu_sieve_cfg_capa)
28640	(mu_daemon_cfg_capa,mu_auth_cfg_capa): New declarations.
28641	* libargp/common.c (mu_daemon_argp_parser): Handle ARGP_KEY_INIT.
28642	* libargp/pam.c (service_name): Remove.
28643	(pam_settings): Add new variable.
28644	(mu_pam_argp_parser): Reflect this.
28645	* libcfg/auth.c (mu_auth_section_parser): New function.
28646	(mu_auth_cfg_capa): New variable.
28647	* libcfg/common.c (mu_daemon_section_parser): Handle
28648	mu_cfg_section_start.
28649	* libcfg/init.c (cfg_capa_table): Add auth, sieve, daemon.
28650	(reserved_name): Remove auth and daemon.
28651	* mailbox/Makefile.am (EXTRA_DIST): Remove @MU_EXTRA_DIST@.
28652	* mailbox/daemon.c (mu_gocs_daemon_init): Remove extra checks.
28653	* mailbox/mu_auth.c (_add_module_list): Skip delimiters.
28654	* po/POTFILES.in: Update.
28655
286562007-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
28657
28658	* configure.ac: Add AM_PROG_LIBTOOL.
28659
28660	* include/mailutils/libargp.h (mu_argp_build): Change proto.
28661	* libargp/compat.c (mu_argp_parse): Update call to mu_argp_build.
28662	* libargp/mu_argp.c (mu_argp_build): Optionally return expanded
28663	capability list in the third argument.
28664	* libargp/muinit.c (mu_app_init): Pass expanded capability list to
28665	mu_libcfg_init.
28666
28667	* include/mailutils/cfg.h (mu_cfg_parser_verbose): New variable.
28668	* include/mailutils/libargp.h (OPT_RCFILE_VERBOSE): New value.
28669	* libargp/Makefile.am (AM_CFLAGS): Rename to AM_CPPFLAGS, define
28670	SYSCONFDIR.
28671	* libargp/common.c (mu_common_argp, mu_common_argp_parser): New
28672	option rcfile-verbose.
28673	* mailbox/Makefile.am (AM_CPPFLAGS): define SYSCONFDIR.
28674	* mailbox/cfg_lexer.c (_mu_parse_config): Implement `include'
28675	statement. Add verbose logging.
28676	* mailbox/cfg_parser.y (mu_cfg_parser_verbose): New variable.
28677	(mu_cfg_parse): Zero out parse_tree before returning.
28678	(_scan_tree_helper): Remove dependency on MU_CONFIG_VERBOSE envar.
28679	Use mu_cfg_parser_verbose instead.
28680
28681	* config/mailutils.m4: New file
28682	* config/Makefile.am: Install mailutils.m4 to $(datadir)/aclocal
28683
28684	* configure.ac (VI_CURRENT): Raise to 3;
28685	(MU_APP_LIBRARIES): Rename libargp.a to libmuargp.a
28686	* NEWS: Update.
28687
28688	* comsat/comsat.c, dotlock/dotlock.c, examples/muauth.c,
28689	examples/muemail.c, frm/frm.h, guimb/main.c, imap4d/imap4d.c,
28690	libargp/auth.c, libargp/cmdline.c, libargp/common.c,
28691	libargp/gsasl.c, libargp/mu_argp.c, libargp/pam.c,
28692	libargp/radius.c, libargp/sieve.c, libargp/sql.c, libargp/tls.c,
28693	libargp/virtdomain.c, maidag/maidag.h, mail/mail.c,
28694	mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c,
28695	mimeview/mimetypes.y, mimeview/mimeview.c, movemail/movemail.c,
28696	pop3d/extra.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c,
28697	sieve/sieve.c: Include mailutils/libargp.h.
28698
28699	* config/mailutils-config.c: New arguments to --link: cfg and argp.
28700
28701	* include/mailutils/Makefile.am (pkginclude_HEADERS): Remove
28702	compat.h, add libargp.h, libcfg.h and version.h
28703	* include/mailutils/compat.h: Remove
28704	* include/mailutils/libargp.h: New file (from libargp/cmdline.h)
28705	* include/mailutils/libcfg.h: New file (from (libcfg/)
28706	* include/mailutils/version.h: New file
28707
28708	* include/mailutils/folder.h (struct mu_0_6_folder_list): Remove
28709	(mu_0_6_folder_list, mu_0_6_folder_lsub)
28710	(mu_0_6_folder_list_destroy): Remove.
28711
28712	* include/mailutils/mailutils.h: Include version.h
28713	Remove 0.6 compatibility layer.
28714	* mailbox/folder.c (list_to_0_6_folder_list, mu_0_6_folder_list)
28715	(mu_0_6_folder_lsub, mu_0_6_folder_list_destroy): Remove.
28716
28717	* lib/Makefile.am (libmuaux_la_SOURCES): Remove argpinit.c,
28718	muinit.h and muinit.c
28719
28720	* libargp/Makefile.am (noinst_LIBRARIES, noinst_HEADERS): Remove
28721	(lib_LIBRARIES): Add libmuargp.a
28722	* libargp/compat.c: New file.
28723	* libargp/muinit.c: New file.
28724	* libargp/cmdline.h: Remove.
28725
28726	* libcfg/Makefile.am (noinst_HEADERS): Remove.
28727	* libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c, libcfg/init.c,
28728	libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c,
28729	libcfg/tls.c, libcfg/virtdomain.c: Include mailutils/libcfg.h
28730
28731	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add version.c
28732	* mailbox/cfg_lexer.c (_mu_parse_config): Do nothing if
28733	root_container is NULL.
28734
28735	* mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c,
28736	mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c,
28737	mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
28738	mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
28739	mh/sortm.c, mh/whatnow.c, mh/whom.c: Use mh_argp_init instead of
28740	mu_argp_init.
28741	* mh/mh_argp.c, mh/mh_getopt.h (mh_argp_init): New function
28742
287432007-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
28744
28745	* bootstrap (cp_mark_as_generated): Create target directory if
28746	needed.
28747
28748	Make libmailutils independent from gnulib. Remove generated files
28749	from the repository. Bootstrap directly from the gnulib CVS.
28750
28751	* scripts/gnulib-sync, autogen.sh: Remove.
28752	* bootstrap, bootstrap.conf: New files.
28753	* README-hacking: New file.
28754
28755	* configure.ac: Update.
28756	* lib/Makefile.am: Update.
28757	* mailbox/Makefile.am: Update.
28758	* include/mailutils/Makefile.am (SUBDIRS): Remove gnu
28759	* include/mailutils/gnu/Makefile.am: Remove
28760	* examples/argcv.c, examples/mta.c, guimb/guimb.h,
28761	imap4d/imap4d.h, libargp/mu_argp.c, libargp/tls.c,
28762	maidag/maidag.h, mail/mail.h, mail/send.c,
28763	mail.local/mail.local.h, mh/mh.h: Remove getline.h
28764	* libproto/nntp/mbox.c: Include mailutils/md5.h
28765	* libargp/cmdline.h: Include strings.h
28766	* m4/debug.m4, m4/enable.m4, m4/gsasl.m4, m4/guile.m4,
28767	m4/mu_libobj.m4: Minor fix
28768	* m4/intmax.m4,m4/inttypes-pri.m4,m4/inttypes_h.m4: Update
28769	* mailbox/alloca.h: Remove
28770	* mailbox/mailbox.c: Include string.h
28771	* mailbox/nls.c: Include locale.h
28772	* po/Makevars: Remove.
28773
28774	* absolute-header.m4, alloca.m4, allocsa.m4, argp.m4, codeset.m4,
28775	d-type.m4, eealloc.m4, eoverflow.m4, error.m4, exitfail.m4,
28776	extensions.m4, fnmatch.m4, full-header-path.m4, getdelim.m4,
28777	getline.m4, getlogin_r.m4, getndelim2.m4, getopt.m4, getpass.m4,
28778	gettext.m4, glibc2.m4, glibc21.m4, glob.m4, gnulib.m4, iconv.m4,
28779	intdiv0.m4, isc-posix.m4, lcmessage.m4, lib-ld.m4, lib-link.m4,
28780	lib-prefix.m4, lock.m4, longdouble.m4, longlong.m4,
28781	mailbox-link.m4, mbchar.m4, mbiter.m4, mbrtowc.m4, mbstate_t.m4,
28782	mbswidth.m4, memchr.m4, mempcpy.m4, minmax.m4, obstack.m4,
28783	onceonly.m4, po.m4, printf-posix.m4, progtest.m4, regex.m4,
28784	restrict.m4, setenv.m4, signed.m4, size_max.m4, snprintf.m4,
28785	ssize_t.m4, stat-macros.m4, stdbool.m4, stdint.m4, stdint_h.m4,
28786	strcase.m4, strchrnul.m4, strdup.m4, strerror_r.m4, strndup.m4,
28787	strnlen.m4, strtok_r.m4, sysexits.m4, uint32_t.m4, uintmax_t.m4,
28788	ulonglong.m4, unistd_h.m4, unlocked-io.m4, vasnprintf.m4,
28789	vasprintf.m4, visibility.m4, vsnprintf.m4, wchar_t.m4, wcwidth.m4,
28790	wint_t.m4, xalloc.m4, xsize.m4: Remove.
28791
28792	* alloca.c, allocsa.c, allocsa.h, asprintf.c, basename.c, error.c,
28793	error.h, exit.h, exitfail.c, exitfail.h, fnmatch.c, fnmatch_.h,
28794	fnmatch_loop.c, getpass.c, getpass.h, intprops.h, malloc.c,
28795	mbswidth.c, mbswidth.h, md5.c, md5.h, obstack.c, obstack.h,
28796	realloc.c, setenv.c, setenv.h, snprintf.c, snprintf.h, stdbool.h,
28797	stdbool_.h, strcasecmp.c, strncasecmp.c, strsignal.c, strtok_r.c,
28798	unsetenv.c, utmp.c, vasprintf.c, vasprintf.h, vsyslog.c,
28799	xalloc-die.c, xalloc.h, xalloc_die.c, xmalloc.c, xsize.h,
28800	xstrdup.c: Remove.
28801
28802	* alloca.c, alloca_.h, argp-ba.c, argp-eexst.c, argp-fmtstream.c,
28803	argp-fmtstream.h, argp-fs-xinl.c, argp-help.c, argp-namefrob.h,
28804	argp-parse.c, argp-pin.c, argp-pv.c, argp-pvh.c, argp-xinl.c,
28805	argp.h, asnprintf.c, fnmatch.c, fnmatch_.h, fnmatch_loop.c,
28806	getdelim.c, getdelim.h, getline.c, getline.h, getlogin_r.c,
28807	getlogin_r.h, getndelim2.c, getndelim2.h, getopt.c, getopt.h,
28808	getopt1.c, getopt_.h, getopt_int.h, gettext.h, glob-libc.h,
28809	glob.c, glob_.h, malloc.c, mbchar.c, mbchar.h, mbuiter.h,
28810	memchr.c, mempcpy.c, mempcpy.h, minmax.h, pin.c, printf-args.c,
28811	printf-args.h, printf-parse.c, printf-parse.h, regcomp.c, regex.c,
28812	regex.h, regex_internal.c, regex_internal.h, regexec.c,
28813	stat-macros.h, stdbool_.h, stdint_.h, strcase.h, strcasecmp.c,
28814	strchrnul.c, strchrnul.h, strdup.c, strdup.h, strncasecmp.c,
28815	strndup.c, strndup.h, strnlen.c, strnlen.h, strnlen1.c,
28816	strnlen1.h, strtok_r.c, strtok_r.h, sysexit_.h, unlocked-io.h,
28817	vasnprintf.c, vasnprintf.h, vsnprintf.c, vsnprintf.h, wcwidth.h,
28818	xsize.h: Remove.
28819
288202007-11-17  Sergey Poznyakoff  <gray@gnu.org.ua>
28821
28822	* mailbox/sha1.h: Remove.
28823	* include/mailutils/sha1.h: Add.
28824	* mailbox/md5.h: Remove.
28825	* include/mailutils/md5.h: Add.
28826	* include/mailutils/Makefile.am: Update.
28827	* mailbox/Makefile.am: Update.
28828	* libproto/pop/mbox.c, libproto/pop/pop3_apop.c,
28829	libproto/pop/pop3_stls.c, mailbox/md5.c, mailbox/message.c,
28830	mailbox/sha1.c, pop3d/apop.c, pop3d/pop3d.h, sql/mysql.c: Fix
28831	usage of sha1_ and md5_.
28832	* mailbox/mu_auth.c, mailbox/mutil.c, mailbox/rfc2047.c: Eliminate
28833	strtok_r.
28834
28835	* auth/sql.h (mu_internal_sql_config): Move to ...
28836	* include/mailutils/sql.h: ... here
28837	* imap4d/auth_gsasl.c: Bugfix.
28838
28839	Move rc file and argp parsing into separate abstract layers.
28840
28841	* include/mailutils/gocs.h, include/mailutils/pam.h,
28842	include/mailutils/radius.h, include/mailutils/syslog.h: New files
28843	* lib/argpinit.c, lib/muinit.c, lib/muinit.h: New files.
28844	* libsieve/conf.c: New file.
28845
28846	* libcfg: New directory
28847	* libcfg/libcfg.h, libcfg/auth.c, libcfg/common.c, libcfg/init.c,
28848	libcfg/gsasl.c, libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c,
28849	libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c,
28850	libcfg/.cvsignore: New files.
28851
28852	* libargp: New directory
28853	* libargp/auth.c, libargp/cmdline.h, libargp/common.c,
28854	libargp/gsasl.c, libargp/mu_argp.h, libargp/mu_argp.c,
28855	libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c,
28856	libargp/tls.c, libargp/virtdomain.c, libargp/.cvsignore: New
28857	files.
28858
28859	* mailbox/.cvsignore: Add cfg_parser.c and cfg_parser.h.
28860	* mailbox/gocs.c: New file.
28861	* Makefile.am (SUBDIRS): Add libargp and libcfg.
28862	* configure.ac (MU_APP_LIBRARIES): New variable
28863	(MU_COMMON_INCLUDES): add libargp and libcfg
28864	(AC_CONFIG_FILES): Add libargp and libcfg.
28865
28866	* auth/gsasl.c, auth/pam.c, auth/radius.c, auth/sql.c, auth/sql.h,
28867	auth/tls.c, auth/virtual.c, comsat/comsat.h, frm/frm.h,
28868	guimb/guimb.h, imap4d/imap4d.h, include/mailutils/gsasl.h,
28869	include/mailutils/libsieve.h, include/mailutils/mailutils.h,
28870	include/mailutils/mu_auth.h, include/mailutils/tls.h,
28871	include/mailutils/sql.h, maidag/maidag.h, mail/mail.h,
28872	mail.local/mail.local.h, mailbox/daemon.c, mailbox/system.c,
28873	mh/mh_argp.c, mh/mh_getopt.h, pop3d/pop3d.h,
28874	readmsg/readmsg.h: Remove argp stuff
28875
28876	* comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c,
28877	examples/muauth.c, examples/muemail.c, frm/frm.c, frm/from.c,
28878	guimb/main.c, imap4d/idle.c, imap4d/imap4d.c, imap4d/util.c,
28879	imap4d/version.c, maidag/lmtp.c, maidag/maidag.c,
28880	maidag/mailquota.c, mail/mail.c, mail/send.c, mail/version.c,
28881	mail.local/mailquota.c, mail.local/main.c,
28882	mail.remote/mail.remote.c, mailbox/mu_auth.c, messages/messages.c,
28883	mimeview/mimeview.c, movemail/movemail.c, pop3d/extra.c,
28884	pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c:
28885	Use mu_app_init for parsing command line and
28886	configuration files.
28887	* comsat/Makefile.am, config/Makefile.am, dotlock/Makefile.am,
28888	examples/Makefile.am, frm/Makefile.am, guimb/Makefile.am,
28889	imap4d/Makefile.am, maidag/Makefile.am, mail/Makefile.am,
28890	mail.local/Makefile.am, mail.remote/Makefile.am,
28891	mailbox/Makefile.am, messages/Makefile.am, mimeview/Makefile.am,
28892	movemail/Makefile.am, pop3d/Makefile.am, readmsg/Makefile.am,
28893	sieve/Makefile.am: Use MU_APP_LIBRARIES.
28894
28895	* include/mailutils/Makefile.am: Add new files.
28896	* include/mailutils/argp.h: Remove.
28897	* include/mailutils/cfg.h: New file.
28898	* include/mailutils/daemon.h (MODE_INTERACTIVE,MODE_DAEMON): New
28899	defines (from removed argp.h).
28900	(mu_gocs_daemon): New decl.
28901	* include/mailutils/error.h (mu_program_name): New variable
28902	(mu_set_program_name): New function.
28903	* lib/Makefile.am (libmuaux_la_SOURCES): Add new files.
28904	* libsieve/Makefile.am (libsieve_la_SOURCES): Remove argp.c, add
28905	conf.c instead.
28906	* libsieve/argp.c: Remove.
28907
28908	* mailbox/cfg_parser.y (mu_cfg_parse_boolean): New function.
28909	* mailbox/mu_argp.c: Remove.
28910
28911	* mailbox/muerror.c (mu_program_name): New variable
28912	(mu_set_program_name): New function
28913	(mu_default_error_printer): Print program name before diagnostic
28914	string.
28915	* mailbox/mutil.c (mu_sql_decode_password_type): New function.
28916	* mh/mh_whom.c (mh_alias_expand): Bugfix
28917	* po/POTFILES.in: Update
28918	* testsuite/lib/mailutils.exp (mu_init): Pass --no-site-rcfile
28919	--no-user-rcfile to all programs.
28920
289212007-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
28922
28923	* maidag/lmtp.c: Use English reply texts.
28924
28925	* auth/sql.c (decode_tuple_v1_0): Allow mailbox to be NULL.
28926	* comsat/comsat.c: Use mu_error for diagnostics where possible.
28927	* libproto/include/amd.h (struct _amd_data. qfetch): New member.
28928	* libproto/maildir/mbox.c (maildir_qfetch): Implement quick_get
28929	method.
28930	* libproto/mh/mbox.c (mh_qfetch): Likewise.
28931	* mailbox/amd.c (amd_quick_get_message): Likewise.
28932
289332007-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
28934
28935	* auth/sql.c, libproto/mbox/folder.c: Rename MU_READ_ERROR to
28936	MU_ERR_READ, for consistency.
28937
28938	* comsat/Makefile.am (comsatd_LDADD): Add all mailbox formats.
28939	* comsat/cfg.c: Use mu_error instead of syslog.
28940	* comsat/comsat.c (comsat_daemon): Implement test mode.
28941	(notify_user): Use mailbox quick access mode instead of directly
28942	fiddling with the UNIX mailbox stream.
28943
28944	* include/mailutils/stream.h (MU_STREAM_QACCESS): New define.
28945	* libproto/mbox/mbox.c: Implement _quick_get_message method.
28946	* libproto/mbox/mbox0.h (mbox_scan1): New function.
28947	* libproto/mbox/mboxscan.c (mbox_scan0): Split into mbox_scan0
28948	proper and mbox_scan_internal.
28949	(mbox_scan1): New function.
28950	Remove unused defines.
28951	* libsieve/load.c: Do not deallocate loaded modules.
28952	* mail.local/main.c (set_debug_flags): Fix typo.
28953	* mailbox/amd.c: Implement get_qid method.
28954	(amd_append_message): Signal MU_EVT_MESSAGE_APPEND.
28955	* mailbox/errors (MU_ERR_BADOP): New error code.
28956	(MU_READ_ERROR): Rename to MU_ERR_READ, for consistency.
28957	* mailbox/file_stream.c (_prog_destroy,_prog_close): Fix waiting
28958	for the children to terminate. Do not forcefully kill them.
28959
28960	* mailbox/mailbox.c: Control allowed operations, depending on
28961	MU_STREAM_QACCESS bit.
28962
289632007-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
28964
28965	* NEWS: Update
28966	* mailbox/Makefile.am: Update
28967	* libsieve/extensions/pipe.c: Update
28968
28969	* libsieve/extensions/Makefile.am: Add pipe.c
28970	* libsieve/extensions/pipe.c: New file
28971
28972	* Makefile.am, configure.ac: Add maidag.
28973	* frm/common.c, imap4d/sync.c, libsieve/runtime.c,
28974	mh/scan.c: Update declaration of observable actions.
28975	* imap4d/select.c, imap4d/status.c, mh/anno.c, mh/forw.c,
28976	mh/repl.c: Use mu_mailbox_sync instead of
28977	mu_mailbox_save_attributes.
28978	* include/mailutils/mailbox.h (mu_mailbox_sync): New function
28979	(mu_mailbox_save_attributes): Deprecated.
28980	* include/mailutils/message.h (mu_message_get_qid)
28981	(mu_message_set_qid): New functions.
28982	* include/mailutils/observer.h (MU_EVT_MESSAGE_APPEND): New event.
28983	(mu_observer_set_action_data): New function. Registers
28984	action-specific data.
28985	(mu_observable_notify): Get call-specific data as the third
28986	argument.
28987	* include/mailutils/types.hin (mu_message_qid_t): New data type.
28988	* libproto/imap/folder.c, libproto/imap/mbox.c,
28989	libproto/include/amd.h, libproto/maildir/mbox.c,
28990	libproto/mailer/sendmail.c, libproto/mailer/smtp.c,
28991	libproto/mbox/mboxscan.c, libproto/mh/mbox.c,
28992	libproto/nntp/mbox.c, libproto/pop/mbox.c, mailbox/folder.c,
28993	mailbox/mailer.c : Update calls to mu_observable_notify.
28994	* libproto/include/mailbox0.h (struct _mu_mailbox): Rename
28995	_save_attributes to _sync.
28996	* mailbox/amd.c: Likewise.
28997	(_quick_get_message): New member.
28998	(MAILBOX_NOTIFY): Remove.
28999	* libproto/include/message0.h (struct _mu_message): New member
29000	_get_qid.
29001	* libproto/include/observer0.h (struct _mu_observer): New member
29002	_action_data.
29003	* libproto/mbox/mbox.c: Implement mbox_message_qid. Update calls
29004	to mu_observable_notify.
29005	(mbox_append_message): Report MU_EVT_MESSAGE_APPEND.
29006	* mailbox/observer.c (mu_observer_destroy): Call _destroy with
29007	_action_data as its third argument.
29008	(mu_observer_action, mu_observable_notify): Takes third argument
29009	(call data)
29010	(mu_observer_set_action, mu_observer_set_destroy): Update signature.
29011	(mu_observer_set_action_data): New function.
29012
29013	* libproto/mbox/mbox0.h, mail.local/main.c: Minor change
29014
29015	* mail.local/Makefile.am (mail_local_LDADD): Add MU_LIB_MAILER
29016
29017	* mailbox/file_stream.c (_file_open): Fix handling of
29018	MU_STREAM_APPEND. Remove assertion.
29019
29020	* mailbox/mailbox.c (mu_mailbox_quick_get_message): New function
29021	(mu_mailbox_sync): New function.
29022	(mu_mailbox_get_size): Implement brute-force approach in case the
29023	mailbox does not provide a method.
29024
29025	* mailbox/message.c (mu_message_get_qid, mu_message_set_qid): New
29026	function.
29027
29028	* maildag/: New directory. A general-purpose mail delivery agent.
29029	* maildag/deliver.c: New file.
29030	* maildag/lmtp.c: New file.
29031	* maildag/maidag.c: New file.
29032	* maildag/maidag.h: New file.
29033	* maildag/mailtmp.c: New file.
29034	* maildag/mailquota.c: New file.
29035	* maildag/script.c: New file.
29036	* maildag/util.c: New file.
29037	* maildag/Makefile.am: New file.
29038	* maildag/.cvsignore: New file.
29039
290402007-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
29041
29042	* mailbox/cfg_lexer.c: Do not use obstack.
29043	* mailbox/refcount.c (mu_refcount_inc, mu_refcount_dec): Bugfix
29044
29045	* auth/pam.c, auth/radius.c: Add configuration keywords.
29046	* mailbox/cfg_lexer.c (isword): Allow dots in words.
29047
29048	* configure.ac, NEWS: version 1.2.90
29049	* mailbox/Makefile.am: Additional dependency
29050	cfg_parser.h:cfg_parser.y
29051	* mailbox/cfg_lexer.c (_mu_config_register_section): Zero out
29052	the root container after creation.
29053	(_mu_parse_config): Use `program' not `prog' for per-program
29054	sections.
29055	* pop3d/pop3d.c (cb_bulletin_db): Fix typo
29056	(pop3d_cfg_param): Protect some variables by ifdefs.
29057
29058	* include/mailutils/argp.h (mu_argp_set_config_param): New
29059	function.
29060	* include/mailutils/cfg.h (mu_cfg_time): New value
29061	(struct mu_cfg_section): Revamp using lists.
29062	(enum mu_cfg_cont_type, struct mu_cfg_cont): New types.
29063	(mu_config_create_container, mu_config_clone_container)
29064	(mu_config_destroy_container): New functions.
29065	(mu_parse_config): New function.
29066	* include/mailutils/mu_auth.h (mu_authentication_clear_list)
29067	(mu_authorization_clear_list): New functions.
29068	* mailbox/cfg_lexer.c: Add missing includes
29069	(mu_config_create_container, mu_config_clone_container)
29070	(mu_config_destroy_container): New functions.
29071	(mu_parse_config): New function.
29072	(_mu_config_register_section): New function.
29073	(mu_config_register_section): New function.
29074	(_mu_parse_config): Fully implement system-wide/per-user
29075	configuration semantics.
29076	(mu_parse_config): Take two more arguments.
29077	* mailbox/cfg_parser.h: Remove automatically generated file.
29078	* mailbox/cfg_parser.y (find_container): New function
29079	(find_subsection,find_param): Rewrite using find_container
29080	(parse_param): Implement new data type mu_cfg_time (time_t value).
29081	(_scan_tree_helper): Complain about unknown sections only if
29082	MU_CONFIG_VERBOSE environment variable is set.
29083	* mailbox/mu_argp.c (assign_string): Bugfix.
29084	(mu_argp_set_config_param): New function.
29085	(mu_argp_parse): Remove eventual `lt-' prefix from program names.
29086	* mailbox/mu_auth.c: New options --clear-authorization and
29087	--clear-authentication.
29088	(mu_authorization_clear_list,mu_authentication_clear_list): New
29089	functions.
29090
29091	* include/mailutils/refcount.h (struct _mu_refcount): Move to
29092	refcount.c
29093	(mu_refcount_inc,mu_refcount_dec): Change return value.
29094	(mu_refcount_value): New function.
29095	* mailbox/refcount.c (struct _mu_refcount): Moved from refcount.h
29096	(mu_refcount_value): New function.
29097	(mu_refcount_create,mu_refcount_destroy,mu_refcount_inc)
29098	(mu_refcount_dec): Fix monitor usage.
29099	(mu_refcount_inc,mu_refcount_dec): Fix return type.
29100
29101	* mailbox/Makefile.am (libmailutils_la_SOURCES): Add refcount.c
29102	* dotlock/dotlock.c, imap4d/imap4d.c, mail.local/main.c,
29103	mail.remote/mail.remote.c, mimeview/mimeview.c,
29104	movemail/movemail.c, pop3d/pop3d.c, pop3d/signal.c,
29105	readmsg/readmsg.c, sieve/sieve.c: Implement new configuration.
29106
29107	* testsuite/lib/mailutils.exp: Set MU_CONFIG_FLAVOR envar to
29108	`none' to avoid reading configuration files.
29109
291102007-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
29111
29112	* mailbox/message.c (message_stream_size): Bugfix.
29113
291142007-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
29115
29116	Implement socket stream type and shutdown method for streams:
29117
29118	* mailbox/socket_stream.c: New file.
29119	* include/mailutils/stream.h (mu_socket_stream_create)
29120	(mu_stream_shutdown, mu_stream_set_shutdown): New functions.
29121	* libproto/include/stream0.h (struct _mu_stream): New member
29122	`_shutdown'.
29123	* mailbox/file_stream.c (mu_stream_create): Bugfix.
29124	* mailbox/stream.c (mu_stream_shutdown)
29125	(mu_stream_set_shutdown): New functions.
29126	* mailbox/tcp.c (_tcp_shutdown): New function.
29127	(_tcp_stream_init): New function.
29128	(mu_tcp_stream_create_with_source_ip): Register _tcp_shutdown.
29129
29130	Implement normal UNIX-style configuration files:
29131
29132	* mailbox/cfg_lexer.c: New file.
29133	* mailbox/cfg_parser.y: New file.
29134	* mailbox/cfg_parser.h: New file.
29135	* mailbox/Makefile.am: Add cfg_ sources and socket_stream.c.
29136
29137	* include/mailutils/cfg.h: New file.
29138	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add cfg.h.
29139	* include/mailutils/argp.h: Include cfg.h.
29140	(mu_create_argcv): Remove prototype.
29141	* include/mailutils/mu_auth.h (struct mu_auth_module): New member
29142	`cfg'.
29143	(MU_AUTH_REGISTER_ALL_MODULES): Call mu_auth_init first.
29144
29145	* mailbox/mu_argp.c: Rewrite. Implement normal configuration
29146	(resource) file support. Overloaded command line options begin to
29147	phase out.
29148	* mailbox/mu_auth.c, auth/gsasl.c, auth/pam.c, auth/radius.c,
29149	auth/sql.c, auth/tls.c, auth/virtual.c, libsieve/argp.c,
29150	mailbox/system.c: Implement configuration statements.
29151
29152	* imap4d/imap4d.c: Begin switching to the new configuration scheme.
29153
29154	* mh/mh_whatnow.c, mh/send.c, sql/mysql.c, sql/odbc.c,
29155	sql/postgres.c: Keep the namespace clean.
29156
291572007-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
29158
29159	* mail/escape.c (escape_deadletter): Add missing check.
29160
291612007-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
29162
29163	* NEWS: Update
29164	* mailbox/url.c (url_parse0): The notation proto:///file means
29165	absolute file name.
29166	* mailbox/testsuite/Urls: Likewise
29167
291682007-09-04  Sergey Poznyakoff  <gray@gnu.org.ua>
29169
29170	* README: Reword yesterdays changing by pointing to the
29171	documentation, instead of the raw texi file.
29172	* doc/texinfo/Makefile.am (master-menu, untabify, final): New
29173	goals.
29174	* doc/texinfo/mastermenu.el, doc/texinfo/untabify.el: New files
29175	* doc/texinfo/mailutils.texi: Rebuild master menu.
29176
291772007-09-03  Darel Henman  <dhenman@gmail.com>
29178
29179	* README:  Edited text in README file related to the
29180	-enable-mh-utils option.  This was to correct a reference from
29181	a now non-existent mh README file to the ..doc/texinfo/mh-mh.texi file.
29182
29183
291842007-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
29185
29186	* config/mailutils-config.c (lib_descr): Add mailer.
29187	* doc/texinfo/programs.texi (Loader Flags): Update
29188
291892007-08-24  Darel Henman  <dhenman@gmail.com>
29190
29191	* mailbox/mailer.c: Include <sys/time.h> to fix builds on CygWin.
29192
29193
291942007-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
29195
29196	* examples/mta.c: Accommodate for the change from 2007-08-09
29197
291982007-08-18  Wojciech Polak  <polak@gnu.org>
29199
29200	* doc/texinfo/mailutils.texi (References): Added RFC 2487 and 2595.
29201	* doc/texinfo/url.texi (URL): Document POPS and IMAPS protocols.
29202
292032007-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>
29204
29205	* libproto/mailer/smtp.c (smtp_send_message): Do not output space
29206	character after MAIL FROM: and RCPT TO:
29207
292082007-07-18  Wojciech Polak  <polak@gnu.org>
29209
29210	Added support for new protocols: POPS (pops://)
29211	and IMAPS (imaps://).
29212
29213	* include/mailutils/registrar.h: Register new protocols:
29214	mu_pops_record and mu_imaps_record.
29215	* libproto/imap/folder.c (_imaps_record, mu_imaps_record): Added.
29216	(folder_imap_open): Handle IMAPS connection.
29217	* libproto/imap/mbox.c (_mailbox_imap_and_imaps_init): New function.
29218	(_mailbox_imaps_init): Likewise.
29219	(_mailbox_imap_init): Call _mailbox_imap_and_imaps_init.
29220	* libproto/include/imap0.h (_f_imap): Added new variable imaps.
29221	* libproto/include/registrar0.h (MU_IMAPS_PORT, MU_IMAPS_SCHEME)
29222	(MU_IMAPS_SCHEME_LEN): Added new constants.
29223	(MU_POPS_PORT, MU_POPS_SCHEME, MU_POPS_SCHEME_LEN): Likewise.
29224	* libproto/pop/folder.c (_pops_record, mu_pops_record): Added.
29225	* libproto/pop/mbox.c (_pop_data): Added new variable pops.
29226	(_mailbox_pop_and_pops_init): New function.
29227	(_mailbox_pops_init): Likewise.
29228	(_mailbox_pop_init): Call _mailbox_pop_and_pops_init.
29229	(pop_open): Handle POPS connection.
29230
292312007-07-18  Wojciech Polak  <polak@gnu.org>
29232
29233	* libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES):
29234	Added url_sendmail.c and url_smtp.c.
29235	* libproto/mailer/url_sendmail.c: Moved from mailbox/url_sendmail.c.
29236	(_url_sendmail_init): Call mu_url_init.
29237	* libproto/mailer/url_smtp.c: Moved from mailbox/url_smtp.c.
29238	(_url_smtp_init): Call mu_url_init.
29239	* libproto/pop/url.c (_url_pop_init, _url_pops_init): Call mu_url_init.
29240	* libproto/imap/url.c (_url_imap_init, _url_imaps_init): Likewise.
29241	* mailbox/Makefile.am (libmailutils_la_SOURCES):
29242	Removed url_sendmail.c and url_smtp.c.
29243	* mailbox/url_sendmail.c: Moved to libproto/mailer/url_sendmail.c.
29244	* mailbox/url_smtp.c: Moved to libproto/mailer/url_smtp.c.
29245	* mailbox/url.c (mu_url_init): New function.
29246	* include/mailutils/url.c (mu_url_init): New prototype.
29247
292482007-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
29249
29250	* include/mailutils/libsieve.h (mu_stream_printf): Remove
29251	conflicting prototype.
29252
292532007-07-17  Wojciech Polak  <polak@gnu.org>
29254
29255	* libproto/mailer: New directory. Keeps libmu_mailer.la.
29256	* libproto/mailer/Makefile.am: New file.
29257	* libproto/mailer/sendmail.c: Moved from mailbox/sendmail.c.
29258	* libproto/mailer/smtp.c: Moved from mailbox/smtp.c.
29259	* libproto/Makefile.am (SUBDIR): Added mailer.
29260	* examples/Makefile.am, guimb/Makefile.am, libmu_scm/Makefile.am,
29261	mail/Makefile.am, mail.remote/Makefile.am, mh/Makefile.am,
29262	sieve/Makefile.am: Added ${MU_LIB_MAILER}.
29263	* mailbox/sendmail.c: Moved to libproto/mailer/sendmail.c.
29264	* mailbox/smtp.c: Moved to libproto/mailer/smtp.c.
29265	* mailbox/mutil.c (mu_tls_begin): Removed placeholder.
29266	* mailbox/Makefile.am (libmailutils_la_SOURCES):
29267	Removed sendmail.c and smtp.c.
29268	* configure.ac: Added MU_LIB_MAILER.
29269
292702007-07-16  Sergey Poznyakoff  <gray@gnu.org.ua>
29271
29272	* mh/mh_ctx.c (mh_context_read): Avoid writing past blurb end.
29273	* mh/send.c: New mtstailor variable "username"
29274
292752007-07-14  Sergey Poznyakoff  <gray@gnu.org.ua>
29276
29277	* imap4d/imap4d.h (util_parse_822_date): First arg is const
29278	* imap4d/util.c: Likewise.
29279	* imap4d/search.c: Rewrite using parse tree instead of instruction
29280	array. Implement boolean shortcut evaluation.
29281
292822007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
29283
29284	* imap4d/fetch.c, imap4d/select.c, imap4d/status.c, mh/inc.c,
29285	mh/mh_init.c, pop3d/bulletin.c: Fix format strings
29286	* imap4d/search.c, libproto/mbox/folder.c, mailbox/envelope.c,
29287	examples/url-parse.c, mailbox/mu_auth.c: Minor fixes
29288	* include/mailutils/libsieve.h (mu_stream_printf): Remove
29289	* libsieve/actions.c (mu_stream_printf): Remove
29290	(mime_create_ds): Bugfix: datestr was never initialized! Nobody
29291	noticed this far?
29292
292932007-07-10  Wojciech Polak  <polak@gnu.org>
29294
29295	* auth/tls.c (mu_tls_begin): New function.
29296	(_tls_stream_push): Added mu_error call.
29297	(_tls_open_client): Return MU_ERR_FAILURE instead of -1.
29298	* include/mailutils/tls.h (mu_tls_readline_fn)
29299	(mu_tls_writeline_fn, mu_tls_stream_ctl_fn): New data types.
29300	(mu_tls_begin): New prototype.
29301	* mailbox/mutil.c (mu_tls_begin): Placeholder.
29302
29303	* libproto/pop/mbox.c (pop_parse_capa): New function.
29304	(pop_capa): Send CAPA, but don't parse the response,
29305	call pop_parse_capa() instead.
29306	(pop_reader, pop_writer, pop_stream_ctl): New static functions.
29307	(pop_stls): Uses now mu_tls_begin() from libmuauth.
29308
29309	* libproto/imap/folder.c: (imap_reader, imap_writer)
29310	(imap_stream_ctl): New static functions.
29311	(tls): Uses now mu_tls_begin() from libmuauth.
29312	(folder_imap_open): Use MU_IMAP_PORT.
29313
29314	* mailbox/smtp.c: Added STARTTLS support.
29315	(smtp_parse_ehlo_ack): New function.
29316	(smtp_starttls): New function.
29317	(stmp_reader, smtp_writer, smtp_stream_ctl): New static
29318	functions.
29319
29320	* mailbox/stream.c: (mu_stream_vprintf)
29321	(mu_stream_printf, mu_stream_sequential_vprintf)
29322	(mu_stream_sequential_printf): New functions.
29323	* include/mailutils/stream.h: (mu_stream_vprintf)
29324	(mu_stream_printf, mu_stream_sequential_vprintf)
29325	(mu_stream_sequential_printf): New prototypes.
29326
293272007-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
29328
29329	* NEWS, configure.ac: Version 1.2.1
29330	* THANKS: Add Robby Villegas
29331	* examples/mta.c, libproto/imap/folder.c, libproto/nntp/folder.c,
29332	mimeview/mimetypes.l: Fix format string
29333	* libproto/imap/mbox.c: Minor fixes
29334	* mail/mail.c (mail_mainloop): Use "%s" to properly pass command
29335	to util_do_command. Remove call to util_escape_percent
29336	* mail/mail.h, mail/util.c (util_escape_percent): Delete
29337
29338	* libproto/include/envelope0.h (date,sender): New members
29339	(_sender,_date): Rename to _get_sender, _get_date
29340	[__cplusplus]: Add missing }
29341
29342	* include/mailutils/envelope.h, mailbox/envelope.c
29343	(mu_envelope_get_sender)
29344	(mu_envelope_sget_sender, mu_envelope_aget_sender)
29345	(mu_envelope_get_date, mu_envelope_sget_date)
29346	(mu_envelope_aget_date): New functions
29347	(mu_envelope_sender, mu_envelope_date): Rewrite as macros
29348
29349	* guimb/util.c, imap4d/append.c, imap4d/fetch.c, imap4d/search.c,
29350	libmu_scm/mu_message.c, libsieve/actions.c, libsieve/tests.c,
29351	mail/from.c, mailbox/amd.c, mailbox/mutil.c,
29352	readmsg/readmsg.c: Rewrite using new envelope accessors
29353
29354	* libproto/mbox/mbox.c (write_array): New function
29355	(mbox_append_message0): Rewrite using new envelope accessors +
29356	write_array
29357
293582007-07-06  Sergey Poznyakoff  <gray@gnu.org.ua>
29359
29360	* configure.ac (INTLINCS): Remove leftover variable
29361	(MU_LINK_POSTFLAGS): New subst
29362	* auth/Makefile.am, comsat/Makefile.am,
29363	dotlock/Makefile.am, examples/Makefile.am,
29364	examples/cpp/Makefile.am, frm/Makefile.am, guimb/Makefile.am,
29365	imap4d/Makefile.am, lib/Makefile.am, libmu_cpp/Makefile.am,
29366	libmu_scm/Makefile.am, libproto/imap/Makefile.am,
29367	libproto/maildir/Makefile.am, libproto/mbox/Makefile.am,
29368	libproto/mh/Makefile.am, libproto/nntp/Makefile.am,
29369	libproto/pop/Makefile.am, libsieve/Makefile.am,
29370	libsieve/extensions/Makefile.am, mail/Makefile.am,
29371	mail.local/Makefile.am, mail.remote/Makefile.am,
29372	mailbox/Makefile.am, messages/Makefile.am, mh/Makefile.am,
29373	mimeview/Makefile.am, movemail/Makefile.am,
29374	pop3d/Makefile.am, readmsg/Makefile.am, sql/Makefile.am,
29375	sieve/Makefile.am(INCLUDES): Remove INTLINCS
29376	* config/Makefile.am (INCLUDES): Remove INTLINCS
29377	(mailutils_config_CFLAGS): Use MU_LINK_POSTFLAGS
29378
293792007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
29380
29381	* NEWS: Update
29382	* configure.ac: Change library version info
29383	* examples/url-parse.c: Rewrite using sget accessors
29384	* include/mailutils/url.h, mailbox/url.c (mu_url_sget_scheme)
29385	(mu_url_aget_scheme, mu_url_sget_user, mu_url_aget_user)
29386	(mu_url_sget_passwd, mu_url_aget_passwd, mu_url_sget_auth)
29387	(mu_url_aget_auth, mu_url_sget_host, mu_url_aget_host)
29388	(mu_url_sget_path, mu_url_aget_path, mu_url_sget_query)
29389	(mu_url_aget_query): New functions
29390	(mu_url_get_scheme, mu_url_get_user, mu_url_get_passwd)
29391	(mu_url_get_auth, mu_url_get_host, mu_url_get_path)
29392	(mu_url_get_query)
29393	(mu_url_is_same_scheme, mu_url_is_same_user, mu_url_is_same_path)
29394	(mu_url_is_same_host, mu_url_is_same_port): Rewrite using sget
29395	accessors.
29396
29397	* libproto/imap/folder.c, libproto/imap/mbox.c,
29398	libproto/mbox/folder.c, libproto/mbox/mbox.c,
29399	libproto/nntp/folder.c, libproto/nntp/mbox.c, libproto/pop/mbox.c,
29400	mailbox/amd.c, mailbox/sendmail.c, mailbox/smtp.c,
29401	mailbox/wicket.c: Use mu_url_sget or mu_url_aget, depending on the
29402	needs.
29403
29404	* mailbox/mailbox.c (mu_mailbox_get_debug): Propagate the debug
29405	state to the underlying folder.
29406
294072007-07-03  Sergey Poznyakoff  <gray@gnu.org.ua>
29408
29409	* mail.local/Makefile.am (mail_local_LDADD): Add missing
29410	libraries. Reported by Robby Villegas.
29411
294122007-07-01  Sergey Poznyakoff  <gray@gnu.org.ua>
29413
29414	* mailbox/assoc.c (assoc_rehash): Fix an incorrect element
29415	size calculation.
29416
294172007-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
29418
29419	* COPYING, COPYING.LESSER: Install official versions
29420	* configure.ac, NEWS: Version 1.2
29421	* libsieve/extensions/spamd.c: Append `X-' headers.
29422	* mail.local/main.c: Read message contents from the message
29423	stream, so any changes to its headers and/or body are propagated
29424	to the final delivery.
29425
294262007-06-28  Sergey Poznyakoff  <gray@gnu.org.ua>
29427
29428	* configure.ac: Remove the definition of ARG_UNUSED
29429
29430	* mailbox/header.c (mu_hdrent_create): Minor change
29431	* libsieve/argp.c (sieve_argp_parser): Bug fix
29432	* libsieve/prog.c (sieve_code_command: Bug fixes
29433
29434	* include/mailutils/types.hin (MU_ARG_UNUSED, MU_PRINTFLIKE): New
29435	macros.
29436	* lib/daemon.c: Use __attribute__ instead of ARG_UNUSED
29437	* auth/pam.c, auth/radius.c, auth/sql.c, auth/virtual.c,
29438	examples/nntpclient.c, examples/pop3client.c, imap4d/capability.c,
29439	imap4d/check.c, imap4d/close.c, imap4d/fetch.c,
29440	libproto/imap/folder.c, libproto/imap/url.c,
29441	libproto/maildir/folder.c, libproto/maildir/mbox.c,
29442	libproto/mbox/folder.c, libproto/mbox/url.c, libproto/mh/folder.c,
29443	libproto/mh/mbox.c, libproto/nntp/url.c, libproto/pop/mbox.c,
29444	libproto/pop/url.c, libsieve/util.c, libsieve/extensions/spamd.c,
29445	mail/decode.c, mail/escape.c, mail/exit.c, mail/folders.c,
29446	mail/if.c, mail/inc.c, mail/list.c, mail/mail.c, mail/mailline.c,
29447	mail/msgset.y, mail/quit.c, mail/source.c, mail/summary.c,
29448	mail/tag.c, mail/version.c, mailbox/amd.c, mailbox/auth.c,
29449	mailbox/file_stream.c, mailbox/filter_iconv.c,
29450	mailbox/filter_trans.c, mailbox/message_stream.c,
29451	mailbox/monitor.c, mailbox/mu_auth.c, mailbox/parsedate.y,
29452	mailbox/system.c, mailbox/url_sendmail.c, mh/ali.c,
29453	mh/mhparam.c, pop3d/auth.c, pop3d/signal.c, sql/odbc.c: Use
29454	MU_ARG_UNUSED to mark unused formal parameters.
29455
29456	* guimb/guimb.h, imap4d/imap4d.h, include/mailutils/debug.h,
29457	include/mailutils/error.h, include/mailutils/libsieve.h,
29458	include/mailutils/nntp.h, include/mailutils/pop3.h,
29459	libproto/include/imap0.h, libsieve/sieve.h, mail/mail.h,
29460	mail.local/mail.local.h, mh/mh.h, pop3d/pop3d.h: Mark printf-like
29461	calls with MU_PRINTFLIKE.
29462
29463	* po/Makevars (XGETTEXT_OPTIONS): Add Mailutils-specific
29464	printf-like calls.
29465
29466	* NEWS: Update
29467	* include/mailutils/header.h (mu_header_append,mu_header_prepend):
29468	New functions
29469	* mailbox/header.c: Likewise
29470	* include/mailutils/mailer.h (mu_mailer_send_fragments): New
29471	function
29472	* mailbox/mailer.c: Likewise
29473	* include/mailutils/mutil.h (mu_rfc2822_msg_id): New function
29474	* mailbox/mutil.c: Likewise
29475	* mailbox/mime.c (_mime_set_content_type): Avoid risky usage of
29476	static buffers.
29477
29478	* mh/TODO: Update
29479	* mh/mh_getopt.h (ARG_CHUNKSIZE): New value
29480	* mh/mh_init.c (mh_create_message_id): Rewrite using
29481	mu_rfc2822_msg_id
29482	* mh/send.c: Implement `--send'.
29483
294842007-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
29485
29486	Prepare for the GPL v.3 release.
29487	Relicense programs under GPL v.3, libraries under LPGL v.3
29488
294892007-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
29490
29491	* examples/header.c: Implement a terse runtime help.
29492
294932007-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
29494
29495	* NEWS: Update
29496
29497	* mailbox/header.c (header_readline): Always nul-terminate the
29498	buffer.
29499	(mu_hdrent_find): Allow negative instance indices, meaning
29500	scanning from the bottom up.
29501
29502	* include/mailutils/list.h: Fix typo
29503	* libsieve/argp.c: New option --clearpath
29504	* libsieve/load.c: Minor change
29505	* libsieve/sieve.h: Minor change
29506	* sieve/testsuite/sieve/ext.exp: Pass --clearpath option to sieve
29507
29508	* mh/anno.c, mh/burst.c, mh/comp.c, mh/compcommon.c, mh/folder.c,
29509	mh/forw.c, mh/inc.c, mh/mark.c, mh/mh.h, mh/mh_alias.y,
29510	mh/mh_argp.c, mh/mh_ctx.c,  mh/mh_global.c, mh/mh_init.c,
29511	mh/mh_msgset.c, mh/mh_sequence.c, mh/mh_whatnow.c, mh/mh_whom.c,
29512	mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
29513	mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
29514	mh/sortm.c, mh/whom.c: Use mu_header_sget to retrieve context and
29515	configuration settings. Update all callers.
29516
29517	* include/mailutils/header.h (MU_HEADER_REPLACE)
29518	(MU_HEADER_BEFORE): New macros
29519	(mu_header_remove,mu_header_insert)
29520	(mu_header_sget_value_n,mu_header_get_value_n)
29521	(mu_header_aget_value_n,mu_header_get_address_n)
29522	(mu_header_sget_field_name,mu_header_sget_field_value)
29523	(mu_header_get_value_unfold_n,mu_header_aget_value_unfold_n): New
29524	functions;
29525	(mu_header_sget_value,mu_header_get_value,mu_header_aget_value)
29526	(mu_header_get_address,mu_header_get_value_unfold)
29527	(mu_header_aget_value_unfold): Rewrite as macros
29528	(mu_header_set_set_value,mu_header_set_get_value)
29529	(mu_header_set_size,mu_header_set_lines): Remove functions
29530
29531	* libproto/include/header0.h: Rewrite from scratch
29532	* mailbox/header.c: Rewrite from scratch
29533
29534	* examples/header.c: New program
29535	* examples/Makefile.am (noinst_PROGRAMS): Add header
29536	* examples/addr.c: Remove unused vars
29537	* lib/mu_dbm.c, libproto/maildir/mbox.c, mh/mh_format.c: Remove
29538	unused functions
29539	* libmu_scm/mu_message.c (_get_envelope_sender): Bugfix: the return
29540	value was wrong.
29541	* examples/mimetest.c, libproto/imap/mbox.c, libproto/mbox/mbox.c,
29542	libsieve/actions.c, mail/decode.c, mail/escape.c, mail/mail.h,
29543	mail/print.c, mail/retain.c, mail/send.c, mail.local/mailquota.c,
29544	mailbox/amd.c,  mailbox/sendmail.c: Prefer mu_header_sget
29545	where possible. Remove obsolete header calls.
29546	* mail.remote/testsuite/Data: Remove extra white space
29547	* mail.local/main.c (main): Register all mailbox formats
29548	* mailbox/mime.c: Fix indentation
29549	* mh/mhn.c: shut up the gcc warning
29550
295512007-06-24  Sergey Poznyakoff  <gray@gnu.org.ua>
29552
29553	* NEWS: Update
29554	* examples/addr.c, examples/mta.c, frm/common.c, imap4d/fetch.c,
29555	libmu_scm/mu_message.c, mail/alias.c, mail/alt.c, mail/from.c,
29556	mail/mail.h, mail/reply.c, mail/send.c, mail/util.c,
29557	mailbox/attachment.c, mailbox/mutil.c, mailbox/sendmail.c,
29558	mailbox/smtp.c, mh/mh.h, mh/mh_format.c, mh/mh_format.h,
29559	mh/mh_init.c: Use mu_address_sget functions, where possible.
29560	* include/mailutils/address.h (mu_address_set_local_part)
29561	(mu_address_set_domain,mu_address_set_route)
29562	(mu_address_set_email,mu_address_sget_comments)
29563	(mu_address_sget_local_part,mu_address_sget_personal)
29564	(mu_address_sget_domain,mu_address_sget_route)
29565	(mu_address_sget_email): New functions
29566	* mailbox/address.c: Likewise
29567
295682007-06-22  Sergey Poznyakoff  <gray@gnu.org.ua>
29569
29570	* configure.ac: Use AM_PROG_CC_C_O and AC_PROG_CXX
29571	* include/mailutils/property.h (mu_property_sget_value)
29572	(mu_property_aget_value): New functions
29573	* mailbox/property.c: Likewise
29574	* mailbox/Makefile.am: Merge DEFS and AM_CPPFLAGS
29575	* mailbox/mailer.c (mu_mailer_send_message): Set envelope from
29576	address according to the underlying mailer type.
29577	* mailbox/smtp.c (smtp_open,smtp_send_message): On invalid
29578	arguments, return EINVAL instead of spitting out assertion.
29579	(smtp_send_message): Null from address is an error.
29580	* mh/sortm.c: Stable sort.
29581
295822007-05-14  Sergey Poznyakoff  <gray@gnu.org.ua>
29583
29584	* README: Fix typos, use LDFLAGS instead of LIBS
29585	* auth/tls.c (_tls_stream_push): Flush data. before returning.
29586
295872007-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
29588
29589	* scripts/ylwrap: Rename to ...
29590	* scripts/gylwrap: ... this
29591	* doc/texinfo/Makefile.am, libsieve/Makefile.am,
29592	mailbox/Makefile.am, mailbox/Makefile.am, mh/Makefile.am,
29593	mimeview/Makefile.am, scripts/Makefile.am: Update to the
29594	above change.
29595
295962007-05-08  Sergey Poznyakoff  <gray@gnu.org.ua>
29597
29598	* Makefile.am (alpha): Change distdir format
29599	* examples/mimetest.c: Print more information about the message
29600	structure.
29601	* mailbox/mime.c (_mime_parse_mpart_message): One more fix
29602	* mailbox/testsuite/Mime: Fix to match new mimetest output and
29603	bugfixes in mime.c
29604	* imap4d/testsuite/imap4d/fetch.exp, mail/testsuite/mail/read.exp,
29605	mail/testsuite/mail/write.exp,
29606	readmsg/testsuite/readmsg/test.exp: Update to match bugfixes in
29607	mime.c
29608	* testsuite/spool/mbox1: Fix msg#5
29609
296102007-05-07  Sergey Poznyakoff  <gray@gnu.org.ua>
29611
29612	* mailbox/daemon.c (mu_daemon_remove_pidfile): Reset pidfile.
29613
296142007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
29615
29616	* configure.ac (MU_BUILT_CXX_EXAMPLES): Define if c++ libs
29617	requested.
29618	* examples/cpp/Makefile.am: Build c++ examples
29619	* libmu_cpp/Makefile.am (libmu_cpp_la_LDFLAGS): Add -rpath
29620
296212007-04-30  Wojciech Polak  <polak@gnu.org>
29622
29623	* libproto/pop/mbox.c: Fixed APOP handling.
29624
296252007-04-12  Sergey Poznyakoff  <gray@gnu.org.ua>
29626
29627	* mailbox/header.c (mu_header_get_value): Bugfix
29628	* mailbox/mbx_default.c (mu_mailbox_create_default): Fix memory
29629	leaks.
29630
296312007-03-16  Sergey Poznyakoff  <gray@gnu.org.ua>
29632
29633	* pop3d/bulletin.c (read_bulletin_db): Do not close DB too early.
29634
296352007-03-07  Sergey Poznyakoff  <gray@gnu.org.ua>
29636
29637	* imap4d/testsuite/imap4d/expunge.exp: Fix pattern
29638	* include/mailutils/assoc.h (mu_assoc_create): Add third argument.
29639	(mu_assoc_destroy,mu_assoc_clear): New functions
29640	* include/mailutils/header.h (mu_header_set_get_fvalue): Remove
29641	function.
29642	* libproto/imap/mbox.c (imap_header_get_fvalue): Remove
29643	* libproto/include/header0.h (struct _mu_header): Remove
29644	`fhdr_count' and `fhdr', add `cache'.
29645	Remove `_get_fvalue'
29646	* libproto/mbox/mbox.c: Remove rudimentary header caching
29647	* libproto/mbox/mbox0.h: Likewise
29648	* libproto/mbox/mboxscan.c: Likewise
29649	* mail/alias.c, mailbox/mutil.c: Update calls to mu_assoc_create
29650	* mailbox/assoc.c (mu_assoc_create): Take 3 arguments
29651	(mu_assoc_clear, mu_assoc_destroy): New functions
29652	* mailbox/header.c: Rewrite header caching
29653
29654	* include/mailutils/locker.h: Rewrite
29655	* mailbox/locker.c: Rewrite
29656
296572007-03-06  Sergey Poznyakoff  <gray@gnu.org.ua>
29658
29659	* mailbox/mime.c (_mime_parse_mpart_message): The CRLF preceding
29660	the encapsulation line is conceptually attached to the boundary.
29661	* NEWS: Update
29662
296632007-02-27  Sergey Poznyakoff  <gray@gnu.org.ua>
29664
29665	* Makefile.am: Add libmu_cpp
29666	* NEWS, README: Update
29667	* configure.ac: Add `--enable-experimental' option
29668	Rewrite DBM handling
29669	Withdraw old DBM support
29670	* auth/sql.c: Actually set quota if it is available
29671	* include/mailutils/mu_auth.h (struct mu_auth_data): New field
29672	`flags'.
29673	(mu_auth_data_set_quota): New function
29674	* lib/mu_dbm.h, lib/mu_dbm.c: Withdraw old DBM support. Fix style
29675	issues.
29676	* mail.local/mail.local.h (check_quota): Change signature
29677	* mail.local/mailquota.c: Get quota value from mu_auth_data, if
29678	available.
29679	* mail.local/main.c (check_quota): Change signature
29680	* mailbox/mu_auth.c (mu_auth_data_alloc): Fill auth object with
29681	zeroes.
29682	(mu_auth_data_set_quota): New function
29683	* pop3d/apop.c: Remove unused variables
29684	* pop3d/bulletin.c (deliver_pending_bulletins): Return
29685	immediately, if unable to count messages in the bulletin box
29686	* pop3d/popauth.c (action_list): Do not check db permissions.
29687
29688	* pop3d/bulletin.c (read_bulletin_db,write_bulletin_db): Fix
29689	permissions.
29690	(open_bulletin_mailbox): Open the mailbox in read-only mode
29691	(set_bulletin_db): Do not try to open the mailbox.
29692
296932007-02-25  Sergey Poznyakoff  <gray@gnu.org.ua>
29694
29695	* pop3d/bulletin.c: Fix copyright year
29696	* pop3d/expire.c, pop3d/top.c: A message is marked for expiration
29697	after RETR or TOP.
29698	* pop3d/logindelay.c (check_login_delay): Fix error message
29699	* pop3d/pop3d.c (pop3d_parse_opt): --expire=0 implies
29700	--delete-expired.
29701
29702	* doc/texinfo/programs.texi: Document new pop3d options
29703	* libproto/mbox/mbox.c: Indentation fixes
29704	* NEWS: Update
29705
297062007-02-23  Sergey Poznyakoff  <gray@gnu.org.ua>
29707
29708	* auth/sql.c: Implement field mapping and retrieval by field
29709	names.
29710	* include/mailutils/mu_auth.h (struct mu_auth_data.quota): New
29711	field
29712	(mu_auth_data_destroy): New function
29713	* include/mailutils/mutil.h (mutil_parse_field_map): New function
29714	* include/mailutils/sql.h (mu_sql_dispatch.get_field_number): New
29715	field
29716	(mu_sql_get_field): New function
29717	* lib/mu_dbm.c, lib/mu_dbm.h (mu_dbm_datum_free): New function
29718	* mailbox/mu_auth.c (mu_auth_data_destroy): New function
29719	* mailbox/mutil.c (mutil_parse_field_map): New function
29720
29721	* pop3d/bulletin.c: Implement bulletin facility
29722	* pop3d/Makefile.am: Add bulletin.c
29723	* pop3d/apop.c (pop3d_apop): Call pop3d_begin_session instead of
29724	duplicating code from user.c
29725	* pop3d/pop3d.c (--bulletin-source, --bulletin-db): New options
29726	* pop3d/pop3d.h (auth_data): New global
29727	* pop3d/user.c (pop3d_begin_session): New function. Implement
29728	bulletin facility
29729	* pop3d/popauth.c (action_list): Call mu_dbm_datum_free
29730
29731	* readmsg/readmsg.c (main): -h shows `From ' headers as well.
29732	* readmsg/testsuite/readmsg/test.exp: Adapt for the new readmsg
29733	behavior
29734
29735	* sql/sql.c, sql/mysql.c, sql/odbc.c, sql/postgres.c: Implement
29736	retrieval by field name.
29737
297382007-02-22  Sergey Poznyakoff  <gray@gnu.org.ua>
29739
29740	* mailbox/assoc.c: New file. Implementation of associative arrays.
29741	* mailbox/Makefile.am: Add assoc.c
29742	* mailbox/errors (MU_ERR_EXISTS): New error code
29743	* include/mailutils/assoc.h: New file
29744	* include/mailutils/Makefile.am: Add assoc.h
29745	* auth/radius.c (mu_radius_authenticate): Remove unused variable
29746	* include/mailutils/iterator.h (mu_iterator_current_kv): New
29747	function
29748	(mu_iterator_set_getitem): Change signature. All references
29749	updated.
29750	* mailbox/iterator.c: Likewise
29751	* libproto/nntp/nntp_iterator.c, libproto/pop/pop3_iterator.c,
29752	mailbox/list.c: Likewise
29753	* include/mailutils/types.hin (mu_assoc_t): New data type
29754	* libproto/include/iterator0.h (getitem): Change signature
29755
29756	* mail/alias.c: Reimplement using mu_assoc_t
29757	* mail/mail.h: Include mailutils/assoc.h
29758
29759	* mailbox/mu_argp.c: Improve diagnostics of errors in rc files.
29760
297612007-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
29762
29763	* mail/pipe.c (mail_pipe): Fix handling of cmd variable and
29764	command argument.
29765	* mail/send.c (compose_destroy): Do not free outfiles[i], the
29766	caller is responsible for that.
29767	* mailbox/amd.c (amd_envelope_date, amd_envelope_sender): If buf
29768	is NULL, return required length of the buffer.
29769	* mailbox/argcv.c (argcv_get_n): Prevent coredump if command='"'
29770	* mailbox/testsuite/Argcv: Test '"' case.
29771	* mailbox/header.c: Indentation fix
29772	* readmsg/readmsg.c: Improve compatibility with elm's
29773	implementation.
29774	* readmsg/readmsg.h: Add some includes
29775	* THANKS: Add Neil R. Ormos
29776	* NEWS: Update
29777
297782006-12-31  Wojciech Polak  <polak@gnu.org>
29779
29780	Updated libmu_cpp to the current API 1.0.
29781	All method names now begin with a lowercase letter.
29782	Files affected:
29783
29784	* libmu_cpp/address.cc, libmu_cpp/filter.cc, libmu_cpp/header.cc,
29785	libmu_cpp/iterator.cc, libmu_cpp/list.cc, libmu_cpp/mailbox.cc,
29786	libmu_cpp/mailcap.cc, libmu_cpp/mailer.cc, libmu_cpp/message.cc,
29787	libmu_cpp/pop3.cc, libmu_cpp/stream.cc, libmu_cpp/url.cc,
29788	include/mailutils/cpp/address.h, include/mailutils/cpp/error.h,
29789	include/mailutils/cpp/filter.h, include/mailutils/cpp/header.h,
29790	include/mailutils/cpp/iterator.h, include/mailutils/cpp/list.h,
29791	include/mailutils/cpp/mailbox.h, include/mailutils/cpp/mailcap.h,
29792	include/mailutils/cpp/mailer.h, include/mailutils/cpp/mailutils.h,
29793	include/mailutils/cpp/message.h, include/mailutils/cpp/pop3.h,
29794	include/mailutils/cpp/stream.h, include/mailutils/cpp/url.h
29795	* examples/cpp/addr.cc, examples/cpp/http.cc, examples/cpp/iconv.cc,
29796	examples/cpp/listop.cc, examples/cpp/mailcap.cc, examples/cpp/murun.cc,
29797	examples/cpp/sfrom.cc, examples/cpp/url-parse.cc: Updated.
29798	* libmu_cpp/Makefile.am: Updated.
29799
298002006-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>
29801
29802	* configure.ac, NEWS: Version 1.1.90
29803	* mail/mail.c (default_setup): Set nullbody and nullbodymsg
29804	* mail/send.c: Sent empty messages only if nullbody is set
29805	* mailbox/amd.c (amd_open): Create directory if MU_STREAM_CREAT is
29806	given.
29807	* mimeview/mimeview.c (doc): Remove leftover \v
29808	* doc/texinfo/programs.texi (Mail Variables): Document nullbody
29809	and nullbodymsg
29810
298112006-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
29812
29813	* configure.ac: Require at least version 2.60 of autoconf
29814	* include/mailutils/stream.h (MU_STREAM_READY_EX): New define
29815	* mail.local/main.c: Allow to be run from console by a
29816	non-privileged user (useful with fetchmail)
29817	* mailbox/mutil.c (mu_fd_wait): Handle MU_STREAM_READY_EX
29818	* mailbox/sendmail.c (sendmail_send_message): Failing waitpid is
29819	not an error if errno==ECHILD (the calling program might have
29820	ignored SIGCHLD).
29821
298222006-11-13  Sergey Poznyakoff  <gray@gnu.org.ua>
29823
29824	* configure.ac: Fix creation of MU_LTLIBOBJS.  Patch submitted by
29825	Kevin Buckley and Kenji Miyake
29826	* include/mailutils/stream.h (MU_STREAM_READY_EX): New define
29827	* mailbox/mutil.c (mu_fd_wait): Handle MU_STREAM_READY_EX
29828	* mail.local/main.c
29829
298302006-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
29831
29832	* configure.ac, NEWS: Raise version number to 1.1
29833
29834	* NEWS: Update
29835	* mail.remote/mail.remote.c, sieve/sieve.c: Fix docstrings.
29836	* libproto/imap/folder.c (imap_parse): Preserve the remainder of
29837	the OK line after '[whatever]' for diagnostic purposes.
29838
29839	* doc/texinfo/programs.texi: Document changes to mail
29840	* TODO: Update
29841	* examples/encode2047.c: new options -o/-t enable/disable special
29842	interpretation of the octal escapes in the input.
29843	* mailbox/testsuite/Argcv: Comment out 8-bit test case. Sorry, tcl
29844	looses badly in handling eight-bit binary data.
29845	* mailbox/testsuite/Encode2047: Feed input in octal notation and
29846	use encode2047 \o command to override tcl brokenness.
29847	* mailbox/testsuite/mailbox/encode2047.exp: Allow test string to
29848	begin with two back slashes.
29849
29850	* m4/.cvsignore: Update
29851	* mail/escape.c (escape_sign): Print "-- \n" before the signature
29852	* mail/mail.h: Remove the declaration of cursor
29853	* mail/util.c: Allow use of ^ and $ as positioning commands
29854
298552006-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
29856
29857	* configure.ac: Check for large file support and fseeko. Replace
29858	the latter with fseek if it is not available.
29859	(MU_GUILE_SITE_DIR,MU_GUILE_SIEVE_MOD_DIR)
29860	(MU_GUILE_SIEVE_SCRIPTS,MU_GUILE_SIEVE_MOD_DATA): New variables
29861	* guimb/scm/Makefile.am: Do not try to install anything if Guile
29862	is not available
29863	* libmu_scm/Makefile.am: Likewise
29864	* mailbox/file_stream.c: Use fseeko instead of fseek
29865
298662006-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
29867
29868	* NEWS: Updated
29869	* doc/texinfo/programs.texi: Updated
29870
29871	* configure.ac (MU_GUILE_SITE_DIR,MU_GUILE_SIEVE_MOD_DIR)
29872	(MU_GUILE_SIEVE_SCRIPTS,MU_GUILE_SIEVE_MOD_DATA): New variables to
29873	clean build without Guile
29874	* guimb/scm/Makefile.am: Likewise
29875	* libmu_scm/Makefile.am: Likewise
29876	* mail/escape.c (escape_sign): Print "-- \n" before the signature.
29877	* mail/util.c (util_do_command): Implement ^ and $.
29878
298792006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
29880
29881	* configure.ac: Require gettext 0.15
29882	(check_bdb): Bugfix
29883	* m4/iconv.m4, m4/intmax.m4, m4/inttypes.m4, m4/nls.m4,
29884	m4/printf-posix.m4, m4/progtest.m4: Update
29885	* mail.local/main.c: Formatting fix
29886	* scripts/gnulib-sync (copy_files): Adjust for gettext 0.15
29887
298882006-10-17  Sergey Poznyakoff  <gray@gnu.org.ua>
29889
29890	* doc/texinfo/mu_address.texi: Added to the repository
29891	* doc/texinfo/mu_body.texi: Likewise
29892	* doc/texinfo/mu_logger.texi: Likewise
29893	* doc/texinfo/mu_mailbox.texi: Likewise
29894	* doc/texinfo/mu_message.texi: Likewise
29895	* doc/texinfo/mu_mime.texi: Likewise
29896	* doc/texinfo/mu_scm.texi: Likewise
29897	* doc/texinfo/.cvsignore: Update
29898
298992006-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
29900
29901	* configure.ac: Add support for Berkeley DB 3 and 4
29902
29903	* auth/radius.c: Return meaningful error codes.
29904	* auth/sql.c: Likewise
29905	* auth/virtual.c: Likewise
29906	* mailbox/system.c: Likewise
29907
29908	* sql/mysql.c (octet2hex): Rename to mu_octet_to_hex to avoid name
29909	clashes with mysql
29910
29911	* config/Makefile.am (mailutils_config_CFLAGS): Define I18NLIBS
29912	unconditional.
29913	* examples/Makefile.am (muath): New target
29914
29915	* include/mailutils/mu_auth.h (enum mu_auth_key_type): New data
29916	type.
29917	(mu_get_auth): New function.
29918	* lib/mu_dbm.c: Support for Berkeley DB 3, 4
29919	* mailbox/mu_auth.c (mu_get_auth): New function.
29920	(mu_auth_runlist): Change return code convention: underlying calls
29921	should return meaningful error codes, not just 0/1.
29922
29923	* examples/muauth.c: new file
29924
299252006-10-04  Sergey Poznyakoff  <gray@gnu.org.ua>
29926
29927	* libsieve/extensions/vacation.c (vacation_subject): Improve
29928	yesterday's fix, following Kostas' suggestion.
29929
299302006-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
29931
29932	* libsieve/prog.c (sieve_code_command): Avoid dead loop if a tag
29933	is not given the argument it requires. Improve the diagnostics.
29934	Bug reported by Kostas Zorbadelos.
29935	* libsieve/extensions/vacation.c (vacation_subject): Make sure
29936	subject is not null.
29937
299382006-09-27  Sergey Poznyakoff  <gray@gnu.org.ua>
29939
29940	* comsat/action.c: Minor fixes
29941	* libproto/mbox/mboxscan.c (FAST_HEADER): Fix unfolding: Advance p
29942	only if ':' was found.
29943	Minor macro style fixes
29944	* mail/mail.h (struct mail_env_entry): New member v.bool
29945	* mail/set.c (mail_set): Init dummy to 1
29946	* mail/util.c: mail_env_entry->set means that the entry was ever
29947	set.  mail_env_entry->v.bool is the actual value of boolean
29948	variables.
29949	* mail.local/main.c: Minor indentation fixes
29950	* mailbox/mutil.c (mu_string_unfold): Convert \n followed by any
29951	amount of whitespace to single space.
29952	* mh/sortm.c: Minor fix
29953
299542006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
29955
29956	* dotlock/dotlock.c, mail.local/main.c, mail.remote/mail.remote.c,
29957	mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c,  mh/fmtcheck.c,
29958	mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c,
29959	mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
29960	mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
29961	mh/sortm.c, mh/whom.c, mimeview/mimeview.c, sieve/sieve.c:
29962	Reformat argp docstring in accordance with the new argp
29963	guidelines.  Remove unneeded translators comment.
29964
29965	* config/mailutils-config.c, mh/mh.h, mh/mh_getopt.c,
29966	movemail/movemail.c: Include argp-namefrob.h is no longer needed
29967
29968	Update by gnulib-sync.
29969
29970	* lib/Makefile.am: Updated
29971	* m4/gnulib.m4: Updated
29972	* mailbox/Makefile.am: Updated
29973
29974	* lib/allocsa.c: Updated
29975	* lib/allocsa.h: Updated
29976	* lib/allocsa.valgrind: Updated
29977	* lib/asprintf.c: Updated
29978	* lib/error.c: Updated
29979	* lib/error.h: Updated
29980	* lib/exit.h: Updated
29981	* lib/exitfail.c: Updated
29982	* lib/exitfail.h: Updated
29983	* lib/getpass.c: Updated
29984	* lib/getpass.h: Updated
29985	* lib/mbswidth.c: Updated
29986	* lib/mbswidth.h: Updated
29987	* lib/obstack.c: Updated
29988	* lib/obstack.h: Updated
29989	* lib/realloc.c: Updated
29990	* lib/setenv.c: Updated
29991	* lib/setenv.h: Updated
29992	* lib/snprintf.c: Updated
29993	* lib/snprintf.h: Updated
29994	* lib/unsetenv.c: Updated
29995	* lib/vasprintf.c: Updated
29996	* lib/vasprintf.h: Updated
29997	* lib/xalloc-die.c: Updated
29998	* lib/xalloc.h: Updated
29999	* lib/xmalloc.c: Updated
30000	* lib/xsize.h: Updated
30001	* m4/absolute-header.m4: Added to the repository
30002	* m4/alloca.m4: Updated
30003	* m4/allocsa.m4: Updated
30004	* m4/argp.m4: Updated
30005	* m4/d-type.m4: Updated
30006	* m4/eealloc.m4: Updated
30007	* m4/eoverflow.m4: Updated
30008	* m4/error.m4: Updated
30009	* m4/exitfail.m4: Updated
30010	* m4/extensions.m4: Updated
30011	* m4/fnmatch.m4: Updated
30012	* m4/getdelim.m4: Updated
30013	* m4/getline.m4: Updated
30014	* m4/getlogin_r.m4: Updated
30015	* m4/getopt.m4: Updated
30016	* m4/getpass.m4: Updated
30017	* m4/glob.m4: Updated
30018	* m4/intmax_t.m4: Updated
30019	* m4/inttostr.m4: Updated
30020	* m4/inttypes_h_gl.m4: Updated
30021	* m4/longdouble.m4: Updated
30022	* m4/longdouble.m4: Updated
30023	* m4/longlong_gl.m4: Updated
30024	* m4/longlong_gl.m4: Updated
30025	* m4/mbchar.m4: Updated
30026	* m4/mbiter.m4: Updated
30027	* m4/mbrtowc.m4: Updated
30028	* m4/mbrtowc.m4: Updated
30029	* m4/mbstate_t.m4: Updated
30030	* m4/mbstate_t.m4: Updated
30031	* m4/mbswidth.m4: Updated
30032	* m4/md5.m4: Updated
30033	* m4/memchr.m4: Updated
30034	* m4/mempcpy.m4: Updated
30035	* m4/minmax.m4: Updated
30036	* m4/onceonly.m4: Updated
30037	* m4/onceonly.m4: Updated
30038	* m4/regex.m4: Updated
30039	* m4/setenv.m4: Updated
30040	* m4/sha1.m4: Updated
30041	* m4/signed.m4: Updated
30042	* m4/size_max.m4: Updated
30043	* m4/snprintf.m4: Updated
30044	* m4/ssize_t.m4: Updated
30045	* m4/stat-macros.m4: Updated
30046	* m4/stdbool.m4: Updated
30047	* m4/stdint.m4: Updated
30048	* m4/stdint_h_gl.m4: Updated
30049	* m4/strcase.m4: Updated
30050	* m4/strchrnul.m4: Updated
30051	* m4/strdup.m4: Updated
30052	* m4/strndup.m4: Updated
30053	* m4/strnlen.m4: Updated
30054	* m4/strtok_r.m4: Updated
30055	* m4/sysexits.m4: Updated
30056	* m4/unistd_h.m4: Updated
30057	* m4/vasnprintf.m4: Updated
30058	* m4/vasprintf.m4: Updated
30059	* m4/vsnprintf.m4: Updated
30060	* m4/wchar_t.m4: Updated
30061	* m4/wcwidth.m4: Added to the repository
30062	* m4/wint_t.m4: Updated
30063	* m4/xalloc.m4: Updated
30064	* m4/xsize.m4: Updated
30065	* m4/xsize.m4: Updated
30066	* mailbox/alloca.c: Updated
30067	* mailbox/alloca_.h: Updated
30068	* mailbox/argp-ba.c: Updated
30069	* mailbox/argp-eexst.c: Updated
30070	* mailbox/argp-fmtstream.c: Updated
30071	* mailbox/argp-fmtstream.h: Updated
30072	* mailbox/argp-fs-xinl.c: Updated
30073	* mailbox/argp-help.c: Updated
30074	* mailbox/argp-namefrob.h: Updated
30075	* mailbox/argp-parse.c: Updated
30076	* mailbox/argp-pin.c: Updated
30077	* mailbox/argp-pv.c: Updated
30078	* mailbox/argp-pvh.c: Updated
30079	* mailbox/argp-xinl.c: Updated
30080	* mailbox/argp.h: Updated
30081	* mailbox/asnprintf.c: Updated
30082	* mailbox/fnmatch.c: Updated
30083	* mailbox/fnmatch_.h: Updated
30084	* mailbox/fnmatch_loop.c: Updated
30085	* mailbox/getdelim.c: Updated
30086	* mailbox/getdelim.h: Updated
30087	* mailbox/getline.c: Updated
30088	* mailbox/getline.h: Updated
30089	* mailbox/getlogin_r.c: Updated
30090	* mailbox/getlogin_r.h: Updated
30091	* mailbox/getopt.c: Updated
30092	* mailbox/getopt1.c: Updated
30093	* mailbox/getopt_.h: Updated
30094	* mailbox/getopt_int.h: Updated
30095	* mailbox/gettext.h: Updated
30096	* mailbox/glob-libc.h: Updated
30097	* mailbox/glob.c: Updated
30098	* mailbox/glob_.h: Updated
30099	* mailbox/imaxtostr.c: Updated
30100	* mailbox/intprops.h: Updated
30101	* mailbox/inttostr.c: Updated
30102	* mailbox/inttostr.h: Updated
30103	* mailbox/malloc.c: Updated
30104	* mailbox/mbchar.c: Updated
30105	* mailbox/mbchar.h: Updated
30106	* mailbox/mbuiter.h: Updated
30107	* mailbox/md5.c: Updated
30108	* mailbox/md5.h: Updated
30109	* mailbox/memchr.c: Updated
30110	* mailbox/mempcpy.c: Updated
30111	* mailbox/mempcpy.h: Updated
30112	* mailbox/minmax.h: Updated
30113	* mailbox/offtostr.c: Updated
30114	* mailbox/printf-args.c: Updated
30115	* mailbox/printf-args.h: Updated
30116	* mailbox/printf-parse.c: Updated
30117	* mailbox/printf-parse.h: Updated
30118	* mailbox/regcomp.c: Updated
30119	* mailbox/regex.c: Updated
30120	* mailbox/regex.h: Updated
30121	* mailbox/regex_internal.c: Updated
30122	* mailbox/regex_internal.h: Updated
30123	* mailbox/regexec.c: Updated
30124	* mailbox/sha1.c: Updated
30125	* mailbox/sha1.h: Updated
30126	* mailbox/size_max.h: Updated
30127	* mailbox/stat-macros.h: Updated
30128	* mailbox/stdbool_.h: Updated
30129	* mailbox/stdint_.h: Updated
30130	* mailbox/strcase.h: Updated
30131	* mailbox/strcasecmp.c: Updated
30132	* mailbox/strchrnul.c: Updated
30133	* mailbox/strchrnul.h: Updated
30134	* mailbox/strdup.c: Updated
30135	* mailbox/strdup.h: Updated
30136	* mailbox/strncasecmp.c: Updated
30137	* mailbox/strndup.c: Updated
30138	* mailbox/strndup.h: Updated
30139	* mailbox/strnlen.c: Updated
30140	* mailbox/strnlen.h: Updated
30141	* mailbox/strnlen1.c: Updated
30142	* mailbox/strnlen1.h: Updated
30143	* mailbox/strtok_r.c: Updated
30144	* mailbox/strtok_r.h: Updated
30145	* mailbox/sysexit_.h: Updated
30146	* mailbox/umaxtostr.c: Updated
30147	* mailbox/vasnprintf.c: Updated
30148	* mailbox/vasnprintf.h: Updated
30149	* mailbox/vsnprintf.c: Updated
30150	* mailbox/vsnprintf.h: Updated
30151	* mailbox/wcwidth.h: Added to the repository
30152	* mailbox/xsize.h: Updated
30153
301542006-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
30155
30156	* THANKS: Add Damon Harper
30157
30158	Implement changes proposed by Damon Harper:
30159
30160	* comsat/action.c (act_getline): Change return type to
30161	unsigned. Return actual number of input lines processed or 0 on
30162	failure (either I/O, or memory allocation or EOF).
30163	(action_echo): Rewritten to use shell-like syntax
30164	(run_user_action): Rewritten main loop to make it cleaner. In
30165	particular, expand arguments after word splitting. Use new echo
30166	semantics.
30167
30168	* mail/table.c (mail_escape_table): Add ~x
30169
301702006-08-23  Sergey Poznyakoff  <gray@gnu.org.ua>
30171
30172	* mailbox/mailbox.c: Include alloca.h
30173
301742006-07-27  Sergey Poznyakoff  <gray@gnu.org.ua>
30175
30176	* mail/page.c (top_of_page,cursor,page_map,page_size)
30177	(page_avail,page_map): Hide as static
30178	(fill_page_map): Reset cursor if it points past the last
30179	message.
30180	* mail/testsuite/mail/write.exp: Add new testcase
30181
301822006-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>
30183
30184	* configure.ac: Raise version number to 1.0.1
30185	* NEWS: Version 1.0.1
30186	* lib/mailcap.c (expand_string, run_test, run_mailcap): Fix memory
30187	allocation bugs. Place all temporary strings in the obstack.
30188
30189	Fix coredump on `cd x<TAB>' in mail. Bug reported by
30190	Daniel Kahn Gillmor.
30191
30192	* include/mailutils/folder.h (mu_folder_create_from_record): New
30193	function.
30194	* mailbox/folder.c (mu_folder_create_from_record): New
30195	function.
30196	(mu_folder_create): Interface to mu_folder_create_from_record
30197	* mailbox/mutil.c (mu_scheme_autodetect_p): Return true if scheme
30198	is the name of an existing file or directory.
30199
30200	* mail/mailline.c (file_generator): Remove leading pathlen
30201	characters from the returned names.
30202
30203	* libproto/mbox/folder.c: Minor formatting changes
30204	* mail/mail.c: Likewise
30205
30206	* THANKS: Add Daniel Kahn Gillmor
30207
302082006-07-07  Sergey Poznyakoff  <gray@gnu.org.ua>
30209
30210	* configure.ac (AC_CHECK_FUNCS): Add setlocale
30211
302122006-07-06  Sergey Poznyakoff  <gray@gnu.org.ua>
30213
30214	* doc/rfc/rfc2231.txt: New file
30215	* doc/rfc/Makefile.am (EXTRA_DIST): Add rfc2231.txt
30216	* mh/TODO: Update
30217
30218	Sources at this point are tagged rel-1_0
30219
30220	* NEWS: Update
30221	* configure.ac: Raise version number to 1.0
30222	* direntry: Update for 1.0
30223	* doc/texinfo/Makefile.am: Removed hack introduced on
30224	2006-06-15. It triggered unnecessary doc updates.
30225	* scripts/guile-1.6/guile-doc-snarf (snarf_doc): Do not use \n in
30226	the replacement part of a sed expression for the sake of older
30227	seds. Use a more sophisticated approach with changing hold/pattern
30228	spaces instead.
30229	* scripts/guile-1.6/guile-doc-snarf.awk: Adopt for the new output
30230	format of snarf_doc
30231
302322006-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>
30233
30234	* gnulib.modules (mailutils): Add sha1
30235	* lib/Makefile.am: Update
30236	* mailbox/Makefile.am: Update
30237	* m4/gnulib.m4: Update
30238	* sql/mysql.c: Implement verification against mysql v4 passwords.
30239
30240	Update by gnulib-sync.
30241
30242	* lib/allocsa.c: Updated
30243	* lib/allocsa.h: Updated
30244	* lib/allocsa.valgrind: Updated
30245	* lib/asprintf.c: Updated
30246	* lib/error.c: Updated
30247	* lib/error.h: Updated
30248	* lib/exit.h: Updated
30249	* lib/exitfail.c: Updated
30250	* lib/exitfail.h: Updated
30251	* lib/getpass.c: Updated
30252	* lib/getpass.h: Updated
30253	* lib/mbswidth.c: Updated
30254	* lib/mbswidth.h: Updated
30255	* lib/obstack.c: Updated
30256	* lib/obstack.h: Updated
30257	* lib/realloc.c: Updated
30258	* lib/setenv.c: Updated
30259	* lib/setenv.h: Updated
30260	* lib/snprintf.c: Updated
30261	* lib/snprintf.h: Updated
30262	* lib/unsetenv.c: Updated
30263	* lib/vasprintf.c: Updated
30264	* lib/vasprintf.h: Updated
30265	* lib/xalloc-die.c: Updated
30266	* lib/xalloc.h: Updated
30267	* lib/xmalloc.c: Updated
30268	* lib/xsize.h: Updated
30269	* m4/alloca.m4: Updated
30270	* m4/allocsa.m4: Updated
30271	* m4/argp.m4: Updated
30272	* m4/d-type.m4: Updated
30273	* m4/eealloc.m4: Updated
30274	* m4/eoverflow.m4: Updated
30275	* m4/error.m4: Updated
30276	* m4/exitfail.m4: Updated
30277	* m4/extensions.m4: Updated
30278	* m4/fnmatch.m4: Updated
30279	* m4/full-header-path.m4: Added to the repository
30280	* m4/getdelim.m4: Updated
30281	* m4/getline.m4: Updated
30282	* m4/getlogin_r.m4: Updated
30283	* m4/getopt.m4: Updated
30284	* m4/getpass.m4: Updated
30285	* m4/glob.m4: Updated
30286	* m4/intmax_t.m4: Updated
30287	* m4/inttostr.m4: Updated
30288	* m4/inttypes_h_gl.m4: Updated
30289	* m4/inttypes_h_gl.m4: Updated
30290	* m4/longdouble.m4: Updated
30291	* m4/longdouble.m4: Updated
30292	* m4/longlong_gl.m4: Updated
30293	* m4/longlong_gl.m4: Updated
30294	* m4/mbchar.m4: Updated
30295	* m4/mbiter.m4: Updated
30296	* m4/mbrtowc.m4: Updated
30297	* m4/mbrtowc.m4: Updated
30298	* m4/mbstate_t.m4: Updated
30299	* m4/mbstate_t.m4: Updated
30300	* m4/mbswidth.m4: Updated
30301	* m4/md5.m4: Updated
30302	* m4/memchr.m4: Updated
30303	* m4/mempcpy.m4: Updated
30304	* m4/minmax.m4: Updated
30305	* m4/obstack.m4: Updated
30306	* m4/onceonly.m4: Updated
30307	* m4/onceonly.m4: Updated
30308	* m4/regex.m4: Updated
30309	* m4/restrict.m4: Updated
30310	* m4/setenv.m4: Updated
30311	* m4/sha1.m4: Added to the repository
30312	* m4/signed.m4: Updated
30313	* m4/size_max.m4: Updated
30314	* m4/snprintf.m4: Updated
30315	* m4/ssize_t.m4: Updated
30316	* m4/stat-macros.m4: Updated
30317	* m4/stdbool.m4: Updated
30318	* m4/stdint.m4: Updated
30319	* m4/stdint_h_gl.m4: Updated
30320	* m4/stdint_h_gl.m4: Updated
30321	* m4/strcase.m4: Updated
30322	* m4/strchrnul.m4: Updated
30323	* m4/strdup.m4: Updated
30324	* m4/strerror_r.m4: Updated
30325	* m4/strndup.m4: Updated
30326	* m4/strnlen.m4: Updated
30327	* m4/strtok_r.m4: Updated
30328	* m4/sysexits.m4: Updated
30329	* m4/uintmax_t_gl.m4: Updated
30330	* m4/uintmax_t_gl.m4: Updated
30331	* m4/ulonglong_gl.m4: Updated
30332	* m4/ulonglong_gl.m4: Updated
30333	* m4/unistd_h.m4: Added to the repository
30334	* m4/vasnprintf.m4: Updated
30335	* m4/vasprintf.m4: Updated
30336	* m4/vsnprintf.m4: Updated
30337	* m4/wchar_t.m4: Updated
30338	* m4/wint_t.m4: Updated
30339	* m4/xalloc.m4: Updated
30340	* m4/xsize.m4: Updated
30341	* m4/xsize.m4: Updated
30342	* mailbox/alloca.c: Updated
30343	* mailbox/alloca_.h: Updated
30344	* mailbox/argp-ba.c: Updated
30345	* mailbox/argp-eexst.c: Updated
30346	* mailbox/argp-fmtstream.c: Updated
30347	* mailbox/argp-fmtstream.h: Updated
30348	* mailbox/argp-fs-xinl.c: Updated
30349	* mailbox/argp-help.c: Updated
30350	* mailbox/argp-namefrob.h: Updated
30351	* mailbox/argp-parse.c: Updated
30352	* mailbox/argp-pin.c: Updated
30353	* mailbox/argp-pv.c: Updated
30354	* mailbox/argp-pvh.c: Updated
30355	* mailbox/argp-xinl.c: Updated
30356	* mailbox/argp.h: Updated
30357	* mailbox/asnprintf.c: Updated
30358	* mailbox/fnmatch.c: Updated
30359	* mailbox/fnmatch_.h: Updated
30360	* mailbox/fnmatch_loop.c: Updated
30361	* mailbox/getdelim.c: Updated
30362	* mailbox/getdelim.h: Updated
30363	* mailbox/getline.c: Updated
30364	* mailbox/getline.h: Updated
30365	* mailbox/getlogin_r.c: Updated
30366	* mailbox/getlogin_r.h: Updated
30367	* mailbox/getopt.c: Updated
30368	* mailbox/getopt1.c: Updated
30369	* mailbox/getopt_.h: Updated
30370	* mailbox/getopt_int.h: Updated
30371	* mailbox/gettext.h: Updated
30372	* mailbox/glob-libc.h: Updated
30373	* mailbox/glob.c: Updated
30374	* mailbox/glob_.h: Updated
30375	* mailbox/imaxtostr.c: Updated
30376	* mailbox/intprops.h: Updated
30377	* mailbox/inttostr.c: Updated
30378	* mailbox/inttostr.h: Updated
30379	* mailbox/malloc.c: Updated
30380	* mailbox/mbchar.c: Updated
30381	* mailbox/mbchar.h: Updated
30382	* mailbox/mbuiter.h: Updated
30383	* mailbox/md5.c: Updated
30384	* mailbox/md5.h: Updated
30385	* mailbox/memchr.c: Updated
30386	* mailbox/mempcpy.c: Updated
30387	* mailbox/mempcpy.h: Updated
30388	* mailbox/minmax.h: Updated
30389	* mailbox/offtostr.c: Updated
30390	* mailbox/printf-args.c: Updated
30391	* mailbox/printf-args.h: Updated
30392	* mailbox/printf-parse.c: Updated
30393	* mailbox/printf-parse.h: Updated
30394	* mailbox/regcomp.c: Updated
30395	* mailbox/regex.c: Updated
30396	* mailbox/regex.h: Updated
30397	* mailbox/regex_internal.c: Updated
30398	* mailbox/regex_internal.h: Updated
30399	* mailbox/regexec.c: Updated
30400	* mailbox/sha1.c: Added to the repository
30401	* mailbox/sha1.h: Added to the repository
30402	* mailbox/size_max.h: Updated
30403	* mailbox/stat-macros.h: Updated
30404	* mailbox/stdbool_.h: Updated
30405	* mailbox/stdint_.h: Updated
30406	* mailbox/strcase.h: Updated
30407	* mailbox/strcasecmp.c: Updated
30408	* mailbox/strchrnul.c: Updated
30409	* mailbox/strchrnul.h: Updated
30410	* mailbox/strdup.c: Updated
30411	* mailbox/strdup.h: Updated
30412	* mailbox/strncasecmp.c: Updated
30413	* mailbox/strndup.c: Updated
30414	* mailbox/strndup.h: Updated
30415	* mailbox/strnlen.c: Updated
30416	* mailbox/strnlen.h: Updated
30417	* mailbox/strnlen1.c: Updated
30418	* mailbox/strnlen1.h: Updated
30419	* mailbox/strtok_r.c: Updated
30420	* mailbox/strtok_r.h: Updated
30421	* mailbox/sysexit_.h: Updated
30422	* mailbox/umaxtostr.c: Updated
30423	* mailbox/vasnprintf.c: Updated
30424	* mailbox/vasnprintf.h: Updated
30425	* mailbox/vsnprintf.c: Updated
30426	* mailbox/vsnprintf.h: Updated
30427	* mailbox/xsize.h: Updated
30428
30429	End of update
30430
30431	* auth/sql.c: Minor fixes to get rid of the spurious gcc warnings.
30432	* libsieve/actions.c: Likewise
30433	* libsieve/prog.c: Likewise
30434	* libsieve/sieve.h: Likewise
30435	* libsieve/sieve.l: Likewise
30436	* libsieve/extensions/vacation.c: Likewise
30437	* mail/escape.c: Likewise
30438	* mailbox/argcv.c: Likewise
30439	* mailbox/file_stream.c: Likewise
30440	* mailbox/munre.c: Likewise
30441	* mailbox/mutil.c: Likewise
30442	* mh/mh_alias.l: Likewise
30443	* mh/mh_alias.y: Likewise
30444	* mh/mh_init.c: Likewise
30445	* mh/mh_whatnow.c: Likewise
30446	* mh/mh_whom.c: Likewise
30447	* mh/mhn.c: Likewise
30448	* sql/sql.c: Likewise
30449
30450	* include/mailutils/header.h (MU_HEADER_DCC): New macro. Dcc is a
30451	header traditionally used by MH
30452	* include/mailutils/mutil.h (mu_unre_set_regex): First argument is
30453	const.
30454	* lib/daemon.c: Include stdlib.h
30455	* lib/mailcap.c: All functions, except display_stream_mailcap, are
30456	static.
30457	* libmu_scm/mu_message.c (struct mu_message.needs_destroy): New
30458	member
30459	(mu_scm_message_mark): Raise needs_destroy if the message has null
30460	owner.
30461	(mu_scm_message_free): Do not attempt to reference msg, unless its
30462	needs_destroy is set.
30463	(mu_scm_message_create): Initialize needs_destroy to 0.
30464	* libsieve/extensions/moderator.c (moderator_action): set deleted
30465	flag manually, do not use undeclared sieve_mark_deleted.
30466	* mailbox/amd.c (amd_close): Unlock the monitor before returning
30467
30468	* mh/send.c (fix_fcc): Minor fix
30469	(fix_dcc): New function. Rewrites MH Dcc as standard Bcc header.
30470	(_action_send): Call fix_dcc
30471
30472	* sql/mysql.c (mu_check_mysql_scrambled_password): Use
30473	get_salt_from_scrambled.
30474
304752006-06-16  Sergey Poznyakoff  <gray@gnu.org.ua>
30476
30477	* mailbox/filter_trans.c (trans_read): Break the loop if both
30478	transcoder and read return 0 bytes. This is necessary to correctly
30479	handle unfinished input strings
30480	* mailbox/testsuite/Decode2047: New testcase: an example of
30481	unfinished input.
30482
30483	* configure.ac: Raise version number to 0.6.95
30484	* NEWS: Update
30485
304862006-06-15  Sergey Poznyakoff  <gray@gnu.org.ua>
30487
30488	Fix generation of libmu_scm documentation.
30489
30490	* doc/texinfo/Makefile.am (INCFILES): Add mu_*.texi files
30491	* doc/texinfo/libmu_scm.texi: Include snarfed files.
30492	* libmu_scm/Makefile.am (GUILE_BUILT_SOURCES_X)
30493	(DISTCLEANFILES): Add guile-procedures.texi
30494	(guile-procedures.texi): New rule
30495	* libmu_scm/mailutils.scm.in: Use documentation module. Update
30496	documentation-files to make sure MU docs are found.
30497	* libmu_scm/mu_address.c, libmu_scm/mu_logger.c,
30498	libmu_scm/mu_mailbox.c, libmu_scm/mu_message.c,
30499	libmu_scm/mu_mime.c, libmu_scm/mu_scm.c,
30500	libmu_scm/mu_util.c: Update docstrings
30501	* scripts/guile-1.6/guile-doc-snarf: Fix docfile generation
30502	* scripts/guile-1.6/guile-doc-snarf.awk: Likewise
30503	* libmu_scm/.cvsignore, doc/texinfo/.cvsignore,
30504	include/mailutils/.cvsignore: Update
30505	* libproto/.cvsignore: New file
30506
305072006-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
30508
30509	* mailbox/tcp.c (mu_tcp_stream_create_with_source_ip):
30510	(mu_tcp_stream_create_with_source_host): New functions
30511	 * include/mailutils/stream.h: Likewise
30512
30513	* mailbox/mailbox.c (mailbox_folder_create): Bugfix,
30514	strncmp(fname...
30515	* mailbox/registrar.c: Stop iterating when the matching record was
30516	found.
30517
305182006-06-10  Thomas Seeling <thomas.seeling@gmx.net> (trivial changes)
30519
30520	* mailbox/registrar.c (mu_registrar_record): Tolerate NULL
30521	argument.
30522
305232006-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
30524
30525	* guimb/main.c: Remove leftover optind usage. Thanks Jay
30526	Sulzberger <jays@panix.com> for reporting.
30527
305282006-05-23  Sergey Poznyakoff  <gray@gnu.org.ua>
30529
30530	* m4/mu_libobj.m4 (MU_REPLACE_FUNCS): Remove erroneous AC_DEFINE
30531	* examples/encode2047.c: Allow to change encoding and charset
30532	at runtime.
30533	* mailbox/filter_trans.c (trans_read): Bugfix. Do not break the
30534	loop if there are characters left in the buffer.
30535	* mailbox/testsuite/Makefile.am (EXTRA_DIST): Add Encode2047
30536	* mailbox/testsuite/RFC2047: Rename to ...
30537	* mailbox/testsuite/Decode2047: ... this
30538	* mailbox/testsuite/Encode2047: New file
30539	* mailbox/testsuite/mailbox/DISTFILES: Update
30540	* mailbox/testsuite/mailbox/rfc2047.exp: Rename to ...
30541	* mailbox/testsuite/mailbox/decode2047.exp: ... this
30542	* mailbox/testsuite/mailbox/encode2047.exp: New test
30543
305442006-05-22  Sergey Poznyakoff  <gray@gnu.org.ua>
30545
30546	* libproto/mbox/mbox.c (mbox_is_updated): Return 1 (not updated)
30547	if unable to measure stream size.
30548	* mail/quit.c (mail_mbox_close): Initialize held_count to 0
30549	* mailbox/header.c (mu_header_set_value): Fix length calculation.
30550
305512006-05-21  Sergey Poznyakoff  <gray@gnu.org.ua>
30552
30553	* mh/folder.c (main): Minor fix
30554
30555	* mailbox/smtp.c (smtp_send_message): Avoid generating spurious
30556	newline when skipping an Fcc header.
30557
305582006-05-20  Sergey Poznyakoff  <gray@gnu.org.ua>
30559
30560	* mailbox/mailer.c (save_fcc): Handle comma-delimited folder lists
30561	in Fcc lines.
30562	* mh/Makefile.am: Add mh_format.h
30563	* mh/mh_format.h: New file
30564	* mh/TODO: Update
30565	* mh/mh_format.c: Move declarations of strobj functions to
30566	mh_format.h
30567	* mh/mh_init.c (mh_file_to_message): Fix a memory leak
30568	* mh/mh_whatnow.c (mh_whatnow): consult VISUAL and EDITOR
30569	environment variables for the default editor
30570	* mh/repl.c (opt_handler, make_draft): Handle --fcc
30571	* mh/rmf.c (main): Fix coredump if invoked with no options.
30572	* mh/send.c (check_file): Change format of the mesg_list entries.
30573	(fix_fcc): Correctly handle comma-delimited lists of folders.
30574	(backup_file): New function.
30575	(_action_send): Rename draft file after sending it.
30576	* NEWS: Update.
30577
305782006-05-17  Sergey Poznyakoff  <gray@gnu.org.ua>
30579
30580	* mh/send.c (_action_send): Use %z instead of %Z to form Date
30581	header.
30582
30583	* NEWS: Update
30584	* doc/texinfo/mu-mh.texi: Minor fix
30585	* mh/ali.c, mh/burst.c, mh/comp.c, mh/compcommon.c, mh/fmtcheck.c,
30586	mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c, mh/mh_alias.l,
30587	mh/mh_alias.y, mh/mh_argp.c, mh/mh_ctx.c, mh/mh_fmtgram.y,
30588	mh/mh_format.c, mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c,
30589	mh/mh_stream.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhl.c, mh/mhn.c,
30590	mh/pick.c, mh/pick.y, mh/refile.c, mh/repl.c, mh/rmf.c, mh/scan.c,
30591	mh/send.c, mh/sortm.c: Remove mh_error function, use mu_error
30592	instead.
30593
30594	* mh/folder.c: Improve compatibility with nmh: if a folder is
30595	specified along with -all, set the recursion depth to 2 (unless
30596	-recurse has also been given).
30597	(print_header,print_total): Default to -1
30598	(recurse): Removed in favor of max_depth.
30599	(has_folder,max_depth): New variable.
30600	(OPTION_IS_SET): New macro.
30601	(opt_handler): Updated for new variable usage.
30602	(_scan): Depth argument is now size_t
30603	Take into account max_depth.
30604	(action_print): Use OPTION_IS_SET with the three-state variables
30605	(main): Properly set/clear show_all and max_depth.
30606
306072006-05-16  Sergey Poznyakoff  <gray@gnu.org.ua>
30608
30609	* mh/folder.c (opt_handler): Allow -noheader and -nototal to be
30610	used with -all.
30611	* mh/mh_init.c (mh_error): Moved from mh_error.c
30612	* mh/Makefile.am (libmh_a_SOURCES): Remove mh_error.c
30613	* mh/mh_error.c: Removed
30614
306152006-05-15  Sergey Poznyakoff  <gray@gnu.org.ua>
30616
30617	* mh/folder.c (_scan): Bugfix
30618	* mh/mh.h (mh_makedir): New function
30619	* mh/mh_init.c (mh_makedir): New function
30620	(mh_check_folder): Use mh_makedir to create directories (or
30621	directory hierarchies).
30622	* NEWS: Update
30623
306242006-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
30625
30626	* mh/folder.c (_scan): Test for existence of the folder even if
30627	--fast was given. Exit with code 1 if the folder does not exist.
30628
306292006-04-26  Sergey Poznyakoff  <gray@gnu.org.ua>
30630
30631	* doc/texinfo/mu-mh.texi: New file
30632	* doc/texinfo/programs.texi: Update
30633	* doc/texinfo/Makefile.am (mailutils_TEXINFOS): Add mu-mh.texi
30634	(info_TEXINFOS): Remove muint.texi
30635
30636	* mh/README: Removed. Documentation moved to its proper place in
30637	mailutils.info.
30638
30639	* Makefile.am (SUBDIRS): Remove intl
30640	* configure.ac: Require external gettext
30641	Always define GNULIB_ARGP_EXTERN_BASENAME
30642	* config/Makefile.am (AM_CPPFLAGS): Removed
30643	* mailbox/Makefile.am: Likewise
30644	* movemail/Makefile.am: Likewise
30645	* include/mailutils/address.h (mu_address_set_personal)
30646	(mu_address_set_comments): New functions
30647	* mailbox/address.c: Likewise
30648	* mailbox/sendmail.c: Add extra debug info
30649	* mh/mh.h: Include <argp-namefrob.h>
30650	* mh/mh_getopt.c: Likewise
30651	* mh/mh_alias.y (mh_alias_get_internal): Set `inclusive'
30652	only if the alias matches
30653	(mh_alias_get_address): Initialize incl
30654	Use mu_address_set_personal to handle alias inclusion
30655	* mh/mh_whom.c (mh_alias_expand): Initialize incl
30656
306572006-04-22  Sergey Poznyakoff  <gray@gnu.org.ua>
30658
30659	* NEWS, README: Updated
30660
30661	* configure.ac: Minor change
30662	* guimb/scm/Makefile.am (sieve.scm): Use auxiliary sed script to
30663	create.
30664	(pkgdata_DATA): Rename to sievemod_DATA
30665	* guimb/scm/redirect.scm: Use handle-exception where necessary
30666	* guimb/scm/reject.scm: Likewise.
30667	* guimb/scm/vacation.scm: Likewise.
30668
30669	* guimb/scm/sieve-core.scm: Rewrite as module. Change
30670	initialization of the syntax tables.
30671	(handle-exception,sieve-verbose-print): New macro
30672	(action-fileinto,action-keep,action-stop,action-discard): Produce
30673	verbose diagnostics if required.
30674	(sieve-run): Take thunk as an argument. Report implicit keep if it
30675	returns #t and the verbose mode is on.
30676	(sieve-main): Take thunk as an argument.
30677	* guimb/scm/sieve.scm.in: Load sieve-core as a module.
30678	Do not use make-shared-substring. Change
30679	initialization of the syntax tables. Construct the code so, that
30680	it returns #t if implicit keep is performed, pass the code as an
30681	argument to sieve-main.
30682	Fix handling of command line arguments when executing the compiled
30683	code (call without -o option).
30684	(lex-error,syntax-error): Rewritten
30685	(sieve-preprocess-arguments): Correctly handle #:comparator
30686	tags
30687	(sieve-parse-arguments): Fix handling of keywords (did not work with
30688	Guile 1.6.x)
30689	(sieve-parse-test): Bugfix 1: Some tests are not procedures.
30690	Bugfix 2: Do not ignore last test in allof, anyof constructs
30691	(sieve-save-program): Rewrite using with-output-to-file
30692	(grammar): New option --verbose.
30693
30694	* include/mailutils/guile.h: Update
30695	* libmu_scm/Makefile.am (pkgdata_DATA): Rename to site_DATA
30696	* libmu_scm/mailutils.scm.in: Change module definition
30697
30698	* libmu_scm/mu_message.c: Throw exceptions on errors.
30699	* libmu_scm/mu_scm.c (mu-strerror): New function
30700	* libmu_scm/mu_scm.h: Include mailutils/errno.h
30701	* m4/guile.m4: New option --with-guiledir. AC_SUBST all GUILE_.*
30702	variables. Use $GUILE_CONFIG instead of guile-config.
30703
307042006-04-20  Sergey Poznyakoff  <gray@gnu.org.ua>
30705
30706	* guimb/scm/sieve-core.scm: Always load mailutils module
30707	(sieve-main): Use (mu-mail-directory) instead of mu-path-maildir.
30708	* include/mailutils/guile.h: Add support for Guile 1.8
30709	(mu_scm_error): New function
30710	* include/mailutils/mutil.h (mu_spawnvp): Change type of the 2nd
30711	argument.
30712	* libmu_scm/mailutils.scm.in (mu-libs): Use "libmailutils" instead
30713	of "libmailbox"
30714	* libmu_scm/mu_address.c: Rewritten using Guile 1.8 API.
30715	Throw 'mailutils-error instead of returning #f on error.
30716	* libmu_scm/mu_body.c: Likewise
30717	* libmu_scm/mu_logger.c: Likewise
30718	* libmu_scm/mu_mailbox.c: Likewise
30719	* libmu_scm/mu_message.c: Likewise
30720	* libmu_scm/mu_mime.c: Likewise
30721	* libmu_scm/mu_port.c: Likewise
30722	* libmu_scm/mu_scm.c: Likewise
30723	* libmu_scm/mu_util.c: Likewise
30724
30725	* libproto/imap/mbox.c (imap_envelope_date): bugfix
30726	* mailbox/amd.c [WITH_PTHREAD][HAVE_PTHREAD_H]: Fix typo
30727	* mailbox/locker.c (lock_external): Minor fix
30728	* mailbox/mutil.c (mu_spawnvp): Change type of the 2nd argument.
30729
307302006-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
30731
30732	* NEWS: Update
30733	* gnulib.modules (muaux): Remove xstrtol
30734	* libproto/pop/mbox.c (parse_answer0,parse_answer1): Use strtoul
30735	instead of strtoumax. This is a temporary change.
30736	* m4/gnulib.m4: Remove gl_XSTRTOL.
30737	* m4/xstrtol.m4: Removed
30738	* lib/xstrtol.h: Removed
30739	* lib/xstrtol.c: Removed
30740	* lib/xstrtoul.c: Removed
30741
30742	* NEWS: Update
30743	* README: Document --with-berkeley-db option
30744	* configure.ac (--with-berkeley-db): New option
30745	(--with-db2): Deprecated. Remove from the help list.
30746	Raise version number to 0.6.94
30747
30748	* lib/mu_dbm.c: Add support for Berkeley DB >= 3
30749	* lib/mu_dbm.h: Likewise
30750	* pop3d/popauth.c: Likewise
30751	* mailbox/nls.c: Include stdlib.h
30752
30753	* doc/texinfo/address.texi, doc/texinfo/attribute.texi,
30754	doc/texinfo/auth.texi, doc/texinfo/body.texi,
30755	doc/texinfo/envelope.texi, doc/texinfo/folder.texi,
30756	doc/texinfo/framework.texi, doc/texinfo/headers.texi,
30757	doc/texinfo/imap4.texi, doc/texinfo/iterator.texi,
30758	doc/texinfo/libsieve.texi, doc/texinfo/locker.texi,
30759	doc/texinfo/mailbox.texi, doc/texinfo/mailcap.texi,
30760	doc/texinfo/mailer.texi, doc/texinfo/mbox.texi,
30761	doc/texinfo/message.texi, doc/texinfo/mime.texi,
30762	doc/texinfo/nntp.texi, doc/texinfo/parse822.texi,
30763	doc/texinfo/pop3.texi, doc/texinfo/smtp.texi,
30764	doc/texinfo/stream.texi, doc/texinfo/url.texi: Reflect namespace
30765	changes.
30766
307672006-04-05  Sergey Poznyakoff  <gray@gnu.org.ua>
30768
30769	* THANKS: Add Willem Jaap Zwart
30770	* NEWS: Update
30771	* imap4d/imap4d.h (is_atom): New function
30772	* imap4d/list.c (print_file,print_dir): Rewrite using an
30773	auxiliary function. Make sure the string is properly quoted if it
30774	is not a valid atom.
30775	* imap4d/util.c (is_atom): New function.
30776	* libproto/imap/folder.c (list_copy): Do nothing if src is NULL.
30777	(imap_list): Use mu_argcv_get instead of strtok_r to parse last
30778	two tokens of the reply, so that file names containing white space
30779	are processed.
30780	* mailbox/argcv.c: Fix indentation.
30781
307822006-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
30783
30784	* imap4d/append.c, imap4d/fetch.c, libproto/imap/mbox.c,
30785	libproto/mbox/mbox.c, libsieve/actions.c, mailbox/message.c,
30786	mailbox/message_stream.c, mh/mh_init.c, mh/send.c: Use mu_strftime
30787	* include/mailutils/envelope.h (MU_ENVELOPE_DATE_FORMAT)
30788	(MU_ENVELOPE_DATE_LENGTH): New defines
30789	* include/mailutils/mutil.h (mu_strftime): New function
30790	* include/mailutils/nls.h (mu_set_locale,mu_restore_locale): New
30791	functions
30792	* mailbox/mutil.c (mu_strftime): New function
30793	* mailbox/nls.c (mu_locale_set): New variable
30794	(mu_set_locale,mu_restore_locale): New functions
30795	(mu_init_nls): Use mu_set_locale. Store its return in mu_locale_set.
30796
30797	* scripts/generr.awk: Report error if no output lines were
30798	produced.
30799
308002006-03-03  Sergey Poznyakoff  <gray@gnu.org.ua>
30801
30802	* Makefile.am (SUBDIRS): Add libproto
30803	* configure.ac: Define MU_LIB_.* variables
30804	(MU_AUTHLIBS): Initialize to empty value.
30805	(AC_CONFIG_FILES): Add libproto Makefiles
30806
30807	* libproto: New directory
30808	* libproto/Makefile.am: New file
30809	* libproto/imap: New directory
30810	* libproto/include: New directory
30811	* libproto/maildir: New directory
30812	* libproto/mbox: New directory
30813	* libproto/mh: New directory
30814	* libproto/nntp: New directory
30815	* libproto/pop: New directory
30816
30817	* mailbox/imap/folder.c, mailbox/imap/mbox.c, mailbox/imap/url.c,
30818	mailbox/imap/Makefile.am, mailbox/imap/.cvsignore: Move to
30819	libproto/imap
30820
30821	* mailbox/include/address0.h, mailbox/include/amd.h,
30822	mailbox/include/attribute0.h, mailbox/include/auth0.h,
30823	mailbox/include/body0.h, mailbox/include/debug0.h,
30824	mailbox/include/envelope0.h, mailbox/include/filter0.h,
30825	mailbox/include/folder0.h, mailbox/include/header0.h,
30826	mailbox/include/imap0.h, mailbox/include/iterator0.h,
30827	mailbox/include/list0.h, mailbox/include/mailbox0.h,
30828	mailbox/include/mailer0.h, mailbox/include/message0.h,
30829	mailbox/include/mime0.h, mailbox/include/monitor0.h,
30830	mailbox/include/observer0.h, mailbox/include/property0.h,
30831	mailbox/include/registrar0.h, mailbox/include/stream0.h,
30832	mailbox/include/url0.h, mailbox/include/Makefile.am,
30833	mailbox/include/.cvsignore: Move to libproto/include
30834
30835	* mailbox/maildir/folder.c, mailbox/maildir/maildir.h,
30836	mailbox/maildir/mbox.c, mailbox/maildir/Makefile.am,
30837	mailbox/maildir/.cvsignore: Move to libproto/maildir
30838
30839	* mailbox/mbox/folder.c, mailbox/mbox/mbox.c,
30840	mailbox/mbox/mbox0.h, mailbox/mbox/mboxscan.c, mailbox/mbox/url.c,
30841	mailbox/mbox/Makefile.am, mailbox/mbox/.cvsignore: Move to
30842	libproto/mbox.
30843
30844	* mailbox/mh/folder.c, mailbox/mh/mbox.c, mailbox/mh/Makefile.am,
30845	mailbox/mh/.cvsignore: Move to libproto/mh
30846
30847	* mailbox/nntp/folder.c, mailbox/nntp/mbox.c,
30848	mailbox/nntp/nntp0.h, mailbox/nntp/nntp_article.c,
30849	mailbox/nntp/nntp_body.c, mailbox/nntp/nntp_carrier.c,
30850	mailbox/nntp/nntp_connect.c, mailbox/nntp/nntp_create.c,
30851	mailbox/nntp/nntp_date.c, mailbox/nntp/nntp_debug.c,
30852	mailbox/nntp/nntp_destroy.c, mailbox/nntp/nntp_disconnect.c,
30853	mailbox/nntp/nntp_group.c, mailbox/nntp/nntp_head.c,
30854	mailbox/nntp/nntp_help.c, mailbox/nntp/nntp_ihave.c,
30855	mailbox/nntp/nntp_iterator.c, mailbox/nntp/nntp_last.c,
30856	mailbox/nntp/nntp_list_active.c,
30857	mailbox/nntp/nntp_list_distribpats.c,
30858	mailbox/nntp/nntp_list_distributions.c,
30859	mailbox/nntp/nntp_list_extensions.c,
30860	mailbox/nntp/nntp_list_newsgroups.c,
30861	mailbox/nntp/nntp_list_times.c, mailbox/nntp/nntp_mode_reader.c,
30862	mailbox/nntp/nntp_newgroups.c, mailbox/nntp/nntp_newnews.c,
30863	mailbox/nntp/nntp_next.c, mailbox/nntp/nntp_post.c,
30864	mailbox/nntp/nntp_quit.c, mailbox/nntp/nntp_readline.c,
30865	mailbox/nntp/nntp_response.c, mailbox/nntp/nntp_sendline.c,
30866	mailbox/nntp/nntp_stat.c, mailbox/nntp/nntp_stream.c,
30867	mailbox/nntp/nntp_timeout.c, mailbox/nntp/url.c,
30868	mailbox/nntp/Makefile.am, mailbox/nntp/.cvsignore: Move to
30869	libproto/nntp
30870
30871	* mailbox/pop/folder.c, mailbox/pop/mbox.c,
30872	mailbox/pop/pop3_apop.c, mailbox/pop/pop3_capa.c,
30873	mailbox/pop/pop3_carrier.c, mailbox/pop/pop3_connect.c,
30874	mailbox/pop/pop3_create.c, mailbox/pop/pop3_debug.c,
30875	mailbox/pop/pop3_dele.c, mailbox/pop/pop3_destroy.c,
30876	mailbox/pop/pop3_disconnect.c, mailbox/pop/pop3_iterator.c,
30877	mailbox/pop/pop3_list.c, mailbox/pop/pop3_lista.c,
30878	mailbox/pop/pop3_noop.c, mailbox/pop/pop3_pass.c,
30879	mailbox/pop/pop3_quit.c, mailbox/pop/pop3_readline.c,
30880	mailbox/pop/pop3_response.c, mailbox/pop/pop3_retr.c,
30881	mailbox/pop/pop3_rset.c, mailbox/pop/pop3_sendline.c,
30882	mailbox/pop/pop3_stat.c, mailbox/pop/pop3_stls.c,
30883	mailbox/pop/pop3_stream.c, mailbox/pop/pop3_timeout.c,
30884	mailbox/pop/pop3_top.c, mailbox/pop/pop3_uidl.c,
30885	mailbox/pop/pop3_uidla.c, mailbox/pop/pop3_user.c,
30886	mailbox/pop/url.c, mailbox/pop/Makefile.am,
30887	mailbox/pop/.cvsignore: Move to libproto/pop.
30888
30889	* auth/Makefile.am, comsat/Makefile.am, config/Makefile.am,
30890	dotlock/Makefile.am, examples/Makefile.am, frm/Makefile.am,
30891	guimb/Makefile.am, imap4d/Makefile.am, libmu_scm/Makefile.am,
30892	libsieve/Makefile.am, libsieve/extensions/Makefile.am,
30893	mail/Makefile.am, mail.local/Makefile.am, mail.remote/Makefile.am,
30894	mailbox/Makefile.am, mapi/Makefile.am, messages/Makefile.am,
30895	mh/Makefile.am, mimeview/Makefile.am, movemail/Makefile.am,
30896	pop3d/Makefile.am, readmsg/Makefile.am, sieve/Makefile.am: Use
30897	MU_LIB_.* variables instead of referring to the libraries by their
30898	relative paths.
30899
30900	* po/POTFILES.in: Update
30901
30902	* mailbox/amd.c: Protect definition of _XOPEN_SOURCE by an extra
30903	ifdef.
30904	* libsieve/extensions/vacation.c (regex_comparator): Fix error
30905	diagnostics
30906	* mail/mail.h (cursor): Fix declaration
30907
30908	* mailbox/Makefile.am: Fix INCLUDES and SUBDIRS
30909	* mailbox/filter_trans.c (base64_encode): Split into two
30910	functions.
30911	(B_encode): New function for RFC 2047 encoding
30912	* mailbox/rfc2047.c: Minor indentation fix
30913	* mh/mhn.c (finish_msg): Make sure part header is preserved.
30914
309152006-02-24  Sergey Poznyakoff  <gray@gnu.org.ua>
30916
30917	* auth/Makefile.am, libmu_cpp/Makefile.am, libmu_scm/Makefile.am,
30918	mailbox/imap/Makefile.am, mailbox/maildir/Makefile.am,
30919	mailbox/mbox/Makefile.am, mailbox/mh/Makefile.am,
30920	mailbox/nntp/Makefile.am, mailbox/pop/Makefile.am,
30921	mapi/Makefile.am: Set version info
30922	* mailbox/Makefile.am: Compile libmailutils first, then recurse
30923	into the subdirs.
30924	* m4/guile.m4: Use improved sed expression, proposed by Thien-Thi
30925	Nguyen.
30926
309272006-02-17  Sergey Poznyakoff  <gray@gnu.org.ua>
30928
30929	* NEWS: Update
30930
30931	* mh/mhn.c (split_args): New function
30932	(_message_is_external_body ): Use split_args to parse
30933	additional arguments
30934	(mhn_edit): Fix invocation of edit_modify (was not getting
30935	additional arguments after ';')
30936	(parse_header_directive): New function
30937	(mhn_header): New function
30938	(mhn_compose): Bugfix: initialize env.line
30939	Call mhn_header to optionally encode Subject line
30940
30941	* mailbox/rfc2047.c (mu_rfc2047_encode): Return EINVAL if any of
30942	the arguments is NULL.
30943
30944	* frm/common.c (get_personal): Fix coredump on empty From: headers.
30945
309462006-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
30947
30948	* mailbox/message_stream.c (restore_envelope): Restore line
30949	accidentally deleted with the recent changes.
30950
309512006-02-08  Sergey Poznyakoff  <gray@gnu.org.ua>
30952
30953	Fix displaying source locations in Sieve action logs:
30954
30955	* libsieve/prog.c (sieve_change_source)
30956	(sieve_check_source_changed): New functions
30957	(sieve_code_action,sieve_code_test): Call
30958	sieve_check_source_changed.
30959	* libsieve/sieve.h (sieve_change_source): New function
30960	* libsieve/sieve.l (push_source,pop_source): Do not code
30961	SOURCE instruction directly, use sieve_change_source() to let the
30962	code generator know it should do it.
30963
30964	Fix build on platforms without program_invocation_short_name:
30965
30966	* mailbox/Makefile.am (AM_CFLAGS): Use AM_CPPFLAGS instead.
30967	* config/Makefile.am, movemail/Makefile.am (AM_CPPFLAGS): Add
30968	GNULIB_ARGP_EXTERN_BASENAME=1
30969	* config/mailutils-config.c, movemail/movemail.c: Include
30970	argp-namefrob.h
30971
309722006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
30973
30974	* mailbox/stream.c (mu_stream_getline)
30975	(mu_stream_sequential_getline): New function
30976
30977	* mailbox/message_stream.c (_mu_rfc822_open, restore_envelope): Use
30978	mu_stream_getline
30979
30980	* include/mailutils/stream.h (mu_stream_getline)
30981	(mu_stream_sequential_getline): New function
30982
30983	* include/mailutils/libsieve.h (mu_sieve_machine_inherit_report):
30984	Replace by mu_sieve_machine_inherit
30985	* libsieve/sieve.y: Likewise
30986	* libsieve/extensions/moderator.c: Likewise.
30987	* libsieve/extensions/vacation.c: Fix the leading comment.
30988	* mailbox/argp-namefrob.h: Restored changes accidentally lost in
30989	gnulib.
30990
309912006-02-06  Sergey Poznyakoff  <gray@gnu.org.ua>
30992
30993	* NEWS: Raise version number to 0.6.93
30994	* include/mailutils/libsieve.h (mu_sieve_machine_dup)
30995	(mu_sieve_machine_inherit_report): New functions
30996	* include/mailutils/message.h (mu_stream_to_message): New
30997	function.
30998	* include/mailutils/mutil.h (mu_mh_delim): New function
30999	* libsieve/actions.c: Minor stylistic changes
31000	* libsieve/require.c: Likewise
31001	* libsieve/sieve.h: Likewise
31002	* libsieve/sieve.y (mu_sieve_machine_inherit_report)
31003	(mu_sieve_machine_dup): New functions
31004	* libsieve/util.c: Minor stylistic changes
31005	* libsieve/extensions/moderator.c: New file. Automatic moderator
31006	for Mailman-driven mailing lists.
31007	* libsieve/extensions/Makefile.am: Add moderator module
31008
31009	* mailbox/message_stream.c: New file. Derived from mh/mh_stream.c
31010	* mailbox/Makefile.am: Add message_stream.c
31011	* mailbox/mutil.c (mu_mh_delim): New function
31012	* mh/mh_stream.c: Rewritten using mu_stream_to_message. Actually,
31013	the source can be removed now and the function moved elsewhere,
31014	e.g. to mh_init...
31015	* sieve/sieve.c (main): Register all mailbox/mailer formats.
31016
310172006-01-27  Sergey Poznyakoff  <gray@gnu.org.ua>
31018
31019	* mh/comp.c: Fix semantics of -build/-draftmessage/-[no]draftfolder
31020	options for compatibility with other implementations of MH
31021	* mh/forw.c: Likewise
31022	* mh/whatnow.c: Likewise
31023	* mh/repl.c: Likewise
31024	* mh/compcommon.c: Bugfix.
31025	* mh/mh.h (mh_draft_message): New prototype.
31026	(xmalloc,xrealloc): Remove prototypes
31027	* mh/mh_argp.c (parse_opt): Pass ARGP_KEY_INIT to the application
31028	handler.
31029	* mh/mh_init.c (mh_draft_message): New function
31030	* mh/mh_whatnow.c (quit): Don't call rename if both file and
31031	draftfile are the same.
31032
31033	* imap4d/select.c (imap4d_select0): Fix status display.
31034
310352006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
31036
31037	* imap4d/select.c (imap4d_select0): Create INBOX if it does not
31038	exist.
31039
31040	* mailbox/Makefile.am (AM_CFLAGS): Define
31041	GNULIB_ARGP_EXTERN_BASENAME
31042	* mailbox/argp-namefrob.h: Bugfix (stray #)
31043	* mailbox/mutil.c (__argp_base_name): New function
31044
31045	* THANKS: Add Helmut Leitner.
31046	* mail/mail.c (parse_opt): Try to catch arguments separated from
31047	the option by whitespace. Solution proposed by Helmut Leitner.
31048	Avoid queueing multiple "set mode=send" options.
31049
31050	* sql/mysql.c (connect): Initialize socket_name to NULL
31051
31052	* include/mailutils/compat.h (registrar_lookup): Define to
31053	mu_0_6_registrar_lookup
31054	* include/mailutils/mailbox.h (mu_mailbox_set_default_proto)
31055	(mu_mailbox_get_default_proto): New prototypes.
31056	* include/mailutils/registrar.h (mu_registrar_lookup): Changed
31057	declaration.
31058	(mu_0_6_registrar_lookup): New prototype.
31059	* mailbox/mailbox.c (mu_mailbox_set_default_proto)
31060	(mu_mailbox_get_default_proto): New functions.
31061	(mu_mailbox_create): Append default_proto to the mailbox URL, if
31062	the latter does not already contain one.
31063	Update invocation of mu_registrar_lookup
31064
31065	* mailbox/mbx_default.c (tilde_expand): Remove
31066	(mu_mailbox_create_default): Use  mu_tilde_expansion instead of
31067	tilde_expand
31068
31069	* mailbox/mu_argp.c (mu_mailbox_argp_option)
31070	(mu_common_argp_parser): New option --mailbox-type
31071	* mailbox/mutil.c (mu_tilde_expansion): Expand tilde after
31072	the protocol specification.
31073
31074	* mailbox/registrar.c (mu_registrar_lookup): Return error
31075	code. Use an extra argument to return the flags.
31076	(mu_0_6_registrar_lookup): New function for compatibility with
31077	previous versions.
31078
31079	* mailbox/folder.c: Update invocations of mu_registrar_lookup
31080	* mailbox/mailer.c: Likewise
31081	* mailbox/mbox/folder.c: Likewise.
31082
31083	* NEWS: Update
31084
310852006-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>
31086
31087	* mh/mh_ctx.c (mh_context_read): Allow for empty lines and
31088	conventional comment characters ('#') in the context file.
31089	* mh/mh_init.c (mh_is_my_name): Bugfix: do not use strtok_r, which
31090	modifies its argument.
31091
31092	* include/mailutils/header.h (MU_HEADER_X_MAILER): New define
31093	* mail/send.c (mail_send0): Use MU_HEADER_X_MAILER
31094	* mh/replcomps: Remove X-Mailer. Send will add it if needed.
31095	* mh/replgroupcomps: Likewise
31096	* mh/send.c (read_mts_profile): Support localname and localdomain
31097	variables.
31098	(read_mts_profile): Support x-mailer variable.
31099	* NEWS: Updated
31100
311012006-01-23  Sergey Poznyakoff  <gray@gnu.org.ua>
31102
31103	* mail/mail.h (exec_compl): New prototype
31104	* mail/mailline.c (ml_command_completion): Fix coredump
31105	(exec_compl,exec_generator): New functions
31106	* mail/table.c: Use exec_compl to complete first argument to !
31107
31108	* mailbox/parse822.c (mu_parse822_time): Assume UTC for invalid or
31109	unknown timezones.
31110
311112006-01-20  Sergey Poznyakoff  <gray@gnu.org.ua>
31112
31113	Sources before this point are tagged alpha_0_6_92
31114
31115	* mailbox/mu_umaxtostr.c: New file
31116	* mailbox/mu_umaxtostr.h: New file
31117
31118	* configure.ac: Remove HAVE_DECL_PROGRAM_INVOCATION_NAME hack,
31119	newer argp does that itself.
31120	Raise version number to 0.6.93
31121	* gnulib.modules (mailutils): Add inttostr
31122	* examples/Makefile.am, imap4d/Makefile.am,
31123	libsieve/extensions/Makefile.am, pop3d/Makefile.am  (AM_LDFLAGS):
31124	Load libmuaux before libmailutils.
31125
31126	* mailbox/imap/Makefile.am (libmu_imap_la_LIBADD): New variable
31127	* mailbox/pop/Makefile.am (libmu_pop_la_LIBADD): New variable
31128
31129	* examples/muemail.c: Include stdlib.h
31130
31131	* imap4d/fetch.c, imap4d/imap4d.c, imap4d/search.c,
31132	mailbox/daemon.c, mailbox/message.c, mailbox/imap/mbox.c,
31133	mh/burst.c, mh/compcommon.c, mh/folder.c, mh/forw.c,
31134	mh/mh_global.c, mh/mh_msgset.c, mh/mh_sequence.c, mh/mhn.c,
31135	mh/mhpath.c, mh/pick.c, mh/repl.c, mh/sortm.c, pop3d/apop.c,
31136	pop3d/capa.c, pop3d/dele.c, pop3d/list.c, pop3d/logindelay.c,
31137	pop3d/pop3d.c, pop3d/stat.c, pop3d/uidl.c, pop3d/user.c: Use
31138	mu_umaxtostr to format size_t and off_t values
31139
31140	* imap4d/imap4d.h, libmu_scm/mu_port.c, mh/mh.h, pop3d/pop3d.h:
31141	Include mu_umaxtostr.h
31142
31143	* mh/mh_format.c: Recognize EET and EEST time zones
31144
31145	* mailbox/pop/mbox.c: Fix parsing of pop3 server replies.
31146	Use mu_umaxtostr to format size_t and off_t values
31147
31148	* mailbox/imap/folder.c: Add gettext markers
31149	* mailbox/mbox/mbox.c: Likewise
31150	* mailbox/mbox/mbox0.h: Include mailutils/nls.h
31151
31152	* mail/set.c, mail/unset.c, mail/mail.h,
31153	mail/util.c (util_printenv): Change return type to void.
31154	All callers updated.
31155
31156	* mail.local/mail.local.h: Define USE_MAILBOX_QUOTAS after
31157	including mu_dbm.h
31158	* mail.local/mailquota.c: Issue error message if unable to open
31159	the database.
31160
31161	* mailbox/Makefile.am (AM_CFLAGS): Define
31162	GNULIB_ARGP_DISABLE_DIRNAME
31163	(EXTRA_DIST): Remove pin.c
31164
31165	* po/POTFILES.in: Updated. Sorted alphabetically
31166
31167	* scripts/gnulib-sync (expand_modules): Implement 'avoid' feature.
31168	Avoid expanding dirname into mailbox/, since it drags xalloc with
31169	it.
31170
31171	Update by gnulib-sync.
31172
31173	* lib/fnmatch.c: Updated
31174	* lib/malloc.c: Updated
31175	* lib/strcasecmp.c: Updated
31176	* lib/strncasecmp.c: Updated
31177	* m4/gnulib.m4: Updated
31178	* m4/xstrtol.m4: Updated
31179
31180	* lib/allocsa.c: Updated
31181	* lib/allocsa.h: Updated
31182	* lib/allocsa.valgrind: Updated
31183	* lib/asprintf.c: Updated
31184	* lib/error.c: Updated
31185	* lib/error.h: Updated
31186	* lib/exit.h: Updated
31187	* lib/exitfail.c: Updated
31188	* lib/exitfail.h: Updated
31189	* lib/getpass.c: Updated
31190	* lib/getpass.h: Updated
31191	* lib/mbswidth.c: Updated
31192	* lib/mbswidth.h: Updated
31193	* lib/obstack.c: Updated
31194	* lib/obstack.h: Updated
31195	* lib/realloc.c: Updated
31196	* lib/setenv.c: Updated
31197	* lib/setenv.h: Updated
31198	* lib/snprintf.c: Updated
31199	* lib/snprintf.h: Updated
31200	* lib/unsetenv.c: Updated
31201	* lib/vasprintf.c: Updated
31202	* lib/vasprintf.h: Updated
31203	* lib/xalloc-die.c: Updated
31204	* lib/xalloc.h: Updated
31205	* lib/xmalloc.c: Updated
31206	* lib/xsize.h: Updated
31207	* m4/alloca.m4: Updated
31208	* m4/allocsa.m4: Updated
31209	* m4/argp.m4: Updated
31210	* m4/d-type.m4: Updated
31211	* m4/eealloc.m4: Updated
31212	* m4/eoverflow.m4: Updated
31213	* m4/error.m4: Updated
31214	* m4/exitfail.m4: Updated
31215	* m4/extensions.m4: Updated
31216	* m4/fnmatch.m4: Updated
31217	* m4/getdelim.m4: Updated
31218	* m4/getline.m4: Updated
31219	* m4/getlogin_r.m4: Updated
31220	* m4/getopt.m4: Updated
31221	* m4/getpass.m4: Updated
31222	* m4/glob.m4: Updated
31223	* m4/intmax_t.m4: Updated
31224	* m4/inttostr.m4: Added to the repository
31225	* m4/inttypes.m4: Updated
31226	* m4/inttypes_h_gl.m4: Updated
31227	* m4/inttypes_h_gl.m4: Updated
31228	* m4/longdouble.m4: Updated
31229	* m4/longdouble.m4: Updated
31230	* m4/longlong_gl.m4: Updated
31231	* m4/longlong_gl.m4: Updated
31232	* m4/mbchar.m4: Updated
31233	* m4/mbiter.m4: Updated
31234	* m4/mbrtowc.m4: Updated
31235	* m4/mbrtowc.m4: Updated
31236	* m4/mbstate_t.m4: Updated
31237	* m4/mbstate_t.m4: Updated
31238	* m4/mbswidth.m4: Updated
31239	* m4/md5.m4: Updated
31240	* m4/memchr.m4: Updated
31241	* m4/mempcpy.m4: Updated
31242	* m4/minmax.m4: Updated
31243	* m4/obstack.m4: Updated
31244	* m4/onceonly.m4: Updated
31245	* m4/onceonly.m4: Updated
31246	* m4/regex.m4: Updated
31247	* m4/restrict.m4: Updated
31248	* m4/setenv.m4: Updated
31249	* m4/signed.m4: Updated
31250	* m4/size_max.m4: Updated
31251	* m4/snprintf.m4: Updated
31252	* m4/stat-macros.m4: Updated
31253	* m4/stdbool.m4: Updated
31254	* m4/stdint.m4: Updated
31255	* m4/stdint_h_gl.m4: Updated
31256	* m4/stdint_h_gl.m4: Updated
31257	* m4/strcase.m4: Updated
31258	* m4/strchrnul.m4: Updated
31259	* m4/strdup.m4: Updated
31260	* m4/strerror_r.m4: Updated
31261	* m4/strndup.m4: Updated
31262	* m4/strnlen.m4: Updated
31263	* m4/strtok_r.m4: Updated
31264	* m4/sysexits.m4: Updated
31265	* m4/uintmax_t_gl.m4: Updated
31266	* m4/uintmax_t_gl.m4: Updated
31267	* m4/ulonglong_gl.m4: Updated
31268	* m4/ulonglong_gl.m4: Updated
31269	* m4/vasnprintf.m4: Updated
31270	* m4/vasprintf.m4: Updated
31271	* m4/vsnprintf.m4: Updated
31272	* m4/wchar_t.m4: Updated
31273	* m4/wint_t.m4: Updated
31274	* m4/xalloc.m4: Updated
31275	* m4/xsize.m4: Updated
31276	* m4/xsize.m4: Updated
31277	* mailbox/alloca.c: Updated
31278	* mailbox/alloca_.h: Updated
31279	* mailbox/argp-ba.c: Updated
31280	* mailbox/argp-eexst.c: Updated
31281	* mailbox/argp-fmtstream.c: Updated
31282	* mailbox/argp-fmtstream.h: Updated
31283	* mailbox/argp-fs-xinl.c: Updated
31284	* mailbox/argp-help.c: Updated
31285	* mailbox/argp-namefrob.h: Updated
31286	* mailbox/argp-parse.c: Updated
31287	* mailbox/argp-pin.c: Added to the repository
31288	* mailbox/argp-pv.c: Updated
31289	* mailbox/argp-pvh.c: Updated
31290	* mailbox/argp-xinl.c: Updated
31291	* mailbox/argp.h: Updated
31292	* mailbox/asnprintf.c: Updated
31293	* mailbox/fnmatch.c: Updated
31294	* mailbox/fnmatch_.h: Updated
31295	* mailbox/fnmatch_loop.c: Updated
31296	* mailbox/getdelim.c: Updated
31297	* mailbox/getdelim.h: Updated
31298	* mailbox/getline.c: Updated
31299	* mailbox/getline.h: Updated
31300	* mailbox/getlogin_r.c: Updated
31301	* mailbox/getlogin_r.h: Updated
31302	* mailbox/getopt.c: Updated
31303	* mailbox/getopt1.c: Updated
31304	* mailbox/getopt_.h: Updated
31305	* mailbox/getopt_int.h: Updated
31306	* mailbox/gettext.h: Updated
31307	* mailbox/glob-libc.h: Updated
31308	* mailbox/glob.c: Updated
31309	* mailbox/glob_.h: Updated
31310	* mailbox/imaxtostr.c: Added to the repository
31311	* mailbox/intprops.h: Added to the repository
31312	* mailbox/inttostr.c: Added to the repository
31313	* mailbox/inttostr.h: Added to the repository
31314	* mailbox/malloc.c: Updated
31315	* mailbox/mbchar.c: Updated
31316	* mailbox/mbchar.h: Updated
31317	* mailbox/mbuiter.h: Updated
31318	* mailbox/md5.c: Updated
31319	* mailbox/md5.h: Updated
31320	* mailbox/memchr.c: Updated
31321	* mailbox/mempcpy.c: Updated
31322	* mailbox/mempcpy.h: Updated
31323	* mailbox/minmax.h: Updated
31324	* mailbox/offtostr.c: Added to the repository
31325	* mailbox/printf-args.c: Updated
31326	* mailbox/printf-args.h: Updated
31327	* mailbox/printf-parse.c: Updated
31328	* mailbox/printf-parse.h: Updated
31329	* mailbox/regcomp.c: Updated
31330	* mailbox/regex.c: Updated
31331	* mailbox/regex.h: Updated
31332	* mailbox/regex_internal.c: Updated
31333	* mailbox/regex_internal.h: Updated
31334	* mailbox/regexec.c: Updated
31335	* mailbox/size_max.h: Updated
31336	* mailbox/stat-macros.h: Updated
31337	* mailbox/stdbool_.h: Updated
31338	* mailbox/stdint_.h: Updated
31339	* mailbox/strcase.h: Updated
31340	* mailbox/strcasecmp.c: Updated
31341	* mailbox/strchrnul.c: Updated
31342	* mailbox/strchrnul.h: Updated
31343	* mailbox/strdup.c: Updated
31344	* mailbox/strdup.h: Updated
31345	* mailbox/strncasecmp.c: Updated
31346	* mailbox/strndup.c: Updated
31347	* mailbox/strndup.h: Updated
31348	* mailbox/strnlen.c: Updated
31349	* mailbox/strnlen.h: Updated
31350	* mailbox/strnlen1.c: Updated
31351	* mailbox/strnlen1.h: Updated
31352	* mailbox/strtok_r.c: Updated
31353	* mailbox/strtok_r.h: Updated
31354	* mailbox/sysexit_.h: Updated
31355	* mailbox/umaxtostr.c: Added to the repository
31356	* mailbox/vasnprintf.c: Updated
31357	* mailbox/vasnprintf.h: Updated
31358	* mailbox/vsnprintf.c: Updated
31359	* mailbox/vsnprintf.h: Updated
31360	* mailbox/xsize.h: Updated
31361
313622006-01-20  Sergey Poznyakoff  <gray@gnu.org.ua>
31363
31364	Fix bug reported by Ronan KERYELL <Ronan.Keryell@enstb.org>
31365	(Debian Bug#344420):
31366
31367	* mailbox/file_stream.c (_file_write): Return ENOSPC if fwrite
31368	returns 0.
31369	* mailbox/mbox/mbox.c (mbox_append_message0): Preserve return
31370	status from mu_stream_write, if it is not 0.
31371	* movemail/movemail.c (main): Exit on first detected IO
31372	error. Make sure the source mailbox is not modified if not all
31373	messages were moved successfully.
31374
31375	* THANKS: Add Ronan KERYELL
31376
31377	Support automatic home directory creation in imap4d
31378
31379	* imap4d/authenticate.c (imap4d_authenticate): Call
31380	imap4d_check_home_dir before switching to user's privileges. Bail
31381	out if it returns with an error.
31382	Use util_chdir instead of chdir to change to user's home
31383	directory.
31384	* imap4d/login.c (imap4d_login): Likewise
31385	* imap4d/imap4d.c (create_home_dir,home_dir_mode): New variables
31386	(options): New option --create-home-dir
31387	(imap4d_check_home_dir): New function
31388	* imap4d/imap4d.h (imap4d_check_home_dir,util_chdir): New
31389	prototype.
31390	* imap4d/util.c (util_chdir): New function.
31391	* doc/texinfo/programs.texi: Document --create-home-dir option.
31392	* NEWS: Update
31393
313942006-01-18  Sergey Poznyakoff  <gray@gnu.org.ua>
31395
31396	* README-alpha: Update cvs co information
31397
313982006-01-16  Sergey Poznyakoff  <gray@gnu.org.ua>
31399
31400	* NEWS: Updated
31401	* THANKS: Add Walter Neumann
31402	* doc/texinfo/programs.texi: Document inplacealiases and
31403	recursealiases.
31404	* mail/alias.c (alias_expand): Recursively expand aliases if
31405	recursealiases is set.
31406	* mail/mail.c (default_setup): Provide defaults for inplacealiases
31407	and recursealiases.
31408	* mail/mail.h (is_address_field): New prototype.
31409	* mail/send.c (compose_header_set): Check for valid arguments at
31410	the beginning of the function (value can be NULL, e.g. if the user hit
31411	C-D at Cc: prompt).
31412	Call util_merge_addresses() only if inplacealiases is set. Expand
31413	aliases before calling it.
31414	* mail/util.c (is_address_field): Remove static qualifier.
31415	(util_header_expand): Expand aliases unless inplacealiases is set.
31416	* mail/testsuite/mail/send.exp: Set inplacealiases.
31417
314182005-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
31419
31420	* lib/mu_dbm.c: Allow specifying full file name (including the
31421	suffix).
31422
314232005-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
31424
31425	* mh/comp.c, mh/forw.c, mh/repl.c: Make sure -nodraftfolder
31426	cancels Draft-Folder variable, not only -draftfolder option.
31427
314282005-12-05  Sergey Poznyakoff  <gray@gnu.org.ua>
31429
31430	* mail/util.c (util_do_command): Bugfix
31431
314322005-12-04  Sergey Poznyakoff  <gray@gnu.org.ua>
31433
31434	* imap4d/list.c (list_file,print_dir,print_file): Use
31435	mkfullname. Fixes [bug #15144].
31436
31437	* imap4d/create.c: Do not create anything and return OK if the
31438	argument is suffixed with a hierarchy separator. Fixes [bug #15142].
31439	* imap4d/status.c (imap4d_status): Flush attributes before opening
31440	the mailbox.
31441	(status_unseen): Remove superfluous condition
31442	Fixes [bug #15143].
31443
314442005-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
31445
31446	* mh/burst.c (finish_stream): Set map.first if necessary
31447	(burst_digest): Initialize eb_length
31448	(burst_rename): Skip messages that do not need to be renamed.
31449	(main): Do not process inplace if burst_count is 0
31450
31451	* include/mailutils/stream.h (mu_temp_file_stream_create): New
31452	function.
31453	* mailbox/file_stream.c: Likewise.
31454
31455	* mh/burst.c: New option --length allows to set a minimal
31456	encapsulation boundary length.
31457	(burst_digest): Take into account minimal EB length.
31458
31459	* mh/README: Update
31460	* mh/TODO: Update
31461
31462	* mh/burst.c (burst): Keep message sequence number in msgno.
31463	(burst_rename): Fix loop limits
31464	(main): Fix calculation of last_uid.
31465	Keep message sequence numbers in ms.
31466	(burst_digest): Initial implementation of RFC 934
31467
314682005-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
31469
31470	* doc/rfc/rfc934.txt: New file.
31471	* doc/rfc/Makefile.am (EXTRA_DIST): Add rfc934.txt
31472
31473	* mailbox/amd.c (amd_msg_lookup): Bugfix. Use msg_count == 0
31474	to determine if the msg_array is empty.
31475	* mailbox/mime.c (mu_mime_get_part): Set stream_size function.
31476
31477	* mh/burst.c: New file. Initial implementation of burst command.
31478	* mh/Makefile.am (PROGRAMS_MH,EXTRA_PROGRAMS): Add burst
31479	* mh/TODO: Update
31480	* mh/forw.c (msg_copy): Implement FSA described in RFC 934
31481	* mh/mh_getopt.h (enum mh_arg): New declaration, instead of
31482	multiple defines.
31483	* mh/mh_init.c (mh_expand_name): Accept names starting with mh:/
31484	protocol indicator.
31485	* mh/.cvsignore: Add burst, sort entries.
31486
314872005-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
31488
31489	* mailbox/header.c: Fix indentation
31490	* mh/mh.h (mh_context_destroy,mh_context_merge): New proto
31491	* mh/mh_ctx.c (mh_context_destroy,mh_context_merge): New
31492	functions.
31493	* mh/mh_init.c (mh_expand_name): Make sure the returned value can
31494	safely be freed.
31495	* mh/send.c (read_mts_profile): Allow .mtstailor to override
31496	system-wide configuration values.
31497
314982005-11-26  Sergey Poznyakoff  <gray@gnu.org.ua>
31499
31500	* mail/msgset.y (msgset_negate): Fix loop break condition.
31501
31502	* sieve/sieve.c (options): Add --dry-run, an alias for -n.
31503
315042005-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
31505
31506	* mail/cd.c, mh/folder.c: Fix diagnostic messages
31507
315082005-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
31509
31510	* configure.ac: Declare HAVE_DECL_PROGRAM_INVOCATION_NAME,
31511	otherwise argp-help.c can bail out at line 1693
31512	* examples/argcv.c: Temporarily include config.h to make sure
31513	replaced symbols are referenced properly.
31514	The use of config.h in example files should be reduced to minimum.
31515
31516	* auth/sql.h (sql_interface): Fix data type
31517	* include/mailutils/errno.hin: Include errno.h
31518	Provide ECANCELED if it is missing (mainly for cygwin).
31519	* mailbox/errors (MU_ERR_CANCELED): New error code.
31520
31521	* Makefile.am (EXTRA_DIST): Remove MU_EXTRA_DIST
31522	* configure.ac: Call MU_FINISH
31523	* m4/mu_libobj.m4 (MU_LIBSOURCE,MU_LIBSOURCES): Construct the list
31524	of EXTRA_DIST sources.
31525	(MU_FINISH): New defun
31526	* mailbox/Makefile.am (EXTRA_DIST): Add MU_EXTRA_DIST
31527
315282005-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
31529
31530	* configure.ac: Determine the size of off_t and define an
31531	equivalent mu_off_t type. We cannot use off_t in the library since
31532	its size depends on whether large file support is used or not,
31533	which will lead to arbitrary crashes if a user application and the
31534	library use off_t of different sizes.
31535	(MU_COMMON_INCLUDES): New substitute variable
31536
31537	* gnulib.modules (mailutils): Add glob
31538
31539	* include/mailutils/types.h: Removed
31540	* include/mailutils/types.hin: New file
31541	* include/mailutils/Makefile.am: Build types.h
31542
31543	* auth/Makefile.am (UNCLUDES): Rewritten using MU_COMMON_INCLUDES
31544	* comsat/Makefile.am: Likewise
31545	* config/Makefile.am: Likewise
31546	* dotlock/Makefile.am: Likewise
31547	* examples/Makefile.am: Likewise
31548	* frm/Makefile.am: Likewise
31549	* guimb/Makefile.am: Likewise
31550	* imap4d/Makefile.am: Likewise
31551	* lib/Makefile.am: Likewise
31552	* libmu_cpp/Makefile.am: Likewise
31553	* libmu_scm/Makefile.am: Likewise
31554	* libsieve/Makefile.am: Likewise
31555	* libsieve/extensions/Makefile.am: Likewise
31556	* mail/Makefile.am: Likewise
31557	* mail.local/Makefile.am: Likewise
31558	* mail.remote/Makefile.am: Likewise
31559	* mailbox/Makefile.am: Likewise
31560	* mailbox/imap/Makefile.am: Likewise
31561	* mailbox/maildir/Makefile.am: Likewise
31562	* mailbox/mbox/Makefile.am: Likewise
31563	* mailbox/mh/Makefile.am: Likewise
31564	* mailbox/nntp/Makefile.am: Likewise
31565	* mailbox/pop/Makefile.am: Likewise
31566	* mapi/Makefile.am: Likewise
31567	* messages/Makefile.am: Likewise
31568	* mh/Makefile.am: Likewise
31569	* mimeview/Makefile.am: Likewise
31570	* movemail/Makefile.am: Likewise
31571	* pop3d/Makefile.am: Likewise
31572	* readmsg/Makefile.am: Likewise
31573	* sieve/Makefile.am: Likewise
31574	* sql/Makefile.am: Likewise
31575
31576	* auth/tls.c: Use mu_off_t instead of off_t
31577	* examples/argcv.c: Likewise
31578	* examples/base64.c: Likewise
31579	* examples/mimetest.c: Likewise
31580	* examples/murun.c: Likewise
31581	* examples/nntpclient.c: Likewise
31582	* examples/pop3client.c: Likewise
31583	* include/mailutils/header.h: Likewise
31584	* include/mailutils/mailbox.h: Likewise
31585	* include/mailutils/stream.h: Likewise
31586	* include/mailutils/types.h: Likewise
31587	* libmu_scm/mu_port.c: Likewise
31588
31589	* mail.local/main.c: Likewise
31590	* mailbox/amd.c: Likewise
31591	* mailbox/body.c: Likewise
31592	* mailbox/file_stream.c: Likewise
31593	* mailbox/filter.c: Likewise
31594	* mailbox/filter_iconv.c: Likewise
31595	* mailbox/filter_rfc822.c: Likewise
31596	* mailbox/filter_trans.c: Likewise
31597	* mailbox/header.c: Likewise
31598	* mailbox/mailbox.c: Likewise
31599	* mailbox/mapfile_stream.c
31600	* mailbox/memory_stream.c
31601	* mailbox/message.c: Likewise
31602	* mailbox/mime.c: Likewise
31603	* mailbox/stream.c: Likewise
31604	* mailbox/tcp.c: Likewise
31605	* mailbox/imap/folder.c: Likewise
31606	* mailbox/imap/mbox.c: Likewise
31607	* mailbox/include/amd.h: Likewise
31608	* mailbox/include/filter0.h: Likewise
31609	* mailbox/include/header0.h: Likewise
31610	* mailbox/include/imap0.h: Likewise
31611	* mailbox/include/mailbox0.h: Likewise
31612	* mailbox/include/stream0.h: Likewise
31613	* mailbox/mbox/mbox.c: Likewise
31614	* mailbox/mbox/mboxscan.c: Likewise
31615	* mailbox/nntp/mbox.c: Likewise
31616	* mailbox/nntp/nntp_stream.c: Likewise
31617	* mailbox/pop/mbox.c: Likewise
31618	* mailbox/pop/pop3_stream.c: Likewise
31619	* mh/mh_stream.c: Likewise
31620	* pop3d/pop3d.c: Likewise
31621
31622	* m4/gnulib.m4: Update
31623	* m4/mu_libobj.m4: Update
31624
31625	Update by gnulib-sync:
31626
31627	* lib/allocsa.c: Updated
31628	* lib/allocsa.h: Updated
31629	* lib/allocsa.valgrind: Updated
31630	* lib/asprintf.c: Updated
31631	* lib/error.c: Updated
31632	* lib/error.h: Updated
31633	* lib/exit.h: Updated
31634	* lib/exitfail.c: Updated
31635	* lib/exitfail.h: Updated
31636	* lib/getpass.c: Updated
31637	* lib/getpass.h: Updated
31638	* lib/intprops.h: Updated
31639	* lib/mbswidth.c: Updated
31640	* lib/mbswidth.h: Updated
31641	* lib/obstack.c: Updated
31642	* lib/obstack.h: Updated
31643	* lib/realloc.c: Updated
31644	* lib/setenv.c: Updated
31645	* lib/setenv.h: Updated
31646	* lib/snprintf.c: Updated
31647	* lib/snprintf.h: Updated
31648	* lib/unsetenv.c: Updated
31649	* lib/vasprintf.c: Updated
31650	* lib/vasprintf.h: Updated
31651	* lib/xalloc-die.c: Updated
31652	* lib/xalloc.h: Updated
31653	* lib/xmalloc.c: Updated
31654	* lib/xsize.h: Updated
31655	* lib/xstrtol.c: Updated
31656	* lib/xstrtol.h: Updated
31657	* lib/xstrtoul.c: Updated
31658	* m4/alloca.m4: Updated
31659	* m4/allocsa.m4: Updated
31660	* m4/argp.m4: Updated
31661	* m4/d-type.m4: Added to the repository
31662	* m4/eealloc.m4: Updated
31663	* m4/eoverflow.m4: Updated
31664	* m4/error.m4: Updated
31665	* m4/exitfail.m4: Updated
31666	* m4/extensions.m4: Updated
31667	* m4/fnmatch.m4: Updated
31668	* m4/getdelim.m4: Updated
31669	* m4/getline.m4: Updated
31670	* m4/getlogin_r.m4: Added to the repository
31671	* m4/getopt.m4: Updated
31672	* m4/getpass.m4: Updated
31673	* m4/glob.m4: Added to the repository
31674	* m4/intmax_t.m4: Updated
31675	* m4/inttypes.m4: Updated
31676	* m4/inttypes_h_gl.m4: Updated
31677	* m4/longdouble.m4: Updated
31678	* m4/longlong_gl.m4: Updated
31679	* m4/mbchar.m4: Updated
31680	* m4/mbiter.m4: Added to the repository
31681	* m4/mbrtowc.m4: Updated
31682	* m4/mbstate_t.m4: Updated
31683	* m4/mbswidth.m4: Updated
31684	* m4/md5.m4: Updated
31685	* m4/memchr.m4: Updated
31686	* m4/mempcpy.m4: Updated
31687	* m4/minmax.m4: Updated
31688	* m4/obstack.m4: Updated
31689	* m4/onceonly.m4: Updated
31690	* m4/regex.m4: Updated
31691	* m4/restrict.m4: Updated
31692	* m4/setenv.m4: Updated
31693	* m4/signed.m4: Updated
31694	* m4/size_max.m4: Updated
31695	* m4/snprintf.m4: Updated
31696	* m4/stat-macros.m4: Added to the repository
31697	* m4/stdbool.m4: Updated
31698	* m4/stdint.m4: Added to the repository
31699	* m4/stdint_h_gl.m4: Updated
31700	* m4/strcase.m4: Updated
31701	* m4/strchrnul.m4: Updated
31702	* m4/strdup.m4: Added to the repository
31703	* m4/strerror_r.m4: Updated
31704	* m4/strndup.m4: Updated
31705	* m4/strnlen.m4: Updated
31706	* m4/strtok_r.m4: Updated
31707	* m4/sysexits.m4: Updated
31708	* m4/uintmax_t_gl.m4: Updated
31709	* m4/ulonglong_gl.m4: Updated
31710	* m4/vasnprintf.m4: Updated
31711	* m4/vasprintf.m4: Updated
31712	* m4/vsnprintf.m4: Updated
31713	* m4/wchar_t.m4: Updated
31714	* m4/wint_t.m4: Updated
31715	* m4/xalloc.m4: Updated
31716	* m4/xsize.m4: Updated
31717	* m4/xstrtol.m4: Updated
31718	* mailbox/alloca.c: Updated
31719	* mailbox/alloca_.h: Updated
31720	* mailbox/argp-ba.c: Updated
31721	* mailbox/argp-eexst.c: Updated
31722	* mailbox/argp-fmtstream.c: Updated
31723	* mailbox/argp-fmtstream.h: Updated
31724	* mailbox/argp-fs-xinl.c: Updated
31725	* mailbox/argp-help.c: Updated
31726	* mailbox/argp-namefrob.h: Updated
31727	* mailbox/argp-parse.c: Updated
31728	* mailbox/argp-pv.c: Updated
31729	* mailbox/argp-pvh.c: Updated
31730	* mailbox/argp-xinl.c: Updated
31731	* mailbox/argp.h: Updated
31732	* mailbox/asnprintf.c: Updated
31733	* mailbox/fnmatch.c: Added to the repository
31734	* mailbox/fnmatch_.h: Added to the repository
31735	* mailbox/fnmatch_loop.c: Added to the repository
31736	* mailbox/getdelim.c: Updated
31737	* mailbox/getdelim.h: Updated
31738	* mailbox/getline.c: Updated
31739	* mailbox/getline.h: Updated
31740	* mailbox/getlogin_r.c: Added to the repository
31741	* mailbox/getlogin_r.h: Added to the repository
31742	* mailbox/getopt.c: Updated
31743	* mailbox/getopt1.c: Updated
31744	* mailbox/getopt_.h: Updated
31745	* mailbox/getopt_int.h: Updated
31746	* mailbox/gettext.h: Updated
31747	* mailbox/glob-libc.h: Added to the repository
31748	* mailbox/glob.c: Added to the repository
31749	* mailbox/glob_.h: Added to the repository
31750	* mailbox/malloc.c: Added to the repository
31751	* mailbox/mbchar.c: Updated
31752	* mailbox/mbchar.h: Updated
31753	* mailbox/mbuiter.h: Added to the repository
31754	* mailbox/md5.c: Updated
31755	* mailbox/md5.h: Updated
31756	* mailbox/memchr.c: Updated
31757	* mailbox/mempcpy.c: Updated
31758	* mailbox/mempcpy.h: Updated
31759	* mailbox/minmax.h: Updated
31760	* mailbox/printf-args.c: Updated
31761	* mailbox/printf-args.h: Updated
31762	* mailbox/printf-parse.c: Updated
31763	* mailbox/printf-parse.h: Updated
31764	* mailbox/regcomp.c: Updated
31765	* mailbox/regex.c: Updated
31766	* mailbox/regex.h: Updated
31767	* mailbox/regex_internal.c: Updated
31768	* mailbox/regex_internal.h: Updated
31769	* mailbox/regexec.c: Updated
31770	* mailbox/size_max.h: Updated
31771	* mailbox/stat-macros.h: Added to the repository
31772	* mailbox/stdbool_.h: Updated
31773	* mailbox/stdint_.h: Added to the repository
31774	* mailbox/strcase.h: Updated
31775	* mailbox/strcasecmp.c: Updated
31776	* mailbox/strchrnul.c: Updated
31777	* mailbox/strchrnul.h: Updated
31778	* mailbox/strdup.c: Added to the repository
31779	* mailbox/strdup.h: Added to the repository
31780	* mailbox/strncasecmp.c: Updated
31781	* mailbox/strndup.c: Updated
31782	* mailbox/strndup.h: Updated
31783	* mailbox/strnlen.c: Updated
31784	* mailbox/strnlen.h: Updated
31785	* mailbox/strnlen1.c: Updated
31786	* mailbox/strnlen1.h: Updated
31787	* mailbox/strtok_r.c: Updated
31788	* mailbox/strtok_r.h: Updated
31789	* mailbox/sysexit_.h: Updated
31790	* mailbox/vasnprintf.c: Updated
31791	* mailbox/vasnprintf.h: Updated
31792	* mailbox/vsnprintf.c: Updated
31793	* mailbox/vsnprintf.h: Updated
31794	* mailbox/xsize.h: Updated
31795
31796	* examples/argcv.c: Add missing includes
31797	* examples/mailcap.c: Likewise
31798	* examples/url-parse.c: Likewise
31799	* mail/send.c: Likewise
31800	* mailbox/list.c: Likewise
31801	* mh/mh_alias.l: Likewise
31802	* mimeview/mimetypes.l: Likewise
31803	* examples/nntpclient.c: Add missing forward declarations
31804
31805	* libsieve/sieve.h (mu_sieve_yylex,mu_sieve_yyerror): Add
31806	declarations.
31807	* libsieve/sieve.y (yylex,yyerror): Remove declarations
31808	* include/mailutils/mutil.h (mu_is_proto): New function.
31809	* mailbox/mutil.c: Likewise
31810	* mailbox/mbx_default.c (is_proto): Replace by mu_is_proto. All
31811	callers updated
31812	* mailbox/mailbox.c (mailbox_folder_create): Do not try to select
31813	previous level if given a protocol spec, other than `file:'
31814
31815	* mh/mh.h (mh_file_to_message): Change signature
31816	* mh/mh_init.c: Likewise
31817	* mimeview/Makefile.am (AM_CPPFLAGS): Add -D_GNU_SOURCE=1, needed
31818	for compiling lex sources
31819	* mh/Makefile.am: Likewise
31820
318212005-11-14  Sergey Poznyakoff  <gray@gnu.org.ua>
31822
31823	* examples/argcv.c: Include <mailutils/error.h>
31824	* examples/base64.c: Include <config.h>
31825	* readmsg/readmsg.h: Likewise
31826	* mail/z.c (z_parse_args): change type of return_count
31827	(mail_z): Change type of count to off_t
31828	* include/mailutils/stream.h: Fix indentation
31829
31830	* scripts/gnulib-sync: Replace AC_LIBSOURCE with MU_LIBSOURCE
31831
318322005-11-14  Sergey Poznyakoff  <gray@gnu.org.ua>
31833
31834        * examples/argcv.c: Include <mailutils/error.h>
31835        * examples/base64.c: Include <config.h>
31836        * readmsg/readmsg.h: Likewise
31837        * mail/z.c (z_parse_args): change type of return_count
31838        (mail_z): Change type of count to off_t
31839        * include/mailutils/stream.h: Fix indentation
31840	* mailbox/file_stream.c (struct _fise_stream.offset): Change type
31841	to off_t
31842
318432005-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
31844
31845	* configure.ac (AUTHLIBS,AUTHLIBS_DEPENDENCY,AUTHINCS): Prefixed
31846	with MU_
31847	* mail/msgset.y (check_set): Was displaying `inappropriate message'
31848	diagnostics if the first message from the set was deleted. Fixed.
31849	* mail/util.c, mailbox/registrar.c: Add typecasts
31850	* mh/mh.h: Add includes needed for W.*() macros
31851	* comsat/Makefile.am, config/Makefile.am, examples/Makefile.am,
31852	frm/Makefile.am, guimb/Makefile.am, imap4d/Makefile.am,
31853	libmu_scm/Makefile.am, libsieve/Makefile.am, mail/Makefile.am,
31854	mail.local/Makefile.am, mail.remote/Makefile.am,
31855	mailbox/Makefile.am, messages/Makefile.am, mh/Makefile.am,
31856	movemail/Makefile.am, pop3d/Makefile.am, readmsg/Makefile.am,
31857	sieve/Makefile.am: Load MU_AUTHLIBS before libmailutils. Fixes
31858	cygwin build.
31859
318602005-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
31861
31862	* configure.ac: Somewhat reluctantly append $(EXEEXT) to popauth
31863	binary name to fix cygwin builds.
31864	* mail.remote/Makefile.am (PROGRAMS_SMTP): Likewise
31865	* mh/Makefile.am (PROGRAMS_MH): Likewise
31866
318672005-11-07  Sergey Poznyakoff  <gray@gnu.org.ua>
31868
31869	* configure.ac (GUIMB): Fix assignment to work on cygwin too
31870	* THANKS: Add D. J. Henman
31871
318722005-11-03  Sergey Poznyakoff  <gray@gnu.org.ua>
31873
31874	* comsat/Makefile.am, dotlock/Makefile.am, examples/Makefile.am,
31875	frm/Makefile.am, guimb/Makefile.am, imap4d/Makefile.am,
31876	mail.local/Makefile.am, mail.remote/Makefile.am, mapi/Makefile.am,
31877	messages/Makefile.am, mh/Makefile.am, movemail/Makefile.am,
31878	pop3d/Makefile.am, readmsg/Makefile.am, sieve/Makefile.am: Load
31879	libmuauth before libmailutils.
31880
318812005-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
31882
31883	* configure.ac: Fix typo
31884	* comsat/comsat.c: Fix typo in the comment
31885
318862005-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
31887
31888	* libsieve/sieve.l (pop_source): Clear sieve_filename if
31889	context_stack is empty.
31890
318912005-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>
31892
31893	* Makefile.am (release): Rename to alpha
31894	(alphacheck): New rule
31895	* configure.ac: Always define program_name to
31896	program_invocation_name
31897
31898	* libsieve/actions.c (build_mime): Split into three smaller
31899	functions, each for its own task.
31900	Add Content-Type,Content-Transfer-Encoding headers to the
31901	DSN. Proposed by Kostas Zorbadelos.
31902	* sieve/testsuite/Reject: Updated to match the above changes
31903	* sieve/testsuite/sieve/reject.exp: Updated
31904	* examples/http.c: Include <sys/time.h>
31905	* mailbox/imap/folder.c (imap_writeline): Fix handling of input
31906	lines longer than 254 chars. Proposed by Daniel Kahn Gillmor.
31907	* THANKS: Add Kostas Zorbadelos and Daniel Kahn Gillmor.
31908
319092005-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
31910
31911	* NEWS: Updated
31912	* include/mailutils/compat.h: New file. Compatibility defines for
31913	programs using mailutils interface version 0:0:0.
31914	* include/mailutils/Makefile.am (pkginclude_HEADERS): Add compat.h
31915	* include/mailutils/folder.h (mu_0_6_folder_list)
31916	(mu_0_6_folder_lsub,mu_0_6_folder_list_destroy): Compatibility
31917	functions.
31918	* include/mailutils/mailutils.h: Include compat.h, if required
31919	* include/mailutils/message.h (message_unref): Rename to
31920	mu_message_unref. All callers updated
31921	* include/mailutils/mime.h (MIME_INCREAMENTAL_PARSER): Remove
31922	(MIME_MULTIPART_MIXED,MIME_MULTIPART_ALT): Prefix with MU_. All
31923	uses changed.
31924	* include/mailutils/monitor.h (struct mu__monitor): Rename to
31925	mu_monitor. All uses changed.
31926	* include/mailutils/registrar.h (struct _mu_record): Fix member
31927	names. All uses changed
31928	* include/mailutils/sql.h (rdl_init_t,rdl_done_t): Prefix with mu_
31929	* mail/util.c (util_do_command): Minor fix
31930
31931	* libsieve/actions.c,libsieve/extensions/vacation.c,
31932	mailbox/filter.c, mailbox/folder.c, mailbox/mime.c,
31933	mailbox/registrar.c, mailbox/rfc2047.c, mh/mhl.c, mh/mhn.c: Synch
31934	with the above changes.
31935
31936	* mail/if.c (mail_if): Fix 'r' condition
31937	(mail_else): Fix handling of nested ifs
31938	* mail/mail.c: New option --exec (-E)
31939	(mail_cmdline): Invalidate the page when a new mail arrives
31940	(main): Fix handling of modes.
31941	* mail/quit.c (mail_mbox_close): mbox can be NULL (e.g.
31942	--exec=quit was given)
31943	* mail/util.c (util_do_command): Accept traditional contracted
31944	forms (`d*', `p9')
31945	Fix bug in handling conditional branches (bug introduced on
31946	2005-08-11).
31947	* mail/testsuite/if.mail: New test script.
31948	* mail/testsuite/Makefile.am (EXTRA_DIST): Add if.mail
31949	* mail/testsuite/mail/if.exp: New test case.
31950	* mail/testsuite/mail/DISTFILES: Add if.exp
31951
319522005-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
31953
31954	* examples/argcv.c: Include config.h
31955
319562005-10-17  Sergey Poznyakoff  <gray@gnu.org.ua>
31957
31958	* configure.ac: New option --without-fribidi allows to disable
31959	fribidi support.
31960	Check for FRIBIDI_CHARSET_CAP_RTL vs. FRIBIDI_CHAR_SET_CAP_RTL.
31961	* README: Updated
31962
319632005-09-29  Sergey Poznyakoff  <gray@gnu.org.ua>
31964
31965	* examples/decode2047.c: Allow to specify charset from the command
31966	line.
31967	* examples/encode2047.c: Allow to specify charset and encoding
31968	from the command line.
31969	* include/mailutils/filter.h (mu_rfc_2047_B_filter): New filter.
31970	* include/mailutils/libsieve.h (MU_SIEVE_CHARSET): New define
31971	* libsieve/extensions/vacation.c: Implemented :mime. Correctly
31972	handle subject line, no matter what the charset is.
31973	Fixed bug in creating `References:' header.
31974
31975	* mailbox/filter.c (mu_filter_get_list): Add mu_rfc_2047_B_filter
31976	* mailbox/filter_trans.c (mu_rfc_2047_B_filter): New filter. Alias
31977	to base64.
31978
31979	* include/mailutils/iterator.h: Minor stylistic changes
31980	* mailbox/iterator.c: Likewise
31981	* mailbox/wicket.c: Likewise
31982	* mh/mhn.c: Likewise
31983
319842005-09-22  Sergey Poznyakoff  <gray@gnu.org.ua>
31985
31986	* NEWS: Minor wording change.
31987	* config/mailutils-config.c: New command line argument "sieve".
31988
319892005-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
31990
31991	* mailbox/imap/mbox.c (delete_to_string): Make sure the message
31992	set does not end with a comma. Bug reported by Gerd Flaig
31993	(<gefla@pond.sub.org>), I suppose.
31994
319952005-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
31996
31997	* mh/send.c (expand_aliases): Use mh_expand_aliases
31998
31999	* mh/forw.c,mh/repl.c: Implemented --annotate
32000
32001	* mh/mh_init.c (mh_quote,mh_expand_aliases): New functions
32002	* mh/mh.h (mh_quote,mh_expand_aliases): New functions
32003	(struct mh_whatnow_env): New fields to support annotation.
32004	* mh/mh_whatnow.c: Support message annotation. Improved error
32005	reporting after launching external programs.
32006
32007	* mh/anno.c (main): Make the first annotated message current.
32008	(opt_handler): Quote --text argument, if necessary.
32009
32010	* mh/TODO: Updated
32011
320122005-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
32013
32014	* mail/page.c (cond_page_invalidate,page_move): Bugfix.
32015
320162005-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
32017
32018	* imap4d/search.c (imap4d_search): Fix potential vulnerability:
32019	pass format string as a third argument to util_finish
32020	* imap4d/copy.c, imap4d/fetch.c, imap4d/store.c: Always pass
32021	format string as a third argument to util_finish. Although this is not
32022	necessary, since 'buffer' is guaranteed to contain a normal error
32023	string, without format specifiers, yet this will simplify maintenance.
32024
320252005-08-31  Sergey Poznyakoff  <gray@gnu.org.ua>
32026
32027	* examples/lsf.c: New test program. List folders
32028	* examples/Makefile.am: Add lsf
32029	* mailbox/imap/folder.c (guess_level,list_copy): Fixed
32030	(imap_parse): Handle NO case explicitly.
32031	* mailbox/mbox/folder.c: Minor fix.
32032
320332005-08-30  Sergey Poznyakoff  <gray@gnu.org.ua>
32034
32035	Remove obsolete usage of mu_folder_list (ex. folder_list). It
32036	seems to have been introduced when mu_list_t (ex. list_t) has
32037	not yet been there. All callers updated. Mbox format
32038	implementation has been tested. Imap format one is being tested.
32039
32040	* include/mailutils/folder.h (struct mu_list_response.level): New
32041	member
32042	(struct mu_folder_list): Removed. Use mu_list_t instead
32043	(mu_folder_list): Use mu_list_t. Take an extra argument: a maximum
32044	recursion level.
32045	(mu_folder_lsub): Change typo of the last argument (mu_list_t
32046	now).
32047	(mu_folder_list_destroy): Removed
32048	(mu_list_response_free): New function
32049	* lib/mu_asprintf.h: Remove vestiges of __P(). Define _GNU_SOURCE,
32050	if not already defined.
32051
32052	* mailbox/imap/folder.c: Rewritten for new
32053	mu_folder_list,mu_folder_lsub semantics.
32054	* mailbox/imap/mbox.c: Likewise
32055	* mailbox/include/folder0.h: Likewise.
32056	* mailbox/include/imap0.h: Likewise.
32057	* mailbox/mbox/folder.c: Likewise.
32058	* mailbox/nntp/folder.c: Likewise.
32059	* mail/mailline.c: Use new mu_folder_list
32060	* mailbox/folder.c: Likewise.
32061
32062	* auth/radius.c: Updated for recent libgnuradius
32063
32064	* mh/folder.c: Implement --pack, --verbose, --dry-run (just in case).
32065	* mh/TODO: Updated
32066	* mh/inc.c: Minor bugfixes.
32067	* mh/mark.c: Likewise
32068	* mh/mh.h (mh_context_iterator): Changed signature
32069	* mh/mh_ctx.c (mh_context_iterate): Bugfix
32070	* mh/mh_getopt.h (ARG_PACK): New define
32071
320722005-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
32073
32074	* configure.ac: Raise version number to 0.6.92
32075	Raise library current interface version to 1
32076	* NEWS: Updated
32077
32078	* include/mailutils/filter.h,
32079	include/mailutils/registrar.h, include/mailutils/types.h,
32080	mailbox/filter.c, mailbox/filter_rfc822.c, mailbox/filter_trans.c,
32081	mailbox/folder.c, mailbox/getopt.h, mailbox/locker.c,
32082	mailbox/parse822.c, mailbox/registrar.c, mailbox/sendmail.c,
32083	mailbox/smtp.c, mailbox/url.c, mailbox/imap/folder.c,
32084	mailbox/include/address0.h, mailbox/include/attribute0.h,
32085	mailbox/include/auth0.h, mailbox/include/body0.h,
32086	mailbox/include/debug0.h, mailbox/include/envelope0.h,
32087	mailbox/include/filter0.h, mailbox/include/folder0.h,
32088	mailbox/include/header0.h, mailbox/include/iterator0.h,
32089	mailbox/include/list0.h, mailbox/include/mailbox0.h,
32090	mailbox/include/mailer0.h, mailbox/include/message0.h,
32091	mailbox/include/mime0.h, mailbox/include/observer0.h,
32092	mailbox/include/property0.h, mailbox/include/stream0.h,
32093	mailbox/include/url0.h, mailbox/maildir/folder.c,
32094	mailbox/mbox/folder.c, mailbox/mh/folder.c, mailbox/nntp/folder.c,
32095	mailbox/pop/folder.c: Fix-up structure names from types.h
32096
32097	Final seasoning: Replace munre_ with mu_unre_
32098
32099	* include/mailutils/mutil.h
32100	* libsieve/extensions/vacation.c
32101	* mail/followup.c
32102	* mail/reply.c
32103	* mail/util.c
32104	* mailbox/munre.c
32105	* mh/mh_format.c
32106	* mh/mh_init.c
32107
321082005-08-27  Wojciech Polak  <polak@gnu.org>
32109
32110	Normalize global namespace. Part 2: Symbols defined in header files
32111	mailer.h, message.h, mime.h, monitor.h, observer.h, parse822.h,
32112	property.h, registrar.h, stream.h, tls.h, types.h, url.h.
32113
32114	Files affected:
32115
32116	* auth/gsasl.c, auth/tls.c, comsat/action.c, comsat/comsat.c,
32117	comsat/comsat.h, dotlock/dotlock.c, examples/addr.c,
32118	examples/base64.c, examples/decode2047.c, examples/encode2047.c,
32119	examples/http.c, examples/iconv.c, examples/listop.c,
32120	examples/mailcap.c, examples/mimetest.c, examples/msg-send.c,
32121	examples/mta.c, examples/murun.c, examples/nntpclient.c,
32122	examples/numaddr.c, examples/pop3client.c, examples/sfrom.c,
32123	examples/url-parse.c, frm/common.c, frm/frm.c, frm/frm.h,
32124	frm/from.c, guimb/collect.c, guimb/guimb.h, guimb/util.c,
32125	imap4d/append.c, imap4d/auth_gsasl.c, imap4d/authenticate.c,
32126	imap4d/capability.c, imap4d/copy.c, imap4d/fetch.c, imap4d/imap4d.c,
32127	imap4d/imap4d.h, imap4d/rename.c, imap4d/search.c, imap4d/status.c,
32128	imap4d/store.c, imap4d/sync.c, imap4d/util.c,
32129	include/mailutils/address.h, include/mailutils/attribute.h,
32130	include/mailutils/auth.h, include/mailutils/body.h,
32131	include/mailutils/envelope.h, include/mailutils/filter.h,
32132	include/mailutils/folder.h, include/mailutils/gsasl.h,
32133	include/mailutils/guile.h, include/mailutils/header.h,
32134	include/mailutils/iterator.h, include/mailutils/libsieve.h,
32135	include/mailutils/list.h, include/mailutils/locker.h,
32136	include/mailutils/mailbox.h, include/mailutils/mailcap.h,
32137	include/mailutils/mailer.h, include/mailutils/message.h,
32138	include/mailutils/mime.h, include/mailutils/monitor.h,
32139	include/mailutils/mu_auth.h, include/mailutils/mutil.h,
32140	include/mailutils/nntp.h, include/mailutils/observer.h,
32141	include/mailutils/parse822.h, include/mailutils/pop3.h,
32142	include/mailutils/property.h, include/mailutils/refcount.h,
32143	include/mailutils/registrar.h, include/mailutils/stream.h,
32144	include/mailutils/tls.h, include/mailutils/types.h,
32145	include/mailutils/url.h, include/mailutils/sys/nntp.h,
32146	include/mailutils/sys/pop3.h, lib/mailcap.c, libmu_scm/mu_address.c,
32147	libmu_scm/mu_body.c, libmu_scm/mu_mailbox.c, libmu_scm/mu_message.c,
32148	libmu_scm/mu_mime.c, libmu_scm/mu_port.c, libmu_scm/mu_scm.c,
32149	libsieve/actions.c, libsieve/argp.c, libsieve/comparator.c,
32150	libsieve/load.c, libsieve/prog.c, libsieve/register.c,
32151	libsieve/relational.c, libsieve/require.c, libsieve/runtime.c,
32152	libsieve/sieve.h, libsieve/sieve.l, libsieve/sieve.y, libsieve/tests.c,
32153	libsieve/util.c, libsieve/extensions/list.c, libsieve/extensions/spamd.c,
32154	libsieve/extensions/timestamp.c, libsieve/extensions/vacation.c,
32155	mail/alias.c, mail/alt.c, mail/copy.c, mail/decode.c, mail/delete.c,
32156	mail/edit.c, mail/escape.c, mail/file.c, mail/followup.c, mail/from.c,
32157	mail/hold.c, mail/mail.c, mail/mail.h, mail/mailline.c, mail/mbox.c,
32158	mail/msgset.y, mail/next.c, mail/page.c, mail/pipe.c, mail/previous.c,
32159	mail/print.c, mail/quit.c, mail/reply.c, mail/retain.c, mail/send.c,
32160	mail/size.c, mail/summary.c, mail/tag.c, mail/top.c, mail/touch.c,
32161	mail/undelete.c, mail/util.c, mail/visual.c, mail/write.c,
32162	mail.local/mail.local.h, mail.local/main.c, mail.local/script.c,
32163	mail.remote/mail.remote.c, mailbox/address.c, mailbox/amd.c,
32164	mailbox/attachment.c, mailbox/attribute.c, mailbox/auth.c,
32165	mailbox/body.c, mailbox/envelope.c, mailbox/file_stream.c,
32166	mailbox/filter.c, mailbox/filter_iconv.c, mailbox/filter_rfc822.c,
32167	mailbox/filter_trans.c, mailbox/folder.c, mailbox/header.c,
32168	mailbox/iterator.c, mailbox/list.c, mailbox/locker.c, mailbox/mailbox.c,
32169	mailbox/mailcap.c, mailbox/mailer.c, mailbox/mapfile_stream.c,
32170	mailbox/mbx_default.c, mailbox/memory_stream.c, mailbox/message.c,
32171	mailbox/mime.c, mailbox/monitor.c, mailbox/mu_argp.c, mailbox/mu_auth.c,
32172	mailbox/mutil.c, mailbox/observer.c, mailbox/parse822.c,
32173	mailbox/property.c, mailbox/registrar.c, mailbox/rfc2047.c,
32174	mailbox/sendmail.c, mailbox/smtp.c, mailbox/stream.c, mailbox/tcp.c,
32175	mailbox/ticket.c, mailbox/url.c, mailbox/url_sendmail.c,
32176	mailbox/url_smtp.c, mailbox/wicket.c, mailbox/imap/folder.c,
32177	mailbox/imap/mbox.c, mailbox/imap/url.c, mailbox/include/amd.h,
32178	mailbox/include/attribute0.h, mailbox/include/auth0.h,
32179	mailbox/include/body0.h, mailbox/include/envelope0.h,
32180	mailbox/include/filter0.h, mailbox/include/folder0.h,
32181	mailbox/include/header0.h, mailbox/include/imap0.h,
32182	mailbox/include/iterator0.h, mailbox/include/list0.h,
32183	mailbox/include/mailbox0.h, mailbox/include/mailer0.h,
32184	mailbox/include/message0.h, mailbox/include/mime0.h,
32185	mailbox/include/observer0.h, mailbox/include/property0.h,
32186	mailbox/include/registrar0.h, mailbox/include/stream0.h,
32187	mailbox/include/url0.h, mailbox/maildir/folder.c, mailbox/maildir/mbox.c,
32188	mailbox/mbox/folder.c, mailbox/mbox/mbox.c, mailbox/mbox/mbox0.h,
32189	mailbox/mbox/mboxscan.c, mailbox/mbox/url.c, mailbox/mh/folder.c,
32190	mailbox/mh/mbox.c, mailbox/nntp/folder.c, mailbox/nntp/mbox.c,
32191	mailbox/nntp/nntp0.h, mailbox/nntp/nntp_article.c,
32192	mailbox/nntp/nntp_body.c, mailbox/nntp/nntp_carrier.c,
32193	mailbox/nntp/nntp_connect.c, mailbox/nntp/nntp_destroy.c,
32194	mailbox/nntp/nntp_disconnect.c, mailbox/nntp/nntp_head.c,
32195	mailbox/nntp/nntp_help.c, mailbox/nntp/nntp_ihave.c,
32196	mailbox/nntp/nntp_iterator.c, mailbox/nntp/nntp_list_active.c,
32197	mailbox/nntp/nntp_list_distribpats.c,
32198	mailbox/nntp/nntp_list_distributions.c,
32199	mailbox/nntp/nntp_list_extensions.c, mailbox/nntp/nntp_list_newsgroups.c,
32200	mailbox/nntp/nntp_list_times.c, mailbox/nntp/nntp_newgroups.c,
32201	mailbox/nntp/nntp_newnews.c, mailbox/nntp/nntp_post.c,
32202	mailbox/nntp/nntp_readline.c, mailbox/nntp/nntp_sendline.c,
32203	mailbox/nntp/nntp_stream.c, mailbox/nntp/url.c, mailbox/pop/folder.c,
32204	mailbox/pop/mbox.c, mailbox/pop/pop3_capa.c, mailbox/pop/pop3_carrier.c,
32205	mailbox/pop/pop3_connect.c, mailbox/pop/pop3_destroy.c,
32206	mailbox/pop/pop3_disconnect.c, mailbox/pop/pop3_iterator.c,
32207	mailbox/pop/pop3_lista.c, mailbox/pop/pop3_readline.c,
32208	mailbox/pop/pop3_retr.c, mailbox/pop/pop3_sendline.c,
32209	mailbox/pop/pop3_stls.c, mailbox/pop/pop3_stream.c,
32210	mailbox/pop/pop3_top.c, mailbox/pop/pop3_uidla.c, mailbox/pop/url.c,
32211	messages/messages.c, mh/ali.c, mh/anno.c, mh/comp.c, mh/compcommon.c,
32212	mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c, mh/mh.h, mh/mh_alias.y,
32213	mh/mh_ctx.c, mh/mh_format.c, mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c,
32214	mh/mh_stream.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhl.c, mh/mhn.c,
32215	mh/mhpath.c, mh/pick.c, mh/pick.h, mh/pick.y, mh/refile.c, mh/repl.c,
32216	mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c, mh/sortm.c,
32217	mimeview/mimetypes.y, mimeview/mimeview.c, movemail/movemail.c,
32218	pop3d/apop.c, pop3d/dele.c, pop3d/expire.c, pop3d/extra.c, pop3d/list.c,
32219	pop3d/lock.c, pop3d/pop3d.c, pop3d/pop3d.h, pop3d/quit.c, pop3d/retr.c,
32220	pop3d/rset.c, pop3d/stat.c, pop3d/top.c, pop3d/uidl.c, pop3d/user.c,
32221	readmsg/msglist.c, readmsg/readmsg.c, readmsg/readmsg.h, sieve/sieve.c,
32222	sql/odbc.c.
32223
322242005-08-26  Sergey Poznyakoff  <gray@gnu.org.ua>
32225
32226	Normalize global namespace. All exportable symbols begin with mu_.
32227	Part 1: Symbols defined in header files address.h, argcv.h,
32228	attribute.h, auth.h, body.h, daemon.h, debug.h, envelope.h,
32229	errno.h, error.h, filter.h, folder.h, gsasl.h, guile.h, header.h,
32230	iterator.h, libsieve.h, list.h,	locker.h, mailbox.h.
32231
32232	Files affected:
32233
32234	* configure.ac, auth/gsasl.c, auth/radius.c, comsat/action.c,
32235	comsat/cfg.c, comsat/comsat.c, dotlock/dotlock.c, examples/addr.c,
32236	examples/argcv.c, examples/base64.c, examples/iconv.c,
32237	examples/listop.c, examples/mimetest.c, examples/msg-send.c,
32238	examples/mta.c, examples/murun.c, examples/nntpclient.c,
32239	examples/numaddr.c, examples/pop3client.c, examples/sfrom.c,
32240	frm/common.c, frm/frm.c, frm/from.c, guimb/collect.c,
32241	guimb/main.c, guimb/util.c, imap4d/append.c, imap4d/auth_gsasl.c,
32242	imap4d/authenticate.c, imap4d/bye.c, imap4d/capability.c,
32243	imap4d/close.c, imap4d/copy.c, imap4d/expunge.c, imap4d/fetch.c,
32244	imap4d/imap4d.c, imap4d/imap4d.h, imap4d/rename.c,
32245	imap4d/search.c, imap4d/select.c, imap4d/status.c, imap4d/store.c,
32246	imap4d/sync.c, imap4d/util.c, include/mailutils/address.h,
32247	include/mailutils/argcv.h, include/mailutils/attribute.h,
32248	include/mailutils/auth.h, include/mailutils/body.h,
32249	include/mailutils/daemon.h, include/mailutils/envelope.h,
32250	include/mailutils/error.h, include/mailutils/filter.h,
32251	include/mailutils/folder.h, include/mailutils/gsasl.h,
32252	include/mailutils/guile.h, include/mailutils/header.h,
32253	include/mailutils/iterator.h, include/mailutils/libsieve.h,
32254	include/mailutils/list.h, include/mailutils/locker.h,
32255	include/mailutils/mailbox.h, include/mailutils/nntp.h,
32256	include/mailutils/pop3.h, include/mailutils/types.h,
32257	lib/mailcap.c, libmu_scm/mu_address.c, libmu_scm/mu_body.c,
32258	libmu_scm/mu_guimb.c, libmu_scm/mu_logger.c,
32259	libmu_scm/mu_mailbox.c, libmu_scm/mu_message.c,
32260	libmu_scm/mu_mime.c, libmu_scm/mu_scm.c, libmu_scm/mu_util.c,
32261	libsieve/Makefile.am, libsieve/actions.c, libsieve/argp.c,
32262	libsieve/comparator.c, libsieve/load.c, libsieve/prog.c,
32263	libsieve/register.c, libsieve/relational.c, libsieve/require.c,
32264	libsieve/runtime.c, libsieve/sieve.h, libsieve/sieve.l,
32265	libsieve/sieve.y, libsieve/tests.c, libsieve/util.c,
32266	libsieve/extensions/list.c, libsieve/extensions/spamd.c,
32267	libsieve/extensions/timestamp.c, libsieve/extensions/vacation.c,
32268	m4/longdouble.m4, m4/signed.m4, m4/size_max.m4, m4/wchar_t.m4,
32269	m4/wint_t.m4, m4/xsize.m4, mail/alias.c, mail/copy.c,
32270	mail/decode.c, mail/delete.c, mail/escape.c, mail/exit.c,
32271	mail/file.c, mail/followup.c, mail/from.c, mail/hold.c,
32272	mail/inc.c, mail/mail.c, mail/mailline.c, mail/mbox.c,
32273	mail/msgset.y, mail/next.c, mail/page.c, mail/print.c,
32274	mail/quit.c, mail/reply.c, mail/retain.c, mail/send.c,
32275	mail/shell.c, mail/summary.c, mail/tag.c, mail/touch.c,
32276	mail/undelete.c, mail/util.c, mail/write.c, mail.local/main.c,
32277	mail.local/script.c, mail.remote/mail.remote.c,
32278	mailbox/Makefile.am, mailbox/address.c, mailbox/amd.c,
32279	mailbox/argcv.c, mailbox/attachment.c, mailbox/attribute.c,
32280	mailbox/auth.c, mailbox/body.c, mailbox/daemon.c,
32281	mailbox/envelope.c, mailbox/file_stream.c, mailbox/filter.c,
32282	mailbox/filter_iconv.c, mailbox/filter_rfc822.c,
32283	mailbox/filter_trans.c, mailbox/folder.c, mailbox/header.c,
32284	mailbox/iterator.c, mailbox/list.c, mailbox/locker.c,
32285	mailbox/mailbox.c, mailbox/mailer.c, mailbox/mbx_default.c,
32286	mailbox/message.c, mailbox/mime.c, mailbox/mu_argp.c,
32287	mailbox/mu_auth.c, mailbox/muerror.c, mailbox/mutil.c,
32288	mailbox/observer.c, mailbox/parse822.c, mailbox/registrar.c,
32289	mailbox/rfc2047.c, mailbox/sendmail.c, mailbox/smtp.c,
32290	mailbox/ticket.c, mailbox/wicket.c, mailbox/imap/Makefile.am,
32291	mailbox/imap/folder.c, mailbox/imap/mbox.c, mailbox/include/amd.h,
32292	mailbox/include/folder0.h, mailbox/include/imap0.h,
32293	mailbox/include/list0.h, mailbox/include/mime0.h,
32294	mailbox/maildir/Makefile.am, mailbox/maildir/mbox.c,
32295	mailbox/mbox/Makefile.am, mailbox/mbox/folder.c,
32296	mailbox/mbox/mbox.c, mailbox/mbox/mboxscan.c,
32297	mailbox/mh/Makefile.am, mailbox/mh/folder.c, mailbox/mh/mbox.c,
32298	mailbox/nntp/Makefile.am, mailbox/nntp/folder.c,
32299	mailbox/nntp/mbox.c, mailbox/nntp/nntp_iterator.c,
32300	mailbox/nntp/nntp_list_active.c,
32301	mailbox/nntp/nntp_list_distribpats.c,
32302	mailbox/nntp/nntp_list_distributions.c,
32303	mailbox/nntp/nntp_list_extensions.c,
32304	mailbox/nntp/nntp_list_newsgroups.c,
32305	mailbox/nntp/nntp_list_times.c, mailbox/pop/Makefile.am,
32306	mailbox/pop/folder.c, mailbox/pop/mbox.c, mailbox/pop/pop3_capa.c,
32307	mailbox/pop/pop3_iterator.c, messages/messages.c, mh/ali.c,
32308	mh/anno.c, mh/comp.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c,
32309	mh/mh_alias.y, mh/mh_argp.c, mh/mh_ctx.c, mh/mh_format.c,
32310	mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c, mh/mh_sequence.c,
32311	mh/mh_stream.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhn.c,
32312	mh/mhpath.c, mh/pick.c, mh/pick.y, mh/refile.c, mh/repl.c,
32313	mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c, mh/sortm.c,
32314	mimeview/mimetypes.y, mimeview/mimeview.c, movemail/movemail.c,
32315	pop3d/apop.c, pop3d/dele.c, pop3d/expire.c, pop3d/extra.c,
32316	pop3d/list.c, pop3d/lock.c, pop3d/pop3d.c, pop3d/popauth.c,
32317	pop3d/quit.c, pop3d/retr.c, pop3d/rset.c, pop3d/stat.c,
32318	pop3d/top.c, pop3d/uidl.c, pop3d/user.c, readmsg/msglist.c,
32319	readmsg/readmsg.c, sieve/sieve.c, sql/odbc.c.
32320
323212005-08-24  Sergey Poznyakoff  <gray@gnu.org.ua>
32322
32323	* scripts/ylwrap: Updated from Radius repository
32324
323252005-08-24  Sergey Poznyakoff  <gray@gnu.org.ua>
32326
32327	* mailbox/testsuite/Makefile.am (EXTRA_DIST): Add Argcv
32328
323292005-08-16  Sergey Poznyakoff  <gray@gnu.org.ua>
32330
32331	* auth/sql.h: Avoid redefinition of _XOPEN_SOURCE
32332	* mailbox/imap/folder.c: Likewise
32333	* mailbox/maildir/mbox.c: Likewise
32334	* mailbox/mbox/mbox0.h: Likewise
32335	* mailbox/mh/mbox.c: Likewise
32336
32337	* lib/Makefile.am: Updated
32338	* mailbox/Makefile.am: Updated
32339
32340	Update by gnulib-sync:
32341
32342	* lib/allocsa.c: Updated
32343	* lib/allocsa.h: Updated
32344	* lib/allocsa.valgrind: Updated
32345	* lib/asprintf.c: Updated
32346	* lib/error.c: Updated
32347	* lib/error.h: Updated
32348	* lib/exit.h: Updated
32349	* lib/exitfail.c: Updated
32350	* lib/exitfail.h: Updated
32351	* lib/fnmatch.c: Updated
32352	* lib/fnmatch_.h: Updated
32353	* lib/fnmatch_loop.c: Updated
32354	* lib/getpass.c: Updated
32355	* lib/getpass.h: Updated
32356	* lib/intprops.h: Added to the repository
32357	* lib/malloc.c: Updated
32358	* lib/mbswidth.c: Updated
32359	* lib/mbswidth.h: Updated
32360	* lib/obstack.c: Updated
32361	* lib/obstack.h: Updated
32362	* lib/realloc.c: Updated
32363	* lib/setenv.c: Updated
32364	* lib/setenv.h: Updated
32365	* lib/snprintf.c: Updated
32366	* lib/snprintf.h: Updated
32367	* lib/unsetenv.c: Updated
32368	* lib/vasprintf.c: Updated
32369	* lib/vasprintf.h: Updated
32370	* lib/xalloc-die.c: Added to the repository
32371	* lib/xalloc.h: Updated
32372	* lib/xmalloc.c: Updated
32373	* lib/xsize.h: Updated
32374	* lib/xstrtol.c: Updated
32375	* lib/xstrtol.h: Updated
32376	* lib/xstrtoul.c: Updated
32377	* m4/alloca.m4: Updated
32378	* m4/allocsa.m4: Updated
32379	* m4/argp.m4: Updated
32380	* m4/eealloc.m4: Updated
32381	* m4/eoverflow.m4: Updated
32382	* m4/error.m4: Updated
32383	* m4/exitfail.m4: Updated
32384	* m4/extensions.m4: Updated
32385	* m4/fnmatch.m4: Updated
32386	* m4/getdelim.m4: Added to the repository
32387	* m4/getline.m4: Updated
32388	* m4/getopt.m4: Updated
32389	* m4/getpass.m4: Updated
32390	* m4/intmax_t.m4: Updated
32391	* m4/intmax_t.m4: Updated
32392	* m4/inttypes_h_gl.m4: Updated
32393	* m4/inttypes_h_gl.m4: Updated
32394	* m4/longdouble.m4: Updated
32395	* m4/longdouble.m4: Updated
32396	* m4/longlong_gl.m4: Updated
32397	* m4/longlong_gl.m4: Updated
32398	* m4/mbchar.m4: Added to the repository
32399	* m4/mbrtowc.m4: Updated
32400	* m4/mbrtowc.m4: Updated
32401	* m4/mbstate_t.m4: Updated
32402	* m4/mbswidth.m4: Updated
32403	* m4/md5.m4: Updated
32404	* m4/memchr.m4: Added to the repository
32405	* m4/mempcpy.m4: Updated
32406	* m4/minmax.m4: Added to the repository
32407	* m4/obstack.m4: Updated
32408	* m4/onceonly.m4: Updated
32409	* m4/onceonly.m4: Updated
32410	* m4/regex.m4: Updated
32411	* m4/restrict.m4: Updated
32412	* m4/setenv.m4: Updated
32413	* m4/signed.m4: Updated
32414	* m4/size_max.m4: Updated
32415	* m4/snprintf.m4: Updated
32416	* m4/stdbool.m4: Updated
32417	* m4/stdint_h_gl.m4: Updated
32418	* m4/stdint_h_gl.m4: Updated
32419	* m4/strcase.m4: Updated
32420	* m4/strchrnul.m4: Updated
32421	* m4/strerror_r.m4: Updated
32422	* m4/strndup.m4: Updated
32423	* m4/strnlen.m4: Updated
32424	* m4/strtok_r.m4: Updated
32425	* m4/sysexits.m4: Updated
32426	* m4/uint32_t.m4: Updated
32427	* m4/uintmax_t_gl.m4: Updated
32428	* m4/ulonglong_gl.m4: Updated
32429	* m4/unlocked-io.m4: Updated
32430	* m4/vasnprintf.m4: Updated
32431	* m4/vasprintf.m4: Updated
32432	* m4/vsnprintf.m4: Updated
32433	* m4/wchar_t.m4: Updated
32434	* m4/wint_t.m4: Updated
32435	* m4/xalloc.m4: Updated
32436	* m4/xsize.m4: Updated
32437	* m4/xsize.m4: Updated
32438	* m4/xstrtol.m4: Updated
32439	* mailbox/alloca.c: Updated
32440	* mailbox/alloca_.h: Updated
32441	* mailbox/argp-ba.c: Updated
32442	* mailbox/argp-eexst.c: Updated
32443	* mailbox/argp-fmtstream.c: Updated
32444	* mailbox/argp-fmtstream.h: Updated
32445	* mailbox/argp-fs-xinl.c: Updated
32446	* mailbox/argp-help.c: Updated
32447	* mailbox/argp-namefrob.h: Updated
32448	* mailbox/argp-parse.c: Updated
32449	* mailbox/argp-pv.c: Updated
32450	* mailbox/argp-pvh.c: Updated
32451	* mailbox/argp-xinl.c: Updated
32452	* mailbox/argp.h: Updated
32453	* mailbox/asnprintf.c: Updated
32454	* mailbox/getdelim.c: Added to the repository
32455	* mailbox/getdelim.h: Added to the repository
32456	* mailbox/getline.c: Updated
32457	* mailbox/getline.h: Updated
32458	* mailbox/getopt.c: Updated
32459	* mailbox/getopt1.c: Updated
32460	* mailbox/getopt_.h: Updated
32461	* mailbox/getopt_int.h: Updated
32462	* mailbox/gettext.h: Updated
32463	* mailbox/mbchar.c: Added to the repository
32464	* mailbox/mbchar.h: Added to the repository
32465	* mailbox/md5.c: Updated
32466	* mailbox/md5.h: Updated
32467	* mailbox/memchr.c: Added to the repository
32468	* mailbox/mempcpy.c: Updated
32469	* mailbox/mempcpy.h: Updated
32470	* mailbox/minmax.h: Updated
32471	* mailbox/printf-args.c: Updated
32472	* mailbox/printf-args.h: Updated
32473	* mailbox/printf-parse.c: Updated
32474	* mailbox/printf-parse.h: Updated
32475	* mailbox/regcomp.c: Added to the repository
32476	* mailbox/regex.c: Updated
32477	* mailbox/regex.h: Updated
32478	* mailbox/regex_internal.c: Added to the repository
32479	* mailbox/regex_internal.h: Added to the repository
32480	* mailbox/regexec.c: Added to the repository
32481	* mailbox/size_max.h: Added to the repository
32482	* mailbox/stdbool_.h: Added to the repository
32483	* mailbox/strcase.h: Updated
32484	* mailbox/strcasecmp.c: Updated
32485	* mailbox/strchrnul.c: Updated
32486	* mailbox/strchrnul.h: Updated
32487	* mailbox/strncasecmp.c: Updated
32488	* mailbox/strndup.c: Updated
32489	* mailbox/strndup.h: Updated
32490	* mailbox/strnlen.c: Updated
32491	* mailbox/strnlen.h: Added to the repository
32492	* mailbox/strnlen1.c: Added to the repository
32493	* mailbox/strnlen1.h: Added to the repository
32494	* mailbox/strtok_r.c: Updated
32495	* mailbox/strtok_r.h: Updated
32496	* mailbox/sysexit_.h: Updated
32497	* mailbox/unlocked-io.h: Updated
32498	* mailbox/vasnprintf.c: Updated
32499	* mailbox/vasnprintf.h: Updated
32500	* mailbox/vsnprintf.c: Updated
32501	* mailbox/vsnprintf.h: Updated
32502	* mailbox/xsize.h: Updated
32503
32504	End of gnulib update
32505
32506	* README-alpha,gnulib.modules,comsat/Makefile.am,
32507	config/Makefile.am,config/mailutils-config.c,dotlock/Makefile.am,
32508	examples/Makefile.am,frm/Makefile.am,guimb/Makefile.am,
32509	imap4d/Makefile.am,lib/.cvsignore,lib/Makefile.am,
32510	libsieve/extensions/Makefile.am,mail/Makefile.am,
32511	mail.local/Makefile.am,mail.remote/Makefile.am,
32512	mailbox/Makefile.am,mailbox/imap/folder.c,mapi/Makefile.am,
32513	messages/Makefile.am,mh/Makefile.am,mimeview/Makefile.am,
32514	movemail/Makefile.am,readmsg/Makefile.am,scripts/gnulib-sync,
32515	sieve/Makefile.am: Rename libmailbox to libmailutils. Rename
32516	the convenience library (lib/libmailutils) to libmuaux.
32517
32518	* auth/lbuf.h,comsat/comsat.c,examples/mta.c,guimb/guimb.h,
32519	imap4d/auth_gsasl.c,imap4d/fetch.c,imap4d/imap4d.c,
32520	imap4d/imap4d.h,imap4d/list.c,imap4d/namespace.c,imap4d/search.c,
32521	imap4d/status.c,imap4d/util.c,include/mailutils/address.h,
32522	include/mailutils/argcv.h,include/mailutils/argp.h,
32523	include/mailutils/attribute.h,include/mailutils/auth.h,
32524	include/mailutils/body.h,include/mailutils/daemon.h,
32525	include/mailutils/debug.h,include/mailutils/envelope.h,
32526	include/mailutils/error.h,include/mailutils/filter.h,
32527	include/mailutils/folder.h,include/mailutils/gsasl.h,
32528	include/mailutils/guile.h,include/mailutils/header.h,
32529	include/mailutils/iterator.h,include/mailutils/libsieve.h,
32530	include/mailutils/list.h,include/mailutils/locker.h,
32531	include/mailutils/mailbox.h,include/mailutils/mailcap.h,
32532	include/mailutils/mailer.h,include/mailutils/message.h,
32533	include/mailutils/mime.h,include/mailutils/monitor.h,
32534	include/mailutils/mu_auth.h,include/mailutils/mutil.h,
32535	include/mailutils/nls.h,include/mailutils/observer.h,
32536	include/mailutils/parse822.h,include/mailutils/property.h,
32537	include/mailutils/refcount.h,include/mailutils/registrar.h,
32538	include/mailutils/stream.h,include/mailutils/tls.h,
32539	include/mailutils/types.h,include/mailutils/url.h,lib/md5.h,
32540	lib/mu_asprintf.h,lib/mu_dbm.h,lib/strsignal.c,
32541	libmu_scm/mu_address.c,libsieve/argp.c,libsieve/sieve.h,
32542	libsieve/sieve.l,libsieve/sieve.y,mail/alias.c,mail/decode.c,
32543	mail/folders.c,mail/mail.c,mail/mail.h,mail/mailline.c,
32544	mail/msgset.y,mail/send.c,mail/util.c,mail.local/mail.local.h,
32545	mail.local/main.c,mailbox/amd.c,mailbox/attribute.c,
32546	mailbox/auth.c,mailbox/body.c,mailbox/debug.c,mailbox/envelope.c,
32547	mailbox/filter.c,mailbox/filter_rfc822.c,mailbox/filter_trans.c,
32548	mailbox/folder.c,mailbox/header.c,mailbox/locker.c,
32549	mailbox/mailbox.c,mailbox/mailer.c,mailbox/message.c,
32550	mailbox/mu_argp.c,mailbox/mu_auth.c,mailbox/observer.c,
32551	mailbox/property.c,mailbox/registrar.c,mailbox/stream.c,
32552	mailbox/ticket.c,mailbox/wicket.c,mailbox/imap/folder.c,
32553	mailbox/imap/mbox.c,mailbox/include/amd.h,
32554	mailbox/include/attribute0.h,mailbox/include/auth0.h,
32555	mailbox/include/debug0.h,mailbox/include/envelope0.h,
32556	mailbox/include/filter0.h,mailbox/include/folder0.h,
32557	mailbox/include/header0.h,mailbox/include/imap0.h,
32558	mailbox/include/list0.h,mailbox/include/mailbox0.h,
32559	mailbox/include/mailer0.h,mailbox/include/message0.h,
32560	mailbox/include/observer0.h,mailbox/include/registrar0.h,
32561	mailbox/include/stream0.h,mailbox/include/url0.h,
32562	mailbox/maildir/maildir.h,mailbox/mbox/folder.c,
32563	mailbox/mbox/mbox.c,mailbox/mbox/mbox0.h,mailbox/nntp/folder.c,
32564	mailbox/nntp/mbox.c,mailbox/nntp/nntp0.h,mh/fmtcheck.c,mh/mh.h,
32565	mh/mh_alias.l,mh/mh_alias.y,mh/mh_format.c,mh/mh_getopt.h,
32566	mh/mh_list.c,mh/mh_msgset.c,mh/mhn.c,mh/pick.h,mh/refile.c,
32567	mh/scan.c,mh/sortm.c,readmsg/readmsg.c,readmsg/readmsg.h,
32568	sieve/sieve.c,include/mailutils/errno.hin: Remove __P() and
32569	__PMT() wrappers.
32570
325712005-08-15  Sergey Poznyakoff  <gray@gnu.org.ua>
32572
32573	* mh/mhn.c (has_nonascii,finish_text_msg): New functions
32574	(mhn_edit): Use quoted-printable encoding if the text contains
32575	non-ascii characters.
32576
325772005-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
32578
32579	* configure.ac: Add -lgnuradius to AUTHLIBS
32580	* auth/radius.c (mu_radius_argp_parser): Only run init() if radius
32581	auth is really required.
32582	(mu_radius_authenticate,mu_auth_radius_user_by_name)
32583	(mu_auth_radius_user_by_uid): Fail if the module was not
32584	initialized
32585	* mail/escape.c: Use strerror uniformly
32586
32587	* mailbox/argcv.c: Make handling of quotes consistent with shell
32588	rules. In particular, single quotes need not be quoted, and are
32589	not removed when appearing within a doubly-quoted string.
32590	* mailbox/testsuite/Argcv: Adapt to the modified argcv.c
32591
32592	* auth/radius.c: New file. Radius authentication/authorization.
32593	* auth/Makefile.am (libmuauth_la_SOURCES): Add radius.c. Sorted
32594	sources alphabetically
32595
32596	* examples/config/mailutils.dict: New file.
32597	* examples/config/Makefile.am (EXTRA_DIST): Add mailutils.dict.
32598	Sorted files alphabetically
32599
32600	* NEWS: Updated
32601	* configure.ac: Raised version number to 0.6.91.
32602	Check for libgnuradius (new option --disable/--enable-radius)
32603	At the end of configuration display the summary of enabled
32604	features.
32605
32606	* include/mailutils/mu_auth.h (mu_auth_radius_module): New module
32607	(MU_AUTH_REGISTER_ALL_MODULES): Register radius
32608	* m4/enable.m4 (MU_ENABLE_SUPPORT): Fixed quoting error. Allow
32609	action-if-true to disable the feature.
32610	* mailbox/mu_argp.c (mu_conf_option): Reflect radius capability.
32611
32612	* po/POTFILES.in: Updated
32613
326142005-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>
32615
32616	* mail/var.c: Renamed to ...
32617	* mail/escape.c: ... to fix a long-standing historical
32618	inconsistency.
32619	(var_shell,var_command,var_help,var_sign,var_bcc)
32620	(var_cc,var_deadletter,var_editor,var_print,var_headers)
32621	(var_insert,var_quote,var_type_input,var_read,var_subj)
32622	(var_to,var_visual,var_write,var_exit,var_pipe): Renamed:
32623	s/var_/escape_/. All callers updated
32624	* mail/Makefile.am,mail/mail.h,mail/table.c: Likewise
32625
32626	* include/mailutils/argcv.h (argcv_get_n): New function
32627	* mailbox/argcv.c: Likewise
32628
32629	* mail/alias.c (alias_iterate_first,alias_iterate_next)
32630	(alias_iterate_end): New functions for readline completion
32631	support.
32632	* mail/cd.c (mail_cd): Check chdir return value
32633	* mail/file.c (mail_expand_name): Do not proceed to opening the
32634	mailbox if failed to get its name
32635	* mail/help.c (mail_help): Use mail_command_help()
32636	* mail/list.c (mail_list): Use mail_command_list()
32637	* mail/mail.h (mail_command_entry): Rewritten
32638	(mail_escape_entry,struct mail_command): New data type
32639	(mail_command_table,mail_escape_table): Variables removed
32640	(util_find_entry): Change prototype
32641	(util_help,util_command_list)
32642	(mail_find_command,mail_find_escape,mail_command_help)
32643	(mail_escape_help,mail_command_list): New functions
32644	(util_help): Removed
32645	(alias_iterate_first,alias_iterate_next,alias_iterate_end)
32646	(var_iterate_first,var_iterate_next,var_iterate_end): New functions
32647	(file_compl,no_compl,msglist_compl,msglist_file_compl,dir_compl
32648	(command_compl,alias_compl,var_compl): New functions for readline
32649	completion support
32650	* mail/mailline.c (file_compl,no_compl,msglist_compl)
32651	(msglist_file_compl,dir_compl)
32652	(command_compl,alias_compl,var_compl): New functions for readline
32653	completion support
32654	* mail/send.c: Use mail_find_escape()
32655	* mail/table.c (mail_command_table,mail_escape_table): Changed
32656	data type
32657	(mail_find_command,mail_command_help,mail_command_list)
32658	(mail_command_name,mail_find_escape,mail_escape_help): New
32659	functions
32660	* mail/util.c: Rewritten mail variables support using list_t.
32661	(util_find_entry,util_help): Rewritten to work with opaque data
32662	tables
32663	(util_command_list): New function
32664	(var_iterate_first,var_iterate_next,var_iterate_end): New
32665	functions
32666	(util_folder_path): Convert folder to full name
32667	* mail/var.c: Use mail_find_command() and mail_escape_help().
32668	* mailbox/mbox/folder.c (get_pathname): Make sure no extra slash
32669	is inserted.
32670	* mailbox/list.c (list_to_array): Bugfix. The counter was not
32671	incremented.
32672
32673	* po/POTFILES.in: Add mail/cd.c
32674
326752005-08-10  Sergey Poznyakoff  <gray@gnu.org.ua>
32676
32677	* doc/rfc/rfc3501.txt: New file
32678	* doc/rfc/Makefile.am: Add rfc3501.txt
32679
32680	* imap4d/copy.c (imap4d_copy0): Minor improvement
32681	* imap4d/fetch.c (imap4d_fetch0): Ignore non-existing uids instead
32682	of diagnosing an error. This complies to RFC 3501.
32683	* imap4d/util.c (util_msgset): For message sets in form X:Y where
32684	Y is a not-existing UID greater than maximum UID value in the
32685	mailbox, replace Y with the latter.
32686
32687	* imap4d/testsuite/imap4d/IDEF0955.exp: Synchronize with the
32688	recent changes.
32689
326902005-07-26  Sergey Poznyakoff  <gray@gnu.org.ua>
32691
32692	* NEWS: Updated
32693
32694	* examples/mimetest.c: Produce more detailed diagnostics
32695	* mail/copy.c: Likewise
32696	* mail/quit.c: Likewise
32697	* mail/send.c: Likewise
32698	* mail/page.c (cond_page_invalidate): Bugfix
32699
32700	* mailbox/errors (MU_READ_ERROR): New error code
32701
32702	* include/mailutils/folder.h: Moved MU_FOLDER_ATTRIBUTE_.* to
32703	types.h
32704	* include/mailutils/types.h (MU_FOLDER_ATTRIBUTE_FILE)
32705	(MU_FOLDER_ATTRIBUTE_DIRECTORY): New defines
32706	* include/mailutils/registrar.h (_is_scheme, registrar_lookup):
32707	Take three arguments. All callers updated
32708	Raised path_record priority to 1000.
32709	* mailbox/registrar.c: Likewise
32710	* mailbox/folder.c: Updated calls to registrar_lookup and
32711	declarations of _is_scheme methods
32712	* mailbox/mailer.c: Likewise
32713	* mailbox/maildir/folder.c: Likewise
32714	* mailbox/mbox/folder.c: Likewise
32715	* mailbox/mh/folder.c: Likewise
32716
32717	* mailbox/list.c (_insert_item): Bugfix
32718	* mailbox/testsuite/mailbox/list.exp: New tests
32719	* mailbox/mailbox.c (mailbox_folder_create): New function
32720	(mailbox_create): Use mailbox_folder_create.
32721
32722	* mailbox/rfc2047.c (rfc2047_encode): Bugfix.
32723
32724	* mail/page.c (page_move): Fix start msg calculation
32725
32726	* include/mailutils/list.h (list_insert): Accept additional
32727	argument indicating whether to insert item before or after the
32728	reference one.
32729	* mailbox/list.c: Likewise
32730	* examples/listop.c (ins): New option 'before' allows to insert an
32731	item before another one.
32732	* mailbox/testsuite/mailbox/list.exp: Test new list operations.
32733	* mh/mh_alias.y: Updated list_insert invocations
32734	* mh/mh_format.c (builtin_putnum): Minor fix
32735
32736	* comsat/comsat.c: Use registrar_record instead of directly
32737	accessing registrar list.
32738	* examples/mimetest.c: Likewise
32739	* examples/msg-send.c: Likewise
32740	* examples/mta.c: Likewise
32741	* libmu_scm/mu_scm.c: Likewise
32742	* mail.local/main.c: Likewise
32743	* mail.remote/mail.remote.c: Likewise
32744
32745	* mailbox/registrar.c (registrar_get_list): Split into two
32746	calls. The registrar_get_list proper is deprecated.
32747	(registrar_get_iterator,registrar_lookup): New functions
32748	(registrar_record,unregistrar_record): Use _registrar_get_list
32749
32750	* mailbox/folder.c (folder_create): Rewritten using
32751	registrar_lookup()
32752	* mailbox/mailbox.c (mailbox_create): Likewise
32753	* mailbox/mailer.c (mailer_create): Likewise
32754
32755	* mailbox/sendmail.c: Updated declarations of struct _record
32756	objects.
32757	* mailbox/smtp.c: Likewise
32758	* mailbox/imap/folder.c: Likewise
32759	* mailbox/maildir/folder.c: Likewise
32760	* mailbox/mbox/folder.c: Likewise
32761	* mailbox/mh/folder.c: Likewise
32762	* mailbox/nntp/folder.c: Likewise
32763	* mailbox/pop/folder.c: Likewise
32764
32765	* include/mailutils/registrar.h (struct _record.priority): New
32766	member.
32767	(registrar_get_list): Mark as deprecated
32768	(registrar_get_iterator,registrar_lookup): New function
32769	(MU_IMAP_PRIO etc): New defines
32770	(mu_register_all_mbox_formats,mu_register_local_mbox_formats)
32771	(mu_register_remote_mbox_formats,mu_register_all_mailer_formats)
32772	(mu_register_extra_formats): Use registrar_record
32773
32774	* include/mailutils/types.h: Minor stylistic fix
32775
327762005-07-25  Sergey Poznyakoff  <gray@gnu.org.ua>
32777
32778	* mailbox/locker.c (locker_lock): Allow for non-absolute file
32779	names.
32780
327812005-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
32782
32783	* libsieve/extensions/vacation.c: Unconditionally include mu_dbm.h
32784	* mailbox/mutil.c (mu_get_homedir): Use EUID to determine user
32785	identity.
32786
327872005-07-08  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32788
32789	* mailbox/mime.c (_mime_get_param): Initialize was_quoted to
32790	0. Problem reported by Shashank Kavishwar <s_kavishwar@hotmail.com>.
32791
327922005-07-07  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32793
32794	* libsieve/actions.c: Fall back to "Sender:" and "From:" headers
32795	(in that order), if the envelope sender is not available.
32796
327972005-06-29  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32798
32799	* mailbox/argcv.c (argcv_scan): Improved scanning.
32800	* mailbox/testsuite/Argcv: New tests
32801
32802	* mailbox/argcv.c (argcv_scan,argcv_quoted_length)
32803	(argcv_quote_copy): Fixed handling of unmatched quotes.
32804
328052005-06-27  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32806
32807	* include/mailutils/argcv.h (argcv_unescape_char): Renamed to
32808	argcv_unquote_char
32809	(argcv_escape_char): Renamed to argcv_quote_char.
32810	(argcv_quoted_length,argcv_quote_copy): New functions
32811	* mailbox/argcv.c (argcv_scan,xtonum): Improved parser
32812	(argcv_unescape_char): Renamed to
32813	argcv_unquote_char
32814	(argcv_escape_char): Renamed to argcv_quote_char.
32815	(argcv_quoted_length,argcv_quote_copy): New functions
32816	(argcv_unquote_copy): (ex. unescape_copy): Fixed handling of
32817	escaped sequences.
32818	(argcv_get,argcv_free,argcv_string): Standardized return value.
32819
32820	* comsat/action.c: argcv_unescape_char renamed to argcv_unquote_char
32821	* libsieve/sieve.l: Likewise
32822
32823	* examples/argcv.c: New file
32824	* examples/Makefile.am: Add argcv.c
32825
32826	* mailbox/testsuite/Argcv: New file
32827	* mailbox/testsuite/mailbox/argcv.exp: New test
32828	* mailbox/testsuite/mailbox/DISTFILES: Add argcv.exp
32829
328302005-06-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32831
32832	* NEWS: Updated
32833	* README-alpha: Updated
32834	* include/mailutils/mailbox.h
32835	(mu_path_maildir,mu_path_folder_dir): Removed
32836	(mu_set_mail_directory,mu_set_folder_directory)
32837	(mu_mail_directory,mu_folder_directory)
32838	(mu_construct_user_mailbox_url,mailbox_get_flags): New functions.
32839	* mailbox/mbx_default.c: Likewise.
32840	* include/mailutils/mutil.h (mu_normalize_maildir): Renamed to
32841	(mu_normalize_mailbox_url)
32842	* libmu_scm/mu_mailbox.c (scm_mu_mail_directory)
32843	(scm_mu_folder_directory): New function
32844	* libmu_scm/mu_scm.c (_mu_scm_path_maildir)
32845	(_mu_scm_path_folder_dir): Removed
32846
32847	* auth/sql.c: Use mu_mail_directory, mu_folder_directory and
32848	related calls.
32849	* guimb/collect.c: Likewise.
32850	* mailbox/mu_argp.c: Likewise.
32851	* mailbox/mutil.c: Likewise.
32852	* mailbox/system.c: Likewise.
32853	* mh/comp.c: Likewise.
32854	* mh/folder.c: Likewise.
32855	* mh/forw.c: Likewise.
32856	* mh/mh_init.c: Likewise.
32857	* mh/mhn.c: Likewise.
32858	* mh/mhpath.c: Likewise.
32859	* mh/refile.c: Likewise.
32860	* mh/repl.c: Likewise.
32861	* mh/send.c: Likewise.
32862	* mh/whom.c: Likewise.
32863
32864	* mh/mh.h (mh_global_profile_get): Changed prototype.
32865	* mh/mh_global.c: Likewise.
32866
32867	* mailbox/imap/mbox.c (imap_messages_count): Use SELECT or EXAMINE
32868	depending on the mailbox status.
32869	(imap_expunge): Return EACCES if the mailbox is read-only
32870
32871	* examples/http.c: Accept up to two arguments: hostname to connect
32872	to and URL of the page to get.
32873
32874	* imap4d/close.c: Do not attempt to flush a mailbox opened in
32875	read-only mode.
32876
32877	* mail/file.c (mail_file): Invalidate current page map.
32878	* mail/mail.h: Updated
32879	* mail/page.c (set_cursor): Use page_move(0) to correctly update
32880	the map.
32881
32882	* mailbox/errors (MU_ERR_BAD_FILENAME): New error code.
32883	* mailbox/mailbox.c (mailbox_get_flags): New function
32884
32885	* imap4d/util.c: Minor correction
32886	* mail/decode.c: Likewise
32887	* mail.local/main.c: Likewise
32888	* frm/from.c: Removed unused variable
32889
328902005-06-15  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32891
32892	* examples/mta.c (mta_smtp): Fixed race condition between printing
32893	the port number, which will be used by the testsuite, and actually
32894	starting to listen on that port.
32895	* mail/page.c: New file. Implements an abstract output page.
32896	* mail/Makefile.am (mail_SOURCES): Add page.c. Alphabetized
32897	sources.
32898
32899	* mail/delete.c, mail/edit.c, mail/eq.c, mail/file.c,
32900	mail/followup.c, mail/from.c, mail/headers.c, mail/hold.c,
32901	mail/mail.c, mail/mailline.c, mail/mbox.c, mail/msgset.y,
32902	mail/next.c, mail/previous.c, mail/print.c, mail/reply.c,
32903	mail/size.c, mail/summary.c, mail/top.c, mail/touch.c,
32904	mail/undelete.c, mail/util.c, mail/visual.c, mail/write.c,
32905	mail/z.c: Use new pager functions.
32906
32907	* mail/mail.h: New declarations
32908
32909	* mail/testsuite/mail/z.exp: Fixed tests to match our improved
32910	output.
32911
329122005-06-13  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32913
32914	* mailbox/amd.c (amd_expunge): Unlink the message file if
32915	msg_file_name returns NULL.
32916	* mailbox/maildir/mbox.c (maildir_message_name): Return NULL for
32917	deleted messages.
32918
32919	* mailbox/include/stream0.h (struct rbuffer.count): Changed type
32920	to size_t. Reported by Joseph Caputo <caputo@qedinfo.com>
32921	* mailbox/stream.c (refill): Removed useless typecast
32922
32923	* mail/util.c (util_save_outgoing): Rewritten using mailbox
32924	functions. `set record' can now point to any valid mailbox type.
32925
329262005-06-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32927
32928	* frm/common.c (get_charset): Make sure output_charset is not NULL.
32929
329302005-06-06  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32931
32932	* mailbox/amd.c (amd_envelope_date): Always convert date to ctime
32933	format.
32934
329352005-05-31  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32936
32937	* mailbox/maildir/mbox.c (maildir_uniq): Fix memory overwrite.
32938
329392005-05-27  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32940
32941	* mailbox/amd.c (amd_envelope_date): Reformat Delivery-Date value
32942	to standard ctime format. Fix memory leak.
32943	(amd_envelope_sender): Propagate return from header_aget_value()
32944	back to the caller.
32945	* mailbox/mbox/mbox.c (restore_sender,restore_date): New
32946	functions.
32947	(mbox_append_message0): Use above functions to create sender/date
32948	values if these are not supplied.
32949	* movemail/movemail.c (move_message): Fix error diagnostics format.
32950
329512005-05-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32952
32953	* examples/Makefile.am (noinst_PROGRAMS): Add encode2047. Sorted
32954	alphabetically.
32955	* examples/encode2047.c: New file.
32956	* examples/base64.c (main): Add option -E (encoding). The program
32957	can now be used to test any encoder/decoder filters, so its name
32958	is kind of misnomer.
32959	* mailbox/errors (MU_ERR_BAD_2047_ENCODING): New error code.
32960	* mailbox/filter_trans.c (qp_encode): Do not keep track of the
32961	whitespace. Proposed by Amit Jhawar <ajhawar@frontbridge.com>.
32962	(Q_printable_char_p): TAB is not a printable char.
32963	(Q_encode): Bugfix: 0x20 is represented by underscore, not vice
32964	versa.
32965	* mailbox/rfc2047.c (rfc2047_encode): Bugfix. Use proper encoding
32966	types. Convert "base64" to "B" and "quoted-printable" to
32967	"Q". Check return values from stream creation functions. Do not
32968	destroy input_stream if output_stream was destroyed (prevents
32969	coredump).
32970	* scripts/config.rpath: Removed automatically generated file.
32971	* THANKS: Added Kidong Lee and Amit Jhawar.
32972	* examples/.cvsignore: Add encode2047. Sort entries.
32973
329742005-05-23  Kidong Lee  <briankdlee@yahoo.com>
32975
32976	* mailbox/rfc2047.c (rfc2047_encode): Rewritten using filters
32977	and streams.
32978
329792005-05-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32980
32981	* mailbox/mutil.c: include <sys/select.h>
32982	* lib/mailcap.c: Provide a replacement for FNM_CASEFOLD
32983	Reported by Jerry Heyman <heymanj@acm.org>.
32984
32985	* configure.ac: Compute the value of ULONG_MAX for use in the
32986	testsute.
32987	* imap4d/testsuite/Makefile.am (site.exp): Set MU_ULONG_MAX
32988	* imap4d/testsuite/imap4d/IDEF0955.exp: Compute upper limit for
32989	the message set spec based on the value of MU_ULONG_MAX.
32990	* imap4d/testsuite/imap4d/IDEF0956.exp: Likewise
32991
329922005-05-20  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32993
32994	* imap4d/fetch.c (fetch_getcommand): Changed proto to make gcc 4.0
32995	happy.
32996
329972005-05-19  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
32998
32999	* auth/sql.c (sql_escape_string): Escape backslashes.
33000
33001	The sources before this point are tagged alpha_0_6_90.
33002
330032005-05-17  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
33004
33005	* configure.ac: Updated FSF address. Raised version number to
33006	0.6.90
33007
33008	Updated FSF address:
33009
33010	* COPYING, COPYING.LESSER, Makefile.am, NEWS,
33011	auth/Makefile.am, auth/gsasl.c, auth/lbuf.c, auth/lbuf.h,
33012	auth/pam.c, auth/sql.c, auth/sql.h, auth/tls.c,
33013	auth/virtual.c, comsat/Makefile.am, comsat/action.c,
33014	comsat/cfg.c, comsat/comsat.c, comsat/comsat.h,
33015	config/Makefile.am, config/mailutils-config.c,
33016	doc/Makefile.am, doc/man/Makefile.am, doc/rfc/Makefile.am,
33017	doc/texinfo/COPYING.DOC, doc/texinfo/Makefile.am,
33018	doc/texinfo/fdl.texi, doc/texinfo/mailutils.texi,
33019	doc/texinfo/muint.texi, dotlock/Makefile.am,
33020	dotlock/dotlock.c, examples/Makefile.am, examples/addr.c,
33021	examples/base64.c, examples/decode2047.c, examples/http.c,
33022	examples/iconv.c, examples/listop.c, examples/mailcap.c,
33023	examples/mimetest.c, examples/msg-send.c,
33024	examples/mta.c, examples/muemail.c, examples/murun.c,
33025	examples/nntpclient.c, examples/numaddr.c,
33026	examples/pop3client.c, examples/sfrom.c,
33027	examples/url-parse.c, examples/config/Makefile.am,
33028	examples/cpp/Makefile.am, examples/scheme/Makefile.am,
33029	examples/scheme/reply.scm, frm/Makefile.am,
33030	frm/common.c, frm/frm.c, frm/frm.h, frm/from.c,
33031	frm/testsuite/Makefile.am, frm/testsuite/frm/test.exp,
33032	guimb/Makefile.am, guimb/collect.c, guimb/guimb.h,
33033	guimb/main.c, guimb/util.c, guimb/scm/Makefile.am,
33034	guimb/scm/mimeheader.scm, guimb/scm/numaddr.scm,
33035	guimb/scm/redirect.scm, guimb/scm/reject.scm,
33036	guimb/scm/sieve-core.scm, guimb/scm/sieve.scm.in,
33037	guimb/scm/vacation.scm, imap4d/Makefile.am,
33038	imap4d/append.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c,
33039	imap4d/authenticate.c, imap4d/bye.c, imap4d/capability.c,
33040	imap4d/check.c, imap4d/close.c, imap4d/commands.c,
33041	imap4d/copy.c, imap4d/create.c, imap4d/delete.c,
33042	imap4d/examine.c, imap4d/expunge.c, imap4d/fetch.c,
33043	imap4d/idle.c, imap4d/imap4d.c, imap4d/imap4d.h,
33044	imap4d/list.c, imap4d/login.c, imap4d/logout.c,
33045	imap4d/lsub.c, imap4d/namespace.c, imap4d/noop.c,
33046	imap4d/rename.c, imap4d/search.c, imap4d/select.c,
33047	imap4d/signal.c, imap4d/starttls.c, imap4d/status.c,
33048	imap4d/store.c, imap4d/subscribe.c, imap4d/sync.c,
33049	imap4d/uid.c, imap4d/unsubscribe.c, imap4d/util.c,
33050	imap4d/version.c, imap4d/testsuite/Makefile.am,
33051	imap4d/testsuite/imap4d/IDEF0955.exp,
33052	imap4d/testsuite/imap4d/IDEF0956.exp,
33053	imap4d/testsuite/imap4d/anystate.exp,
33054	imap4d/testsuite/imap4d/append.exp,
33055	imap4d/testsuite/imap4d/create.exp,
33056	imap4d/testsuite/imap4d/examine.exp,
33057	imap4d/testsuite/imap4d/expunge.exp,
33058	imap4d/testsuite/imap4d/fetch.exp,
33059	imap4d/testsuite/imap4d/list.exp,
33060	imap4d/testsuite/imap4d/search.exp,
33061	imap4d/testsuite/imap4d/x.exp,
33062	imap4d/testsuite/lib/imap4d.exp,
33063	include/Makefile.am, include/mailutils/Makefile.am,
33064	include/mailutils/address.h, include/mailutils/argcv.h,
33065	include/mailutils/argp.h, include/mailutils/attribute.h,
33066	include/mailutils/auth.h, include/mailutils/body.h,
33067	include/mailutils/daemon.h, include/mailutils/debug.h,
33068	include/mailutils/envelope.h, include/mailutils/errno.hin,
33069	include/mailutils/error.h, include/mailutils/filter.h,
33070	include/mailutils/folder.h, include/mailutils/gsasl.h,
33071	include/mailutils/guile.h, include/mailutils/header.h,
33072	include/mailutils/iterator.h, include/mailutils/libsieve.h,
33073	include/mailutils/list.h, include/mailutils/locker.h,
33074	include/mailutils/mailbox.h, include/mailutils/mailcap.h,
33075	include/mailutils/mailer.h, include/mailutils/mailutils.h,
33076	include/mailutils/message.h, include/mailutils/mime.h,
33077	include/mailutils/monitor.h, include/mailutils/mu_auth.h,
33078	include/mailutils/mutil.h, include/mailutils/nls.h,
33079	include/mailutils/nntp.h, include/mailutils/observer.h,
33080	include/mailutils/parse822.h, include/mailutils/pop3.h,
33081	include/mailutils/property.h, include/mailutils/refcount.h,
33082	include/mailutils/registrar.h, include/mailutils/sql.h,
33083	include/mailutils/stream.h, include/mailutils/tls.h,
33084	include/mailutils/types.h, include/mailutils/url.h,
33085	include/mailutils/gnu/Makefile.am,
33086	include/mailutils/sys/Makefile.am,
33087	include/mailutils/sys/nntp.h, include/mailutils/sys/pop3.h,
33088	lib/Makefile.am, lib/allocsa.c, lib/allocsa.h,
33089	lib/asprintf.c, lib/daemon.c, lib/error.c, lib/error.h,
33090	lib/exit.h, lib/exitfail.c, lib/exitfail.h,
33091	lib/fnmatch_.h, lib/fnmatch_loop.c, lib/getpass.c,
33092	lib/getpass.h, lib/mailcap.c, lib/malloc.c,
33093	lib/mbswidth.c, lib/mbswidth.h, lib/mu_asprintf.h,
33094	lib/mu_dbm.c, lib/mu_dbm.h, lib/obstack.c, lib/obstack.h,
33095	lib/realloc.c, lib/setenv.c, lib/setenv.h, lib/snprintf.c,
33096	lib/snprintf.h, lib/stdbool_.h, lib/unsetenv.c, lib/utmp.c,
33097	lib/vasprintf.c, lib/vasprintf.h, lib/xalloc.h,
33098	lib/xalloc_die.c, lib/xmalloc.c, lib/xsize.h,
33099	lib/xstrtol.c, lib/xstrtol.h, libmu_scm/Makefile.am,
33100	libmu_scm/mailutils.scm.in, libmu_scm/mu_address.c,
33101	libmu_scm/mu_body.c, libmu_scm/mu_guimb.c,
33102	libmu_scm/mu_logger.c, libmu_scm/mu_mailbox.c,
33103	libmu_scm/mu_message.c, libmu_scm/mu_mime.c,
33104	libmu_scm/mu_port.c, libmu_scm/mu_scm.c,
33105	libmu_scm/mu_scm.h, libmu_scm/mu_util.c,
33106	libsieve/Makefile.am, libsieve/actions.c, libsieve/argp.c,
33107	libsieve/comparator.c, libsieve/load.c, libsieve/prog.c,
33108	libsieve/register.c, libsieve/relational.c,
33109	libsieve/require.c, libsieve/runtime.c, libsieve/sieve.h,
33110	libsieve/sieve.l, libsieve/sieve.y, libsieve/tests.c,
33111	libsieve/util.c, libsieve/extensions/Makefile.am,
33112	libsieve/extensions/list.c, libsieve/extensions/spamd.c,
33113	libsieve/extensions/timestamp.c,
33114	libsieve/extensions/vacation.c, m4/db2.m4, m4/enable.m4,
33115	m4/gnulib.m4, m4/gsasl.m4, m4/guile.m4, m4/mu_libobj.m4,
33116	m4/tls.m4, mail/Makefile.am, mail/alias.c,
33117	mail/alt.c, mail/cd.c, mail/copy.c, mail/decode.c,
33118	mail/delete.c, mail/dp.c, mail/echo.c, mail/edit.c,
33119	mail/eq.c, mail/exit.c, mail/file.c, mail/folders.c,
33120	mail/followup.c, mail/from.c, mail/headers.c, mail/help.c,
33121	mail/hold.c, mail/if.c, mail/inc.c, mail/list.c,
33122	mail/mail.c, mail/mail.h, mail/mailline.c, mail/mbox.c,
33123	mail/msgset.y, mail/next.c, mail/pipe.c, mail/previous.c,
33124	mail/print.c, mail/quit.c, mail/reply.c, mail/retain.c,
33125	mail/save.c, mail/send.c, mail/set.c, mail/setenv.c,
33126	mail/shell.c, mail/size.c, mail/source.c, mail/summary.c,
33127	mail/table.c, mail/tag.c, mail/top.c, mail/touch.c,
33128	mail/unalias.c, mail/undelete.c, mail/unset.c,
33129	mail/util.c, mail/var.c, mail/version.c, mail/visual.c,
33130	mail/write.c, mail/z.c, mail/testsuite/Makefile.am,
33131	mail/testsuite/lib/mail.exp, mail/testsuite/mail/alias.exp,
33132	mail/testsuite/mail/folder.exp,
33133	mail/testsuite/mail/read.exp, mail/testsuite/mail/send.exp,
33134	mail/testsuite/mail/tag.exp, mail/testsuite/mail/write.exp,
33135	mail/testsuite/mail/z.exp, mail.local/Makefile.am,
33136	mail.local/mail.local.h, mail.local/mailquota.c,
33137	mail.local/main.c, mail.local/script.c,
33138	mail.local/testsuite/Data,
33139	mail.local/testsuite/Makefile.am,
33140	mail.local/testsuite/lib/mail.local.exp,
33141	mail.local/testsuite/mail.local/deliver.exp,
33142	mail.remote/Makefile.am, mail.remote/mail.remote.c,
33143	mail.remote/testsuite/Data,
33144	mail.remote/testsuite/Makefile.am,
33145	mail.remote/testsuite/lib/mail.remote.exp,
33146	mail.remote/testsuite/mail.remote/send.exp,
33147	mailbox/Makefile.am, mailbox/address.c, mailbox/alloca_.h,
33148	mailbox/amd.c, mailbox/argcv.c, mailbox/argp-ba.c,
33149	mailbox/argp-eexst.c, mailbox/argp-fmtstream.c,
33150	mailbox/argp-fmtstream.h, mailbox/argp-fs-xinl.c,
33151	mailbox/argp-help.c, mailbox/argp-namefrob.h,
33152	mailbox/argp-parse.c, mailbox/argp-pv.c,
33153	mailbox/argp-pvh.c, mailbox/argp-xinl.c, mailbox/argp.h,
33154	mailbox/asnprintf.c, mailbox/attachment.c,
33155	mailbox/attribute.c, mailbox/auth.c, mailbox/body.c,
33156	mailbox/daemon.c, mailbox/date.c, mailbox/debug.c,
33157	mailbox/envelope.c, mailbox/errors, mailbox/fgetpwent.c,
33158	mailbox/file_stream.c, mailbox/filter.c,
33159	mailbox/filter_iconv.c, mailbox/filter_rfc822.c,
33160	mailbox/filter_trans.c, mailbox/folder.c,
33161	mailbox/getline.c, mailbox/getline.h, mailbox/getndelim2.c,
33162	mailbox/getndelim2.h, mailbox/getopt.c,
33163	mailbox/getopt1.c, mailbox/getopt_.h, mailbox/getopt_int.h,
33164	mailbox/gettext.h, mailbox/header.c, mailbox/iterator.c,
33165	mailbox/list.c, mailbox/locale.c, mailbox/locker.c,
33166	mailbox/mailbox.c, mailbox/mailcap.c, mailbox/mailer.c,
33167	mailbox/mapfile_stream.c, mailbox/mbx_default.c,
33168	mailbox/md5.c, mailbox/md5.h, mailbox/memory_stream.c,
33169	mailbox/mempcpy.c, mailbox/mempcpy.h, mailbox/message.c,
33170	mailbox/mime.c, mailbox/minmax.h, mailbox/monitor.c,
33171	mailbox/mu_argp.c, mailbox/mu_auth.c, mailbox/muerrno.cin,
33172	mailbox/muerror.c, mailbox/munre.c, mailbox/mutil.c,
33173	mailbox/nls.c, mailbox/observer.c, mailbox/parse822.c,
33174	mailbox/parsedate.y, mailbox/printf-args.c,
33175	mailbox/printf-args.h, mailbox/printf-parse.c,
33176	mailbox/printf-parse.h, mailbox/property.c,
33177	mailbox/regex.c, mailbox/regex.h, mailbox/registrar.c,
33178	mailbox/rfc2047.c, mailbox/sendmail.c, mailbox/smtp.c,
33179	mailbox/strcase.h, mailbox/strcasecmp.c,
33180	mailbox/strchrnul.c, mailbox/strchrnul.h,
33181	mailbox/stream.c, mailbox/strndup.c, mailbox/strndup.h,
33182	mailbox/strnlen.c, mailbox/strtok_r.c, mailbox/strtok_r.h,
33183	mailbox/sysexit_.h, mailbox/system.c, mailbox/tcp.c,
33184	mailbox/ticket.c, mailbox/unlocked-io.h, mailbox/url.c,
33185	mailbox/url_sendmail.c, mailbox/url_smtp.c,
33186	mailbox/vasnprintf.c, mailbox/vasnprintf.h,
33187	mailbox/vsnprintf.c, mailbox/vsnprintf.h, mailbox/wicket.c,
33188	mailbox/xsize.h, mailbox/imap/Makefile.am,
33189	mailbox/imap/folder.c, mailbox/imap/mbox.c,
33190	mailbox/imap/url.c, mailbox/include/Makefile.am,
33191	mailbox/include/address0.h, mailbox/include/amd.h,
33192	mailbox/include/attribute0.h, mailbox/include/auth0.h,
33193	mailbox/include/body0.h, mailbox/include/debug0.h,
33194	mailbox/include/envelope0.h, mailbox/include/filter0.h,
33195	mailbox/include/folder0.h, mailbox/include/header0.h,
33196	mailbox/include/imap0.h, mailbox/include/iterator0.h,
33197	mailbox/include/list0.h, mailbox/include/mailbox0.h,
33198	mailbox/include/mailer0.h, mailbox/include/message0.h,
33199	mailbox/include/mime0.h, mailbox/include/monitor0.h,
33200	mailbox/include/observer0.h, mailbox/include/property0.h,
33201	mailbox/include/registrar0.h, mailbox/include/stream0.h,
33202	mailbox/include/url0.h, mailbox/maildir/Makefile.am,
33203	mailbox/maildir/folder.c, mailbox/maildir/maildir.h,
33204	mailbox/maildir/mbox.c, mailbox/mbox/Makefile.am,
33205	mailbox/mbox/folder.c, mailbox/mbox/mbox.c,
33206	mailbox/mbox/mbox0.h, mailbox/mbox/mboxscan.c,
33207	mailbox/mbox/url.c, mailbox/mh/Makefile.am,
33208	mailbox/mh/folder.c, mailbox/mh/mbox.c,
33209	mailbox/nntp/Makefile.am, mailbox/nntp/folder.c,
33210	mailbox/nntp/mbox.c, mailbox/nntp/nntp0.h,
33211	mailbox/nntp/nntp_article.c, mailbox/nntp/nntp_body.c,
33212	mailbox/nntp/nntp_carrier.c, mailbox/nntp/nntp_connect.c,
33213	mailbox/nntp/nntp_create.c, mailbox/nntp/nntp_date.c,
33214	mailbox/nntp/nntp_debug.c, mailbox/nntp/nntp_destroy.c,
33215	mailbox/nntp/nntp_disconnect.c, mailbox/nntp/nntp_group.c,
33216	mailbox/nntp/nntp_head.c, mailbox/nntp/nntp_help.c,
33217	mailbox/nntp/nntp_ihave.c, mailbox/nntp/nntp_last.c,
33218	mailbox/nntp/nntp_list_active.c,
33219	mailbox/nntp/nntp_list_distribpats.c,
33220	mailbox/nntp/nntp_list_distributions.c,
33221	mailbox/nntp/nntp_list_extensions.c,
33222	mailbox/nntp/nntp_list_newsgroups.c,
33223	mailbox/nntp/nntp_list_times.c,
33224	mailbox/nntp/nntp_mode_reader.c,
33225	mailbox/nntp/nntp_newgroups.c, mailbox/nntp/nntp_newnews.c,
33226	mailbox/nntp/nntp_next.c, mailbox/nntp/nntp_post.c,
33227	mailbox/nntp/nntp_quit.c, mailbox/nntp/nntp_readline.c,
33228	mailbox/nntp/nntp_response.c, mailbox/nntp/nntp_sendline.c,
33229	mailbox/nntp/nntp_stat.c, mailbox/nntp/nntp_stream.c,
33230	mailbox/nntp/nntp_timeout.c, mailbox/nntp/url.c,
33231	mailbox/pop/Makefile.am, mailbox/pop/folder.c,
33232	mailbox/pop/mbox.c, mailbox/pop/pop3_apop.c,
33233	mailbox/pop/pop3_capa.c, mailbox/pop/pop3_carrier.c,
33234	mailbox/pop/pop3_connect.c, mailbox/pop/pop3_create.c,
33235	mailbox/pop/pop3_debug.c, mailbox/pop/pop3_dele.c,
33236	mailbox/pop/pop3_destroy.c, mailbox/pop/pop3_disconnect.c,
33237	mailbox/pop/pop3_list.c, mailbox/pop/pop3_lista.c,
33238	mailbox/pop/pop3_noop.c, mailbox/pop/pop3_pass.c,
33239	mailbox/pop/pop3_quit.c, mailbox/pop/pop3_readline.c,
33240	mailbox/pop/pop3_response.c, mailbox/pop/pop3_retr.c,
33241	mailbox/pop/pop3_rset.c, mailbox/pop/pop3_sendline.c,
33242	mailbox/pop/pop3_stat.c, mailbox/pop/pop3_stls.c,
33243	mailbox/pop/pop3_stream.c, mailbox/pop/pop3_timeout.c,
33244	mailbox/pop/pop3_top.c, mailbox/pop/pop3_uidl.c,
33245	mailbox/pop/pop3_uidla.c, mailbox/pop/pop3_user.c,
33246	mailbox/pop/url.c, mailbox/testsuite/Addrs,
33247	mailbox/testsuite/Mailcap, mailbox/testsuite/Makefile.am,
33248	mailbox/testsuite/Mime, mailbox/testsuite/RFC2047,
33249	mailbox/testsuite/Urls, mailbox/testsuite/lib/mailbox.exp,
33250	mailbox/testsuite/mailbox/address.exp,
33251	mailbox/testsuite/mailbox/base64.exp,
33252	mailbox/testsuite/mailbox/list.exp,
33253	mailbox/testsuite/mailbox/mailcap.exp,
33254	mailbox/testsuite/mailbox/mime.exp,
33255	mailbox/testsuite/mailbox/rfc2047.exp,
33256	mailbox/testsuite/mailbox/url.exp, messages/Makefile.am,
33257	messages/messages.c, messages/testsuite/Makefile.am,
33258	messages/testsuite/messages/test.exp, mh/Makefile.am,
33259	mh/ali.c, mh/anno.c, mh/comp.c, mh/compcommon.c,
33260	mh/fmtcheck.c, mh/folder.c, mh/forw.c, mh/inc.c,
33261	mh/install-mh.c, mh/mailutils-mh.eli, mh/mark.c, mh/mh.h,
33262	mh/mh_alias.l, mh/mh_alias.y, mh/mh_argp.c, mh/mh_ctx.c,
33263	mh/mh_error.c, mh/mh_fmtgram.y, mh/mh_format.c,
33264	mh/mh_getopt.c, mh/mh_getopt.h, mh/mh_global.c,
33265	mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c,
33266	mh/mh_sequence.c, mh/mh_stream.c, mh/mh_whatnow.c,
33267	mh/mh_whom.c, mh/mhl.c, mh/mhn.c, mh/mhparam.c,
33268	mh/mhpath.c, mh/pick.c, mh/pick.h, mh/pick.y, mh/refile.c,
33269	mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
33270	mh/sortm.c, mh/whatnow.c, mh/whom.c, mimeview/Makefile.am,
33271	mimeview/mimetypes.l, mimeview/mimetypes.y,
33272	mimeview/mimeview.c, mimeview/mimeview.h,
33273	movemail/Makefile.am, movemail/movemail.c,
33274	po/.cvsignore, po/ca.po, po/es.po, po/fr.po, po/pl.po,
33275	po/ro.po, po/ru.po, po/uk.po, pop3d/Makefile.am,
33276	pop3d/apop.c, pop3d/auth.c, pop3d/capa.c, pop3d/dele.c,
33277	pop3d/expire.c, pop3d/extra.c, pop3d/list.c, pop3d/lock.c,
33278	pop3d/logindelay.c, pop3d/noop.c, pop3d/pop3d.c,
33279	pop3d/pop3d.h, pop3d/popauth.c, pop3d/quit.c,
33280	pop3d/retr.c, pop3d/rset.c, pop3d/signal.c, pop3d/stat.c,
33281	pop3d/stls.c, pop3d/top.c, pop3d/uidl.c, pop3d/user.c,
33282	pop3d/testsuite/Makefile.am, pop3d/testsuite/lib/pop3d.exp,
33283	pop3d/testsuite/pop3d/read.exp, readmsg/Makefile.am,
33284	readmsg/msglist.c, readmsg/readmsg.c,
33285	readmsg/readmsg.h, readmsg/testsuite/Makefile.am,
33286	readmsg/testsuite/readmsg/test.exp,
33287	scripts/Makefile.am, scripts/config.rpath,
33288	scripts/generr.awk, scripts/texify.sed,
33289	scripts/ylwrap, scripts/guile-1.4/Makefile.am,
33290	scripts/guile-1.4/guile-doc-snarf,
33291	scripts/guile-1.4/guile-func-name-check,
33292	scripts/guile-1.4/guile-snarf.awk,
33293	scripts/guile-1.6/Makefile.am,
33294	scripts/guile-1.6/guile-doc-snarf,
33295	scripts/guile-1.6/guile-doc-snarf.awk, sieve/Makefile.am,
33296	sieve/sieve.c, sieve/testsuite/Makefile.am,
33297	sieve/testsuite/Redirect, sieve/testsuite/Reject,
33298	sieve/testsuite/lib/sieve.exp,
33299	sieve/testsuite/sieve/action.exp,
33300	sieve/testsuite/sieve/address.exp,
33301	sieve/testsuite/sieve/allof.exp,
33302	sieve/testsuite/sieve/anyof.exp,
33303	sieve/testsuite/sieve/envelope.exp,
33304	sieve/testsuite/sieve/exists.exp,
33305	sieve/testsuite/sieve/ext.exp,
33306	sieve/testsuite/sieve/false.exp,
33307	sieve/testsuite/sieve/header.exp,
33308	sieve/testsuite/sieve/i-casemap.exp,
33309	sieve/testsuite/sieve/i-numeric.exp,
33310	sieve/testsuite/sieve/i-octet.exp,
33311	sieve/testsuite/sieve/mul-addr.exp,
33312	sieve/testsuite/sieve/not.exp,
33313	sieve/testsuite/sieve/redirect.exp,
33314	sieve/testsuite/sieve/reject.exp,
33315	sieve/testsuite/sieve/relational.exp,
33316	sieve/testsuite/sieve/size.exp,
33317	sieve/testsuite/sieve/true.exp, sql/Makefile.am,
33318	sql/mysql.c, sql/odbc.c, sql/postgres.c, sql/sql.c,
33319	testsuite/Makefile.am, testsuite/makespool,
33320	testsuite/lib/mailutils.exp
33321
333222005-05-13  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
33323
33324	* imap4d/fetch.c (imap4d_fetch0): Reduce memory consumption within
33325	the mailbox scanning loop. Break the loop when an invalid msgno is
33326	encountered or the message cannot be retrieved.
33327	(fetch_io): Check for integer overflow (IDEF0956).
33328	(fetch_full,fetch_rfc822_header,fetch_rfc822_text)
33329	(fetch_operation): Propagate return value back to the caller.
33330
33331	* imap4d/util.c (util_finish): Fix potential vulnerability
33332	(IDEF0954).
33333	(util_msgset): Do not allow values greater than the maximum id
33334	number (either message number or UID) in the mailbox. Fixes (IDEF0955).
33335
33336	* mailbox/header.c (header_get_field_name): Fix buffer overflow
33337	(IDEF0957).
33338
33339	* doc/texinfo/sieve.texi: Fix typo
33340
33341	* imap4d/testsuite/imap4d/IDEF0955.exp: New test
33342	* imap4d/testsuite/imap4d/IDEF0956.exp: New test
33343	* imap4d/testsuite/imap4d/DISTFILES: Add new files
33344
333452005-05-11  Sergey Poznyakoff
33346
33347	* mailbox/parsedate.y (DATE_INIT): Bugfix. Several fields in
33348	struct pd_date are used regardless of .mask, so it is better to
33349	zero out the entire structure.
33350
333512005-03-25  Sergey Poznyakoff
33352
33353	* NEWS: Updated
33354	* mail/decode.c (display_message0): Do not interpret MIME
33355	parts if metamail is unset.
33356	* mail/mail.c (default_setup): Set metamail
33357	* testsuite/etc/mail.rc: Unset metamail
33358	* doc/texinfo/programs.texi: Updated metamail documentation
33359
333602005-03-18  Sergey Poznyakoff
33361
33362	* TODO: Updated
33363	* README-alpha: Updated
33364	* mail/shell.c (mail_execute): Restore argv[0] before exiting,
33365	else argcv_free coredumps.
33366
333672005-03-15  Sergey Poznyakoff
33368
33369	* mailbox/mailbox.c (mailbox_flush): Do not re-save all messages
33370	if the mailbox was opened in append mode.
33371
333722005-03-14  Sergey Poznyakoff
33373
33374	* mimeview/mimetypes.l (<HEX>): Bugfix
33375	* mimeview/mimetypes.y (b_string): Bugfix
33376
333772005-03-13  Sergey Poznyakoff
33378
33379	Sources are tagged alpha_0_6_1
33380
33381	* Makefile.am (SUBDIRS): Reordered. Due to the specifics
33382	of gnulib imports, libmailutils depends on libmailbox.
33383	Added config/.
33384	* configure.ac (AC_CONFIG_FILES): Added config/Makefile
33385	* lib/mailcap.c (mime_context_fill): Return integer code
33386	(display_stream_mailcap): Bail out if mime_context_fill
33387	returns 1
33388
33389	* mailbox/Makefile.am: Removed mailutils-config.c. It should
33390	live in a separate directory to satisfy interlibrary dependencies.
33391	* mailbox/mailutils-config.c: Moved to config
33392	* config: New directory
33393	* config/mailutils-config.c: New file
33394	* config/Makefile.am: New file
33395
33396	* po/POTFILES.in: Updated
33397
333982005-03-13  Sergey Poznyakoff
33399
33400	* lib/mailcap.c Include ctype.h
33401	(mime_context_fill): Remove leading whitespace
33402	when preparing lists.
33403	(mime_context_get_content_type_value): Return integer code.
33404	(expand_string): Fixed expansion of %{name}
33405	* mh/send.c: Use gettext markers in verbose diagnostics.
33406
334072005-03-12  Sergey Poznyakoff
33408
33409	* README: Updated. Switch to outline mode.
33410	* README-alpha: Updated. Switch to outline mode.
33411	* mailbox/mutil.c: Minor indentation fix
33412	* mailbox/pop/pop3_sendline.c: Do not redefine _GNU_SOURCE
33413	* mailbox/nntp/nntp_sendline.c: Likewise
33414
334152005-03-12  Sergey Poznyakoff
33416
33417	* lib/mailcap.c: New file. Routines for displaying MIME
33418	messages.
33419	* lib/Makefile.am: Added mailcap.c
33420	* mimeview/mimeview.c: Rewritten using display_stream_mailcap.
33421	* mail/decode.c: Implemented built-in mailcap mechanism
33422	* mail/Makefile.am: (mail_LDADD): Changed order of loading
33423	libmailutils/libmailbox
33424	* mimeview/Makefile.am (mimeview_LDADD): Likewise
33425	* doc/texinfo/programs.texi (mail): Documented variable
33426	mimenoask
33427	* po/POTFILES.in: Updated
33428	* examples/mta.c (header): Removed unused global
33429	* NEWS: Updated
33430
334312005-03-10  Sergey Poznyakoff
33432
33433	* TODO: Updated
33434	* imap4d/imap4d.h (define _GNU_SOURCE): Removed. Defined
33435	in config.h
33436	* mailbox/mailcap.c (mu_mailcap_entry_get_value): Bugfix: return
33437	ENOENT if no matching entry is found.
33438	* mailbox/mutil.c (mu_true_answer_p): Ignore leading whitespace.
33439	* mh/mh_init.c (mh_vgetyn): Synchronize with the changes to
33440	mu_true_answer_p().
33441	* mimeview/mimeview.c: Handle --no-ask and --no-interactive (-h)
33442	options. Continue search for a matching entry when necessary.
33443	Implement 'test' and 'print' commands.
33444	* doc/texinfo/programs.texi (mimeview): Documented new options
33445
334462005-03-09  Sergey Poznyakoff
33447
33448	* mimeview/mimetypes.l: Bugfix: accept ',' as OR
33449	* mimeview/mimetypes.y: Fixed precedences of ',' and '+'.
33450
334512005-03-08  Sergey Poznyakoff
33452
33453	* TODO: Updated
33454	* configure.ac (DEFAULT_CUPS_CONFDIR): New variable
33455	* doc/texinfo/programs.texi (mimeview): Documented the program
33456	* mimeview/Makefile.am (AM_CFLAGS): Use DEFAULT_CUPS_CONFDIR
33457	* mimeview/mimeview.c (create_filter,print_exit_status)
33458	(get_pager): New function
33459	(run_mailcap): Pipe file contents to the command if its invocation
33460	does not contain %s.
33461	Use pager if `copiousoutput' is specified in mailcap
33462
33463	* po/POTFILES.in: Updated
33464
334652005-03-08  Sergey Poznyakoff
33466
33467	TODO:121 said: "file viewer, based on the mimetypes api. I want to do
33468	a "v foo.blah", have it look up .blah in mime.types, and do the
33469	action spec'ed in mailcap."
33470	So, here it goes:
33471
33472	* mimeview: New directory
33473	* mimeview/mimetypes.y: New file
33474	* mimeview/mimetypes.l: New file
33475	* mimeview/mimeview.c: New file
33476	* mimeview/mimeview.h: New file
33477	* mimeview/Makefile.am: New file
33478	* mimeview/.cvsignore: New file
33479
33480	* configure.ac: Added mimeview
33481	* Makefile.am: Likewise
33482	* doc/texinfo/programs.texi (mimeview): New section.
33483	(mail): Document recently added variables.
33484	* mailbox/mailcap.c (mu_mailcap_entry_copiousoutput): Bugfix
33485
334862005-03-07  Sergey Poznyakoff
33487
33488	* TODO: Updated
33489	* NEWS: Updated
33490	* mail/decode.c (mail_decode): Implemented new variable
33491	`metamail' that turns on use of metamail program for
33492	displaying MIME messages.
33493	(run_metamail): New function
33494	* mailbox/mutil.c (mu_spawnvp): Minor fixes
33495
334962005-03-06  Sergey Poznyakoff
33497
33498	* NEWS: Updated
33499
33500	* auth/sql.c: Use a uniform way of filename quoting in diagnostic
33501	messages.
33502	* frm/common.c: Likewise
33503	* frm/from.c: Likewise
33504	* imap4d/authenticate.c: Likewise
33505	* imap4d/login.c: Likewise
33506	* libsieve/actions.c: Likewise
33507	* libsieve/extensions/vacation.c: Likewise
33508	* mail/var.c: Likewise
33509	* mail.local/mailquota.c: Likewise
33510	* mail.local/main.c: Likewise
33511	* mail.remote/mail.remote.c: Likewise
33512	* mailbox/mu_argp.c: Likewise
33513	* messages/messages.c: Likewise
33514	* mh/forw.c: Likewise
33515	* mh/mh_ctx.c: Likewise
33516	* mh/mh_init.c: Likewise
33517	* mh/send.c: Likewise
33518	* movemail/movemail.c: Likewise
33519	* pop3d/apop.c: Likewise
33520	* pop3d/lock.c: Likewise
33521	* pop3d/user.c: Likewise
33522	* readmsg/readmsg.c: Likewise
33523	* sieve/sieve.c: Likewise
33524
33525	* mailbox/errors (MU_ERR_NO_QUERY): Fixed wording
33526
335272005-03-05  Wojciech Polak
33528
33529	* frm/Makefile.am: Removed install-exec-hook after the changes
33530	from 2005-03-02.
33531
335322005-03-05  Sergey Poznyakoff
33533
33534	POSIX compatibility issues in mail
33535
33536	* mail/alt.c (mail_is_my_name): Do not check `metoo'. The
33537	caller is responsible for that.
33538	* mail/reply.c (reply0): Check for `metoo' before calling
33539	mail_is_my_name().
33540	(mail_reply): Honor `flipr' variable
33541	* mail/decode.c: Mark message as read and shown
33542	* mail/mbox.c: Likewise
33543	* mail/pipe.c: Likewise
33544	* mail/print.c: Likewise
33545	* mail/top.c: Likewise
33546	* mail/undelete.c: Likewise
33547	* mail/visual.c: Likewise
33548	* mail/from.c (mail_from0): If `showto' is set and the
33549	mail comes from the user that invoked the program, show
33550	`To:' address instead of `From:'.
33551	* mail/mail.c (default_setup): Added variables, required by
33552	POSIX: flipr, showto, bang. Added placeholders for debug,
33553	onehop and sendwait.
33554	* mail/mail.h (util_mark_read): New function
33555	* mail/shell.c: If `bang' is set, expand every occurrence
33556	of ! in argument array.
33557	* mail/touch.c: Rewritten in accordance with POSIX specs:
33558	do not mbox deleted and saved messages.
33559	* mail/util.c (util_mark_read): New function
33560
335612005-03-04  Sergey Poznyakoff
33562
33563	* mail/mail.h (MAIL_ATTRIBUTE_SHOWN): New attribute. Shows
33564	that the message has been displayed during the current session.
33565	* mail/next.c (mail_next): Rewritten in accordance with POSIX:
33566	if the current message has not been shown yet, then show
33567	it. Otherwise advance to the nearest next non-deleted message.
33568	* mail/print.c (mail_print_msg): Set MAIL_ATTRIBUTE_SHOWN after
33569	displaying the message
33570	* mail/top.c (top0): set read attribute and MAIL_ATTRIBUTE_SHOWN
33571	after displaying the message
33572
335732005-03-02  Sergey Poznyakoff
33574
33575	* frm/Makefile.am: Build `from'
33576	* frm/frm.c: Moved part of code to be shared between `frm' and
33577	`from' to common.c
33578	* frm/common.c: New file
33579	* frm/from.c: New file
33580	* frm/frm.h: New file
33581	* mail/quit.c: Save messages that were marked for saving to mbox
33582	and then deleted
33583	* mailbox/mbox/mbox.c (mbox_scan): Store the number of messages
33584	into *pcount if we don't need to rescan the mailbox.
33585
33586	* po/POTFILES.in: Updated
33587
33588	* from/from.c: Removed
33589	* from/Makefile.am: Removed
33590	* from/.cvsignore: Removed
33591	* from/testsuite: Removed
33592	* from/testsuite/from/test.exp: Removed
33593	* from/testsuite/from/DISTFILES: Removed
33594
33595	* configure.ac: Removed from
33596	* Makefile.am: Likewise
33597	* doc/texinfo/programs.texi: Document `from'
33598
335992005-02-28  Sergey Poznyakoff
33600
33601	* configure.ac: Check for FriBidi
33602	* frm/Makefile.am: Link with libfribidi
33603	* frm/frm.c: Rewritten output routines using FriBidi. Arabic
33604	subject lines look almost OK, except that all characters are
33605	displayed in isolated variant.
33606	* frm/testsuite/frm/test.exp: Fixed to match the new frm output.
33607
336082005-02-27  Wojciech Polak
33609
33610	* frm/Makefile.am: Added install-exec-hook for creating
33611	the symbolic link 'from' to 'frm'.
33612	* from/Makefile.am: Changed bin_PROGRAMS to noinst_PROGRAMS.
33613
336142005-02-27  Sergey Poznyakoff
33615
33616	* gnulib.modules: Add mbswidth
33617	* frm/frm.c: Implemented -t. Changed implementation of -Q.
33618	Rewritten action() to correctly handle multibyte characters
33619	and to provide for eventual using the BIDI algorithm.
33620	(print_line,format_field,format_field_simple)
33621	(format_field_align): New functions
33622	(util_getcols): Measure /dev/tty if unable to open stdout.
33623	(to work correctly with piped output).
33624	(rfc2047_decode_wrapper): Cache the determined locale.
33625	(get_personal): Do not limit the returned string length.
33626	Do not attempt to decode the raw header text, since
33627	parse822 will skip non-ascii characters, decode the already
33628	obtained personal part instead.
33629
33630	* mailbox/address.c (address_aget_personal)
33631	(address_aget_comments): Bugfix
33632	* sql/mysql.c: Provide place handlers for handling MySQL 4.1.x
33633	scrambled passwords.
33634
33635	Update by gnulib-sync:
33636
33637	* m4/mbrtowc.m4: New file
33638	* m4/mbswidth.m4: New file
33639	* lib/mbswidth.c: New file
33640	* lib/mbswidth.h: New file
33641	* lib/Makefile.am: Updated
33642	* m4/gnulib.m4: Updated
33643
336442005-02-26  Wojciech Polak
33645
33646	* mh/send.c (expand_aliases): Bugfix. Do not use statically
33647	allocated buffer. Use header_aget_field_name() instead.
33648	The utility froze with header names longer than 16 bytes.
33649
336502005-02-26  Wojciech Polak
33651
33652	* mailbox/url_smtp.c (_url_smtp_init): Do not reject
33653	an URL with user name, password, or auth method specified.
33654	We will use it in further ESMTP authentication.
33655
336562005-02-26  Sergey Poznyakoff
33657
33658	* sql/mysql.c: Do not use any libmysql functions to
33659	scramble passwords: mysql people are evidently
33660	unable to keep this API stable.
33661
336622005-02-25  Sergey Poznyakoff
33663
33664	* NEWS: Updated
33665	* auth/sql.c (mu_sql_password_type): New variable
33666	(--sql-password-type): New command line option
33667	(mu_sql_getpass): New function.
33668	(mu_sql_authenticate): Recognize hashed, plaintext
33669	and mysql scrambled passwords.
33670	* auth/sql.h (sql_interface): new decl
33671	(mu_sql_expand_query): New proto.
33672	* imap4d/auth_gsasl.c (cb_retrieve): Fall back to SQL
33673	if plaintext password file is not available.
33674	* include/mailutils/sql.h (mu_sql_getpass)
33675	(mu_sql_password_type,mu_sql_expand_query):
33676	(mu_check_mysql_scrambled_password): New function
33677	* mail.local/mailquota.c: Include <auth/sql.h>. A temporary
33678	solution.
33679
33680	* mailbox/muerror.c (mu_syslog_error_printer): Bugfix.
33681	* sql/mysql.c (mu_check_mysql_scrambled_password): New function.
33682
33683	* mail/mail.c: Updated copyright date.
33684
336852005-02-25  Sergey Poznyakoff
33686
33687	* NEWS: Updated
33688	* include/mailutils/libsieve.h (sieve_get_identifier): New
33689	function.
33690	(sieve_arg_error): New function.
33691	* libsieve/actions.c: Removed spurious indications of action
33692	names in diagnostic messages. Sieve_error prepends them
33693	automatically now.
33694	* libsieve/tests.c: Likewise.
33695	* libsieve/extensions/list.c: Likewise.
33696	* libsieve/extensions/timestamp.c: Likewise.
33697	* libsieve/extensions/vacation.c: Likewise.
33698	* libsieve/runtime.c (instr_action,instr_test): Update
33699	mach->identifier.
33700	* libsieve/sieve.h (struct sieve_machine.identifier): New
33701	field.
33702
33703	* libsieve/util.c (sieve_value_create): Bugfix.
33704	(sieve_error): Prepend action or test identifier to the diagnostic
33705	message.
33706	(sieve_arg_error): New function.
33707
33708	* po/POTFILES.in: Updated
33709
337102005-02-24  Sergey Poznyakoff
33711
33712	Update by gnulib-sync.
33713
33714	* lib/stdbool.h: New file
33715	* m4/unlocked-io.m4: New file
33716	* m4/argp.m4: Updated
33717	* m4/gnulib.m4: Updated
33718	* mailbox/Makefile.am: Updated
33719
337202005-02-23  Sergey Poznyakoff
33721
33722	Synchronized with the recent gnulib. Provide a way to
33723	facilitate further synchronizations.
33724
33725	* gnulib.modules: New file
33726	* scripts/gnulib-sync: New file. Script for synchronizing
33727	mailutils tree with gnulib.
33728	* configure.ac: Updated to use new gnulib files.
33729	* m4/mu_libobj.m4 (MU_LIBSOURCES,MU_REPLACE_FUNCS): New defun.
33730	(MU_CHECK_FUNCS): Removed.
33731
33732	* Makefile.am: Remove headers/
33733	* frm/frm.c (parse_opt): Bugfix. Was using optarg instead of arg
33734	* mail.local/main.c: Likewise
33735	* pop3d/popauth.c: Likewise
33736	* readmsg/readmsg.c: Likewise
33737	* include/mailutils/argp.h: Include errno.h
33738	* include/mailutils/gnu/Makefile.am: Remove posix/regex.h
33739	* libsieve/argp.c (sieve_argp_option): Use N_()
33740	* mailbox/message.c: Use new md5 calls
33741	* mailbox/pop/mbox.c: Likewise
33742	* mailbox/pop/pop3_apop.c: Likewise
33743	* mailbox/message.c: Likewise
33744	* mh/mh_error.c: Include mailutils/argp.h
33745	* mh/mh_getopt.c: Include string.h
33746	* pop3d/Makefile.am (INCLUDES): Add $(top_srcdir)/mailbox
33747	* pop3d/pop3d.h: Minor fix
33748
33749	* lib/xalloc_die.c: New file
33750	* m4/gnulib.m4: New file
33751
33752	* headers/.cvsignore
33753	* headers/Makefile.am
33754	* headers/getopt.h
33755	* headers/regex.h
33756	* headers/argp.h
33757	* headers/posix/.cvsignore
33758	* headers/posix/Makefile.am
33759	* headers/posix/regex.h
33760	* headers/posix
33761
33762	Update by gnulib-sync.
33763
33764	* lib/asprintf.c: New file
33765	* mailbox/alloca.h: New file
33766	* mailbox/argp.h: New file
33767	* mailbox/getopt.h: New file
33768	* lib/allocsa.c: Added to the repository
33769	* lib/allocsa.h: Added to the repository
33770	* lib/allocsa.valgrind: Added to the repository
33771	* lib/asprintf.c: Updated
33772	* lib/error.c: Added to the repository
33773	* lib/error.h: Updated
33774	* lib/exit.h: Added to the repository
33775	* lib/exitfail.c: Added to the repository
33776	* lib/exitfail.h: Added to the repository
33777	* lib/fnmatch.c: Updated
33778	* lib/fnmatch_.h: Added to the repository
33779	* lib/fnmatch_loop.c: Added to the repository
33780	* lib/getpass.c: Updated
33781	* lib/getpass.h: Added to the repository
33782	* lib/malloc.c: Updated
33783	* lib/obstack.c: Updated
33784	* lib/obstack.h: Updated
33785	* lib/realloc.c: Updated
33786	* lib/setenv.c: Updated
33787	* lib/setenv.h: Added to the repository
33788	* lib/snprintf.c: Updated
33789	* lib/snprintf.h: Updated
33790	* lib/stdbool_.h: Added to the repository
33791	* lib/unsetenv.c: Added to the repository
33792	* lib/vasprintf.c: Updated
33793	* lib/vasprintf.h: Added to the repository
33794	* lib/xalloc.h: Updated
33795	* lib/xmalloc.c: Updated
33796	* lib/xsize.h: Added to the repository
33797	* lib/xstrtol.c: Updated
33798	* lib/xstrtol.h: Updated
33799	* lib/xstrtoul.c: Added to the repository
33800	* m4/alloca.m4: Added to the repository
33801	* m4/allocsa.m4: Added to the repository
33802	* m4/argp.m4: Added to the repository
33803	* m4/eealloc.m4: Added to the repository
33804	* m4/eoverflow.m4: Added to the repository
33805	* m4/error.m4: Added to the repository
33806	* m4/exitfail.m4: Added to the repository
33807	* m4/extensions.m4: Added to the repository
33808	* m4/fnmatch.m4: Added to the repository
33809	* m4/getline.m4: Added to the repository
33810	* m4/getndelim2.m4: Added to the repository
33811	* m4/getopt.m4: Updated
33812	* m4/getpass.m4: Added to the repository
33813	* m4/gettext_gl.m4: Added to the repository
33814	* m4/glibc21_gl.m4: Added to the repository
33815	* m4/iconv.m4: Added to the repository
33816	* m4/intmax.m4: Added to the repository
33817	* m4/intmax_t.m4: Added to the repository
33818	* m4/intmax_t.m4: Added to the repository
33819	* m4/inttypes.m4: Added to the repository
33820	* m4/inttypes_h_gl.m4: Added to the repository
33821	* m4/inttypes_h_gl.m4: Added to the repository
33822	* m4/lib-ld_gl.m4: Added to the repository
33823	* m4/lib-prefix_gl.m4: Added to the repository
33824	* m4/longdouble.m4: Added to the repository
33825	* m4/longdouble.m4: Added to the repository
33826	* m4/longlong_gl.m4: Added to the repository
33827	* m4/longlong_gl.m4: Added to the repository
33828	* m4/mailbox-link.m4: Added to the repository
33829	* m4/mbstate_t.m4: Added to the repository
33830	* m4/md5.m4: Added to the repository
33831	* m4/mempcpy.m4: Added to the repository
33832	* m4/nls.m4: Added to the repository
33833	* m4/obstack.m4: Added to the repository
33834	* m4/onceonly.m4: Added to the repository
33835	* m4/onceonly.m4: Added to the repository
33836	* m4/po_gl.m4: Added to the repository
33837	* m4/printf-posix.m4: Added to the repository
33838	* m4/progtest.m4: Added to the repository
33839	* m4/regex.m4: Updated
33840	* m4/restrict.m4: Added to the repository
33841	* m4/setenv.m4: Added to the repository
33842	* m4/signed.m4: Added to the repository
33843	* m4/size_max.m4: Added to the repository
33844	* m4/size_max.m4: Added to the repository
33845	* m4/snprintf.m4: Added to the repository
33846	* m4/ssize_t.m4: Added to the repository
33847	* m4/stdbool.m4: Added to the repository
33848	* m4/stdint_h_gl.m4: Added to the repository
33849	* m4/stdint_h_gl.m4: Added to the repository
33850	* m4/strcase.m4: Added to the repository
33851	* m4/strchrnul.m4: Added to the repository
33852	* m4/strerror_r.m4: Added to the repository
33853	* m4/strndup.m4: Added to the repository
33854	* m4/strnlen.m4: Added to the repository
33855	* m4/strtok_r.m4: Added to the repository
33856	* m4/sysexits.m4: Added to the repository
33857	* m4/uint32_t.m4: Added to the repository
33858	* m4/uintmax_t_gl.m4: Added to the repository
33859	* m4/uintmax_t_gl.m4: Added to the repository
33860	* m4/ulonglong_gl.m4: Added to the repository
33861	* m4/ulonglong_gl.m4: Added to the repository
33862	* m4/vasnprintf.m4: Added to the repository
33863	* m4/vasprintf.m4: Added to the repository
33864	* m4/vsnprintf.m4: Added to the repository
33865	* m4/wchar_t.m4: Added to the repository
33866	* m4/wint_t.m4: Added to the repository
33867	* m4/xalloc.m4: Added to the repository
33868	* m4/xsize.m4: Added to the repository
33869	* m4/xsize.m4: Added to the repository
33870	* m4/xstrtol.m4: Added to the repository
33871	* mailbox/alloca.c: Added to the repository
33872	* mailbox/alloca_.h: Added to the repository
33873	* mailbox/argp-ba.c: Updated
33874	* mailbox/argp-eexst.c: Updated
33875	* mailbox/argp-fmtstream.c: Updated
33876	* mailbox/argp-fmtstream.h: Updated
33877	* mailbox/argp-fs-xinl.c: Updated
33878	* mailbox/argp-help.c: Updated
33879	* mailbox/argp-namefrob.h: Updated
33880	* mailbox/argp-parse.c: Updated
33881	* mailbox/argp-pv.c: Updated
33882	* mailbox/argp-pvh.c: Updated
33883	* mailbox/argp-xinl.c: Updated
33884	* mailbox/argp.h: Updated
33885	* mailbox/asnprintf.c: Added to the repository
33886	* mailbox/getline.c: Updated
33887	* mailbox/getline.h: Updated
33888	* mailbox/getndelim2.c: Added to the repository
33889	* mailbox/getndelim2.h: Added to the repository
33890	* mailbox/getopt.c: Updated
33891	* mailbox/getopt1.c: Updated
33892	* mailbox/getopt_.h: Added to the repository
33893	* mailbox/getopt_int.h: Added to the repository
33894	* mailbox/gettext.h: Added to the repository
33895	* mailbox/md5.c: Updated
33896	* mailbox/md5.h: Updated
33897	* mailbox/mempcpy.c: Added to the repository
33898	* mailbox/mempcpy.h: Added to the repository
33899	* mailbox/minmax.h: Added to the repository
33900	* mailbox/printf-args.c: Added to the repository
33901	* mailbox/printf-args.h: Added to the repository
33902	* mailbox/printf-parse.c: Added to the repository
33903	* mailbox/printf-parse.h: Added to the repository
33904	* mailbox/regex.c: Updated
33905	* mailbox/regex.h: Added to the repository
33906	* mailbox/strcase.h: Added to the repository
33907	* mailbox/strcasecmp.c: Added to the repository
33908	* mailbox/strchrnul.c: Updated
33909	* mailbox/strchrnul.h: Added to the repository
33910	* mailbox/strncasecmp.c: Added to the repository
33911	* mailbox/strndup.c: Updated
33912	* mailbox/strndup.h: Added to the repository
33913	* mailbox/strnlen.c: Updated
33914	* mailbox/strtok_r.c: Updated
33915	* mailbox/strtok_r.h: Added to the repository
33916	* mailbox/sysexit_.h: Added to the repository
33917	* mailbox/vasnprintf.c: Added to the repository
33918	* mailbox/vasnprintf.h: Added to the repository
33919	* mailbox/vsnprintf.c: Added to the repository
33920	* mailbox/vsnprintf.h: Added to the repository
33921	* mailbox/xsize.h: Added to the repository
33922	* scripts/config.rpath: Added to the repository
33923
339242005-02-21  Sergey Poznyakoff
33925
33926	* libsieve/actions.c: Further unification of diagnostic style.
33927	* libsieve/argp.c: Likewise.
33928	* mail/mail.c: Likewise.
33929	* mail.local/mailquota.c: Likewise.
33930	* mailbox/mu_argp.c: Likewise.
33931	* mh/forw.c: Likewise.
33932	* mh/refile.c: Likewise.
33933	* mh/repl.c: Likewise.
33934	* mh/send.c: Likewise.
33935	* sieve/sieve.c: Likewise.
33936	* mail.local/main.c: Add debug flag 'i' for symmetry with sieve
33937
339382005-02-16  Sergey Poznyakoff
33939
33940	Fix a long-standing issue in mailbox and imap4d:
33941	be able to handle a case when a third-party program deletes
33942	some messages in the mailbox being open by imap4d (imap4d
33943	cannot and should not lock it, hence the possibility).
33944
33945	* mailbox/amd.c (amd_pool_flush): New function.
33946	(amd_close): Call amd_pool_flush()
33947	and initialize amd data so that subsequent amd_open() works
33948	properly.
33949	(amd_destroy): Call amd_pool_flush.
33950	* mailbox/mbox/mbox.c (mbox_close): Initialize all private data
33951	so that subsequent mailbox_open() works properly.
33952	(mbox_is_updated): Updated comment
33953
33954	* imap4d/bye.c (imap4d_bye0): Handle ERR_MAILBOX_CORRUPTED
33955	* imap4d/imap4d.h (ERR_MAILBOX_CORRUPTED): New error code.
33956	(imap4d_set_observer): New function
33957	* imap4d/select.c (imap4d_select0): Call imap4d_set_observer()
33958	* imap4d/sync.c (imap4d_set_observer): New function.
33959	(imap4d_sync): Check if the mailbox was shrunk (in libmailbox
33960	terms 'corrupted'). If so, reopen it and issue untagged alert.
33961
339622005-02-16  Sergey Poznyakoff
33963
33964	* imap4d/auth_gsasl.c (cb_validate): Provide normal authentication
33965	for PLAIN and LOGIN mechanisms.
33966
339672005-02-11  Sergey Poznyakoff
33968
33969	* imap4d/unsubscribe.c: Rewritten. Thanks Andrew Barnes
33970	for reporting the bug.
33971
339722005-02-03  Sergey Poznyakoff
33973
33974	* guimb/main.c (parse_opt): Use arg instead of optarg.
33975	Thanks James Dolter for reporting.
33976
339772005-01-17  Sergey Poznyakoff
33978
33979	* mailbox/parsedate.y (mu_parse_date): Initialize struct tm
33980	* mailbox/nntp/folder.c (nntp_folder_open): Do not use alloca
33981	* mailbox/nntp/mbox.c: Do not use alloca
33982
33983	* doc/texinfo/Makefile.am: Rewritten to use gendocs.sh
33984	* doc/texinfo/index.html.in: Removed
33985	* doc/texinfo/gendocs_template: New file
33986	* doc/texinfo/fdl.texi: Fixed sectioning
33987	* doc/texinfo/programs.texi: Likewise.
33988	* doc/texinfo/url.texi: Likewise.
33989	* doc/texinfo/mailutils.texi: Fixed sectioning. Print table
33990	of contents after summary page, as suggested by GNU standards.
33991
339922005-01-05  Sergey Poznyakoff
33993
33994	* configure.ac (AUTHLIBS_DEPENDENCY,SQLLIB_DEPENDENCY): New
33995	variables. I still hope to find a better solution, though
33996	(see comment to imap4d_DEPENDENCIES in imap4d/Makefile.am).
33997	New SQL driver: ODBC (--with-sql=odbc or --with-odbc)
33998	Raised version number to 0.6.1
33999	* NEWS: Updated
34000	* README: Updated
34001	* auth/Makefile.am: Use explicit PROG_DEPENDENCIES
34002	* imap4d/Makefile.am: Likewise.
34003	* pop3d/Makefile.am: Likewise.
34004
34005	* include/mailutils/sql.h (mu_sql_dispatch.errstr): Changed
34006	return type to const char*
34007	* sql/mysql.c: Likewise
34008	* sql/postgres.c: Likewise
34009	* sql/sql.c: Likewise
34010
34011	* sql/odbc.c: New file. ODBC SQL driver.
34012	* sql/Makefile.am: Add odbc.c
34013
34014	* mail/testsuite/mail/read.exp: Updated to match recent changes
34015	in diagnostic messages.
34016
340172005-01-04  Sergey Poznyakoff
34018
34019	* libsieve/extensions/vacation.c: New action. Based on
34020	guimb/scm/vacation.scm and on ideas and code fragments from
34021	Felix Egli <fegli@goldnet.ch>.
34022	* libsieve/extensions/Makefile.am: Add vacation
34023	* include/mailutils/libsieve.h (sieve_get_message_sender)
34024	(stream_printf): New prototypes.
34025	* THANKS: Add Felix Egli
34026
340272005-01-04  Sergey Poznyakoff
34028
34029	* auth/sql.c: Revise error messages for accordance with GNU standards:
34030	begin messages with a capital letter, unless they are prefixed
34031	with `file:line:' or their exact look is important due to
34032	compatibility reasons. Do not end messages with a period.
34033	Avoid using contracted negations
34034	* auth/tls.c: Likewise
34035	* comsat/action.c: Likewise
34036	* comsat/cfg.c: Likewise
34037	* comsat/comsat.c: Likewise
34038	* dotlock/dotlock.c: Likewise
34039	* frm/frm.c: Likewise
34040	* from/from.c: Likewise
34041	* guimb/collect.c: Likewise
34042	* guimb/main.c: Likewise
34043	* guimb/util.c: Likewise
34044	* imap4d/auth_gss.c: Likewise
34045	* imap4d/imap4d.c: Likewise
34046	* imap4d/list.c: Likewise
34047	* imap4d/signal.c: Likewise
34048	* imap4d/util.c: Likewise
34049	* libsieve/actions.c: Likewise
34050	* libsieve/comparator.c: Likewise
34051	* libsieve/prog.c: Likewise
34052	* libsieve/runtime.c: Likewise
34053	* libsieve/sieve.l: Likewise
34054	* libsieve/tests.c: Likewise
34055	* libsieve/util.c: Likewise
34056	* mail/alt.c: Likewise
34057	* mail/copy.c: Likewise
34058	* mail/decode.c: Likewise
34059	* mail/file.c: Likewise
34060	* mail/if.c: Likewise
34061	* mail/mail.c: Likewise
34062	* mail/mailline.c: Likewise
34063	* mail/quit.c: Likewise
34064	* mail/send.c: Likewise
34065	* mail/source.c: Likewise
34066	* mail/unalias.c: Likewise
34067	* mail/util.c: Likewise
34068	* mail/var.c: Likewise
34069	* mail/z.c: Likewise
34070	* mail.local/mailquota.c: Likewise
34071	* mail.local/main.c: Likewise
34072	* mail.local/script.c: Likewise
34073	* mailbox/mailutils-config.c: Likewise
34074	* mailbox/mu_argp.c: Likewise
34075	* messages/messages.c: Likewise
34076	* mh/fmtcheck.c: Likewise
34077	* mh/folder.c: Likewise
34078	* mh/forw.c: Likewise
34079	* mh/inc.c: Likewise
34080	* mh/mark.c: Likewise
34081	* mh/mh_argp.c: Likewise
34082	* mh/mh_ctx.c: Likewise
34083	* mh/mh_fmtgram.y: Likewise
34084	* mh/mh_format.c: Likewise
34085	* mh/mh_init.c: Likewise
34086	* mh/mh_list.c: Likewise
34087	* mh/mh_msgset.c: Likewise
34088	* mh/mh_whom.c: Likewise
34089	* mh/mhl.c: Likewise
34090	* mh/mhn.c: Likewise
34091	* mh/pick.c: Likewise
34092	* mh/refile.c: Likewise
34093	* mh/repl.c: Likewise
34094	* mh/rmf.c: Likewise
34095	* mh/scan.c: Likewise
34096	* mh/send.c: Likewise
34097	* movemail/movemail.c: Likewise
34098	* pop3d/apop.c: Likewise
34099	* pop3d/extra.c: Likewise
34100	* pop3d/lock.c: Likewise
34101	* pop3d/pop3d.c: Likewise
34102	* pop3d/popauth.c: Likewise
34103	* pop3d/signal.c: Likewise
34104	* readmsg/readmsg.c: Likewise
34105	* sieve/sieve.c: Likewise
34106
34107	* mail/testsuite/mail/read.exp: Updated to match new output format
34108	of the decode command
34109
341102005-01-04  Sergey Poznyakoff
34111
34112	* mailbox/errors: Add gettext markers
34113	* po/POTFILES.in: Depend on mailbox/errors directly
34114	* scripts/generr.awk: Assume textual messages are
34115	already quoted.
34116
341172005-01-02  Jordi Mallach
34118
34119	* doc/texinfo/programs.texi: Typo fix.
34120
341212005-01-01  Sergey Poznyakoff
34122
34123	Generate automatically errno.h and muerrno.c from a single
34124	plain text file. This facilitates maintaining of mailutils-
34125	specific error codes.
34126
34127	* include/mailutils/errno.h: Removed
34128	* include/mailutils/errno.hin: New file
34129	* include/mailutils/Makefile.am: Generate errno.h
34130	* mailbox/muerrno.c: Removed
34131	* mailbox/muerrno.cin: New file
34132	* mailbox/errors: New file
34133	* mailbox/Makefile.am: Generate muerrno.c
34134	* scripts/generr.awk: New file
34135	* scripts/Makefile.am: Add generr.awk
34136
34137	Fix a recently spotted problem in the testsuite:
34138
34139	* imap4d/testsuite/imap4d/list.exp: Use new -sort flag to
34140	avoid dependency on any particular ordering. Also corrected
34141	expected outputs due to inclusion of two new mailboxes quite
34142	some time ago (went unnoticed so far due to fuzzy matching
34143	technique + ordering-dependent output).
34144	* imap4d/testsuite/lib/imap4d.exp (imap4d_test): New flag -sort
34145	toggles on sorting of untagged responses. Notice that -sort
34146	and -re are mutually exclusive.
34147	* testsuite/lib/mailutils.exp (mu_test): Upvar expect_out
34148
341492004-12-28  Wojciech Polak
34150
34151	Fixed displaying mail headers in different languages.
34152
34153	* mail/util.c (util_rfc2047_decode): Fixed reading
34154	a language environment variable.
34155	* frm/frm.c (rfc2047_decode_wrapper): Likewise.
34156	(util_getcols): Imported function from mail/util.c.
34157	(action): Try to print only one line per message.
34158	* from/from.c (rfc2047_decode_wrapper): Fixed.
34159
341602004-12-23  Sergey Poznyakoff
34161
34162	* configure.ac: Version 0.6
34163	* NEWS: Likewise
34164	* README: Updated
34165	* auth/gsasl.c: Updated for GSASL >=0.2.3. Previous versions
34166	won't work.
34167	* auth/lbuf.c (_auth_lb_writelines): Bugfix
34168	* mail.local/mail.local.h (USE_MAILBOX_QUOTAS): New define
34169	* mail.local/mailquota.c: Use USE_MAILBOX_QUOTAS.
34170	(sql_retrieve_quota): Assume unlimited quotas for empty fields.
34171	* mail.local/main.c: Use USE_MAILBOX_QUOTAS.
34172
341732004-12-17  Sergey Poznyakoff
34174
34175	* configure.ac: Do not allow to specify modules more than once
34176	* auth/sql.c (sql_escape_string): Escape occurrences of ' and "
34177	in string.
34178	(mu_sql_expand_query): prevent possible sql injection
34179	* mail.local/mailquota.c (sql_retrieve_quota): Allow for NULL
34180	columns
34181	* sql/postgres.c (destroy): Bugfix: do not free pgconn
34182
341832004-12-05  Sergey Poznyakoff
34184
34185	* Makefile.am: Added sql/
34186	* configure.ac: Rewritten sql-related part. Allow to specify
34187	several SQL libraries simultaneously.
34188
34189	* sql: New directory
34190	* sql/Makefile.am: New file
34191	* sql/.cvsignore: New file
34192	* sql/sql.c: New file
34193	* sql/mysql.c: New file
34194	* sql/postgres.c: New file
34195
34196	* auth/mysql.c: Removed
34197	* auth/pgsql.c: Removed
34198	* auth/sql.c: Rewritten using general SQL interface.
34199	* auth/Makefile.am: Removed mysql.c and pgsql.c
34200	* include/mailutils/sql.h: New file
34201	* include/mailutils/Makefile.am: Added sql.h
34202
34203	* include/mailutils/errno.h: Added new error codes.
34204	* mailbox/muerrno.c: Likewise.
34205
34206	* mail.local/mail.local.h (quota_query): New variable
34207	* mail.local/mailquota.c: Retrieve quotas from SQL database
34208	* mail.local/main.c: New option --quota-query
34209
34210	* scripts/sqlmod.sh: New file
34211	* scripts/Makefile.am: Added sqlmod.sh
34212
34213	* doc/texinfo/programs.texi: Documented mailbox quotas
34214
34215	* NEWS: Updated
34216	* README: Updated
34217	* po/POTFILES.in: Updated
34218
342192004-12-02  Sergey Poznyakoff
34220
34221	* doc/texinfo/programs.texi: Documented movemail.
34222
342232004-11-18  Sergey Poznyakoff
34224
34225	* mailbox/imap/folder.c (authenticate_imap_select): Use
34226	ENOSYS as the default status value to allow MU_ERR_AUTH_FAILURE
34227	to be propagated back to the caller.
34228	(imap_parse): Display "NO/Bad Tagged" error diagnostics only if
34229	status != MU_ERR_AUTH_FAILURE. Should we display it at all?
34230	* movemail/movemail.c: Emacs-interaction mode (--emacs)
34231
342322004-11-17  Wojciech Polak
34233
34234	Added initial version of `libmu_cpp',
34235	a C++ wrapper for Mailutils.
34236
34237	* libmu_cpp: Added new directory.
34238	* libmu_cpp/address.cc: New file.
34239	* libmu_cpp/filter.cc: Likewise.
34240	* libmu_cpp/iterator.cc: Likewise.
34241	* libmu_cpp/mailbox.cc: Likewise.
34242	* libmu_cpp/mailer.cc: Likewise.
34243	* libmu_cpp/message.cc: Likewise.
34244	* libmu_cpp/stream.cc: Likewise.
34245	* libmu_cpp/header.cc: Likewise.
34246	* libmu_cpp/list.cc: Likewise.
34247	* libmu_cpp/mailcap.cc: Likewise.
34248	* libmu_cpp/pop3.cc: Likewise.
34249	* libmu_cpp/url.cc: Likewise.
34250	* libmu_cpp/Makefile.am: Likewise.
34251
34252	* include/mailutils/cpp: Added new directory.
34253	* include/mailutils/cpp/address.h: New file.
34254	* include/mailutils/cpp/error.h: Likewise.
34255	* include/mailutils/cpp/header.h: Likewise.
34256	* include/mailutils/cpp/list.h: Likewise.
34257	* include/mailutils/cpp/mailcap.h: Likewise.
34258	* include/mailutils/cpp/mailutils.h: Likewise.
34259	* include/mailutils/cpp/message.h: Likewise.
34260	* include/mailutils/cpp/stream.h: Likewise.
34261	* include/mailutils/cpp/filter.h: Likewise.
34262	* include/mailutils/cpp/iterator.h: Likewise.
34263	* include/mailutils/cpp/mailbox.h: Likewise.
34264	* include/mailutils/cpp/mailer.h: Likewise.
34265	* include/mailutils/cpp/pop3.h: Likewise.
34266	* include/mailutils/cpp/url.h: Likewise.
34267	* include/mailutils/cpp/Makefile.am: Likewise.
34268
34269	* examples/cpp/addr.cc: New file.
34270	* examples/cpp/http.cc: Likewise.
34271	* examples/cpp/listop.cc: Likewise.
34272	* examples/cpp/sfrom.cc: Likewise.
34273	* examples/cpp/iconv.cc: Likewise.
34274	* examples/cpp/mailcap.cc: Likewise.
34275	* examples/cpp/murun.cc: Likewise.
34276	* examples/cpp/url-parse.cc: Likewise.
34277	* examples/cpp/Makefile.am: Likewise.
34278
342792004-11-15  Wojciech Polak
34280
34281	* examples/config: New directory.
34282	* examples/cpp: Likewise.
34283	* examples/scheme: Likewise.
34284	* examples/config/Makefile.am: New file.
34285	* examples/cpp/Makefile.am: Likewise.
34286	* examples/scheme/Makefile.am: Likewise.
34287
34288	* examples/comsat.conf: Moved to config/.
34289	* examples/dot.biffrc: Likewise.
34290	* examples/gnu-imap4d.pam: Likewise.
34291	* examples/gnu-pop3d.pam: Likewise.
34292	* examples/mailutils.rc: Likewise.
34293	* examples/reply.scm: Moved to scheme/.
34294	* examples/Makefile.am: Updated.
34295	* configure.ac: Updated.
34296
342972004-11-15  Sergey Poznyakoff
34298
34299	* imap4d/imap4d.c: New option --tls-required: do not allow
34300	authentication until TLS negotiation succeeds.
34301	* imap4d/authenticate.c (imap4d_authenticate): Do not proceed if
34302	tls_required is set.
34303	* imap4d/login.c (imap4d_login): Likewise.
34304	* imap4d/imap4d.h (IMAP_CAPA_STARTTLS,IMAP_CAPA_LOGINDISABLED)
34305	(IMAP_CAPA_XTLSREQUIRED): New defines
34306	* imap4d/starttls.c (imap4d_starttls): Clear tls_required upon
34307	successful TLS handshake.
34308	(starttls_init): Use IMAP_CAPA_STARTTLS instead of hardcoded
34309	literal.
34310	* include/mailutils/header.h (MU_HEADER_X_EXPIRE_TIMESTAMP): New
34311	define.
34312
34313	* pop3d/pop3d.c: New option --tls-required: do not allow
34314	authentication until TLS negotiation succeeds.
34315	New option --delete-expired: delete expired messages before
34316	closing the mailbox.
34317	* pop3d/capa.c (pop3d_capa): Announce XTLSREQUIRED if appropriate
34318	* pop3d/expire.c (expire_mark_message): New function
34319	* pop3d/pop3d.h: New declarations.
34320	* pop3d/quit.c (pop3d_fix_mark): Use expire_mark_message to
34321	process expired messages. Apart from the new functionality, it
34322	also fixes a bug: len was incorrectly used as a replace indicator
34323	in header_set_value, thus each retrieval of the message was
34324	resetting its expiration date.
34325
34326	* pop3d/stls.c (pop3d_stls): Set state to AUTHORIZATION upon
34327	successful completion of TLS negotiation.
34328
34329	* configure.ac: Raised version number to 0.5.1
34330	* NEWS: Entry for 0.5.1
34331
343322004-11-03  Sergey Poznyakoff
34333
34334	* dotlock/dotlock.c: Removed -T option (CAN-2004-0984)
34335
343362004-10-26  Sergey Poznyakoff
34337
34338	* imap4d/store.c (imap4d_store0): Send \r\n at the end of
34339	the unsolicited response.
34340
343412004-09-18  Sergey Poznyakoff
34342
34343	* configure.ac: Bugfix
34344	* mailbox/mime.c (_mime_munge_content_header): Bugfix
34345
343462004-08-31  Wojciech Polak
34347
34348	* mailbox/file_stream.c (prog_stream_create): Changed type
34349	of the second argument to const char*.
34350	(filter_prog_stream_create): Likewise.
34351	(_prog_stream_create): Changed type of the third argument
34352	to const char*.
34353	* include/mailutils/stream.h (prog_stream_create): Changed
34354	type of the second argument to const char*.
34355	(filter_prog_stream_create): Likewise.
34356	* doc/texinfo/stream.texi: Updated.
34357
34358	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1.
34359
343602004-08-24  Sergey Poznyakoff
34361
34362	* mail/util.c (util_do_command): Fixed coredump on unparseable
34363	input strings.
34364	* THANKS: Added Dan Jacobson
34365
343662004-08-20  Sergey Poznyakoff
34367
34368	* include/mailutils/guile.h (MU_SCM_SYMBOL_VALUE): New define
34369	(_mu_scm_mailer,_mu_scm_debug): Removed externs.
34370	* include/mailutils/list.h (list_set_destroy_item): Use __PMT in
34371	nested declarations.
34372	* libmu_scm/mu_message.c: Properly access mu-mailer and mu-message
34373	values.
34374
343752004-08-11  Sergey Poznyakoff
34376
34377	* mail/send.c (mail_send0): Fixed coredump on reading a
34378	single escape char.
34379
343802004-08-08  Sergey Poznyakoff
34381
34382	* headers/argp.h: Protect typedef int error_t by an additional
34383	#ifndef. Thanks Alex S. Moore <asmoore@edge.net> for helping
34384	find out the problem.
34385
343862004-08-07  Sergey Poznyakoff
34387
34388	* Makefile.am: Raised automake requirements to version
34389	1.8.5
34390	* examples/nntpclient.c: Minor fixes.
34391	* imap4d/Makefile.am (INCLUDES): Added -Imailbox
34392	* imap4d/imap4d.h: Added missing includes
34393	* include/mailutils/nls.h [!ENABLE_NLS]: Define gettext()
34394	* include/mailutils/nntp.h: Minor changes. The screen is 80x24!
34395	* mailbox/locker.c (_locker_lock_dotlock): Make sure the lock file
34396	is writable for the owner.
34397	* mailbox/imap/folder.c (authenticate_imap_sasl_anon): Use
34398	auth_state instead of state. Possibly this was a typo...
34399	* mailbox/include/imap0.h (struct _f_imap.capac): Changed
34400	type to int.
34401	* mailbox/maildir/mbox.c (maildir_gethostname): Fixed a gross
34402	memory allocation bug.
34403
34404	* mailbox/message.c: Minor changes.
34405	* mailbox/mbox/url.c: Likewise.
34406	* mailbox/nntp/folder.c: Likewise.
34407	* mailbox/nntp/mbox.c: Likewise.
34408	* mailbox/nntp/nntp_article.c: Likewise.
34409	* mailbox/nntp/nntp_connect.c: Likewise.
34410	* mailbox/nntp/nntp_date.c: Likewise.
34411	* mailbox/nntp/nntp_head.c: Likewise.
34412	* mailbox/nntp/nntp_ihave.c: Likewise.
34413	* mailbox/nntp/nntp_post.c: Likewise.
34414
34415	* scripts/guile-1.6/guile-doc-snarf: Bugfix. Always use $AWK.
34416
344172004-08-06  Sergey Poznyakoff
34418
34419	* include/mailutils/daemon.h: Include types.h
34420
344212004-07-07  Sergey Poznyakoff
34422
34423	* libsieve/extensions/spamd.c (decode_float): Return
34424	signed long value, as SpamAssassin scores can be negative.
34425	(spamd_test): Updated accordingly
34426
344272004-07-05  Sergey Poznyakoff
34428
34429	* include/mailutils/registrar.h (mu_register_extra_formats): New
34430	macro.
34431	(mu_register_all_formats): Call mu_register_extra_formats()
34432	* mailbox/mu_argp.c (mu_conf_option): Added ENABLE_NNTP
34433	* mailbox/nntp/Makefile.am: Add nntp0.h
34434	* mh/Makefile.am: Added libmu_nntp.la
34435	* readmsg/readmsg.c (main): Call mu_register_extra_formats()
34436
344372004-07-05  Sergey Poznyakoff
34438
34439	* include/mailutils/registrar.h (mu_register_all_mbox_formats):
34440	Removed nntp_record. It is not a *mailbox* format.
34441	* mailbox/mailutils-config.c: Added mu_nntp
34442
34443	* mailbox/include/iterator0.h (_iterator.getitem): Changed
34444	declaration. There's no use passing a pointer to the const
34445	location, since the function *must* assign to it anyway.
34446	* include/mailutils/iterator.h (iterator_set_getitem): Changed
34447	declaration
34448	* mailbox/iterator.c (iterator_set_getitem): Changed
34449	declaration
34450	(iterator_current): Additional typecast on pitem
34451
34452	* mailbox/list.c: Updated declaration of getitem method.
34453	* mailbox/nntp/nntp_iterator.c: Likewise
34454	* mailbox/pop/pop3_iterator.c: Likewise
34455
34456	* mailbox/mailbox.c: Include <list.h>
34457	* mailbox/mailer.c: Likewise
34458
344592004-07-05  Alain Magloire
34460
34461	* configure.ac: enable NNTP support.
34462
34463	* example/Makefile.am: Enable NNTP.
34464	* frm/Makefile.am: Enable NNTP.
34465	* from/Makefile.am: Enable NNTP.
34466	* messages/Makefile.am: Enable NNTP.
34467	* readmsg/Makefile.am: Enable NNTP.
34468	* guimb/Makefile.am: Enable NNTP.
34469	* mail/Makefile.am: Enable NNTP.
34470	* sieve/Makefile.am: Enable NNTP.
34471
34472	* imap4d/Makefile.am: Put @AUTHLIBS@ before libmailbox.a (failed
34473	on cygwin if not).
34474	* pop3d/Makefile.am: Put @AUTHLIBS@ before libmailbox.a (failed on
34475	cygwin if not).
34476	* mail.local/Makefile.am: Put @AUTHLIBS@ before libmailbox.a
34477	(failed on cygwin if not).
34478
34479	* mailbox/stream.c (stream_wait): Bugfix.  If we buffer return
34480	true if the cache still	have data.
34481
34482	* include/mailutils/nntp.h: Define the default NNTP port number.
34483	* include/mailutils/pop3.h: Define the default POP3 port number.
34484	* include/mailutils/registrar.h: Enable NNTP.
34485
34486	* mailbox/nntp/folder.c: New file.
34487	* mailbox/nntp/mbox.c: New file.
34488	* mailbox/nntp/url.c: New file.
34489	* mailbox/nntp/Makefile.am: Updated.
34490
344912004-07-03  Sergey Poznyakoff
34492
34493	* mailbox/list.c (list_data_dup): Bugfix: *ptr was not assigned.
34494	* doc/texinfo/muint.texi: Automake does	not allow two independent
34495	texi sources to include the same file (version.texi, in this
34496	case). What a stupid lossage! However it handles all files whose
34497	name matches "vers*.texi" as version.texi, which allows to
34498	override the bug: include vers-muint.texi instead of version.texi.
34499
345002004-07-01  Sergey Poznyakoff
34501
34502	* include/mailutils/iterator.h (iterator_current)
34503	(iterator_set_getitem): Changed proto
34504	(iterator_get_list): Removed.
34505	* mailbox/include/iterator0.h (struct _iterator.getitem): Changed
34506	declaration.
34507	* mailbox/iterator.c (iterator_current)
34508	(iterator_set_getitem): Changed declaration
34509	* mailbox/list.c (getitem): Changed declaration
34510
34511	* mailbox/rfc2047.c (rfc2047_decode): Fixed buffer
34512	handling
34513
34514	* examples/mta.c: Minor fix
34515	* examples/nntpclient.c: Fixed printf formats
34516	(com_newgroups,com_newnews): Variable declarations are only allowed
34517	before the statements.
34518
34519	* mailbox/nntp/nntp_article.c: Fixed printf formats
34520	* mailbox/nntp/nntp_body.c: Likewise
34521	* mailbox/nntp/nntp_head.c: Likewise
34522
34523	* mailbox/nntp/nntp_iterator.c: Added missing include
34524	(nntp_itr_getitem): Changed declaration
34525
34526	* mailbox/pop/pop3_iterator.c (pop3_itr_getitem): Changed
34527	declaration
34528
345292004-06-30  Alain Magloire
34530
34531	* configure.ac: Add nntp directory.
34532	* doc/rfc/pop3.texit: add new API.
34533
34534	* mailbox/Makefile.am: Add nntp directory.
34535
34536	* mailbox/nntp/Makefile.am: Add new files.
34537	* mailbox/nntp/nntp_iterator.c: New file.
34538	* mailbox/nntp/nntp_list_active.c: Use the an iterator_t instead of a lis_t..
34539	* mailbox/nntp/nntp_list_distribpats.c: instead of a lis_t. file.
34540	* mailbox/nntp/nntp_list_times.c: instead of a lis_t. file.
34541	* mailbox/nntp/nntp_list_newgroups.c: instead of a lis_t. file.
34542	* mailbox/nntp/nntp_list_newnews.c: instead of a lis_t. file.
34543
34544	* mailbox/pop3/Makefile.am: Add new files.
34545	* mailbox/pop3/pop3_iterator.c: New file.
34546	* mailbox/pop3/pop3_capa.c: instead of a lis_t. file.
34547	* mailbox/pop3/pop3_lista.c: instead of a lis_t. file.
34548	* mailbox/pop3/pop3_uidla.c: instead of a lis_t. file.
34549
34550	* include/mailutils/Makefile.am: Add nntp.h and pop3.h.
34551	* include/mailutils/nntp.h: Add new declarations.
34552	* include/mailutils/sys/Makefile.am: Add nntp and pop3.hh
34553	* include/mailutils/sys/nntp.h: Add new declarations.
34554	* include/mailutils/pop3.h: NAdd new declarations.
34555
34556	* example/Makefile.am: Adjusted to new API.
34557	* example/nntpclient.c: Adjusted to new API.
34558	* example/pop3client.c: Adjusted to new API.
34559	* example/.cvsignore: Add nntpclient.
34560
345612004-06-30  Alain Magloire
34562
34563	* mailbox/list.c (list_get_iterator): Bug fix, wrong size for calloc()
34564	(list_data_dup): Copy the elements.
34565
345662004-06-30  Sergey Poznyakoff
34567
34568	* libsieve/extensions/spamd.c (spamd_shutdown): Bugfix
34569
345702004-06-29  Alain Magloire
34571
34572	Continuing the framework for NNTP support
34573
34574	* mailbox/nntp/.cvsignore: New file.
34575	* mailbox/nntp/nntp_help.c: New file.
34576	* mailbox/nntp/nntp_ihave.c: New file.
34577	* mailbox/nntp/nntp_list_active.c: New file.
34578	* mailbox/nntp/nntp_list_distribpats.c: New file.
34579	* mailbox/nntp/nntp_list_distributions.c: New file.
34580	* mailbox/nntp/nntp_list_newsgroups.c: New file.
34581	* mailbox/nntp/nntp_list_times.c: New file.
34582	* mailbox/nntp/nntp_newgroups.c: New file.
34583	* mailbox/nntp/nntp_newnews.c: New file.
34584	* mailbox/nntp/nntp_post.c: New file.
34585
34586	* mailbox/nntp/nntp_article.c: implementation.
34587	* mailbox/nntp/nntp_body.c: implementation.
34588	* mailbox/nntp/nntp_connect.c: implementation.
34589	* mailbox/nntp/nntp_date.c: implementation.
34590	* mailbox/nntp/nntp_destroy.c: implementation.
34591	* mailbox/nntp/nntp_group.c: implementation.
34592	* mailbox/nntp/nntp_head.c: implementation.
34593	* mailbox/nntp/nntp_list_extensions.c: implementation.
34594	* mailbox/nntp/nntp_stat.c: implementation.
34595	* mailbox/nntp/nntp_stream.c: implementation.
34596
34597	* include/mailutils/nntp.h: Declarations.
34598	* include/mailutils/sys/nntp.h: Declarations.
34599
34600	* examples/nntpclient.c: Adjusted.
34601	* examples/pop3client.c: Minor bug fixes.
34602
346032004-06-28  Sergey Poznyakoff
34604
34605	* mailbox/filter_iconv.c (internal_icvt_read)
34606	(copy_pass): Fixed mistyped conditions.
34607
34608	* mailbox/include/iterator0.h (struct _iterator): rewritten as
34609	a general-purpose iterator structure.
34610	* include/mailutils/iterator.h (iterator_create): Changed
34611	proto.
34612	(iterator_attach,iterator_detach,iterator_advance)
34613	(iterator_set_first,iterator_set_next)
34614	(iterator_set_getitem,iterator_set_finished_p)
34615	(iterator_set_dup,iterator_set_destroy): New functions.
34616	* mailbox/iterator.c: Likewise
34617	* include/mailutils/list.h (list_get_iterator): New function
34618	* mailbox/list.c: Likewise
34619
34620	* examples/listop.c: Replace iterator_create with
34621	list_get_iterator.
34622	* examples/nntpclient.c: Likewise
34623	* examples/pop3client.c: Likewise
34624	* imap4d/util.c: Likewise
34625	* libsieve/comparator.c: Likewise
34626	* libsieve/prog.c: Likewise
34627	* libsieve/register.c: Likewise
34628	* libsieve/require.c: Likewise
34629	* libsieve/sieve.l: Likewise
34630	* mail/retain.c: Likewise
34631	* mail/util.c: Likewise
34632	* mailbox/filter.c: Likewise
34633	* mailbox/folder.c: Likewise
34634	* mailbox/mailbox.c: Likewise
34635	* mailbox/mailer.c: Likewise
34636	* mailbox/mu_auth.c: Likewise
34637	* mailbox/mutil.c: Likewise
34638	* mailbox/observer.c: Likewise
34639	* mh/ali.c: Likewise
34640	* mh/mh_alias.y: Likewise
34641	* mh/pick.y: Likewise
34642	* mh/refile.c: Likewise
34643
346442004-06-27  Sergey Poznyakoff
34645
34646	* direntry: New file
34647
346482004-06-27  Sergey Poznyakoff
34649
34650	-= Version 0.5 released =-
34651
346522004-06-27  Sergey Poznyakoff
34653
34654	* doc/texinfo/muint.texi: Include version.texi
34655	* NEWS: Updated
34656	* configure.ac: Raised version number to 0.5
34657        * mailbox/memory_stream.c (_memory_write): Minor fix
34658        * mailbox/filter_iconv.c (internal_icvt_read)
34659	(copy_octal): Fixed memory allocation errors.
34660
346612004-06-23  Sergey Poznyakoff
34662
34663	* guimb/collect.c (guimb_catch_body): Use scm_c_eval_string
34664	* include/mailutils/guile.h: Provide a definition of
34665	scm_c_eval_string for Guile 1.4x
34666	* include/mailutils/mutil.h: Forward declaration of struct timeval
34667	needed for the prototype of mu_fd_wait().
34668	* libmu_scm/Makefile.am (mailutils.scm): Fixed producing rule.
34669	* libmu_scm/mailutils.scm.in: Added an end-of-file comment
34670	* libmu_scm/mu_mailbox.c: Use SCM_UNSPECIFIED where appropriate.
34671	* libmu_scm/mu_message.c: Likewise.
34672
346732204-06-20 Alain Magloire
34674
34675	* examples/nntpclient.c: An example of using nntp.
34676
34677	* mailbox/nntp/nntp_date.c: New file.
34678	* mailbox/nntp/nntp_group.c: New file.
34679	* mailbox/nntp/nntp_last.c: New file.
34680	* mailbox/nntp/nntp_list_extensions.c: New file.
34681	* mailbox/nntp/nntp_mode_reader.c: New file.
34682	* mailbox/nntp/nntp_next.c: New file.
34683	* mailbox/nntp/nntp_quit.c: New file.
34684	* mailbox/nntp/nntp_stat.c: New file.
34685	* mailbox/nntp/Makefile.am
34686	* mailbox/nntp/nntp_article.c: Use new macros.
34687	* mailbox/nntp/nntp_body.c: Use new macros.
34688	* mailbox/nntp/nntp_connect.c: Use new macros.
34689	* mailbox/nntp/nntp_head.c: Use new macros.
34690	* mailbox/nntp/nntp_response.c: Use new macros.
34691	* include/mailutils/nntp.h: New declarations.
34692	* include/mailutils/sys/nntp.h: New declarations and macros..
34693
346942204-06-20 Alain Magloire
34695
34696	* mailbox/pop/pop3_lista.c: Destroy the list on error.
34697	* mailbox/pop/pop3_uidla.c: Destroy the list on error.
34698
346992004-06-15  Alain Magloire
34700
34701	* mailbox/tcp.c(_tcp_close): Check the return value of close(2).
34702
347032004-06-15  Sergey Poznyakoff
34704
34705	* libmu_scm/Makefile.am (mailutils.scm): Fixed producing rule.
34706
347072004-06-14 Alain Magloire
34708
34709	* mailbox/nntp/Makefile.am: New file
34710	* mailbox/nntp/nntp_article.c: New file
34711	* mailbox/nntp/nntp_header.c: New file
34712	* mailbox/nntp/nntp_body.c: New file
34713	* include/mailutils/nntp.h: adjustment.
34714
347152004-06-12 Alain Magloire
34716
34717	* THANKS: Move part of it to AUTHORS file, reorder alphabetically
34718	* AUTHORS: Reorder alpha.
34719
347202004-06-12 Alain Magloire
34721
34722	Putting the framework for NNTP support.
34723
34724	* include/mailutils/nntp.h: New file
34725	* include/mailutils/sys/nntp.h: New file
34726	* mailbox/nntp/nntp_carrier.c: New file
34727	* mailbox/nntp/nntp_connect.c: New file
34728	* mailbox/nntp/nntp_create.c: New file
34729	* mailbox/nntp/nntp_debug.c: New file
34730	* mailbox/nntp/nntp_destroy.c: New file
34731	* mailbox/nntp/nntp_disconnect.c: New file
34732	* mailbox/nntp/nntp_readline.c: New file
34733	* mailbox/nntp/nntp_response.c: New file
34734	* mailbox/nntp/nntp_sendline.c: New file
34735	* mailbox/nntp/nntp_stream.c: New file
34736	* mailbox/nntp/nntp_timeout.c: New file
34737
347382004-06-12  Sergey Poznyakoff
34739
34740	* auth/gsasl.c: Revised use of const modifiers
34741	* auth/lbuf.c: Likewise
34742	* auth/lbuf.h: Likewise
34743	* auth/mysql.c: Likewise
34744	* auth/pam.c: Likewise
34745	* auth/pgsql.c: Likewise
34746	* auth/sql.c: Likewise
34747	* auth/tls.c: Likewise
34748	* auth/virtual.c: Likewise
34749	* examples/iconv.c: Likewise
34750	* imap4d/auth_gsasl.c: Likewise
34751	* imap4d/imap4d.c: Likewise
34752	* imap4d/util.c: Likewise
34753	* include/mailutils/mu_auth.h: Likewise
34754	* include/mailutils/mutil.h: Likewise
34755	* include/mailutils/stream.h: Likewise
34756	* libmu_scm/mu_mailbox.c: Likewise
34757	* mailbox/file_stream.c: Likewise
34758	* mailbox/filter_iconv.c: Likewise
34759	* mailbox/mapfile_stream.c: Likewise
34760	* mailbox/mu_auth.c: Likewise
34761	* mailbox/mutil.c: Likewise
34762	* mailbox/stream.c: Likewise
34763	* mailbox/system.c: Likewise
34764	* mailbox/include/stream0.h: Likewise
34765	* mailbox/maildir/maildir.h: Likewise
34766	* mailbox/maildir/mbox.c: Likewise
34767	* mh/mh_format.c: Likewise
34768	* mh/mh_init.c: Likewise
34769	* mh/send.c: Likewise
34770	* pop3d/extra.c: Likewise
34771
34772	* mail/util.c: Commented out unused static functions
34773	* comsat/cfg.c: Likewise
34774
34775	* mail/from.c: Minor fix
34776	* mailbox/daemon.c: Likewise
34777
34778	* mailbox/muerrno.c: Added missing includes
34779	* mailbox/rfc2047.c: Likewise
34780	* mailbox/maildir/folder.c: Likewise
34781	* mailbox/mbox/url.c: Likewise
34782	* mailbox/mh/folder.c: Likewise
34783	* mh/mh.h: Likewise
34784	* mh/mh_alias.l: Likewise
34785
34786	* mh/mh_fmtgram.y: Provide forward declarations for yyerror and
34787	yylex.
34788	* libsieve/sieve.y: Likewise
34789
347902004-06-09  Sergey Poznyakoff
34791
34792	* NEWS: Updated
34793	* doc/texinfo/programs.texi: Updated
34794	* include/mailutils/mutil.h (mu_decode_filter): New function
34795	(mu_default_fallback_mode): New variable.
34796	(mu_set_default_fallback): New function.
34797	* mailbox/mutil.c: Likewise
34798	* libmu_scm/Makefile.am: Do not use $< in explicit rules
34799	* mail/util.c (util_setenv): Special handling for decode-fallback
34800	variable
34801	* mail.remote/mail.remote.c: Fixed doc string
34802	* mailbox/mu_auth.c: Add missing gettext markers
34803	* mailbox/rfc2047.c: Use mu_decode_filter.
34804	* mh/mh_global.c (mh_read_profile): Handle new profile
34805	variable "Decode-Fallback".
34806	* pop3d/pop3d.c (options): Fixed typo in doc string
34807	* include/mailutils/stream.h: Forward declaration of struct
34808	timeval is needed for stream_wait().
34809
348102004-06-06  Sergey Poznyakoff
34811
34812	* include/mailutils/filter.h (filter_iconv_create): New prototype.
34813	* mailbox/filter_iconv.c: Fixed several bugs. Use an extra
34814	argument to filter_iconv_create to decide what to do
34815	if conversion fails (mu_iconv_fallback_mode).
34816	* examples/iconv.c: Updated call to filter_iconv_create()
34817	* mailbox/rfc2047.c: Likewise.
34818
348192004-06-05  Sergey Poznyakoff
34820
34821	* NEWS: Updated
34822	* configure.ac: Check for iconv.h and iconv_t
34823	(MU_COMMON_LIBRARIES): New subst symbol
34824	* comsat/Makefile.am: Use MU_COMMON_LIBRARIES
34825	* dotlock/Makefile.am
34826	* examples/Makefile.am: Likewise.
34827	* frm/Makefile.am: Likewise.
34828	* from/Makefile.am: Likewise.
34829	* guimb/Makefile.am: Likewise.
34830	* imap4d/Makefile.am: Likewise.
34831	* mail/Makefile.am: Likewise.
34832	* mail.local/Makefile.am: Likewise.
34833	* mail.remote/Makefile.am: Likewise.
34834	* mailbox/Makefile.am: Likewise.
34835	* messages/Makefile.am: Likewise.
34836	* mh/Makefile.am: Likewise.
34837	* movemail/Makefile.am: Likewise.
34838	* pop3d/Makefile.am: Likewise.
34839	* readmsg/Makefile.am: Likewise.
34840	* sieve/Makefile.am: Likewise.
34841
34842	* mailbox/file_stream.c (_file_read, _file_readline): Check for
34843	eof.
34844	* mailbox/list.c (list_set_destroy_item): Minor fix
34845
34846	* include/mailutils/errno.h (MU_ERR_BUFSPACE): New error code
34847	* mailbox/muerrno.c: Likewise
34848
34849	* include/mailutils/stream.h (MU_STREAM_STRICT): New flag
34850	* libsieve/extensions/spamd.c: Minor formatting fix
34851	* mailbox/mailutils-config.c (main): add LINK_POSTFLAGS
34852
34853	* mailbox/rfc2047.c: (rfc2047_decode): Implemented charset
34854	recoding using iconv filters.
34855	* mailbox/filter_iconv.c: New file. Implementation of
34856	iconv filter streams.
34857	* examples/iconv.c: New file
34858
34859	* po/POTFILES.in: Updated
34860
348612004-06-04  Sergey Poznyakoff
34862
34863	* NEWS: Updated
34864	* examples/pop3client.c: Minor fixes.
34865	* libsieve/extensions/spamd.c: Minor formatting changes
34866	* mailbox/pop/pop3_sendline.c: Bugfix
34867
348682004-06-04  Sergey Poznyakoff
34869
34870	Use abstract transport layer in streams, instead of
34871	integer file descriptors. Among other things, this
34872	fixes a long standing bug in imap4d: now it can use
34873	SASL over TLS.
34874
34875	* auth/gsasl.c: Use stream transport instead of fd.
34876	* auth/tls.c: Likewise.
34877	* pop3d/extra.c: Likewise.
34878
34879	* include/mailutils/types.h (mu_transport_t): New data type
34880	* include/mailutils/gsasl.h (gsasl_stream_create): Changed
34881	prototype
34882	* include/mailutils/tls.h (tls_stream_create)
34883	(tls_stream_create_client): Changed prototype
34884
34885	* include/mailutils/mutil.h (mu_fd_wait): New function
34886	* include/mailutils/stream.h (stream_get_fd)
34887	(stream_get_fd2,stream_set_fd): Removed
34888	(stream_get_transport2,stream_get_transport)
34889	(stream_wait,stream_set_get_transport2)
34890	(stream_set_wait): New functions
34891	* mailbox/stream.c: Likewise
34892 	* mailbox/include/stream0.h (struct _stream._get_fd): Removed
34893	(_get_transport2,_wait): New methods
34894
34895	* examples/http.c: Use new stream functions
34896	* imap4d/auth_gsasl.c: Likewise
34897	* imap4d/util.c: Likewise
34898	* libsieve/extensions/spamd.c: Likewise
34899	* mailbox/body.c: Likewise
34900	* mailbox/file_stream.c: Likewise
34901	* mailbox/filter.c: Likewise
34902	* mailbox/mapfile_stream.c: Likewise
34903	* mailbox/message.c: Likewise
34904	* mailbox/mime.c: Likewise
34905	* mailbox/mutil.c: Likewise
34906	* mailbox/tcp.c: Likewise
34907	* mailbox/imap/mbox.c: Likewise
34908	* mailbox/mbox/mbox.c: Likewise
34909	* mailbox/pop/mbox.c: Likewise
34910	* mailbox/pop/pop3_readline.c: Likewise
34911	* mailbox/pop/pop3_sendline.c: Likewise
34912	* mh/mhn.c: Likewise
34913	* examples/http.c: Likewise
34914	* imap4d/idle.c: Likewise
34915	* include/mailutils/sys/pop3.h: Likewise
34916
34917	* mail/file.c (mail_file): minor fix
34918	* mailbox/folder.c: minor fix
34919	* mailbox/mailcap.c: minor fix
34920
349212004-06-02  Sergey Poznyakoff
34922
34923	* configure.ac: Raised version number to 0.4.90
34924	* NEWS: Likewise
34925        * mailbox/muerrno.c (MU_ERR_CONN_CLOSED,MU_ERR_PARSE):
34926        New error codes.
34927        (MU_ERR_NOENT): New error code. Use it instead
34928	of ENOENT to avoid misguiding diagnostics
34929        'No such file or directory'. Use ENOENT only for its
34930	direct purpose.
34931        * include/mailutils/errno.h: Likewise.
34932
34933	* auth/gsasl.c: Revise the usage of return codes.
34934	* auth/tls.c: Likewise.
34935	* examples/addr.c: Likewise.
34936	* imap4d/namespace.c: Likewise.
34937	* lib/mu_dbm.c: Likewise.
34938	* mail/util.c: Likewise.
34939	* mailbox/address.c: Likewise.
34940	* mailbox/amd.c: Likewise.
34941	* mailbox/attachment.c: Likewise.
34942	* mailbox/attribute.c: Likewise.
34943	* mailbox/auth.c: Likewise.
34944	* mailbox/body.c: Likewise.
34945	* mailbox/debug.c: Likewise.
34946	* mailbox/envelope.c: Likewise.
34947	* mailbox/file_stream.c: Likewise.
34948	* mailbox/filter.c: Likewise.
34949	* mailbox/filter_trans.c: Likewise.
34950	* mailbox/folder.c: Likewise.
34951	* mailbox/header.c: Likewise.
34952	* mailbox/iterator.c: Likewise.
34953	* mailbox/list.c: Likewise.
34954	* mailbox/mailcap.c: Likewise.
34955	* mailbox/mailer.c: Likewise.
34956	* mailbox/mapfile_stream.c: Likewise.
34957	* mailbox/mbx_default.c: Likewise.
34958	* mailbox/memory_stream.c: Likewise.
34959	* mailbox/message.c: Likewise.
34960	* mailbox/mime.c: Likewise.
34961	* mailbox/monitor.c: Likewise.
34962	* mailbox/mu_auth.c: Likewise.
34963	* mailbox/observer.c: Likewise.
34964	* mailbox/property.c: Likewise.
34965	* mailbox/refcount.c: Likewise.
34966	* mailbox/registrar.c: Likewise.
34967	* mailbox/rfc2047.c: Likewise.
34968	* mailbox/sendmail.c: Likewise.
34969	* mailbox/smtp.c: Likewise.
34970	* mailbox/stream.c: Likewise.
34971	* mailbox/tcp.c: Likewise.
34972	* mailbox/ticket.c: Likewise.
34973	* mailbox/url.c: Likewise.
34974	* mailbox/wicket.c: Likewise.
34975	* mailbox/imap/folder.c: Likewise.
34976	* mailbox/imap/mbox.c: Likewise.
34977	* mailbox/mbox/folder.c: Likewise.
34978	* mailbox/mbox/mbox.c: Likewise.
34979	* mailbox/mbox/url.c: Likewise.
34980	* mailbox/pop/mbox.c: Likewise.
34981	* mailbox/pop/pop3_capa.c: Likewise.
34982	* mailbox/pop/pop3_carrier.c: Likewise.
34983	* mailbox/pop/pop3_list.c: Likewise.
34984	* mailbox/pop/pop3_lista.c: Likewise.
34985	* mailbox/pop/pop3_retr.c: Likewise.
34986	* mailbox/pop/pop3_stat.c: Likewise.
34987	* mailbox/pop/pop3_timeout.c: Likewise.
34988	* mailbox/pop/pop3_top.c: Likewise.
34989	* mailbox/pop/pop3_uidl.c: Likewise.
34990	* mailbox/pop/pop3_uidla.c: Likewise.
34991	* mh/mh_ctx.c: Likewise.
34992
349932004-06-01  Sergey Poznyakoff
34994
34995	* examples/mailcap.c (main): Bugfix: fields_count had wrong type.
34996	* include/mailutils/mailutils.h: Remove guile.h. (reverses another
34997	part of changes made 2004-01-10).
34998
349992004-05-27  Sergey Poznyakoff
35000
35001	* NEWS: Updated
35002	* include/mailutils/filter.h (rfc_2047_Q_filter): New filter
35003	type.
35004	* mailbox/filter.c (mailbox/filter.c): Register rfc_2047_Q_filter
35005	* mailbox/filter_trans.c: New implementation of RFC 2047 "Q" filter.
35006	Reorganized all functions.
35007	* mailbox/rfc2047.c: Correctly decode "Q" encoding.
35008
35009	* mail/send.c (mail_send0): Check ignoreeof variable for
35010	interactive sessions only.
35011	* mailbox/mbox/folder.c: Include mutil.h
35012
350132004-05-07  Sergey Poznyakoff
35014
35015	* mail/from.c (mail_from0): Use Date: header if 'datefield' is
35016	set.
35017	* mail/mail.c (main): Start interactive mode with an empty mailbox
35018	if 'emptystart' is set.
35019
35020	* NEWS: Updated
35021	* doc/texinfo/programs.texi (Mail Variables): Documented new
35022	variables.
35023
350242004-05-07  Sergey Poznyakoff
35025
35026	* mail/util.c (util_get_sender): Updated to match recent
35027	changes (see the previous entry).
35028	* mailbox/argcv.c (argcv_scan): Honor escaped whitespace.
35029
350302004-04-27  Sergey Poznyakoff
35031
35032	* NEWS: Updated
35033	* doc/texinfo/mailutils.texi: Added variable and keyword
35034	index
35035	* doc/texinfo/programs.texi: Documented new features
35036	* doc/texinfo/Makefile.am: Updated
35037
35038	* mail/mail.c (main): Changed initialization sequence.
35039	Set xmailer and default sender fields on startup.
35040	* mail/mail.h (mail_sender,mail_nosender)
35041	(get_sender_address): New functions.
35042	* mail/retain.c: Likewise.
35043	* mail/send.c: Do not add X-Mailer if xmailer variable is
35044	unset.
35045	* mail/table.c (sender,nosender): New commands
35046	* include/mailutils/Makefile.am: Added daemon.h
35047
350482004-04-26  Wojciech Polak
35049
35050	Added -P, --pidfile=FILE options for the daemons.
35051
35052	* mailbox/daemon.c: New file. Added pidfile support
35053	and a placeholder for a further universal daemon routines.
35054	* mailbox/mu_argp.c: Added new pidfile option.
35055	* mailbox/Makefile.am: Added daemon.c.
35056	* include/mailutils/daemon.h: New file.
35057	* include/mailutils/argp.h (daemon_param): Added *pidfile.
35058
35059	* pop3d/pop3d.c (main): Call daemon_create_pidfile()
35060	if the -P or --pidfile option was specified.
35061	(daemon_param): Set initial NULL for the pidfile name.
35062	* imap4d/imap4d.c (main): Likewise.
35063	* pop3d/pop3d.h: Include <mailutils/daemon.h>.
35064	* imap4d/imap4d.h: Likewise.
35065
350662004-04-14  Sergey Poznyakoff
35067
35068	* mail.remote/mail.remote.c: Use "auth" capability.
35069	* mail.remote/Makefile.am (mail_remote_LDADD): Add @AUTHLIBS@
35070	* mailbox/mu_argp.c (read_rc, mu_create_argcv): Do not bail
35071	out if mu_tilde_expansion() returns NULL. There may be users
35072	without homedir.
35073	* mailbox/mutil.c (mu_get_user_email): Use mu_get_auth_by_uid()
35074	instead of getpwuid().
35075
350762004-04-14  Jordi Mallach
35077
35078	* examples/pop3client.c (pop_completion): Use rl_completion_matches.
35079	Fixes potential crash on 64-bit architectures.
35080
350812004-04-08  Sergey Poznyakoff
35082
35083	* configure.ac: Add AM_ICONV
35084	* mailbox/smtp.c (smtp_send_message): Correctly handle long
35085	header lines. Fixes bug reported by William MacBain
35086	<macbain@ott-fortimail.dnsalias.org>
35087	* comsat/comsat.c (comsat_main): Make info text clearer.
35088	* sieve/sieve.c (options): Likewise
35089	* frm/frm.c: Likewise
35090	* dotlock/dotlock.c (main): Fixed diagnostics to better suit
35091	i18n.
35092	* guimb/main.c (options): Add translators comment
35093	* libsieve/actions.c: Likewise.
35094	* libsieve/tests.c: Likewise.
35095	* libsieve/comparator.c (sieve_match_part_checker): Likewise.
35096	* mail/if.c (mail_if): Likewise.
35097	* pop3d/popauth.c: Likewise.
35098	* mail.remote/testsuite/mail.remote/send.exp: Updated copyright
35099	date
35100	* mailbox/mutil.c: Add missing gettext marker
35101
35102	* examples/pop3client.c: Rewritten to drop the readline dependency.
35103
351042004-02-08  Wojciech Polak
35105
35106	* pop3d/pop3d.c (pop3d_mainloop): Terminate the session
35107	after receiving an illegal TLS packet.
35108	* imap4d/starttls.c (imap4d_starttls): Likewise.
35109
351102004-02-08  Wojciech Polak
35111
35112	* doc/texinfo/*: Updated to the current API.
35113	* doc/man/*: Too many outdated stuff... Replaced it
35114	with the "always fresh" man pages ;).
35115
351162004-02-05  Sergey Poznyakoff
35117
35118	* include/mailutils/header.h (MU_HEADER_DELIVERY_DATE)
35119	(MU_HEADER_ENVELOPE_TO): New macros.
35120	* mailbox/amd.c (amd_envelope_date): Use Delivery-Date
35121	if X-Envelope-Date is not present.
35122
351232004-02-03  Sergey Poznyakoff
35124
35125	* mailbox/maildir/mbox.c (maildir_message_cmp): Compare the
35126	rest of filenames if the timestamps are equal
35127	* mail/if.c (mail_if): 'if t'  is true if stdout is connected
35128	to a terminal.
35129	* mailbox/mbox/url.c (_url_path_init): Missed typecast.
35130
351312004-02-03  Sergey Poznyakoff
35132
35133       * scripts/texify.sed: New file
35134       * scripts/Makefile.am: Added texify.sed
35135       * doc/texinfo/Makefile.am (.c.inc rule): Use texify.sed
35136
351372004-02-03  Linus Nordberg  <linus@nordberg.se>
35138
35139       * mailbox/pop/pop3_readline.c: Include sys/time.h.
35140
35141       * mailbox/maildir/mbox.c: Include limits.h.
35142       (maildir_uniq): Use _POSIX_PATH_MAX if PATH_MAX is not
35143       defined.
35144
35145       * mailbox/file_stream.c: Include signal.h.
35146
351472004-02-01  Sergey Poznyakoff
35148
35149	* mailbox/maildir/mbox.c (maildir_message_lookup): Fixed bug
35150	(rc could have been used uninitialized). Thanks Wojciech
35151	for noticing
35152	(maildir_scan0): Fixed typo in notification loop.
35153
351542004-01-27  Sergey Poznyakoff
35155
35156	* mailbox/smtp.c: Control the value
35157	of READ_RECIPIENTS property to decide whether the message
35158	should be scanned for recipient addresses.
35159	* mailbox/sendmail.c: Likewise.
35160	* mail.remote/mail.remote.c: New option -t (compatible with
35161	sendmail).
35162	Simplified the help message.
35163	(main): Restructured.
35164	* mail.remote/testsuite/mail.remote/send.exp (mail_remote_test):
35165	Added OPTION statement
35166	* mail.remote/testsuite/Data: Added new test.
35167
35168	* mailbox/mailbox.c (mailbox_lock, mailbox_unlock): New
35169	functions.
35170	* include/mailutils/mailbox.h: Likewise
35171	* imap4d/close.c (imap4d_close): Return NO on failure.
35172
35173	* mailbox/include/mailer0.h (struct _mailer): Removed
35174	unused field properties_count.
35175
35176	* TODO: Updated
35177	* NEWS: Updated
35178
351792004-01-22  Sergey Poznyakoff
35180
35181	* mailbox/amd.c: Use sorted message array with binary
35182	searches/inserts. This speeds up the mh/maildir
35183	operations considerably. Testing on a MH  folder
35184	with 6000 messages shows the following data:
35185
35186		       Time of execution
35187                    List       Array+Bsearch     %    Speedup (times)
35188        scan        24.795     7.526          30.3    3.294
35189        refile (to) 10.915     0.068           0.6    160.514
35190        rmm         10.893     0.105             1    103.742
35191
35192	* mailbox/include/amd.h: Likewise.
35193	* mailbox/maildir/mbox.c: Likewise.
35194	* mailbox/mh/mbox.c: Likewise.
35195
35196	* imap4d/auth_gss.c: Support for GSS. Submitted by
35197	Simon Josefsson.
35198	* m4/gssapi.m4: Likewise.
35199
352002004-01-20  Wojciech Polak
35201
35202	* doc/texinfo/*.texi: Major reorganization in the documentation.
35203
352042004-01-19  Wojciech Polak
35205
35206	* libsieve/tests.c (retrieve_header): Unfold the header,
35207	use header_aget_field_value_unfold().
35208
352092004-01-15  Sergey Poznyakoff
35210
35211	* imap4d/util.c (util_base64_encode): Bugfix. Patch submitted
35212	by Simon Josefsson.
35213
35214	* imap4d/Makefile.am: Added local folder format support.
35215	* pop3d/Makefile.am: Likewise.
35216	* imap4d/imap4d.c (main): Call mu_register_local_mbox_formats().
35217	* pop3d/pop3d.c: Likewise.
35218	* imap4d/namespace.c (namespace_checkfullpath): Preserve an
35219	eventual URL scheme specification.
35220	Fixed indentation.
35221	* include/mailutils/registrar.h (mu_register_local_mbox_formats)
35222	(mu_register_remote_mbox_formats): New macros.
35223	* mailbox/maildir/mbox.c: Added UID support.
35224	* mailbox/mh/mbox.c (mh_scan0): Removed misleading comment
35225
352262004-01-15  Wojciech Polak
35227
35228	* mailbox/mbox/mbox.c: Minor. Use only one printing style
35229	while debugging.
35230
352312004-01-14  Sergey Poznyakoff
35232
35233	* mailbox/mbox/mbox.c (mbox_append_message0): Truncate the
35234	stream back to its original size if an error occurred.
35235	* mail.local/main.c (deliver): Likewise.
35236	* frm/frm.c: Minor fix in help output.
35237
35238	* mail/copy.c: Check for error return from mailbox_append_message
35239	* mail/quit.c: Likewise.
35240	* mail/send.c: Likewise.
35241
352422004-01-13  Sergey Poznyakoff
35243
35244	* frm/frm.c: Lots of changes for compatibility with ELM.
35245	* frm/testsuite/frm/test.exp: Updated
35246
352472004-01-13  Sergey Poznyakoff
35248
35249	Implemented 'file:' URLs
35250
35251	* include/mailutils/registrar.h: Removed file_record
35252	* mailbox/include/registrar0.h: Likewise
35253	* examples/mimetest.c: Likewise
35254	* mailbox/mbox/folder.c: Likewise
35255
35256	* include/mailutils/mutil.h (mu_scheme_autodetect_p): New function
35257	* mailbox/mutil.c: Likewise
35258
35259	* mailbox/amd.c (amd_url_init): Use mu_scheme_autodetect_p().
35260	* mailbox/maildir/folder.c (_maildir_is_scheme): Likewise.
35261	* mailbox/mh/folder.c (_mh_is_scheme): Likewise.
35262
35263	* mailbox/url_file.c: Removed. File not needed anymore.
35264	* mailbox/url_path.c: Likewise.
35265	* mailbox/Makefile.am (url_file.c,url_path.c): Removed
35266
35267	* mailbox/mbox/url.c (_url_path_init): Moved from ../url_path.c
35268	* mailbox/mbox/file.c: Removed. File not needed anymore.
35269	* mailbox/mbox/Makefile.am (file.c): Removed
35270
35271	* frm/frm.c: Improved handling of --select option.
35272	(action): Optimized select condition.
35273	* from/from.c: Include missing headers
35274
352752004-01-13  Wojciech Polak
35276
35277	* from/from.c: Use mu_error() where appropriate.
35278	(from_rfc2047_decode): New function.
35279	* messages/messages.c: Use mu_error().
35280
352812004-01-12  Wojciech Polak
35282
35283	* frm/frm.c (frm_rfc2047_decode): New function.
35284	(get_personal): Call the frm_rfc2047_decode().
35285	* mail/util.c (util_rfc2047_decode): Test LANG
35286	if LC_ALL is null.
35287
352882004-01-12  Sergey Poznyakoff
35289
35290	* include/mailutils/mailutils.h: Removed gsasl.h (reverses part
35291	of changes made 2004-01-10). Reason: unconditional inclusion
35292	causes compilation failure if libgsasl is not installed.
35293
35294	* NEWS: Updated
35295
35296	* mailbox/maildir/maildir.h: New file.
35297	* mailbox/amd.c (amd_url_init): New function
35298	* mailbox/include/amd.h: Likewise.
35299	* mailbox/include/registrar0.h (_url_mh_init,_folder_mh_init)
35300	(_url_maildir_init,_folder_maildir_init): Removed.
35301
35302	* mailbox/maildir/url.c: Removed.
35303	* mailbox/maildir/maildir.h: New file
35304	* mailbox/maildir/folder.c: Auto-detection of maildir format.
35305	* mailbox/maildir/mbox.c (mkfilename): Renamed to
35306	maildir_mkfilename. Made external.
35307	* mailbox/maildir/Makefile.am: Removed url.c, added maildir.h
35308
35309	* mailbox/mbox/folder.c (_path_is_scheme): New
35310	function. Implements auto-detection for the "path" scheme.
35311
35312	* mailbox/mh/url.c: Removed
35313	* mailbox/mh/Makefile.am: Removed url.c
35314	* mailbox/mh/folder.c: Auto-detection of MH format.
35315
35316	* mailbox/url.c: Fixed indentation
35317	* frm/frm.c: Minor changes.
35318
353192004-01-11  Sergey Poznyakoff
35320
35321	* mailbox/amd.c (amd_open,amd_close): Bugfix
35322
353232004-01-11  Wojciech Polak
35324
35325	* libmu_scm/mailutils.scm.in (mu-libs): Added libmu_maildir.
35326
353272004-01-11  Wojciech Polak
35328
35329	* readmsg/readmsg.c (main): Use mu_register_all_mbox_formats().
35330	* guimb/main.c (main): Use mu_register_all_formats().
35331	* scripts/mailutils.spec.in: Updated.
35332	* include/mailutils/Makefile.am: Added missing refcount.h.
35333
353342004-01-10  Wojciech Polak
35335
35336	* include/mailutils/mailutils.h: Added missing header files.
35337	* include/mailutils/gsasl.h: Include <gsasl.h>.
35338
35339	* messages/messages.c (main): Use mu_register_all_mbox_formats().
35340	(messages_count): Improved diagnostics.
35341	* messages/Makefile.am: Updated.
35342	* frm/frm.c (main): Unified diagnostic messages.
35343	* frm/Makefile.am: Updated.
35344
353452004-01-09  Sergey Poznyakoff
35346
35347	* NEWS: Documented new features.
35348
353492004-01-08  Sergey Poznyakoff
35350
35351	* configure.ac (LIBMU_SCM_DEPS): Added maildir
35352
35353	* mailbox/amd.c: New file. Abstract mail directory level.
35354	* mailbox/Makefile.am: Added amd.c
35355
35356	* mailbox/include/amd.h: New file.
35357	* mailbox/include/Makefile.am: Added amd.h
35358
35359	* mailbox/maildir/mbox.c: Implemented
35360	* mailbox/maildir/folder.c: New file
35361	* mailbox/maildir/url.c: New file
35362	* mailbox/maildir/Makefile.am: Added folder.c and url.c
35363
35364	* mailbox/mh/mbox.c: Re-implemented via AMD.
35365
35366	* mailbox/include/registrar0.h: Added maildir support
35367	* libmu_scm/mu_scm.c: Likewise.
35368	* mailbox/mu_argp.c: Likewise.
35369
35370	* include/mailutils/registrar.h (mu_register_all_mbox_formats)
35371	(mu_register_all_mailer_formats,mu_register_all_formats): New
35372	macros.
35373
35374	* frm/frm.c (main): Use mu_register_all_mbox_formats
35375	* from/from.c: Likewise.
35376	* movemail/movemail.c: Likewise.
35377
35378	* mail/mail.c (main): Use mu_register_all_formats
35379	* sieve/sieve.c: Likewise
35380	* mh/mh_init.c (mh_init): Likewise
35381
35382	* lib/Makefile.am: Minor formatting change
35383	* messages/messages.c: Likewise
35384
35385	* pop3d/pop3d.h (pop3d_mark_retr,pop3d_is_retr)
35386	(pop3d_unmark_retr): Added external declarations.
35387
353882004-01-06  Sergey Poznyakoff
35389
35390	* m4/Makefile.am: Removed.
35391	* m4/.cvsignore: Updated
35392	* configure.ac: Removed m4/Makefile.am
35393	* Makefile.am: Removed m4
35394
353952004-01-05  Sergey Poznyakoff
35396
35397	* include/mailutils/mutil.h (mu_true_answer_p): New function.
35398	* mailbox/mutil.c: Likewise
35399
35400	* mail/var.c: (parse_headers): Use mu_true_answer_p()
35401	* mh/mh.h (is_true): Likewise.
35402	* mh/mh_init.c (mh_vgetyn): Likewise.
35403	* sieve/sieve.c (is_true_p): Likewise.
35404
35405	* movemail/movemail.c (move_message): Improved diagnostics
35406
35407	* libsieve/runtime.c (instr_run): Adjust pc before calling handler.
35408	* libsieve/actions.c (sieve_action_stop); Restored zero assignment
35409	to pc. This is possible due to the changes to runtime.c
35410
354112004-01-05  Sergey Poznyakoff
35412
35413	* include/mailutils/libsieve.h (sieve_locus_t): New datatype.
35414	(sieve_action_log_t): Changed type of the second argument.
35415	* libsieve/actions.c (sieve_action_stop): Bugfix. Account for
35416	-4 offset.
35417	* libsieve/comparator.c (sieve_match_part_checker): Use
35418	extended regular expressions by default.
35419	* libsieve/prog.c (sieve_code_source,sieve_code_line): New
35420	functions.
35421	(sieve_code_action,sieve_code_test): Include line info before
35422	coding the instruction.
35423	* libsieve/runtime.c (instr_source,instr_line)
35424	(sieve_get_locus): New functions
35425	* libsieve/sieve.h (sieve_op_t.line): New member
35426	* libsieve/sieve.l (push_source,pop_source): Include line info
35427	* libsieve/sieve.y (sieve_machine_destroy)
35428	(sieve_machine_begin): Initialize and destroy source_list
35429	* libsieve/util.c (sieve_log_action): Updated call to
35430	mach->logger.
35431
35432	* libsieve/tests.c: Improved debugging messages
35433	* libsieve/extensions/list.c: Likewise.
35434	* libsieve/extensions/spamd.c: Likewise.
35435	* libsieve/extensions/timestamp.c: Likewise.
35436	* examples/numaddr.c: Likewise.
35437
35438	* mail.local/main.c: Brought in sync with recent changes to
35439	libsieve
35440	* sieve/sieve.c: Likewise.
35441
35442	* sieve/testsuite/lib/sieve.exp: Default to --line-info=no
35443
35444	* include/mailutils/list.h (list_locate): New function
35445	* mailbox/list.c: Likewise
35446
354472004-01-04  Wojciech Polak
35448
35449	* mail/send.c (mail_send): Bugfix. Removed free(p)
35450	and prevent from later segmentation fault.
35451
354522004-01-03  Wojciech Polak
35453
35454	* auth/tls.c (generate_dh_params): Adapt to GnuTLS >= 1.0.0.
35455	* po/POTFILES.in: Added movemail/movemail.c
35456
354572004-01-03  Sergey Poznyakoff
35458
35459	* guimb/scm/sieve.scm.in (sieve-version): New function. Supports
35460	the required --version option.
35461
354622004-01-03  Sergey Poznyakoff
35463
35464	* configure.ac: Fixed INTLINCS
35465	* examples/Makefile.am: Reverted to mod_LTLIBRARY for
35466	numaddr.la
35467	* libmu_scm/Makefile.am: Removed a too general implicit rule.
35468	It caused config.h to be rebuilt incorrectly.
35469
354702004-01-02  Wojciech Polak
35471
35472	Happy GNU Year! :)
35473
35474	* libsieve/extensions: New directory.
35475	* libsieve/extensions/Makefile.am: New file.
35476	* libsieve/Makefile.am: Added `SUBDIRS = . extensions'.
35477	* examples/timestamp.c: Moved to ../libsieve/extensions/
35478	* examples/list.c: Likewise.
35479	* examples/spamd.c: Likewise.
35480	* examples/Makefile.am: Updated.
35481	Added `noinst_LTLIBRARIES = numaddr.la'.
35482	* configure.ac (AC_PREREQ): Bump to 2.59.
35483	(AC_CONFIG_FILES): Added libsieve/extensions/Makefile.
35484	* Makefile.am: Require at least version 1.8.
35485
354862003-12-30  Sergey Poznyakoff
35487
35488	* examples/spamd.c (spamd_test): Use EUID to determine
35489	user's identity.
35490	* movemail/movemail.c: Allow to use traditional Emacs
35491	invocation (password as the last argument) with usual
35492	Mailutils URLs.
35493
354942003-12-30  Sergey Poznyakoff
35495
35496	* examples/murun.c: Close output stream
35497	* include/mailutils/locker.h (enum mu_locker_set_mode): New
35498	data type
35499	(locker_set_default_flags): Changed declaration
35500	(locker_set_default_retry_timeout)
35501	(locker_set_default_retry_count)
35502	(locker_set_default_expire_timeout)
35503	(locker_set_default_external_program): New functions
35504	* mailbox/locker.c: Likewise
35505	* mailbox/mu_argp.c: New locker options
35506	* mail.local/main.c: Adapt for new locker functions.
35507
35508	* mailbox/file_stream.c (prog_stream_wait,start_program_filter)
35509	(_prog_close,_prog_open): Bugfixes
35510
35511	* mh/mhl.c: Minor fix
35512	* movemail/movemail.c: --keep-messages option (an alias for -p)
35513
355142003-12-29  Sergey Poznyakoff
35515
35516	* comsat/comsat.c (main): Minor fix (do not use hardcoded
35517	log facility)
35518	* mail.local/main.c: New option --message-id-header
35519
35520	* imap4d/imap4d.c: Fixed first argument to socket (Thanks
35521	Daniel Dehennin <nebuchadnezzar@nerim.net> for reporting)
35522	* mailbox/tcp.c: Likewise
35523	* pop3d/pop3d.c: Likewise
35524	* mailbox/mu_argp.c: Minor style fix
35525
355262003-12-28  Jeff Bailey  <jbailey@nisa.net>
35527
35528	* doc/texinfo/Makefile.am: Use ../$(srcdir) instead of .. to
35529	support srcdir != builddir invocations of make html.
35530
35531	* doc/texinfo/programs.texi: Provide sample invocation of
35532	mail.local.  Include note about virtual hosting.
35533
355342003-12-28  Sergey Poznyakoff
35535
35536	* movemail/movemail.c: Minor changes for compatibility with
35537	the Emacs implementation.
35538
355392003-12-28  Sergey Poznyakoff
35540
35541	* movemail: New directory
35542	* movemail/movemail.c: New file
35543	* movemail/Makefile.am: New file
35544	* movemail/.cvsignore: New file
35545
35546	* Makefile.am: Added movemail
35547	* configure.ac: Likewise
35548	* examples/spamd.c: Minor changes
35549	* examples/list.c: Minor changes
35550
355512003-12-26  Sergey Poznyakoff
35552
35553	* COPYING: New file
35554	* COPYING.LIB: Renamed to
35555	* COPYING.LESSER: this
35556	* Makefile.am: Updated
35557	* README: Updated
35558	* autogen.sh: Updated
35559	* configure.ac: Fixes to work with automake 1.8/autoconf 2.59
35560	* m4/db2.m4: Likewise
35561	* m4/debug.m4: Likewise
35562	* m4/getopt.m4: Likewise
35563	* m4/gsasl.m4: Likewise
35564	* m4/gssapi.m4: Likewise
35565	* m4/guile.m4: Likewise
35566	* m4/lib.m4: Likewise
35567	* m4/mu_libobj.m4: Likewise
35568	* m4/tls.m4: Likewise
35569
35570	* doc/texinfo/body.texi: Minor fixes.
35571	* doc/texinfo/libsieve.texi: Likewise
35572
355732003-12-26  Sergey Poznyakoff
35574
35575	* examples/list.c: New sieve extension test.
35576	* examples/spamd.c: Modified.
35577	* examples/Makefile.am: Added list.c
35578
35579	* dotlock/dotlock.c: Changed multiline doc string to
35580	a single-line one: gettext 0.13 is unable to handle
35581	translator comments with multiline msgids.
35582	* mail.local/main.c: Likewise
35583	* mail.remote/mail.remote.c: Likewise
35584	* mh/anno.c: Likewise
35585	* mh/fmtcheck.c: Likewise
35586	* mh/folder.c: Likewise
35587	* mh/forw.c: Likewise
35588	* mh/inc.c: Likewise
35589	* mh/install-mh.c: Likewise
35590	* mh/mark.c: Likewise
35591	* mh/mhl.c: Likewise
35592	* mh/mhn.c: Likewise
35593	* mh/mhpath.c: Likewise
35594	* mh/pick.c: Likewise
35595	* mh/refile.c: Likewise
35596	* mh/repl.c: Likewise
35597	* mh/rmf.c: Likewise
35598	* mh/rmm.c: Likewise
35599	* mh/scan.c: Likewise
35600	* mh/send.c: Likewise
35601	* mh/whom.c: Likewise
35602	* sieve/sieve.c: Likewise
35603
356042003-12-25  Sergey Poznyakoff
35605
35606	Added changes from the backup repository
35607
356082003-12-24  Sergey Poznyakoff
35609
35610	* examples/spamd.c: New file.
35611	* examples/Makefile.am: Added spamd.c
35612	* include/mailutils/libsieve.h (sieve_match_part_checker):
35613	Prototype.
35614
356152003-12-23  Sergey Poznyakoff
35616
35617	* examples/pop3client.c: Added typecasts
35618	* include/mailutils/errno.h: New error codes
35619	* mailbox/muerrno.c: Likewise
35620	* mail.remote/testsuite/Data: Updated to synchronize
35621	with the changes dated 2003-12-04
35622	* mailbox/file_stream.c: Rewritten support for program
35623	streams.
35624	(filter_prog_stream_create): New function.
35625	* include/mailutils/stream.h (filter_prog_stream_create): New
35626	function.
35627	* examples/murun.c: New file
35628	* examples/Makefile.am: Added murun.c
35629
356302003-12-17  Wojciech Polak
35631
35632	* configure.ac: Set AM_GNU_GETTEXT_VERSION(0.13).
35633	* m4/Makefile.am: Updated (gettext 0.13).
35634
356352003-12-17  Sergey Poznyakoff
35636
35637	* dotlock/dotlock.c: Added translators' comment
35638	* mail.local/main.c: Likewise
35639	* mail.remote/mail.remote.c: Likewise
35640	* mh/anno.c: Likewise
35641	* mh/fmtcheck.c: Likewise
35642	* mh/folder.c: Likewise
35643	* mh/forw.c: Likewise
35644	* mh/inc.c: Likewise
35645	* mh/install-mh.c: Likewise
35646	* mh/mark.c: Likewise
35647	* mh/mhl.c: Likewise
35648	* mh/mhn.c: Likewise
35649	* mh/mhpath.c: Likewise
35650	* mh/pick.c: Likewise
35651	* mh/refile.c: Likewise
35652	* mh/repl.c: Likewise
35653	* mh/rmf.c: Likewise
35654	* mh/rmm.c: Likewise
35655	* mh/scan.c: Likewise
35656	* mh/send.c: Likewise
35657	* mh/whom.c: Likewise
35658	* sieve/sieve.c: Likewise
35659
356602003-12-12  Sergey Poznyakoff
35661
35662        Temporarily switched to the back-up repository
35663        on mirddin. Change map:
35664
35665        Date from       Date to         Repository
35666        ========        =======         ==========
35667        1999-09-10      2003-12-01      Savannah
35668        2003-12-04      2003-12-25      Mirddin
35669
356702003-12-05  Sergey Poznyakoff
35671
35672	* mailbox/imap/mbox.c (mailbox_imap_open): Bugfix. Thanks
35673	Stephen Bylo <Stephen.Bylo@radixs.com> for reporting.
35674
356752003-12-04  Sergey Poznyakoff
35676
35677	* mh/mhn.c (stream_getline): Bugfix
35678	* mailbox/parse822.c (parse822_route_addr): Handle empty
35679	addresses. Patch provided by Rob Casey <rob.casey@bluebottle.com>
35680	* mailbox/smtp.c (smtp_send_message): Send sender and recipient
35681	addresses enclosed in angle brackets.
35682	* mailbox/testsuite/Addrs: Fixed null address test.
35683
356842003-12-01  Sergey Poznyakoff
35685
35686	* mailbox/sendmail.c (sendmail_send_message): Don't
35687	close the descriptor if it happens to make a part of tunnel
35688	pipe.
35689
356902003-11-28  Sergey Poznyakoff
35691
35692	* mailbox/argcv.c (argcv_escape_char,escape_copy): Bugfix
35693
356942003-11-04  Sergey Poznyakoff
35695
35696	* mh/anno.c (main): Remove trailing colon from the component name.
35697
356982003-11-04  Sergey Poznyakoff
35699
35700	* mailbox/rfc2047.c (rfc2047_decode): Bugfix.
35701
35702	* mh/mh_argp.c (mh_argp_parse): Changed prototype.
35703	* mh/mh_getopt.h: Likewise.
35704	* mh/ali.c: Updated calls to mh_argp_parse()
35705	* mh/anno.c: Likewise.
35706	* mh/comp.c: Likewise.
35707	* mh/fmtcheck.c: Likewise.
35708	* mh/folder.c: Likewise.
35709	* mh/forw.c: Likewise.
35710	* mh/inc.c: Likewise.
35711	* mh/install-mh.c: Likewise.
35712	* mh/mark.c: Likewise.
35713	* mh/mhl.c: Likewise.
35714	* mh/mhn.c: Likewise.
35715	* mh/mhparam.c: Likewise.
35716	* mh/mhpath.c: Likewise.
35717	* mh/pick.c: Likewise.
35718	* mh/refile.c: Likewise.
35719	* mh/repl.c: Likewise.
35720	* mh/rmf.c: Likewise.
35721	* mh/rmm.c: Likewise.
35722	* mh/scan.c: Likewise.
35723	* mh/send.c: Likewise.
35724	* mh/sortm.c: Likewise.
35725	* mh/whatnow.c: Likewise.
35726	* mh/whom.c: Likewise.
35727
357282003-11-04  Sergey Poznyakoff
35729
35730	* mailbox/parse822.c: Be more liberal in parsing
35731	local parts.
35732	* mh/ali.c (getcols): Return default of 80 columns if
35733	both ioctl() and getenv() fail.
35734	(ali_print_name_list): Bugfix.
35735	(main): In -user mode, print the argument verbatim if it
35736	is not a member of any alias.
35737	* mh/mh_alias.l (pop_source): Always free ali_filename.
35738	Grammar: Bugfixes.
35739	(mh_alias_read): Provide a debugging hook
35740	(ali_verbatim): New function.
35741	* mh/mh_alias.y: Fixed grammar.
35742	(ali_member): Compare addresses if strcmp() fails.
35743	* mh/mh.h (ali_verbatim): New function.
35744
35745	* examples/pop3client.c: Added missing includes
35746
357472003-10-28  Sergey Poznyakoff
35748
35749	* mail/mail.c: Implemented -a (--append) option.
35750	* mail/mail.h (mail_sendheader,send_append_header)
35751	(send_append_header2): New functions.
35752	* mail/send.c: Likewise.
35753	* mail/table.c: New command "sendheader"
35754
357552003-10-27  Alain Magloire
35756
35757	* mailbox/mapfile_stream.c(_mapfile_size): Only call msync() if
35758	the file was also open with PROT_WRITE.
35759	(_mapfile_flush): Ditto.
35760
357612003-10-25  Sergey Poznyakoff
35762
35763	* mailbox/list.c (list_do): Bugfix
35764
357652003-10-24  Sergey Poznyakoff
35766
35767	* mailbox/list.c (list_do): Rewritten using iterators.
35768	* mh/mh_alias.l: Resolve a conflict between the angle bracket
35769	indicating file inclusion and the one starting a valid
35770	RFC822 address.
35771	* mh/mh_alias.y: Allow for full RFC822 addresses.
35772
357732003-10-18  Sergey Poznyakoff
35774
35775	* pop3d/quit.c (pop3d_fix_mark): Use only valid C comments.
35776	Fixed erroneous format specification.
35777	Format X-Expire-Timestamp value only if necessary.
35778	* pop3d/pop3d.c (options): Minor fix in help line wording.
35779	(pop3d_parse_opt): Fixed duplicate case.
35780
35781	* pop3d/capa.c: Indicate login-delay capability.
35782	* pop3d/logindelay.c (login_delay_capa): New function.
35783	* pop3d/pop3d.h: Likewise.
35784
357852003-10-17  Alain Magloire
35786
35787	First try of implementing CAPA EXPIRE in pop3d.
35788
35789	* pop3d/expire.c: New file.
35790	* pop3d/pop3d.c: New options --expire, expire new global variable.
35791	* pop3d/quit.c (pop3d_fix_mark): Set the X-Expire-Timestamp for
35792	RETR messages.
35793	* pop3d/capa.c: Advertise EXPIRE.
35794	* pop3d/pop3d.h: Declaration of global variable expire.
35795	* pop3d/retr.c: Set a flag on downloaded messages.
35796
357972003-10-17  Sergey Poznyakoff
35798
35799	* mailbox2: It is hopelessly obsolete. Removed. We'd better modify
35800	the files "in situ".
35801
358022003-10-17  Sergey Poznyakoff
35803
35804	* doc/texinfo/programs.texi (pop3d): Documented new option.
35805	* examples/timestamp.c: New file. Implements sieve extension
35806	test "timestamp".
35807	* examples/Makefile.am: Added timestamp.c
35808
358092003-10-13  Sergey Poznyakoff
35810
35811	* NEWS: Updated
35812	* pop3d/logindelay.c: Couple of bugfixes.
35813	* pop3d/popauth.c (options): New option --permissions allows to
35814	override default permissions on the database file.
35815
358162003-10-11  Sergey Poznyakoff
35817
35818	* pop3d/logindelay.c: New file
35819	* pop3d/Makefile.am: Added logindelay.c
35820	* pop3d/pop3d.c: New options --login-delay, --stat-file
35821	* pop3d/pop3d.h (check_login_delay,update_login_delay): New
35822	functions.
35823	* pop3d/quit.c (pop3d_quit): Call update_login_delay().
35824	* pop3d/user.c (pop3d_user): Call check_login_delay().
35825
35826	* mh/mh_format.c (builtin_formataddr): Fixed checking for duplicate
35827	addresses.
35828
358292003-10-10  Alain Magloire
35830
35831	GNU Mailutils 0.4 was released.  New code added.
35832
35833	* configure.ac: Added include/mailutils/sys/Makefile.
35834	* mailbox/pop/Makefile.am (libmu_pop_la_sources): Added all the
35835	pop3_*.c code now part of libmu_pop.a
35836	* include/mailutils/Makefile.am (pkginclude_HEADERS): Added file
35837	pop3d.h
35838	(SUBDIRS): New directory sys added.
35839	* include/mailutils/sys/Makefile.am: new Makefile.am
35840	* example/Makefile.am: pop3client.c Added.
35841
35842	* doc/rfc/rfc3206.txt: New publish RFC for POP3
35843
358442003-10-10  Alain Magloire
35845
35846	* mailbox/pop/pop3_readline.c (pop3_getline): Use
35847	stream_sequential_readline() instead of stream_readline() and do
35848	not maintain any offsets.
35849	* include/mailutils/sys/pop3d.h (struct mu_pop3_work_buf): Remove
35850	of the offset field.
35851	* examples/pop3client.c: Changes to check for errors.
35852
358532003-10-10  Sergey Poznyakoff
35854
35855	* configure.ac: Raised patchlevel number
35856	* mail/print.c (mail_print): Pass MSG_SILENT flag.
35857	* pop3d/pop3d.c: New option --undelete tells pop3d to
35858	undelete all delete messages on startup.
35859	* pop3d/user.c: Handle undelete_on_startup flag.
35860	* pop3d/extra.c (pop3d_mark_deleted,pop3d_is_deleted)
35861	(pop3d_unset_deleted,pop3d_undelete_all): New functions
35862	* pop3d/pop3d.h: Likewise.
35863	* pop3d/dele.c: Use new pop3d_.*_deleted calls.
35864	* pop3d/list.c: Likewise.
35865	* pop3d/quit.c: Likewise.
35866	* pop3d/retr.c: Likewise.
35867	* pop3d/rset.c: Likewise.
35868	* pop3d/stat.c: Likewise.
35869	* pop3d/top.c: Likewise.
35870	* pop3d/uidl.c: Likewise.
35871
358722003-10-09  Alain Magloire
35873
35874	Possible use:
35875		list_count (list, &total);
35876		array = malloc (total *(sizeof *array));
35877		if (users != NULL)
35878		  list_to_array (list, users, total, &total);
35879        copy in the array the number of items.
35880
35881	* mailbox/list.c (list_to_array): New function.
35882	* include/mailutils/list.h (list_to_array): Declaration.
35883
358842003-10-09  Alain Magloire
35885
35886	Scenario: the attribute_set_delete() use the header field
35887	"Status: d" to store the information.  During a POP session,
35888	if messages had the "Status: D", the messages would be
35889	deleted during the update state(QUIT), not what is expected.
35890	Only messages mark deleted with the command DELE, should be deleted.
35891	Sergey proposed an implementation, using attribute_xxx_userflag()
35892	instead for delete markers.
35893
35894	* pop3d/dele.c: Use for attribute_is_userflag()
35895	* pop3d/list.c: Use for attribute_is_userflag()
35896	* pop3d/retr.c: Use for attribute_is_userflag()
35897	* pop3d/rset.c: Use for attribute_is_userflag()
35898	* pop3d/top.c: Use for attribute_is_userflag()
35899	* pop3d/uidl.c: Use for attribute_is_userflag()
35900	* pop3d/pop3d.h (POP3_ATTRIBUTE_DELE): New define.
35901	* pop3d/quit.c (pop3d_fix_mark): Use for attribute_is_userflag()
35902	(pop3d_quit): Call to pop3d_fix_mark.
35903
35904
359052003-10-07  Alain Magloire
35906
35907	Reuse the mailutils mu_debug_t object to do debug tracing
35908	no need to reinvent another scheme.
35909
35910	* include/mailutils/pop3.h: New declaration mu_pop3_set_debug.
35911	* include/mailutils/sys/pop3.h: new field mu_debug_t in structure.
35912	* mailbox/pop/pop3_debug.c:  Use of mu_debug_t object.
35913	* examples/pop3client.c: Fix SIGSEGV and print error messages.
35914
359152003-10-06  Alain Magloire
35916
35917	* mailbox/pop/pop3_stls.c: New file.
35918	* mailbox/pop/pop3_pass.c: Obscure the buffer with the passwd for
35919        security reasons.
35920	* mailbox/pop/pop3_apop.c: Obscure the buffer with the digest for
35921        security reasons.
35922	* include/mailutils/pop3.h: Declaration mu_pop3_stls().
35923	* include/mailutils/sys/pop3.h: New states added to accommodate STLS
35924        command.
35925	* doc/texinfo/pop3.texi: Corrected some typos.
35926
359272003-10-06  Sergey Poznyakoff
35928
35929	* configure.ac: Raised version number to 0.4
35930
35931	* lib/getopt.c: Moved to ...
35932	* mailbox/getopt.c: ... here
35933	* lib/getopt1.c: Moved to ...
35934	* mailbox/getopt1.c: ... here
35935	* lib/Makefile.am: Removed getopt.
35936	* mailbox/Makefile.am: Added getopt.
35937
35938	* m4/getopt.m4: New file
35939	* m4/mu_libobj.m4 (MU_HEADER): Prevent multiple inclusions.
35940	* m4/Makefile.am: Added getopt.m4
35941
35942	* imap4d/imap4d.h: Added missing includes
35943	* mail/mail.h: Likewise
35944	* mail/util.c: Likewise
35945	* mailbox/ticket.c: Likewise
35946	* auth/tls.c: Likewise
35947	* from/from.c: Likewise
35948	* readmsg/readmsg.c: Likewise
35949	* readmsg/readmsg.h: Likewise
35950
35951	* mail/decode.c (display_message): Bugfix
35952	* mailbox/locale.c (mu_charset_lookup): Bugfix
35953	* mailbox/mailutils-config.c: Minor fix in the help string.
35954	* mh/repl.c: Likewise.
35955	* mh/mh.h (mh_format_str): Added prototype.
35956
35957	* NEWS: Updated
35958
359592003-10-05  Alain Magloire
35960
35961	* examples/pop3client.c:  A simple example illustrating the use
35962	of the low level POP3 function calls.
35963
359642003-10-05  Alain Magloire
35965
35966	Implementation of the lower level functions for POP3 in a separate
35967	library.
35968	This the first draft, the code is not yet enabled in the Makefile.am
35969
35970	* mailbox/pop/pop3_apop.c: APOP
35971	* mailbox/pop/pop3_capa.c: CAPA
35972	* mailbox/pop/pop3_carrier.c: TCP stream.
35973	* mailbox/pop/pop3_connect.c:
35974	* mailbox/pop/pop3_create.c:
35975	* mailbox/pop/pop3_debug.c:
35976	* mailbox/pop/pop3_dele.c: DELE
35977	* mailbox/pop/pop3_destroy.c:
35978	* mailbox/pop/pop3_disconnect.c:
35979	* mailbox/pop/pop3_lista.c: LIST
35980	* mailbox/pop/pop3_list.c: LIST
35981	* mailbox/pop/pop3_noop.c: NOOP
35982	* mailbox/pop/pop3_pass.c: PASS
35983	* mailbox/pop/pop3_quit.c: QUIT
35984	* mailbox/pop/pop3_readline.c:
35985	* mailbox/pop/pop3_response.c:
35986	* mailbox/pop/pop3_retr.c: RETR
35987	* mailbox/pop/pop3_rset.c: RSET
35988	* mailbox/pop/pop3_sendline.c:
35989	* mailbox/pop/pop3_stat.c: STAT
35990	* mailbox/pop/pop3_stream.c:
35991	* mailbox/pop/pop3_timeout.c:
35992	* mailbox/pop/pop3_top.c: TOP
35993	* mailbox/pop/pop3_uidl.c: UIDL
35994	* mailbox/pop/pop3_uidla.c: UIDL
35995	* mailbox/pop/pop3_user.c: USER
35996
35997	* include/mailutils/pop3.h: Declaration of the public functions.
35998	* include/mailutils/sys/pop3.h: Declaration of the internal
35999	functions and structures.
36000
36001	* doc/texinfo/pop3.texi: updated.
36002
360032003-10-05  Alain Magloire
36004
36005	When list_destroy() is called, we need to provide also
36006	a way to free the item is necessary. To do this we added a new
36007	function:
36008
36009	extern int list_set_destroy_item __P ((list_t list,
36010	       void (*destroy_item) __P((void *))));
36011
36012	This function let us register a function to call on the item
36013	when the list is being destroy.
36014	Unresolved Problems: What about list_remove() and list_replace() ?
36015	should destroy_item() be called when the item is no longer in the
36016	list ?
36017
36018	* mailbox/list.c (list_destroy) : Call to list->destroy_item() when
36019	the data is free().
36020	(list_set_destroy_item): New function.
36021	* mailbox/include/list0.h (destroy_item): New field in the structure.
36022	* include/mailutils/list.h (list_set_destroy_item): New declaration.
36023
360242003-09-27  Wojciech Polak
36025
36026	* mailutils.spec.in: Updated and moved to ...
36027	* scripts/mailutils.spec.in: ... here.
36028	* scripts/Makefile.am: Updated.
36029	* configure.ac: Likewise.
36030	* Makefile.am: Likewise.
36031
360322003-09-27  Sergey Poznyakoff
36033
36034	* configure.ac: Moved fgetpwent from AC_CHECK_FUNCS to
36035	MU_CHECK_FUNCS.
36036
36037	* lib/Makefile.am: Removed fgetpwent.c
36038	* mailbox/Makefile.am: Added fgetpwent.c
36039	* lib/fgetpwent.c: Moved to ...
36040	* mailbox/fgetpwent.c: ... here
36041
36042	* imap4d/imap4d.h: Added missing include
36043	* imap4d/search.c (imap4d_search0): Use case-insensitive
36044	comparison
36045	* imap4d/status.c (status_get_handler): Likewise
36046	* imap4d/util.c: Fixed wording of the comment.
36047
36048	* mailbox/locker.c (_locker_destroy_private): Bugfix
36049
360502003-09-25  Sergey Poznyakoff
36051
36052	* mailbox/munre.c (munre_set_regex): Bugfix again.
36053	* mailbox/filter_trans.c (qp_decode): Bugfix. According
36054	to RFC, underscore represents space.
36055	* mailbox/rfc2047.c (rfc2047_decode): Ignore whitespace between
36056	the encoded segments.
36057	* mailbox/testsuite/RFC2047: Reflect the recent changes.
36058	* NEWS: Updated
36059
36060	* mail/mail.h (mail_nounfold,mail_unfold)
36061	(mail_header_is_unfoldable): New functions.
36062	* mail/print.c (mail_print_msg): Unfold the header value, if
36063	required.
36064	* mail/retain.c: Rewritten.
36065	(mail_nounfold,mail_unfold)
36066        (mail_header_is_unfoldable): New functions.
36067	* mail/table.c: Added new command words.
36068	* mail/mail.c: Default to "unfold subject"
36069	* mail/util.c (util_slist_remove): New function.
36070
36071	* auth/lbuf.c: Added missing includes.
36072	* auth/lbuf.h: Likewise.
36073
360742003-09-22  Sergey Poznyakoff
36075
36076	* mailbox/munre.c (munre_set_regex): Bugfix.
36077	* mh/replgroupcomps: Added trailing newline
36078
360792003-09-21  Sergey Poznyakoff
36080
36081	Added decoding of RFC 2047 headers to MUA programs (mail and mh).
36082	Fixed incorrect session termination in imap and pop clients.
36083
36084	* mailbox/locale.c: New file. Contains locale-dependent functions.
36085	* mailbox/Makefile.am: Added locale.c
36086
36087	* include/mailutils/mutil.h (mu_charset_lookup): New function.
36088	* mail/from.c (mail_from0): Use util_rfc2047_decode for
36089	"From" and "Subject" headers.
36090	* mail/mail.c (main): Set default value for the "charset" variable.
36091	* mail/mail.h (util_rfc2047_decode): New function.
36092	* mail/util.c: Likewise.
36093	* mail/print.c: Use util_rfc2047_decode for printing headers.
36094	* doc/texinfo/programs.texi: Documented "charset" mail
36095	variable
36096
36097	* mh/mh_format.c (mh_format): Use header_aget_value_unfold when
36098	retrieving the header value.
36099	(builtin_decode): New function. Implements (decode).
36100	* mh/README: Updated
36101
36102	* mailbox/imap/folder.c (authenticate_imap_sasl_anon): Fixed typo
36103	in debug output.
36104	(folder_imap_open): Issue LOGOUT if all the authentication methods
36105	have failed.
36106	* mailbox/imap/mbox.c (imap_get_fd): Removed. Use imap_get_fd2
36107	instead.
36108	* mailbox/pop/mbox.c (_pop_user): Do not close the stream on
36109	authentication failures.
36110
36111	* imap4d/login.c: Minor fix
36112
361132003-09-20  Sergey Poznyakoff
36114
36115	Install under mailutils/gnu only those headers which are
36116	missing on the system.
36117	Include regex to libmailbox if the system's libc lacks it.
36118	Add new functions for handling reply subject headers.
36119
36120	* Makefile.am: Added headers
36121	* m4/mu_libobj.m4 (MU_HEADER,MU_FINISH_LINKS): New macros
36122	* configure.ac: Use MU_HEADER and MU_FINISH_LINKS where needed
36123	* m4/regex.m4: Likewise
36124
36125	* dotlock/Makefile.am: Fixed INCLUDES
36126	* lib/Makefile.am: Updated
36127	* mailbox/Makefile.am: Likewise.
36128	* examples/Makefile.am: Likewise.
36129	* frm/Makefile.am: Likewise.
36130	* guimb/Makefile.am: Likewise.
36131	* imap4d/Makefile.am: Likewise.
36132	* include/mailutils/gnu/Makefile.am: Likewise.
36133	* libsieve/Makefile.am: Likewise.
36134	* mail/Makefile.am: Likewise.
36135	* mail.local/Makefile.am: Likewise.
36136	* mail.remote/Makefile.am: Likewise.
36137	* mailbox/imap/Makefile.am: Likewise.
36138	* mailbox/maildir/Makefile.am: Likewise.
36139	* mailbox/mbox/Makefile.am: Likewise.
36140	* mailbox/mh/Makefile.am: Likewise.
36141	* mailbox/pop/Makefile.am: Likewise.
36142	* messages/Makefile.am: Likewise.
36143	* mh/Makefile.am: Likewise.
36144	* pop3d/Makefile.am: Likewise.
36145	* readmsg/Makefile.am: Likewise.
36146	* sieve/Makefile.am: Likewise.
36147	* from/Makefile.am: Likewise.
36148	* comsat/Makefile.am: Likewise.
36149	* auth/Makefile.am: Likewise.
36150
36151        * headers: New directory
36152        * headers/Makefile.am: New file
36153        * headers/posix/Makefile.am: New file
36154
36155	* include/mailutils/gnu/argp.h: Moved to ...
36156	* headers/argp.h: ... here
36157	* include/mailutils/gnu/getopt.h: Moved to ...
36158	* headers/getopt.h: ... here
36159
36160	* lib/regex.h: Moved to ...
36161	* headers/regex.h: ... here
36162	* lib/posix/regex.h: Moved to ...
36163	* headers/posix/regex.h: ... here
36164	* lib/posix/Makefile.am: Removed
36165	* lib/posix/.cvsignore: Removed
36166	* lib/posix: Removed
36167
36168	* lib/regex.c: Moved to ...
36169	* mailbox/regex.c: ... here
36170
36171	* include/mailutils/gnu/.cvsignore: Updated
36172
36173	* mailbox/munre.c: New file
36174	* include/mailutils/mutil.h (munre_set_regex)
36175	(munre_subject): New functions.
36176
36177	* mail/followup.c: Use munre_subject() and util_reply_prefix().
36178	* mail/reply.c: Likewise
36179	* mail/mail.c (struct argp_option options): Removed irrelevant
36180	OPTION_DOC.
36181	(main): Set default replyprefix
36182	* mail/mail.h (util_reply_prefix): New function
36183	* mail/util.c: Likewise
36184	(util_setenv): A hack to properly handle "replyregex".
36185	* mail/var.c (run_editor): Fixed return type.
36186
36187	* mh/mh_format.c (builtin_unre): Use munre_subject()
36188	(builtin_isreply,builtin_reply_regex): New functions
36189	* mh/mh.h (mh_set_reply_regex): New function.
36190	* mh/mh_init.c: Likewise.
36191	* mh/mh_global.c (mh_read_profile): Read Reply-Regex
36192
36193	* mh/README: Updated
36194	* mh/replcomps: Updated
36195	* mh/replgroupcomps: Updated
36196
36197	* doc/texinfo/programs.texi: Updated
36198
361992003-09-18  Sergey Poznyakoff
36200
36201	* mailbox/mh/mbox.c (_mh_message_delete): Zero out the
36202	msg_pool slot occupied by the message being deleted.
36203	(mh_pool_lookup): On success return the address of the
36204	msg_pool slot.
36205
36206	* pop3d/pop3d.h (process_cleanup): New function
36207	* pop3d/signal.c: Likewise
36208	* pop3d/pop3d.c (pop3d_daemon): Collect finished children
36209	synchronously.
36210
362112003-09-16  Sergey Poznyakoff
36212
36213	* mh/repl.c (opt_handler): Force RCPT_ALL if --group is given.
36214
362152003-09-11  Sergey Poznyakoff
36216
36217	* mailbox/imap/folder.c (authenticate_imap_login): Do not
36218	close the stream on authentication failures.
36219	(authenticate_imap_select): Bugfix
36220	(imap_parse): Use MU_ERR_AUTH_FAILURE where appropriate.
36221
36222	* doc/texinfo/programs.texi: Updated
36223
362242003-09-10  Sergey Poznyakoff
36225
36226	* include/mailutils/errno.h (MU_ERR_BAD_AUTH_SCHEME)
36227	(MU_ERR_AUTH_FAILURE): New error codes.
36228	* mailbox/muerrno.c: Likewise.
36229
36230	* mailbox/include/auth0.h (struct _authority): Keep a list
36231	of authentication methods.
36232	* mailbox/auth.c (authority_authenticate): Authentication
36233	methods are now stored as a list.
36234	* mailbox/mailbox.c (mailbox_create): Bugfix. Return failure
36235	if the folder cannot be created.
36236
36237	* mailbox/imap/folder.c: Allow user to specify several possible
36238	authentication methods after AUTH= (an extension to RFC 2192).
36239	(folder_imap_get_authority): Select an appropriate authentication
36240	mechanism if AUTH=*, as suggested by RFC.
36241
36242	* mailbox/pop/folder.c (folder_pop_get_authority): Return
36243	an appropriate error code.
36244
36245	* mh/rmf.c (rmf): Bugfix.
36246
362472003-09-10  Sergey Poznyakoff
36248
36249	* mailbox/imap/folder.c (read_capa): New function.
36250	(check_capa): Call read_capa.
36251	(authenticate_imap_login): Check for LOGINDISABLED.
36252	(tls): Reread the capabilities after successful TLS
36253	negotiation.
36254
362552003-09-09  Sergey Poznyakoff
36256
36257	* include/mailutils/address.h (address_aget_personal): Added
36258	missing prototype.
36259
362602003-09-05  Wojciech Polak
36261
36262	* mailbox/wicket.c: Moved stat() (checking the file
36263	permissions) to wicket_create().
36264	* sieve/sieve.c (tickets_default): New variable.
36265	(main): Check the tickets_default.
36266
362672003-09-05  Sergey Poznyakoff
36268
36269	* lib/mu_dbm.c (mu_fcheck_perm, mu_check_perm): Return
36270	MU_ERR_UNSAFE_PERMS when appropriate.
36271	* mailbox/muerrno.c: Fixed indentation.
36272	* pop3d/popauth.c: Use mu_strerror.
36273
36274	* mh/ali.c (main): Bugfix. Lists were not initialized.
36275	* mh/mh_alias.l (push_source): Honor Path variable.
36276
362772003-09-04  Wojciech Polak
36278
36279	* include/mailutils/errno.h: Added MU_ERR_UNSAFE_PERMS.
36280	* mailbox/muerrno.c: Likewise.
36281	* mailbox/wicket.c (get_ticket): Check file permissions.
36282
362832003-09-02  Wojciech Polak
36284
36285	* mailbox/pop/mbox.c (pop_get_message): Check UIDL capability
36286	before using pop_uidl().
36287
362882003-09-02  Sergey Poznyakoff
36289
36290	* mail/mail.c: Fixed description of --file argument.
36291	* mailbox/filter_trans.c (qp_decode): Fixed bug that
36292	could overflow the receiving buffer.
36293
362942008-09-02  Wojciech Polak
36295
36296	* mail/next.c (mail_next): Check return code from msgset_parse
36297	to prevent segmentation fault.
36298	* mail/previous.c (mail_previous): Likewise.
36299
363002008-09-01  Wojciech Polak
36301
36302	* pop3d/pop3d.c (pop3d_daemon): Added startup notification.
36303	* imap4d/imap4d.c (imap4d_daemon): Likewise.
36304
363052003-08-30  Wojciech Polak
36306
36307	* auth/tls.c (mu_check_tls_environment): Improved diagnostics.
36308	* mailbox/pop/mbox.c (POP_AUTH_USER_ACK): Protect password
36309	in debug mode (PASS ***).
36310
363112003-08-29  Sergey Poznyakoff
36312
36313	* imap4d/bye.c: Do not attempt to write to the output
36314	stream if a signal was caught.
36315	* imap4d/signal.c (imap4d_signal): Minor fix
36316	* pop3d/extra.c (pop3d_abquit): Flush and close the mailbox
36317	only unless we're not in the AUTHORIZATION state.
36318	Do not attempt to write to the output stream if a signal was
36319	caught.
36320	* include/mailutils/errno.h (MU_ERR_NOUSERNAME)
36321	(MU_ERR_NOPASSWORD): New error codes.
36322	* mailbox/muerrno.c: Likewise.
36323	* mailbox/mailbox.c (mailbox_flush): Test the first argument.
36324	* mailbox/ticket.c (ticket_pop): Fallback to command line
36325	prompt if _pop() failed and stdin is connected to a terminal.
36326	* mailbox/imap/folder.c: Provide a better diagnostics.
36327	* mailbox/pop/mbox.c (_pop_user): Send QUIT before dropping
36328	the connection.	Provide a better diagnostics.
36329	* sieve/sieve.c: Destroy the mailbox if the attempt to open it has
36330	failed.
36331
363322003-08-29  Wojciech Polak
36333
36334	* mailbox/pop/mbox.c (pop_capa): New function.
36335	Moved CAPA support to pop_capa. Conform to RFC 2595:
36336	reissue CAPA after successful STLS negotiation.
36337	(tls): Renamed to pop_stls().
36338
363392003-08-29  Sergey Poznyakoff
36340
36341	* auth/gsasl.c: Lots of fixes.
36342	* auth/lbuf.h (_auth_lb_writelines): New function.
36343	* auth/lbuf.c: Likewise
36344	* imap4d/util.c (util_run_events): Use iterator instead of
36345	list_do. Iterators are safer.
36346
363472003-08-28  Sergey Poznyakoff
36348
36349	Implemented the TLS protocol for IMAP and POP mailboxes.
36350	Split libmailbox to the core library (libmailbox) and
36351	the protocol implementation libraries (libmu_$PROTONAME).
36352
36353	* auth/lbuf.h: New file.
36354	* auth/lbuf.c: New file.
36355	* auth/tls.c: Implemented client TLS stream.
36356	* auth/gsasl.c: Use lbuf stuff.
36357	* auth/Makefile.am: Updated.
36358
36359	* mailbox/mbx_file.c: Moved to ...
36360	* mailbox/mbox/file.c: ... here
36361	* mailbox/mbox/Makefile.am: Changed target to lib_LTLIBRARY
36362	* mailbox/mh/Makefile.am: Likewise
36363	* mailbox/imap/Makefile.am: Likewise
36364	* mailbox/pop/Makefile.am: Likewise
36365	* mailbox/maildir/Makefile.am: Likewise
36366
36367	* dotlock/Makefile.am: Adopted _LDADD for the new library layout.
36368	* examples/Makefile.am: Likewise
36369	* from/Makefile.am: Likewise
36370	* guimb/Makefile.am: Likewise
36371	* imap4d/Makefile.am: Likewise
36372	* mail/Makefile.am: Likewise
36373	* mailbox/Makefile.am: Likewise
36374	* messages/Makefile.am: Likewise
36375	* mh/Makefile.am: Likewise
36376	* pop3d/Makefile.am: Likewise
36377	* readmsg/Makefile.am: Likewise
36378	* sieve/Makefile.am: Likewise
36379	* comsat/Makefile.am: Likewise
36380	* frm/Makefile.am: Likewise
36381	* mail.local/Makefile.am: Likewise
36382
36383	* configure.ac: Moved Kerberos libs to SERV_AUTHLIBS.
36384	* Makefile.am: Changed the order of SUBDIRS
36385
36386	* mailbox/mailutils-config.c: --link part rewritten to reflect
36387	the new library layout.
36388
36389	* mailbox/imap/folder.c: Implemented client side TLS
36390	* mailbox/imap/mbox.c (imap_expunge): Use EXPUNGE instead
36391	of closing and reopening the mailbox. This way the user
36392	is not prompted twice for his credentials. Besides, it
36393	appears to be faster, in spite of what the comment before
36394	the function said.
36395	* mailbox/pop/mbox.c: Implemented client side TLS.
36396	* mailbox/include/imap0.h (struct _f_imap): New members
36397	capav and capac to hold the array of capabilities.
36398
36399	* examples/decode2047.c (ISPRINT): Fixed.
36400	* from/from.c: Use "tls" command line capability.
36401	* frm/frm.c: Likewise
36402	* messages/messages.c: Likewise.
36403	* mail/mail.c: Likewise.
36404	* readmsg/readmsg.c: Likewise.
36405	* sieve/sieve.c: Likewise.
36406
36407	* mail/mail.h: Include tls.h
36408	* readmsg/readmsg.h: Likewise.
36409
36410	* include/mailutils/stream.h (stream_get_fd2): New function.
36411	(stream_set_fd): Changed type of the second arg.
36412	* mailbox/stream.c: Likewise.
36413	* mailbox/include/stream0.h (struct _stream): Changed
36414	_get_fd member.
36415
36416	* mailbox/body.c: Fixed _get_fd methods.
36417	* mailbox/file_stream.c: Likewise.
36418	* mailbox/filter.c: Likewise.
36419	* mailbox/message.c: Likewise.
36420	* mailbox/mime.c: Likewise.
36421	* mailbox/mbox/mbox.c: Likewise.
36422	* mailbox/mapfile_stream.c: Likewise.
36423	* mailbox/tcp.c: Likewise.
36424
36425	* include/mailutils/tls.h (tls_stream_create_client)
36426	(tls_stream_create_client_from_tcp): New functions.
36427	(mu_tls_enable): New variable
36428
36429	* libmu_scm/mailutils.scm.in: Modified for the new
36430	library layout.
36431
36432	* mailbox/sendmail.c: Added missing includes
36433	* mailbox/smtp.c: Likewise.
36434	* mailbox/pop/folder.c: Minor wording change.
36435
36436	* NEWS: Updated
36437	* TODO: Updated
36438
364392003-08-27  Sergey Poznyakoff
36440
36441	* NEWS: Updated
36442	* mailbox/mime.c (_mime_parse_mpart_message): Allow for
36443	empty part body.
36444	* examples/mimetest.c: Print the number of lines along with the
36445	message sizes.
36446
36447	* testsuite/spool/mbox1: Added fifth message for testing
36448	empty MIME parts.
36449	* mailbox/testsuite/Mime: Updated for the new contents of
36450	mbox1
36451	* frm/testsuite/frm/test.exp: Likewise.
36452	* from/testsuite/from/test.exp: Likewise.
36453	* imap4d/testsuite/imap4d/examine.exp: Likewise.
36454	* imap4d/testsuite/imap4d/expunge.exp: Likewise.
36455	* imap4d/testsuite/imap4d/fetch.exp: Likewise.
36456	* mail/testsuite/mail/folder.exp: Likewise.
36457	* mail/testsuite/mail/write.exp: Likewise.
36458	* messages/testsuite/messages/test.exp: Likewise.
36459	* readmsg/testsuite/readmsg/test.exp: Likewise.
36460	* sieve/testsuite/sieve/header.exp: Likewise.
36461
364622003-08-22  Sergey Poznyakoff
36463
36464	* examples/mta.c (mta_send): Fixed printing of envelope
36465	to addresses.
36466	* include/mailutils/address.h (address_format_string): Missed
36467	prototype.
36468	* mailbox/header.c: Added missing include
36469	* mailbox/sendmail.c (sendmail_send_message): Use header
36470	and body streams sequentially instead of using message
36471	stream. This allows to catch the modified/added headers.
36472	* mailbox/smtp.c (smtp_send_message): Likewise.
36473	* mh/TODO: Updated
36474	* mh/ali.c (main): Minor change.
36475	* mh/comp.c (query_mode): Unused variable
36476	* mh/folder.c (create_flag): A three-state flag.
36477	(_scan): Fixed behavior on non-existing folders.
36478	* mh/mh.h: Added new protos
36479	* mh/mh_alias.l (yyparse): Forward declaration.
36480	* mh/mh_alias.y (yyerror,yylex): Forward declarations.
36481	(alias_expand_list,mh_alias_get_internal)
36482	(mh_alias_get_address): Get an extra argument (for handling
36483	';' aliases).
36484	* mh/mh_global.c (mh_global_sequences_drop): New function
36485	* mh/mh_init.c (mh_getyn): Bugfix
36486	* mh/mh_stream.c (struct _mhdraft_message.body_start,body_end):
36487	Changed type to off_t.
36488	* mh/mh_whom.c (mh_alias_expand): New function
36489	(scan_addrs): Expand aliases
36490	* mh/rmf.c: Switch to +inbox after deleting the current folder.
36491	Improved diagnostics.
36492	* mh/send.c: Handle aliases.
36493	* mh/whom.c (main): Bugfix.
36494
364952003-08-21  Sergey Poznyakoff
36496
36497	* include/mailutils/iterator.h (iterator_dup): New function
36498	* mailbox/iterator.c: Likewise.
36499	* include/mailutils/list.h (list_insert): New function.
36500	* mailbox/list.c: Likewise.
36501	* mh/ali.c: New file
36502	* mh/mh_alias.y: New file
36503	* mh/mh_alias.l: New file
36504	* mh/Makefile.am: Added new files
36505	* mh/.cvsignore: Likewise.
36506	* mh/mh.h (mh_alias_read,mh_alias_get)
36507	(mh_alias_get_address,mh_alias_get_alias)
36508	(mh_read_aliase,smh_alias_enumerate): New functions.
36509	* mh/mh_getopt.h: Updated
36510	* mh/mh_whom.c (scan_addrs): Added support for aliases
36511	* mh/mhparam.c: Fixed year in the copyleft header.
36512	* mh/whom.c: Added support for aliases.
36513	* mh/mh_init.c: Minor cleanup
36514
365152003-08-20  Sergey Poznyakoff
36516
36517	* comsat/action.c (expand_escape): Use argcv_unescape_char()
36518	instead of backslash().
36519	* libsieve/sieve.l: Fixed handling of escape sequences in
36520	strings. Thanks Fabrice Bauzac <fabrice.bauzac@wanadoo.fr>
36521	for reporting.
36522	* mailbox/argcv.c (argcv_unescape_char,argcv_escape_char):
36523	New functions.
36524	* include/mailutils/argcv.h: Likewise.
36525
365262003-08-19  Sergey Poznyakoff
36527
36528	* mh/replgroupcomps: New file.
36529	* mh/Makefile.am (mhlib_DATA): Added components and
36530	replgroupcomps.
36531	* mh/repl.c: Implemented -group.
36532	* mh/mh_format.c (builtin_in_reply_to): Bugfix.
36533	* mh/mh_msgset.c (_mh_msgset_parse): Fixed the semantics
36534	of last:N and prev:N.
36535	* mh/mh.h: Updated
36536
365372003-08-18  Sergey Poznyakoff
36538
36539	* mail/mail.h (ml_readline_with_intr): New function.
36540	* mail/mailline.c: Likewise.
36541	* mail/send.c: Use ml_readline_with_intr() when prompting
36542	for header fields.
36543
365442003-08-18  Sergey Poznyakoff
36545
36546	* pop3d/extra.c (pop3d_abquit): Flush message headers.
36547	* NEWS: Updated.
36548	* mail/mail.c (main): If the send mode was interrupted by
36549	the user, exit with zero status if mailx is set.
36550	* doc/texinfo/programs.texi: Updated.
36551
365522003-08-18  Sergey Poznyakoff
36553
36554	* mail/send.c (mail_send, mail_send0): Use `mailx'
36555	to control mailx compatibility mode. Thanks Peter S Galbraith
36556	<p.galbraith@globetrotter.net> for the idea.
36557	* doc/texinfo/programs.texi: Document  `mailx' variable
36558	* NEWS: Added entry about `mailx' variable
36559
365602003-08-17  Sergey Poznyakoff
36561
36562	* mail/send.c (mail_send0): Fixed typo in variable name.
36563	* mh/mhparam.c: New file
36564	* mh/Makefile.am: Added mhparam
36565	* mh/.cvsignore: Likewise.
36566	* mh/mh.h (mh_global_profile_iterate): New function
36567	* mh/mh_global.c: Likewise.
36568	* mh/mh_getopt.c (mh_getopt): Implemented -version option.
36569	* mh/README: Updated
36570
365712003-08-13  Sergey Poznyakoff
36572
36573	* mh/mh_sequence.c (mh_seq_add): Update current_message
36574	if the sequence being set is "cur". Free temporary storage.
36575	* mh/components: New file
36576	* mh/Makefile.am: Added components
36577	* mh/mh.h (mh_interactive_mode_p, mh_getyn_interactive): New
36578	functions.
36579	* mh/mh_init.c (mh_interactive_mode_p, mh_getyn_interactive)
36580	(mh_vgetyn): New functions.
36581	(mh_real_install): Use mh_getyn_interactive().
36582	* mh/pick.c (main): Use mh_interactive_mode_p().
36583
365842003-08-12  Sergey Poznyakoff
36585
36586	* mh/folder.c (_scan): Prompt for creating the folder
36587	unless --create was given.
36588	* mh/scan.c (main): Display "no messages in ..." warning
36589	for empty folders.
36590
365912003-08-12  Sergey Poznyakoff
36592
36593	* mh/mh_msgset.c (mh_msgset_uids): New function.
36594	* mh/mh.h: Likewise.
36595	* mh/mark.c (main): Convert msgset to uids.
36596	* mh/scan.c (list_message): Output an extra newline only
36597	if the formatted buffer does not end with one.
36598
365992003-08-12  Sergey Poznyakoff
36600
36601	* mail/mail.h (mail_execute): New function.
36602	* mail/shell.c (mail_execute): New function.
36603	* mail/var.c (run_editor): A wrapper around mail_execute().
36604	(var_shell): Use run_editor.
36605	* mh/mh_format.c (print_simple_segment): Bugfix.
36606	* mh/replcomps: Improved.
36607
366082003-08-11  Sergey Poznyakoff
36609
36610	* mh/mh.h (enum mh_opcode): New opcode mhop_nop.
36611	* mh/mh_fmtgram.y (fi production): Preserve the
36612	result of the last comparison.
36613	* mh/mh_format.c (mh_format): Count the newline as output
36614	character (for compatibility with other implementations).
36615	Set arg_num when evaluating headers.
36616	(mh_format,mh_format_dump): Handle mhop_nop.
36617	* mh/repl.c: New option --format.
36618
36619	* mail/mail.c (main): set rc by default
36620
366212003-08-10  Sergey Poznyakoff
36622
36623	* mh/inc.c (opt_handler): Added missing support for
36624	-format option. Thanks Peter S Galbraith
36625	<p.galbraith@globetrotter.net> for reporting.
36626
366272003-08-07  Sergey Poznyakoff
36628
36629	* NEWS: Updated
36630	* TODO: Updated
36631	* include/mailutils/header.h (header_get_value_unfold)
36632	(header_aget_value_unfold,header_get_field_value_unfold)
36633	(header_aget_field_value_unfold): New functions.
36634	* mailbox/header.c: Likewise.
36635	* include/mailutils/mutil.h (mu_string_unfold): New function.
36636	* mailbox/mutil.c: Likewise.
36637	* mailbox/mbox/mboxscan.c (FAST_HEADER): Do not remove
36638	intermediate newlines from the folded headers.
36639	* frm/frm.c: use header_get_value_unfold
36640	* mail/from.c: Likewise.
36641
366422003-07-26  Sergey Poznyakoff
36643
36644	Done the following from the TODO:
36645
36646	-** First argument to mu_auth_fp (and second one to
36647	mu_auth_runlist) should be struct mu_auth_data ** instead
36648	of void	*.
36649	-** (sieve) Implement boolean shortcut evaluation for
36650	`allof' and `anyof'
36651	-* util_strcasestr() from mail/util.c provides the same
36652	functionality as i_ascii_casemap_contains() from
36653	libsieve/comparator. Merge both versions.
36654
36655	Detailed list of changes:
36656
36657	* TODO: Updated
36658	* configure.ac: Fixed --with-mysql, --with-postgres
36659
36660	* include/mailutils/mu_auth.h (mu_auth_fp, mu_auth_runlist):
36661	Changed prototypes.
36662	* include/mailutils/libsieve.h (struct sieve_runtime_tag): Minor
36663	change.
36664	* include/mailutils/mutil.h (mu_strcasestr): New function.
36665
36666	* auth/mysql.c: Reflect changes to mu_auth_fp
36667	* auth/pam.c: Likewise.
36668	* auth/pgsql.c: Likewise.
36669	* auth/sql.c: Likewise.
36670	* auth/tls.c: Likewise.
36671	* auth/virtual.c: Likewise.
36672	* mailbox/system.c: Likewise.
36673
36674	* examples/Makefile.am (INCLUDES): Add mailbox (for getline.h)
36675	* examples/mta.c: include getline.h
36676
36677	* imap4d/authenticate.c (comp): Minor change
36678	* imap4d/fetch.c (send_parameter_list): Minor change
36679	* imap4d/util.c (util_strcasestr): Reimplemented via
36680	mu_strcasestr()
36681
36682	* libsieve/README: Documented boolean shortcuts
36683	* libsieve/comparator.c (i_ascii_casemap_contains): Reimplemented
36684	via mu_strcasestr()
36685	* libsieve/prog.c (sieve_code_anyof, sieve_code_allof): New
36686        functions.
36687	(struct check_arg): Minor change
36688	* libsieve/runtime.c (instr_nop): New function
36689	(instr_allof, instr_anyof): Removed
36690	* libsieve/sieve.h (sieve_code_anyof,sieve_code_allof): New
36691        functions.
36692	(instr_allof, instr_anyof): Removed
36693	* libsieve/sieve.y: Implemented boolean shortcuts for ALLOF and
36694	ANYOF
36695
36696	* mail/mail.h (ml_readline, readline): Removed const from
36697	the declaration.
36698	* mail/mailline.c: Likewise.
36699
36700	* mailbox/body.c (lazy_create): Removed unused function.
36701	* mailbox/iterator.c (iterator_get_list): Minor change
36702	* mailbox/mailcap.c: include <mailutils/stream.h>
36703	* mailbox/mbx_default.c (is_proto): Minor change
36704	* mailbox/rfc2047.c (insert_quoted): Minor change
36705
36706	* mailbox/mu_auth.c (mu_auth_runlist,mu_auth_nosupport): Changed
36707	type of the first argument.
36708
36709	* mailbox/mutil.c (mu_strcasestr): New function.
36710
36711	* pop3d/pop3d.h (pop3d_bye): Added missing prototype
36712
367132003-07-22  Sergey Poznyakoff
36714
36715	* mailbox/argcv.c: Implemented escaping/unescaping
36716	of non-printable characters
36717	* TODO: Updated.
36718	* NEWS: Updated
36719	* mh/Makefile.am (mh_finish_install): Fixed. Thanks
36720	Andreas Voegele <voegelas@gmx.net> for the patch.
36721
367222003-07-16  Sergey Poznyakoff
36723
36724	* NEWS: Updated
36725	* TODO: Updated
36726	* examples/listop.c: New file. A test shell for list operations.
36727	* examples/Makefile.am: Added listop.c
36728	* include/mailutils/iterator.h (iterator_get_list): New function.
36729	* mailbox/iterator.c: Rewritten to reduce the time of list
36730	traversal.
36731	* mailbox/list.c (list_remove): Call iterator_advance.
36732	* mailbox/include/iterator0.h (struct _iterator): Rewritten
36733	(iterator_advance): New function.
36734	* mailbox/include/list0.h (struct _list): Keep the linked list
36735	of associated iterators.
36736	* mailbox/testsuite/lib/mailbox.exp (mailbox_prog_start)
36737	(mailbox_prog_command,mailbox_prog_stop,mailbox_prog_test): New
36738	functions.
36739	* mailbox/testsuite/mailbox/list.exp: New file. Tests generic list
36740	operations.
36741	* mailbox/testsuite/mailbox/DISTFILES: Added list.exp
36742
367432003-07-08  Sergey Poznyakoff
36744
36745	* configure.ac: Raised version number
36746	* NEWS: Started entry for 0.3.2
36747	* comsat/comsat.c: Bugfix.
36748	* pop3d/apop.c: Provide more extensive diagnostics.
36749
367502003-07-01  Sergey Poznyakoff
36751
36752	* auth/pam.c: Minor indentation fix.
36753	* comsat/comsat.c (notify_user): Bugfix: do not pass
36754	size_t instead of off_t.
36755	* mail.local/main.c (deliver): Likewise.
36756
367572003-06-26  Sergey Poznyakoff
36758
36759	* mailbox/mu_auth.c (mu_auth_register_module): Fixed memory
36760	overrun.
36761	* pop3d/popauth.c: New option --create
36762
367632003-06-23  Sergey Poznyakoff
36764
36765	* doc/Readme.mysql: Removed. File not relevant anymore.
36766	* include/mailutils/nls.h: Minor change.
36767	* mail/mail.c (parse_opt): Use util_cache_command, except
36768	for -n, which should be executed immediately.
36769	(main): Run cached commands after sourcing the startup files.
36770	* mail/mail.h (util_cache_command,util_run_cached_commands):
36771	New functions.
36772	* mail/util.c: Likewise.
36773
367742003-06-22  Alain Magloire
36775
36776	* doc/texinfo/pop3.texi: First draft documenting the new low level
36777	API for POP3.
36778
367792003-06-21  Wojciech Polak
36780
36781	* mailutils.spec.in: Major changes. Added new packages,
36782	changed package names. Thanks Bennett Todd <bet@rahul.net>
36783	for testing.
36784
367852003-06-11  Sergey Poznyakoff
36786
36787	* autogen.sh: A hack to force automake to install COPYING file.
36788	* Makefile.am: Changed AUTOMAKE_OPTIONS, added COPYING.LIB
36789	to EXTRA_DIST.
36790	* README: Minor change.
36791	* COPYING.FDL: Moved to ...
36792	* doc/texinfo/COPYING.DOC: ... here
36793	* doc/texinfo/Makefile.am: Added COPYING.DOC.
36794	* mh/mhn.c (store_handler): Fixed indentation.
36795
367962003-06-07  Wojciech Polak
36797
36798	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
36799	  (INTLINCS): Added `-I../intl'.
36800	* m4/Makefile.am: Added nls.m4 and po.m4.
36801	* po/Makevars: Added MSGID_BUGS_ADDRESS.
36802
368032003-06-07  Sergey Poznyakoff
36804
36805	* NEWS: Updated
36806
368072003-06-02  Sergey Poznyakoff
36808
36809	* imap4d/fetch.c (fetch_internaldate): Bugfix. Coredumped
36810	on invalid dates.
36811
368122003-05-28  Sergey Poznyakoff
36813
36814	* mh/mhn.c (store_handler): Honor the `name' attribute of
36815	the Content-Type header.
36816
368172003-05-26  Sergey Poznyakoff
36818
36819	* imap4d/auth_gss.c (auth_gssapi): Check return codes
36820	from gss_wrap, gss_unwrap.
36821	* NEWS: Added entry for 0.3.1
36822	* mh/mhn.c (_message_is_external_body): Check subtype before
36823	dereferencing it.
36824
368252003-05-24  Alain Magloire
36826
36827	* configure.ac: Check for "long long" and "long double".
36828	* lib/snprintf.c: Change to be under LGPL not GPL.
36829	(vsnprintf): implement "%lld", "%qd", "%Lg"
36830	* lib/snprintf.h: New macro LONG_LONG, LONG_DOUBLE
36831	default to long long, long double.
36832
368332003-05-20  Sergey Poznyakoff
36834
36835	* imap4d/auth_gss.c (auth_gssapi): Do not output surplus text
36836	after the '+'.
36837	Don't use strdup as the username is not zero terminated.
36838
368392003-05-19  Wojciech Polak
36840
36841	* mailbox/pop/mbox.c: Moved variable `capa' to struct _pop_data.
36842
368432003-05-14  Wojciech Polak
36844
36845	* mailbox/pop/mbox.c: Added the CAPA support (to determine
36846	  any protocol extension).
36847	* TODO: Updated.
36848
368492003-04-30  Wojciech Polak
36850
36851	* doc/texinfo/mailutils.texi: Changed @dircategory according
36852	  to the GNU Directory.
36853	* po/POTFILES.in: Added auth/mysql.c and auth/pgsql.c.
36854
368552003-04-23  Sergey Poznyakoff
36856
36857	* configure.ac: Renamed --enable-mysql to --with-mysql. Added
36858	  --with-postgres option.
36859	  Use AC_FUNC_MALLOC and AC_FUNC_REALLOC instead of old jm_*
36860	  versions.
36861	* README: Documented --with-mysql and --with-postgres
36862
36863	* auth/pgsql.c: New file.
36864	* auth/mysql.c: New file.
36865	* auth/sql.h: New file.
36866	* auth/Makefile.am: Added new files.
36867	* auth/sql.c: Moved mysql-specific code to mysql.c
36868
36869	* m4/lib.m4: New file.
36870	* m4/malloc.m4: Removed.
36871	* m4/realloc.m4: Removed.
36872	* m4/Makefile.am: Added lib.m4, removed malloc.m4 and realloc.m4
36873
36874	* lib/xmalloc.c: Adjusted for use with new AC_CHECK_ macros.
36875
36876	* include/mailutils/mu_auth.h: Include <mailutils/types.h>,
36877	  protect the file contents by #ifndef .. #endif
36878	* mailbox/mu_argp.c (mu_conf_option): Reflect HAVE_PGSQL
36879
368802003-04-22  Sergey Poznyakoff
36881
36882	* mailbox/imap/folder.c (imap_literal_string): Bugfix. Literal
36883	  length may be {0}.
36884
368852003-04-18  Sergey Poznyakoff
36886
36887	* mailbox/imap/folder.c (imap_string): Bugfix. Handle numbers.
36888	* mh/mhn.c (mhn_store_command): Bugfix. Properly use message
36889	  part numbers.
36890
368912003-04-11  Sergey Poznyakoff
36892
36893	* mailbox/filter_trans.c (qp_decode): Bugfix.
36894
368952003-04-03  Sergey Poznyakoff
36896
36897	* examples/base64.c (main): Use custom ISPRINT macro
36898	  so we don't depend on the current locale settings.
36899	* examples/decode2047.c (print): Likewise.
36900	* testsuite/lib/mailutils.exp: Set LC_ALL to C before proceeding.
36901
369022003-04-02  Sergey Poznyakoff
36903
36904	* mh/mhn.c (normalize_path): Bugfix.
36905
369062003-03-29  Sergey Poznyakoff
36907
36908	Minor changes to avoid duplicating some symbols (namely
36909	argp_program_version and argp_program_bug_address). This
36910	allows the package to build on MacOS.
36911
36912	* include/mailutils/argp.h (mu_argp_init): New function.
36913	* mailbox/mu_argp.c: Likewise.
36914
36915	* comsat/comsat.c (main): Use mu_argp_init.
36916	* frm/frm.c: Likewise.
36917	* from/from.c: Likewise.
36918	* guimb/main.c: Likewise.
36919	* imap4d/imap4d.c: Likewise.
36920	* mail/mail.c: Likewise.
36921	* mail.local/main.c: Likewise.
36922	* mail.remote/mail.remote.c: Likewise.
36923	* mailbox/mailutils-config.c: Likewise.
36924	* messages/messages.c: Likewise.
36925	* mh/anno.c: Likewise.
36926	* mh/comp.c: Likewise.
36927	* mh/fmtcheck.c: Likewise.
36928	* mh/folder.c: Likewise.
36929	* mh/forw.c: Likewise.
36930	* mh/inc.c: Likewise.
36931	* mh/install-mh.c: Likewise.
36932	* mh/mark.c: Likewise.
36933	* mh/mhl.c: Likewise.
36934	* mh/mhn.c: Likewise.
36935	* mh/mhpath.c: Likewise.
36936	* mh/pick.c: Likewise.
36937	* mh/refile.c: Likewise.
36938	* mh/repl.c: Likewise.
36939	* mh/rmf.c: Likewise.
36940	* mh/rmm.c: Likewise.
36941	* mh/scan.c: Likewise.
36942	* mh/send.c: Likewise.
36943	* mh/sortm.c: Likewise.
36944	* mh/whatnow.c: Likewise.
36945	* mh/whom.c: Likewise.
36946	* pop3d/pop3d.c: Likewise.
36947	* pop3d/popauth.c: Likewise.
36948	* readmsg/readmsg.c: Likewise.
36949	* sieve/sieve.c: Likewise.
36950	* dotlock/dotlock.c: Likewise.
36951
36952	* mail.local/mail.local.h: include <sys/types.h> (necessary for
36953	  Darwin).
36954	* mail/mail.h (struct message_set): Changed type of msg_part to
36955	  size_t.
36956	* libsieve/comparator.c (i_ascii_casemap_contains): Fixed
36957	  obsolete label usage.
36958
36959	* THANKS: Added Timothy Carpenter
36960
369612003-03-27  Sergey Poznyakoff
36962
36963	* mailbox/filter_trans.c (_hexdigits): Must be zero-terminated,
36964	  otherwise the native Darwin loader refuses to load it.
36965	  (qp_decode): Bugfix: in accordance with rfc1892 a sequence
36966	  of whitespace is allowed in an encoded string provided that
36967	  it is followed by a printable character.
36968	  (qp_encode): Preserve trailing whitespace.
36969	* include/mailutils/nls.h [!ENABLE_NLS]: Provide defines for
36970	  dgettext and ngettext.
36971	* mailbox/argp-parse.c: Include <mailutils/nls.h>
36972	* mh/mhn.c (mhn_store_command): If no message part is available
36973	  ignore %p and %P metacharacters.
36974	  (store_handler): Unlink the file if it exists.
36975
369762003-03-26  Sergey Poznyakoff
36977
36978        * mailbox/mu_auth.c (mu_auth_data_alloc): Fixed COPY macro.
36979	* mh/mhn.c (main): Ignore sighups.
36980	* mh/mh_format.c (builtin_formataddr): Bugfix.
36981
369822003-03-26  Sergey Poznyakoff
36983
36984	* include/mailutils/errno.h (MU_ERR_FAILURE): New macro
36985	* mailbox/muerrno.c: Likewise
36986	* mailbox/mutil.c (mu_rfc2822_references,mu_rfc2822_in_reply_to):
36987	  Return MU_ERR_FAILURE on error.
36988	* mh/mh_format.c (builtin_concat): Extra safety check
36989	  (builtin_in_reply_to,builtin_references): Check return value
36990	  from the underlying library calls.
36991	* mh/mh_msgset.c (_mh_msgset_parse): Accept "all" message spec
36992	  on folders with only one message.
36993	* mh/mhn.c: Print information about the external body parts.
36994	* mh/whom.c (mh_option): Bugfix
36995
369962003-03-24  Sergey Poznyakoff
36997
36998	* mh/mhn.c (stream_getline,parse_content_type): A couple of
36999	  bugfixes.
37000
370012003-03-24  Sergey Poznyakoff
37002
37003	* mh/mhn.c: Implemented external-body.
37004	* mh/TODO: Updated
37005
37006	* configure.ac (ATTRIBUTE_UNUSED): Renamed to ARG_UNUSED
37007	  to avoid confusion.
37008	* auth/pam.c: Use ARG_UNUSED where necessary
37009	* lib/daemon.c: Likewise.
37010	* mail/decode.c: Likewise.
37011	* mail/exit.c: Likewise.
37012	* mail/folders.c: Likewise.
37013	* mail/if.c: Likewise.
37014	* mail/inc.c: Likewise.
37015	* mail/list.c: Likewise.
37016	* mail/mail.c: Likewise.
37017	* mail/tag.c: Likewise.
37018	* mail/var.c: Likewise.
37019	* mail/version.c: Likewise.
37020 	* mail/mailline.c: Likewise.
37021	* mail/msgset.y: Likewise.
37022	* mail/quit.c: Likewise.
37023	* mail/source.c: Likewise.
37024	* mail/summary.c: Likewise.
37025	* mailbox/auth.c: Likewise.
37026	* mailbox/body.c: Likewise.
37027	* mailbox/filter_trans.c: Likewise.
37028	* mailbox/monitor.c: Likewise.
37029	* mailbox/parsedate.y: Likewise.
37030	* mailbox/stream.c: Likewise.
37031	* mailbox/url_file.c: Likewise.
37032	* mailbox/url_path.c: Likewise.
37033	* mailbox/url_sendmail.c: Likewise.
37034	* mailbox/mh/folder.c: Likewise.
37035	* mailbox/mh/mbox.c: Likewise.
37036	* mailbox/mh/url.c: Likewise.
37037	* mailbox/pop/mbox.c: Likewise.
37038	* mailbox/pop/url.c: Likewise.
37039	* mailbox/imap/folder.c: Likewise.
37040	* mailbox/imap/url.c: Likewise.
37041	* mailbox/mbox/folder.c: Likewise.
37042	* mailbox/mbox/url.c: Likewise.
37043	* imap4d/capability.c: Likewise.
37044	* imap4d/check.c: Likewise.
37045	* imap4d/close.c: Likewise.
37046	* imap4d/fetch.c: Likewise.
37047	* pop3d/auth.c: Likewise.
37048	* pop3d/signal.c: Likewise.
37049
370502003-03-22  Jordi Mallach
37051
37052	* mailbox/Makefile.am (EXTRA_DIST): Added parsedate.y.
37053
370542003-03-22  Sergey Poznyakoff
37055
37056	* configure.ac: Raised version number to 0.3.1
37057	  Define macro ATTRIBUTE_UNUSED.
37058	* mailbox/parsedate.y: New file
37059	* mailbox/.cvsignore: Updated
37060	* mailbox/Makefile.am: Updated
37061	* mh/Makefile.am: Minor formatting change.
37062	* mh/README: Updated.
37063	* mh/TODO: Updated.
37064	* mh/pick.c: Implemented --after and --before.
37065	* mh/pick.h: Likewise.
37066	* mh/pick.y: Likewise.
37067	* mail/from.c (mail_from0): Bugfix.
37068	* include/mailutils/mutil.h (mu_parse_date): New function.
37069
370702003-03-20  Sergey Poznyakoff
37071
37072	* mh/README: Updated.
37073	* mh/mhn.c: Recognize mhn-compose-* profile components.
37074
370752003-03-20  Sergey Poznyakoff
37076
37077	* mh/mhn.c: Implemented #forw directive.
37078	* mh/forw.c: Fixed --mime mode.
37079	* mh/TODO: Updated
37080
370812003-03-19  Sergey Poznyakoff
37082
37083	* mh/anno.c: Minor changes for consistency with the overall
37084	  GNU mh options layout.
37085	* mh/comp.c: Likewise.
37086	* mh/fmtcheck.c: Likewise.
37087	* mh/folder.c: Likewise.
37088	* mh/forw.c: Likewise.
37089	* mh/inc.c: Likewise.
37090	* mh/install-mh.c: Likewise.
37091	* mh/mark.c: Likewise.
37092	* mh/mh_getopt.h: Likewise.
37093	* mh/mhl.c: Likewise.
37094	* mh/mhn.c: Likewise.
37095	* mh/mhpath.c: Likewise.
37096	* mh/pick.c: Likewise.
37097	* mh/refile.c: Likewise.
37098	* mh/repl.c: Likewise.
37099	* mh/rmf.c: Likewise.
37100	* mh/rmm.c: Likewise.
37101	* mh/scan.c: Likewise.
37102	* mh/send.c: Likewise.
37103	* mh/sortm.c: Likewise.
37104	* mh/whatnow.c: Likewise.
37105	* mh/whom.c: Likewise.
37106
371072003-03-19  Sergey Poznyakoff
37108
37109	* doc/rfc/Makefile.am: Added rfc1521.txt
37110	* doc/rfc/rfc1521.txt: Added to the repository.
37111	* mailbox/filter_trans.c (base64_encode): Bugfix.
37112	* mh/mhn.c: Implemented basic editing functionality.
37113	* mh/mh_init.c (mh_create_message_id): Minor change.
37114	* mh/README: Updated
37115	* mh/TODO: Updated
37116
371172003-03-19  Sergey Poznyakoff
37118
37119	* mh/mhn.c: Added framework for compose mode.
37120	* mh/mh.h (mh_create_message_id): New function.
37121	* mh/mh_init.c: Likewise.
37122	* mh/send.c: Use mh_create_message_id().
37123
371242003-03-17  Sergey Poznyakoff
37125
37126	* mh/mh.h (MHL_DISABLE_BODY): New flag.
37127	* mh/mh_list.c (eval_body,mhl_format_run): MHL_DISABLE_BODY
37128	  bit inhibits the 'body:' keyword.
37129	* mh/mhn.c: Implemented store mode.
37130	* mh/README: Updated
37131	* mh/TODO: Updated
37132
371332003-03-16  Wojciech Polak
37134
37135	* mh/mh_init.c (mh_getyn, mh_real_install): Added an extra
37136	  space after the question marks.
37137	* configure.ac: Minor, changed GDBM to GNU DBM.
37138	* mailbox/mailcap.c: Updated copyright.
37139	* include/mailutils/mailcap.h: Likewise.
37140
371412003-03-15  Sergey Poznyakoff
37142
37143	* mh/mhn.c: New file. Implementation of mhn utility (partial).
37144	* mh/.cvsignore: Added mhn
37145	* mh/Makefile.am: Likewise.
37146	* mh/forw.c: Implemented --mime.
37147	* mh/TODO: Updated.
37148	* mh/mh.h (mhl_format_run): Changed prototype
37149	  (MHL_DECODE,MHL_CLEARSCREEN,MHL_BELL): New defines.
37150	* mh/mh_getopt.h: Updated.
37151	* mh/mh_list.c (mhl_format_run): Changed declaration.
37152	  (eval_body): Decode message body on request.
37153	* mh/mh_ctx.c: Bugfix. Thanks Wojciech for noticing!
37154	* mh/mhl.c: Updated invocations of mhl_format_run().
37155	* mh/repl.c: Likewise.
37156	* po/POTFILES.in: Added new files.
37157
371582003-03-14  Sergey Poznyakoff
37159
37160	* TODO: Reformatted in Emacs outline mode
37161	* mh/compcommon.c: New file.
37162	* mh/forw.c: New file.
37163	* mh/.cvsignore: Added forw
37164	* mh/Makefile.am: Likewise.
37165	* mh/TODO: Updated
37166	* mh/comp.c (format_str,check_draft_disposition): Removed
37167	  (main): Use mh_comp_draft().
37168	* mh/mh.h (mh_comp_draft,check_draft_disposition): New functions.
37169	* mh/mh_stream.c (_body_readline,_body_stream_size): Bugfix.
37170	* mh/mh_whom.c (scan_addrs): Bugfix.
37171	* po/POTFILES.in: Added new files.
37172
371732003-03-13  Sergey Poznyakoff
37174
37175	Reorganized directory layout under mailbox/.
37176
37177	* configure.ac: Added mailbox/ subdirectories
37178	* mailbox/Makefile.am: Likewise.
37179	* po/POTFILES.in: Added missing files.
37180	* mh/README: Updated
37181
37182	* mailbox/mbox/Makefile.am: New file
37183	* mailbox/mbox/.cvsignore: New file
37184	* mailbox/mbox/folder.c: Moved from ../
37185	* mailbox/mbox/mbox.c: Moved from ../
37186	* mailbox/mbox/url.c: Moved from ../
37187	* mailbox/mbox/mboxscan.c: Moved from ../
37188	* mailbox/mbox/mbox0.h: New file
37189
37190	* mailbox/mh/Makefile.am: New file
37191	* mailbox/mh/.cvsignore: New file
37192	* mailbox/mh/folder.c: Moved from ../
37193	* mailbox/mh/mbox.c: Moved from ../
37194	* mailbox/mh/url.c: Moved from ../
37195
37196	* mailbox/maildir/Makefile.am: New file
37197	* mailbox/maildir/.cvsignore: New file
37198	* mailbox/maildir/mbox.c: New file
37199
37200	* mailbox/imap/Makefile.am: New file
37201	* mailbox/imap/.cvsignore: New file
37202	* mailbox/imap/folder.c: Moved from ../
37203	* mailbox/imap/mbox.c: Moved from ../
37204	* mailbox/imap/url.c: Moved from ../
37205
37206	* mailbox/pop/Makefile.am: New file
37207	* mailbox/pop/.cvsignore: New file
37208	* mailbox/pop/folder.c: Moved from ../
37209	* mailbox/pop/mbox.c: Moved from ../
37210	* mailbox/pop/url.c: Moved from ../
37211
37212	* mailbox/folder_mbox.c: Moved to mbox/folder.c
37213	* mailbox/mbx_mbox.c: Moved to mbox/mbox.c
37214	* mailbox/url_mbox.c: Moved to mbox/url.c
37215	* mailbox/mbx_mboxscan.c: Moved to mbox/mboxscan.c
37216
37217	* mailbox/folder_mh.c: Moved to mh/folder.c
37218	* mailbox/mbx_mh.c: Moved to mh/mh.c
37219	* mailbox/url_mh.c: Moved to mh/url.c
37220
37221	* mailbox/mbx_maildir.c: Moved to maildir/mbox.c
37222
37223	* mailbox/folder_imap.c: Moved to imap/folder.c
37224	* mailbox/mbx_imap.c: Moved to imap/mbox.c
37225	* mailbox/url_imap.c: Moved to imap/url.c
37226
37227	* mailbox/folder_pop.c: Moved to pop/folder.c
37228	* mailbox/mbx_pop.c: Moved to pop/mbox.c
37229	* mailbox/url_pop.c: Moved to pop/url.c
37230
372312003-03-11  Sergey Poznyakoff
37232
37233	* auth/sql.c (mu_sql_authenticate): Bugfix.
37234	* mh/.cvsignore: Added 'whom'.
37235	* mh/mh_whom.c: New file.
37236	* mh/whom.c: New file.
37237	* mh/Makefile.am: Added new files
37238	* mh/TODO: Updated
37239	* mh/mh.h (mh_draft_name,mh_whom): New functions.
37240	* mh/mh_getopt.h: Updated
37241	* mh/mh_init.c (mh_draft_name): New function.
37242	* mh/mh_whatnow.c (whom): Use mh_whom.
37243	* mh/send.c (draft_name): Removed.
37244	* mh/whatnow.c (main): Use 'draft' by default.
37245
372462003-03-10  Sergey Poznyakoff
37247
37248	* comsat/comsat.c: Use ngettext.
37249	* mh/sortm.c: New file. Source for the sortm utility.
37250	* mh/.cvsignore: Added sortm
37251	* mh/Makefile.am: Likewise
37252	* mh/README: Updated
37253	* mh/TODO: Updated
37254	* mh/mh_getopt.h: Updated
37255
372562003-03-03  Sergey Poznyakoff
37257
37258	* configure.ac: New option --with-included-argp
37259	* README: Documented --with-included-argp
37260	* doc/texinfo/muint.texi: New file. Root for the "Mailutils
37261	  internals" manual.
37262	* doc/texinfo/Makefile.am: Added rules to generate muint.info
37263	* doc/texinfo/mom.texi: Minor changes.
37264	* po/POTFILES.in: Added missed files.
37265
372662003-02-24  Alain Magloire
37267
37268	* doc/texinfo/mom.texi: Draft explanation of the
37269	Mailutils Object Model (MOM).
37270
372712003-02-24  Sergey Poznyakoff
37272
37273	* include/mailutils/mailcap.h: Added missing prototypes, protected
37274	  argument decls with __P and the whole stuff with extern "C".
37275	* mailbox/mailcap.c: Fixed indentation, adopted for 80-column
37276	  screen.
37277	* doc/texinfo/mailcap.inc: Removed. Auto-generated file
37278	* examples/mailcap.c: New file.
37279	* examples/Makefile.am: Added mailcap.c
37280	* examples/.cvsignore: Added mailcap
37281	* mailbox/testsuite/Mailcap: New file. Test data for mailcap.
37282	* mailbox/testsuite/Makefile.am: Added Mailcap
37283	* mailbox/testsuite/mailbox/mailcap.exp: New file.
37284	* mailbox/testsuite/mailbox/DISTFILES: Added mailcap.exp
37285
372862003-02-23  Alain Magloire
37287
37288	* mailbox/refcount.c: Added a simple thread-safe implementation.
37289	* include/mailutils/types.h: Added structure for refcount.
37290	* include/mailutils/refcount.h: Added a simple thread-safe implementation.
37291
372922003-02-23  Alain Magloire
37293
37294	* include/mailutils/types.h: Added the mailcap structure.
37295	* include/mailutils/mailcap.h: Include types.h
37296
372972003-02-23  Alain Magloire
37298
37299	* doc/texinfo/mailcap.texi: Document the mailcap functions.
37300	* doc/texinfo/mailcap.inc: Code example.
37301	* doc/texinfo/Makefile.am: Added mailcap.texi and mailcap.inc
37302
37303	* mailbox/Makefile.am: Added mailcap.c
37304	* mailbox/mailcap.c: include <mailutils/mailcap.h>
37305	* include/mailutils/Makefile.am: Added mailcap.h
37306
373072003-02-22  Alain Magloire
37308
37309	First implementation of rfc1524.
37310
37311	* mailbox/mailcap.c: First implementation of rfc1524.
37312	* include/mailutils/mailcap.h: First implementation of rfc1524.
37313
373142003-02-22  Sergey Poznyakoff
37315
37316	* include/mailutils/header.h (MU_HEADER_FCC): New macro
37317	* mailbox/mailer.c: Handle Fcc headers.
37318	* mailbox/sendmail.c: Ignore Fcc.
37319	* mailbox/smtp.c: Likewise.
37320	* mailbox/mbx_default.c (plus_expand): Bugfix
37321	* mailbox/mbx_mh.c (_mh_message_save): Bugfix
37322	* mh/folder.c (action_print): Minor change
37323	* mh/mh_argp.c (parse_opt): Pass the argument to ARG_FOLDER
37324	  without the leading '+'. This should be fixed later.
37325	* mh/refile.c: Fixed expanding of the draftfile name.
37326	* mh/send.c (send): Fix up the folder dir by appending a
37327	  format specifier (mh:/) to it.
37328	* mh/mh_init.c: Moved .*_to_message stuff to mh_stream.c
37329	* mh/mh_stream.c: Improved .*_to_message functions.
37330
373312003-02-21  Sergey Poznyakoff
37332
37333	* mail/testsuite/mail/folder.exp: Reflect changes to mailbox/date.c
37334	* mail/testsuite/mail/write.exp: Likewise
37335
373362003-02-21  Sergey Poznyakoff
37337
37338	* configure.ac: New option --with-mh-bindir sets installation
37339	  directory for MH binaries
37340	* mh/Makefile.am: Install binaries into a separate directory to
37341	  prevent namespace pollution.
37342	* README: Updated
37343	* mailbox/date.c (wdays): Two typos! Ouch...
37344	* mh/README: Updated.
37345	* mh/folder.c: Do not mark current folder when in fast mode
37346	* mh/mh_whatnow.c: Execute default programs using full path
37347	  specification.
37348	* mh/mh_stream.c: New file.
37349	* mh/mh.h (mhdraft_stream_create): New function.
37350	* mh/mh_init.c (mh_stream_to_message): Use MH draft streams.
37351
373522003-02-20  Sergey Poznyakoff
37353
37354	* mh/README: Updated
37355	* mh/TODO: Updated
37356	* mh/refile.c: New option --copy.
37357	  Properly handle trailing folder names. As a side-effect
37358	  it accepts messages and folders given in any order. Good!
37359	* mh/mh_argp.c (parse_opt): Call the handler with ARG_FOLDER
37360	  key if argument starts with +.
37361	* mh/anno.c (opt_handler): Removed superfluous case '+'.
37362	* mh/comp.c: Likewise.
37363	* mh/folder.c: Likewise.
37364	* mh/inc.c: Likewise.
37365	* mh/mark.c: Likewise.
37366	* mh/mhl.c: Likewise.
37367	* mh/mhpath.c: Likewise.
37368	* mh/pick.c: Likewise.
37369	* mh/repl.c: Likewise.
37370	* mh/rmf.c: Likewise.
37371	* mh/rmm.c: Likewise.
37372	* mh/scan.c: Likewise.
37373
373742003-02-18  Sergey Poznyakoff
37375
37376	* configure.ac: Provide a replacement for vsyslog
37377	* lib/vsyslog.c: New file.
37378	* lib/Makefile.am: Add vsyslog.c
37379	* mh/README: Minor changes.
37380	* mh/TODO: Minor changes.
37381
37382	* mh/mh.h (MHA_REQUIRED,MHA_OPTARG,MHA_OPT_CLEAR): New defines.
37383	* mh/mh_fmtgram.y (mh_code_builtin): Minor fix.
37384	* mh/mh_format.c (builtin_me): Enclose the address in <> brackets.
37385	  (builtin_formataddr): Minor fix.
37386	  (builtin_tab): Fixed optarg column.
37387
373882003-02-16  Sergey Poznyakoff
37389
37390	The sources up to here are tagged rel_0_3.
37391
37392	* libmu_scm/Makefile.am: Use $< only in implicit rules. Non-gnu
37393	  implementation of make expand it to a null string if used
37394	  within an explicit rule.
37395	* mh/Makefile.am: Likewise.
37396
373972003-02-16  Sergey Poznyakoff
37398
37399	* configure.ac: Added check for declaration of strerror.
37400	  Raised version number to 0.3
37401	* NEWS: Updated
37402
37403	* guimb/Makefile.am: Added $(top_srcdir)/mailbox to INCLUDES.
37404	* guimb/guimb.h: Include <getline.h>
37405	* mail/mail.h (util_noapp): Added prototype.
37406	* mail/msgset.y: Declaration of check_set().
37407	* mail.remote/mail.remote.c: Include <mailutils/error.h>
37408	* mailbox/date.c: Added a clarifying comment.
37409	* mailbox/stream.c (stream_seek): Fixed type of size auto
37410	  variable.
37411
37412	* mh/mh_sequence.c: New file.
37413	* mh/pick.h: New file.
37414	* mh/pick.y: New file.
37415	* mh/pick.c: Implemented.
37416	* mh/Makefile.am: Added mh_sequence.c and pick.y. Provide
37417	  for multiple parsers within an application.
37418	* mh/.cvsignore: Updated.
37419	* mh/README: Updated
37420	* mh/TODO: Updated
37421
37422	* mh/mh.h (mh_seq_add, mh_seq_delete, mh_seq_read): New functions.
37423	* mh/mh_argp.c (parse_opt): Pass argp_state to the handler
37424	  (my_argp_parse): Changed declaration. The new argument `flags'
37425	  is accepted. Use my_argp_parse() wrapper instead of
37426	  argp_parse().
37427	* mh/mh_getopt.h: Updated.
37428
37429	* mh/anno.c: Changed invocation of mh_argp_parse and updated
37430	  the definition of opt_handler.
37431	* mh/comp.c: Likewise.
37432	* mh/mhl.c: Likewise.
37433	* mh/mhpath.c: Likewise.
37434	* mh/refile.c: Likewise.
37435	* mh/repl.c: Likewise.
37436	* mh/rmf.c: Likewise.
37437	* mh/rmm.c: Likewise.
37438	* mh/scan.c: Likewise.
37439	* mh/send.c: Likewise.
37440	* mh/whatnow.c: Likewise.
37441	* mh/fmtcheck.c: Likewise.
37442	* mh/folder.c: Likewise.
37443	* mh/inc.c: Likewise.
37444	* mh/install-mh.c: Likewise.
37445	* mh/mark.c: Likewise. Use new mh_sequence functions.
37446
37447	* doc/texinfo/fdl.texi: Minor change.
37448	* doc/texinfo/programs.texi: Advice on how to use mail.local
37449	  with SQL authentication.
37450
374512003-02-14  Wojciech Polak
37452
37453	* po/POTFILES.in: Added auth/tls.c.
37454	* doc/texinfo/mailutils.texi: Updated copyright year.
37455
374562003-02-14  Sergey Poznyakoff
37457
37458	* mail/msgset.y: Bugfix. '*' should not select deleted
37459	  messages.
37460	* mail/next.c: Skip deleted messages.
37461	* mail/previous.c: Likewise.
37462	* mail/undelete.c (undelete0): Set cursor if it is zero.
37463	* mh/pick.c: New file. A framework for pick command
37464	* mh/Makefile.am: Added pick.c
37465	* mh/.cvsignore: Likewise.
37466	* mh/mh_getopt.h: Updated.
37467	* mh/mh_init.c (mh_real_install): Create inbox.
37468	* mh/refile.c: Fixed copyright year.
37469	* mh/send.c: Get personal data from the value of the profile
37470	  component "signature" or from the environment variable
37471	  SIGNATURE.
37472
374732003-02-14  Sergey Poznyakoff
37474
37475	* configure.ac: New option --enable-mh-utils.
37476	  Added check for Emacs lisp directory
37477	* include/mailutils/address.h (address_get_nth): New function.
37478	  Get Nth subaddress from an address.
37479	* mailbox/address.c: Likewise.
37480	* mh/mailutils-mh.eli: New file. Source for mailutils-mh.el --
37481	  an elisp module that configures mh-e.el for use with mailutils.
37482	* mh/Makefile.am: Added rules for generating mailutils-mh.el
37483	* mh/mh_format.c (builtin_formataddr): Rewritten to prevent
37484	  formatting the duplicate addresses.
37485	  (builtin_putaddr): Use print_hdr_string to format output string.
37486
37487	* po/POTFILES.in: Added more files.
37488	* README: Updated
37489	* mh/README: Updated
37490
374912003-02-13  Sergey Poznyakoff
37492
37493	* imap4d/append.c (imap4d_append): Bugfix.
37494	* include/mailutils/stream.h (stream_seek): New function.
37495	* mailbox/stream.c: Likewise.
37496	* mailbox/mbx_mh.c (_mh_message_save): Check if the envelope
37497	  date has a newline.
37498	* mailbox/message.c (message_size): Bugfix. Retrieve
37499	  the header and the body with appropriate calls instead of
37500	  addressing corresponding members of the message_t structure.
37501
37502	* mh/mh_list.c: New file. The parser and run-time driver for
37503	  mhl format files.
37504	* mh/mhl.format: New file. The default format for mhl.
37505	* mh/Makefile.am: Added mh_list.c and mhl.format.
37506
37507	* mh/folder.c: Use ARG_ macros instead of single-char option
37508	  letters.
37509	* mh/mh_getopt.h: Added new ARG_ macros.
37510	* mh/mh.h (mh_file_to_message,mh_stream_to_message): New
37511	  functions.
37512	  (mhl_format_compile,mhl_format_run,mhl_format_destroy):
37513	  New functions.
37514	* mh/mh_init.c (mh_file_to_message,mh_stream_to_message): New
37515	  functions.
37516	* mh/mh_fmtgram.y (mh_format_parse): Bugfix. Initialize prog to
37517	  zero.
37518	* mh/mh_format.c (mh_format_str): New function.
37519	* mh/mhl.c: Finished.
37520	* mh/repl.c: Handle --filter argument.
37521	* mh/send.c: Use mh_.*_to_message.
37522
37523	* mh/README: Updated.
37524	* mh/TODO: Updated.
37525	* NEWS: Updated.
37526
375272003-02-12  Sergey Poznyakoff
37528
37529	* mailbox/file_stream.c (prog_stream_create): New function.
37530	  Creates a stream connected to the stdin or stdout of
37531	  a given program.
37532	* include/mailutils/stream.h (prog_stream_create): New function.
37533	* mh/mhl.c: New file. A framework for mhl program.
37534	* mh/Makefile.am: Added mhl
37535	* mh/.cvsignore: Likewise.
37536	* mh/TODO: Updated.
37537	* mh/mh_getopt.h: Added new ARG_ macros.
37538
37539	* NEWS: Added entry for version 0.3
37540	* README: Updated.
37541
375422003-02-12  Sergey Poznyakoff
37543
37544	* mh/mh_format.c (builtin_formataddr): Do not include
37545	  own email unless RCPT_ME is set.
37546	* mh/mh_init.c (mh_is_my_name): Honor Alternate-Mailboxes
37547	  variable, use wildcard matching.
37548
375492003-02-10  Wojciech Polak
37550
37551	* */*: Fixed and/or updated copyrights.
37552	* README: Updated.
37553
37554	* auth/tls.c: Changed `--ssl-key' arg to FILE type.
37555
375562003-02-10  Frederic Gobry  <frederic.gobry@smartdata.ch>
37557
37558	* mailbox/rfc2047.c: avoid cutting utf-8 strings in the middle of
37559	  a multibyte character.
37560
375612003-02-10  Sergey Poznyakoff
37562
37563	* mailbox/mbx_mh.c (mh_expunge, mh_save_attributes): Bugfix
37564	* mh/mh.h (mh_annotate): New function.
37565	* mh/mh_init.c: Likewise.
37566	* mh/anno.c: Use mh_annotate
37567
375682003-02-10  Sergey Poznyakoff
37569
37570	* include/mailutils/header.h (MU_HEADER_ENV_SENDER,
37571	  MU_HEADER_ENV_DATE): New macros.
37572	* mailbox/mbx_mh.c (_mh_message_save): Bugfix.
37573	  (mh_save_attributes): Implemented
37574
37575	* mh/install-mh.c: New file.
37576	* mh/anno.c: New file.
37577	* mh/mark.c: New file
37578	* mh/Makefile.am: Added install-mh, anno and mark
37579	* mh/.cvsignore: Likewise.
37580	* mh/mh_global.c (mh_auto_install): New global.
37581	  (mh_read_profile): Call mh_install() if necessary.
37582	  (mh_global_sequences_iterate)
37583	  (mh_global_context_iterate): New functions.
37584	* mh/mh_init.c (mh_install_help, mh_real_install)
37585	  (mh_install): New functions.
37586	  (mh_open_msg_file): Rewritten.
37587	* mh/mh_whatnow.c: Implemented push command.
37588	* mh/TODO: Updated
37589
37590	* mh/mh.h (mh_context_iterator): New type.
37591	  (mh_open_msg_file): Changed declaration.
37592	  (mh_install, mh_global_context_iterate)
37593	  (mh_global_sequences_iterate,mh_context_iterate)
37594	  (mh_usedraft): New functions.
37595	* mh/mh_ctx.c (mh_context_iterate): New function.
37596	* mh/mh_getopt.h: Added ARG_ macros.
37597
37598	* mh/comp.c: Fixed option handling.
37599	* mh/fmtcheck.c: Likewise.
37600	* mh/inc.c: Likewise.
37601	* mh/mhpath.c: Likewise.
37602	* mh/refile.c: Likewise.
37603	* mh/repl.c: Likewise.
37604	* mh/rmf.c: Likewise.
37605	* mh/rmm.c: Likewise.
37606	* mh/scan.c: Likewise.
37607	* mh/whatnow.c: Likewise.
37608
37609	* mh/send.c: Add from: header to the outgoing message.
37610
37611	* po/POTFILES.in: Added new files.
37612
376132003-02-08  Sergey Poznyakoff
37614
37615	* mh/mh.h: Added new includes.
37616	  (mh_open_msg_file,mh_usedraft): New functions.
37617	* mh/mh_init.c (mh_open_msg_file): New function. Based on
37618	  refile.c:open_source().
37619	* mh/mh_whatnow.c (mh_usedraft): New function.
37620	* mh/refile.c (open_source): Removed in favor of mh_open_msg_file().
37621	* mh/send.c: Implemented basic functionality.
37622
376232003-02-08  Sergey Poznyakoff
37624
37625	* examples/decode2047.c (main): Added return statement.
37626	* mailbox/mbx_mh.c (_mh_message_save): Allow for mh-specific
37627	  delimiter (a string of dashes) between the headers and the body.
37628	* mailbox/mutil.c (mu_spawnvp): Bugfix, PROG was not used.
37629
37630	* mh/send.c: New file. A framework for send utility.
37631	* mh/.cvsignore: Added send.
37632	* mh/Makefile.am: Likewise.
37633	* mh/mh_whatnow.c: Implemented refile command.
37634
37635	* mh/mh_getopt.h (struct mh_option): Removed `longopt' member.
37636	* mh/comp.c: Likewise.
37637	* mh/fmtcheck.c: Likewise.
37638	* mh/folder.c: Likewise.
37639	* mh/inc.c: Likewise.
37640	* mh/mh_getopt.c: Likewise.
37641	* mh/scan.c: Likewise.
37642	* mh/whatnow.c: Likewise.
37643	* mh/rmf.c: Likewise.
37644	* mh/refile.c: Likewise.
37645	* mh/repl.c: Likewise.
37646
37647	* mh/TODO: Updated
37648
376492003-02-07  Wojciech Polak
37650
37651	* doc/texinfo/programs.texi: Added info about WITH_GNUTLS
37652	  and WITH_GSASL to the `General Information' node.
37653
376542003-02-07  Frederic Gobry  <frederic.gobry@smartdata.ch>
37655
37656	* mailbox/rfc2047.c: implemented a preliminary RFC2047 encoder.
37657
376582003-02-06  Sergey Poznyakoff
37659
37660	* libsieve/actions.c (build_mime): Call message_unref.
37661	* mailbox/body.c (lazy_create): Removed. Use mu_tempname()
37662	  instead.
37663
376642003-02-03  Sergey Poznyakoff
37665
37666	* auth/Makefile.am: Removed leftover AUTH_AUTHOBJS from LIBADD
37667	* auth/gsasl.c (buffer_grow, _gsasl_strerror): Fixed declarations.
37668	* auth/tls.c (_tls_strerror): Fixed declaration.
37669	* guimb/guimb.h: Added missing includes
37670	* guimb/main.c: Removed include <mailutils/argp.h>
37671	* imap4d/auth_gsasl.c (create_gsasl_stream,gsasl_replace_streams):
37672	  Fixed declarations.
37673	  (auth_step_base64): New function. A wrapper around
37674	  gsasl_server_step_base64 to cope with GSASL_TOO_SMALL_BUFFER
37675	  error code.
37676	  (auth_gsasl): Use auth_step_base64(). Output any surplus
37677	  data returned with GSASL_OK code (proposed by Simon Josefsson
37678	  <jas@extundo.com>)
37679	* imap4d/bye.c (imap4d_bye0): Added missing argument to syslog.
37680 	* pop3d/extra.c (pop3d_abquit): Likewise.
37681	* imap4d/util.c (util_set_input, util_set_output): Bugfix
37682
37683	* include/mailutils/stream.h (stream_set_strerror)
37684	  (stream_strerror): Changed prototype
37685	* mailbox/stream.c: Likewise.
37686	* mailbox/include/stream0.h (struct _stream): Changed declaration
37687	  of _strerror method.
37688	* mailbox/file_stream.c (_file_strerror): Changed prototype
37689	* mailbox/list.c (list_set_comparator): Bugfix.
37690	* mailbox/mailutils-config.c: include <mu_asprintf.h>
37691	* mailbox/monitor.c [!WITH_PTHREAD] (STATIC_UNLOCK): expand
37692	  to empty string to avoid spurious warnings.
37693	* mailbox/mutil.c: Added missing includes
37694	* mailbox/rfc2047.c: Likewise.
37695
37696	* libmu_scm/mu_body.c: Added missing typecasts.
37697	* libmu_scm/mu_mailbox.c: Likewise.
37698	* libmu_scm/mu_message.c: Likewise.
37699	* libmu_scm/mu_mime.c: Likewise.
37700	* libmu_scm/mu_scm.c: Likewise.
37701	* mail.local/script.c (prog_mda): Removed unused variables.
37702	* mailbox/Makefile.am (mailutils_config_CFLAGS): Added
37703	  -I${top_srcdir}/lib.
37704
37705	* mh/mh_format.c (print_hdr_segment): Count a tab for eight
37706	  spaces.
37707	  (builtin_concat): Compress whitespace before further processing.
37708	* mh/mh_getopt.c: Added missing includes.
37709	* mh/comp.c (opt_handler): Removed unused variable
37710
377112003-01-31  Sergey Poznyakoff
37712
37713	* mailbox/file_stream.c (_file_readline): Make sure the
37714	  terminal zero is always added.
37715
37716	* mh/mh.h (mh_format): Changed declaration.
37717	  (mh_format_debug): New function.
37718	* mh/mh_format.c (mh_format): Use dynamically allocated buffer.
37719	  (builtin_printstr): Removed.
37720	  (builtin_printhdr): New function.
37721	  (builtin_putnum,builtin_putnumf)
37722	  (builtin_putstr,builtin_putstrf): Bugfix.
37723
37724	* mh/mh_fmtgram.y (mh_format_debug): New function.
37725	* mh/inc.c: Updated calls to mh_format
37726	* mh/scan.c: Likewise.
37727	* mh/repl.c: Updated calls to mh_format.
37728	  (format_str): Use printhdr.
37729	  (make_draft): Disable interactive prompting when build_only
37730	  flag is set.
37731	* mh/replcomps: Use printhdr.
37732	* mh/mh_init.c (mh_read_formfile): Bugfix.
37733
37734	* mh/fmtcheck.c: New command line option --debug.
37735	* mh/README: Changed printstr to printhdr
37736
37737	* pop3d/extra.c (pop3d_readline): Fixed misguiding diagnostics.
37738	  Check for eof.
37739	* pop3d/signal.c (pop3d_sigchld): Don't try to print to stdout
37740	  if SIGPIPE received.
37741
377422003-01-30  Sergey Poznyakoff
37743
37744	* mailbox/rfc2047.c (rfc2047_decode): Bugfix.
37745	* imap4d/idle.c: Fixed wording of OK message.
37746
377472003-01-29  Sergey Poznyakoff
37748
37749	* imap4d/idle.c: Do not wait for 'DONE' command longer than
37750	  timeout seconds.
37751
37752	* mailbox/rfc2047.c: New file. Initial implementation of
37753	  rfc2047_decode. Based on input from Kidong Lee
37754	  <brian@ahmlhs.com>.
37755
37756	* mailbox/Makefile.am: Added rfc2047.c
37757
37758	* examples/decode2047.c: New file. Test program for rfc2047
37759	  decoder functions.
37760	* examples/Makefile.am: Added decode2047.c
37761	* include/mailutils/errno.h (MU_ERR_BAD_2047_INPUT): New error
37762	  code.
37763	* mailbox/muerrno.c: Likewise.
37764	* include/mailutils/mime.h (rfc2047_decode): New function.
37765
37766	* mailbox/testsuite/RFC2047: New file. Test data for rfc 2047.
37767	* mailbox/testsuite/Makefile.am: Added RFC2047
37768	* mailbox/testsuite/mailbox/rfc2047.exp: New file. Testcase for
37769	  decoding rfc 2047 strings.
37770	* mailbox/testsuite/mailbox/DISTFILES: Added rfc2047.exp
37771
377722003-01-28  Sergey Poznyakoff
37773
37774	* auth/gsasl.c (_gsasl_get_fd): New function.
37775	  (gsasl_stream_create): Install _get_fd method
37776	* auth/tls.c (_tls_get_fd): New function.
37777	  (tls_stream_create): Install _get_fd method
37778	* imap4d/idle.c: New file. Implements IDLE command
37779	  (rfc 2177)
37780	* imap4d/Makefile.am: Added imap4d/idle.c
37781	* imap4d/capability.c (imap4d_capability_init): Announce
37782	  IDLE capability.
37783	* imap4d/commands.c: Added entry for IDLE command.
37784	* imap4d/imap4d.h (imap4d_idle, util_wait_input): New functions.
37785	* imap4d/util.c (util_wait_input): New function.
37786	* imap4d/noop.c: Removed misleading comment.
37787	* imap4d/testsuite/imap4d/anystate.exp: Reflect IDLE capability.
37788
377892003-01-28  Sergey Poznyakoff
37790
37791	* comsat/comsat.c: Removed unneeded colon in the argument to perror.
37792	* imap4d/imap4d.c: Likewise.
37793	* guimb/main.c: Fixed help output.
37794	* mailbox/mailutils-config.c: Likewise.
37795
377962003-01-26  Sergey Poznyakoff
37797
37798	* imap4d/auth_gss.c: Removed newline from the syslog diagnostic
37799	  message.
37800
37801	* imap4d/bye.c: Cleaned wording in diagnostics.
37802	* imap4d/search.c: Likewise.
37803	* libsieve/require.c: Likewise.
37804	* mailbox/mu_argp.c: Likewise.
37805	* mh/mh_fmtgram.y: Likewise.
37806	* mh/mh_format.c: Likewise.
37807	* pop3d/extra.c: Likewise.
37808	* sieve/sieve.c: Likewise.
37809
37810	* mail/summary.c: Use ngettext
37811	* mh/folder.c: Likewise.
37812	* mh/refile.c: Likewise.
37813	* mh/repl.c: Likewise.
37814	* pop3d/user.c: Likewise.
37815
37816	* mail.remote/mail.remote.c: Use mu_error instead of fprintf
37817	* readmsg/readmsg.c: Likewise.
37818
37819	* mh/comp.c: Fixed use of OPTION_DOC options.
37820	* mh/fmtcheck.c: Likewise.
37821	* mh/inc.c: Likewise.
37822	* mh/mhpath.c: Likewise.
37823	* mh/rmf.c: Likewise.
37824
378252003-01-23  Wojciech Polak
37826
37827	* mailbox/mu_argp.c: Added WITH_GNUTLS and WITH_GSASL
37828	  to `mu_conf_option'.
37829
378302003-01-23  Wojciech Polak
37831
37832	* doc/texinfo/programs.texi: Added the 'encryption' node.
37833
378342003-01-23  Sergey Poznyakoff
37835
37836	* libsieve/util.c (_comp_action): Bugfix. Incorrectly handled
37837	  multiple patterns.
37838
37839	* sieve/testsuite/scripts/mul-addr.sv: New file. Script for
37840	  testing "multiple patterns" bug.
37841	* sieve/testsuite/sieve/mul-addr.exp: New file. Testcase for
37842	  "multiple patterns" bug.
37843	* sieve/testsuite/scripts/DISTFILES: Updated
37844	* sieve/testsuite/sieve/DISTFILES: Updated
37845
37846	* imap4d/auth_gsasl.c: Removed leftover "while"
37847
378482003-01-22  Sergey Poznyakoff
37849
37850	Renamed mu_errstring to mu_strerror for consistency
37851	with usual practice.
37852	Files affected:
37853
37854	* comsat/comsat.c
37855	* dotlock/dotlock.c
37856	* examples/http.c
37857	* examples/mimetest.c
37858	* examples/msg-send.c
37859	* examples/mta.c
37860	* examples/sfrom.c
37861	* examples/url-parse.c
37862	* frm/frm.c
37863	* from/from.c
37864	* guimb/collect.c
37865	* imap4d/auth_gsasl.c
37866	* imap4d/select.c
37867	* include/mailutils/errno.h
37868	* libsieve/actions.c
37869	* libsieve/argp.c
37870	* libsieve/prog.c
37871	* libsieve/require.c
37872	* libsieve/runtime.c
37873	* libsieve/sieve.l
37874	* mail/alt.c
37875	* mail/file.c
37876	* mail/mail.c
37877	* mail/send.c
37878	* mail/util.c
37879	* mail/var.c
37880	* mail.local/main.c
37881	* mail.remote/mail.remote.c
37882	* mailbox/mbx_mbox.c
37883	* mailbox/mbx_pop.c
37884	* mailbox/message.c
37885	* mailbox/mu_argp.c
37886	* mailbox/muerrno.c
37887	* mailbox/wicket.c
37888	* mh/comp.c
37889	* mh/inc.c
37890	* mh/mh_ctx.c
37891	* mh/mh_init.c
37892	* mh/mh_msgset.c
37893	* mh/mh_whatnow.c
37894	* mh/refile.c
37895	* mh/repl.c
37896	* pop3d/apop.c
37897	* pop3d/lock.c
37898	* readmsg/readmsg.c
37899	* sieve/sieve.c
37900
379012003-01-22  Sergey Poznyakoff
37902
37903	* configure.ac: Raised version number to 0.2.2
37904	  Added support for cram-md5 password file
37905	* auth/Makefile.am: Define SITE_CRAM_MD5_PWD
37906	* auth/gsasl.c: Implemented gsasl stream. Added
37907	  argp stuff.
37908	* imap4d/auth_gsasl.c (auth_gsasl): Make sure the
37909	  streams are reset after issuing OK tagged response.
37910	* imap4d/imap4d.c (imap4d_capa): Require "gsasl" capability
37911	  if compiled with gsasl support.
37912	  (main): Call auth_.*_init's after mu_argp_parse.
37913	* imap4d/imap4d.h (util_get_input, util_get_output)
37914	  (util_set_input, util_set_output): New functions.
37915	  (util_register_event, util_event_remove, util_run_events): New
37916	  functions.
37917	* imap4d/util.c (util_finish): Check event queue if the
37918	  state has changed.
37919	  (util_register_event, util_event_remove, util_run_events): New
37920	  functions.
37921
37922	* include/mailutils/gsasl.h (gsasl_stream_create): Changed
37923	  declaration.
37924	  (mu_gsasl_init_argp): New function.
37925	  (gsasl_cram_md5_pwd): New global.
37926
37927	* mailbox/stream.c (stream_sequential_readline, stream_strerror):
37928	  Check for stream == NULL.
37929
37930	* imap4d/store.c (imap4d_store0): Fixed STORE untagged output in
37931	  accordance with rfc2060-errata document.
37932	* imap4d/fetch.c (fetch_flags0): Likewise.
37933	* imap4d/testsuite/imap4d/expunge.exp: Likewise.
37934	* imap4d/testsuite/imap4d/fetch.exp: Likewise.
37935	* imap4d/testsuite/imap4d/search.exp: Likewise.
37936
37937	* doc/rfc/rfc2177.txt: New file.
37938	* doc/rfc/Makefile.am: Added rfc2177.txt
37939
379402003-01-22  Sergey Poznyakoff
37941
37942	* configure.ac: Renamed AUTHOBJS to IMAP_AUTHOBJS for
37943	  clarity. Added call to MU_CHECK_GSASL.
37944
37945	* m4/gsasl.m4: New file. Detect the presence of libgsasl library.
37946	* m4/Makefile.am: Added gsasl.m4
37947
37948	* auth/gsasl.c: New file. Placeholder for gsasl stream support.
37949	* auth/Makefile.am: Added gsasl.c.
37950	* auth/tls.c: Include stdlib.h
37951	  (mu_deinit_tls_libs): Changed return type to void
37952
37953	* imap4d/Makefile.am: Renamed AUTHOBJS to IMAP_AUTHOBJS.
37954	* imap4d/authenticate.c: Rewritten capability and authentication
37955	  systems.
37956	* imap4d/capability.c: Use comparator function for list deletions.
37957	* imap4d/imap4d.c (tls_available,tls_done): Removed.
37958	  (main): Call auth_gssapi_init, auth_gsasl_init
37959	* imap4d/imap4d.h (tls_available,tls_done): Removed.
37960	  (starttls_init,util_atexit): New functions.
37961	  (imap4d_auth_handler_fp): New data type.
37962	  (auth_gssapi_init,auth_gsasl_init): New functions/macros
37963	* imap4d/starttls.c (tls_available,tls_done): Static variables.
37964	  (imap4d_starttls): Register mu_deinit_tls_libs as an 'atexit'
37965	  function.
37966	  (starttls_init): New function.
37967	* imap4d/util.c (util_setio): Make sure both streams are
37968	  line-buffered.
37969	  (util_get_input,util_get_output)
37970	  (util_set_input,util_set_output): New functions for manipulating
37971	  io streams.
37972	  (util_atexit): New function.
37973
37974	* imap4d/auth_gss.c (auth_gssapi): Changed declaration and return
37975	  values to match new authentication framework.
37976	  (auth_gssapi_init): New function
37977	* imap4d/auth_gsasl.c: New file.
37978
37979	* include/mailutils/list.h (list_comparator_t): New datatype.
37980	  (list_set_comparator): New function
37981	* include/mailutils/tls.h (mu_deinit_tls_libs): Changed type
37982	  to void.
37983	* include/mailutils/gsasl.h: New file.
37984	* include/mailutils/Makefile.am: Added gsasl.h.
37985
37986	* mailbox/include/list0.h (struct _list): New member comp.
37987	* mailbox/list.c (list_set_comparator): New function.
37988	  (list_remove, list_replace): Use list->comp for
37989	  comparing list items with the supplied data.
37990
37991	* pop3d/extra.c (pop3d_setio): Make sure both streams are
37992	  line-buffered.
37993
37994	* mailbox/.cvsignore: Updated
37995
379962003-01-21  Sergey Poznyakoff
37997
37998	Implemented LOGINDISABLED.
37999
38000	* imap4d/capability.c (imap4d_capability_add)
38001	  (imap4d_capability_remove, imap4d_capability_init): New
38002	  functions.
38003	* imap4d/imap4d.h: Likewise.
38004	* imap4d/imap4d.c (login_disabled): New global.
38005	  (argp_option options): Added --login-disabled option.
38006	  (imap4d_parse_opt): Handle --login-disabled option.
38007	  (main): Call imap4d_capability_init().
38008	  Register "STARTTLS" capability if tls is OK.
38009	* imap4d/starttls.c: When TLS negotiation succeeds, remove
38010	  "STARTTLS" capability and reset login_disabled.
38011
38012	* imap4d/login.c: Fail if login_disabled is set.
38013	* imap4d/util.c (util_msgset): Edited comment.
38014	  (util_start,util_getstate): Removed.
38015
380162003-01-20  Sergey Poznyakoff
38017
38018	* configure.ac: Invoke AM_GNU_GETTEXT with no-libtool,
38019	  need-ngettext
38020	* lib/Makefile.am (INCLUDES): Added @INTLINCS@
38021	* lib/posix/regex.h: Define __restrict_arr to empty string
38022	  unless it was already defined elsewhere.
38023
38024	* m4/tls.m4: Reverted order of checks for libgnutls
38025	  and libgcrypt.
38026
38027	* mailbox/Makefile.am (mailutils_config_CFLAGS): Define I18NLIBS.
38028	* mailbox/mailutils-config.c (main): Use I18NLIBS instead of
38029	  hardcoding library names.
38030
38031	* THANKS: Added Simon Josefsson
38032
380332003-01-19  Wojciech Polak
38034
38035	* auth/tls.c (mu_check_tls_environment): Removed file permissions
38036	  check for `ssl_cert'. Thanks Simon Josefsson for reporting.
38037
380382003-01-18  Sergey Poznyakoff
38039
38040	* imap4d/util.c (util_token): Fixed comment.
38041
38042	* mailbox/mbx_mh.c (mh_check_message): New function.
38043	  (mh_body_size,mh_check_message,mh_header_size)
38044	  (mh_header_lines): Use mh_check_message() to make sure
38045	  the message has been scanned.
38046
38047	* mh/comp.c: New file. Implements comp utility.
38048	* mh/Makefile.am: Added comp.
38049	* mh/mh.h (mh_err_memory,mh_file_copy): New functions.
38050	* mh/mh_init.c: Likewise.
38051	* mh/mh_argp.c: Use mh_err_memory to report low memory
38052	  diagnostics.
38053	* mh/mh_ctx.c: Likewise.
38054	* mh/mh_msgset.c: Likewise.
38055	* mh/mh_whatnow.c: Likewise.
38056
38057	* mh/repl.c: Changed semantics of --use option. It takes an
38058	  optional argument of yes/no.
38059	  (make_draft): Changed declaration.
38060
38061	* mh/TODO: Updated.
38062	* mh/README: Updated.
38063
380642003-01-18  Wojciech Polak
38065
38066	* imap4d/util.c (util_bye): Check 'tls_available' before
38067	  calling mu_deinit_tls_libs(). Just for make sure...
38068	* pop3d/extra.c (pop3d_bye): Likewise.
38069
380702003-01-18  Sergey Poznyakoff
38071
38072	* include/mailutils/stream.h (stream_set_strerror)
38073	  (stream_sequential_read,stream_sequential_readline)
38074	  (stream_sequential_write,stream_strerror): New functions.
38075
38076	* include/mailutils/tls.h: Removed inclusion of gnutls.h
38077	  (tls_stream_create): New declaration.
38078	  (mu_check_tls_environment, mu_init_tls_libs)
38079	  (mu_deinit_tls_libs): Added prototypes.
38080
38081	* mailbox/file_stream.c (_file_strerror): New function.
38082	  (file_stream_create): Register strerror function.
38083	  (stdio_stream_create): Enable caching only if the
38084	  file is not seekable and MU_STREAM_SEEKABLE bit is
38085	  set in flags. Register different sets of
38086	  (read,readline,write) handlers depending on the
38087	  setting of MU_STREAM_SEEKABLE bit.
38088
38089	* mailbox/include/stream0.h (struct _stream): Removed
38090	  unused member `roff'. Added new member `offset' for
38091	  support of sequential access functions.
38092	  (_strerror): New method. Return stream-specific
38093	  error description (if any).
38094	* mailbox/stream.c (stream_set_strerror): New function.
38095	  (stream_sequential_read,stream_sequential_readline)
38096	  (stream_sequential_write): New functions for sequential
38097	  access to stream.
38098	  (stream_strerror): New function. Return stream-specific
38099	  error description (if any).
38100
38101	* auth/tls.c: Implemented TLS streams. All tls-specific details
38102	  are now hidden within this module.
38103
38104	* examples/base64.c: Use sequential access for the output stream
38105	* examples/msg-send.c: Open stdio stream with MU_STREAM_SEEKABLE
38106	  bit set.
38107	* mail.remote/mail.remote.c: Likewise.
38108
38109	* imap4d/bye.c (imap4d_bye0): Use util_is_master() and util_bye()
38110	* imap4d/imap4d.c (imap4d_mainloop): Changed proto following
38111	  that of pop3.
38112	* imap4d/imap4d.h (util_setio): Changed declaration.
38113	  (util_is_ofile): Removed.
38114	  (util_is_master): New.
38115	  (imap4d_deinit_tls_server): Removed.
38116	* imap4d/signal.c (imap4d_signal): Use util_is_master().
38117	* imap4d/starttls.c (imap4d_starttls): Flush output
38118	  before initializing tls.
38119	* imap4d/util.c (ifile, ofile, sfile): Removed.
38120	  (istream, ostream): New statics.
38121	  (util_send_lowlevel): Removed
38122	  (util_send, util_out, util_finish, imap4d_readline)
38123	  (util_flush_output): Rewritten using streams.
38124	  (util_setio): Changed argument types
38125	  (util_is_ofile): Removed.
38126	  (util_is_master): New function.
38127	  (imap4d_init_tls_server): Rewritten using TLS streams.
38128	  (imap4d_deinit_tls_server): Removed.
38129	  (util_bye): New function.
38130
38131	* pop3d/extra.c (ifile, ofile): Removed.
38132	  (istream, ostream): New streams.
38133	  (pop3d_setio,pop3d_init_tls_server): Rewritten using streams.
38134	  (pop3d_flush_output,pop3d_is_master): Likewise.
38135	  (pop3d_outf,pop3d_readline): Likewise.
38136	  (pop3d_deinit_tls_server): Removed.
38137	  (pop3d_bye): New function.
38138	* pop3d/pop3d.c (pop3d_mainloop): use pop3d_bye().
38139
38140	* mh/mh_format.c (builtin_references): Fixed typo.
38141	  (builtin_package, builtin_package_string)
38142	  (builtin_version): New functions.
38143	* mh/replcomps: Emit X-Mailer header.
38144	* mh/repl.c (format_str): Likewise.
38145	* mh/README: Updated
38146
381472003-01-17  Wojciech Polak
38148
38149	* imap4d/capability.c: Small fix.
38150
381512003-01-17  Wojciech Polak
38152
38153	* imap4d/imap4d.c: Added TLS support.
38154	  (ifile, ofile): Removed globals.
38155	  (tls_available, tls_done): Added globals.
38156	* imap4d/imap4d.h: Include <mailutils/tls.h>
38157	  (ifile, ofile): Removed declarations.
38158	  (tls_available, tls_done): Added declarations.
38159	  (imap4d_starttls): Added prototype.
38160	  (imap4d_init_tls_server): Likewise.
38161	  (imap4d_deinit_tls_server): Likewise.
38162	  (util_setio): Likewise.
38163	  (util_flush_output): Likewise.
38164	  (util_is_ofile): Likewise.
38165	  (imap4d_readline_ex): Changed prototype. Use void instead of FILE *.
38166	  (imap4d_readline): Likewise.
38167	  (ERR_TLS): New define.
38168	* imap4d/starttls.c: New file. The STARTTLS command support.
38169	* imap4d/util.c: Added TLS support (via GnuTLS).
38170	  (ifile, ofile, sfile): Added static variables.
38171	  (util_send_lowlevel): New function.
38172	  (imap4d_init_tls_server): Likewise.
38173	  (imap4d_deinit_tls_server): Likewise.
38174	  (util_setio): Likewise.
38175	  (util_flush_output): Likewise.
38176	  (util_is_ofile): Likewise.
38177	* imap4d/bye.c: Added TLS support.
38178	* imap4d/commands.c: Likewise.
38179	* imap4d/capability.c: Likewise.
38180	* imap4d/signal.c: Use util_is_ofile().
38181	* imap4d/Makefile.am: Updated.
38182
381832003-01-17  Sergey Poznyakoff
38184
38185	* imap4d/sync.c: Always return EXIST and RECENT untagged
38186	  responses. Thanks Simon Josefsson <jas@extundo.com>
38187	  for reporting.
38188	* libmu_scm/Makefile.am (install-data-hook): Bugfix.
38189
381902003-01-17  Sergey Poznyakoff
38191
38192	* pop3d/extra.c (pop3d_readline): Bugfix: add terminating
38193	  zero, and check return value from gnutls_record_recv.
38194	* pop3d/pop3d.h (ERR_TLS_IO): New def.
38195
381962003-01-16  Sergey Poznyakoff
38197
38198	* mh/mh_getopt.c (mh_getopt): Bugfix
38199	* mh/mh.h (struct mh_whatnow_env): Added `draftfile' member.
38200	* mh/mh_whatnow.c: Reorganized. Implemented disposition
38201	  shell.
38202	* mh/repl.c: Handle draft file. Added --use option.
38203	* mh/README: Updated.
38204
382052003-01-16  Sergey Poznyakoff
38206
38207	* include/mailutils/mutil.h (mu_rfc2822_references)
38208	  (mu_rfc2822_in_reply_to): New functions.
38209	* mail/reply.c (concat,strip_message_id)
38210	  (get_msgid_header): Removed
38211	  (make_in_reply_to,make_references): Rewritten using new rfc2822
38212	  functions.
38213	* mailbox/mutil.c (mu_rfc2822_references)
38214          (mu_rfc2822_in_reply_to): New functions.
38215
38216	* mh/replcomps: New file. Default format for repl utility.
38217	* mh/Makefile.am: Added mhlibdir
38218
38219	* mh/mh_getopt.h (struct mh_option): Replaced `int key'
38220	  with `char *longopt'.
38221	  (mh_argv_preproc): New function.
38222	  (mh_optind,mh_optarg): Globals removed.
38223
38224	* mh/mh_argp.c (struct mh_argp_data): Moved to mh_getopt.h
38225	  (parse_opt,mh_argp_parse): Rewritten. Argument parsing goes
38226	  in two stages: first any old-style mh arguments are expanded
38227	  to corresponding GNU long options, then argp_parse is run
38228	  over the constructed argv array.
38229	* mh/mh_getopt.c (mh_getopt): Rewritten. The main purpose is
38230	  to expand old-style options to their double-dash equivalents.
38231	  (mh_argv_preproc): New function. Preprocess the argv array.
38232
38233	* mh/mh_fmtgram.y (want_arg): New lexical tie-in to correctly
38234	  process trailing whitespace in calls like %(putaddr To: ).
38235
38236	* mh/mh_format.c (builtin_in_reply_to, builtin_references):
38237	  New functions. Interfaces to rfc2822 functions.
38238
38239	* mh/mh.h (RCPT_DEFAULT): Default value for rcpt_mask
38240	* mh/mh_global.c: Initialize rcpt_mask with RCPT_DEFAULT.
38241	* mh/mh_init.c (mh_expand_name): Correctly handle full and
38242	  relative pathname specifications.
38243
38244	* mh/fmtcheck.c: Use new struct mh_option
38245	* mh/folder.c: Likewise.
38246	* mh/inc.c: Likewise.
38247	* mh/refile.c: Likewise.
38248	* mh/repl.c: Likewise.
38249	* mh/rmf.c: Likewise.
38250	* mh/scan.c: Likewise.
38251	* mh/whatnow.c: Likewise.
38252
38253	* mh/README: Updated.
38254	* mh/TODO: Updated.
38255
382562003-01-15  Wojciech Polak
38257
38258	* auth/tls.c: Fixed typo.
38259	* pop3d/pop3d.h (pop3d_init_tls_server): Added prototype.
38260	  (pop3d_deinit_tls_server): Likewise.
38261	* pop3d/pop3d.c: Fixed TLS cleanup.
38262
382632003-01-15  Sergey Poznyakoff
38264
38265	* m4/db2.m4: Fixed version reference in the comment.
38266	* mail/msgset.y: Added missing NLS markers.
38267	* mailbox/mutil.c: Fixed indentation.
38268
38269	* mh/mh_whatnow.c: New file.
38270	* mh/whatnow.c: New file. Source for whatnow utility.
38271	* mh/Makefile.am: Removed unnecessary _SOURCE declarations.
38272	  Added new files and targets.
38273	* mh/mh.h: Include argcv.h and getline.h
38274	  (struct mh_whatnow_env): New datatype.
38275	  (mh_spawnp, mh_whatnow): New functions.
38276
38277	* mh/mh_argp.c (mh_argp_parse): Fixed parsing order: global
38278	  profile arguments first, then the command line arguments.
38279	* mh/mh_format.c: Added missing NLS markers.
38280	  (builtin_concat,builtin_printstr): New functions.
38281	* mh/mh_init.c (mh_spawnp): New function.
38282	* mh/repl.c: Almost finished.
38283	* mh/mh_ctx.c: Shut compiler warnings.
38284	* mh/TODO: Updated.
38285	* mh/README: Updated.
38286	* mh/.cvsignore: Updated.
38287
38288	* po/POTFILES.in: Added missing files.
38289
382902003-01-14  Wojciech Polak
38291
38292	* auth/tls.c (mu_init_tls_libs): gnutls_global_init() returns
38293	  zero on success, so reverse this state for 'tls_available'
38294	  variable.
38295
382962003-01-14  Sergey Poznyakoff
38297
38298	* m4/db2.m4: New file. Version-specific stuff for Berkeley DB.
38299	* m4/tls.m4: Added copyleft header.
38300	* m4/Makefile.am: Added db2.m4
38301	* configure.ac: Check for newer version of Berkeley DB
38302	* lib/mu_dbm.c [WITH_BDB2] (mu_dbm_firstkey): db->cursor
38303	  takes three or four arguments, depending on the release
38304	  of DB 2. Take care of it.
38305	* auth/tls.c (mu_init_tls_server): Check return value from
38306	  gnutls_certificate_set_x509_key_file(). Use gnutls_strerror(),
38307	  instead of gnutls_perror(), as the latter confuses mail clients.
38308	  (mu_init_tls_libs): Removed useless initialization of the auto
38309	  variable.
38310
38311	* mail/mail.h (msgset_parse,util_get_message):
38312	  In order to get rid of superfluous 'Inappropriate message'
38313	  diagnostics and provide a behaviour consistent with that
38314	  of standard implementations, moved the flags argument
38315	  from util_get_message to msgset_parse.
38316	  (msgset_count): New function.
38317	  (util_isdeleted): Reverted to older declaration (before
38318	  2002-10-13).
38319
38320	* mail/msgset.y (msgset_parse): Take a new argument: flags
38321	  (meaning the same as in the util_get_message call).
38322	  (msgset_count): New function.
38323
38324	* mail/util.c (util_foreach_msg,util_range_msg): Updated
38325	  calls to msgset_parse.
38326	  (util_isdeleted): Reverted to older declaration.
38327
38328	* mail/copy.c: Updated calls to msgset_parse.
38329	* mail/decode.c: Likewise.
38330	* mail/delete.c: Likewise.
38331	* mail/eq.c: Likewise.
38332	* mail/followup.c: Likewise.
38333	* mail/from.c: Likewise.
38334	* mail/headers.c: Likewise.
38335	* mail/next.c: Likewise.
38336	* mail/pipe.c: Likewise.
38337	* mail/previous.c: Likewise.
38338	* mail/quit.c: Likewise.
38339	* mail/tag.c: Likewise.
38340	* mail/write.c: Likewise.
38341
383422003-01-14  Wojciech Polak
38343
38344	* pop3d/pop3d.h (ERR_TLS_ACTIVE, TLS_ACTIVE): New defines.
38345	* pop3d/pop3d.c: Added support for ERR_TLS_ACTIVE.
38346	* pop3d/stls.c: Likewise.
38347
38348	* doc/rfc/Makefile.am: Added rfc2595.txt
38349	* TODO: Updated.
38350
383512003-01-13  Wojciech Polak
38352
38353	* auth/tls.c: New file. Added main TLS/SSL code (via GnuTLS).
38354	* include/mailutils/tls.h: New file. TLS header file.
38355	* auth/Makefile.am: Updated.
38356	* include/mailutils/Makefile.am: Likewise.
38357
38358	* pop3d/pop3d.c: Added TLS support.
38359	* pop3d/pop3d.h: include <mailutils/tls.h>
38360	  (pop3d_stls): New prototype.
38361	* pop3d/stls.c: New file. The STLS command support.
38362	* pop3d/extra.c (pop3d_init_tls_server): New function.
38363	  (pop3d_deinit_tls_server): New function.
38364	  (pop3d_outf): Added TLS support (GnuTLS).
38365	  (pop3d_readline): Added TLS support (GnuTLS).
38366	* pop3d/capa.c (pop3d_capa): Added STLS.
38367	* pop3d/Makefile.am: Updated.
38368
38369	* m4/tls.m4: New file. Implements MU_CHECK_TLS defun.
38370	* m4/Makefile.am: Updated.
38371	* configure.ac: Added GnuTLS support (--with-gnutls).
38372
383732003-01-13  Sergey Poznyakoff
38374
38375	* m4/gssapi.m4: Fixed typo.
38376	* mh/mh.h (RCPT_NONE,RCPT_TO,RCPT_ME,RCPT_ALL): New defines.
38377	  (rcpt_mask): New global declaration.
38378	  (mh_get_message): Added missing __P().
38379	  (mh_decode_rcpt_flag): New function.
38380	* mh/mh_format.c (mh_decode_rcpt_flag,builtin_rcpt): New
38381	  functions.
38382	* mh/mh_global.c (rcpt_mask): New global. Keeps cumulative
38383	  value of all --cc/--nocc command line options.
38384	* mh/repl.c: Changed default format to use (rcpt) to decide
38385	  whether or not to include an address to the cc: header.
38386	  Implemented --cc/--nocc.
38387	* mh/README: New file. A list of differences from standard
38388	  MH implementation.
38389
383902003-01-12  Wojciech Polak
38391
38392	* auth/sql.c: Added missing NLS markers.
38393
383942003-01-12  Jordi Mallach  <jordi@gnu.org>
38395
38396	* mail/mail.c: Update year in copyright notice.
38397
383982003-01-12  Sergey Poznyakoff
38399
38400	* imap4d/fetch.c: Properly quote return strings.
38401	  In envelope responses emit a single NIL to represent
38402	  a non-existent envelope structures.
38403	  Thanks Nic Ferrier <nferrier@tapsellferrier.co.uk> for
38404	  reporting the bug.
38405	* imap4d/testsuite/imap4d/fetch.exp: Test new fetch responses.
38406	* imap4d/testsuite/imap4d/create.exp: Likewise.
38407
384082003-01-11  Sergey Poznyakoff
38409
38410	* mailbox/mbx_mh.c (mh_scan0): Do not actually read
38411	  contents of the message files, only register them in
38412	  the message pool.
38413	  Moved notification into a separate loop. This way
38414	  observable action receives notifications
38415	  in the proper order.
38416
38417	* mh/mh_format.c (builtin_unre): New function. Implements
38418	  extension format function 'unre': remove leading whitespace
38419	  and eventual 're:' prefix from the subject header line.
38420	* mh/mh.h (mh_expand_name): Changed declaration.
38421	* mh/mh_init.c: Likewise.
38422	* mh/mh_global.c: Changed calls to mh_expand_name.
38423	* mh/refile.c: Likewise.
38424	* mh/rmf.c: Likewise.
38425
38426	* mh/scan.c: When called without arguments do the work by
38427	  installing observable action. This speeds up execution
38428	  by the factor of three.
38429
38430	* mh/repl.c: Added --build option. Implemented --[no]draftfolder
38431	  --[no]query.
38432
384332003-01-10  Sergey Poznyakoff
38434
38435	* libmu_scm/Makefile.am (mailutils.scm target): Bugfix. Use $<
38436	  instead of $?.
38437	* libmu_scm/mailutils.scm.in: Explicitly load libmailbox before
38438	  loading libmu_scm. Fixed 1.6 branch of the conditional.
38439
384402003-01-10  Sergey Poznyakoff
38441
38442	* lib/posix/regex.h: Removed redefinition of __restrict_arr
38443	* libsieve/comparator.c (comp_false): Fixed declaration.
38444	  (sieve_match_part_checker): shut compiler warnings
38445	  about possibly uninitialized variables.
38446	* libsieve/sieve.h: include <string.h>
38447	* libsieve/tests.c (sieve_test_address,sieve_test_header): Removed
38448	  unused variables.
38449	* examples/.cvsignore: Added base64
38450
384512003-01-06  Sergey Poznyakoff
38452
38453	* doc/texinfo/libsieve.texi: Reflect recent changes to
38454	  libsieve.
38455	* pop3d/extra.c (pop3d_setio, pop3d_flush_output)
38456	  (pop3d_is_master): New functions.
38457	  (pop3d_readline): Fixed prototype: second arg should be size_t.
38458	* pop3d/pop3d.c (ifile,ofile): Removed globals.
38459	  (pop3d_mainloop): Changed declaration.
38460	* pop3d/pop3d.h (ifile,ofile): Removed declarations.
38461	  (getpwnam_ip_virtual,getpwnam_host_virtual): Removed
38462	  prototypes.
38463	  (pop3d_setio, pop3d_flush_output, pop3d_is_master): New
38464	  functions.
38465          (pop3d_readline): Fixed prototype.
38466	* pop3d/signal.c (pop3d_signal): Use pop3d_is_master().
38467	* pop3d/user.c (pop3d_user): Use pop3d_flush_output().
38468
384692003-01-06  Sergey Poznyakoff
38470
38471	* libsieve/tests.c
38472          (do_count): New function. A common handler for :count tag.
38473	  (retrieve_header): Use header_get_field_{name|value}, since
38474	  header_aget_value cannot return multiple header values.
38475	  (sieve_test_address,sieve_test_header,sieve_test_envelope):
38476	  Use do_count.
38477
38478	* sieve/testsuite/sieve/relational.exp: Enabled rel-header.sv
38479	  testcase.
38480
38481	* libsieve/require.c: Handle "relational" as a special case.
38482	* libsieve/sieve.h: Updated.
38483	* libsieve/sieve.l (multiline_strip_tabs): Forward declaration.
38484	* libsieve/util.c (sieve_tag_lookup): Check for taglist != NULL
38485	  before calling list_do().
38486
384872003-01-05  Sergey Poznyakoff
38488
38489	* doc/rfc/rfc3431.txt: New file.
38490	* doc/rfc/Makefile.am: Add rfc3431.txt
38491	* testsuite/spool/relational.mbox: Mailbox for testing relational
38492	  operations in sieve.
38493	* testsuite/spool/DISTFILES (relational.mbox): Added.
38494	* include/mailutils/libsieve.h (sieve_relcmp_t,sieve_relcmpn_t):
38495	  New types.
38496	  (sieve_register_comparator): Changed prototype.
38497	  (sieve_require_relational,sieve_str_to_relcmp)
38498	  (sieve_get_relcmp): New functions.
38499	* libsieve/relational.c: New file.
38500	* libsieve/Makefile.am: Added relational.c.
38501	* libsieve/comparator.c (sieve_register_comparator)
38502	  (_find_comparator,comp_false,sieve_match_part_checker):
38503	  Added support for relational tests.
38504	* libsieve/tests.c (sieve_test_address,sieve_test_header):
38505	  Likewise.
38506	* sieve/testsuite/scripts/rel-address.sv: New file.
38507	* sieve/testsuite/scripts/rel-hairy.sv: New file.
38508	* sieve/testsuite/scripts/rel-header.sv: New file.
38509	* sieve/testsuite/scripts/DISTFILES (rel-address.sv,rel-hairy.sv)
38510	  (rel-header.sv): New files
38511	* sieve/testsuite/sieve/relational.exp: New file.
38512	* sieve/testsuite/sieve/DISTFILES (relational.exp): Added
38513
38514	* mail/z.c (mail_z): Fixed scrolling.
38515	* po/POTFILES.in: Added libsieve/relational.c.
38516
385172003-01-03  Wojciech Polak
38518
38519	* pop3d/extra.c (pop3d_readline): Don't use `static char buffer[512]'.
38520	  Use also ifile directly instead of FILE *fp.
38521	* pop3d/pop3d.h (pop3d_readline): Changed prototype.
38522	* pop3d/pop3d.c: Use pop3d_readline(buffer, sizeof (buffer)).
38523	* pop3d/user.c: Likewise.
38524
385252003-01-02  Sergey Poznyakoff
38526
38527	* configure.ac: New ac_subst variable BUILD_MH_EXEC_HOOK
38528	* mh/Makefile.am: Enable install-exec-hook only if
38529	  BUILD_MH_EXEC_HOOK is set.
38530
385312003-01-01  Wojciech Polak
38532
38533	* COPYING: Removed.
38534
385352002-12-31  Jeff Bailey  <jbailey@gnu.org>
38536
38537	* auth/Makefile.am: Correct copyright year, add license
38538	information.
38539	* sieve/testsuite/Makefile.am: Likewise.
38540	* testsuite/Makefile.am: Likewise.
38541	* sieve/Makefile.am: Likewise.
38542	* scripts/guile-1.6/Makefile.am: Likewise.
38543	* scripts/guile-1.4/Makefile.am: Likewise.
38544	* scripts/Makefile.am: Likewise.
38545	* readmsg/testsuite/Makefile.am: Likewise.
38546	* readmsg/Makefile.am: Likewise.
38547	* mh/Makefile.am: Likewise.
38548	* messages/testsuite/Makefile.am: Likewise.
38549	* messages/Makefile.am: Likewise.
38550	* pop3d/testsuite/Makefile.am: Likewise.
38551	* pop3d/Makefile.am: Likewise.
38552	* mapi/Makefile.am: Likewise.
38553	* mail.remote/testsuite/Makefile.am: Likewise.
38554	* mail.remote/Makefile.am: Likewise.
38555	* mail.local/testsuite/Makefile.am: Likewise.
38556	* mail.local/Makefile.am: Likewise.
38557	* mailbox2/pop3/Makefile.am: Likewise.
38558	* mailbox2/mbox/Makefile.am: Likewise.
38559	* mailbox2/include/mailutils/sys/Makefile.am: Likewise.
38560	* mailbox2/include/mailutils/Makefile.am: Likewise.
38561	* mailbox2/include/Makefile.am: Likewise.
38562	* mailbox2/Makefile.am: Likewise.
38563	* mailbox/testsuite/Makefile.am: Likewise.
38564	* mailbox/include/Makefile.am: Likewise.
38565	* mailbox/Makefile.am: Likewise.
38566	* mail/testsuite/Makefile.am: Likewise.
38567	* mail/Makefile.am: Likewise.
38568	* m4/Makefile.am: Likewise.
38569	* libsieve/Makefile.am: Likewise.
38570	* libmu_scm/Makefile.am: Likewise.
38571	* lib/posix/Makefile.am: Likewise.
38572	* lib/Makefile.am: Likewise.
38573	* include/mailutils/gnu/Makefile.am: Likewise.
38574	* include/mailutils/Makefile.am: Likewise.
38575	* include/Makefile.am: Likewise.
38576	* imap4d/Makefile.am: Likewise.
38577	* imap4d/testsuite/Makefile.am: Likewise.
38578	* guimb/scm/Makefile.am: Likewise.
38579	* guimb/Makefile.am: Likewise.
38580	* from/testsuite/Makefile.am: Likewise.
38581	* from/Makefile.am: Likewise.
38582	* frm/testsuite/Makefile.am: Likewise.
38583	* examples/Makefile.am: Likewise.
38584	* frm/Makefile.am: Likewise.
38585	* dotlock/Makefile.am: Likewise.
38586	* doc/texinfo/Makefile.am: Likewise.
38587	* doc/rfc/Makefile.am: Likewise.
38588	* doc/man/Makefile.am: Likewise.
38589	* doc/Makefile.am: Likewise.
38590	* comsat/Makefile.am: Likewise.
38591	* Makefile.am: Likewise.
38592
38593	* configure.ac: Update FSF Address
38594
385952002-12-31  Wojciech Polak
38596
38597	* COPYING: New file.
38598	* mailutils.spec.in: Fixed.
38599
386002002-12-31  Sergey Poznyakoff
38601
38602	* include/mailutils/guile.h: New file. Interface declarations
38603	  for libmu_scm.h
38604	* include/mailutils/Makefile.am: Added guile.h.
38605	* libmu_scm/mu_scm.h: Include <mailutils/guile.h>
38606	* libmu_scm/mu_mime.c: Removed unneeded includes.
38607	* libmu_scm/mu_scm.c: Likewise.
38608	* libmu_scm/mu_util.c: Likewise.
38609
38610	* libmu_scm/mu_guimb.c: Include "mu_scm.h"
38611
38612	* guimb/Makefile.am: Removed -I$(top_srcdir)/libmu_scm
38613	* mail.local/Makefile.am: Likewise.
38614
38615	* mail.local/script.c: Include <mailutils/guile.h>
38616
38617	* mailbox/Makefile.am (mailutils_config_CFLAGS): Corrected
38618	  definition of AUTHLIBS.
38619
38620	* guimb/guimb.h: Added missing includes.
38621
38622	* include/mailutils/body.h: Use __PMT in nested declarations
38623	  for C++ compatibility.
38624	* include/mailutils/debug.h: Likewise.
38625	* include/mailutils/envelope.h: Likewise.
38626	* include/mailutils/error.h: Likewise.
38627	* include/mailutils/filter.h: Likewise.
38628	* include/mailutils/header.h: Likewise.
38629	* include/mailutils/message.h: Likewise.
38630	* include/mailutils/mutil.h: Likewise.
38631	* include/mailutils/observer.h: Likewise.
38632	* include/mailutils/registrar.h: Likewise.
38633	* include/mailutils/stream.h: Likewise.
38634	* include/mailutils/attribute.h: Likewise.
38635	* include/mailutils/auth.h: Likewise.
38636
38637	* include/mailutils/argp.h: Enclosed declarations in extern "C"
38638	  block.
38639
386402002-12-29  Wojciech Polak
38641
38642	* mail/mail.c: Updated FSF address.
38643	* mailbox/mu_argp.c: Likewise.
38644	* mh/mh_argp.c: Likewise.
38645
386462002-12-29  Wojciech Polak
38647
38648	* Makefile.am: Added "dist-bzip2" to AUTOMAKE_OPTIONS.
38649
386502002-12-29  Sergey Poznyakoff
38651
38652	* mail/mail.c (realcursor): Removed. The position of the point
38653	  is kept in the cursor variable.
38654	* mail/util.c (util_msglist_command, util_msglist_esccmd): Removed.
38655	  (util_foreach_msg,util_range_msg): New functions. Iterate across
38656	  message set or range calling given function for each message.
38657
38658	* mail/mail.h (util_msglist_command, util_msglist_esccmd): Removed.
38659	  (realcursor): Removed.
38660	  (util_foreach_msg,util_range_msg): New functions.
38661
38662	* mail/delete.c: Rewritten using new iterator functions.
38663	* mail/dp.c: Likewise.
38664	* mail/edit.c: Likewise.
38665	* mail/eq.c: Likewise.
38666	* mail/file.c: Likewise.
38667	* mail/followup.c: Likewise.
38668	* mail/from.c: Likewise.
38669	* mail/headers.c: Likewise.
38670	* mail/hold.c: Likewise.
38671	* mail/mbox.c: Likewise.
38672	* mail/msgset.y: Likewise.
38673	* mail/next.c: Likewise.
38674	* mail/previous.c: Likewise.
38675	* mail/print.c: Likewise.
38676	* mail/reply.c: Likewise.
38677	* mail/size.c: Likewise.
38678	* mail/summary.c: Likewise.
38679	* mail/top.c: Likewise.
38680	* mail/undelete.c: Likewise.
38681	* mail/var.c: Likewise.
38682	* mail/visual.c: Likewise.
38683	* mail/write.c: Likewise.
38684	* mail/z.c: Likewise.
38685
386862002-12-29  Wojciech Polak
38687
38688	* auth/*: Fixed C source copyrights to be compatible with the
38689          GNU 'Maintaining' document, i.e. "This program" -> "GNU Mailutils".
38690	* cmc/*: Likewise.
38691	* examples/*: Likewise.
38692	* imap4d/*: Likewise.
38693	* include/mailutils/*: Likewise.
38694	* libmu_scm/*: Likewise.
38695	* libsieve/*: Likewise.
38696	* mailbox/*: Likewise.
38697	* mailbox2/*: Likewise.
38698	* mapi/*: Likewise.
38699	* mh/*: Likewise.
38700	* pop3d/*: Likewise.
38701
38702	* po/POTFILES.in: Added missing mail/msgset.y.
38703
387042002-12-29  Sergey Poznyakoff
38705
38706	* mail/util.c: Removed unneeded global env_cursor.
38707	* mailbox/mailutils-config.c: Reflect addition
38708	  of NLS libraries.
38709
387102002-12-28  Sergey Poznyakoff
38711
38712	* dotlock/dotlock.c: Reverted today's changes. Failed experiment.
38713	* mail.remote/mail.remote.c: Likewise.
38714	* mail.local/main.c: Added call to mu_init_nls.
38715
38716	* sieve/testsuite/Redirect: Reflect changes to libsieve/actions.c.
38717
387182002-12-28  Sergey Poznyakoff
38719
38720	* doc/texinfo/Makefile.am: Added fdl.texi
38721
38722	* include/mailutils/stream.h: New flag MU_STREAM_ALLOW_LINKS:
38723	  allow links on a file. Needed for MH.
38724	* mailbox/file_stream.c: Handle MU_STREAM_ALLOW_LINKS.
38725	* mailbox/mbx_mh.c: Create message stream with
38726	  MU_STREAM_ALLOW_LINKS bit set.
38727
38728	* libsieve/actions.c: Use X-Loop-Prevention header instead
38729	  of X-Sender.
38730
38731	* mail/followup.c: Bugfix: do not translate header names
38732	* mail/from.c: Bugfix: date field has always fixed length.
38733	* mailbox/argp-help.c: include mailutils/nls.h. Otherwise
38734	  i18n is disabled.
38735
387362002-12-28  Wojciech Polak
38737
38738	* doc/texinfo/mailutils.texi: Fixed copyright (FDL).
38739	* doc/texinfo/fdl.texi: New file.
38740
387412002-12-28  Sergey Poznyakoff
38742
38743	* dotlock/dotlock.c: Exclude '\v' from xgettext markers.
38744	* mail.local/main.c: Likewise.
38745	* mail.remote/mail.remote.c: Likewise.
38746
387472002-12-27  Wojciech Polak
38748
38749	* doc/texinfo/mailutils.texi: Use @copying.
38750	* doc/texinfo/programs.texi: Minor formatting.
38751
387522002-12-27  Sergey Poznyakoff
38753
38754	* auth/Makefile.am: Added NLS support.
38755	* auth/pam.c: Likewise.
38756	* auth/sql.c: Likewise.
38757	* auth/virtual.c: Likewise.
38758
38759	* mail/reply.c: The To: and Cc: needn't be translated.
38760
38761	* dotlock/dotlock.c: Added missing N_() markers.
38762	* frm/frm.c: Likewise.
38763	* guimb/main.c: Likewise.
38764	* imap4d/imap4d.c: Likewise.
38765	* libsieve/argp.c: Likewise.
38766	* mail/mail.c: Likewise.
38767	* mail.local/main.c: Likewise.
38768	* mail.remote/mail.remote.c: Likewise.
38769	* mailbox/mu_argp.c: Likewise.
38770	* mailbox/mu_auth.c: Likewise.
38771	* mh/fmtcheck.c: Likewise.
38772	* mh/folder.c: Likewise.
38773	* mh/inc.c: Likewise.
38774	* mh/mhpath.c: Likewise.
38775	* mh/refile.c: Likewise.
38776	* mh/repl.c: Likewise.
38777	* mh/rmf.c: Likewise.
38778	* mh/rmm.c: Likewise.
38779	* mh/scan.c: Likewise.
38780	* readmsg/readmsg.c: Likewise.
38781	* sieve/sieve.c: Likewise.
38782	* pop3d/popauth.c: Likewise.
38783	* comsat/comsat.c: Likewise.
38784
38785	* po/POTFILES.in: Updated
38786
387872002-12-27  Jordi Mallach  <jordi@gnu.org>
38788
38789	* mh/inc.c: Fixed typo.
38790	* mh/repl.c: Likewise.
38791
387922002-12-27  Sergey Poznyakoff
38793
38794	* configure.ac: Set version number to 0.2.1.
38795
38796	* mail/mail.c: Removed startup banner.
38797	  Bugfix: --quit option was handled incorrectly
38798	* doc/texinfo/programs.texi: Removed references to `set quiet'
38799
38800	* mail/quit.c: Use ngettext
38801	* mail/summary.c: Likewise.
38802	* frm/frm.c: Likewise.
38803	* mail/testsuite/mail/folder.exp: Reflect recent changes in
38804          the handling of plurals.
38805	* mail/testsuite/mail/write.exp: Likewise.
38806
38807	* mail.remote/Makefile.am: Added @INTLINCS@ and @LTLIBINTL@
38808
38809	* AUTHORS: Added Wojciech Polak.
38810
388112002-12-27  Wojciech Polak
38812
38813	* mail/summary.c: Small NLS improvement.
38814	* mail/quit.c: Likewise.
38815	* frm/frm.c: Likewise.
38816
388172002-12-26  Wojciech Polak
38818
38819	* po/POTFILES.in: Updated.
38820	* dotlock/dotlock.c: Added NLS.
38821	* from/from.c: Likewise.
38822	* mail.remote/mail.remote.c: Likewise.
38823	* mh/fmtcheck.c: Likewise.
38824	* mh/folder.c: Likewise.
38825	* mh/inc.c: Likewise.
38826	* mh/mh_argp.c: Likewise.
38827	* mh/mh_ctx.c: Likewise.
38828	* mh/fmtgram.y: Likewise.
38829	* mh/mh_getopt.c: Likewise.
38830	* mh/mh_init.c: Likewise.
38831	* mh/mh_msgset.c: Likewise.
38832	* mh/mhpath.c: Likewise.
38833	* mh/refile.c: Likewise.
38834	* mh/repl.c: Likewise.
38835	* mh/rmf.c: Likewise.
38836	* mh/rmm.c: Likewise.
38837	* mh/scan.c: Likewise.
38838
388392002-12-26  Wojciech Polak
38840
38841	* po/POTFILES.in: Updated.
38842	* sieve/sieve.c: Enabled NLS.
38843	* doc/texinfo/mailutils.texi: Small improvement.
38844	* COPYING.FDL: The Free Documentation License has been
38845	  upgraded from 1.1 to 1.2.
38846
388472002-12-25  Wojciech Polak
38848
38849	* po/POTFILES.in: Updated.
38850	* mailbox/mu_argp.c: Added NLS.
38851	* mailbox/muerrno.c: Likewise.
38852	* mailbox/message.c: Likewise.
38853	* libsieve/*: Likewise.
38854
388552002-12-25  Sergey Poznyakoff
38856
38857	* comsat/action.c: Do not include \r\n to the i18n strings.
38858	* pop3d/popauth.c: Fixed typo in docstring.
38859
38860	Thanks to Jordi Mallach for both.
38861
388622002-12-25  Sergey Poznyakoff
38863
38864	* imap4d/fetch.c (fetch_internaldate) Do not use %X in strftime
38865	  format: it produces locale-dependent output.
38866	* mh/mh_format.c (mh_format): Fixed format spec.
38867
388682002-12-24  Wojciech Polak
38869
38870	* po/POTFILES.in: Updated.
38871	* po/.cvsignore: Removed Makevars.
38872	* mail.local/*: Added NLS.
38873	* mailbox/Makefile.am: Removed "-I${top_srcdir}/intl" from INCLUDES
38874	  due to @INTLINCS@.
38875
388762002-12-24  Sergey Poznyakoff
38877
38878	* doc/texinfo/Makefile.am: Fixed referencing /scripts/missing
38879	  program.
38880	* po/.cvsignore: Removed LINGUAS.
38881
388822002-12-24  Sergey Poznyakoff
38883
38884	* configure.ac: Specify use-libtool to AM_GNU_GETTEXT.
38885	  Define WITH_INCLUDED_LIBINTL and INTLINCS if we are using
38886	  the included gettext.
38887
38888	* include/mailutils/nls.h: When using included libintl, use
38889	  only intl/libgnuintl.h. Using system default libintl.h
38890	  on systems with older libintls causes random coredumps.
38891
38892	* mailbox/mu_argp.c (mu_conf_option): Added WITH_INCLUDED_LIBINTL.
38893	* libsieve/sieve.l: Documented the grammar.
38894
38895	* po/.cvsignore: New file
38896	* .cvsignore: Updated.
38897	* m4/.cvsignore: Ignore gettext's m4 files.
38898	* m4/Makefile.am: Include gettext's m4 into the distribution.
38899	* scripts/.cvsignore: Ignore autogenerated files.
38900
38901	* auth/Makefile.am: Added @INTLINCS@ and @LTLIBINTL@ where
38902	  appropriate.
38903	* comsat/Makefile.am: Likewise.
38904	* dotlock/Makefile.am: Likewise.
38905	* examples/Makefile.am: Likewise.
38906	* frm/Makefile.am: Likewise.
38907	* from/Makefile.am: Likewise.
38908	* guimb/Makefile.am: Likewise.
38909	* imap4d/Makefile.am: Likewise.
38910	* libmu_scm/Makefile.am: Likewise.
38911	* libsieve/Makefile.am: Likewise.
38912	* mail/Makefile.am: Likewise.
38913	* mail.local/Makefile.am: Likewise.
38914	* mailbox/Makefile.am: Likewise.
38915	* messages/Makefile.am: Likewise.
38916	* mh/Makefile.am: Likewise.
38917	* pop3d/Makefile.am: Likewise.
38918	* readmsg/Makefile.am: Likewise.
38919	* sieve/Makefile.am: Likewise.
38920
389212002-12-24  Wojciech Polak
38922
38923	* po/POTFILES.in: Updated.
38924	* imap4d/*: Added NLS.
38925	* guimb/*: Likewise.
38926	* sieve/sieve.c: Likewise.
38927
389282002-12-23  Wojciech Polak <polak@gnu.org>
38929
38930	* po/: New directory.
38931	* po/Makevars: New file.
38932	* po/POTFILES.in: Likewise.
38933	* po/LINGUAS: Likewise.
38934	* po/ChangeLog: Likewise.
38935	* mailbox/nls.c: New file. NLS main code.
38936	* mailbox/Makefile.am: Updated.
38937	* include/mailutils/nls.h: New file. NLS main header file.
38938	* include/mailutils/Makefile.am: Updated.
38939	* configure.ac: Added NLS support, added AC_CONFIG_AUX_DIR([scripts]).
38940	* Makefile.am: Added 'intl po' to SUBDIRS.
38941	* mail/*: Added NLS support.
38942	* messages/*: Likewise.
38943	* readmsg/*: Likewise.
38944	* comsat/*: Likewise.
38945	* pop3d/*: Likewise.
38946	* frm/*: Likewise.
38947
38948	* mail/delete.c: Fixed. MSG_NODELETED.
38949
389502002-12-22  Jeff Bailey <jbailey@nisa.net>
38951
38952	* mailbox/mbx_maildir.c: Initial checking of template
38953
38954	* mailbox/Makefile.am: (libmailbox_la_SOURCES) Add mbx_maildir.c
38955
389562002-12-20  Sergey Poznyakoff
38957
38958	* libsieve/sieve.l: Implemented shell-like extension for
38959	  multiline strings. They can start now with text:[-][delimiter],
38960	  the dash meaning 'strip leading tabs', the 'delimiter'
38961	  overriding default end-of-text delimiter (.)
38962	* doc/texinfo/libsieve.texi: Documented text:[-][delimiter]
38963	  extension.
38964	* TODO: Updated
38965
389662002-12-16  Sergey Poznyakoff
38967
38968	* doc/texinfo/Makefile.am: Added trailing slash to the default
38969	  BASE_URL
38970	* doc/texinfo/libmu_scm.texi: Fixed use of @deffn
38971	* doc/texinfo/libmuauth.texi: Likewise.
38972	* doc/texinfo/libsieve.texi: Likewise.
38973
38974	The sources are tagged "rel_0_2".
38975
389762002-12-15  Sergey Poznyakoff
38977
38978	* configure.ac: Raised version number to 0.2
38979	* doc/texinfo/libmuauth.texi: Spell check.
38980	* doc/texinfo/libsieve.texi: Likewise.
38981	* TODO: Updated.
38982
389832002-12-14  Sergey Poznyakoff
38984
38985	* mail/previous.c: Skip deleted messages
38986	* mail/next: Likewise.
38987
38988	* auth/sql.c (mu_auth_sql_by_uid): Fixed typo.
38989
38990	* include/mailutils/libsieve.h: Changed type of `number'
38991	  to size_t.
38992	* libsieve/sieve.y (union): Likewise
38993	* include/mailutils/mu_auth.h: Removed duplicate declaration
38994	  of mu_auth_data_free.
38995	* libsieve/actions.c (build_mime): To improve readability,
38996	  output additional newline before reporting the reason.
38997	* libsieve/sieve.l: Allow backslashes in quoted strings.
38998	* sieve/testsuite/Reject: Updated
38999
39000	* doc/texinfo/libmu_scm.texi: New file. Documents libmu_scm
39001	  library.
39002	* doc/texinfo/Makefile.am: Added libmu_scm.texi
39003	* doc/texinfo/libmuauth.texi: Updated
39004	* doc/texinfo/libsieve.texi: Updated
39005	* doc/texinfo/mailutils.texi: Updated
39006	* doc/texinfo/programs.texi: Updated
39007	* doc/texinfo/imap4.texi: Updated
39008	* doc/texinfo/mailer.texi: Updated
39009
39010	* TODO: Updated
39011	* mh/TODO: New file
39012	* NEWS: Updated
39013
390142002-12-13  Sergey Poznyakoff
39015
39016	* mail.local/mail.local.h: Create temporary mailbox instead of
39017	  the temporary message, to avoid problems when running sieve
39018	  fileinto.
39019	* mail.local/main.c: Likewise.
39020	* mail.local/script.c: Likewise.
39021	* doc/texinfo/Makefile.am: Added rules for generating
39022	  web documentation.
39023	* doc/texinfo/index.html.in: New file. Template for generating
39024	  web documentation index page.
39025	* doc/texinfo/framework.texi: Updated.
39026	* doc/texinfo/libsieve.texi: Likewise.
39027	* doc/texinfo/mailutils.texi: Likewise.
39028	* doc/texinfo/programs.texi: Likewise.
39029
390302002-12-12  Sergey Poznyakoff
39031
39032	* mail.local/main.c (_sieve_action_log): Use vasprintf.
39033	* libsieve/sieve.l: Allow #include within a :text block
39034	* mh/inc.c: Use mu_errstring instead of strerror.
39035	* mh/mh_init.c (mh_open_folder): Changed default open
39036	  flags to MU_STREAM_RDWR.
39037
390382002-12-11  Sergey Poznyakoff
39039
39040	* examples/numaddr.c: Fixed malformed comment.
39041	* doc/texinfo/libsieve.texi: Updated.
39042
390432002-12-11  Sergey Poznyakoff
39044
39045	* configure.ac: Added --enable-experimental option to enable
39046	  building of experimental/unfinished utilities. Currently it
39047	  controls mh utils.
39048	* README: Document --enable-experimental option.
39049	* examples/addr.c: Include string.h. Add typecasts to the
39050	  arguments of printf-like functions where necessary.
39051	* examples/base64.c: Likewise.
39052	* examples/mimetest.c: Add typecasts to the
39053	  arguments of printf-like functions where necessary.
39054	* examples/mta.c: Likewise.
39055	* mail/var.c: Likewise.
39056	* mailbox/folder_imap.c: Likewise.
39057	* mailbox/mbx_imap.c: Likewise.
39058	* mailbox/mbx_mbox.c: Likewise.
39059	* mailbox/mbx_mh.c: Likewise.
39060	* mh/mh_global.c: Likewise.
39061
39062	* mh/mh_format.c (struct mh_machine): Changed type of arg_num to
39063	  long.
39064
39065	* imap4d/imap4d.c: Cast third argument to accept to
39066          socklen_t*. Add typecasts to the arguments of printf-like
39067	  functions where necessary.
39068	* pop3d/pop3d.c: Likewise.
39069	* lib/mu_dbm.c: Include xalloc.h
39070	* sieve/sieve.c: Include mu_asprintf.h
39071
39072	* examples/numaddr.c: Added extensive comments.
39073	* doc/texinfo/libsieve.texi: Updated.
39074	* doc/texinfo/programs.texi: Updated.
39075
390762002-12-10  Sergey Poznyakoff
39077
39078	* mailbox/filter_trans.c (qp_decode): Bugfix: extend chr to
39079	  accommodate three characters and terminate it with zero.
39080	* libsieve/comparator.c (i_octet_regex): Removed misleading
39081	  comment.
39082	* mail/mail.h: Include mu_asprintf.h
39083
39084	* TODO: Updated
39085	* doc/texinfo/libsieve.texi: Likewise.
39086
390872002-12-10  Sergey Poznyakoff
39088
39089	* configure.ac: Define and export SIEVE_MODDIR.
39090	* examples/Makefile.am: Use SIEVE_MODDIR.
39091	* libsieve/Makefile.am: Likewise.
39092
39093	* libsieve/actions.c (sieve_register_standard_actions):
39094	  Register "fileinto" in non-required state to comply to the
39095	  RFC.
39096	* libsieve/argp.c (sieve_argp_parser): Always add SIEVE_MODDIR
39097	  to sieve_library_path.
39098
39099	* doc/texinfo/libsieve.texi: Documented some aspects of the`
39100	  input language.
39101	* doc/texinfo/programs.texi: Documented :sieve option group
39102
39103	* examples/addr.c: Include mutil.h
39104	* guimb/guimb.h: Include mu_asprintf.h
39105	* mail/mail.h: Likewise.
39106	* imap4d/append.c: Removed debugging hook
39107	* imap4d/auth_gss.c: Added typecasts to shut the compiler
39108	  warnings.
39109	* libmu_scm/mu_body.c: Likewise.
39110	* libmu_scm/mu_message.c: Likewise.
39111	* mailbox/locker.c: Likewise.
39112	* imap4d/util.c: Initialize automatic variable.
39113	* libsieve/tests.c: Likewise.
39114	* mail/util.c: Likewise.
39115	* mailbox/adxodress.c: Likewise.
39116	* mailbox/file_stream.c: Likewise.
39117
39118	* mailbox/date.c: Added missing includes
39119	* mailbox/tcp.c: Removed unused variables.
39120
39121	* imap4d/search.c (_scan_body): Bugfix. Add null terminator to
39122	  the string read.
39123	* imap4d/testsuite/imap4d/search.exp: Fixed `wine' testcase.
39124	  Fixed `SELECT INBOX' testcase.
39125
391262002-12-10  Sergey Poznyakoff
39127
39128	* include/mailutils/libsieve.h
39129	  (sieve_include_path,sieve_library_path): New globals
39130	* libmu_scm/Makefile.am: Fixed install-data-hook. Thanks to
39131	  Jordi Mallach.
39132	* libsieve/argp.c: New file. Sieve-specific command line handling.
39133	* libsieve/Makefile.am: Added argp.c
39134	* libsieve/load.c (sieve_load_add_path,sieve_load_add_dir): New
39135	  functions.
39136	* libsieve/sieve.h: Likewise.
39137	* libsieve/sieve.l: New extension statement #searchpath controls
39138	  the search path for dynamically loaded extensions.
39139	* mail.local/main.c (argp_capa): Added "sieve" capability.
39140	  (main): Invoke mu_sieve_argp_init().
39141	* sieve/sieve.c: Likewise.
39142	* sieve/testsuite/sieve/ext.exp: Use -L option instead of setting
39143	  environment variable.
39144	* mailbox/mu_argp.c (mu_license_argp_option): Removed short
39145	  option 'L', it is used by sieve argp stuff.
39146
391472002-12-09  Sergey Poznyakoff
39148
39149	* libsieve/actions.c (build_mime,sieve_action_redirect): free
39150	  return from mu_get_user_email().
39151	* libsieve/sieve.y (statement production): Gross bugfix: do not
39152	  run sieve_slist_destroy on the list, just list_destroy. All the
39153	  items are already registered in the memory pool and will be
39154	  freed by sieve_machine_destroy.
39155	* libsieve/tests.c (_get_address_part): Bugfix: assign to *data
39156	  only if ret is not null.
39157	* libsieve/util.c (_comp_action): Do not run comparator if the
39158	  sample is NULL.
39159	* mail.local/main.c (sieve_test): Bugfix: run
39160	  sieve_machine_destroy() only if the compilation succeeded.
39161	  (deliver): Removed unused variable sb. Use isize instead.
39162
39163	* mailbox/mutil.c (mu_get_user_email): Added comment.
39164
391652002-12-05  Sergey Poznyakoff
39166
39167	* lib/Makefile.am (INCLUDES): Fixed path.
39168	* configure.ac: Check for libltdl only if enable_shared
39169	  is set.
39170
39171	* examples/mta.c: Do not use asprintf.
39172
39173	* lib/pin.c: It is needed by argp stuff. Moved to ...
39174	* mailbox/pin.c: ... here
39175	* lib/Makefile.am: Moved pin.c from lib to mailbox
39176	* mailbox/Makefile.am: Likewise.
39177
39178	* comsat/comsat.h: Removed unneeded inclusion of getopt.h
39179	* frm/frm.c: Likewise.
39180	* imap4d/imap4d.h: Likewise.
39181	* pop3d/pop3d.h: Likewise.
39182	* mail.local/mail.local.h: Likewise.
39183	* mh/mh_getopt.c: Likewise.
39184	* readmsg/readmsg.h: Likewise.
39185
39186	* imap4d/fetch.c (fetch_internaldate): Added typecast to shut up
39187	  the compiler warning.
39188	* mailbox/mbx_default.c (get_homedir): Returned value is not
39189	  const.
39190
391912002-12-05  Sergey Poznyakoff
39192
39193	* configure.ac: Check for presence of getopt.h
39194	* examples/mta.c: Do not use program_invocation_short_name:
39195	  examples are not linked against libmailutils.
39196	* frm/testsuite/frm/test.exp: Override FOLDER environment
39197	  variable.
39198	* from/testsuite/from/test.exp: Likewise.
39199	* messages/testsuite/messages/test.exp: Likewise.
39200	* readmsg/testsuite/readmsg/test.exp: Likewise.
39201	* sieve/testsuite/lib/sieve.exp: Likewise.
39202
39203	* guimb/scm/Makefile.am: Use $? instead of $< in explicit rules.
39204	* libmu_scm/Makefile.am: Likewise.
39205
39206	* lib/getopt.h: Moved to ...
39207	* include/mailutils/gnu/getopt.h: ... here.
39208	* include/mailutils/gnu/Makefile.am: getopt.h moved from lib to
39209	  include/mailutils/gnu
39210	* lib/Makefile.am: Likewise.
39211	* include/mailutils/gnu/argp.h: Include local copy of getopt.h if
39212	  the system does not provide one.
39213
39214	* mailbox/Makefile.am (mailutils_config_LDADD): Added
39215	  libmailutils.la
39216	* mailbox/mailutils-config.c (main): Do not print duplicate
39217	  --link arguments.
39218
392192002-12-04  Sergey Poznyakoff
39220
39221	* include/mailutils/argp.h (mu_print_options, mu_check_option):
39222	  New functions.
39223	* mailbox/mu_argp.c: Likewise.
39224	* mailbox/mailutils-config.c: Added --info option (prints and
39225	  tests for the values of compilation options). Improved help
39226	  output.
39227	* doc/texinfo/programs.texi: Documented mailutils-config.
39228
392292002-12-04  Sergey Poznyakoff
39230
39231	* TODO: Updated
39232	* configure.ac: Add mysql libraries to MYSQLLIBS
39233	* mailbox/Makefile.am: New target mailutils-config
39234	* mailbox/mailutils-config.c: New file. A utility
39235	  program that prints compiler and loader flags
39236	  necessary to build a program using mailutils
39237	  libraries.
39238
392392002-12-03  Sergey Poznyakoff
39240
39241	* libsieve/actions.c (sieve_action_reject): Fixed diagnostic
39242	  messages.
39243	* m4/gssapi.m4: Bugfix: Properly restore LIBS, LDFLAGS and CFLAGS.
39244
392452002-12-02  Frederic Gobry  <frederic.gobry@smartdata.ch>
39246
39247	* mailbox/mime.c (_mime_body_read): reset the part offset when
39248	resetting the message.
39249
392502002-11-29  Sergey Poznyakoff
39251
39252	* mailbox/date.c: New version of mu_tm2time function.
39253	  The previous version of mu_tm2time incorrectly handled dates within
39254	  the DST period.
39255	* mailbox/mutil.c: Moved time functions to date.c
39256	* mailbox/Makefile.am: Added date.c
39257	* imap4d/fetch.c (fetch_internaldate): Use
39258	  mu_parse_ctime_date_time.
39259	* imap4d/testsuite/imap4d/fetch.exp: Fixed wrong dates.
39260
39261	* NEWS: Updated.
39262	* doc/texinfo/libsieve.texi: Updated.
39263
39264	* libsieve/actions.c (sieve_action_keep): Remove the delete
39265	  mark from the message.
39266	* guimb/scm/sieve-core.scm (action-keep): Likewise.
39267	* libsieve/sieve.y (sieve_machine_init): Fixed inconsistent return
39268	  value.
39269
39270	* auth/Makefile.am: Removed traces of ansi2knr.c
39271	* comsat/Makefile.am: Likewise.
39272	* dotlock/Makefile.am: Likewise.
39273	* frm/Makefile.am: Likewise.
39274	* from/Makefile.am: Likewise.
39275	* guimb/Makefile.am: Likewise.
39276	* imap4d/Makefile.am: Likewise.
39277	* libmu_scm/Makefile.am: Likewise.
39278	* mail/Makefile.am: Likewise.
39279	* mail.local/Makefile.am: Likewise.
39280	* mail.remote/Makefile.am: Likewise.
39281	* mapi/Makefile.am: Likewise.
39282	* messages/Makefile.am: Likewise.
39283	* pop3d/Makefile.am: Likewise.
39284	* readmsg/Makefile.am: Likewise.
39285
392862002-11-29  Sergey Poznyakoff
39287
39288	* mailbox/file_stream.c (_stdin_file_read): Test for eof
39289	  condition.
39290
39291	* examples/base64.c: New file. Sample base64 encoder-decoder.
39292	* examples/Makefile.am: Added base64
39293	* mailbox/testsuite/Encode: New file. Data for base64 test.
39294	* mailbox/testsuite/Decode: Likewise.
39295	* mailbox/testsuite/Makefile.am: Added Encode, Decode.
39296	* mailbox/testsuite/mailbox/base64.exp: New file. Testcase for
39297	  base64 filters.
39298	* mailbox/testsuite/mailbox/DISTFILES: Added base64.exp
39299	* testsuite/lib/mailutils.exp (mu_test_file): Fixed comment.
39300
393012002-11-28  Frederic Gobry  <frederic.gobry@smartdata.ch>
39302
39303	* mailbox/filter_trans.c (qp_encode): fixed quoted-printable
39304	encoding.
39305
39306	* mailbox/mime.c (_mime_set_content_type): when a MIME message has
39307	only one part, set the Content-transfer-encoding of the message to
39308	be the one of the part.
39309
393102002-11-27  Frederic Gobry  <frederic.gobry@smartdata.ch>
39311
39312	* mailbox/filter_trans.c (trans_read): applied patch from Sergey
39313	Poznyakoff, so that filters don't forget the last bytes of a
39314	file. Fixed an uninitialized variable problem.
39315
39316	* libsieve/load.c: fixed compilation when HAVE_LIBLTDL is not
39317	defined.
39318
393192002-11-25  Sergey Poznyakoff
39320
39321	* doc/texinfo/Makefile.am: Fake configure into including
39322	  srcdir to VPATH.
39323	* include/mailutils/libsieve.h (sieve_malloc,sieve_mstrdup)
39324	  (sieve_mrealloc,sieve_mfree): New functions.
39325	* libsieve/util.c: Likewise.
39326	* libsieve/comparator.c: Use sieve_m.* memory allocation
39327	  functions.
39328	* libsieve/prog.c: Likewise.
39329	* libsieve/sieve.l: Likewise.
39330	* libsieve/sieve.y: Likewise.
39331
39332	* doc/texinfo/libsieve.texi: Updated
39333
393342002-11-25  Frederic Gobry  <frederic.gobry@smartdata.ch>
39335
39336	* mailbox/address.c (address_concatenate): cleanup the address
39337	cache during concatenation.
39338
393392002-11-25  Sergey Poznyakoff
39340
39341	* mail.local/main.c (deliver): Bugfix: n and isize were not
39342	  declared.
39343	* sieve/sieve.c (options): Fixed spelling in the help line.
39344	* libsieve/load.c: Removed debugging hacks. Always call lt_dlinit
39345	  and add a call to lt_dlexit to the destructor.
39346	* examples/Makefile.am: Pointed moddir to more appropriate
39347	  place.
39348	* mail/z.c: Bugfix. Use mail_from0(), not mail_from().
39349
39350	* doc/texinfo/libmuauth.texi: New file. A placeholder for
39351	  documentation regarding libmuauth.
39352	* doc/texinfo/libsieve.texi: New file. Documentation for the
39353	  sieve library.
39354	* doc/texinfo/Makefile.am: Replaced explicit rules to generate
39355	  *.c.texi files with an implicit rule generating *.inc files.
39356	  The rule itself is modified to preserve the heading comment.
39357	  Added libmuauth.texi and libsieve.texi to sources.
39358
39359	* doc/texinfo/.cvsignore: Added *.inc
39360
39361	* doc/texinfo/programs.texi: Documented new version of sieve (not
39362	  fully, still...)
39363	* doc/texinfo/mailutils.texi: Added references to libmuauth and
39364	  libsieve.
39365
39366	* doc/texinfo/framework.texi: Include *.inc files instead of
39367	  *.c.texi. Added standard GNU copyright header.
39368	* doc/texinfo/address.texi: Likewise.
39369	* doc/texinfo/attribute.texi: Likewise.
39370	* doc/texinfo/auth.texi: Likewise.
39371	* doc/texinfo/body.texi: Likewise.
39372	* doc/texinfo/c-api.texi: Likewise.
39373	* doc/texinfo/encoding.texi: Likewise.
39374	* doc/texinfo/envelope.texi: Likewise.
39375	* doc/texinfo/folder.texi: Likewise.
39376	* doc/texinfo/headers.texi: Likewise.
39377	* doc/texinfo/imap4.texi: Likewise.
39378	* doc/texinfo/iterator.texi: Likewise.
39379	* doc/texinfo/locker.texi: Likewise.
39380	* doc/texinfo/mailbox.texi: Likewise.
39381	* doc/texinfo/maildir.texi: Likewise.
39382	* doc/texinfo/mailer.texi: Likewise.
39383	* doc/texinfo/mbox.texi: Likewise.
39384	* doc/texinfo/message.texi: Likewise.
39385	* doc/texinfo/mh.texi: Likewise.
39386	* doc/texinfo/mime.texi: Likewise.
39387	* doc/texinfo/nntp.texi: Likewise.
39388	* doc/texinfo/parse822.texi: Likewise.
39389	* doc/texinfo/pop3.texi: Likewise.
39390	* doc/texinfo/sendmail.texi: Likewise.
39391	* doc/texinfo/smtp.texi: Likewise.
39392	* doc/texinfo/stream.texi: Likewise.
39393	* doc/texinfo/url.texi: Likewise.
39394
393952002-11-22  Sergey Poznyakoff
39396
39397	* configure.ac: Added check for installed libltdl. Bumped
39398	  version number to 0.1.3.
39399	* mailbox/mu_argp.c (mu_conf_option): Added HAVE_LIBLTDL
39400	* examples/numaddr.c: New file. Sample loadable test for sieve.
39401	* examples/Makefile.am: Added numaddr.c
39402          (AM_LDFLAGS): Removed libmailutils. It's not used by examples.
39403	* libsieve/load.c: New file. Support for loadable extensions for
39404	  sieve.
39405	* libsieve/Makefile.am: Added load.c
39406	* libsieve/require.c (sieve_require): Implemented loadable tests.
39407	* libsieve/comparator.c (sieve_require_comparator): Implemented
39408	  loadable comparators.
39409	* include/mailutils/libsieve.h (sieve_require_action)
39410	  (sieve_require_test): New functions.
39411	* libsieve/register.c: Likewise.
39412	* sieve/Makefile.am (sieve_LDFLAGS): Added -export-dynamic
39413	* sieve/sieve.c (main): Removed unneeded goto. Added call
39414	  to sieve_machine_destroy at the end.
39415	* sieve/testsuite/Reject: Use regexp instead of hardcoded
39416	  version number.
39417
39418	* testsuite/spool/bigto.mbox: New file. A mailbox for
39419	  testing the behaviour of various utilities on
39420	  structured headers that contain long lists of addresses.
39421	* testsuite/spool/DISTFILES: Added bigto.mbox
39422	* frm/testsuite/frm/test.exp: Test frm -l on long to: headers.
39423	* sieve/testsuite/scripts/numaddr.sv: New file. A script invoking
39424	  loadable test.
39425	* sieve/testsuite/scripts/DISTFILES: Added numaddr.sv
39426	* sieve/testsuite/sieve/ext.exp: New file. Test for sieve loadable
39427	  extensions.
39428	* sieve/testsuite/sieve/DISTFILES: Added ext.exp
39429
394302002-11-21  Sergey Poznyakoff
39431
39432	* mailbox/file_stream.c (_file_destroy): Bugfix. Do not close the
39433	  stream.
39434	* imap4d/append.c (imap4d_append0): Simplified a lot.
39435
39436	* imap4d/testsuite/lib/imap4d.exp (default_imap4d_start): Save
39437	  imap4d spawn id in the global variable.
39438	  (default_imap4d_stop): Moved functionality from imap4d_exit
39439	  (imap4d_stop): Call default_imap4d_stop unless it has already
39440	  been called.
39441	  (imap4d_exit): Call imap4d_stop
39442	* imap4d/testsuite/imap4d/anystate.exp: Call imap4d_stop at the
39443	  end.
39444	* imap4d/testsuite/imap4d/append.exp: Likewise.
39445	* imap4d/testsuite/imap4d/create.exp: Likewise.
39446	* imap4d/testsuite/imap4d/examine.exp: Likewise.
39447	* imap4d/testsuite/imap4d/expunge.exp: Likewise.
39448	* imap4d/testsuite/imap4d/fetch.exp: Likewise.
39449	* imap4d/testsuite/imap4d/list.exp: Likewise.
39450	* imap4d/testsuite/imap4d/search.exp: Likewise.
39451	* imap4d/testsuite/imap4d/x.exp: Likewise.
39452
39453	* mail/testsuite/lib/mail.exp (default_mail_start): Save
39454	  mail spawn id in the global variable.
39455	  (default_mail_stop): Moved functionality from mail_exit
39456	  (mail_stop): Call default_mail_stop unless it has already
39457	  been called.
39458	  (mail_exit): Call mail_stop
39459	* mail/testsuite/mail/alias.exp: Call mail_stop at the end.
39460	* mail/testsuite/mail/folder.exp: Likewise.
39461	* mail/testsuite/mail/read.exp: Likewise.
39462	* mail/testsuite/mail/send.exp: Likewise.
39463	* mail/testsuite/mail/tag.exp: Likewise.
39464	* mail/testsuite/mail/write.exp: Likewise.
39465
39466	* pop3d/testsuite/lib/pop3d.exp: Fixed exit functions.
39467
39468	* mailbox/mailbox.c (mailbox_flush,mailbox_append_message)
39469	  (mailbox_save_attributes,mailbox_expunge): Return EACCES
39470	  if mailbox was open read only.
39471
394722002-11-21  Sergey Poznyakoff
39473
39474	* mailbox/parse822.c (parse822_quoted_string): Free qstr before
39475	  returning error status. Otherwise, addresses like
39476		"A wrong quote\" <addr@dom.ain>
39477	  hit the assert in parse822_word() and coredump.
39478	  (parse822_word_dot): Removed misleading comment.
39479	* mailbox/testsuite/Addrs: Added a testcase for this.
39480
394812002-11-20  Sergey Poznyakoff
39482
39483	* mailbox/mailer.c: Fixed indentation.
39484
39485	* include/mailutils/libsieve.h (sieve_test_lookup)
39486	  (sieve_action_lookup,sieve_register_test)
39487	  (sieve_register_action,sieve_register_comparator)
39488	  (sieve_comparator_lookup,sieve_require_comparator)
39489	  (sieve_get_comparator): Accept the pointer to
39490	  sieve machine as first argument.
39491	* libsieve/sieve.h (struct sieve_machine): New members
39492	  test_list, action_list and comp_list provide independent
39493	  symbol space for this particular instance of sieve.
39494	* libsieve/actions.c (build_mime,sieve_action_redirect): Removed
39495	  unused argument.
39496	  (sieve_register_standard_actions): Changed declaration.
39497	* libsieve/comparator.c (sieve_register_comparator)
39498	  (sieve_require_comparator,sieve_comparator_lookup)
39499	  (sieve_get_comparator)
39500	  (sieve_register_standard_comparators): Accept the pointer
39501	  to sieve machine as first argument.
39502	* libsieve/register.c (sieve_test_lookup,sieve_action_lookup)
39503	  (sieve_register_test,sieve_register_action): Accept the pointer
39504	  to sieve machine as first argument.
39505	* libsieve/require.c: Adjust for above changes.
39506	* libsieve/sieve.y: Likewise.
39507	* libsieve/tests.c: Likewise.
39508	  (sieve_test_header): New tag :mime. Directs header to test
39509	  headers in all parts of a multipart message, not only main
39510	  message headers.
39511	* libsieve/util.c (sieve_tag_lookup): New function.
39512
39513	* sieve/sieve.c: Added "mailer" capability. Removed spurious
39514	  --mailer-url command line switch.
39515	  (main): Do not create mailer. sieve_message() will do it
39516	  if necessary.
39517	* sieve/testsuite/scripts/header-mime.sv: New file. Test script
39518	  for 'header :mime' extension.
39519	* sieve/testsuite/scripts/DISTFILES: Added header-mime.sv
39520	* sieve/testsuite/sieve/header.exp: Test :mime tag.
39521
39522	* mail.local/mail.local.h (mda): Changed prototype.
39523	  (struct mda_data): Replaced FILE *fp with message_t msg.
39524	* mail.local/script.c: Adjust for above changes.
39525	* mail.local/main.c (make_tmp): Create a message instead
39526	  of returning file pointer.
39527	  (argp_capa): Added "mailer" capability.
39528	  (sieve_test): Second argument.
39529	  (mda,deliver): Take message_t as first argument, instead of
39530	  FILE*.
39531
395322002-11-19  Sergey Poznyakoff
39533
39534	* libsieve/comparator.c (i_ascii_casemap_contains): Fixed
39535	  typecast.
39536	* mailbox/mutil.c (mu_set_user_email): Set user's domain as
39537	  well.
39538	* sieve/testsuite/Reject: Fixed `envelope from' address.
39539
39540
395412002-11-19  Sergey Poznyakoff
39542
39543	* sieve/sieve.c: New options: --verbose to verbosely log executed
39544	  actions, --log-facility to switch all diagnostic output to
39545	  syslog.
39546	* libsieve/comparator.c (i_ascii_numeric_is): Support for
39547	  :comparator i;ascii-numeric. Fixed handling of
39548	  :comparator i;ascii-casemap :matches and :contains.
39549	  Added i;ascii-numeric :is comparator.
39550	* libsieve/runtime.c (sieve_message): New function.
39551	* libsieve/sieve.y (sieve_machine_init,sieve_machine_destroy):
39552	  Fixed inconsistencies.
39553	* libsieve/tests.c (_get_address_part): Made static to avoid
39554	  name clashes.
39555	* libmu_scm/mu_address.c: Likewise.
39556	* libsieve/util.c (sieve_slist_destroy): Use list_do. It is
39557	  faster.
39558
39559	* sieve/testsuite/lib/sieve.exp (sieve_test): Pass --verbose
39560	  switch to sieve. Added -retcode option.
39561
39562	* sieve/testsuite/scripts/i-casemap-contains.sv: New file.
39563	* sieve/testsuite/scripts/i-casemap-is.sv: New file.
39564	* sieve/testsuite/scripts/i-casemap-matches.sv: New file.
39565	* sieve/testsuite/scripts/i-casemap-regex.sv: New file.
39566	* sieve/testsuite/scripts/i-numeric-contains.sv: New file.
39567	* sieve/testsuite/scripts/i-numeric-is.sv: New file.
39568	* sieve/testsuite/scripts/i-octet-contains.sv: New file.
39569	* sieve/testsuite/scripts/i-octet-is.sv: New file.
39570	* sieve/testsuite/scripts/i-octet-matches.sv: New file.
39571	* sieve/testsuite/scripts/i-octet-regex.sv: New file.
39572  	* sieve/testsuite/scripts/DISTFILES: Added scripts for testing
39573	  comparators.
39574
39575	* sieve/testsuite/sieve/i-casemap.exp: New file.
39576	* sieve/testsuite/sieve/i-numeric.exp: New file.
39577	* sieve/testsuite/sieve/i-octet.exp: New file.
39578	* sieve/testsuite/sieve/DISTFILES: Added scripts for testing
39579	  comparators.
39580
39581	* testsuite/spool/sieve.mbox: Add X-Number header to msg 2
39582	  for testing i;ascii-numeric comparator.
39583	* sieve/testsuite/Redirect: Reflect changed headers in msg 2
39584	* sieve/testsuite/Reject: Likewise
39585	* sieve/testsuite/sieve/action.exp: Likewise.
39586
39587	* testsuite/lib/mailutils.exp: Bugfix: always check for newline
39588	  after matched pattern.
39589
39590	* mail.local/Makefile.am: Added libsieve.la
39591	* mail.local/mail.local.h: Include libsieve.h
39592	* mail.local/main.c: Support for user-defined sieve filters.
39593	  Improved debugging.
39594
39595	* TODO: Updated.
39596
395972002-11-18  Sergey Poznyakoff
39598
39599	* mailbox/mailer.c (mailer_get_url): New function.
39600	* mailbox/sendmail.c (sendmail_send_message): Bugfix: stream_read
39601	  should not use sendmail->offset for positioning.
39602
39603	* examples/mta.c: Test if environment variable MTA_APPEND is set.
39604
39605	* include/mailutils/libsieve.h: Added comments.
39606	* libsieve/actions.c: Implemented reject and redirect.
39607	* libsieve/sieve.h (struct sieve_machine): New members
39608	  mailer and daemon_email.
39609	* libsieve/sieve.l: Call multiline_add for each line in ML state.
39610	* libsieve/sieve.y (sieve_get_mailer,sieve_set_mailer)
39611	  (sieve_get_daemon_email,sieve_set_daemon_email): New functions.
39612
39613	* sieve/Makefile.am: Enable testsuite subdir.
39614	* sieve/sieve.c: New option --email sets user email address.
39615
39616	* sieve/testsuite/Reject: New file
39617	* sieve/testsuite/Redirect: New file
39618	* sieve/testsuite/Makefile.am: Added Reject and Redirect
39619	* sieve/testsuite/lib/sieve.exp (sieve_test): Pass --email
39620	  and --mailer options to sieve.
39621	  (sieve_driver_test): New procedure.
39622
39623	* sieve/testsuite/scripts/redirect.sv: New file
39624	* sieve/testsuite/scripts/reject.sv: New file
39625	* sieve/testsuite/scripts/DISTFILES: Added redirect.sv and
39626	  reject.sv
39627
39628	* sieve/testsuite/sieve/redirect.exp: New file
39629	* sieve/testsuite/sieve/reject.exp: New file
39630	* sieve/testsuite/sieve/DISTFILES: Added redirect.exp and
39631	  reject.exp
39632
39633	* libmu_scm/mu_message.c (mu_message_set_header): Fixed memory
39634	  leak.
39635
396362002-11-15  Sergey Poznyakoff
39637
39638	* sieve/examples/ex-3.1b.sv: Require redirect.
39639	* sieve/examples/example.sv: Likewise.
39640	* sieve/testsuite/sieve/action.exp: Adapted for changed sieve
39641	  diagnostics format.
39642	* sieve/testsuite/sieve/address.exp: Likewise.
39643	* sieve/testsuite/sieve/allof.exp: Likewise.
39644	* sieve/testsuite/sieve/anyof.exp: Likewise.
39645	* sieve/testsuite/sieve/envelope.exp: Likewise.
39646	* sieve/testsuite/sieve/exists.exp: Likewise.
39647	* sieve/testsuite/sieve/false.exp: Likewise.
39648	* sieve/testsuite/sieve/header.exp: Likewise.
39649	* sieve/testsuite/sieve/size.exp: Likewise.
39650
396512002-11-15  Sergey Poznyakoff
39652
39653	* mailbox/list.c (list_replace): New function.
39654	* include/mailutils/list.h: Likewise.
39655	* mailbox/address.c (address_aget_local_part,address_aget_domain):
39656	  New functions.
39657	* include/mailutils/address.h: Likewise.
39658	* mail.local/main.c (parse_opt): Use argp_error to report
39659	  diagnostics.
39660
39661	* include/mailutils/libsieve.h (sieve_retrieve_t): Extra argument.
39662	  (sieve_destructor_t,sieve_tag_checker_t): New types.
39663	  (sieve_value_t): New member v.ptr.
39664	  (sieve_tag_def_t): Removed num member.
39665	  (sieve_tag_group_t): New data type.
39666	  (sieve_runtime_tag): Changed type of tag member to char *.
39667	  (sieve_register_t): Removed unused members. Changed type of
39668	  tags member.
39669	  (sieve_register_test,sieve_register_action): Changed type of
39670	  fourth argument (tags).
39671	  (sieve_machine_destroy,sieve_machine_add_destructor): New
39672	  functions.
39673
39674	* libsieve/comparator.c: Added support for :regex matching type.
39675	* libsieve/prog.c: More thorough checking of tags.
39676	* libsieve/register.c (sieve_register_test)
39677	  (sieve_register_action): Changed type of fourth argument (tags).
39678	* libsieve/require.c (sieve_require): Commented unimplemented
39679	  parts of code.
39680	* libsieve/runtime.c (instr_run): Do not run the handler when
39681	  in disassemble mode.
39682	* libsieve/sieve.h (struct sieve_machine): New member destr_list.
39683	  (sieve_match_part_checker): New function.
39684	* libsieve/sieve.y (sieve_machine_init): Fixed return value.
39685	  (sieve_machine_add_destructor,sieve_machine_destroy): New
39686	  functions.
39687
39688	* libsieve/tests.c: Implemented the rest of required sieve tests
39689	  (address and envelope).
39690	* libsieve/util.c (sieve_value_create,sieve_type_str)
39691	  (sieve_print_value): Handle SVT_POINTER data type.
39692	  (sieve_print_value_list) tag member is now char *.
39693	  (_comp_action): Call cp->retr continuously until it returns
39694	  non-zero.
39695
396962002-11-14  Frederic Gobry  <frederic.gobry@smartdata.ch>
39697
39698	* include/mailutils/address.h: added declaration of address_dup.
39699
39700
397012002-11-14  Sergey Poznyakoff
39702
39703	* sieve/lex-sieve.lex: Removed
39704	* include/mailutils/libsieve.h
39705	  (sieve_comparator_t,sieve_retrieve_t): New datatypes.
39706	  (sieve_vlist_do,sieve_vlist_compare,sieve_comparator_lookup)
39707	  (sieve_register_comparator,sieve_get_comparator): New functions.
39708	* libsieve/actions.c: (sieve_action_discard): Log output made
39709	  compatible with that of CMU ported sieve.
39710	* libsieve/require.c (sieve_require): Handle "comparator-" prefix
39711	  in require statements.
39712	* libsieve/runtime.c (instr_action): Increase action_count.
39713	  (sieve_run): Log implicit keep action.
39714	* libsieve/sieve.h (struct sieve_machine) New member action_count.
39715	  (sieve_register_standard_comparators): New function.
39716	  (sieve_require_comparator): New function.
39717	* libsieve/sieve.y (action production):  Fixed number of arguments
39718	  in call to sieve_compile_error().
39719	* libsieve/tests.c: Implemented header test.
39720	* libsieve/util.c (sieve_vlist_do, sieve_vlist_compare): New
39721	  functions.
39722	* libsieve/comparator.c: New file.
39723	* libsieve/Makefile.am: Added comparator.c
39724	* sieve/examples/t-complex.sv: require "redirect".
39725
397262002-11-14  Sergey Poznyakoff
39727
39728	Started actually rewriting sieve to use libsieve library.
39729	The CMU-based sources are available under the tag
39730	ver-0-1-2-with-cmu-sieve.
39731
39732	* Makefile.am: Added libsieve.
39733	* configure.ac: Likewise.
39734
39735	* mailbox/mbx_mboxscan.c (mbox_scan0): Compute uids before
39736	  calling DISPATCH_ADD_MSG.
39737	* mailbox/mbx_mh.c (mh_scan0): Implemented EVT_MESSAGE_ADD
39738	  notification.
39739	* include/mailutils/libsieve.h: Changed sieve_machine_t to be
39740	  a pointer to structure.
39741	* libsieve/Makefile.am: Removed sv.c
39742	* libsieve/sv.c: Removed.
39743	* libsieve/runtime.c: Reflect change of sieve_machine_t type.
39744	* libsieve/sieve.y: Likewise.
39745	* libsieve/sieve.h (struct sieve_machine): New members: filename,
39746	  logger, ticket, mu_debug.
39747	* libsieve/actions.c: Implemented stop, keep, discard and
39748	  fileinto.
39749	* libsieve/tests.c: Implemented true, false, exists and size.
39750	* libsieve/util.c (sieve_value_get, sieve_log_action)
39751	  (sieve_mark_deleted): New functions.
39752
39753	* sieve/gram-sieve.y: Removed.
39754	* sieve/parseaddr.c: Removed.
39755	* sieve/sv.h: Removed.
39756	* sieve/tree.h: Removed.
39757	* sieve/addr-lex.l: Removed.
39758	* sieve/imparse.c: Removed.
39759	* sieve/parseaddr.h: Removed.
39760	* sieve/sieve-lex.l: Removed.
39761	* sieve/svcb.c: Removed.
39762	* sieve/util.c: Removed.
39763	* sieve/imparse.h: Removed.
39764	* sieve/script.c: Removed.
39765	* sieve/svctx.c: Removed.
39766	* sieve/util.h: Removed.
39767	* sieve/interp.c: Removed.
39768	* sieve/script.h: Removed.
39769	* sieve/sieve.h: Removed.
39770	* sieve/svfield.c: Removed.
39771	* sieve/addr.y: Removed.
39772	* sieve/interp.h: Removed.
39773	* sieve/sieve_err.c: Removed.
39774	* sieve/svfield.h: Removed.
39775	* sieve/comparator.c: Removed.
39776	* sieve/message.c: Removed.
39777	* sieve/sieve_err.h: Removed.
39778	* sieve/svutil.c: Removed.
39779	* sieve/comparator.h: Removed.
39780	* sieve/message.h: Removed.
39781	* sieve/sieve-gram.y: Removed.
39782	* sieve/sieve_interface.h: Removed.
39783	* sieve/tree.c: Removed.
39784	* sieve/AUTHORS: Removed.
39785	* sieve/COPYING: Removed.
39786	* sieve/NEWS: Removed.
39787	* sieve/README: Removed.
39788
39789	* sieve/Makefile.am: Pruned for the new implementation.
39790	* sieve/sieve.c: Use libsieve calls.
39791
397922002-11-13  Sergey Poznyakoff
39793
39794	* include/mailutils/libsieve.h: (sieve_vprintf_t): Removed.
39795	  (sieve_parse_error_t): New data type.
39796	  (sieve_compile): Changed prototype declaration.
39797	  (sieve_get_data,sieve_get_message,sieve_get_message_num)
39798	  (sieve_get_debug_level,sieve_mailbox,sieve_disass)
39799	  (sieve_machine_init,sieve_machine_set_error)
39800	  (sieve_machine_set_parse_error): New functions.
39801	* libsieve/README: Replaced BNZ with BZ.
39802	* libsieve/actions.c (fileinto_args): Fileinto takes string,
39803	  not string-list.
39804	* libsieve/prog.c (sieve_code_command): Implemented implicit
39805	  typecast from string to string-list.
39806	* libsieve/require.c: Use sieve_compile_error() to report parse
39807	  errors.
39808	* libsieve/sieve.l: Likewise.
39809	* libsieve/util.c: Likewise.
39810	* libsieve/runtime.c: Verbose debugging.
39811	  (instr_branch, instr_brz): New functions.
39812	  (sieve_get_data,sieve_get_message,sieve_get_message_num)
39813	  (sieve_get_debug_level,sieve_disass,sieve_mailbox): New
39814	  functions
39815	* libsieve/sieve.h (sieve_op_t): New member `pc'.
39816	  (struct sieve_machine): New members: errbuf,mailbox,msgno,
39817	  msg,parse_error_printer.
39818	  (sieve_error,sieve_debug): Removed prototype.
39819	  (sieve_compile_error,instr_branch,instr_brz): New function.
39820	* libsieve/sieve.y: Implemented conditional blocks. The grammar
39821	  is complete.
39822	* libsieve/sv.c: Modified to reflect changes in the API.
39823
398242002-11-13  Sergey Poznyakoff
39825
39826	* mail/util.c (util_do_command): Interpret empty line as "next"
39827	  command only when in interactive mode.
39828
398292002-11-12  Sergey Poznyakoff
39830
39831	* libsieve/prog.c: New file. Code generator functions.
39832	* libsieve/runtime.c: New file. Runtime support.
39833	* libsieve/Makefile.am: Added prog.c and runtime.c.
39834	* include/mailutils/libsieve.h: Added basic code generation and
39835	  debugging (conditional blocks still not implemented).
39836	* libsieve/actions.c: Likewise.
39837	* libsieve/register.c: Likewise.
39838	* libsieve/sieve.h: Likewise.
39839	* libsieve/sieve.l: Likewise.
39840	* libsieve/sieve.y: Likewise.
39841	* libsieve/sv.c: Likewise.
39842	* libsieve/tests.c: Likewise.
39843	* libsieve/util.c: Likewise.
39844
398452002-11-08  Sergey Poznyakoff
39846
39847	* include/mailutils/libsieve.h: New file.
39848	* include/mailutils/Makefile.am: Added libsieve.h
39849	* libsieve/sieve.h: Moved publicly available declarations to
39850	  <mailutils/libsieve.h>
39851	* libsieve/sieve.y: Fixed the grammar. Added union, types and the
39852	  basic actions.
39853	* libsieve/sieve.l: Likewise.
39854	* libsieve/Makefile.am: Added new files.
39855	* libsieve/util.c (sieve_slist_destroy, sieve_value_create): New
39856	  functions.
39857	* libsieve/tests.c: New file. Provides standard sieve tests (all
39858	  noops, so far).
39859	* libsieve/actions.c: New file. Provides standard sieve actions (all
39860	  noops, so far).
39861	* libsieve/require.c: New file. Handles "require" statement.
39862	* libsieve/register.c: New file. Contains the sieve namespace
39863	  functions.
39864
398652002-11-07  Sergey Poznyakoff
39866
39867	* mailbox/stream.c: Fix memory leak. Patch provided by
39868	  Frederic Gobry <frederic.gobry@smartdata.ch>
39869	* mailbox/tcp.c: Likewise.
39870
39871	* mail.local/mailquota.c: Fixed comment.
39872	* mail.local/main.c: Avoid unnecessary memory allocation.
39873
39874	* libsieve/: New directory
39875	* libsieve/Makefile.am: New file.
39876	* libsieve/.cvsignore: New file.
39877	* libsieve/sieve.y: New file.
39878	* libsieve/sieve.l: New file.
39879	* libsieve/sieve.h: New file.
39880	* libsieve/util.c: New file.
39881	* libsieve/sv.c: New file.
39882
39883	* sieve/ylwrap: Moved to ...
39884	* scripts/ylwrap:  ... here
39885	* scripts/Makefile.am: Added ylwrap
39886	* sieve/Makefile.am: Removed ylwrap
39887
398882002-11-07  Sergey Poznyakoff
39889
39890	* mail/mail.h (msgset_member,msgset_negate): New functions.
39891	* mail/msgset.y: Added negation of message sets.
39892	  `from ! subject:/daily/' outputs all messages whose subject
39893	  does not contain the word 'daily'.
39894	* mail/z.c: Fixed behaviour of z. when the total number of
39895	  messages is less than the number of line per page of output.
39896
398972002-11-05  Sergey Poznyakoff
39898
39899	* mail/reply.c: Add In-Reply-To and References headers to the
39900	  outgoing message.
39901	* mail/var.c (var_quote): Output prefix sequence before each line
39902	  of multiline headers.
39903	* mail/from.c (mail_from0): Function shared between from.c and
39904	  headers.c
39905	* mail/headers.c: Use mail_from0 to avoid spurious diagnostics
39906	  about deleted messages.
39907	* mail/msgset.y (yylex): allow for '-' in field names. Notice,
39908	  that if the dash means 'range' and the first message in the
39909	  range is not numeric, there should be whitespace between
39910	  them.
39911	* mail/util.c (util_get_message): Expanded semantics of the last
39912	  argument. It now contains flags that control how
39913	  util_get_message operates. Flags are a bitwise sum of the
39914	  following:
39915		MSG_ALL		Return any message (deleted or not)
39916		MSG_NODELETED	Do not return deleted messages.
39917		MSG_SILENT	Do not output warnings about deleted
39918				messages.
39919	* mail/mail.h (mail_from0): New function.
39920	  (MSG_ALL,MSG_NODELETED,MSG_SILENT): New macros.
39921
39922	* mail/copy.c: Use MSG_.* macros in calls to util_get_message.
39923	* mail/delete.c: Likewise.
39924	* mail/followup.c: Likewise.
39925	* mail/hold.c: Likewise.
39926	* mail/mbox.c: Likewise.
39927	* mail/pipe.c: Likewise.
39928	* mail/print.c: Likewise.
39929	* mail/quit.c: Likewise.
39930	* mail/size.c: Likewise.
39931	* mail/top.c: Likewise.
39932	* mail/undelete.c: Likewise.
39933	* mail/write.c: Likewise.
39934
39935	* mail/testsuite/mail/send.exp: Changed to reflect new reply behaviour.
39936
39937	* include/mailutils/header.h: Added MU_HEADER_REFERENCES.
39938	* mail.local/main.c (make_tmp): Initialize auth to NULL.
39939
399402002-11-04  Sergey Poznyakoff
39941
39942	* auth/virtual.c (mu_auth_virt_domain_by_name): Bugfix. Didn't
39943	  allocate enough storage for mailbox_name.
39944
39945	* mh/mh_format.c (print_string): Pad right if necessary.
39946	* m4/enable.m4: Translate dot to underscore in variable names.
39947	* configure.ac: Use MU_ENABLE_SUPPORT for virtual-domains.
39948	* imap4d/testsuite/lib/imap4d.exp: Use ENABLE_VIRTUAL_DOMAINS
39949	* pop3d/testsuite/lib/pop3d.exp: Likewise.
39950	* mailbox/mu_argp.c: Likewise.
39951	* mailbox2/mutil.c: Likewise.
39952
39953	* README: Documented new --disable options.
39954	* doc/texinfo/message.texi: correct the prototype of
39955	  message_is_multipart() (patch by Olivier Bornet).
39956	* examples/http.c: Removed include <sys/select.h>
39957
39958	* pop3d/pop3d.c (main): Improved check for debugging mode.
39959	* imap4d/imap4d.c: Likewise.
39960
39961	* pop3d/testsuite/Makefile.am: Added config to test_dirs.
39962	* imap4d/testsuite/Makefile.am: Likewise.
39963
39964	* testsuite/lib/mailutils.exp (mailer_test): New procedure for
39965	  testing mailers.
39966	  (mu_init): New option -noflags skips the default initialization
39967	  of MU_TOOL_FLAGS.
39968	* mail.remote/testsuite/lib/mail.remote.exp: Invoke mu_init with
39969	  -noflags.
39970	* mail.remote/testsuite/lib/mail.remote.exp (mailer_remote_test):
39971	  Use mailer_test.
39972
39973	* mail.local/mail.local.h (switch_user_id): Changed prototype
39974	  to honour mu_auth_data->change_uid member.
39975	* mail.local/main.c: Likewise.
39976	* mail.local/script.c: Likewise.
39977
39978	* mail.remote/testsuite/mail.remote/send.exp: Broke long lines.
39979
39980	Added testsuite framework for mail.local:
39981
39982	* mail.local/Makefile.am: Added SUBDIRS.
39983	* mail.local/testsuite: New directory
39984	* mail.local/testsuite/Makefile.am: New file
39985	* mail.local/testsuite/.cvsignore: New file
39986	* mail.local/testsuite/Data: New file
39987	* mail.local/testsuite/lib: New directory
39988	* mail.local/testsuite/lib/mail.local.exp: New file
39989	* mail.local/testsuite/lib/DISTFILES: New file
39990	* mail.local/testsuite/mail.local: New directory
39991	* mail.local/testsuite/mail.local/deliver.exp: New file
39992	* mail.local/testsuite/mail.local/DISTFILES: New file
39993
399942002-11-04  Sergey Poznyakoff
39995
39996	* examples/mta.c: include <mailutils/argp.h>
39997	* mailbox/getline.c: include <unistd.h> (for ssize_t)
39998	* mh/mh_fmtgram.y (cond production): added missing semicolon,
39999	  required by modern yaccs.
40000	* sieve/sieve-gram.y (sizetag production): Likewise.
40001
400022002-11-03  Sergey Poznyakoff
40003
40004	* configure.ac: Added testsuite for mail.remote
40005
40006	* examples/mta.c: New file. A "fake" MTA for testing "mail" and
40007	  "mail.remote"
40008	* examples/Makefile.am: Added mta.c
40009	* examples/.cvsignore: Likewise.
40010
40011	* testsuite/etc/mail.rc: Added indentprefix.
40012	* mail/testsuite/mail/send.exp: New file. Test sending commands.
40013	* mail/testsuite/mail/DISTFILES: Added send.exp
40014	* mail/testsuite/Makefile.am: Add top_builddir to site.exp
40015
40016	* mail.remote/testsuite: New directory.
40017	* mail.remote/Makefile.am: Added testsuite
40018	* mail.remote/testsuite/Makefile.am: New file.
40019	* mail.remote/testsuite/.cvsignore: New file.
40020	* mail.remote/testsuite/Data: New file. Data for testing mail.remote.
40021	* mail.remote/testsuite/lib: New directory
40022	* mail.remote/testsuite/lib/mail.remote.exp: New file.
40023	* mail.remote/testsuite/lib/DISTFILES: New file.
40024	* mail.remote/testsuite/mail.remote: New directory
40025	* mail.remote/testsuite/mail.remote/send.exp: New file.
40026	* mail.remote/testsuite/mail.remote/DISTFILES: New file.
40027
40028	* mail.local/main.c: Fixed indentation.
40029	* mailbox/smtp.c: Likewise.
40030	  (smtp_address_add): New function. A wrapper around
40031	  address_union.
40032	  (_smtp_set_rcpt): Rewritten based on address_union call.
40033	* mail.remote/Makefile.am: Renamed some variables to avoid name
40034	  clashes.
40035	* mh/Makefile.am: Likewise.
40036
40037	* mailbox/file_stream.c: Some applications (e.g. mail.remote)
40038	  implicitly rely on the possibility to seek on stdin streams.
40039	  To provide this functionality:
40040	  (struct _file_stream): Added cache member.
40041	  It is a memory stream used to provide seeking capability for
40042	  stdio streams.
40043	  (_file_destroy): Destroy cache if necessary.
40044	  (_stdin_file_read,_stdin_file_readline,_stdout_file_write): New
40045	  functions. Provide IO operations for stdio streams.
40046	  (stdio_stream_create): Register new IO functions.
40047
40048	* testsuite/lib/mailutils.exp (mu_test_file): Minor fixes.
40049
400502002-11-01  Jeff Bailey  <jbailey@gnu.org>
40051
40052	* mh/Makefile.am: Use MHPROGRAMS and MHLIBRARIES instead of
40053	MH_PROGRAMS and MH_LIBRARIES so that automake doesn't complain.
40054
40055	* mail.remote/Makefile.am: Use SMTPPROGRAMS instead of
40056	SMTP_PROGRAMS so that automake doesn't complain.
40057
40058	* configure.ac: Adjust for above changes.
40059
40060	* mh/Makefile.am: Use AM_YFLAGS instead of YFLAGS.
40061
40062	* libmu_scm/Makefile.am: Use AM_CPPFLAGS instead of CPPFLAGS
40063
40064	* autogen.sh: Redo using 'autoreconf'.  This is now the right
40065	tool to use for generating the build environment.
40066
40067	* Makefile.am: Require version 1.7.1, add std-options to
40068	AUTOMAKE_OPTIONS
40069
40070	* configure.in: Require version 2.54.  Update quoting.  Change
40071	AC_ARG_WITH and AC_ARG_ENABLE to use AC_HELP_STRING
40072
40073	* m4/enable.m4: Change AC_ARG_ENABLE to use AC_HELP_STRING
40074
40075	* lib/Makefile.am: Remove ansi2knr
40076
40077	* lib/ansi2knr.c: Remove
40078
40079	* lib/ansi2knr.1: Remove
40080
400812002-11-01  Sergey Poznyakoff
40082
40083	* m4/enable.m4: Fixed action-if-false.
40084	* Makefile.am: Restored to pre-2002-10-29 state.
40085	* configure.ac: Substitute MH_PROGRAMS, MH_LIBRARIES and
40086	  SMTP_PROGRAMS variables.
40087	* mh/Makefile.am: Build the targets conditionally.
40088	* mail.remote/Makefile.am: Likewise.
40089
400902002-10-29  Sergey Poznyakoff
40091
40092	Following the proposition of Olivier Bornet
40093	<Olivier.Bornet@smartdata.ch>, added a possibility to
40094	disable the support for certain protocols.
40095
40096	* m4/enable.m4: New file. Implements MU_ENABLE_SUPPORT defun.
40097	* m4/Makefile.am: Added enable.m4
40098	* configure.ac: New switches --disable-pop, --disable-imap
40099	  --disable-mh, --disable-smtp and --disable-sendmail allow
40100	  to disable corresponding protocols.
40101	* Makefile.am: Conditionally build directories depending on
40102	  protocols that may be disabled.
40103	* mailbox/mu_argp.c: Updated to reflect the set of ENABLE_
40104	  defines.
40105	* mailbox/folder_imap.c: Conditionally compile the contents.
40106	* mailbox/folder_mh.c: Likewise.
40107	* mailbox/folder_pop.c: Likewise.
40108	* mailbox/mbx_imap.c: Likewise.
40109	* mailbox/mbx_mh.c: Likewise.
40110	* mailbox/mbx_pop.c: Likewise.
40111	* mailbox/sendmail.c: Likewise.
40112	* mailbox/smtp.c: Likewise.
40113	* mailbox/url_imap.c: Likewise.
40114	* mailbox/url_mh.c: Likewise.
40115	* mailbox/url_pop.c: Likewise.
40116	* mailbox/url_sendmail.c: Likewise.
40117	* mailbox/url_smtp.c: Likewise.
40118
40119	* sieve/sieve.c: Option -M none disables creating
40120	  the mailer.
40121	* sieve/testsuite/lib/sieve.exp: Start sieve with "-M none".
40122
40123	Bugfixes to the docs, contributed by Olivier Bornet:
40124
40125	* doc/texinfo/mailbox.texi: Documented the return code.
40126	* doc/texinfo/headers.texi: Fixed names of the macro-
40127	  definitions.
40128
401292002-10-15  Sergey Poznyakoff
40130
40131	* guimb/scm/README: Updated.
40132	* mailbox/parse822.c (parse822_phrase): Allow for dots
40133	  in non-quoted personal phrase.
40134	* mailbox/testsuite/Addrs: New test: parse non-quoted
40135	  phrase containing dots.
40136
401372002-10-14  Alain Magloire
40138
40139	* mailbox/getline.c: New LGPL implementation,
40140	With a patch for Sergey.
40141	* mailbox/getline.h: New LGPL implementation.
40142
401432002-10-14  Sergey Poznyakoff
40144
40145	* configure.ac: Provide GUILE_BINDIR variable for Makefiles.
40146	* guimb/scm/Makefile.am: Likewise.
40147	* guimb/scm/reject.scm: Fixed Reporting-UA line.
40148	* guimb/scm/sieve-core.scm: Allow to be executed directly by
40149	  guile.
40150	* guimb/scm/sieve.scm.in: Cleaned up the source.
40151	* libmu_scm/Makefile.am: Use install-data-hook to create the
40152	  libguile-mailutils symlink.
40153	* libmu_scm/mu_scm.c (mu-path-maildir, mu-path-folder-dir): New
40154	  globals.
40155	* libmu_scm/mailutils.scm.in: Export new globals.
40156
401572002-10-13  Sergey Poznyakoff
40158
40159	* guimb/scm/sieve-core.scm: Changed sieve-register-.* functions
40160	  to allow for actions to accept tags.
40161	  (sieve-get-opt-arg): New function. Returns the argument to a
40162	  given tag.
40163	* guimb/scm/sieve.scm.in: Use new sieve-register style.
40164	  (sieve-preprocess-arguments): New function. Preprocess
40165	  and group arguments into optional and positional types.
40166	  (sieve-parse-arguments): New function. Parses arguments
40167	  to an action or a test.
40168	  (sieve-register-action,sieve-register-test): Rewritten.
40169	* guimb/scm/mimeheader.scm: Updated to use new register style
40170	* guimb/scm/numaddr.scm: Likewise.
40171	* guimb/scm/redirect.scm: Likewise.
40172	* guimb/scm/reject.scm: Likewise.
40173
40174	* guimb/scm/vacation.scm: New file. Implements "vacation"
40175 	  extension.
40176	* guimb/scm/Makefile.am: Added vacation.scm
40177
40178	* libmu_scm/mu_message.c (mu_message_set_header): Bugfix.
40179	* libmu_scm/mu_scm.c (_mu_scm_package_string, in scheme
40180	  mu-package-string): New global.
40181
40182	* mail/eq.c: Allow a single argument as an extension to the
40183	  standard '=' command. The effect is to move the current
40184	  pointer to the given message.
40185
40186	* mail/util.c (util_error_range): New function. Outputs "message
40187	  out of range" diagnostics.
40188	  (util_get_message): New function. A wrapper around
40189	  mailbox_get_message with the proper diagnostics.
40190	* mail/mail.h: Likewise.
40191
40192	* mail/copy.c: Use util_get_message()
40193	* mail/delete.c: Likewise.
40194	* mail/followup.c: Likewise.
40195	* mail/from.c: Likewise.
40196	* mail/hold.c: Likewise.
40197	* mail/mbox.c: Likewise.
40198	* mail/pipe.c: Likewise.
40199	* mail/print.c: Likewise.
40200	* mail/quit.c: Likewise.
40201	* mail/reply.c: Likewise.
40202	* mail/size.c: Likewise.
40203	* mail/top.c: Likewise.
40204	* mail/undelete.c: Likewise.
40205	* mail/var.c: Likewise.
40206	* mail/write.c: Likewise.
40207	* mail/decode.c: Updated util_isdeleted() invocation.
40208
40209	* mail.local/Makefile.am: Added /mailbox to INCLUDES
40210	* lib/getline.h: Removed.
40211	* mailbox/Makefile.am: Added /mailbox to INCLUDES
40212
402132002-10-02  Sergey Poznyakoff
40214
40215	* configure.ac: Check if environ is declared.
40216	* mail/setenv.c: Protect the declaration of environ by #if.
40217	* mail/send.c (mail_send): Set save_to right after entering
40218	  the function.
40219	  (mail_send0): deduce savefile basing on the localpart of
40220	  the first address (when save_to is set).
40221	  Expand aliases in every address-related header.
40222	* mail/alias.c (alias_expand): Return NULL if no suitable
40223	  expansion was found.
40224	* mail/followup.c: Removed unneeded typecasts.
40225	* mail/mailline.c: Likewise.
40226	* mail/shell.c: Likewise.
40227	* mail/util.c (util_header_expand): New function. Expand
40228	  the address-related fields of a header.
40229	* mail/mail.h: Likewise.
40230
40231	* mail.local/mail.local.h: Added missing includes.
40232	* pop3d/popauth.c: Likewise.
40233
402342002-10-02  Sergey Poznyakoff
40235
40236	* mailbox/address.c (_address_get_nth): Get nth sub-address
40237	  from an address.
40238	  (most of the functions): Rewritten using _address_get_nth
40239	  (address_aget_personal, address_aget_comments): new functions.
40240	  (address_dup): New function. Create a copy of a (single)
40241	  address.
40242	  (address_contains_email): New function. Check if the given email
40243	  is contained in the address.
40244	  (address_union): New function. Create a union of two addresses.
40245	* include/mailutils/address.h (address_contains_email,
40246	  address_union): new functions.
40247
40248	* mail/setenv.c: New file. Implements `setenv' command: an
40249	  extension allowing to manipulate the shell environment.
40250	* mail/table.c: Added setenv command.
40251	* mail/Makefile.am: Added setenv.c
40252	* mail/decode.c: Use util_get_crt() to check the value of
40253	  the crt variable.
40254	* mail/print.c: Likewise.
40255	* mail/mail.h (mail_setenv, util_get_crt, util_merge_addresses):
40256	  New functions.
40257	* mail/reply.c (mail_reply): Bugfix.
40258	* mail/send.c (compose_header_set): COMPOSE_SINGLE_LINE part
40259	  rewritten.
40260	* mail/util.c (util_get_crt): Return the value of the "crt"
40261	  variable. The variable may be either boolean or numeric,
40262	  meaning the minimum number of lines the body of the message
40263	  must contain in order to be put through the pager.
40264	  (util_merge_addresses): Add new address to the comma-separated
40265	  address list, unless it is already present there.
40266	* mail/var.c (dump_headers): Do not print extra newline after
40267	  the headers.
40268	* doc/texinfo/programs.texi: Documented crt variable
40269	  and setenv command.
40270
402712002-10-01  Sergey Poznyakoff
40272
40273	* guimb/scm/sieve-core.scm: Added :regex tag -- an
40274	  extension allowing to use POSIX regexp in address
40275	  and header tests.
40276	* mh/repl.c: New file. A framework for the `repl' program.
40277	* mh/Makefile.am: Added repl
40278	* mh/.cvsignore: Likewise.
40279
402802002-09-30  Sergey Poznyakoff
40281
40282	* configure.ac: Changed check for CURSES_LIBS
40283	* mh/Makefile.am (scan_LDADD): Use CURSES_LIBS instead of
40284	  directly linking -lcurses
40285
402862002-09-27  Sergey Poznyakoff
40287
40288	* mh/mh_format.c (strobj_len,print_string): Extra safety not to
40289	  dereference NULL pointer.
40290	  (_parse_date): Use local time if the date cannot be parsed.
40291	* mh/refile.c: Implemented --draft and --file switches.
40292
402932002-09-27  Sergey Poznyakoff
40294
40295	* mail/file.c: Fixed typo.
40296	* mh/folder.c (main): Correctly set current message number.
40297	* mh/inc.c: Do not use current_folder global.
40298	* mh/mh.h (mh_msgset_reverse,mh_msgset_negate,mh_msgset_current,
40299	  mh_msgset_free): new functions.
40300	  (mh_context_get_value,mh_msgset_parse): Changed.
40301
40302	* mh/mh_ctx.c: Descriptive comment regarding the allocation
40303	  of the return values.
40304	* mh/mh_msgset.c (mh_msgset_reverse,mh_msgset_negate,
40305	  mh_msgset_current, mh_msgset_free): new functions.
40306	  Added comments.
40307	* mh/mhpath.c: Minor fixes.
40308	* mh/refile.c: Use new mh_msgset_parse() syntax.
40309	* mh/rmm.c: Fixed args_doc string. Use new mh_msgset_parse()
40310	  syntax.
40311	* mh/scan.c: Use mh_iterate(). Accept message specifications
40312	  from the command line.
40313	* mh/mh_format.c (mh_format_dump): Bugfix: missed break;
40314
403152002-09-26  Sergey Poznyakoff
40316
40317	* mail/mail.h (struct compose_env): Changed structure. Renamed
40318	  to compose_env_t.
40319	  (compose_init, compose_header_set, compose_header_get,
40320	   compose_destroy): New functions.
40321
40322	* mail/send.c: Likewise. Use new compose functions.
40323	* mail/followup.c: Use new compose functions.
40324	* mail/reply.c: Likewise.
40325	* mail/util.c (util_msglist_esccmd): Declaration updated.
40326
40327	* mail/var.c: Implemented "editheaders" variable.
40328	* doc/texinfo/programs.texi: Documented "editheaders" variable.
40329	* mh/Makefile.am (install-exec-hook): Remove "folders" before
40330	  linking "folder" to it.
40331
403322002-09-25  Sergey Poznyakoff
40333
40334	* mailbox/mutil.c: Fixed typo in #if directive.
40335	* mailbox/parse822.c (const char *days): Bugfix. "Sun" must
40336	  be the first entry in the array.
40337	* mh/fmtcheck.c: New file. Source for fmtcheck command. It is
40338	  planned as a replacement for fmtdump, providing a broader
40339	  set of options for debugging user formats. Currently only
40340	  dump (listing) mode is implemented.
40341	* mh/mh_format.c (mh_format_dump): New function. Produces the
40342	  listing of compiled format code.
40343	  (builtin_me, builtin_profile, builtin_putstr, print_string,
40344	   builtin_putnum, builtin_putnumf, builtin_tws,
40345	   builtin_pretty): Implemented.
40346	  (builtin_pers): Enclose the return in a pair of double-quotes.
40347	* mh/mh_init.c (mh_my_email): New function.
40348	* mh/mh.h (mh_format_dump, mh_my_email): New function.
40349	* mh/Makefile.am: Added fmtcheck
40350
403512002-09-24  Sergey Poznyakoff
40352
40353	* mail/mail.c (mail_cmdline): removed unnecessary conditional.
40354	* mail/send.c (mail_send0): Bugfix. A dot ends the message
40355	  only if it is the only character on the line. Thanks
40356	  to Thomas Esser <te@dbs.uni-hannover.de> for noticing.
40357	* mail/util.c (util_save_outgoing): Removed extra newline
40358	  at the end of the envelope `from' line.
40359
40360	* mh/folder.c: Fixed scanning of folders and output.
40361	* mh/mh.h: Changed mh_opcode_t type.
40362	* mh/mh_fmtgram.y: Stricter typing of productions. The cntl
40363	  production allows for empty lists (e.g. %<{reply-to}%?{from}%>).
40364	  Enable debugging when MHFORMAT_DEBUG environment variable is
40365	  set.
40366	  (yylex): Skip whitespace after the function name.
40367	  (branch_fixup): The produced jump offset was wrong. Fixed.
40368	  (mh_code_builtin): Fixed passing of escape arguments.
40369	* mh/mh_format.c (strobj_is_null,strobj_realloc): New function.
40370	  (print_string): Accept an explicit width argument.
40371	  (print_obj): New function.
40372	  (mh_format): Use the new functions.
40373	  (builtin_lit): Fixed.
40374	  (builtin_formataddr,builtin_putaddr): Implemented.
40375
403762002-09-22  Sergey Poznyakoff
40377
40378	* mh/mh_argp.c (mh_argp_parse): Complain about non-processed
40379	  arguments unless "index" is non-null.
40380	* mh/folder.c: Implemented -header. Several fixes.
40381	* mh/rmf.c: New file. Implements rmf command.
40382	* mh/Makefile.am: Added rmf. Added install hook to link 'folder'
40383	  to 'folders'
40384	* mh/.cvsignore: Added rmf.
40385
403862002-09-21  Sergey Poznyakoff
40387
40388	* mailbox/header.c (header_parse): Bugfix: do not
40389	  bail out if len==0.
40390	* mailbox/mbx_mh.c (mh_append_message): Scan the
40391	  mailbox if it has not been scanned yet.
40392	* mh/mh_global.c: New file. Global configuration
40393	  functions.
40394	* mh/folder.c: New file. Implementation of the folder
40395	  command.
40396	* mh/mh.h: New prototypes.
40397	* mh/inc.c (opt_handler): Use is_true().
40398	* mh/refile.c: Likewise.
40399	* mh/mh_argp.c: Use new configuration functions.
40400	* mh/mh_init.c: Likewise.
40401	* mh/scan.c: Likewise.
40402
40403	* mh/Makefile.am: Added folder.c and mh_global.c
40404	* mh/.cvsignore: Added folder.
40405	* frm/frm.c: Fixed indentation.
40406
404072002-09-19  Sergey Poznyakoff
40408
40409	* mh/mhpath.c: New file. Source for mhpath command.
40410	* mh/Makefile.am: Added mhpath.
40411	* mh/.cvsignore: Likewise.
40412	* mh/mh_msgset.c (msgset_preproc): Expand the second part
40413	  of the message spec as well (the one after dash).
40414	  (mh_msgset_parse): Fill message set with message ordinal
40415	  numbers.
40416	  (mh_search_message): Binary search for a message with the
40417	  given sequence number.
40418	  (mh_get_message): Retrieve the message with the given sequence
40419	  number.
40420	* mh/mh.h (mh_get_message): New prototype.
40421	* mh/mh_init.c (mh_iterate): Rewritten to expect msgset to
40422	  contain message ordinal numbers.
40423
404242002-09-19  Sergey Poznyakoff
40425
40426	* mailbox/mbx_mh.c (_mh_message_save): Take into account
40427	  trailing newline returned by envelope_date (should it
40428	  be returned, by the by?)
40429	  Output a newline to separate the headers from the body.
40430	  (mh_envelope_date): Make sure the returned value is
40431	  terminated with a '\n' character (if the buffer space
40432	  permits).
40433	* mh/inc.c (main): Use mh_open_folder.
40434	* mh/mh.h (mh_init2, mh_is_my_name, mh_iterate): Added prototypes.
40435	  (mh_open_folder, mh_expand_name): Changed prototypes.
40436	* mh/mh_init.c (mh_init2): Fixed generation of the sequence file
40437	  name.
40438	  (mh_open_folder): Take an extra argument: a flag specifying
40439	  whether the folder should be created.
40440	  (mh_expand_name): Changed return data type.
40441	* mh/mh_msgset.c (mh_msgset_parse): Sort the message set and
40442	  remove any duplicates from it.
40443	* mh/refile.c: Initial implementation.
40444	* mh/rmm.c: Updated mh_open_folder invocations.
40445	* mh/scan.c: Likewise.
40446	* mh/.cvsignore: Updated.
40447
404482002-09-18  Sergey Poznyakoff
40449
40450	* mailbox/mailbox.c: Include message.h
40451	* mailbox/mbx_default.c (mu_path_folder_dir): New global. Holds
40452	  the name of the user's folder directory.
40453	* include/mailutils/mailbox.h: Likewise
40454	* mailbox/mbx_mh.c: Preserve the envelope information in the
40455	  message header.
40456	* libmu_scm/mu_guimb.c (_scheme_main): Removed unused variable.
40457
40458	* mh/mh_ctx.c: New file. Context-related functions.
40459	* mh/mh_msgset.c: New file. Mh-specific message sets.
40460	* mh/refile.c: New file. The framework for the refile command.
40461	* mh/Makefile.am: Added new programs.
40462	* mh/mh.h (mh_builtin_fp, mh_msgset_t): New types.
40463	  Added new prototypes.
40464	* mh/mh_argp.c (struct mh_argp_data): New member `doc'. Keeps the
40465	  documentation string.
40466	  (parse_opt): Pass the data->doc member to mh_getopt.
40467	  (mh_argp_parse): Initialize data.doc.
40468	* mh/mh_getopt.c (mh_getopt, mh_help): Accept new argument:
40469	  a pointer to the doc string.
40470	* mh/mh_getopt.h: Likewise.
40471	* mh/mh_init.c: Changed handling of MH profiles.
40472	  (mh_open_folder, mh_get_dir, mh_expand_name, mh_iterate): New
40473	  functions
40474
40475	* mh/rmm.c: Use new mh functions.
40476	* mh/scan.c: Likewise.
40477
404782002-09-17  Sergey Poznyakoff
40479
40480	* m4/gssapi.m4: Removed unused variable
40481
40482	* mh/rmm.c: New file. Source for rmm program.
40483	* mh/Makefile.am: Added rmm.c
40484	* mh/mh.h (mh_open_folder): new function.
40485
40486	* mh/mh_init.c: Split mh_init() in two. The second part,
40487	  mh_init2(), gets called after parsing the arguments.
40488	  (mh_open_folder): New function. Open current folder.
40489
40490	* mh/mh_format.c (mh_format): Bugfix (NULL pointer dereference).
40491	* mh/mh_argp.c (mh_argp_parse): Increased number of arguments.
40492	  The last argument points to a location where to store the
40493	  ordinal number of the first non-option argument (can be NULL).
40494	  Call mh_init2() after parsing.
40495	* mh/mh_getopt.h (mh_argp_parse): Updated declaration.
40496	* mh/inc.c (main): Updated invocation of mh_argp_parse.
40497	* mh/scan.c: Likewise.
40498
404992002-09-12  Sergey Poznyakoff
40500
40501	In order to make libmailutils self-contained, shuffled several
40502	files from lib/ to mailutils/.
40503
40504	Added standalone guile module.
40505
40506	* m4/mu_libobj.m4: New file. mu-specific version of
40507	  AC_LIBOBJS.
40508	* m4/Makefile.am: Added mu_libobj.m4
40509
40510	* configure.ac: Use MU_LIBOBJS on functions needed for
40511	  libmailbox.
40512	  Add mailutils.scm to GUILE_PKGDATA.
40513
40514	* libmu_scm/Makefile.am: Install libmu_scm. Added new rule
40515	  for building guile standalone mailutils module -- mailutils.scm
40516	* libmu_scm/.cvsignore: Updated.
40517	* libmu_scm/mu_scm.c (mu-register-format): New
40518	  primitive. Registers desired mailbox/mailer formats.
40519	  (mu_scm_init): Unconditionally register path_record format.
40520	* libmu_scm/mailutils.scm.in: Source for mailutils.scm -- a module
40521	  interface file for mailutils.
40522	* libmu_scm/.cvsignore: Updated
40523	* guimb/Makefile.am: Load libmu_scm.la
40524
40525	* lib/Makefile.am: Removed argp-related stuff.
40526	* lib/strndup.c: Moved to mailbox/
40527	* lib/strtok_r.c: Likewise.
40528	* lib/strnlen.c: Likewise.
40529	* lib/getline.c: Likewise.
40530	* lib/strchrnul.c: Likewise.
40531	* lib/argp-ba.c: Likewise.
40532	* lib/argp-eexst.c: Likewise.
40533	* lib/argp-fmtstream.c: Likewise.
40534	* lib/argp-fs-xinl.c: Likewise.
40535	* lib/argp-help.c: Likewise.
40536	* lib/argp-parse.c: Likewise.
40537	* lib/argp-pv.c: Likewise.
40538	* lib/argp-pvh.c: Likewise.
40539	* lib/argp-xinl.c: Likewise.
40540	* lib/argcv.c: Likewise.
40541	* lib/argp-fmtstream.h: Likewise.
40542	* lib/argp-namefrob.h: Likewise.
40543	* lib/getopt.h: Likewise.
40544
40545	* mailbox/Makefile.am: Added argp-related stuff.
40546	* mailbox/strndup.c: Moved from lib/
40547	* mailbox/strtok_r.c: Likewise.
40548	* mailbox/strnlen.c: Likewise.
40549	* mailbox/getline.c: Likewise.
40550	* mailbox/strchrnul.c: Likewise.
40551	* mailbox/argp-ba.c: Likewise.
40552	* mailbox/argp-eexst.c: Likewise.
40553	* mailbox/argp-fmtstream.c: Likewise.
40554	* mailbox/argp-fs-xinl.c: Likewise.
40555	* mailbox/argp-help.c: Likewise.
40556	* mailbox/argp-parse.c: Likewise.
40557	* mailbox/argp-pv.c: Likewise.
40558	* mailbox/argp-pvh.c: Likewise.
40559	* mailbox/argp-xinl.c: Likewise.
40560	* mailbox/argcv.c: Likewise.
40561	* mailbox/argp-fmtstream.h: Likewise.
40562	* mailbox/argp-namefrob.h: Likewise.
40563	* mailbox/getopt.h: Likewise.
40564
40565	* include/mailutils/gnu/: New directory. Holds GNU headers that
40566	  might be missing on the system, but are necessary for mailutils.
40567	* include/mailutils/Makefile.am: Added gnu to SUBDIRS.
40568	* include/mailutils/gnu/Makefile.am: New file.
40569	* include/mailutils/gnu/.cvsignore: New file.
40570	* lib/argp.h: Moved to ...
40571	* include/mailutils/gnu/argp.h: ... here
40572	* lib/argcv.h: Moved to ...
40573	* include/mailutils/argcv.h: ... here
40574	* include/mailutils/argp.h: Conditionally include <gnu/argp.h>
40575
40576	* mailbox/mu_argp.c: Changed license to Lesser GPL
40577	* mailbox/mu_auth.c: Likewise.
40578	* mailbox/system.c: Likewise.
40579
40580	* auth/pam.c: Likewise
40581	* auth/sql.c: Likewise
40582	* auth/virtual.c: Likewise
40583
40584	* comsat/cfg.c: Removed include <argcv.h>
40585	* comsat/comsat.h: Include mailutils/argcv.h
40586	* sieve/sieve.c: Likewise.
40587	* imap4d/fetch.c: Likewise.
40588	* mail/mail.h: Likewise.
40589	* mailbox/argcv.c: Likewise.
40590	* mh/mh_argp.c: Likewise.
40591	* dotlock/dotlock.c: Include mailutils/argp.h
40592	* mh/mh_getopt.h: Likewise.
40593	* mailbox/Makefile.am: Fixed INCLUDES
40594	* mh/mh.h: Removed include <argp.h>
40595	* mh/mh_error.c: Likewise.
40596	* mailbox/mu_argp.c: Removed include <xalloc.h>
40597
405982002-09-10  Sergey Poznyakoff
40599
40600	Added support for Guile 1.6.0:
40601
40602	* configure.ac: Changed check for guile. Raised patchlevel to
40603	  0.1.1
40604	* m4/guile.m4: New file. Check for guile presence and usability.
40605	  Determine its version.
40606	* m4/Makefile.am: Add guile.m4
40607
40608	* scripts/Makefile.am: Updated
40609	* scripts/guile-1.4: New directory. Contains scripts for use
40610	  with guile 1.4.x
40611	* scripts/guile-1.6: New directory. Contains scripts for use
40612	  with guile 1.6 and hopefully higher.
40613	* scripts/guile-1.4/Makefile.am: New file.
40614	* scripts/guile-doc-snarf: Moved to ...
40615	* scripts/guile-1.4/guile-doc-snarf: ... here
40616	* scripts/guile-func-name-check: Moved to ...
40617	* scripts/guile-1.4/guile-func-name-check: ... here
40618	* scripts/guile-snarf.awk: Moved to ...
40619	* scripts/guile-1.4/guile-snarf.awk: ... here
40620
40621	* scripts/guile-1.6/Makefile.am: New file.
40622	* scripts/guile-1.6/guile-doc-snarf: New file.
40623	* scripts/guile-1.6/guile-doc-snarf.awk: New file.
40624
40625	* guimb/Makefile.am: Added @GUILE_INCLUDES@ and @GUILE_LIBS@.
40626	* libmu_scm/Makefile.am: Added @GUILE_INCLUDES@. Changed
40627	  snarfing rules.
40628	* mail.local/Makefile.am: Added @GUILE_INCLUDES@ and @GUILE_LIBS@.
40629	* guimb/scm/sieve.scm.in: string->obarray-symbol is deprecated
40630	  in 1.6.0. Use another approach.
40631
40632	* libmu_scm/mu_address.c: Upgrade to guile 1.6.0
40633	* libmu_scm/mu_body.c: Likewise.
40634	* libmu_scm/mu_guimb.c: Likewise.
40635	* libmu_scm/mu_logger.c: Likewise.
40636	* libmu_scm/mu_mailbox.c: Likewise.
40637	* libmu_scm/mu_message.c: Likewise.
40638	* libmu_scm/mu_scm.c: Likewise.
40639	* libmu_scm/mu_scm.h: Likewise.
40640
40641	* auth/sql.c (mu_sql_authenticate): Removed unused variable.
40642
406432002-09-05  Sergey Poznyakoff
40644
40645	* mailbox/mbx_mh.c: Rewritten to use MH sequence numbers
40646	  as UIDs. This allows to simplify the code and to get rid
40647	  of mh_message_number(), which didn't fit well in the
40648	  mailutils framework.
40649	* mh/mh.h: Changed type of `prog' to mh_instr_t, which is
40650	  a union of all objects that can be held in a program text
40651	  cell. This fixes potential problems due to sizeof(int)!=
40652	  sizeof(void*).
40653	* mh/mh_fmtgram.y: Likewise.
40654	* mh/mh_format.c: Likewise.
40655	* mh/mh_init.c (mh_message_number): A wrapper around
40656	  message_get_uid call. Returns the sequence number of
40657	  the message.
40658
406592002-09-04  Sergey Poznyakoff
40660
40661	* README: Verbose description of --with-mail-spool configuration
40662	  option. Spell-checked the file.
40663
40664	* examples/http.c: New file. Example of stream functions.
40665	* examples/Makefile.am: Added http.c
40666	* doc/texinfo/Makefile.am: Added http.c.texi.
40667	* doc/texinfo/.cvsignore: Likewise.
40668	* doc/texinfo/stream.texi: Include http.c.texi.
40669
406702002-09-03  Sergey Poznyakoff
40671
40672	* mailbox/md5-rsa.c: Removed.
40673	* mailbox/md5-rsa.h: Removed.
40674	* mailbox/md5.c: Introduced instead.
40675	* mailbox/md5.h: Likewise.
40676	* mailbox/Makefile.am: Use md5.[ch]
40677	* mailbox/message.c: Likewise.
40678	* mailbox/mbx_pop.c: Likewise.
40679	  (pop_get_message): Bugfix: check that the message number be not
40680	  out of range.
40681
40682	* doc/texinfo/framework.texi: Included parse822 as extra node.
40683
406842002-09-03  Sergey Poznyakoff
40685
40686	* configure.ac: Bumped version number to 0.1
40687	* Makefile.am: Added copyleft header. Removed README-alpha from
40688	  EXTRA_DIST and added it to AUTOMAKE_OPTIONS. Removed incomplete
40689	  mh.
40690	* auth/Makefile.am: Added copyleft header.
40691	* comsat/Makefile.am: Likewise
40692	* doc/Makefile.am: Likewise
40693	* doc/man/Makefile.am: Likewise
40694	* doc/rfc/Makefile.am: Likewise
40695	* doc/texinfo/Makefile.am: Likewise
40696	* dotlock/Makefile.am: Likewise
40697	* examples/Makefile.am: Likewise
40698	* frm/Makefile.am: Likewise
40699	* frm/testsuite/Makefile.am: Likewise
40700	* from/Makefile.am: Likewise
40701	* from/testsuite/Makefile.am: Likewise
40702	* guimb/Makefile.am: Likewise
40703	* guimb/scm/Makefile.am: Likewise
40704	* imap4d/Makefile.am: Likewise
40705	* imap4d/testsuite/Makefile.am: Likewise
40706	* include/Makefile.am: Likewise
40707	* include/mailutils/Makefile.am: Likewise
40708	* lib/Makefile.am: Likewise
40709	* lib/posix/Makefile.am: Likewise
40710	* libmu_scm/Makefile.am: Likewise
40711	* m4/Makefile.am: Likewise
40712	* mail/Makefile.am: Likewise
40713	* mail/testsuite/Makefile.am: Likewise
40714	* mail.local/Makefile.am: Likewise
40715	* mail.remote/Makefile.am: Likewise
40716	* mailbox/Makefile.am: Likewise
40717	* mailbox/include/Makefile.am: Likewise
40718	* mailbox/testsuite/Makefile.am: Likewise
40719	* mapi/Makefile.am: Likewise
40720	* messages/Makefile.am: Likewise
40721	* messages/testsuite/Makefile.am: Likewise
40722	* mh/Makefile.am: Likewise
40723	* pop3d/Makefile.am: Likewise
40724	* pop3d/testsuite/Makefile.am: Likewise
40725	* readmsg/Makefile.am: Likewise
40726	* readmsg/testsuite/Makefile.am: Likewise
40727	* scripts/Makefile.am: Likewise
40728	* sieve/testsuite/Makefile.am: Likewise
40729	* testsuite/Makefile.am: Likewise
40730
40731	* doc/texinfo/mailutils.texi: Commented out inclusion of
40732	  c-api.texi
40733	* examples/url-parse.c: Indent output with explicit \t.
40734	* mailbox/testsuite/Urls: Add comment regarding the use of tabs.
40735
40736	* sieve/md5-rsa.h: Removed.
40737	* sieve/md5-rsa.c: Removed.
40738	* sieve/Makefile.am: Added copyleft header. Removed
40739	  RSA-copyrighted code, use lib/md5 instead.
40740	* sieve/script.c: Use FSF md5 functions.
40741
407422002-09-02  Sergey Poznyakoff
40743
40744	* NEWS: Updated.
40745	* README: Updated.
40746	* TODO: Updated.
40747	* doc/texinfo/mailer.texi: Removed confusing note: yes, one
40748	  always has to give -t to sendmail to force it to get recipient
40749	  addresses from the headers.
40750	* doc/texinfo/mailutils.texi: Commented out references to
40751	  mailbox2 stuff.
40752	* examples/addr.c: Untabified. Needed for proper conversion to
40753	  *.texi
40754	* examples/mimetest.c: Likewise.
40755	* examples/msg-send.c: Likewise.
40756	* examples/muemail.c: Likewise.
40757	* examples/sfrom.c: Likewise.
40758	* examples/url-parse.c: Likewise.
40759
407602002-09-02  Sergey Poznyakoff
40761
40762	* comsat/comsat.c: Removed erroneous redeclaration of
40763	  getutent.
40764	* doc/texinfo/c-api.texi: Removed reference to non-implemented
40765	  NNTP.
40766	* doc/texinfo/programs.texi: Documented sieve.
40767
40768	* guimb/scm/sieve.scm: Removed.
40769	* guimb/scm/sieve.scm.in: Added to the repository.
40770	* guimb/scm/Makefile.am: Make sieve.scm from sieve.scm.in
40771	* guimb/scm/.cvsignore: Added sieve.scm
40772	* guimb/scm/sieve-core.scm (sieve-expand-filename): Fixed syntax error.
40773
40774	* mailbox/mutil.c (mu_tempname): New function. Creates a unique
40775	  temporary file name in tmpdir.
40776	* include/mailutils/mutil.h: Likewise.
40777	* mail/edit.c: Use mu_tempname
40778	* mail/visual.c: Likewise.
40779	* examples/mimetest.c: Likewise.
40780
40781	* testsuite/lib/mailutils.exp: Couple of fixes.
40782	* sieve/testsuite/sieve/DISTFILES: Temporarily removed compile.exp:
40783	  it uses files not included in the distribution.
40784
407852002-08-29  Sergey Poznyakoff
40786
40787	* Makefile.am: Added examples/ to SUBDIRS.
40788	* configure.ac: Build mailbox/testsuite/Makefile and
40789	  examples/Makefile
40790	* doc/texinfo/Makefile.am: Rules to generate examples .texi
40791	  from sources in ../examples.
40792	* doc/texinfo/address.texi: include address.c.texi
40793	* doc/texinfo/url.texi: include url-parse.c.texi
40794
40795	* doc/texinfo/ex-address.texi: Removed. Auto-generated file.
40796	* doc/texinfo/ex-url.texi: Likewise.
40797	* doc/texinfo/sfrom.c.texi: Likewise.
40798	* doc/texinfo/.cvsignore: Added autogenerated files.
40799
40800	* examples/Makefile: Removed.
40801	* examples/Addrs: Removed. Incorporated into mailbox/testsuite.
40802	* examples/Addrs.good: Likewise.
40803	* examples/Urls: Likewise.
40804	* examples/Urls.good: Likewise.
40805	* examples/mail.MysqlMailer.c: Removed obsolete file. mail.local
40806	  provides the same functionality.
40807	* examples/mbox-check.c: Removed.
40808	* examples/mbox-dates.c: Removed.
40809	* examples/mbox-explode.c: Removed.
40810
40811	* examples/Makefile.am: New file.
40812	* examples/sfrom.c: New file.
40813	* examples/addr.c: Added copyleft header. Set user email domain
40814	  to localhost on startup.
40815	* examples/mimetest.c: Added copyleft header. Changed output
40816	  format to better suit testing.
40817	* examples/msg-send.c: Added copyleft header. Reindented.
40818	* examples/muemail.c: Likewise.
40819	* examples/url-parse.c: Likewise.
40820
40821	* guimb/scm/sieve-core.scm (sieve-expand-filename): Do not attempt
40822	  to expand meta-characters understood by mailbox_create_default.
40823
40824	* lib/argp-help.c: Define __P() if necessary.
40825	* mail/copy.c (mail_copy0): Make sure we really got the message.
40826	* mail/next.c (mail_next): Do not allow the cursor to grow past
40827	  total number of messages.
40828	* mailbox/locker.c: Provide definition for MAXHOSTNAMELEN, if
40829	  necessary.
40830
40831	* testsuite/lib/mailutils.exp (mu_version): Check if MU_CAPABILITY
40832	  exists. One never knows...
40833	  (mu_command): Additional diagnostics
40834	  (mu_expect_list,mu_test): Commented out extra checks.
40835
40836	* mailbox/Makefile.am: Added testsuite
40837	* mailbox/testsuite: New directory.
40838	* mailbox/testsuite/Makefile.am: New file.
40839	* mailbox/testsuite/.cvsignore: New file.
40840	* mailbox/testsuite/Addrs: New file.
40841	* mailbox/testsuite/Mime: New file.
40842	* mailbox/testsuite/Urls: New file.
40843	* mailbox/testsuite/lib: New directory.
40844	* mailbox/testsuite/lib/DISTFILES: New file.
40845	* mailbox/testsuite/lib/mailbox.exp: New file.
40846	* mailbox/testsuite/mailbox: New directory.
40847	* mailbox/testsuite/mailbox/DISTFILES: New file.
40848	* mailbox/testsuite/mailbox/address.exp: New file.
40849	* mailbox/testsuite/mailbox/mime.exp: New file.
40850	* mailbox/testsuite/mailbox/url.exp: New file.
40851
408522002-08-28  Sergey Poznyakoff
40853
40854	* sieve/interp.c (sieve_interp_alloc): Fill allocated memory
40855	  with zeroes.
40856	* sieve/svcb.c: Implemented envelope test (see comment, though)
40857	* sieve/sieve-gram.y: Include "sieve.h"
40858	* sieve/sieve-lex.l: Handle C-style comments.
40859	* sieve/sieve.c: Handle --license option. Additional debugging
40860	  flags: 'a' to produce address parser traces, 'g' to produce
40861	  main parser traces.
40862	* sieve/sieve_interface.h (addrdebug, yydebug): external
40863	  declarations.
40864
40865	* include/mailutils/argp.h (mu_license_text): External
40866	  declaration.
40867	* mailbox/mu_argp.c (mu_license_text): removed static
40868	  qualifier.
40869
40870	* configure.ac: Added testsuite for sieve. Changed version number
40871	  to 0.0.9e.
40872	* sieve/Makefile.am: Likewise
40873
40874	* sieve/testsuite: New directory.
40875	* sieve/testsuite/Makefile.am: New file.
40876	* sieve/testsuite/.cvsignore: New file.
40877	* sieve/testsuite/lib: New directory.
40878	* sieve/testsuite/lib/DISTFILES: New file.
40879	* sieve/testsuite/lib/sieve.exp: New file.
40880	* sieve/testsuite/scripts: New directory.
40881	* sieve/testsuite/scripts/DISTFILES: New file.
40882	* sieve/testsuite/scripts/addr_is_all.sv: New file.
40883	* sieve/testsuite/scripts/addr_is_domain.sv: New file.
40884	* sieve/testsuite/scripts/addr_is_local.sv: New file.
40885	* sieve/testsuite/scripts/addr_matches.sv: New file.
40886	* sieve/testsuite/scripts/address.sv: New file.
40887	* sieve/testsuite/scripts/allof00.sv: New file.
40888	* sieve/testsuite/scripts/allof01.sv: New file.
40889	* sieve/testsuite/scripts/allof11.sv: New file.
40890	* sieve/testsuite/scripts/anyof00.sv: New file.
40891	* sieve/testsuite/scripts/anyof01.sv: New file.
40892	* sieve/testsuite/scripts/anyof11.sv: New file.
40893	* sieve/testsuite/scripts/discard.sv: New file.
40894	* sieve/testsuite/scripts/envelope1.sv: New file.
40895	* sieve/testsuite/scripts/exists1.sv: New file.
40896	* sieve/testsuite/scripts/exists2.sv: New file.
40897	* sieve/testsuite/scripts/exists3.sv: New file.
40898	* sieve/testsuite/scripts/false.sv: New file.
40899	* sieve/testsuite/scripts/fileinto.sv: New file.
40900	* sieve/testsuite/scripts/header1.sv: New file.
40901	* sieve/testsuite/scripts/header2.sv: New file.
40902	* sieve/testsuite/scripts/header3.sv: New file.
40903	* sieve/testsuite/scripts/keep.sv: New file.
40904	* sieve/testsuite/scripts/not.sv: New file.
40905	* sieve/testsuite/scripts/null.sv: New file.
40906	* sieve/testsuite/scripts/size1.sv: New file.
40907	* sieve/testsuite/scripts/size2.sv: New file.
40908	* sieve/testsuite/scripts/stop.sv: New file.
40909	* sieve/testsuite/scripts/true.sv: New file.
40910
40911	* sieve/testsuite/sieve: New directory.
40912	* sieve/testsuite/sieve/DISTFILES: New file.
40913	* sieve/testsuite/sieve/action.exp: New file.
40914	* sieve/testsuite/sieve/address.exp: New file.
40915	* sieve/testsuite/sieve/allof.exp: New file.
40916	* sieve/testsuite/sieve/anyof.exp: New file.
40917	* sieve/testsuite/sieve/compile.exp: New file.
40918	* sieve/testsuite/sieve/envelope.exp: New file.
40919	* sieve/testsuite/sieve/exists.exp: New file.
40920	* sieve/testsuite/sieve/false.exp: New file.
40921	* sieve/testsuite/sieve/header.exp: New file.
40922	* sieve/testsuite/sieve/not.exp: New file.
40923	* sieve/testsuite/sieve/size.exp: New file.
40924	* sieve/testsuite/sieve/true.exp: New file.
40925
40926	* testsuite/lib/mailutils.exp (mu_exec): added -arg-list option.
40927	* testsuite/spool/sieve.mbox: New file. Mailbox for testing sieve.
40928	* testsuite/spool/DISTFILES: Added sieve.mbox
40929	* imap4d/testsuite/imap4d/list.exp: Updated to match new spooldir
40930	  contents.
40931
409322002-08-27  Sergey Poznyakoff
40933
40934	* frm/frm.c: Fixed return status when the mailbox does not exist.
40935	* frm/Makefile.am: Added testsuite
40936	* frm/testsuite: new directory.
40937	* frm/testsuite/Makefile.am: new file.
40938	* frm/testsuite/.cvsignore: new file.
40939	* frm/testsuite/frm: new directory.
40940	* frm/testsuite/frm/DISTFILES: new file.
40941	* frm/testsuite/frm/test.exp: new file.
40942
40943	* from/Makefile.am: Added testsuite
40944	* from/testsuite: new directory.
40945	* from/testsuite/Makefile.am: new file.
40946	* from/testsuite/.cvsignore: new file.
40947	* from/testsuite/from: new directory.
40948	* from/testsuite/from/DISTFILES: new file.
40949	* from/testsuite/from/test.exp: new file.
40950
40951	* messages/messages.c: Added "mailbox" command line capability.
40952	* messages/Makefile.am: Added testsuite
40953	* messages/testsuite: new directory.
40954	* messages/testsuite/Makefile.am: new file.
40955	* messages/testsuite/.cvsignore: new file.
40956	* messages/testsuite/messages: new directory.
40957	* messages/testsuite/messages/DISTFILES: new file.
40958	* messages/testsuite/messages/test.exp: new file.
40959
40960	* readmsg/readmsg.h: Added include <mailutils/url.h>
40961	* readmsg/readmsg.c (struct argp_option options): Fixed definition
40962	  of -a option.
40963	  (print_header): Last header was never seen.
40964
40965	* readmsg/Makefile.am: Added testsuite
40966	* readmsg/testsuite: new directory.
40967	* readmsg/testsuite/Makefile.am
40968	* readmsg/testsuite/.cvsignore: new file.
40969	* readmsg/testsuite/readmsg: new directory.
40970	* readmsg/testsuite/readmsg/DISTFILES: new file.
40971	* readmsg/testsuite/readmsg/test.exp: new file.
40972
40973	* imap4d/testsuite/config/unix.exp: Renamed to ...
40974	* imap4d/testsuite/config/default.exp: ... this
40975	* imap4d/testsuite/config/DISTFILES: Likewise.
40976
40977	* mail/testsuite/config/unix.exp: Renamed to ...
40978	* mail/testsuite/config/default.exp: ... this
40979	* mail/testsuite/config/DISTFILES: Likewise.
40980
40981	* pop3d/testsuite/config/unix.exp: Renamed to ...
40982	* pop3d/testsuite/config/default.exp: ... this
40983	* pop3d/testsuite/config/DISTFILES: Likewise.
40984
40985	* configure.ac: Added new testsuites.
40986	* testsuite/lib/mailutils.exp (mu_start): Modified.
40987
409882002-08-26  Sergey Poznyakoff
40989
40990	* frm/frm.c: Don't bail out if the mailbox does not exist.
40991	* imap4d/append.c (imap4d_append0): Skip leading whitespace.
40992	* imap4d/fetch.c (fetch_envelope0): Emit whitespace before
40993	  "from" header.
40994	* imap4d/util.c: Fixed typo in comment.
40995	* imap4d/testsuite/imap4d/append.exp: New file
40996	* imap4d/testsuite/imap4d/create.exp: New file
40997	* imap4d/testsuite/imap4d/expunge.exp: New file
40998	* imap4d/testsuite/imap4d/examine.exp: Replaced
40999	  [imap4d_uidvalidity] with simple regexp.
41000	* imap4d/testsuite/imap4d/fetch.exp: Likewise.
41001	* imap4d/testsuite/lib/imap4d.exp (imap4d_test): Added new
41002	  options: -long to emit long IMAP4D literal after the command,
41003	  -silent to be silent about the results of the testcase.
41004
41005	* imap4d/testsuite/imap4d/DISTFILES: Added new files.
41006
41007	* testsuite/lib/mailutils.exp (mu_expect_list): New procedure
41008
410092002-08-23  Sergey Poznyakoff
41010
41011	* configure.ac: Added check for socklen_t.
41012
41013	* imap4d/commands.c: Fixed allowed states for X-VERSION command.
41014	* imap4d/fetch.c (fetch_operation) Fix section specification
41015	  output.
41016        * mail/testsuite/mail/folder.exp: Enabled "folders" test.
41017	* imap4d/testsuite/imap4d/examine.exp:	Moved get_uidvalidity
41018	  to imap4d.exp and renamed it to imap4d_uidvalidity.
41019	* imap4d/testsuite/lib/imap4d.exp: Likewise
41020	  (imap4d_test): Added new switches: -literal and -noliteral
41021
41022	* imap4d/testsuite/imap4d/fetch.exp: New file
41023	* imap4d/testsuite/imap4d/x.exp: New file
41024	* imap4d/testsuite/imap4d/DISTFILES: Added fetch.exp, x.exp
41025	* imap4d/testsuite/imap4d/search.exp: Added comments
41026
41027	* testsuite/spool/mbox: Changed `organization' header
41028	* testsuite/spool/mbox1: Likewise.
41029	* mail/testsuite/mail/write.exp: Adjusted tests to the changes in
41030	  mbox and mbox1.
41031
41032	* libmu_scm/mu_address.c (mu_address_get_count): Fixed
41033	  type of `count' variable
41034	* mailbox/list.c (list_remove): Removed cast from void* to int,
41035	  it does not work on 64-bit machines. Besides, pointer comparison
41036	  is strictly defined by C.
41037	* mailbox/observer.c (observable_detach): Likewise.
41038	* mailbox/tcp.c (_tcp_open): Changed type of `namelen' to
41039	  socklen_t.
41040	* mh/mh_format.c: Changed type of `len' to size_t.
41041
41042	* mail/folders.c (mail_folders): Protect directory name with
41043	  quotes.
41044
410452002-08-23  Sergey Poznyakoff
41046
41047	* testsuite/lib/mailutils.exp: Introduced -re flag
41048	  to handle a pattern as a regular expression, and --
41049	  flag to escape exact strings that actually happen
41050	  to start with "-re".
41051
41052	* imap4d/testsuite/lib/imap4d.exp: Properly handle
41053	  --re and -- flags.
41054
41055	* imap4d/testsuite/imap4d/examine.exp: Use -re to check
41056	  uidvalidity value, as we can never be sure the seconds
41057	  don't change between computing the uidvalidity value and
41058	  running the test.
41059
410602002-08-23  Sergey Poznyakoff
41061
41062	* configure.ac: Check if crypt is declared.
41063	* auth/sql.c: Include <crypt.h> when available
41064	* imap4d/imap4d.h: Include <url.h>
41065	* imap4d/util.c: Descriptive comment on util_uidvalididty.
41066
41067	* lib/mu_asprintf.c: Removed.
41068	* lib/mu_asprintf.h: Provide declarations for (v)asprintf.
41069	* lib/Makefile.am: Removed mu_asprintf.c
41070
41071	* mailbox/mu_argp.c: Do not use asprintf.
41072	* mailbox/mutil.c: Do not use asprintf.
41073	* mailbox/parse822.c (parse822_time): Tolerate unknown
41074	  timezone abbreviations.
41075	* mailbox/system.c: Include <crypt.h> when available
41076
41077	* imap4d/testsuite/imap4d/search.exp: New file. Provides tests
41078	  for SEARCH command.
41079	* imap4d/testsuite/imap4d/DISTFILES: Added search.exp
41080
41081	* testsuite/spool/teaparty.mbox: Fixed timestamps.
41082	* pop3d/testsuite/pop3d/read.exp: Updated to match new mailbox.
41083	* mail/testsuite/mail/z.exp: Likewise.
41084	* mail/testsuite/mail/tag.exp: Likewise.
41085
410862002-08-22  Sergey Poznyakoff
41087
41088	* configure.ac: Create imap4d/testsuite/Makefile
41089	* imap4d/Makefile.am: Added testsuite
41090	* imap4d/testsuite: Added to repository
41091	* imap4d/testsuite/Makefile.am: Likewise.
41092	* imap4d/testsuite/config: Likewise.
41093	* imap4d/testsuite/config/DISTFILES: Likewise.
41094	* imap4d/testsuite/config/unix.exp: Likewise.
41095	* imap4d/testsuite/lib: Likewise.
41096	* imap4d/testsuite/lib/DISTFILES: Likewise.
41097	* imap4d/testsuite/lib/imap4d.exp: Likewise.
41098	* imap4d/testsuite/imap4d: Likewise.
41099	* imap4d/testsuite/imap4d/DISTFILES: Likewise.
41100	* imap4d/testsuite/imap4d/anystate.exp: Likewise.
41101	* imap4d/testsuite/imap4d/examine.exp: Likewise.
41102	* imap4d/testsuite/imap4d/list.exp: Likewise.
41103
41104	* imap4d/util.c (util_uidvalidity): New function. A wrapper
41105	  around mailbox_uidvalidity. When a mailbox is selected whose
41106	  first message does not keep X-UIDVALIDITY value, the uidvalidity
41107	  is computed based on the return of time(). Now, if we call
41108	  "EXAMINE mailbox" or "STATUS mailbox (UIDVALIDITY)" the same
41109          mailbox is opened second time and the uidvalidity recalculated.
41110	  Thus each subsequent call to EXAMINE or STATUS upon an already
41111	  selected mailbox will return different uidvalidity value. To
41112	  avoid this, util_uidvalidity() first sees if it is asked to
41113	  operate upon an already opened mailbox and if so, returns
41114	  previously computed value.
41115
41116	* imap4d/imap4d.h (util_uidvalidity): New function
41117	* imap4d/select.c (imap4d_select_status): Use util_uidvalidity.
41118	* imap4d/status.c (status_uidvalidity): Likewise.
41119	* imap4d/list.c (imap4d_list): Added comment describing
41120	  when INBOX should be output.
41121
41122	* frm/frm.c: Fixed coredump when MAIL environment variable
41123	  has an empty value.
41124	* mailbox/mutil.c (mu_tilde_expansion): Bugfix. Was freeing
41125	  passed homedir, which caused grief later.
41126
411272002-08-21  Jeff Bailey  <jbailey@outpost.dnsalias.org>
41128
41129	* README: Make this a bit more current.
41130
411312002-08-21  Sergey Poznyakoff
41132
41133	Added pop3d testsuite.
41134
41135	* testsuite/makespool: New option -subst: sets sed command
41136	  to be used.
41137	* testsuite/etc/passwd.in: New file. Template for etc/passwd
41138	  for testing pop3d and imap4d.
41139	* testsuite/etc/DISTFILES: Added passwd.in
41140	* testsuite/lib/mailutils.exp (mu_init,mu_version): Modified.
41141
41142	* configure.ac: Added pop3d/testsuite/Makefile
41143	* pop3d/Makefile.am: Likewise.
41144
41145	* pop3d/testsuite: Added to repository
41146	* pop3d/testsuite/Makefile.am: Likewise.
41147	* pop3d/testsuite/config: Likewise.
41148	* pop3d/testsuite/config/DISTFILES: Likewise.
41149	* pop3d/testsuite/config/unix.exp: Likewise.
41150	* pop3d/testsuite/lib: Likewise.
41151	* pop3d/testsuite/lib/DISTFILES: Likewise.
41152	* pop3d/testsuite/lib/pop3d.exp: Likewise.
41153	* pop3d/testsuite/pop3d: Likewise.
41154	* pop3d/testsuite/pop3d/DISTFILES: Likewise.
41155	* pop3d/testsuite/pop3d/read.exp: Likewise.
41156
41157	* mail/testsuite/lib/mail.exp: Updated
41158	* mailbox/mu_argp.c: New hidden option
41159	  --show-config-options. Displays a list of configuration
41160	  defines from config.h
41161
411622002-08-20  Sergey Poznyakoff
41163
41164	* Makefile.am: Added testsuite subdirectory
41165	* configure.ac: Likewise.
41166	* auth/virtual.c: A couple of bugfixes. Introduced
41167	  --virtual-passwd-dir switch to override the
41168	  default placement of virtual domain password files.
41169
41170	* testsuite: New dir. Common files for all testsuites.
41171	* testsuite/lib: New dir.
41172	* testsuite/lib/mailutils.exp: New file. Common test driver.
41173
41174	* mail/testsuite/spool: Moved to ...
41175	* testsuite/spool: ... here
41176
41177	* mail/testsuite/folder: Moved to ...
41178	* testsuite/folder: ... here
41179
41180	* mail/testsuite/etc: Moved to ...
41181	* testsuite/etc: ... here
41182
41183	* mail/testsuite/Makefile.am: Removed etc, spool and folder test
41184	  dirs.
41185	* mail/testsuite/lib/mail.exp: Updated.
41186	* mail/testsuite/mail/folder.exp: Updated.
41187	* mail/testsuite/mail/write.exp: Updated.
41188
411892002-08-15  Sergey Poznyakoff
41190
41191	* configure.ac: If -lcrypt is present, add it to LIBS
41192	  not to AUTHLIBS.
41193	* auth/system.c: Moved to ...
41194	* mailbox/system.c: ... here.
41195	* auth/Makefile.am: Moved system.c to
41196	* mailbox/Makefile.am: ... here.
41197
41198	* mailbox/mu_auth.c: Provide "generic:system" as
41199	  default.
41200
41201	* mailbox/sendmail.c (sendmail_send_message): Bugfix. In spite
41202	  of what the comment said, -t option is not implicit and must
41203	  be specified.
41204
41205	* mail/from.c: Bugfix: display even messages without Subject: or
41206	  From: headers.
41207	* mail/reply.c: Fixed improper use of header_aget_value().
41208	* mail/util.c (util_do_command): For compatibility with older
41209	  mails	treat a number alone on the line as "print NUMBER".
41210
412112002-08-14  Sergey Poznyakoff
41212
41213	* auth/virtual.c: Removed vestiges of mu_virtual_domain.
41214	* doc/texinfo/programs.texi: Documented authentication concepts
41215	  and related command line options.
41216	* mail/testsuite/makespool: Added GNU copyleft header.
41217
412182002-08-13  Sergey Poznyakoff
41219
41220	* pop3d/apop.c: Switched to the new authentication/authorization
41221	  functions.
41222
412232002-08-13  Sergey Poznyakoff
41224
41225	To avoid confusion, pruned libmailbox directory.
41226
41227	* libmailbox/mailbox.c: Removed obsolete files.
41228	* libmailbox/maildir.c: Likewise.
41229	* libmailbox/mh.c: Likewise.
41230	* libmailbox/unixmbox.c: Likewise.
41231	* libmailbox/Makefile.am: Likewise.
41232	* libmailbox/mailbox.h: Likewise.
41233	* libmailbox/maildir.h: Likewise.
41234	* libmailbox/mh.h: Likewise.
41235	* libmailbox/unixmbox.h: Likewise.
41236
41237	* MySql/Makefile.am: Removed.
41238	* MySql/MySql.c: Likewise.
41239	* MySql/MySql.h: Likewise.
41240	* MySql/.cvsignore
41241
41242	* auth/sql.c: Merged sql core stuff from MySql/MySql.c.
41243	* auth/virtual.c: All functions made static.
41244	* auth/system.c: Likewise.
41245	* Makefile.am: Removed MySql
41246	* configure.ac: Likewise.
41247
412482002-08-13  Sergey Poznyakoff
41249
41250	Moved authentication specific calls scattered all over the
41251	code to one place: libmuauth library. The new code returns
41252	authorization credentials in struct mu_auth_data. It contains
41253	all information from struct passwd as well as some
41254	mailutils-specific information. New options `--authentication'
41255	and `--authorization' provide a way to override default
41256	settings.
41257
41258	* configure.ac: Check for prototypes of strtok_r, strchrnul,
41259	  strndup, asprintf, vasprintf. Create auth/Makefile
41260	* Makefile.am: Added auth to SUBDIRS.
41261	* MySql/Makefile.am: Added INCLUDES
41262	* MySql/MySql.c: Include <mailutils/error.h>
41263
41264	* comsat/comsat.c: Switched to the new
41265	  authentication/authorization functions.
41266	* guimb/scm/sieve-core.scm: Likewise.
41267	* imap4d/authenticate.c: Likewise.
41268	* imap4d/bye.c: Likewise.
41269	* imap4d/imap4d.c: Likewise.
41270	* imap4d/login.c: Likewise.
41271	* imap4d/namespace.c: Likewise.
41272	* imap4d/rename.c: Likewise.
41273	* pop3d/pop3d.c: Likewise.
41274	* pop3d/user.c: Likewise.
41275	* libmu_scm/mu_util.c: Likewise.
41276	* mail.local/main.c: Likewise.
41277	* mail.local/script.c: Likewise.
41278	* mailbox/mbx_default.c: Likewise.
41279	* mailbox/message.c: Likewise.
41280	* mailbox/wicket.c: Likewise.
41281
41282	* mailbox/mu_argp.c: Removed pam- and sql-specific stuff
41283	* mailbox/mu_auth.c: New file. Basic authentication/authorization
41284	  functions.
41285	* mailbox/Makefile.am: Added mu_auth.c
41286
41287	* auth/: New directory. The libmuauth library.
41288	* auth/system.c: New file. System-specific
41289	  (passwd/shadow) auth functions.
41290	* auth/pam.c: New file. PAM-specific auth functions.
41291	* auth/sql.c: New file. SQL-specific auth functions.
41292	* auth/virtual.c: New file. Virtual-domain-specific auth functions.
41293	* auth/Makefile.am: New file.
41294
41295	* pop3d/virtual.c: Removed.
41296	* pop3d/Makefile.am: Removed virtual.c
41297
41298	* include/mailutils/mu_auth.h: New file. Prototypes for mailutils
41299	  authentication/authorization functions.
41300	* include/mailutils/Makefile.am: Added mu_auth.h.
41301	* include/mailutils/argp.h (mu_register_capa): New prototype.
41302
41303	* include/mailutils/mutil.h (mu_register_getpwnam,
41304	  mu_register_getpwuid,mu_getpwnam,mu_getpwuid,
41305	  mu_virtual_domain): Removed.
41306	* mailbox/mutil.c: Likewise.
41307
41308        * lib/argp-help.c: Provide declarations for strchrnul, strndup
41309	  if necessary.
41310	* lib/mu_asprintf.c: Likewise for vasprintf,asprintf
41311
41312	* imap4d/imap4d.h: Include <mailutils/mu_auth.h>
41313	* comsat/comsat.h: Likewise.
41314	* mail.local/mail.local.h: Likewise.
41315	* pop3d/pop3d.h: Likewise.
41316
41317	* mailbox/smtp.c (message_has_bcc): Fixed inconsistency in
41318	  passing arguments to header_get_value().
41319	* mail/set.c (mail_set): Fixed inconsistency in passing arguments
41320	  to strtoul().
41321	* mail/util.c (util_get_homedir): Do not strdup return.
41322	  mu_get_homedir() does it now.
41323	* mail/var.c (var_insert): Changed declaration to avoid
41324	  `auth shadows parameter' warning.
41325
41326	* mailbox/locker.c (_locker_lock_dotlock): Bugfix: do not leave
41327	  temporary lock file in case of errors
41328
41329	* mailbox/mailbox.c: Include <mailutils/attribute.h>
41330	* mh/mh_init.c: Free return value of mu_get_homedir().
41331
413322002-08-08  Sergey Poznyakoff
41333
41334	* .cvsignore: Updated
41335
41336	* mail/testsuite/.cvsignore: Updated
41337	* mail/testsuite/lib/mail.exp (default_mail_test): Ignore trailing
41338	  whitespace.
41339	* mail/testsuite/mail/alias.exp: Remove trailing whitespace from
41340	  the patterns.
41341	* mail/testsuite/mail/read.exp: Likewise.
41342	* mail/testsuite/mail/tag.exp: Likewise.
41343	* mail/testsuite/mail/write.exp: Likewise.
41344
41345	* mailbox/mu_argp.c: Initialize argp_program_bug_address.
41346	* comsat/comsat.c: Removed argp_program_bug_address. Use
41347	  PACKAGE_STRING, provided by the new autoconf.
41348	* dotlock/dotlock.c: Likewise.
41349	* frm/frm.c: Likewise.
41350	* from/from.c: Likewise.
41351	* guimb/main.c: Likewise.
41352	* imap4d/imap4d.c: Likewise.
41353	* mail/mail.c: Likewise.
41354	* mail.local/main.c: Likewise.
41355	* mail.remote/mail.remote.c: Likewise.
41356	* messages/messages.c: Likewise.
41357	* mh/inc.c: Likewise.
41358	* mh/scan.c: Likewise.
41359	* sieve/sieve.c: Likewise.
41360	* pop3d/capa.c: Likewise.
41361	* pop3d/pop3d.c: Likewise. Imply debug mode if the input stream is
41362	  connected to a tty. Don't try to switch to "mail" group id in
41363	  debug mode.
41364
41365	* pop3d/popauth.c: Parse arguments using mu_argp instead of
41366	  getopt_long.
41367	* readmsg/readmsg.c: Likewise.
41368
413692002-08-07  Sergey Poznyakoff
41370
41371	* mail/mail.h (struct mail_env_entry): Reorganized. Added
41372	  type member and changed "value" to be a union.
41373	  (environment functions): Changed prototypes.
41374	  (util_folder_path): New prototype.
41375	* mail/util.c: Rewritten internal environment functions.
41376	  Environment variables are now typed, so setting "set folder=1"
41377	  won't cause coredumps anymore. The function util_getenv() is
41378	  used to retrieve a variable of given data type. util_find_env()
41379	  takes second argument specifying whether it should create a
41380	  missing variable. This function is used only in util.c and
41381	  var.c.
41382	* mail/set.c: Use util_setenv().
41383
41384	* mail/alt.c: Use util_getenv().
41385	* mail/copy.c: Use util_getenv(). Honour outfolder variable, when
41386	  set.
41387	* mail/decode.c: Use util_getenv().
41388	* mail/delete.c: Likewise.
41389	* mail/file.c (mail_expand_name): Use util_getenv() and
41390	  util_folder_path().
41391	* mail/folders.c: Use util_getenv().
41392	* mail/if.c: Likewise.
41393	* mail/mail.c: Likewise. Provide default for "regexp" internal
41394	  variable.
41395	* mail/msgset.y: Likewise.
41396	* mail/pipe.c: Likewise.
41397	* mail/print.c: Likewise.
41398	* mail/quit.c: Likewise.
41399	* mail/send.c: Likewise.
41400	* mail/top.c: Likewise.
41401	* mail/var.c: Likewise.
41402	* mail/mailline.c: Likewise.
41403
41404	* mail/write.c: Honour "outfolder" variable. If called without
41405	  arguments, deduce output file name from the number of current
41406	  message.
41407
41408	* mail/testsuite/makespool: Bugfix.
41409	* mail/testsuite/lib/mail.exp (mail_start): New flag -reuse-spool.
41410	  (default_mail_test): If command is empty do not send anything.
41411	  (mail_test_file): New function. Test the contents of an
41412	  arbitrary file.
41413	* mail/testsuite/mail/write.exp: New file. Tests for message
41414	  saving and disposing commands: delete, mbox, [sS]ave, [wW]rite
41415	* mail/testsuite/mail/DISTFILES: Added write.exp
41416
414172002-08-06  Sergey Poznyakoff
41418
41419	* Makefile.am: Removed distcheck kludge. Testsuite doesn't
41420	  need it anymore.
41421	* mail/testsuite/makespool: New file. Prepares data
41422	  for testsuite.
41423	* mail/testsuite/Makefile.am: Added EXTRA_DIST and
41424	  distclean-local
41425	* mail/testsuite/lib/mail.exp: Fixed paths.
41426	  (mail_prepare_spools,mail_cleanup_spools): new procedures.
41427	* mail/testsuite/mail/folder.exp: Corrected paths.
41428
414292002-08-06  Sergey Poznyakoff
41430
41431	* Makefile.am: Added distcheck rule needed for
41432	  test suite.
41433	* configure.ac: Added missing AH_BOTTOM and descriptions to
41434	  AC_DEFINEs. Replaced sr_STRUCT_TM.* with AC_CHECK_MEMBERS
41435	  (no aggregate members, so it's safe here).
41436	* acconfig.h: Removed
41437	* doc/texinfo/Makefile.am: DISTCLEANFILES
41438	* lib/Makefile.am: Use LTLIBOBJS.
41439
41440	* m4/tm_gmtoff.m4: Removed.
41441	* m4/tm_isdst.m4: Removed.
41442	* m4/tm_zone.m4: Removed.
41443	* m4/Makefile.am: Removed tm_ files.
41444
41445	* mail/testsuite/Makefile.am: Fixed generation of site.exp. Added
41446	  DISTCLEANFILES.
41447
41448	* mailbox/mutil.c: Changed HAVE_TM_.* to HAVE_STRUCT_TM_.*
41449	* mailbox/parse822.c: Likewise.
41450	* mailbox2/mutil.c: Likewise.
41451	* mailbox2/parse822.c: Likewise.
41452	* mh/mh_format.c: Likewise.
41453
41454	* imap4d/authenticate.c (imap4d_auth_capability): New function.
41455	* imap4d/imap4d.h: Likewise.
41456	* imap4d/capability.c (imap4d_capability): call
41457	  imap4d_auth_capability() to output AUTH= capabilities.
41458
414592002-08-05  Jeff Bailey  <jbailey@outpost.dnsalias.org>
41460
41461	* lib/Makefile.am: Remove libtool hacks, automake now handles
41462	LIBOBJS correctly.
41463
41464	* .cvsignore: Add autom4te.cache
41465
41466	* configure.in: Rename to ...
41467	* configure.ac: ... this, and update to autoconf 2.5
41468
41469	* Makefile.am: Now requires Automake 1.6
41470
41471	* m4/malloc.m4: Update from gnulib
41472
41473	* m4/realloc.m4: Update from gnulib
41474
41475	* m4/regex.m4: Update from gnulib
41476
41477	* m4/utmp.m4: Change LIBOBJS to use AC_LIBOBJ
41478
414792002-08-05  Sergey Poznyakoff
41480
41481	* imap4d/version.c: New file. Support for X-VERSION command
41482	* imap4d/Makefile.am: Added version.c
41483
41484	* imap4d/imap4d.c (main): Imply debug mode if the input stream is
41485	  connected to a tty. Don't try to switch to "mail" group id in
41486	  debug mode.
41487	  (imap4d_mainloop): Do not reveal our version. One may issue
41488	  X-VERSION command in authenticated state to get it.
41489	* imap4d/imap4d.h (imap4d_version): New function.
41490
41491	* imap4d/list.c (imap4d_list): Remove state check. Bugfix:
41492	  allow a meta-closure (*) in any position of the word.
41493
41494	* imap4d/util.c (util_finish): Do not allow to switch to
41495	  a higher state in case of command failure.
41496	  (util_do_command): Run the command only if it is allowed in
41497	  the current state.
41498
41499	* imap4d/commands.c: Added entry for X-VERSION
41500	* imap4d/capability.c: Indicate X-VERSION capability.
41501	* imap4d/append.c: Remove state check.
41502	* imap4d/authenticate.c: Likewise.
41503	* imap4d/check.c: Likewise.
41504	* imap4d/close.c: Likewise.
41505	* imap4d/copy.c: Likewise.
41506	* imap4d/create.c: Likewise.
41507	* imap4d/delete.c: Likewise.
41508	* imap4d/examine.c: Likewise.
41509	* imap4d/expunge.c: Likewise.
41510	* imap4d/fetch.c: Likewise.
41511	* imap4d/login.c: Likewise.
41512	* imap4d/logout.c: Likewise.
41513	* imap4d/lsub.c: Likewise.
41514	* imap4d/namespace.c: Likewise.
41515	* imap4d/noop.c: Likewise.
41516	* imap4d/rename.c: Likewise.
41517	* imap4d/search.c: Likewise.
41518	* imap4d/select.c: Likewise.
41519	* imap4d/status.c: Likewise.
41520	* imap4d/store.c: Likewise.
41521	* imap4d/subscribe.c: Likewise.
41522	* imap4d/uid.c: Likewise.
41523	* imap4d/unsubscribe.c: Likewise.
41524
415252002-08-03  Sergey Poznyakoff
41526
41527	Use of attributes made consistent throughout the package:
41528
41529	* imap4d/fetch.c (fetch_flags0): Use util_print_flags.
41530	* imap4d/search.c (cond_keyword): Likewise for
41531	  util_attribute_matches_flag.
41532	* imap4d/imap4d.h (util_print_flags,util_attribute_to_type,
41533	  util_attribute_matches_flag): New prototypes.
41534	* imap4d/select.c (imap4d_select_status): Run imap4d_sync()
41535	  to output EXISTS and RECENT untagged responses.
41536	* imap4d/store.c (get_attribute_type):  Removed.
41537	  util_attribute_to_type() does the job.
41538	  (imap4d_store0): Use util_attribute_to_type().
41539	* imap4d/sync.c: Output the actual number of recent messages.
41540
41541	* imap4d/util.c: For consistency, reduced all operations
41542	  with flags to manipulations with _imap4d_attrlist array
41543	  RFC2060 states that  \Seen flag means "Message has been read",
41544	  so it should be mapped to our MU_ATTRIBUTE_READ.
41545	  (util_print_flags, util_attribute_matches_flag): New functions.
41546
41547	* include/mailutils/mutil.h (mu_register_getpwuid): Fixed proto.
41548	* mailbox/mutil.c: Likewise.
41549
41550	* include/mailutils/attribute.h (MU_ATTRIBUTE_IS_UNSEEN,
41551	  MU_ATTRIBUTE_IS_UNREAD): New macros.
41552	* mailbox/attribute.c (attribute_is_recent): Use
41553	  MU_ATTRIBUTE_IS_UNSEEN.
41554	  (attribute_set_flags): If the required bits are already set,
41555          do not modify anything
41556	  (attribute_unset_flags): If the required bits are already
41557          cleared, do not modify anything
41558	* mailbox/mbx_mbox.c (mbox_messages_recent): use
41559          MU_ATTRIBUTE_IS_UNSEEN.
41560          (mbox_message_unseen): use MU_ATTRIBUTE_IS_UNREAD.
41561        * mailbox/mbx_mh.c (mh_messages_recent, mh_message_unseen): Likewise.
41562
41563	* imap4d/bye.c (imap4d_bye0): Use mailbox_flush.
41564	* imap4d/close.c (imap4d_close): Likewise.
41565	* mail/quit.c (mail_mbox_close): Likewise.
41566	* pop3d/quit.c (pop3d_quit): Likewise.
41567	* include/mailutils/mailbox.h (mailbox_flush): New prototype.
41568	* mailbox/mailbox.c (mailbox_flush): New function. Marks all
41569          messages as seen and saves the attributes to the mailbox,
41570          optionally expunging it.
41571	* mailbox/folder_imap.c (imap_flags): Empty attribute
41572	  list means MU_ATTRIBUTE_SEEN.
41573	* mailbox/mbx_imap.c (flags_to_string): Map \Seen to
41574	  MU_ATTRIBUTE_READ.
41575
415762002-08-02  Sergey Poznyakoff
41577
41578	* MySql/MySql.c (getMpwuid): Bugfix. It should take a pointer as
41579	  its argument;
41580	* MySql/MySql.h: Likewise
41581	* imap4d/sync.c: Rearranged functions to let implicit prototyping
41582	  work.
41583	* imap4d/fetch.c: include argcv.h
41584	  (fetch_send_address): Added const specifier to the declaration.
41585
415862002-08-01  Sergey Poznyakoff
41587
41588	* imap4d/util.c (util_msgset): Some comments
41589	* mailbox/mu_argp.c (read_rc): Bugfix. linebuf must be freed
41590	  no matter was the string accepted or not.
41591	* pop3d/pop3d.c (pop3d_argp_capa): Bugfix. Was missing
41592	  "mailbox" capability.
41593
415942002-08-01  Sergey Poznyakoff
41595
41596	* imap4d/util.c (util_msgset): Bugfix.
41597
41598	* imap4d/sync.c (notify_deleted): Implemented "immediate decrement
41599	  rule" required by RFC2060
41600	  Interchanged reset_uid() and notify(). Notify decides whether
41601	  and when reset_uid must be called.
41602	  (notify): Call reset_uid(). when necessary.
41603	  (reset_uid): Do not call notify().
41604	  (imap4d_sync): Call notify().
41605
41606	* imap4d/imap4d.h (fetch_flags0): New prototype.
41607
41608	* imap4d/fetch.c (fetch_flags0): New function. Produces untagged
41609	  fetch response for FETCH and STORE commands. If necessary outputs
41610	  also UID.
41611	* imap4d/store.c (imap4d_store0): Use fetch_flags0.
41612
41613
416142002-07-27  Sergey Poznyakoff
41615
41616	* imap4d/fetch.c: Do not use strtok_r to parse header values (it
41617	  ignores the quotes). *Lots* of bugfixes beside that.
41618	* imap4d/util.c (util_msgset): Always return sorted msgset with
41619	  no duplicates. Fixed transcript support.
41620	* THANKS: Added Jordy Mallach
41621
416222002-07-26  Sergey Poznyakoff
41623
41624	Provide session transcript support for the daemons. The
41625	transcript is triggered by --transcript option to the
41626	daemon. Its output goes to LOG_FACILITY.debug.
41627	Fixed a couple of bugs in imap4d (Thanks, Jordy!)
41628
41629	* include/mailutils/argp.h (struct daemon_param): New member
41630	  `transcript'.
41631	* mailbox/mu_argp.c (daemon option group): New option
41632	  --transcript.
41633
41634	* imap4d/util.c: Provide session transcript support.
41635
41636	* imap4d/fetch.c (bodystructure,send_parameter_list): Fixed
41637	  possible NULL dereference.
41638	* imap4d/imap4d.c (struct daemon_param): Initialize typescript
41639	  member.
41640	* imap4d/login.c: Changed PAM error handling.
41641	* imap4d/signal.c: Handle SIGPIPE separately. Many clients seem to
41642	  not wait for a response to LOGOUT command.
41643
41644	* pop3d/extra.c (pop3d_outf): New function. Provides output
41645	  functionality with session transcript support.
41646	  (pop3d_readline): Support for session transcript.
41647	* pop3d/pop3d.h (pop3d_outf): New prototype.
41648	* pop3d/apop.c: Use pop3d_outf instead of fprintf
41649	* pop3d/capa.c: Likewise.
41650	* pop3d/dele.c: Likewise.
41651	* pop3d/list.c: Likewise.
41652	* pop3d/noop.c: Likewise.
41653	* pop3d/quit.c: Likewise.
41654	* pop3d/retr.c: Likewise.
41655	* pop3d/rset.c: Likewise.
41656	* pop3d/stat.c: Likewise.
41657	* pop3d/top.c:  Likewise.
41658	* pop3d/uidl.c: Likewise.
41659	* pop3d/user.c: Likewise.
41660	  (pop3d_user): Removed unneeded PAM_ERROR.
41661	* pop3d/pop3d.c: Likewise.
41662	  (struct daemon_param): Initialize transcript member.
41663
416642002-07-23  Sergey Poznyakoff
41665
41666	* imap4d/imap4d.c (imap4d_parse_opt): Fixed dereference of
41667	  child_inputs. Thanks to Jordi Mallach.
41668	* pop3d/pop3d.c (pop3d_parse_opt): Likewise.
41669	  (pop3d_argp_capa): Reordered capabilities to match those of
41670	  imap4d.
41671	* comsat/comsat.c (comsatd_parse_opt): Likewise.
41672
41673	header_aget_value was modified on May 9 but its invocations
41674	throughout the code were not examined. Here goes the fix:
41675
41676	* imap4d/fetch.c: Properly check the return from
41677	  headers_aget_value.
41678	* mail/followup.c: Likewise.
41679	* mail/reply.c: Likewise.
41680
416812002-07-22  Sergey Poznyakoff
41682
41683	* mail/delete.c (mail_delete): Initialize auto variables.
41684	* mail/testsuite/mail/tag.exp: Test "tag" command and message
41685	  selection.
41686	* mail/testsuite/mail/z.exp: Test "z" command.
41687	* mail/testsuite/mail/DISTFILES: Added tag.exp, z.exp
41688	* mail/testsuite/spool/teaparty.mbox: A mailbox for tag.exp and z.exp.
41689	* mail/testsuite/spool/DISTFILES: Added teaparty.mbox
41690	* mail/testsuite/etc/mail.rc: Set screen and columns.
41691
416922002-07-17  Sergey Poznyakoff
41693
41694	* mail/quit.c (mail_mbox_commit): Do not store deleted messages
41695	  into mbox (Thanks Matthew Whitworth).
41696
416972002-07-16  Sergey Poznyakoff
41698
41699	Based on ideas of Matthew Whitworth, moved mailbox file
41700	expansion into a separate function:
41701
41702	* mail/file.c (mail_expand_name): New function. Expands mail
41703	  special characters in a filename.
41704	* mail/mail.h: Likewise.
41705	* mail/copy.c (mail_copy0): Use mail_expand_name().
41706
41707	* mail/quit.c (mail_mbox_commit): Fixed typo.
41708	  (mail_mbox_close): Do not expunge mailboxes if readonly is set.
41709	  Helps in testing mail.
41710	* mail/alt.c: Use mu_errstring() where appropriate.
41711
41712	* mail/testsuite/mail/folder.exp: (new file) A regression test
41713	  for folder and file commands.
41714	* mail/testsuite/mail/DISTFILES: Added folder.exp
41715	* mail/testsuite/folder: (new dir) Data for folder.exp test.
41716	* mail/testsuite/folder/DISTFILES: New file
41717	* mail/testsuite/folder/one: New file
41718	* mail/testsuite/folder/two: New file
41719
41720	* mail/testsuite/Makefile.am: Added folder.
41721	* mail/testsuite/lib/mail.exp: Set MBOX variable.
41722	* mail/testsuite/mail/read.exp: Force readonly mode before
41723	  proceeding.
41724	* mail/testsuite/spool/mbox: (new)
41725	* mail/testsuite/spool/DISTFILES: Added mbox
41726
41727	* THANKS: Added Matthew Whitworth
41728
417292002-07-15  Sergey Poznyakoff
41730
41731	* mail/folders.c (mail_folders): If the value of "folder" variable
41732	  does not start with '/' or '~', assume it is relative to the
41733	  user's homedir.
41734	* mail/file.c (mail_file): Likewise. Thanks to Matthew Whitworth
41735	  <matthew@okcomputer.org> for reporting.
41736
417372002-07-13  Sergey Poznyakoff
41738
41739	* mailbox/mbx_default.c (mailbox_create_default): If the
41740	  mailbox name does not start with a '/' and does not contain
41741	  a protocol specification, assume it is a file name relative
41742	  to the cwd and convert it to the absolute file name.
41743	* mail/size.c: Do not move the cursor after running the command.
41744
41745	* mail/testsuite/lib/mail.exp: Expect the prompt to appear after
41746	  the last pattern.
41747
41748	* mail/testsuite/mail/read.exp: Added tests for size and decode
41749	  commands.
41750	* mail/testsuite/spool/mbox1: Added two MIME messages.
41751
417522002-07-03  Sergey Poznyakoff
41753
41754	* mail/testsuite/lib/mail.exp: Be more stringent in testing.
41755	* mail/testsuite/mail/read.exp: Added tests for Print, top,
41756	  ignore and retain commands.
41757
417582002-07-02  Sergey Poznyakoff
41759
41760	* mail/mail.c (mail_capa): Added "mailbox" capability.
41761
41762	Added framework for dejagnu testsuite.
41763
41764	* configure.in: Call AC_CANONICAL_SYSTEM.
41765	  Create mail/testsuite/Makefile
41766	* mail/Makefile.am: Added testsuite to SUBDIRS.
41767	* mail/testsuite: New dir.
41768	* mail/testsuite/Makefile.am: new file.
41769	* mail/testsuite/.cvsignore: new file.
41770	* mail/testsuite/config: New dir.
41771	* mail/testsuite/config/DISTFILES: new file.
41772	* mail/testsuite/config/unix.exp: Configuration file for Unix.
41773	* mail/testsuite/etc: New dir.
41774	* mail/testsuite/etc/DISTFILES: new file.
41775	* mail/testsuite/etc/mail.rc: site-specific config for testing mail.
41776	* mail/testsuite/lib: New dir.
41777	* mail/testsuite/lib/DISTFILES: new file.
41778	* mail/testsuite/lib/mail.exp: Dejagnu entry points for testing mail.
41779	* mail/testsuite/mail: New dir.
41780	* mail/testsuite/mail/DISTFILES: new file.
41781	* mail/testsuite/mail/alias.exp: Test alias/unalias commands
41782	* mail/testsuite/mail/read.exp: Test mail reading commands
41783	* mail/testsuite/spool: New dir.
41784	* mail/testsuite/spool/DISTFILES: new file.
41785	* mail/testsuite/spool/mbox1: A mailbox for testing.
41786
417872002-06-29  Sergey Poznyakoff
41788
41789	* mail/headers.c: Fix divide by zero (noted by Matthew Whitworth).
41790
417912002-06-27  Sergey Poznyakoff
41792
41793	* libmu_scm/mu_message.c (mu_message_set_header_fields): Bugfix.
41794	* imap4d/login.c (imap4d_login): Removed FIXME note: the user
41795	  need not have a homedir at all.
41796	* mail.local/main.c (make_progfile_name): moved to ...
41797	* mailbox/mutil.c (mu_expand_path_pattern): ... there.
41798	* mail.local/mail.local.h (make_progfile_name): Removed
41799	  prototype.
41800	* include/mailutils/mutil.h (mu_expand_path_pattern): new
41801	  prototype.
41802	* mail.local/script.c (mda_init,mda_next): use mu_expand_path_pattern.
41803
418042002-05-24  Walter J. Mack <wmack@componentsw.com>
41805
41806	* include/mailutils/types.h: Include definition for __PMT
41807	* include/mailutils/list.h: use __PMT in typedef
41808	* include/mailutils/registrar.h: change all callback function
41809	  specs from __P to __PMT
41810	* include/mailutils/filter.h: Likewise.
41811	* include/mailutils/envelope.h: Add conditional closing bracket
41812	  to balance earlier extern "C" {
41813
418142002-05-16  Sergey Poznyakoff
41815
41816	* guimb/scm/sieve-core.scm (sieve-expand-filename): New function.
41817	  Expands ~ in the given pathname, using geteuid.
41818	  (action-fileinto): Use sieve-expand-filename. Be more robust
41819	  in error handling.
41820	* libmu_scm/mu_util.c: Interfaces to functions from mutil.c
41821	* libmu_scm/mu_scm.h (mu_scm_mutil_init): Prototype.
41822	* libmu_scm/mu_scm.c (mu_scm_init): Init mu_util.c.
41823	* libmu_scm/Makefile.am: Added mu_util.c.
41824	* mail.local/mail.local.h (switch_user_id): prototype.
41825	* mail.local/script.c (mda_catch_body): Switch to the
41826	  user's uid and change to his homedir before running his
41827	  filtering script. Switch back to root before running
41828	  mda().
41829
418302002-05-14  Sergey Poznyakoff
41831
41832	* mail.remote/Makefile.am: Removed reference to non-existent
41833	  mail.remote.h
41834
418352002-05-13  Sam Roberts
41836
41837	* comsat/comsat.h, frm/frm.c, from/from.c, guimb/main.c,
41838	  imap4d/imap4d.h, include/mailutils/Makefile.am,
41839	  include/mailutils/argp.h, include/mailutils/mailutils.h,
41840	  include/mailutils/mu_argp.h, mail/mail.h, mail.local/mail.local.h,
41841	  messages/messages.c, pop3d/pop3d.h, sieve/sieve.c: Removed
41842	  redundant mu_ prefix from mailutils/mu_argp.h.
41843	* TODO: Updated.
41844	* Makefile.am, mail.remote/.cvsignore, mail.remote/mail.remote.c,
41845	  configure.in: mail.remote now working as an SMTP forwarder.
41846	* include/mailutils/: mu_features.h, types.h: Merged mu_features.h
41847	  into types.h.
41848	* mailbox/mu_argp.c: Added :mailer group, with option --mailer,-M
41849	  to set the default mailer URL.
41850	* mailbox/smtp.c: Now clearing Bcc: even when there is an explicit
41851	  TO argument. Not the best thing to do, but it seems to be What
41852	  Everybody Does.
41853	* doc/texinfo/mailer.texi: Updated now that smtp mailer is working.
41854	* mailbox/sendmail.c: Looking at other utilities makes me think
41855	  that providing -t to sendmail is optional, need to test this.
41856	* mailbox/parse822.c: Updated TODO list and ran through GNU indent.
41857	* include/mailutils/errno.h, mailbox/muerrno.c: An unsupported
41858	  mailer URL now gives a more specific error than EINVAL.
41859	* mail/mailline.c: Silenced warnings that can appear depending on
41860	  the presence of readline, and various terminal APIs.
41861	* include/mailutils/mailer.h, mailbox/mailer.c,
41862	  mailbox/include/mailer0.h: mailer_get|set_url_default() new
41863	  functions to set the default mailer
41864	* lib/mu_asprintf.h: Removed dependency on mailutils.
41865
418662002-05-13  Sergey Poznyakoff
41867
41868	To avoid dependency problems moved mu_argp.c to mailbox. Changed
41869	license to Lesser GPL.
41870
41871	* lib/mu_argp.h: Moved to ...
41872	* include/mailutils/mu_argp.h: here.
41873	* lib/mu_argp.c: Moved to ...
41874	* mailbox/mu_argp.c: here.
41875
41876	* lib/Makefile.am: Removed mu_argp.* stuff.
41877	* mailbox/Makefile.am: Added mu_argp.c
41878	* include/mailutils/Makefile.am: Added mu_argp.h
41879
41880	* comsat/comsat.h: Changed mu_argp.h to mailutils/mu_argp.h
41881	* frm/frm.c: Likewise.
41882	* from/from.c: Likewise.
41883	* guimb/main.c: Likewise.
41884	* imap4d/imap4d.h: Likewise.
41885	* imap4d/search.c: Likewise.
41886	* mail/mail.h: Likewise.
41887	* mail.local/mail.local.h: Likewise.
41888	* messages/messages.c: Likewise.
41889	* pop3d/pop3d.h: Likewise.
41890	* sieve/sieve.c: Likewise.
41891
41892	* lib/utmp.c: Added missing includes.
41893
418942002-05-12  Sam Roberts
41895
41896	* doc/xml2texi.rb: Converts doxygen XML output to texinfo function
41897	  documentation.
41898
418992002-05-10  Sam Roberts
41900
41901	* mailbox/tcp.c: Not a good day, second typo in a row in
41902	  tcp_stream_create.
41903	* include/mailutils/errno.h, mailbox/muerrno.c, mailbox/tcp.c:
41904	  tcp_stream_create now has more informative errors for no host or
41905	  port
41906	* from/from.c: From now uses mu_argp, and has a debug flag.
41907	* mailbox/tcp.c: The arg check I added was checking floating data
41908	  instead of actual args, serious error, fixed.
41909	* examples/: Addrs, Addrs.good, Makefile, mbox-check.c,
41910	  mbox-dates.c, mbox-explode.c, mimetest.c, msg-send.c: Tweaked
41911	  header files to build without errors.
41912	* examples/muemail.c: Test program for current email address
41913	  completion configuration.
41914	* mailbox/parse822.c: Group names no longer appearing in address
41915	  lists (still parsed correctly).
41916
419172002-05-08  Sam Roberts
41918
41919	* mailbox/: smtp.c, include/mailer0.h: Implemented correct
41920	  semantics for sending mail to bcc'ed addresses.
41921	* include/mailutils/mailer.h, mailbox/mailer.c:
41922	    mailer_check_to(): ensures that there all the to addresses are
41923	    qualified.
41924	    mailer_check_from(): ensures that there is only one address, and
41925	    it is qualified.
41926	* include/mailutils/header.h, mailbox/header.c:
41927	   header_parse(): wasn't ignoring LWSP after "bcc : ...", fixed.	header_set_value():
41928	   header_set_value(): there was no way to remove a field, now
41929	    calling set with a field value of NULL removes the field.
41930	   header_get_value(): was concatenating the values of all the
41931	    fields with the same name, now it doesn't.
41932	   header_get_address(): convenience function to get an address_t
41933	    from a header field.
41934	   header.h: sorted API functions to top of header, and ones used in
41935	    implementing header_t to the bottom.
41936	* include/mailutils/address.h, mailbox/address.c:
41937	    address_concatenate() - appends one address list to another
41938	    address_get_group_count() - the number of groups in an address_t
41939	    address_get_unix_mailbox_count() - the number of unix mailboxes..
41940	* include/mailutils/mutil.h, mailbox/mutil.c:
41941	   mu_get_host_name(): returns this host name, looking gethostname()
41942	    up with gethostbyname() if possible.
41943 	   mu_get_user_email_domain() and family now use mu_get_host_name()
41944	* mailbox/parse822.c: address parsing now creates email addresses
41945	  for unqualified "unix" style mailboxes by using the
41946	  mu_get_user_email_domain().
41947	* include/mailutils/message.h, mailbox/message.c:
41948	  message_create_copy(): creates a copy of a message, useful when you
41949	  want to operate on a temporary copy of a message.
41950	* mailbox/mbx_imap.c: Moved message copy code into
41951	  message_create_copy().
41952	* mailbox/tcp.c: Attempting to connect to port 0 is now an error,
41953	  and resolver failures cause MU_ERR_GETHOSTBYNAME instead of the
41954	  less-than-useful EINVAL.
41955	* include/mailutils/errno.h, mailbox/muerrno.c: Added smtp and
41956	  mailer return codes.
41957	* mailbox/url_smtp.c: _url_smtp_init(): using url_parse(), now
41958	  accepts host AND port as args
41959	* include/mailutils/url.h, mailbox/url.c:
41960	   url_is_scheme(url_t, const char*): new function
41961
419622002-05-02  Sergey Poznyakoff
41963
41964	* comsat/comsat.c: Provide extern declarations for *utent calls.
41965
41966	* lib/utmp.c: (new) Replacements for {set,get,end}utent calls.
41967	* lib/Makefile.am: Added utmp.c
41968
41969	* m4/utmp.m4: (new) Detect presense of utmp.h and
41970	  {set,get,end}utent calls.
41971	* m4/Makefile.am: Added utmp.m4
41972	* configure.in: Call MU_CHECK_UTMP.
41973
41974	* readmsg/msglist.c: Renamed isnumber to is_number. Apparently,
41975	  OS X defines a macro with this name.
41976	* libmu_scm/mu_address.c (_get_address_part): Bugfix. Was passing
41977	  too short a length to fun().
41978	* guimb/scm/numaddr.scm: Changed runtime error reporting.
41979	* guimb/scm/redirect.scm: Likewise. Initialize sender variable.
41980	* guimb/scm/sieve-core.scm: Provide new runtime-message function.
41981
41982	* imap4d/select.c (imap4d_select0): Removed unused variable.
41983	* mail.local/mail.local.h: Changed mda() declaration.
41984	* mail.local/main.c: Likewise.
41985	* mail.local/script.c (mda_catch_body): Check if the message is
41986	  to be delivered here, instead of doing it in deliver(). If the
41987	  message was modified, drop it to the separate temporary file
41988	  first, so that all modifications get to the user's maildrop.
41989
419902002-04-26  Sam Roberts
41991
41992	* include/mailutils/mutil.h: Included <mailutils/types.h>, which
41993	  will get <sys/types.h> & uid_t.
41994	* lib/argp-help.c, messages/messages.c: Made inclusions of
41995	  <malloc.h> conditional on autoconf check.
41996
419972002-04-19  Sergey Poznyakoff
41998
41999	* guimb/scm/sieve.scm (sieve-parse-command): Bugfix: must always
42000	  return a list whose car is the token type.
42001	  New command line options: --debug and --lib-dir
42002	* guimb/scm/mimeheader.scm: (new) Implements "mimeheader"
42003	  extension test. The test is similar to "header" but works
42004	  on multipart MIME messages also.
42005	* guimb/scm/Makefile.am: Added mimeheader.scm
42006
42007	* libmu_scm/mu_message.c: New interfaces: mu-message-multipart?,
42008	  mu-message-get-num-parts, mu-message-get-part
42009	* libmu_scm/mu_port.c (mu_port_mark): Do nothing if the port
42010	  is not in open state.
42011
420122002-04-15  Sam Roberts
42013
42014	* doc/texinfo/programs.texi, include/mailutils/mutil.h,
42015	  lib/mu_argp.c, mailbox/mutil.c: mu_get_user_email() assumed
42016	  we could deliver to the current host, on dialup systems,
42017	  and workstations this may not be true, so allow user names
42018	  to be qualified with the domain that should be used for email
42019	   mu_set_user_email() - email address to use for NULL (current) user
42020	   mu_set_user_email_domain() - domain to use to qualify an @-less
42021	     username
42022	   mu_get_user_email() - now uses default address and domain, if set
42023	   -E,--email-addr - config option, calls mu_set_user_email()
42024	   -D,--email-domain - config option, calls mu_set_user_email_domain()
42025	   :address - group for the above config options
42026	* lib/Makefile.am, lib/mu_asprintf.c, lib/mu_asprintf.h,
42027	  mailbox/Makefile.am: One way to get rid of the annoying warnings
42028	  about asprintf() not being declared is to always call a mailutils
42029	  wrapper function, which in turn calls the real function. That means
42030	  the wrappers (and other functions in lib) will still compile with
42031	  warnings, but the mailbox and utility code can compile clean.
42032	* doc/texinfo/programs.texi: Updated to match lib/mu_argp.c.
42033
420342002-04-15  Sergey Poznyakoff
42035
42036	* acconfig.h: Added placeholders for
42037	  PROGRAM_INVOCATION_NAME_DECLARED and
42038	  HAVE_PROGRAM_INVOCATION_NAME.
42039	  (@BOTTOM@): Provide external declarations for
42040	  program_invocation_.*name if necessary.
42041	* configure.in: Check if program_invocation_.*name are
42042	  declared and/or defined.
42043	* lib/Makefile.am: Always compile pin.c
42044	* lib/pin.c: include <config.h>
42045
42046	* mh/mh.h: Added missing includes. Removed external
42047	  declaration of program_invocation_short_name.
42048	* mh/mh_argp.c (mh_argp_parse): Removed local declarations
42049	  of program_invocation_.* variables.
42050	* mh/mh_getopt.c: Removed include <mh.h>
42051	* mh/mh_init.c: Added include <stdarg.h>
42052
42053	* libmu_scm/mu_scm.h: include <mailutils/url.h>
42054
420552002-04-15  Sergey Poznyakoff
42056
42057	* imap4d/namespace.c (namespace_getfullpath): Translate
42058	  INBOX to the corresponding filename.
42059
42060	* imap4d/copy.c (imap4d_copy0): Removed unnecessary code:
42061	  namespace_getfullpath() now translates INBOX to filename.
42062	* imap4d/select.c: Likewise.
42063	* imap4d/status.c: Likewise.
42064
420652002-04-14  Sam Roberts
42066
42067	* include/mailutils/mutil.h, mailbox/locker.c, mailbox/mutil.c:
42068	  Implemented symlink unrolling before locking.
42069	* lib/mu_argp.c: Config files in ~/ all start with .mu again.
42070
420712002-04-12  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42072
42073	* configure.in: Bump version to 0.0.9d
42074
420752002-04-11  Sergey Poznyakoff
42076
42077	* lib/mu_argp.c: Fixed auto-arranging of
42078	  options groups. Fixed spelling of license option.
42079
42080	* comsat/comsat.c: Fixed spelling of "license" option.
42081	* frm/frm.c: Likewise.
42082	* guimb/main.c: Likewise.
42083	* imap4d/imap4d.c: Likewise.
42084
42085	* mail/mail.c: "mailutils" capability does not exist any more.
42086	  Changed to "common", "license".
42087	* messages/messages.c: Likewise.
42088	* pop3d/pop3d.c: Likewise.
42089
42090	* mail.local/main.c: Added "license" capability.
42091
420922002-04-10 Sam Roberts
42093
42094	* mail.local/main.c: split mailutils capabilities
42095	* frm/frm.c: mailutils capabilities were split, and it now reports
42096	  failure, rather than calling failure success.
42097	* comsat/comsat.c, guimb/main.c, imap4d/imap4d.c: mailutils
42098	  capabilities were split up
42099	* mail.remote/: Makefile.am, mail.remote.c: A stub mail.remote. It
42100	  is waiting on completion of the smtp mailer_t.
42101	* lib/mu_argp.c: Default per-utility config files are ~/.programrc.
42102	  If you want to segregate you mailutils configuration, make
42103	  ~/.mailutils a directory, and put your config files in it (same
42104	  name, minus the leading ".").  Also organized all common options
42105	  under the heading "Common options", moved the daemon and auth
42106	  options before the common options, and implemented a --lock-flags
42107	  option.
42108	* include/mailutils/locker.h, mailbox/locker.c:
42109	  (locker_set_default_flags) new function to set the default locking
42110	  flags Fixed bug wherein lock count wasn't incremented for external
42111	  locking.  Fixed bug wherein the right flags wasn't checked during
42112	  union init.
42113
421142002-04-10  Sergey Poznyakoff
42115
42116	* imap4d/list.c: Removed imap_match().
42117	* imap4d/util.c (util_wcard_match): from list.c
42118	* imap4d/imap4d.h: Proto for util_wcard_match() and defines
42119	  for its return values.
42120	* imap4d/lsub.c: Output only those list items that match
42121	  given wildcard expression.
42122
42123	* mailbox/mutil.c (mu_register_retriever): Register a retrieving
42124	  function.
42125	  (mu_retrieve): Retrieve information using stack of retriever
42126	  functions.
42127	  (mu_getpwnam,mu_register_getpwnam): Rewritten using retriever
42128	  functions.
42129	  (mu_getpwuid,mu_register_getpwuid): Likewise.
42130
42131	* include/mailutils/mutil.h: Prototypes for general-purpose
42132	  retrieval functions.
42133
421342002-04-08  Sergey Poznyakoff
42135
42136	* include/mailutils/locker.h (MU_LOCKER_KERNEL): New locker
42137	  type: implies kernel-locking.
42138	* mailbox/locker.c: Reorganized. Default locking type is DOTLOCK.
42139	  If the mailbox to be locked is not writable for the user,
42140	  locking type changes to NULL (no locking at all). If the
42141	  directory where the mailbox resides is not writable, the
42142	  locking type switches to KERNEL.
42143
42144	* m4/gssapi.m4: Fixed typo.
42145
421462002-04-04  Sergey Poznyakoff
42147
42148	* imap4d/lsub.c (imap4d_lsub): Return OK response, unless
42149   	  something grave has happened.
42150
421512002-03-28  Sergey Poznyakoff
42152
42153	Several bugfixes:
42154	 1. mail -f~user/path coredumps
42155	 2. mail --mail-spool [other than mbox URL]://hostname did not
42156	    work (same for frm and others).
42157	 3. mail --mail-spool imap://hostname did not work (at least
42158	    with our imap4d).
42159
42160	* imap4d/list.c (print_dir): Enclose empty filename
42161	  in doublequotes.
42162	* mailbox/folder_imap.c (imap_string): Return 1 if
42163	  the input is not a quoted string.
42164	  (imap_list): Ignore NIL delimiters, correctly handle
42165	  strings, not enclosed in doublequotes.
42166	* mailbox/mbx_default.c (user_mailbox_name): Operate
42167	  only on mbox: and path URLs.
42168
42169	* guimb/main.c (main): initialize c.
42170
421712002-03-28  Sergey Poznyakoff
42172
42173	* lib/mu_argp.c: Renamed --maildir to --mail-spool.
42174	* doc/texinfo/programs.texi: Documented --mail-spool option.
42175	* configure.in: Renamed --with-maildir to --with-mail-spool for
42176	  symmetry.
42177
42178	* mail/mail.c: Some measures to help avoid the confusion about
42179	  --file option:
42180	  (Help output): Print additional note about --file taking
42181	  optional argument.
42182	  (parse_opt): Try to figure out if argument to -f was
42183	  separated by a whitespace. If so, print a warning and
42184	  switch to mail-reading mode. Hopefully this will help
42185	  avoid the confusion.
42186	  (main): Print more detailed diagnostics if mailbox_scan
42187	  failed.
42188
42189	* include/mailutils/errno.h: New error code MU_ERR_NO_SUCH_USER
42190	* mailbox/muerrno.c: Likewise.
42191	* mailbox/mbx_default.c (split_shortcut): Properly handle "~/"
42192	  filenames.
42193	  (tilde_expand): Return MU_ERR_NO_SUCH_USER if an invalid username
42194	  was specified.
42195
421962002-03-25  Sergey Poznyakoff
42197
42198	Was too quick about _exit :^)
42199
42200	* configure.in: Check for _exit.
42201	* mailbox/mutil.c (mu_spawnvp): Protected _exit by #ifdef.
42202
422032002-03-25  Sergey Poznyakoff
42204
42205	Bunch of fixes:
42206
42207	Use of ~/.<program>rc caused problems with mail utility,
42208	whose native profile is ~/.mailrc:
42209	* lib/mu_argp.c: Renamed program-specific profiles to
42210	  ~/.mu.<program>rc.
42211	* doc/texinfo/programs.texi: Documented use of ~/.mu.<program>rc
42212
42213	* libmu_scm/mu_scm.h: Added some includes, needed after
42214	  yesterday's modifications.
42215	* mailbox/locker.c: include <sys/wait.h>
42216	* mailbox/mutil.c: _exit is not portable.
42217
42218	* mailbox2/include/mailutils/types.h: (new)
42219	* mailbox2/include/mailutils/Makefile.am: Added types.h
42220	* mailbox2/debug.c: Include <mailutils/debug.h>
42221	* mailbox2/include/mailutils/address.h: Removed typedefs. Included
42222	  <mailutils/types.h>
42223	* mailbox2/include/mailutils/attribute.h: Likewise.
42224	* mailbox2/include/mailutils/body.h: Likewise.
42225	* mailbox2/include/mailutils/debug.h: Likewise.
42226	* mailbox2/include/mailutils/envelope.h: Likewise.
42227	* mailbox2/include/mailutils/folder.h: Likewise.
42228	* mailbox2/include/mailutils/header.h: Likewise.
42229	* mailbox2/include/mailutils/iterator.h: Likewise.
42230	* mailbox2/include/mailutils/list.h: Likewise.
42231	* mailbox2/include/mailutils/lockfile.h: Likewise.
42232	* mailbox2/include/mailutils/mailbox.h: Likewise.
42233	* mailbox2/include/mailutils/mbox.h: Likewise.
42234	* mailbox2/include/mailutils/message.h: Likewise.
42235	* mailbox2/include/mailutils/observable.h: Likewise.
42236	* mailbox2/include/mailutils/observer.h: Likewise.
42237	* mailbox2/include/mailutils/pop3.h: Likewise.
42238	* mailbox2/include/mailutils/property.h: Likewise.
42239	* mailbox2/include/mailutils/refcount.h: Likewise.
42240	* mailbox2/include/mailutils/stream.h: Likewise.
42241	* mailbox2/include/mailutils/ticket.h: Likewise.
42242	* mailbox2/include/mailutils/url.h: Likewise.
42243
422442002-03-24 Sam Roberts
42245
42246	* dotlock/dotlock.c, include/mailutils/locker.h, mailbox/locker.c:
42247	  Added lock mode MU_LOCK_EXTERNAL which calls an external program to
42248	  do the locking. Default is "dotlock", which is setgid mail so can
42249	  lock in a mailspool that users may not have write permissions to.
42250	* mailbox/mutil.c: mu_spawnvp(): new function - like system, but
42251	  doesn't use /bin/sh, just forks and calls execvp(), with
42252	  system-like signal handling.
42253	* configure.in: Check for vfork().
42254	* mail/echo.c: %d fmt not matching long arg
42255	* mail/msgset.y: fixed warning about included regex.h redefining
42256	  RE_DUP_MAX from limits.h
42257	* TODO: Added Alain's suggestions about read/write lock
42258	  optimization, etc.
42259	* include/mailutils/*.h, comsat/comsat.h, frm/frm.c, from/from.h,
42260	  imap4d/imap4d.h, url.h, mail/mail.h, mail.local/mail.local.h,
42261	  mailbox/attachment.c, mailbox/filter.c, mailbox/filter_rfc822.c,
42262	  mailbox/filter_trans.c, mailbox/folder.c, mailbox/folder_imap.c,
42263	  mailbox/folder_mbox.c, mailbox/folder_pop.c, mailbox/iterator.c,
42264	  mailbox/mailbox.c, mailbox/mailer.c, mailbox/mbx_default.c,
42265	  mailbox/mbx_file.c, mailbox/mbx_imap.c, mailbox/mbx_mbox.c,
42266	  mailbox/mbx_mh.c, mailbox/mbx_pop.c, mailbox/message.c,
42267	  mailbox/muerrno.c, mailbox/observer.c, mailbox/registrar.c,
42268	  mailbox/sendmail.c, mailbox/smtp.c, mailbox/stream.c,
42269	  mailbox/url_mbox.c, mailbox2/include/mailutils/authority.h,
42270	  messages/messages.c, pop3d/pop3d.h, readmsg/readmsg.h,
42271	  sieve/sieve.c, sieve/sieve.h, sieve/sv.h, sieve/svcb.c,
42272	  sieve/svctx.c, sieve/svfield.c, sieve/svfield.h, sieve/svutil.c:
42273	    Finished split of forward declarations into <mailutils/types.h>.
42274	    Now you have to include the header for the functions you want to
42275	    use, but you can change a header without causing a recompile of
42276	    everything. Also added some missing LGPL file headers.
42277
422782002-03-21  Sergey Poznyakoff
42279
42280	* include/mailutils/locker.h: New flag MU_LOCKER_NULL
42281	  to be used with temporary mailboxes stored in memory.
42282	* mailbox/locker.c: Do not try to lock "/dev/null"
42283	  mailboxes. These are used in several programs
42284	  (namely, comsat, imap4d, pop3d).
42285
42286	* mailbox2/pop3/Makefile.am: libpop3_la_SOURCES was
42287	  missing.
42288
422892002-03-19  Sam Roberts
42290
42291	* doc/texinfo/programs.texi: Document use of ~/.<program>rc.
42292
422932002-03-18  Sam Roberts
42294
42295	* sieve/sieve.c: Now using mu_argp_parse(), but not the capa[]
42296	  (yet).
42297	* lib/: mu_argp.c, mu_argp.h: Added ~/.<progname>rc to be last
42298	  config file.  Fixed segv for NULL capa and added header file blurb.
42299	* mailbox/locker.c: Implemented NFS-safe locking, using link()
42300	  from a uniquely named file.
42301
423022002-03-15  Alain Magloire
42303
42304	Nuking of some useless warnings, and make "char *" --> "const char *"
42305	when required.
42306
42307	* mailbox/include/imap0.h: warning: comma at end of enumerator list.
42308	* mailbox/locker.c (locker_set_expire_time): warning: declaration of `time'
42309	  shadows global declaration
42310	  (locker_get_expire_time): declaration of `time' shadows global declaration
42311	* mailbox/mbx_default.c (mu_path_maildir): Use "const" to reinforce a constant string.
42312	* include/mailutils/mailbox.h (mu_path_maildir): constant "const".
42313	* mailbox/mbx_mbox.c (mbox_append_message): status already declared.
42314	* mailbox/memory_stream.c (_memory_truncate): Cast before doing the comparison.
42315	* mailbox/parse822.c (parse822_time): useless ';' outside function definition.
42316	* mailbox/smtp.c (smtp_send_message): warning: declaration of `from' shadows a parameter
42317	  declaration of `to' shadows a parameter.
42318
423192002-03-14  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
42320
42321	* mail/util.c (util_do_command): Coredumped in false branches
42322	  of `if ... endif' statement. Fixed.
42323
423242002-03-13  Alain Magloire
42325
42326	* lib/mu_dmb.c(mu_check_perm): Reinforce
42327	by using (const char *name) in the argument.
42328	* pop3d/pop3d.c: The variable state was already
42329	use as a global, use "astate" in function pop3_parse_opt().
42330	* mail/next.c: Wrong return value;
42331	* mail/previous.c: Wrong return value;
42332
423332002-03-13  Alain Magloire
42334
42335	* mail/echo.c: Make it aware of escape char '\'.
42336	* mail/next.c: Should print the message also.
42337	* mail/previous.c: Should print the message also.
42338	* mail/util.c(util_do_command): Memory leak cmd
42339	was not free(cmd).  An empty line means now "next".
42340
423412002-03-13  Sergey Poznyakoff
42342
42343	* include/mailutils/Makefile.am: Added types.h
42344
42345	* argp/{argp-eexst.c,argp-namefrob.h,argp.h,
42346	  argp-fmtstream.c,argp-parse.c,argp-fmtstream.h,argp-pv.c,
42347	  argp-fs-xinl.c,argp-pvh.c,pin.c,argp-ba.c,argp-help.c,
42348	  argp-xinl.c}: Moved to ../lib
42349	* argp/Makefile.am: Removed
42350	* argp/.cvsignore: Removed
42351	* lib/{argp-eexst.c,argp-namefrob.h,argp.h,argp-fmtstream.c,
42352	  argp-parse.c,argp-fmtstream.h,argp-pv.c,
42353	  argp-fs-xinl.c,argp-pvh.c,pin.c,argp-ba.c,argp-help.c,
42354	  argp-xinl.c}: Added from ../argp
42355	* lib/Makefile.am: Added argp* files.
42356	* Makefile.am: Removed argp from SUBDIRS.
42357	* configure.in: Changed replace code for argp* functions.
42358
42359	* comsat/Makefile.am: Removed @ARGPINCS@ and @ARGPLIBS@
42360	* dotlock/Makefile.am: Likewise.
42361	* frm/Makefile.am: Likewise.
42362	* guimb/Makefile.am: Likewise.
42363	* imap4d/Makefile.am: Likewise.
42364	* pop3d/Makefile.am: Likewise.
42365	* mail/Makefile.am: Likewise.
42366	* mail.local/Makefile.am: Likewise.
42367	* messages/Makefile.am: Likewise.
42368	* sieve/Makefile.am: Likewise.
42369	* mh/Makefile.am: Likewise.
42370
42371	Synchronized mailbox2/include with changes dated 2002-02-27:
42372
42373	* mailbox2/include/mailutils/mu_features.h: Added
42374	* mailbox2/include/mailutils/Makefile.am: Added mu_features.h
42375
42376	Removed definition of __P, included <mailutils/mu_features.h>.
42377	Files affected:
42378
42379	* mailbox2/include/mailutils/address.h,
42380	* mailbox2/include/mailutils/attribute.h,
42381	* mailbox2/include/mailutils/authority.h,
42382	* mailbox2/include/mailutils/body.h,
42383	* mailbox2/include/mailutils/debug.h,
42384	* mailbox2/include/mailutils/envelope.h,
42385	* mailbox2/include/mailutils/error.h,
42386	* mailbox2/include/mailutils/folder.h,
42387	* mailbox2/include/mailutils/header.h,
42388	* mailbox2/include/mailutils/iterator.h,
42389	* mailbox2/include/mailutils/list.h,
42390	* mailbox2/include/mailutils/lockfile.h,
42391	* mailbox2/include/mailutils/mailbox.h,
42392	* mailbox2/include/mailutils/mbox.h,
42393	* mailbox2/include/mailutils/message.h,
42394	* mailbox2/include/mailutils/mutil.h,
42395	* mailbox2/include/mailutils/observable.h,
42396	* mailbox2/include/mailutils/observer.h,
42397	* mailbox2/include/mailutils/parse822.h,
42398	* mailbox2/include/mailutils/pop3.h,
42399	* mailbox2/include/mailutils/property.h,
42400	* mailbox2/include/mailutils/refcount.h,
42401	* mailbox2/include/mailutils/stream.h,
42402	* mailbox2/include/mailutils/ticket.h,
42403	* mailbox2/include/mailutils/url.h,
42404	* mailbox2/include/mailutils/sys/address.h,
42405	* mailbox2/include/mailutils/sys/attribute.h,
42406	* mailbox2/include/mailutils/sys/authority.h,
42407	* mailbox2/include/mailutils/sys/debug.h,
42408	* mailbox2/include/mailutils/sys/envelope.h,
42409	* mailbox2/include/mailutils/sys/folder.h,
42410	* mailbox2/include/mailutils/sys/header.h,
42411	* mailbox2/include/mailutils/sys/list.h,
42412	* mailbox2/include/mailutils/sys/lockfile.h,
42413	* mailbox2/include/mailutils/sys/mailbox.h,
42414	* mailbox2/include/mailutils/sys/message.h,
42415	* mailbox2/include/mailutils/sys/observable.h,
42416	* mailbox2/include/mailutils/sys/observer.h,
42417	* mailbox2/include/mailutils/sys/refcount.h,
42418	* mailbox2/include/mailutils/sys/ticket.h,
42419	* mailbox2/include/mailutils/sys/url.h.
42420
424212002-03-11 Sam Roberts
42422
42423	* include/mailutils/: address.h, locker.h, mailbox.h, message.h,
42424	  types.h: Got tired of recompiling EVERYTHING when I touched
42425	  locker.h, so started splitting common types into
42426	  <mailutils/types.h>.
42427	* include/mailutils/error.h: mu_verror() wasn't prototyped.
42428	* mailbox/: filter_trans.c, folder_imap.c, mailbox.c,
42429	  mbx_default.c, mbx_mbox.c, sendmail.c, stream.c, include/imap0.h:
42430	  Corrected type mismatches visible on 64-bit systems, and including
42431	  locker.h, some misc compiler warnings.
42432	* mail.local/mail.local.h: Need to include locker.h.
42433	* lib/strchrnul.c, mail/mail.c, mail/mail.h, mail/send.c,
42434	  mail/size.c, mail/util.c: Corrected type mismatches visible on
42435	  64-bit systems.
42436	* argp/argp-parse.c: alloca wasn't included.
42437	* messages/messages.c: Corrected type mismatches visible on 64-bit
42438	  systems.
42439	* imap4d/: copy.c, store.c, util.c: Corrected type mismatches
42440	  visible on 64-bit systems.
42441	* imap4d/: imap4d.h, select.c: Select now fails if the locking
42442	  fails.
42443	* TODO: more things todo
42444
42445	(Steven Michael ROBBINS <stever@po-box-cgrl-lab.cs.mcgill.ca>
42446	 contributed a patch to fix 64-bit type mismatches.)
42447
424482002-03-09  Sergey Poznyakoff
42449
42450	* lib/mu_argp.c: Process user's private initialization file
42451	  after processing the site-wide one.
42452	  (mu_create_argcv): was allocating an extra slot in argv array.
42453	* mail.local/main.c: Added `auth' capability.
42454	* doc/texinfo/programs.texi: Documented new configuration file
42455	  mechanism.
42456
424572002-03-09  Sergey Poznyakoff
42458
42459	* configure.in: Check for libresolv.
42460
42461	Based on the discussion with Sam, changed handling of
42462	mailutils' command line options. Command line is parsed using
42463	mu_argp_parse() call. mu_argp_parse scans global configuration
42464	file and processes any options found there before those from
42465	the command line. The options are separated by categories
42466	(capabilities):
42467
42468	  mailutils  --maildir, --license
42469	  auth       --sql-.* family, --pam-service
42470	  logging    --log-facility
42471	  daemon     --daemon, --inetd, --port, --timeout
42472
42473	If a capability name appears in configuration file, it
42474	should be prefixed with : to discern it from the utility
42475	name.
42476
42477	* examples/mailutils.rc: Updated to reflect changes in the syntax.
42478
42479	* lib/mu_argp.c: New function mu_argp_parse is intended to be used
42480	  by all programs in the package in order to do command line parsing.
42481	* lib/mu_argp.h: Removed unneeded prototypes. Added prototype for
42482	  mu_argp_parse().
42483
42484	* comsat/comsat.c: Use mu_argp_parse.
42485	* frm/frm.c: Likewise.
42486	* guimb/main.c: Likewise.
42487	* imap4d/imap4d.c: Likewise.
42488	* mail/mail.c: Likewise.
42489	* messages/messages.c: Likewise.
42490	* pop3d/pop3d.c: Likewise.
42491	* mail.local/main.c: Likewise.
42492	  (deliver): Restored erroneously removed variable sb.
42493
42494	* pop3d/apop.c (pop3d_apopuser): Changed scope of auto variable
42495	  rc.
42496
424972002-03-01 Sam Roberts
42498
42499	* mailbox/mbx_mboxscan.c: Check return value of locker_lock().
42500	* Makefile.am, configure.in: Added dotlock.
42501	* mailbox/: mbx_mbox.c, mbx_mboxscan.c, mbx_mh.c: locker API
42502	  modified.  using mu_errstring() instead of strerror().
42503	* mailbox/mbx_pop.c: Using mu_errstring() instead of strerror().
42504	* pop3d/lock.c: locker_lock() api changed. pop3d uses MU_LOCKER_PID.
42505	* mail.local/main.c: Retrying the dot lock is now handled by the
42506	  locker_t.
42507	* dotlock/: .cvsignore, Makefile.am, dotlock.c: dotlock - setgid
42508	  program to dot lock a file, modelled on mutt_dotlock.
42509	* mailbox/locker.c, include/mailutils/locker.h: New modes,
42510	  including a retry mode (the default), removed fcntl and stub
42511	  read/write lock mode.  New function, to remove a lock even if not
42512	  owned (useful for the external dotlock utility).  New functions,
42513	  to set the expire time for MU_LOCKER_TIME, the flags, and the
42514	  retries and retry sleep for MU_LOCKER_RETRY.
42515
425162002-02-27 Sam Roberts
42517
42518	* examples/: Addrs.good, addr.c: New addr return codes.
42519	* mail.local/mail.local.h: Including <mailutils/errno.h>.
42520	* mail/mail.h: Added <strings.h> for systems that have it.
42521
425222002-02-27  Sergey Poznyakoff
42523
42524	* imap4d/status.c: Provide better diagnostics.
42525	* comsat/comsat.c: Use mu_path_maildir instead of maildir.
42526	* guimb/collect.c: Likewise.
42527	* imap4d/select.c: Likewise.
42528	* lib/mu_argp.c: Likewise.
42529	* mail.local/main.c: Likewise.
42530	* pop3d/apop.c: Likewise.
42531	* pop3d/user.c: Likewise.
42532	* lib/mu_argp.h: Removed extern char *maildir.
42533
42534	* mailbox/mbx_default.c: Essentially rewritten.
42535	  mailbox_open_default() supports the following naming schemes:
42536
42537	   %           --> system mailbox for the real uid
42538           %user       --> system mailbox for the given user
42539           ~/file      --> /home/user/file
42540           ~user/file  --> /home/user/file
42541           +file       --> /home/user/Mail/file
42542           =file       --> /home/user/Mail/file
42543
42544	* mail/file.c: Do not handle '%name' separately:
42545  	  mailbox_open_default now does it.
42546	* mail/mail.c: Properly handle --user (open user's system
42547	  mailbox).
42548	* mailbox/mutil.c (mu_getcwd): New function. Return the name
42549	  of current working directory. The return value is malloc'ed
42550	  (mu_get_full_path): New function. Translate cwd-relative
42551	  pathname to its absolute equivalent. Both moved from
42552	  mbx_default.c.
42553
42554	* mail.local/mailquota.c (check_quota): Initialize contentd
42555	  to all zeroes before mu_dbm_fetch. This is needed by
42556	  (at least) Berkeley DBM.
42557
42558	* include/mailutils/mu_features.h: (new) Define system-dependent
42559	  macros, used by all mailutils. Currently, it contains only
42560	  __P() definition.
42561	* include/mailutils/Makefile.am: Added mu_features.h.
42562
42563	Removed definitions of __P() scattered over multiple header
42564	files. Included <mailutils/mu_features.h> instead. Files
42565	affected:
42566
42567	* imap4d/imap4d.h,
42568	* mail/mail.h,
42569	* pop3d/pop3d.h,
42570	* readmsg/readmsg.h,
42571	* include/mailutils/address.h,
42572	* include/mailutils/attribute.h,
42573	* include/mailutils/auth.h,
42574	* include/mailutils/body.h,
42575	* include/mailutils/debug.h,
42576	* include/mailutils/envelope.h,
42577	* include/mailutils/errno.h,
42578	* include/mailutils/error.h,
42579	* include/mailutils/filter.h,
42580	* include/mailutils/folder.h,
42581	* include/mailutils/header.h,
42582	* include/mailutils/iterator.h,
42583	* include/mailutils/list.h,
42584	* include/mailutils/locker.h,
42585	* include/mailutils/mailbox.h,
42586	* include/mailutils/mailer.h,
42587	* include/mailutils/message.h,
42588	* include/mailutils/mime.h,
42589	* include/mailutils/monitor.h,
42590	* include/mailutils/mutil.h,
42591	* include/mailutils/observer.h,
42592	* include/mailutils/parse822.h,
42593	* include/mailutils/property.h,
42594	* include/mailutils/registrar.h,
42595	* include/mailutils/stream.h,
42596	* include/mailutils/url.h,
42597	* mailbox/include/address0.h,
42598	* mailbox/include/attribute0.h,
42599	* mailbox/include/auth0.h,
42600	* mailbox/include/body0.h,
42601	* mailbox/include/debug0.h,
42602	* mailbox/include/envelope0.h,
42603	* mailbox/include/filter0.h,
42604	* mailbox/include/folder0.h,
42605	* mailbox/include/header0.h,
42606	* mailbox/include/imap0.h,
42607	* mailbox/include/iterator0.h,
42608	* mailbox/include/list0.h,
42609	* mailbox/include/mailbox0.h,
42610	* mailbox/include/mailer0.h,
42611	* mailbox/include/message0.h,
42612	* mailbox/include/mime0.h,
42613	* mailbox/include/monitor0.h,
42614	* mailbox/include/observer0.h,
42615	* mailbox/include/property0.h,
42616	* mailbox/include/registrar0.h,
42617	* mailbox/include/stream0.h,
42618	* mailbox/include/url0.h.
42619
42620	* lib/argcv.h: Use PROTOTYPES to determine whether the compiler
42621	  understands function prototypes.
42622
426232002-02-25 Sam Roberts
42624
42625	* sieve/examples/: .cvsignore, Makefile, Test, mbox.complex,
42626	  t-exists.sv, test.out: Exercise a little more of sieve.
42627	* mailbox/wicket.c, mailbox/message.c,
42628	  imap4d/imap4d.h, mail/mail.c, mail/mail.h, pop3d/apop.c,
42629	  pop3d/pop3d.h, readmsg/readmsg.c, readmsg/readmsg.h, sieve/sieve.c,
42630	  sieve/sv.h, sieve/svcb.c, sieve/svctx.c examples/Makefile,
42631	  examples/addr.c, examples/mbox-check.c, examples/mbox-dates.c,
42632	  examples/mbox-explode.c, examples/mimetest.c, examples/msg-send.c,
42633	  examples/url-parse.c, comsat/comsat.c, comsat/comsat.h, from/from.c,
42634	  guimb/collect.c, guimb/guimb.h:
42635	      Replaced strerror() with mu_errstring().
42636	* include/mailutils/errno.h, mailbox/Makefile.am,
42637	  mailbox/muerrno.c: Added muerrno.c to the build, added locker
42638	  error numbers.
42639
426402002-02-23 Sam Roberts
42641
42642	* mailbox/: message.c, smtp.c: Include <mailutils/mutil.h> for
42643	  mu_getpwuid() prototype.
42644	* doc/texinfo/programs.texi: A # must be preceded by whitespace to
42645	  start an rcfile comment.
42646
426472002-02-20 Sam Roberts
42648
42649	* TODO: Updated.
42650
426512002-02-23  Sergey Poznyakoff
42652
42653	* lib/argcv.c: Yesterday's fix makes argcv_get include trailing
42654	  whitespace to the argv array. To fix:
42655	  (argcv_scan): Return len+1 if called on or after
42656	  the terminating null character.
42657	  (argcv_get): Initialize *argc to zero and continue scanning
42658	  until argcv_scan return is  > len. Thanks Sam for noticing.
42659
42660	  More fixes:
42661	  (argcv_scan): Correctly handle comments without intervening
42662	  whitespace between the comment character and remaining text,
42663	  e.g.:
42664             set a=2 #comment
42665
426662002-02-22  Sergey Poznyakoff
42667
42668	* lib/argcv.c (argcv_get): Bugfix, *argc must be initialized to 1.
42669	* lib/mu_argp.c (mu_common_argp_parser): Handle ARGP_KEY_FINI
42670	  case.
42671	  (mu_argp_error_code): new global. Specifies exit code for
42672	  exits on error.
42673	* lib/mu_argp.h: extern declaration for mu_argp_error_code.
42674	* comsat/comsat.c: Removed call to mu_normalize_maildir.
42675	* imap4d/imap4d.c: Likewise.
42676	* mail.local/main.c: Likewise.
42677	* pop3d/pop3d.c: Likewise.
42678
42679	* imap4d/status.c: Syntax cleanup.
42680
42681	* mail/mail.h: include mu_argp.h
42682	* mail/mail.c (main): Handle mailutils-common arguments.
42683	* frm/frm.c: Likewise.
42684	* guimb/main.c: Likewise.
42685	* messages/messages.c: Likewise.
42686
42687	* frm/Makefile.am: Added ARGP stuff.
42688	* guimb/Makefile.am: Likewise.
42689	* imap4d/Makefile.am: Restored imap4d_DEPENDENCIES. Without it
42690	  @AUTHOBJS@ do not get into dependencies.
42691
426922002-02-21  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42693
42694	* sieve/Makefile.am: Link @ARGPLIBS@ before libmailutils.la to
42695	compensate for lack of interlibrary dependencies
42696
42697	* configure.in: Detect either curses or ncurses
42698
42699	* include/mailutils/Makefile.am: Add errno.h
42700
427012002-02-20 Sam Roberts
42702
42703	* comsat/action.c, comsat/cfg.c, lib/argcv.c, lib/argcv.h,
42704	  lib/mu_argp.c, mail/send.c, mail/util.c, mh/mh_argp.c,
42705	  pop3d/popauth.c: argcv_get() now (optionally) strips comments while
42706	  parsing. Its the right place because it tokenizes, and whether a
42707	  char is a comment or not depends on whether its in the middle of a
42708	  token or not:  "hi # there"  # comment.
42709	* sieve/sieve.c: Now supports a ~/.sieverc file. Mine looks like:
42710	  # ~/.sieverc
42711	  #   Just moves my mail into my local spool.
42712	  -dTt --ticket=~/.tickets
42713	  -f pop://pop.uniserve.com
42714	  ~/.filter.sv
42715	* include/mailutils/debug.h: The debug levels are a bitmask, and
42716	  I'd started to enumerate them. Oops.
42717	* mailbox/muerrno.c: Began the task of returning more informative
42718	  error numbers. If this looks useful, we should all spread it
42719	  through the files we touch!
42720	* doc/texinfo/: mailutils.texi, programs.texi: The info docs were
42721	  getting installed in the "Miscellaneous" section of the info
42722	  directory, now they go in GNU Libraries, with links to the programs
42723	  under GNU Utilities, as seemed to be suggested by the texinfo docs.
42724	  Maybe there's a better convention?
42725	* include/mailutils/errno.h, mailbox/address.c, mailbox/mailbox.c,
42726	  mailbox/parse822.c: Began the task of returning more informative
42727	  error numbers. If this looks useful, we should all spread it
42728	  through the files we touch!
42729	* sieve/svcb.c: Was using the POSIX (1003.1b) ENOTSUP, changed to
42730	  ENOSYS, which will exist most places, as Jeff pointed out.
42731
427322002-02-20  Sergey Poznyakoff
42733
42734	* imap4d/status.c (imap4d_status): Bugfix: was using improperly
42735	  created mailbox name for INBOX. Be more robust in handling
42736	  erroneous constructs. Thanks Sam for reporting.
42737
427382002-02-20  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42739
42740	* argp/Makefile.am: Remove inter-library dependency.  Until QNX
42741	has a recent libtool that will support this.  Thanks Sam,
42742	Sergey for reporting and finding the fix.
42743
427442002-02-20 Sam Roberts <sroberts@uniserve.com>
42745
42746	* frm/Makefile.am, from/Makefile.am, imap4d/Makefile.am,
42747	  messages/Makefile.am, readmsg/Makefile.am, sieve/Makefile.am: The
42748	  exe_DEPENDENCIES lines prevent the _LDADD lines being used for
42749	  dependencies, so the exes don't' get rebuilt when the libraries are
42750	  rebuilt, unless explicitly listed.
42751
427522002-02-19  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
42753
42754	Use of system getpwuid() in many places of the code
42755	actually broke mu_getpwnam() paradigm. To fix it,
42756	a wrapper function, mu_getpwuid(), is introduced.
42757	It allows to use 'overloaded' getpwuid calls. In the
42758	simplest case, it boils down to calling getpuid().
42759	Applications, registering getpwname function by using
42760	mu_register_getpwname() are expected to register its
42761	getpwuid counterpart by using mu_register_getpwname().
42762	"Virtual domains" (mutil.c:407) seem to be an exception:
42763	there is no easy way to create appropriate getpwuid()
42764	function. This does not break the virtual domain
42765	functionality, however.
42766
42767	* mailbox/mutil.c (mu_getpwuid): new function. Allows
42768	  to use overloaded getpwuid() in the same way as
42769	  mu_getpwnam() does it for getpwnam().
42770	  (mu_register_getpwuid): Overload getpwuid function.
42771	* include/mailutils/mutil.h: Proto for mu_getpwuid().
42772	* lib/mu_argp.c: New options: --sql-getpwuid for setting
42773	  sql query returning passwd data for a given uid, and
42774	  --pam-service for setting the PAM service name to be
42775	  used.
42776	* lib/mu_argp.h: Added extern for pam_service.
42777
42778	* MySql/MySql.c (getMpwnam): Return username along with
42779	  other data.
42780	  (getMpwuid): New function.
42781	* MySql/MySql.h: Added extern declaration for sql_getpwuid_query.
42782	* examples/mailutils.rc: Fixed queries.
42783
42784	* mail.local/main.c: register getMpwuid().
42785	* imap4d/imap4d.c: Initialize pam_service. Register getMpwuid().
42786	* pop3d/pop3d.c: Likewise.
42787	* imap4d/login.c: Use pam_service instead of hardcoding PAM
42788	  service name.
42789	* pop3d/user.c: Likewise.
42790
42791	* imap4d/bye.c: Use mu_getpwuid() instead of getpwuid().
42792	* imap4d/copy.c: Likewise.
42793	* imap4d/rename.c: Likewise.
42794	* imap4d/select.c: Likewise.
42795	* imap4d/status.c: Likewise.
42796	* mailbox/mbx_default.c: Likewise.
42797	* mailbox/message.c: Likewise.
42798	* mailbox/smtp.c: Likewise.
42799	* mailbox/wicket.c: Likewise.
42800	* mailbox2/mutil.c: Likewise.
42801
428022002-02-19  Sergey Poznyakoff
42803
42804	* lib/mu_argp.c (mu_create_argcv): Fixed memory overrun.
42805
428062002-02-18  Sergey Poznyakoff
42807
42808	* acconfig.h: Define rl_completion_matches for readline < 4.2
42809	* configure.in: Check for rl_completion_matches being present.
42810	* guimb/guimb.h: Include <string.h>.
42811	* mail/mailline.c: Changed declaration of ml_command_generator().
42812	  (ml_command_completion): use rl_completion_matches(). Patch
42813	  provided by John R. Daily.
42814
428152002-02-18  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42816
42817	* mail.local/Makefile.am: Fix install_exec_hook so that
42818	DESTDIR installs work correctly.
42819
42820	* comsat/Makefile.am: Use libmailutils.la
42821
428222002-02-17  Sergey Poznyakoff
42823
42824	* imap4d/list.c: Take into account st_dev. Patch provided
42825          by Sam Roberts.
42826	* acconfig.h: Placeholder for dev_t.
42827	* configure.in: AC_CHECK_TYPE(dev_t)
42828
428292002-02-17  Sergey Poznyakoff
42830
42831	* imap4d/list.c: Prevent possible infinite recursion (Fixes
42832	  Bug#134330).
42833	* acconfig.h: Placeholder for ino_t.
42834	* configure.in: AC_CHECK_TYPE(ino_t)
42835
42836	* comsat/comsat.c: Removed unused function.
42837
428382002-02-16  Sergey Poznyakoff
42839
42840	* configure.in (LTLIBOBJS hack): escape '[' and ']'
42841
428422002-02-15  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42843
42844	* configure.in: Hack to make AC_REPLACE_FUNCS refer to .lo instead
42845	of .o
42846
42847	* lib/Makefile.am: Use libtool objects instead.
42848
428492002-02-14  Sergey Poznyakoff
42850
42851	* mail.local/main.c: Removed confusing print_help()
42852	  function.
42853	* imap4d/authenticate.c: Fixed indentation.
42854
428552002-02-13  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42856
42857        This change permits linking on systems that don't support
42858	interlibrary dependencies inherently like SCO Openserver.
42859
42860	* sieve/Makefile.am: Link in libtool-based libmailutils.
42861
42862	* readmsg/Makefile.am: Link in libtool-based libmailutils.
42863
42864	* pop3d/Makefile.am: Link in libtool-based libmailutils.
42865
42866	* mh/Makefile.am: Link in libtool-based libmailutils.
42867
42868	* messages/Makefile.am: Link in libtool-based libmailutils.
42869
42870	* mapi/Makefile.am: Link in libtool-based libmailutils.
42871
42872	* mail.local/Makefile.am: Link in libtool-based libmailutils.
42873
42874	* mail/Makefile.am: Link in libtool-based libmailutils.
42875
42876	* lib/Makefile.am: Generate libtool-based libmailutils.
42877
42878	* lib/.cvsignore: Add files that libtool generates
42879
42880	* imap4d/Makefile.am: Link in libtool-based libmailutils.
42881
42882	* guimb/Makefile.am: Link in libtool-based libmailutils.
42883
42884	* from/Makefile.am: Link in libtool-based libmailutils.
42885
42886	* frm/Makefile.am: Link in libtool-based libmailutils.
42887
42888	* argp/Makefile.am: Use libtool
42889
42890	* configure.in: Build libtool ARGP libraries
42891
428922002-02-11  Sergey Poznyakoff
42893
42894	* imap4d/auth_gss.c (auth_gssapi): Use imap4d_gss_userok() to
42895	  check if the principal is allowed to use a given mailbox.
42896
428972002-02-11 Sam Roberts
42898
42899	* pop3d/pop3d.c: Removed static prototype for non-existent
42900	  function.
42901	* doc/rfc/: rfc1891.txt, rfc1892.txt, rfc1893.txt, rfc1894.txt:
42902	  Added RFCs related to delivery and message status notification.
42903	* sieve/: sieve.c, svcb.c: better logging and error reporting
42904	* include/mailutils/debug.h, mailbox/debug.c,
42905	  mailbox/include/debug0.h: Added level argument of mu_debug_print()
42906	  to the print callback, useful for determining the level and
42907	  forwarding to syslog, or something.
42908
429092002-02-09 Sam Roberts
42910
42911	* mailbox/mbx_default.c: removed unused variable
42912
429132002-02-08  Sam Roberts
42914
42915	* TODO: More things I think should be done, or did.
42916	* mailbox/wicket.c: wicket: a ticket file now can contain multiple
42917	  URLs, when looking for a ticket, the first one which contains
42918	  authentication information for the incomplete url is returned.
42919	  wildcards are OK, so you can do:
42920            # my ~/.tickets
42921	    pop://sam:pass@pop.uniserve.com
42922	    *://sroberts:gnuless@mail.certicom.com
42923	    imap://;AUTH=anon@*
42924
42925	  Actually, the last doesn't work, but it SHOULD. Another day.
42926	* include/mailutils/url.h, mailbox/url.c: url_is_ticket() - new
42927	  function, determines whether a url_t contains ticket information
42928	  for another url
42929	* doc/texinfo/url.texi: missing an @var{}
42930	* mailbox/url_mbox.c: gcc doesn't like signed chars as array
42931	  indexes, they could be negative
42932	* sieve/sieve.c: buglet, forgot to initialize opts
42933
429342002-02-07  Sergey Poznyakoff
42935
42936	* imap4d/util.c (util_localname): return FQDN
42937	* imap4d/capability.c: Forgotten to commit.
42938
429392002-02-07  Sergey Poznyakoff
42940
42941	* acconfig.h: Added WITH_GSSAPI define.
42942	* configure.in: New option: --with-gssapi
42943	* imap4d/auth_gss.c: (new)  GSSAPI authentication.
42944	* imap4d/Makefile.am: Added auth_gss.c
42945	* imap4d/append.c (imap4d_append0): Added missing call to
42946	  stream_open().
42947	* imap4d/authenticate.c: Basic framework for AUTHENTICATE command.
42948	  Added auth_gssapi hook.
42949	* imap4d/capability.c: AUTH=GSSAPI if supported.
42950	* imap4d/imap4d.c: ifile should be global as well as ofile. It
42951	  will be needed by authentication handlers.
42952	* imap4d/imap4d.h: Added new protos.
42953	* imap4d/util.c: Base64 encoding/decoding functions. filter_trans
42954          can't be used for this purpose, since its encoder inserts
42955          newlines after each 76 characters of output.
42956
42957	* m4/gssapi.m4: (new) Check for gssapi libraries and header files.
42958	* m4/Makefile.am: Added gssapi.m4
42959
42960	* mail/mail.c (main): Fixed 'No mail for...' reporting.
42961	* mailbox/filter_trans.c (trans_read): Control number of
42962          bytes read by stream_read().
42963	* mailbox/memory_stream.c (_memory_truncate): Bugfix.
42964
42965	* TODO: Updated.
42966
429672002-02-07  Jeff Bailey  <jbailey@outpost.dnsalias.org>
42968
42969	* guimb/.cvsignore: Add .libs
42970
42971	* .cvsignore: Add stamp-h1
42972
42973	* sieve/Makefile.am: Add sieve.h for make dist.
42974
42975	* doc/texinfo/programs.texi: Put break between @end itemize and }
42976	to quiet error from texi2dvi.
42977
42978	* doc/texinfo/mailer.texi: Add space to quiet error from makeinfo.
42979
42980	* readmsg/.cvsignore: New File
42981
42982	* doc/man/popauth.1: New file.
42983
42984	* doc/man/Makefile.am: Add popauth.1
42985
429862002-02-05  Sergey Poznyakoff
42987
42988	Use argp_ functions instead of getopt to parse command
42989	line arguments. This allows all mailutils programs
42990	to share common code and to have the same subset
42991	of command line options. Besides, this allows to have
42992	a single configuration file for entire package.
42993	The common command-line subsets are (struct argp_child):
42994
42995	  1. mu_common_argp_child: handles --maildir,--log-facility,
42996	     --license and --sql-.* family of options. (The latter
42997	     are used to supply data for SQL getpwnam et al. functions
42998	     instead of hard-coding them).
42999	  2. mu_daemon_argp_child: handles --daemon,--inetd,--port
43000	     and --timeout options.
43001
43002	* lib/mu_argp.c: (new) Handle command line arguments,
43003	  common for all mailutils programs.
43004	* lib/mu_argp.h: (new) Definitions for handling common
43005	  mailutils command-line arguments.
43006	* lib/Makefile.am: Added mu_argp.[ch]
43007
43008	* comsat/Makefile.am: Added @ARGP.*@ substitutions
43009	* imap4d/Makefile.am: Likewise.
43010	* mail.local/Makefile.am: Likewise.
43011	* pop3d/Makefile.am: Likewise.
43012
43013	* comsat/comsat.c: Use argp_parse instead of getopt_long.
43014	* imap4d/imap4d.c: Likewise.
43015	* mail.local/main.c: Likewise.
43016	* pop3d/pop3d.c: Likewise.
43017
43018	* comsat/comsat.h: Added mu_argp.h and related stuff
43019	* imap4d/imap4d.h: Likewise.
43020	* imap4d/util.c: Likewise.
43021	* mail.local/mail.local.h: Likewise.
43022	* pop3d/extra.c: Likewise.
43023	* pop3d/pop3d.h: Likewise.
43024
43025	* examples/mailutils.rc: (new) Sample mailutils configuration
43026	  file.
43027	* doc/texinfo/programs.texi: Added entry about mailutils.rc
43028	  configuration file.
43029
43030	* MySql/MySql.c: Use configurable queries instead
43031	  of hardcoded ones.
43032	* MySql/MySql.h: Added new external declarations.
43033	  Removed unneeded defines.
43034	* configure.in: Removed notice about MySql.h
43035
430362002-02-04  Sergey Poznyakoff
43037
43038	* mail.local/Makefile.am (mail_local_LDADD): Add @AUTHLIBS@.
43039	* mail.local/mail.local.h: Include "../MySql/MySql.h" when
43040	  necessary.
43041	* mail.local/main.c (main): Register virtual domain handlers.
43042	  Use mu_getpwnam.
43043	  (deliver): Set MU_LOCKER_PID bit on the locker.
43044
430452002-01-30  Sergey Poznyakoff
43046
43047	* mail.local/main.c (main): Return EX_USAGE on command line
43048  	  usage errors.
43049	  (deliver): Return EX_TEMPFAIL if mailbox cannot be locked.
43050	* mailbox/url_mbox.c (_url_path_index): Use character translation
43051	  table to allow for '.', etc. in the usernames.
43052	  Fixed memory overrun.
43053	  (_url_path_rev_index): Use character translation table.
43054
430552002-01-26 Sam Roberts
43056
43057	* mailbox/folder_imap.c:
43058	  folder_imap_create() - removed, code now in mailbox_imap_open().
43059	   imap_mailbox_name_match() - new function, uses strcasecmp() for
43060	   INBOX, since INBOX is itself in any case combination, and
43061	   fnmatch() otherwise.
43062	  imap_list() - mailbox name (an ASTRING) wasn't being unquoted.
43063	  folder_imap_list() - always failed to match it's name arg against
43064	    the mailbox name (imap_list needed to unquote the name, and the
43065	    name comparison needed to treat INBOX specially).
43066	* mailbox/mbx_imap.c: Moved the mailbox creation functionality of
43067	  folder_imap_create() into mailbox_imap_open(). Now
43068	  mailbox_imap_open() will fail if the mailbox doesn't exist, or
43069	  can't be created despite creation being requested (like the other
43070	  types of mailbox).
43071	* mailbox/include/imap0.h: m_imap_t - added state to keep track of
43072	  which folder function is in progress when a mailbox function calls
43073	  several folder functions.
43074
430752002-01-25 Sam Roberts
43076
43077	* doc/rfc/rfc2060.txt: LIST section was 6.3..8., not 6.3.8, made it
43078	  hard to search for!
43079
430802002-01-23  Sergey Poznyakoff
43081
43082	* mail.local/mail.local.h: Define correct EX_ values if
43083	  sysexits.h is missing.
43084
430852002-01-22 Sam Roberts
43086
43087	* sieve/: sieve.c, sieve.h, sv.h, svcb.c, svctx.c: Implemented
43088	  redirect action, and added option for sieve to specify the mailer.
43089	* configure.in: Check for <sysexits.h>.
43090	* mail.local/mail.local.h: Work around missing <sysexits.h>.
43091	* mailbox/sendmail.c: State now tracks whether its been opened,
43092	  rather than segving.
43093	* include/mailutils/address.h: Removed prototype for function that
43094	  isn't defined anywhere.
43095	* mailbox/mailer.c: Return ENOENT if the url type wasn't
43096	  registered, like the other factory creation functions.
43097	* include/mailutils/list.h, mailbox/list.c: New function:
43098	  list_do(), calls a function on each item in the list.
43099	* mailbox/mutil.c: Needed <sys/stat.h> on QNX6.
43100
431012002-01-22  Sergey Poznyakoff
43102
43103	* mail.local/mail.local.h: Added network-related includes.
43104	* mail.local/main.c: Implemented biff notification.
43105	* mail.local/script.c: Added configurable debugging.
43106	* guimb/main.c: Fixed help display.
43107	* doc/texinfo/programs.texi: Updated.
43108
431092002-01-21  Sergey Poznyakoff
43110
43111	* acconfig.h: Added WITH_GUILE define.
43112	* configure.in: Define WITH_GUILE. Added mail.local.
43113	* Makefile.am: Added mail.local.
43114
43115	* guimb/run_scm.c: Deleted.
43116	* guimb/Makefile.am: Removed run_scm.c
43117	* guimb/collect.c (guimb_catch_body, guimb_catch_handler) New
43118	  functions.
43119	* guimb/guimb.h: Added new declarations.
43120	* guimb/main.c: New command line options: --maildir (set
43121	  mailspool pathname), --source (set scheme source file name).
43122	  Use mu_process_mailbox instead of run_main.
43123	* guimb/scm/sieve.scm: Add "#!" magic to the beginning of
43124	  the output script. Improved diagnostics. Fixed bug in
43125	  next-token-from-port.
43126
43127	* libmu_scm/mu_guimb.c: (new)
43128	* libmu_scm/Makefile.am: Added mu_guimb.c
43129	* libmu_scm/mu_message.c (mu_message_send): Initialize mailer
43130	  to NULL.
43131	* libmu_scm/mu_scm.h: Added proto for mu_process_mailbox.
43132
43133	* mail.local: Added to repository.
43134	* mail.local/Makefile.am: Likewise.
43135	* mail.local/.cvsignore: Likewise.
43136	* mail.local/mail.local.h: Likewise.
43137	* mail.local/main.c: Likewise.
43138	* mail.local/mailquota.c: Likewise.
43139	* mail.local/script.c: Likewise.
43140
431412002-01-21  Sergey Poznyakoff
43142
43143	* configure.in: New option --with-maildir allows to
43144	  specify the location of mailspool instead of the
43145	  default _PATH_MAILDIR.
43146	* acconfig.h: Include <paths.h>. Define MU_PATH_MAILDIR.
43147	* mailbox/mbx_default.c (mailbox_create_default):
43148	  Use MU_PATH_MAILDIR.
43149	* guimb/collect.c (collect_output): Likewise.
43150	* imap4d/imap4d.c: Likewise.
43151	* pop3d/pop3d.c: Likewise.
43152
43153	* comsat/comsat.c: Introduced --maildir option.
43154
43155	* pop3d/apop.c (pop3d_apop): Use maildir instead of
43156	  _PATH_MAILDIR (should have been committed 2002-01-15).
43157
43158	* mailbox/parse822.c (str_append): Check for NULL.
43159	* mailbox/message.c (message_destroy): Fixed typo in comment.
43160
43161	* imap4d/imap4d.h: Removed superfluous definition of
43162	  _PATH_MAILDIR.
43163	* pop3d/pop3d.h: Likewise.
43164
43165	* lib/mu_dbm.c: (mu_fcheck_perm, mu_check_perm): Return
43166	  OK if mode is 0.
43167
431682002-01-19 Sam Roberts
43169
43170	* sieve/: svcb.c, svutil.c: sv_mu_save_to() became
43171	  mailbox/message.c:message_save_to_mailbox()
43172	* sieve/sieve.c: Was setting debug on the mailbox before creating
43173	  it...
43174	* include/mailutils/message.h, mailbox/message.c:
43175	  message_save_to_mailbox(): convenience function, perhaps it should
43176	  go in mailbox/mutil.c, but nothing else in there is a mailutils API
43177	  wrapper.
43178	* include/mailutils/mailbox.h, mailbox/mailbox.c:
43179	  mailbox_has_debug(): wasn't a way to see if a mailbox had one
43180	* mailbox/folder_mbox.c: Give mbox folders a null authentication
43181	  object, mailbox_get_authority() will now return one instead of
43182	  succeeding, but not returning an object.
43183	* include/mailutils/folder.h, mailbox/folder.c: folder_has_debug():
43184	  there wasn't a way to see if folder had a debug object
43185	* include/mailutils/auth.h, mailbox/auth.c:
43186	  authority_create_null(): creates an authority that successfully
43187	  does nothing, useful for concrete types that need to return an
43188	  authority, but don't do any authentication.
43189	* mailbox/mbx_imap.c: Append to INBOX if an explicit path wasn't
43190	  supplied.
43191	* mailbox/mbx_mbox.c: X-UID is 5 chars, not 4, and this line will
43192	  match X-UIDL too, is that intended?
43193	* mailbox/url_mbox.c: including strings.h as well
43194	* mailbox/debug.c: Removed a FIXME that seems to have been fixed.
43195
431962002-01-18  Sergey Poznyakoff
43197
43198	* mailbox/mutil.c: New function mu_tempfile().
43199	* include/mailutils/mutil.h: Declaration for mu_tempfile().
43200	* guimb/collect.c: Use mu_tempfile.
43201	* mail/send.c: Likewise.
43202	* mail/var.c: Likewise.
43203	* mailbox/body.c: Likewise.
43204	* mailbox/mbx_mh.c: Likewise.
43205
43206	* mailbox/muerror.c: New function mu_verror().
43207
43208	* guimb/util.c: Removed util_tempfile().
43209	* mail/util.c: Likewise.
43210
432112002-01-15 Sam Roberts
43212
43213	* sieve/: sieve.c, sv.h, svcb.c, svctx.c, svutil.c,
43214	examples/Makefile, examples/Test, examples/mbox.complex,
43215	examples/t-complex.sv, examples/t-mailutils.sv: More testing and
43216	resultant polishing, -k switch to sieve to keep on going after an
43217	error sieving a message, don't discard a message unless the script
43218	completed all the actions successfully on a message, better error
43219	reporting and logging, workarounds around problems/differences
43220	between mailbox types, and a test script that exercises sieve on an
43221	mbox.
43222
432232002-01-15  Sergey Poznyakoff
43224
43225	* imap4d/imap4d.c: New command line option --maildir (-m).
43226	  Register mbox_record at startup.
43227	* pop3d/pop3d.c: Likewise.
43228	* imap4d/imap4d.h: Extern declaration for maildir.
43229	* pop3d/pop3d.h: Likewise.
43230
43231	* imap4d/select.c: Use maildir instead of _PATH_MAILDIR.
43232	* pop3d/user.c: Likewise.
43233
43234	* mailbox/mutil.c: (mu_normalize_maildir) New function.
43235	  Makes sure the mailbox specification either is a
43236          pathname ending with '/', or matches regexp 'mbox:.*user='.
43237	* include/mailutils/mutil.h: (mu_normalize_maildir) Added
43238	  prototype.
43239	* mailbox/url_mbox.c: Handle extended URL specification.
43240          Implemented three hash schemes.
43241
43242	* comsat/action.c: (expand_line): Removed unused variable.
43243	* libmu_scm/mu_mailbox.c: Fixed indentation.
43244	* libmu_scm/mu_address.c: (_get_address_part) Removed unused
43245          variable.
43246	* libmu_scm/mu_mime.c: (mu_scm_mime_print) Added missing return
43247          value.
43248	* pop3d/apop.c: Fixed typecasts.
43249
432502002-01-14 Sergey Poznyakoff
43251
43252	* argp/argp-parse.c (parser_init): Fixed erroneous typecasts.
43253	* guimb/scm/Makefile.am: Added numaddr.scm to pkgdata_DATA.
43254
432552002-01-12 Sam Roberts
43256
43257	* sieve/: sieve.c, sieve.h, svcb.c, svctx.c, svfield.c, svutil.c, sv.h:
43258	API of sieve engine now includes diagnostic callbacks, and is close
43259	to stable, implementation will be soon.
43260
432612002-01-05 Sam Roberts
43262
43263	* sieve/: Makefile.am, sieve.c, sv.h, svcb.c, svctx.c, svutil.c:
43264	  Split the implementation of the mailutils-based sieve engine out of
43265	  sieve.c, which now contains only a utility that uses the engine to
43266	  sieve mailboxes.
43267	* sieve/sieve_interface.h: exposed sieve_errstr() in public API,
43268	  and declare sieve_errname()
43269	* sieve/script.c: lower-cased some error strings, and added
43270	  str_errname() to return the string of an error enum.
43271
432722001-12-31 Alain Magloire
43273
43274	* doc/texinfo/programs.texi:  Describe the readmsg utility.
43275	* configure.in: Enable readmsg.
43276	* Makefile.in: Enable readmsg.
43277	* readmsg/readmsg.c: Implementation.
43278	* readmsg/msglist.c: Implement Elm weird expansion.
43279
432802001-12-29 Sergey Poznyakoff
43281
43282	* guimb/scm/numaddr.scm: (new) Implements "numaddr" extension
43283	  test. The test counts Internet addresses in structured headers
43284	  that contain addresses.  It returns true if the total number of
43285	  addresses satisfies the requested relation, e.g.:
43286		if numaddr :over [ "To", "Cc" ] 50 { discard; }
43287
43288	* guimb/scm/Makefile.am: Added numaddr.scm.
43289	* guimb/scm/redirect.scm: Use mu-message-send instead of
43290	  sieve-message-bounce.
43291	* guimb/scm/reject.scm: Likewise.
43292	* guimb/scm/sieve-core.scm: Introduced sieve-daemon-email
43293	  variable. Removed sieve-message-bounce, since recent modifications
43294	  to mailer_send_message() and mu-message-send provide all the
43295          required functionality.
43296
43297	* libmu_scm/mu_message.c: Optional parameters may be #f.
43298	* pop3d/popauth.c: Reset the user privileges in case popauth is
43299	  installed setuid.
43300
433012001-12-28 Sergey Poznyakoff
43302
43303	* comsat/comsat.h: Added include <argcv.h>
43304	* guimb/collect.c: (collect_create_mailbox) Removed unused auto
43305	  variable.
43306	* guimb/guimb.h: Added missing includes and prototypes.
43307	* lib/mu_dbm.h: Likewise.
43308
43309	* libmu_scm/mu_message.c: (mu_message_send) Synchronized
43310	  with recent changes to mailer_send_message().
43311	  (mu_message_get_user_flag) Removed unused variable.
43312	* libmu_scm/mu_port.c: Removed unused variables.
43313	* mh/inc.c: Renamed static truncate to avoid name clash
43314	  with the libc function.
43315	* mh/mh.h: Added missing includes and prototypes.
43316	* mh/mh_argp.c: Added missing includes.
43317	* mh/mh_format.c: (strobj_create) Removed unused variable.
43318
433192001-12-17 Sam Roberts
43320
43321	* doc/texinfo/mailer.texi, include/mailutils/mailer.h,
43322	  mailbox/mailer.c, mailbox/sendmail.c, mailbox/smtp.c,
43323	  mailbox/include/mailer0.h: mailer_send_message() now takes
43324	  optional from and to addresses, so they can be specified rather
43325	  than deduced from the env or message body.
43326	* mail/send.c: modified to compile against the changed
43327	  mailer_send_message()
43328	* examples/: Makefile, msg-send.c: Added msg-send example of using
43329	  the mailer_t API.
43330	* mailbox/url_sendmail.c: Now takes advantage of url_parse().
43331	* TODO: Idea for a popen() stream_t wrapper.
43332	* doc/texinfo/stream.texi, include/mailutils/stream.h: Forgot to
43333	  add stdio_stream_create() to the header, it opens a stream_t on an
43334	  existing FILE, and you can choose whether it fcloses() it or not.
43335	* examples/.cvsignore: updated
43336
433372001-12-16 Alain Magloire
43338
43339	* mailbox/address.c:  Problem between signed and unsigned comparison.
43340
433412001-12-16 Sam Roberts
43342
43343	* TODO: updated with some notes about the doc examples
43344	* examples/mimetest.c, include/mailutils/message.h,
43345	mailbox/attachment.c:
43346	  (message_get_attachment_name, message_aget_attachment_name): new
43347	    APIs, used to be private to mailbox/attachment.c.
43348	  (message_save_attachment): filename can be NULL, it defaults to
43349	    the attachment's name
43350	* doc/texinfo/stream.texi: updated - not much text, but at least
43351	the args are correct.
43352	* TODO: updated
43353	* mailbox/attachment.c: gnu indented
43354	* examples/: mbox-dates.c, mbox-explode.c: Added -d flags.
43355	* examples/mimetest.c: gnu indented
43356
433572001-12-16 Alain Magloire
43358
43359	* mailbox/body.c: Call lazy_create() _before__ file_stream_create()
43360	to create the temporary file.
43361	* examples/mimetest.c:  An example on how to play with attachments.
43362	The code was written by Dave Inglis.
43363
433642001-12-16 Sam Roberts
43365
43366	* comsat/: comsat.c
43367          imap4d/: append.c, fetch.c
43368	  include/mailutils/: stream.h
43369          mailbox/: attachment.c, body.c, file_stream.c, filter.c,
43370	    folder_imap.c, header.c, mapfile_stream.c, mbx_mbox.c,
43371	    mbx_mh.c, mbx_pop.c, memory_stream.c, smtp.c, stream.c, tcp.c
43372	  mailbox/include/: Makefile.am, stream0.h, tcp0.h
43373
43374	Modified stream creation and opening. The *_stream_create()
43375	functions now take the specific arguments appropriate to them
43376	and setup a stream_t so that stream_open(), which now takes
43377	no arguments, can perform whatever actions are appropriate
43378	when opening that particular kind of stream.  I have tested the
43379	changes with the example programs and sieve, but not with the
43380	imap or pop servers.
43381
433822001-12-12 Sam Roberts
43383
43384	* lib/: argcv.c, xmalloc.c: Fixed warnings about functions called
43385	without prototypes.
43386	* sieve/sieve.c: First crack at including wicket_t's ticket, not
43387	tested.
43388	* m4/debug.m4: Added -Wall in debug mode.
43389
433902001-12-10 Sam Roberts
43391
43392	* comsat/.cvsignore, doc/rfc/.cvsignore, examples/.cvsignore,
43393	mail/.cvsignore, sieve/examples/.cvsignore: Ignored.
43394	* mailbox/tcp.c: I'm about to modify this file, so I'm GNU
43395	indenting it so I can see reasonable diffs. No other changes.
43396
433972001-12-03  Alain Magloire
43398
43399	Surprisingly some OSes do not have getpass()
43400	drop a dumb version in lib/getpass.c for missing platforms.
43401
43402	* configure.in: Check for getpass ();
43403	* lib/getpass.c: New file.
43404	* lib/Makefile.am: Updated.
43405
434062001-12-03  Sergey Poznyakoff
43407
43408	* configure.in: Fixed inconsistency: --with-dbm flag
43409	was erroneously named --with-old-dbm in the help output.
43410	* lib/mu_dbm.c: New function mu_dbm_stat(): retrieve
43411	struct stat for a database file (or its *.pag part
43412	for ndbm/gdbm).
43413	* pop3d/popauth.c: Added --modify, --add, --delete
43414	and --create options. Allow only --modify when the user
43415	is not the owner of the database. This allows usual
43416	users to use popauth the way they use system passwd
43417	command, provided popauth is installed setuid.
43418
43419	* guimb/scm/sieve.scm: Delete temp-file after running
43420	the script.
43421
434222001-11-26  Alain Magloire
43423
43424	* doc/texinfo/mailer.texi: Replace @func with @code
43425	missing @end deftypefun
43426
434272001-11-26  Sam Roberts
43428
43429	* doc/texinfo/mailer.texi: Hacked up work-in-progress of the mailer
43430	  API, but worth committing before I commit all the code.
43431	* mailbox/folder_pop.c: Added <strings.h> for QNX6.
43432	* .cvsignore, doc/.cvsignore: ignores sorted, and added _*
43433	* doc/texinfo/address.texi, include/mailutils/address.h,
43434	  mailbox/address.c:
43435	    address_aget_email() - like _get_email() but mallocs.
43436	    address_createv()    - like address_create(), but takes an
43437	                           array of strings.
43438	* examples/: Makefile, Urls, Urls.good: Updated url_parse() test
43439	  case.
43440	* comsat/comsat.h: Need <paths.h> and <strings.h> under QNX6.
43441	* doc/texinfo/url.texi, mailbox/url.c: Url syntax extended. If
43442	  scheme: is not followed by a "//", then the rest of the line is
43443	  returned as the path. Also a bare  scheme is now legal. So
43444	  "sendmail:" and "sendmail:/sbin/mail-inject" are now legal.
43445
434462001-11-21  Sergey Poznyakoff
43447
43448	* comsat/comsat.c: Provide default for _PATH_MAILDIR for
43449	systems lacking it.
43450
434512001-11-20  Jeff Bailey  <jbailey@outpost.dnsalias.org>
43452
43453	* configure.in: Set CPPFLAGS last.  $(sysconfdir) requires
43454	make to get it expanded, and it fubars autoconf tests.
43455
434562001-11-17  Alain Magloire
43457
43458	* include/mailutils/mailbox.h: Remove prototype
43459	mailbox_destroy_folder().
43460	* mailbox/mailbox.c (mailbox_destroy_folder): Remove.
43461	* comsat/comsat.c (notify_user): remove mailbox_destroy_folder().
43462
434632001-11-17  Alain Magloire
43464
43465	* mailbox/folder_imap.c (authenticate_imap_login): Pass the
43466	url in  ticket_pop.
43467	* mailbox/mbx_pop.c (pop_get_user): Pass the url in ticket_pop()
43468	* mailbox/mbx_pop.c (pop_get_passwd): Pass the url in ticket_pop()
43469	* mailbox/ticket.c (ticket_set_pop): Change the prototype.
43470	(ticket_pop): Change the prototype.
43471	* mailbox/wicket.c (get_pass): New function get passwd.
43472	(get_user): New function get user.
43473	(myticket_create): Take filenanme as argument and
43474	save the information.
43475	(_get_ticket): Removed.
43476	(myticket_pop): Take an url in argument.
43477	* mailbox/include/auth0.h: field _pop() prototype changed.
43478	* include/mailutils/auth.h: ticket_pop and ticket_set_pop
43479	prototype changed, add url. Include <mailutils/url.h>
43480
434812001-11-17  Alain Magloire
43482
43483	Move util_cpystr() in the mu_ namespace.
43484
43485	* include/mailutils/mutil.h: util_cpystr() to mu_cpystr().
43486	* mailbox/address.c: util_cpystr() to mu_cpystr().
43487	* mailbox/url.c: util_cpystr() to mu_cpystr().
43488	* mailbox/mutil.c: util_cpystr() to mu_cpystr().
43489	* mailbox/wicket.c: util_cpystr() to mu_cpystr().
43490
434912001-11-15  Alain Magloire
43492
43493	After exchange with Sam Roberts, it should be possible to
43494	set a stream on the message and have the message_t do
43495	the rfc822 parsing.
43496	{
43497	  message_t mesg = NULL;
43498	  header_t header = NULL;
43499	  stream_t stream = NULL;
43500	  char buffer[512];
43501	  off_t off = 0;
43502	  size_t n = 0;
43503
43504	  message_create (mesg, NULL);
43505	  file_stream_create (&stream, "/home/user/mh/mesg_1");
43506	  message_set_stream (mesg, stream, NULL);
43507
43508	  stream = NULL;
43509	  message_get_header (mesg, &header);
43510	  header_get_stream (header, &stream);
43511	  while (stream_readline (stream, buffer, sizeof buffer, off, &n) == 0
43512	          && n > 0) {
43513	    printf ("%s", buffer);
43514	    off += n;
43515	  }
43516	  message_destroy (&mesg, NULL);
43517	}
43518
43519	* mailbox/message.c (message_header_fill): New
43520	function implements a header if there was a stream set on the message.
43521	(message_body_read): Implements the stream_read of body_t of
43522	a message if there were a stream set.
43523	(message_is_modified): Check if an object was set to message_t
43524	and flag it as modified.
43525	(message_get_body): If a stream was set on the message create a
43526	temporary stream for the body.
43527	(message_set_body): Set the message modified.
43528	(message_set_header): Set the message modified.
43529	(message_set_envelope): Set the message modified.
43530	(message_set_attribute): Set the message modified.
43531	* mailbox/include/message0.h: field hdr_buf removed.
43532
43533	* mailbox/wicket.c (wicket_destroy): return void.
43534	* include/mailutils/auth.h: wicket_destroy ()
43535	should return void.
43536	* mailbox/body.c (body_is_modified): Implemented.
43537	(body_clear_modified): Implemented.
43538	(_body_get_size0): New function.
43539	(_body_get_lines0): New function.
43540	(body_get_lines): Call _body_get_lines0().
43541	(body_get_size): Call _body_get_size0().
43542	(body_lines): Fall back on the stream and iterate
43543	the entire stream to find the  line numbers.
43544	(body_size):  Fall back on the stream for the size.
43545
43546	* mailbox/folder_imap.c: Check if memory_stream_create()
43547	succeed and bailout if not.
43548
43549	* mailbox/header.c (header_destroy): Free header->mstream.
43550	(fill_blurb): Remove redundant code, header_free_cache was
43551	doing the same.  Implement the code in term of a memory
43552	stream to hold the temporary header blurb.
43553	(header_write): Implemented.
43554	* mailbox/include/header0.h: Remove fields temp_blurb and
43555	temp_blurb_len, we use mstream a memory stream and stream_len.
43556
43557	* mailbox/memory_stream.c (_memory_read): Cast the offset to size_t
43558	(_memory_readline): Cast the offset to size_t.
43559	(_memory_write): Cast the offset to size_t.
43560
435612001-11-15  Sergey Poznyakoff
43562
43563	* imap4d/append.c: Removed mailbox_destroy_folder kludge. It is
43564	not needed due to yesterday's mods of mailbox/mailbox.c.
43565	* comsat/comsat.c: Likewise.
43566
435672001-11-14  Alain Magloire
43568
43569	* mailbox/wicket.c (_get_ticket): Reset the buffer.
43570	* mailbox/mailbox.c (mailbox_get_stream): Get the stream
43571	for the mailbox object if it is null try the folder.
43572	(mailbox_set_stream): Always set it on the mailbox object.
43573
435742001-11-14  Alain Magloire
43575
43576	To provide an easy way to create a ticket_t from
43577	a file, one can create a wicket_t and fetch ticket_t's
43578	for different users to set on the authority.
43579	{
43580	  wicket_t (&wicket, "/home/alain/.tickets");
43581	  wicket_get_ticket (wicket, &ticket, "alain", NULL);
43582	  authority_set_ticket (wicket, ticket);
43583	}
43584
43585	* include/mailutils/auth.h: Added wicket_t prototypes
43586	functions: wicket_create(), wicket_destroy,
43587	wicket_get_ticket().  New prototype ticket_set_data ()
43588	ticket_get_data () ticket_set_destroy (), ticket_set_owner();
43589	* mailbox/wicket.c: New file, implements wicket_t.
43590	* mailbox/ticket.c: New file, implements ticket_t.
43591	* mailbox/auth.c: Implements only authority_t.
43592	* mailbox/Makefile.am: Update for ticket.c and wicket.c
43593
435942001-11-14  Sergey Poznyakoff
43595
43596	* comsat/action.c: Expand \n only for `echo'.
43597
435982001-11-13  Alain Magloire
43599
43600	Try to use const whenever appropriate to make it clear
43601	that a string should not be modified.  Nuke some
43602	trailing spaces, thanks to emacs.  Reduce the scope
43603	of functions with static.  GNU ident style for
43604	switch() promote a empty line after the break;
43605
43606
43607	* comsat/action.c (expand_escape): size and lncount
43608	could have been use uninitialized.
43609	(expand_escape): const char *cr.
43610	(expand_line): cr == "\n\r" make it const.
43611	variable i and size unneeded.
43612	variable c initialize to zero.
43613	(expand_line): obstack_1grow() pass *p instead of c.
43614	(default_action): const char*.
43615	(run_user_action): fprintf () missing argument.
43616	(open_rc): const char *filename.
43617	* comsat/comsat.c (username): const char *username.
43618	(mailbox_path): const prototype.
43619	(change_user): const prototype.
43620	(notify_user): const prototype.
43621	body and header unneeded variables.
43622	(find_user): const prototype.
43623	* comsat/comsat.h: Prototype updates.
43624
436252001-11-13  Sergey Poznyakoff
43626
43627	* lib/daemon.c: Use of errx() is a bsd-ism.
43628
43629	* comsat/action.c: Use maxlines instead of hardcoding the default
43630	value. Exit if execv() fails.
43631	* comsat/comsat.c: Missed newline in help output.
43632
43633	* doc/texinfo/mailutils.texi: Common index is too hard
43634	to use. Split it into Function, Program and Concept indices.
43635	* doc/texinfo/programs.texi: Added nodes for comsatd. Put
43636	@pindex and page breaks wherever needed. Fixed use of @deffn.
43637	* doc/texinfo/.cvsignore: Updated
43638
43639	* Makefile.am: Enabled comsat directory.
43640
436412001-11-12  Sergey Poznyakoff
43642
43643	* examples/comsat.conf: (new) A sample configuration file
43644	for comsatd utility.
43645	* examples/dot.biffrc: (new) A sample per-user biff configuration
43646	file.
43647	* comsat/action.c: Implemented exec. Fixed trivial bug in
43648	expand_escape().
43649	* comsat/cfg.c: New keyword: allow-biffrc.
43650	* comsat/comsat.c: Likewise.
43651	* comsat/comsat.h: extern declarations.
43652
43653	* lib/argcv.c: Ignore trailing whitespace and terminate output array
43654	with a NULL entry.
43655
43656	* mail/mail.c: Use quotes when setting default string values.
43657	* mail/set.c: Bugfix: possible dereference of NULL pointer (on
43658	input: set var=<eol> ).
43659
436602001-11-12  Alain Magloire
43661
43662	Support in POP3 mailbox client for APOP authentication.
43663	This should work, now:
43664	#MAIL='pop://alain;AUTH=+APOP@localhost' ./frm
43665	Pop passwd: secret  <--- apop secret
43666	...
43667
43668	* mailbox/folder_pop.c (folder_pop_get_authority):
43669	Enable APOP code.
43670	* mail bx/mbx_pop.c: Add md5-rsa.h.
43671	(_pop_apop): New function to do APOP authentication.
43672	(_pop_user): Factor some code in pop_get_user() and
43673	pop_get_passwd() to share with _pop_apop().
43674	(pop_get_user): New function, get the user login.
43675	(pop_get_passwd): New function, get the user passwd.
43676	(pop_get_md5): New function get timestamp.
43677	* mailbox/url_pop.c: Add 2001 in Copyright.
43678	* pop3d/apop.c: Remove trailing spaces.
43679
43680	* frm/frm.c: New option -d, --debug.
43681	To put the mailbox_t in debug mode, very practical
43682	to watch the traffic.
43683
436842001-11-11  Alain Magloire
43685
43686	Most daemon will share the same code to daemonize(), we use
43687	a generic one, lib/daemon.c, so any bug fix will impact the
43688	others and reduce maintenance/duplication.
43689
43690	* lib/Makefile.am: Addition daemon.c
43691	* lib/daemon.c: New file.
43692	* pop3d/pop3d.c (pop3d_daemon_init): Use lib/daemon.c:daemon() code
43693	instead.
43694	* imap4d/imap4d.c (imap4d_daemon_init): Use lib/daemon.c:daemon code
43695	instead.
43696	* comstat/comstat.c (comstat_daemon_init): Use lib/daemon.c:daemon code
43697	instead. Remove trailing spaces.
43698
436992001-11-11  Sergey Poznyakoff
43700
43701	* comsat/action.c: (new) User-defined actions for comsat.
43702	* comsat/Makefile.am: Added action.c to sources
43703	* comsat/cfg.c: Removed confusing comment
43704	* comsat/comsat.c: Call run_user_action instead of
43705	dumping message contents to user's tty.
43706	* comsat/comsat.h: Include mailutils headers.
43707
437082001-11-11  Alain Magloire
43709
43710	* lib/mu_dbm.c: Add <errno.h>.
43711	Remove trailing spaces.
43712
437132001-11-11  Sergey Poznyakoff
43714
43715	* lib/mu_dbm.c: (new) These functions provide an
43716	intermediate layer between the DBM API and mailutils'
43717	applications.
43718	* lib/mu_dbm.h: (new) Declarations for DBM support.
43719	* lib/Makefile.am: Added mu_dbm.[ch]
43720
43721	* acconfig.h: Added DBM-related WITH- defines
43722	* configure.in: New options: --with-gdbm, --with-ndbm,
43723	--with-old-dbm
43724
43725	* pop3d/popauth.c: (new) A tool for manipulating authentication
43726	databases.
43727	* pop3d/Makefile.am: Added popauth.
43728	* pop3d/.cvsignore: Likewise.
43729	* pop3d/apop.c: Bunch of changes due to introduction of new
43730	DBM interface.
43731	* pop3d/pop3d.h: Likewise.
43732
43733	* comsat/Makefile.am: Added comsat.h to sources
43734
437352001-11-10  Jeff Bailey  <jbailey@outpost.dnsalias.org>
43736
43737	* pop3d/pop3d.h: Use SYSCONFDIR, not hardcoded /etc
43738
43739	* doc/man/.cvsignore: New File
43740
43741	* doc/Makefile.am: Add man to SUBDIRS
43742
43743	* configure.in: Build doc/man/Makefile
43744	Provide -DSYSCONFDIR in CPPFLAGS
43745
43746	* doc/man/pop3d.1: New File
43747
43748	* doc/man/imap4d.1: New File
43749
43750	* doc/man/Makefile.am: New File
43751
43752	* pop3d/pop3d.c: Change timeout to unsigned int from size_t.
43753	Thanks to James Troup <james@nocrew.org>
43754
437552001-11-05  Alain Magloire
43756
43757	* mailbox/mutil.c (mu_parse_imap_date_time): This one is so
43758	obvious that it is embarrassing.  In a struct tm { }
43759	tv_wday [0,6] Sunday == 0.  Change the Array for it to
43760	start with "Sun" instead of "Mon".
43761
437622001-11-05  Sergey Poznyakoff
43763
43764	* configure.in: check for vsyslog
43765
43766	* mailbox/muerror.c: New function mu_syslog_error_printer().
43767	Removed static qualifier from default_error_printer, added mu_
43768	prefix to it.
43769	* include/mailutils/error.h: Protos for mu_.*_error_printer
43770	functions.
43771
43772	* imap4d/imap4d.c: Use mu_syslog_error_printer.
43773	* pop3d/pop3d.c: Likewise.
43774	* comsat/comsat.c: Likewise. Also fixed misplaced condition.
43775
437762001-11-02  Alain Magloire
43777
43778	* mailbox/folder_imap.c: If authority is null default to
43779	user/passwd.
43780	* mailbox/folder_pop.c: If authority is null default to
43781	user/passwd.
43782	* mailbox/mbx_pop.c(pop_open): Do not try to reconnect.
43783
437842001-11-02  Sergey Poznyakoff
43785
43786	* comsat/comsat.c: Restart on sighup when in daemon mode.
43787	Fight floods by increasing delays exponentially.
43788	Fill in `hostname' on startup.
43789	* comsat/comsat.h: include <ctype.h>.
43790	* comsat/cfg.c: Removed include <ctype.h>.
43791
437922001-11-01  Alain Magloire
43793
43794	There were confusion, about the authority_t and the ticket_t.
43795	An authority_t is an object that implements an authentication
43796	mechanism i.e. APOP, SASL, User/Passwd.  To retrieve or get
43797	information from the client/user, authority_t will use the
43798	ticket_t, it will call ticket_pop ().  For example, on an
43799	authority_t object that implements the user/passwd mechanism
43800	ticket_pop () will be call two times once for the user and
43801	the other for the passwd, by the authority_t object.
43802
43803	So far so good, but the problem here was we had
43804	mailbox_{g,s}et_ticket(), folder_{g,s}et_ticket() and
43805	mailbox_{g,s}et_authority() and folder_{g,s}_authority().
43806	For example for a ticket , depending on when xx_set_ticket ()
43807	was done, a ticket_t could have been set on the mailbox_t structure
43808	or on the folder_t structure.  This was leading to use the wrong one,
43809	folder->ticket or mailbox->ticket.  Same problem occurs for
43810	authority_t.  To clear this up, ticket_t can only be set on the
43811	authority_t and authority_t can only be on a folder.  Having only one
43812	way to get at the authority or at the ticket fix the race conditions:
43813	{
43814	   // No error checking is done.
43815	   mailbox_t mbox;
43816	   folder_t folder;
43817	   authority_t auth;
43818	   ticket_t ticket; ..
43819	   ..
43820	   // Setting the ticket
43821	   mailbox_create (&mbox, where);
43822	   mailbox_get_folder (mbox, &folder);
43823	   folder_get_authority (folder, &auth)
43824	   authority_set_ticket (auth, ticket);
43825	   ....
43826	}
43827
43828	* include/mailutils/mailbox.h: Remove mailbox_{g,s}et_ticket().
43829	mailbox_{gs}et_authority ().
43830	* include/mailutils/folder.h: Remove folder_{gs}et_authority().
43831	* mailbox/mailbox.c (mailbox_get_folder): New function.
43832	(mailbox_get_ticket): Removed.
43833	(mailbox_set_ticket): Removed.
43834	(mailbox_set_authority): Removed.
43835	(mailbox_get_authority): Removed.
43836	* mailbox/folder.c (folder_get_ticket): Removed.
43837	(folder_set_ticket): Removed.
43838	(folder_destroy): Removed destruction of ticket.
43839	* mailbox/folder_imap.c (folder_imap_get_authority): New function.
43840	(_folder_imap_init): Create authority.
43841	* mailbox/folder_pop.c (folder_pop_get_authority): New function.
43842	(folder_pop_open): New function.
43843	(folder_pop_close): New function.
43844	(_folder_pop_init): Create authority.
43845	* mailbox/mbx_imap.c (_mailbox_imap_init): Remove the creation
43846	of authority here, moved to _folder_imap_init().
43847	* mailbox/mbx_pop.c (_mailbox_pop_init): Remove the creation
43848	of authority here, moved to _folder_imap_init().
43849
43850	* messages/messages.c (messages_count): Argument should
43851	be const.
43852
438532001-11-01  Sergey Poznyakoff
43854
43855	* configure.in: Added check for utmp.h & utmpx.h
43856
43857	* mailbox/mutil.c: New function: mu_normalize_path() moved
43858	from imap4d/util.c
43859	* include/mailutils/mutil.h: Added declaration for
43860	mu_normalize_path().
43861	* imap4d/imap4d.h: Removed declaration of util_normalize_path().
43862	* imap4d/login.c: Use LOG_FACILITY instead of LOG_MAIL.
43863	Use mu_normalize_path().
43864	* imap4d/namespace.c: Use mu_normalize_path().
43865	* imap4d/util.c: Removed declaration of util_normalize_path().
43866
43867	* mailbox/mailbox.c: mailbox_get_stream(): Fixed funny bug,
43868	(introduced Dec 4, 2000).
43869
43870	* mailbox/mbx_imap.c: Use ENOSYS instead of ENOTSUP.
43871
43872	* comsat/: New directory. An implementation of comsat daemon.
43873	* comsat/Makefile.am: (new)
43874	* comsat/.cvsignore: (new)
43875	* comsat/comsat.c: (new) Main module
43876	* comsat/cfg.c: (new) Configuration and ACL routines.
43877	* comsat/comsat.h: (new) Declarations for comsat.
43878
438792001-11-01 00:15  sroberts
43880
43881	* TODO: Added suggestion for a mailcap based file viewer.
43882
438832001-10-31  Alain Magloire
43884
43885	* messages/message.c (messages_count): getenv ("MAIL") may return NULL.
43886	In this case we were trying to printf (" ..%s\n", NULL); GNU/Linux
43887	seems to cope with it but QNX/Neutrino sigsegv miserably.  Fix the code
43888	by getting the url of the mailbox and calling url_to_string().
43889
43890	* mailbox/mbx_default.c: If the argument is NULL __or__ an empty
43891	string check MAIL and FOLDER environment.
43892
43893	* imap4d/namespace.c: Put namespace_enumerate() and namespace_enumerate()
43894	static scope.
43895
43896	* mail/msgset.y: search "mail.h" in the current dir.
43897
438982001-10-31  Alain Magloire
43899
43900	* mailbox/mbx_imap.c (delete_to_string): Try to turn a sequence
43901	of number to IMAP msgset. Call add_number for the work.
43902	(add_number): New function to add number to string for
43903	IMAP msgset.
43904
439052001-10-30  Alain Magloire
43906
43907	* mailbox/body.c: Remove unneeded prototype.
43908	* mailbox/mbx_imap.c (mailbox_imap_close): Clear the callback
43909	string structure.
43910	(imap_scan0): Clear the callback string structure.
43911	(imap_append_message): Remove unused variable.
43912
439132001-10-30  Sam Roberts
43914
43915	* mailbox/: folder_imap.c, mbx_imap.c, include/imap0.h: Implemented
43916	AUTH=ANON, the anonymous SASL mechanism.
43917	* TODO: Updated AUTH=ANON todo, and added some wish-list utilities.
43918	* doc/rfc/: rfc2195.txt, rfc2222.txt, rfc2444.txt, rfc2595.txt,
43919	rfc2808.txt, rfc2831.txt, sasl-mechanisms: added SASL rfcs and
43920	registry
43921	* examples/.cvsignore: mbox-check
43922	* examples/: Makefile, mbox-check.c: Added new example,
43923	mbox-check.c
43924
439252001-10-30  Alain Magloire
43926
43927	* acconfig.h: #define ssize_t.
43928	* configure.in: Add AC_CHECK_TYPE(ssize_t, int);
43929
439302001-10-26  Sergey Poznyakoff
43931
43932	Fixed behavior in send mode when the stdin is not a terminal
43933	(i.e. when used as mail addr@dom.ain < message): do not ask
43934	for cc, bcc, and do not echo the contents of the message
43935	(when compiled with readline).
43936
43937	* mail/mail.c: Use ml_readline(). Check for `!interactive' and
43938	force appropriate settings _after_ sourcing mail.rc files.
43939	Force `set quiet' if in non-interactive mode.
43940	* mail/mail.h: Declaration for ml_readline().
43941	* mail/mailline.c: New functions ml_readline_internal(),
43942	ml_readline().
43943	* mail/send.c: Use ml_readline().
43944	* mail/source.c: Do not complain if the file does not exist.
43945
439462001-10-24  Alain Magloire
43947
43948	* configure.in: Check for getdelim().
43949	* lib/getline.c: change the return values from int to ssize_t
43950	to follow GNU LibC.
43951
439522001-10-23  Alain Magloire
43953
43954	The message_t object makes no guaranty about the size and the lines
43955	that it returns, if it is pointing to non-local file messages,
43956	i.e POP3, IMAP4, the entire message may not have been downloaded yet.
43957	IMAP is very susceptible on the size, example:
43958	 A003 APPEND saved-messages (\Seen) {310}
43959	 Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
43960	 From: Fred Foobar <foobar@Blurdybloop.COM>
43961	 Subject: afternoon meeting
43962	 To: mooch@owatagu.siam.edu
43963	 Message-Id: <B27397-0100000@Blurdybloop.COM>
43964	 MIME-Version: 1.0
43965	 ......
43966	(1) If the IMAP4 server does not get the right size advertise in the
43967	string literal, it will misbehave.
43968	(2) Since we are assuming that the message will be in (unix)native
43969	file system format meaning ending with NEWLINE, we will have
43970	to do some calculations about the RFC822.SIZE of the message.
43971	(3) As pointed above, it is not possible to rely on message_size()
43972	nor message_lines() to return the right count and even missing by
43973	one can be deadly.
43974	So we download the message to a floating message to guaranty that
43975	we know the exact size when transmitting it back the IMAP server,
43976	this is the only sane thing to do IMHO.  We could always
43977	be smart; check if the message is local (i.e from the local file
43978	system: mbox, mh, etc ..) and was not modified.  If those two
43979	requirements are true we can assume that the sizes/lines are right.
43980	But for now do it simple, and create a temporary file/message_t.
43981
43982	* mailbox/mbx_imap.c (imap_append_message):  If the message
43983	is from the same IMAP server optimize by doing COPY.  If not
43984	call imap_append_message0() save the original message to a
43985	floating message i.e. file, and use that floating message for
43986	the append.  Temporary message is destroyed when finish.
43987	The drawback is this function is no long nonblocking safe.
43988
439892001-10-23  Alain Magloire
43990
43991	* mailbox/body.c: body_lines () nd body_size () were not
43992	properly overridden given the wrong size and line number, fixed.
43993	* mailbox/mbx_imap.c (mailbox_imap_close): Not to send another SELECT
43994	but rather just close the mailbox if not selected.
43995	(imap_scan0): If there is no messages in the mailbox no need to
43996	send the FETCH 1:*.
43997	* mailbox/message.c (message_is_modified): Protect against null
43998	pointer.
43999	* mailbox/mutil.c: Add <errno.h> if we use errno directly.
44000	(mu_get_user_email): size not used, nuked.
44001
44002	* TODO: Some stuff todo 8).
44003
440042001-10-23  Sergey Poznyakoff
44005
44006	* mailbox/mutil.c: New function mu_get_user_email.
44007	* include/mailutils/mutil.h: Prototype for mu_get_user_email.
44008	* mail/alt.c: Determine full user email address (mail_set_my_name).
44009	* libmu_scm/mu_address.c: New function mu-username->email, deduces
44010	user's email from his username.
44011	* libmu_scm/mu_message.c: New function mu-message-destroy.
44012	mu_scm_message_free(): Destroy the underlying message if its owner
44013	is NULL.
44014	* guimb/scm/sieve-core.scm: Use mu-username->email to initialize
44015	sieve-my-email.
44016	* guimb/scm/redirect.scm: Use close-pipe instead of close-output-port.
44017	Use mu-message-destroy.
44018	* guimb/scm/reject.scm: Delete message after sending reject
44019	notification.
44020
44021	MH: Implemented user profiles.
44022
44023	* mh/mh.h: New prototypes.
44024	* mh/mh_argp.c: Honor `progname:' entries in the user's profile.
44025	* mh/mh_init.c: Read user's profile. Use values from there instead
44026	of hardcoded ones.
44027	* mh/inc.c: Do not call mh_init() explicitly.
44028	* mh/scan.c: Likewise.
44029
440302001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
44031
44032	* doc/texinfo/Makefile.am: Remove version.texi, it's implied.
44033
44034	* libmu_scm/Makefile.am: Clean @GUILE_PROCEDURES_TXT@
44035
44036	* guimb/Makefile.am: Clean @GUILE_PROCEDURES_TXT@
44037
440382001-10-21  Sergey Poznyakoff
44039
44040	Changes for compatibility with automake 1.5:
44041
44042	* guimb/Makefile.am: Restored -I.
44043	* mh/Makefile.am: Renamed ALL_LDADD to mh_LIBS.
44044
440452001-10-20  Alain Magloire
44046
44047	* configure.in: Set to 0.0.9c.
44048
44049	* doc/texinfo/mbox.texi: Updated the docs for mbox(Unix).
44050	* doc/texinfo/pop.texi: Updated the docs for pop3.
44051
44052	* imap4d/expunge.c: Bug:  Expunge was not sending the
44053	untag "* %d EXPUNGED" for message deleted.  Call imap4d_sync ()
44054v	which will do the right thing.
44055	* imap4d/noop.c: Bug: It should call imap4d_sync () to notify
44056	the client of any changes.
44057	* imap4d/sync.c (notify_deleted): Typo should be EXPUNGED
44058	with a D.
44059	(imap4d_sync): Bug: Checked also if the number of messages changed.
44060
44061	* mailbox/folder_imap.c (imap_flags): Bug: Rewrite it to be generic
44062	and sets the flags for the attribute.
44063	(imap_fetch_flags): Call imap_flags().
44064	(imap_permanentflags): Call imap_flags().
44065
44066	* mailbox2/include/mailutils/mbox.h: Update prototypes.
44067	* mailbox2/include/mailutils/sys/mbox.h: Update prototypes.
44068	* mailbox2/include/mailutils/pop3.h: Update prototypes.
44069	* mailbox2/mbox/mbox_expunge.c (mbox_expunge): Calls mbox_expunge0 ().
44070	(mbox_save): Calls mbox_expunge0().
44071	* mailbox2/mbox/mbox_scan.c (mbox_scan): Calls mbox_scan0 ().
44072	(mbox_count): Calls mbox_scan0().
44073	* mailbox2/pop3/pop3_capa.c: Provide a special iterator.
44074	* mailbox2/pop3/pop3_lista.c: Provide a special iterator.
44075	* mailbox2/pop3/pop3_uidla.c: Provide a special iterator.
44076
440772001-10-19  Sergey Poznyakoff
44078
44079	MH inc is fully functional:
44080
44081	* mh/inc.c: Implemented -audit.
44082	* mh/mh_init.c: New functions mh_audit_open(), mh_audit_close().
44083	* mh/mh.h: Protos for new functions.
44084	* mh/mh_format.c: Minor bugfix in builtin_mbox().
44085
44086	* guimb/Makefile.am: Removed superfluous -I.
44087
440882001-10-19  Sergey Poznyakoff
44089
44090	Implemented saving of MH context.
44091
44092	* mh/inc.c: Fixed truncate option. Implemented -changecur. The only
44093	feature inc lacks so far is -audit.
44094	* mh/mh_format.c: Minor fix in builtin_match().
44095	* mh/mh_getopt.c: Fixed option recognition heuristics.
44096	* mh/mh_init.c: New globals: ctx_name -- keeps full context file
44097	name, ctx_header -- keeps current context (as a MU header).
44098	mh_init(): Use new globals.
44099	New functions: mh_save_context, mh_write_context_file, mh_check_folder,
44100	mh_getyn.
44101	* mh/mh.h: Prototypes for new functions.
44102
441032001-10-17  Sam Roberts
44104
44105	* README-alpha : Update cvs repository path.
44106
441072001-10-17  Sergey Poznyakoff
44108
44109	After discussion with Jeff, removed maintainer-mode quirks
44110	and introduced --enable-debug switch.
44111
44112	* configure.in: Use MU_DEBUG_MODE.
44113	* m4/maintainer.m4: removed.
44114	* m4/debug.m4: (new) Handle --enable-debug option. When
44115	the option is specified, adds -ggdb to the invocation of
44116	gcc, and removes any optimization directives from CFLAGS.
44117	* m4/Makefile.am: Removed maintainer.m4, added debug.m4
44118	and regex.m4 (committed earlier, but apparently forgotten
44119	to add).
44120	* guimb/Makefile.am: Removed MAINTAINER_MODE conditionals.
44121	* libmu_scm/Makefile.am: Likewise.
44122	* mail/Makefile.am: Likewise.
44123
44124	* imap4d/imap4d.h: Added proto for strtok_r.
44125
44126	* .cvsignore: Updated (config.sub, ltconfig, etc.)
44127
441282001-10-16  Alain Magloire
44129
44130	According to rfc2060 the minimum timeout is 30 minutes.  But
44131	it is not unusual to see server with a shorter timeout.  When
44132	the timeout occurs, the server sends a BYE.  To catch this
44133	all functions in folder_imap.c and mbx_imap.c use a prologue
44134	folder_open() or imap_messages_count to check if the server
44135	timed out and reconnect.  This is not bullet proof since the
44136	"* BYE" will be act upon on the second request, the first
44137	is where we catch "* BYE".  On mailbox2 this behaviour will
44138	be disable/enable with a property and make more reliable,
44139	so client set the property "AUTORECONNECT".
44140
44141	* mailbox/folder_imap.c: Prologue to must functions calling
44142	folder_open().
44143	* mailbox/mbx_imap.c: Prologue to must functions calling
44144	folder_open() or imap_messages_count.
44145	(section_name): Buglet passed the wrong argument to sizeof().
44146
44147	For debugging purposes, to see the traffic
44148	* mailbox/folder_imap.c:
44149	Print to stderr the command sent to the IMAP server.
44150	#define DEBUG_SHOW_COMMAND 1
44151	Print to stderr the responses received from the IMAP server.
44152	#define DEBUG_SHOW_RESPONSE 1
44153	Print to stderr the literal/quoted string received from the IMAP
44154	server. #define DEBUG_SHOW_DATA 1
44155
441562001-10-16  Sergey Poznyakoff
44157
44158	* doc/texinfo/mailutils.texi: Eliminated overfull \hboxes in printed
44159	output.
44160	* doc/texinfo/programs.texi: Likewise. Use @ref instead of @xref
44161	wherever appropriate.
44162
441632001-10-15  Alain Magloire
44164
44165	* mailbox/sendmail.c: Use vfork() instead of fork().  In a
44166	multithreaded environment, fork () may not be supported.
44167	Since we do fork()/exec(), vfork() will do fine.
44168	This was trigger by QNX/Neutrino, where fork()ing is not
44169	supported after threads have been created.
44170
441712001-10-15  Sam Roberts
44172
44173	* doc/texinfo/programs.texi: Typo and semantics corrections.
44174
441752001-10-15  Alain Magloire
44176
44177	* mailbox/mbx_imap.c (imap_message_readline imap_body_readline):
44178	Bad analysis on my part. Functions removed.
44179
44180	* configure.in: Bump to 0.0.9b
44181
44182	* TODO: Put a note apropos mailbox2.
44183
441842001-10-14  Alain Magloire
44185
44186	* mailbox/mbx_imap.c(imap_message_readline imap_body_readline):
44187	The buffer was not null terminated if no newline was found.
44188
441892001-10-14  Alain Magloire
44190
44191	The code for IMAP, is a pain, the rewrite should clean all those
44192	hacks.  Something to remember for the mailbox2 is to do some
44193	smart caching, the current buffered stream is not good enough.
44194
44195	* configure.in: VERSION is set to 0.0.9a for the alpha.
44196	* frm/frm.c: Prototype for usage(). get_personal() should use
44197	const char *.
44198	* mail/mail.c (main): Use mailbox_scan() instead of
44199	mailbox_messages_count () it is faster for IMAP.
44200
44201	* mailbox/mbx_imap.c(imap_get_message0): Remove the
44202	stream_setbufsiz() it is no longer used.
44203	(imap_message_readline imap_body_readline):
44204	Bug fix, readline will only consume up to '\n' even though the
44205	buffer is bigger.  So we have to adjust the offset/lines/size
44206	to reflect what we consume.  This is not very good for example
44207	doing:
44208	{
44209	   off_t offset = 14;
44210	   char buffer[512];
44211	   stream_readline (stream, buffer, sizeof buffer, offset, NULL);
44212	   ...
44213	}
44214	Will send to the impap server.
44215	C: g445 FETCH 4 BODY.PEEK[2]<0.2048>
44216        S: * 4 FETCH (BODY[2]<0> {739}
44217	S: g445 OK FETCH completed
44218
44219	This is waste since the first line is only 37 bytes.  We will
44220	have to come up on the second API with some smart caching.
44221
44222	* mailbox/memory_stream.c (_memory_write): Nasty bug
44223	was not updating the stream size.
44224	* mailbox/stream.c(stream_readline): Take care of known
44225	case where the buflen is 0 or 1.
44226
442272001-10-14  Alain Magloire
44228
44229	The code for property.c has been changed for a more simple approach,
44230	it is the same approach as mail/util.c(environment) settings.
44231	The old code was simply overkill, property_t was seldom used,
44232	if at all, no need for heavy hash table and all that jazz.
44233
44234	* mailbox/property.c:  New code, the same as mail/util.c environment.
44235	* mailbox/mbx_mbox.c (_mbx_init): Remove property_add_defaults() etc ..
44236	no longer in use in the initialization code.
44237	* mailbox/mbx_imap.c: Likewise
44238	* mailbox/mbx_pop.c: Likewise
44239	* mailbox/mbx_mh.c: Likewise
44240	* mailbox/header.c: Removed property code.
44241	* mailbox/body.c: Removed property code.
44242	* mailbox/message.c: Removed property code.
44243	* mailbox/filter.c: Changed the code according to the new property_t.
44244	* mailbox/filter_rfc822.c: Changed the code according to the new
44245	property_t structure.
44246	* include/mailutils/header.h: Removed property.
44247	* include/mailutils/body.h: Removed property.
44248	* include/mailutils/message.h: Removed property.
44249	* include/mailutils/property.h: Removed property_add_defaults()
44250	property_set_valued () takes one more argument for overwrite.
44251	* mailbox/include/header0.hy: Removed property field.
44252	* mailbox/include/body0.hy: Removed property field.
44253	* mailbox/include/message0.hy: Removed property field.
44254	* mailbox/mailbox.c(mailbox_get_property mailbox_set_property):
44255	Changed Property code.
44256	* mailbox/mailer.c(mailer_set_property mailer_get_property):
44257	Changed Property code.
44258
44259	* mailbox/folder_imap.c (imap_search imap_expunge imap_status): Stubs
44260	SEARCH is not implemented yet, STATUS neither and EXPUNGE is not used.
44261
44262	* mailbox/list.c: Renamed variable index to indx to shutup
44263	gcc that was confused with index() when warning level was high.
44264	* mailbox/md5-rsa.c: Likewise.
44265
44266	* mailbox/mailbox.c (mailbox_get_debug mailbox_set_debug):
44267	The debug object was being set on the folder not the mailbox.
44268
44269	* mailbox/mbx_imap.c (imap_messages_count): Attempt to reconnect
44270	if the connection timeout.  Is this wise?
44271	(imap_scan0): Moved gut of imap_scan() code here.
44272	(imap_scan): Stub calling imap_scan0() with notification enable.
44273	(imap_expunge): After CLOSE, call imap_scan0() with notification
44274	disable.
44275
44276	Memory leak in parse822, this was a real pain to trace, because
44277	of the recursive nature of the algorithm.  Sam should buy me
44278	a beer for this.
44279
44280	* mailbox/parse822.c: Used more assert to catch errors.
44281	(parse822_group): phrase was not free() in case of failure.
44282	(parse822_mail_box): Dead "else if" branch removed and free phrase.
44283	(parse822_route): accumulator was not being freed.
44284	(parse822_local_part): Moved down st_free(more).
44285	(parse822_domain): Moved down st_free(more).
44286
442872001-10-14 Sergey Poznyakoff
44288
44289	Small fixes:
44290
44291	* frm/frm.c: Do not output extra newline when running with
44292	--field option.
44293	* mail/reply.c: Do not prefix subject line with Re: if it
44294	already starts with it
44295	* mail/send.c: Handle ~x escape properly.
44296	* mail/table.c: Removed entry for ~x: it is handled by send.c
44297	* mail/var.c: Delimit addresses with space (~t, ~c and ~b escapes).
44298	Removed var_exit().
44299
44300	* guimb/main.c: Fixed typo in --help output.
44301	* guimb/scm/README: (new).
44302
44303	Reorganized /doc. Added some documentation (primarily, program.texi)
44304
44305	* configure.in: Added doc/*/Makefile
44306	* doc/*.texi, doc/*.rfc: removed.
44307	* doc/Makefile.am: Reorganized doc structure
44308	* doc/.cvsignore: Likewise.
44309
44310	* doc/texinfo: New directory
44311	* doc/texinfo/Makefile.am: (new)
44312	* doc/texinfo/.cvsignore: (new)
44313	* doc/texinfo/.ispell_english: (new) User dictionary for spell-checking
44314	docs.
44315	* doc/texinfo/address.texi: Moved from ..
44316	* doc/texinfo/attribute.texi: Likewise.
44317	* doc/texinfo/auth.texi: Likewise.
44318	* doc/texinfo/body.texi: Likewise.
44319	* doc/texinfo/c-api.texi: Likewise.
44320	* doc/texinfo/encoding.texi: Likewise.
44321	* doc/texinfo/envelope.texi: Likewise.
44322	* doc/texinfo/ex-address.texi: Likewise.
44323	* doc/texinfo/ex-url.texi: Likewise.
44324	* doc/texinfo/folder.texi: Likewise.
44325	* doc/texinfo/framework.texi: Likewise.
44326	* doc/texinfo/headers.texi: Likewise.
44327	* doc/texinfo/imap4.texi: Likewise.
44328	* doc/texinfo/iterator.texi: Likewise.
44329	* doc/texinfo/locker.texi: Likewise.
44330	* doc/texinfo/mailbox.texi: Likewise.
44331	* doc/texinfo/maildir.texi: Likewise.
44332	* doc/texinfo/mailer.texi: Likewise.
44333	* doc/texinfo/mailutils.texi: Likewise.
44334	* doc/texinfo/mbox.texi: Likewise.
44335	* doc/texinfo/message.texi: Likewise.
44336	* doc/texinfo/mh.texi: Likewise.
44337	* doc/texinfo/mime.texi: Likewise.
44338	* doc/texinfo/nntp.texi: Likewise.
44339	* doc/texinfo/parse822.texi: Likewise.
44340	* doc/texinfo/pop3.texi: Likewise.
44341	* doc/texinfo/programs.texi: Likewise.
44342	* doc/texinfo/sendmail.texi: Likewise.
44343	* doc/texinfo/sfrom.c.texi: Likewise.
44344	* doc/texinfo/smtp.texi: Likewise.
44345	* doc/texinfo/stream.texi: Likewise.
44346	* doc/texinfo/url.texi: Likewise.
44347	* doc/texinfo/version.texi: Likewise.
44348
44349	* doc/rfc: New directory
44350	* doc/rfc/Makefile.am: (new)
44351	* doc/rfc/.cvsignore: (new)
44352        * doc/rfc/rfc1731.txt: Moved from ..
44353        * doc/rfc/rfc1734.txt: Likewise.
44354        * doc/rfc/rfc1738.txt: Likewise.
44355        * doc/rfc/rfc1939.txt: Likewise.
44356        * doc/rfc/rfc1957.txt: Likewise.
44357        * doc/rfc/rfc2045.txt: Likewise.
44358        * doc/rfc/rfc2046.txt: Likewise.
44359        * doc/rfc/rfc2047.txt: Likewise.
44360        * doc/rfc/rfc2049.txt: Likewise.
44361        * doc/rfc/rfc2060-errata: Likewise.
44362        * doc/rfc/rfc2060.txt: Likewise.
44363        * doc/rfc/rfc2088.txt: Likewise.
44364        * doc/rfc/rfc2111.txt: Likewise.
44365        * doc/rfc/rfc2192.txt: Likewise.
44366        * doc/rfc/rfc2193.txt: Likewise.
44367        * doc/rfc/rfc2221.txt: Likewise.
44368        * doc/rfc/rfc2245.txt: Likewise.
44369        * doc/rfc/rfc2298.txt: Likewise.
44370        * doc/rfc/rfc2342.txt: Likewise.
44371        * doc/rfc/rfc2368.txt: Likewise.
44372        * doc/rfc/rfc2384.txt: Likewise.
44373        * doc/rfc/rfc2449.txt: Likewise.
44374        * doc/rfc/rfc2821.txt: Likewise.
44375        * doc/rfc/rfc2822.txt: Likewise.
44376        * doc/rfc/rfc3028.txt: Likewise.
44377        * doc/rfc/rfc821.txt: Likewise.
44378        * doc/rfc/rfc822.txt: Likewise.
44379
443802001-10-13  Alain Magloire
44381
44382	* mail/mail.c: Possibility to enable debugging output.
44383	It should probably be a runtime option via set debug=1 or something
44384	for now it is disable between if (0) {...}.
44385
44386	More cleanup in the IMAP code.  A memory stream buffer is
44387	use to save the string literal sent by the IMAP server.
44388	The allocation is handle by the memory_stream which simplifies
44389	the code.
44390
44391	* folder_imap.c (folder_imap.c): Create a memory stream to
44392	hold the literal or quoted string send by the IMAP server.
44393	(folder_imap_list folder_imap_lsub): There is no callback
44394	field the struct folder_list is in struct _f_imap now.
44395	(imap_literal_string imap_quoted_string imap_string):  Use the
44396	memory string stream to save the result.
44397	(imap_body): Still need to be clean, but creates the cache
44398	header when doing the scan.
44399	(imap_parse): Do not use alloca().
44400
444012001-10-13  Jeff Bailey
44402
44403	* guimb/Makefile.am: Remove GNU Makeism.
44404
44405	* libmu_scm/Makefile.am: Remove GNU Makeism.
44406
444072001-10-12  Jeff Bailey
44408
44409	* libmu_scm/Makefile.am: Fixes for RO srcdir.
44410
44411	* guimb/Makefile.am: Fixes for RO srcdir.
44412
444132001-10-11 Alain Magloire
44414
44415	A small cleanup of the IMAP code.
44416
44417	* mailbox/folder_imap.c (imap_body):  Destroy the cache header
44418	if it was previously set on a SCAN.
44419	* mailbox/mbx_imap.c (delete_to_string): New function, to generate
44420	a string of IMAP message numbers.
44421	(imap_expunge): use delete_to_string;
44422	(attribute_string): Removed.
44423	(flags_string): Removed.
44424	(flags_to_string): Replace attribute_string() and flags_string().
44425	(message_operation): Rename to fetch_operation.
44426	* mailbox/include/imap0.h(struct _f_imap): field func and id
44427	removed, never used.
44428
444292001-10-11 Alain Magloire
44430
44431	* mailbox/folder_imap.c (imap_quoted_string): Free the buffer.
44432	(imap_string): Free the buffer.
44433	(imap_body): Check if we already have the fheader header.
44434	(imap_scan): Forgot the break in the switch.
44435
444362001-10-11 Alain Magloire
44437
44438	In order to boost performance, when doing the scan, we use
44439	the approach of downloading a subset of the header from all
44440	of messages.  The way it was done before was that the headers
44441	were requested one by one per message.  This was causing performance
44442	issues because we were doing a lot of small transactions on
44443	the TCP/IP stack.  By bundling the entire thing in one request
44444	"a0000 FETCH 1:* (FLAGS RFC822.SIZE BODY.PEEK[HEADER.FIELDS(..)])\r\n"
44445	there were less transactions and the speed was increase
44446	by a factor of 100+.
44447	The Imap code folder_imap.c and mbx_imap.c is now messy.
44448	The rewrite in mailbox2 should clean this up though.
44449
44450	* mailbox/folder_imap.c (imap_quoted_string): Allocated the
44451	memory instead.
44452	(imap_body): If we were doing the scan free the memory and create
44453	the cache header.
44454	(imap_fetch): Create the message if was not done, important for
44455	the scan.
44456	* mailbox/mbx_imap.c (imap_scan): Bundle one big request to
44457	fetch as much information as possible.
44458	(message_operation): Free the buffer when done.
44459	* mailbox/include/imap0.h: Add IMAP_SCAN states.
44460
44461	* mailbox/file_stream.c (_file_readline): It seems that fgets() can
44462	not handle binary data.  Try to do our best.
44463
444642001-10-11 Alain Magloire
44465
44466	* mailbox/header.c (header_get_fvalue): When it fails set the number
44467	of byte written to 0.
44468	(header_get_value): Likewise.
44469	* mailbox/mbx_imap.c (imap_envelope_sender): Go through
44470	header_get_value() to fetch the "Sender" field, it may be cache.
44471	(imap_header_get_fvalue): Put parentheses around the FETCH, the
44472	WU-IMAPD likes it that way.
44473
444742001-10-10 Alain Magloire
44475
44476	* mailbox/mbx_pop.c (_mbox_pop_init): Authority is set on the folder.
44477	For pop this a little hackish, since there is no proper folder.
44478	As a hack we set for the pop folder the actual mailbox as data pointer.
44479	(pop_user): the owner of the authority is the folder.
44480
444812001-10-08 Alain Magloire
44482
44483	* mailbox/mbx_mbox.c (mbox_expunge0): New function.
44484	Move all the previous mbox_expunge() to mbox_expunge0()
44485	with a new argument deciding whether or not to remove
44486	messages set deleted.
44487	(mbox_save_attributes): Stub calling mbox_expunge0().
44488	(mbox_expunge): Stub calling mbox_expunge0()
44489
44490	* mailbox/mbx_mh.c: Provide a prototype for mh_message_number()
44491	there is no provision for it in the current Mailbox API.
44492
44493	* mailbox/mbx_imap.c (imap_message_lines): If the message_size
44494	is not set fallback on body_lines and header_lines.
44495
44496	* mail/print.c:  Lines number are not always known for
44497	example for POP or IMAP, it is not known until the mail
44498	is downloaded so take a guess base on the size.
44499
445002001-10-08 Sergey Poznyakoff
44501
44502	* mail/z.c: Bugfix: Did not display the last message when the
44503	number of lines in last page was less than pagelines.
44504	* mailbox/mbx_pop.c: Use ENOSYS instead of ENOTSUP.
44505	* mh/mh_format.c: Fixed memory leak in strobj_free().
44506
445072001-10-05 Alain Magloire
44508
44509	* mailbox/folder_imap.c (imap_flags): Bailout at the matching
44510	LPAREN.
44511	* mailbox/header.c (header_get_fvalue): Return 0 as the
44512	number of byte returned by the last  argument, even when no header
44513	field matched.
44514	(header_get_value): Likewise.
44515	* mailbox/mbx_imap.c (imap_header_get_fvalue): Also cache
44516	the message size and the FLAGS.
44517	(imap_message_size): If we already have the size do not request
44518	it again.
44519
445202001-10-05 Sergey Poznyakoff
44521
44522	* guimb/scm/Makefile.am: Added reject.scm.
44523	* mailbox/parse822.c: (parse822_word): Additional check
44524	for qstr != NULL: parse822_quoted_string() sometimes returns
44525	EOK and does not fill qstr (e.g. when parsing empty string: "")
44526
445272001-10-04 Alain Magloire
44528
44529	* imap4d/select.c(imap4_select_status): According to RFC2060
44530	There is no parenthesis when we send the UIDVALIDITY/UNSEEN.
44531
44532	* mailbox/header.c (header_free_cache): New function.
44533	(fill_blurb): Call header_free_cache to release memory.
44534	(header_destroy): Move the code to header_free_cache().
44535	(header_set_fvalue): Accept a NULL value, it will permanent
44536	failure i.e. the header does not exist.
44537	(header_get_value): Check the cache provided by the header object
44538	then the cache from _get_fvalue() and fall back to downloading
44539	the entire header.
44540	* mailbox/mbx_imap.c (imap_header_get_fvalue): Implement a cache
44541	in IMAP for the most use headers like "FROM, SUBJECT ....".
44542	* mailbox/include/imap0.h: New field in _m_imap to hold the
44543	header cache.
44544	* mailbox/mapfile_stream.c: signed and unsigned cast.
44545
445462001-10-03 Alain Magloire
44547
44548	* mailbox/mbx_imap.c (imap_attr_set_flags): Do not send
44549	the \\Delete flag and just keep it locally.  The expunge
44550	will take care of resending it.
44551	(imap_attr_unset_flags): Likewise.
44552
445532001-10-03 Sergey Poznyakoff
44554
44555	* mailbox/attribute.c: Fixed funny bug in
44556	attribute_{set,clear}_modified.
44557
445582001-10-01 Alain Magloire
44559
44560	* mailbox2/attribute.c: Add user flags.
44561	* mailbox2/dattribute.c: Add user flags.
44562
44563	To be compatible with the old mailbox, all stream read
44564	and write take an offset. Removed stream_seek () and add
44565	stream_is_seekable() instead.
44566	* mailbox2/stream.c: Likewise.
44567	* mailbox2/bstream.c: Likewise.
44568	* mailbox2/fdstream.c: Likewise.
44569	* mailbox2/fstream.c: Likewise.
44570	* mailbox2/mapstream.c: Likewise.
44571	* mailbox2/memstream.c: Likewise.
44572	* mailbox2/tcpstream.c: Likewise.
44573
44574	* mailbox2/include/mailutils/error.h: Add EBADFD.
44575
44576	* mailbox2/include/mailutils/mbox.h: New prototypes.
44577	* mailbox2/include/mailutils/sys/mbox.h: New prototypes.
44578	* mailbox2/mbox/*.c: Finish implementation.
44579
445802001-09-26 Alain Magloire
44581
44582	* mailbox2/mbox/mbox_append.c: Implemented, first draft.
44583
445842001-09-23 Alain Magloire
44585
44586	First draft of the mailbox/mbox2.  Not functional.
44587	Changes are too numerous to enumerate.
44588
44589	* mailbox2/mbox/*.[ch]: First mbox implementation.
44590	* mailbox2/mbox/Makefile.am: New file.
44591
445922001-09-22 Alain Magloire
44593
44594	In order to provide inheritance, it is necessary to make
44595	the base functions/methods visible so the extended object
44596	could reuse some base methods if necessary.  Inheritance
44597	is possible because we always add to the end of the vtable
44598	structure new functions.
44599	For example, mime_t object will be also a message_t.
44600	and it will be possible to do
44601	{
44602	  mime_t mime;
44603	  header_t header;
44604	  ...
44605	  message_get_header ((message_t)mime, header);
44606	}
44607	Another example is tcpstream(socket stream) extends
44608	fdstream(file descriptor stream);
44609	Also the name of the functions have change to match there purpose.
44610
44611	* mailbox2/Makefile.am: lockfile.c added.
44612	* mailbox2/bstream.c: Reorganization to make the
44613	functions visible.
44614	* mailbox2/dattribute.c: Likewise.
44615	* mailbox2/dotlock.c: Likewise.
44616	* mailbox2/fdstream.c: Likewise.
44617	* mailbox2/fstream.c: Likewise.
44618	* mailbox2/mapstream.c: Likewise.
44619	* mailbox2/memstream.c: Likewise.
44620	* mailbox2/pticket.c: Likewise.
44621	* mailbox2/sdebug.c: Likewise.
44622	* mailbox2/tcpstream.c: Likewise.
44623
44624	* mailbox2/include/mailutils/Makefile.am: lockfile.h added.
44625	* mailbox2/include/mailutils/attribute.h: Add the new prototypes.
44626	* mailbox2/include/mailutils/mbox.h: Add the new prototypes.
44627	* mailbox2/include/mailutils/stream.h: Add the new prototypes.
44628
44629	* mailbox2/include/mailutils/sys/Makefile.am: dattribute.h lockfile.h
44630	mapstream.h pticket.h added.
44631	* mailbox2/include/mailutils/sys/bstream.h: Add new prototypes.
44632	* mailbox2/include/mailutils/sys/fdstream.h: Likewise.
44633	* mailbox2/include/mailutils/sys/fstream.h: Likewise.
44634	* mailbox2/include/mailutils/sys/mbox.h: Likewise.
44635	* mailbox2/include/mailutils/sys/memstream.h: Likewise.
44636	* mailbox2/include/mailutils/sys/sdebug.h: Likewise.
44637	* mailbox2/include/mailutils/sys/tcpstream.h: Likewise.
44638
446392001-09-20 Sergey Poznyakoff
44640
44641	* frm/frm.c: Print newline not depending on the presence
44642	of Subject header.
44643
44644	* mh/mh_fmtgram.y: Builtin functions return their values
44645	in arg_num,arg_str. reg_num,reg_str gets set only when reducing
44646	to pitems.
44647	Fixed if-blocks to save the result of the last evaluated conditional
44648	to reg_num.
44649	* mh/mh_format.c: Builtin functions return their values
44650	in arg_num,arg_str.
44651	Compress whitespace only in component escapes.
44652	* mh/mh_init.c: mh_read_formfile(): Handle end-of-line comments
44653	and '\' line continuation.
44654
446552001-09-19 Alain Magloire
44656
44657	* mailbox2/debug.c: Remove mu_debug_printv() and only keep
44658	mu_debug_print().
44659	* mailbox2/sdebug.c (mu_debug_stream_create): New function
44660	replace mu_debug_stdio_create().
44661	* mailbox2/fdstream.c (_fds_destroy): Do not close the stream
44662	when destroying, it should have been done explicitly with
44663	stream_close ();
44664	* mailbox2/fstream.c (_fs_destroy): Do not close the stream
44665	when destroying, it should have been done explicitly with
44666	stream_close ();
44667	* mailbox2/mapstream.c (_map_destroy): Do not close the stream
44668	when destroying, it should have been done explicitly with
44669	stream_close ();
44670	* mailbox2/memstream.c (_memory_destroy): Do not close the stream
44671	when destroying, it should have been done explicitly with
44672	stream_close ();
44673	* mailbox2/tcpstream.c (_tcp_destroy): Do not close the stream
44674	when destroying, it should have been done explicitly with
44675	stream_close ();
44676
446772001-09-18 Sam Roberts
44678
44679	* mailbox/mbx_pop.c: Check url authentication type at
44680	initialization to trap invalid ones early.
44681	* mailbox/: mbx_mbox.c, mbx_mh.c: The pthread headers seem to
44682	define things that make the system headers not prototype some
44683	non-POSIX but essential APIS, so I moved them (on QNX6).
44684	* mailbox/url.c: Set zero-length strings to NULL.
44685	* mailbox/: url_imap.c, url_pop.c: Check harder for URLs that are
44686	not invalid for the particular scheme.
44687	* mailbox/auth.c: authority_authenticate() was returning success if
44688	authority was NULL, this is an error for all the other authority_*
44689	APIs, now it is here, as well.
44690
446912001-09-18 Sergey Poznyakoff
44692
44693	* mh/mh.h: Changed proto of mh_read_formfile(). Thanks to Alain
44694	for noticing.
44695	* mh/inc.c: Likewise.
44696	* mh/scan.c: Likewise.
44697	* mh/mh_init.c: Likewise.
44698
446992001-09-18 Sergey Poznyakoff
44700
44701	* mailbox/mbx_mh.c: Optimized for speed.
44702	_mh_message_save(): scan the message while saving it. If expunge==0,
44703	do not create temporary, operate directly on the message file instead.
44704	mh_append_message(): Do not rescan appended message.
44705	mh_scan_message(): Do not rescan the message if it's not changed
44706	since last scan.
44707	* mh/.cvsignore: Updated.
44708	* mh/mh_argp.c: Pass '+' key when handling +folder option.
44709	* mh/mh_getopt.c: Handle +folder.
44710	* mh/inc.c: Handle '+' key.
44711	* mh/scan.c: Likewise.
44712
447132001-09-17  Alain Magloire
44714
44715	Pop3 now has a debug object, mu_debug_t, to follow the protocol
44716	exchanges between the library and the server.
44717
44718	* mailbox2/pop3/*: Add debug prints in all.
44719	* mailbox2/sdebug.c: New entry.
44720	* mailbox2/debug.c: New entry.
44721	* mailbox2/Makefile.am: Add debug object
44722	* mailbox2/include/mailutils/Makefile.am: Add debug.h
44723	* mailbox2/include/mailutils/sys/Makefile.am: Add debug.h and sdebug.h
44724	* mailbox2/include/mailutils/debug.h: New file.
44725	* mailbox2/include/mailutils/sys/debug.h: New file.
44726	* mailbox2/include/mailutils/sys/sdebug.h: New file.
44727
44728	* mailbox2/fdstream.c: Bug in fdstream do not call FD_SET if
44729	the file descriptor is -1;
44730	* mailbox2/tcpstream.c: Bug in fdstream do not call FD_SET if
44731	the file descriptor is -1;
44732
447332001-09-17 Sergey Poznyakoff
44734
44735	* mail/mailline.c: fixed declaration of ml_reread, it did not
44736	match the changed proto.
44737
44738	* acconfig.h: Added HAVE_OBSTACK
44739
44740	* mailbox/mbx_mbox.c: _mh_next_seq(): add 1 to the last used
44741	sequence number. mh_append_message(): missed assignment to
44742	mhd member of struct _mh_data.
44743	mh_message_number(): new function. It is the only way to get
44744	the message sequence number.
44745
44746	Further changes to mh/: Implemented inc command. Added missing
44747	options to scan.
44748
44749	* mh/Makefile.am: Added inc.c. Restructured .*_LDADD assignments.
44750	* mh/mh.h: Extern declarations for current_folder, current_message,
44751	mh_list_format, etc.
44752	* mh/mh_format.c: builtin_msg(): return sequence number of the
44753	message, not its ordinal number in mailbox.
44754	builtin_cur(): implemented.
44755
44756	* mh/mh_init.c: New globals: current_folder, current_message,
44757	mh_list_format, etc.
44758	mh_init(): initialize current_folder and current message.
44759	mh_read_context_file(), mh_read_formfile(): new functions.
44760	* mh/scan.c: Changed initialization of format_str. Removed
44761	scan_folder: use current_folder instead. Implemented
44762	-form and -header options. Use \f to clear screen if
44763	stdout is not a tty.
44764	* mh/inc.c: (new) Implementation of inc command.
44765
447662001-09-16  Alain Magloire
44767
44768	* doc/mbox.texi: Starts to document the concrete Unix mbox
44769	API.
44770	* doc/pop3.texi: Typos.
44771	* mailbox/mbx_mh.c: Initialized variables. Typecast to void
44772	expunge since it is never used.
44773	* mail/delete.c : Typo.
44774
447752001-09-16  Alain Magloire
44776
44777	This is after a exchange with Dave Inglis and Sam Roberts.
44778	Basically they recommend to drop the XX_release() functions
44779	and only to keep XX_create (), XX_destroy ().  We have simple
44780	reference count strategy for memory management.
44781
44782	* mailbox2/* : Way too much to enumerate.
44783	* mailbox2/refcount.c: New file
44784	* mailbox2/include/mailutils/refcount.h: New file
44785	* mailbox2/include/mailutils/sys/refcount.h: New file
44786	* mailbox2/fdstream.c: stream_fd_create ().
44787
447882001-09-15  Alain Magloire
44789
44790	The exercise is to crank up the warnings from gcc and cleanup
44791	the code based on the hints generated by the compiler.  The usual
44792	errors:
44793	- signed vs unsigned, signedness or unsignedness problems.
44794	- printf() wrong formats
44795	- wrong prototypes declarations
44796	- and different buglets
44797	- "const char *" vs "char *"
44798	- unused variables
44799	- unused arguments.  Tell the compiler by typecasting to void
44800	 (void)var.
44801	- Some variable when shadowed, meaning in another block variable
44802	of the same name where reused.
44803	- atoi() is not an ANSI C function, we should use strtol().
44804
44805	Changes to comply to GNU coding standards, and nuke trailing spaces.
44806
44807	* mail/alias.c (alia_lookup): No prototypes and scope static.
44808	(hash_num, max_rehash, aliases): Scope static and unsigned.
44809	(hash): unsigned.
44810	(alias_rehash): i unsigned.
44811	(alias_lookup_or_install): slot variable unused.
44812	(alias_destroy): unsigned.
44813	* mail/copy.c (mail_copy0): fprintf wrong format.
44814	* mail/decode.c: dislay_message change prototype.
44815	(mail_decode): Cast when calling util_msgset_iterate().
44816	(display_message): Prototype change.
44817	(display_headers): unsigned issues.
44818	* mail/delete.c: Buglet was calling mail_delete0() instead of
44819	mail_delete.
44820	* mail/eq.c: Unused arguments.
44821	* mail/exit.c: Unused arguments.
44822	* mail/folders.c: Unused arguments.
44823	* mail/followup.c: Unused variables.
44824	* mail/from.c (mail_from): variable buffer was shadowing use variable
44825	name instead. snprintf() formatting issues.
44826	* mail/headers.c: Unsigned issues.
44827	* mail/if.c: Unused arguments.
44828	* mail/inc.c: Unused arguments.
44829	* mail/list.c: Use const char *.
44830	* mail/mail.c: options[], argp[] initialized all elements.
44831	(mail_cmdline): Unused arguments.
44832	(main): Unsigned issues.
44833	(mail_warranty): Unused arguments.
44834	* mail/mail.h: function_t with complete prototype this necessary
44835	to let the compiler do proper checks.
44836	struct mail_command_entry rearrange the fields and a new field
44837	int (*escfunc) __P ((int, char **, struct send_environ *));
44838	Indentation rearrangements.
44839	* mail/mailline.c (ml_getc): Scope is static now.
44840	typecast for const char *.
44841	(ml_reread): Typecast.
44842	* mail/msgset.y: Declare yyerror() and yylex().
44843	(msgset_select): Change of prototype to let the compiler do checks.
44844	(selec_sender): Unused arguments.
44845	* mail/pipe.c: Rename variable pipe to tube.
44846	* mail/print.c: Unsignedness and some shadow variables.
44847	* mail/quit.c: Shadow variables.
44848	* mail/send.c: Typecast when necessary. Use the second (escfunc)
44849	field now. Some shadow variables.
44850	* mail/shell.c: Unsigned.
44851	* mail/table.c: Readjust the table to correspond to the signature
44852	change in mail.h.
44853	* mail/tag.c: Prototype change.
44854	* mail/util.c (util_msglist_esccmd): New function.
44855	(util_find_entry): Prototype change.  And check return value
44856	of getenv().
44857	(util_screen_lines): Change atoi() to strtoul().
44858	(util_screen_columns): Change atoi() to strtoul().
44859	(util_find_env): Signedness.
44860	(util_fullpath): Prototype changed(const).
44861	(util_slist_to_string):Prototype changed (const).
44862	(util_strcat) :Prototype changed (const).
44863	(util_tempfile): const.
44864	* mail/var.c: Unsignedness, Unused arguments.
44865	(var_quote):  Use new function util_msglist_esccmd().
44866	* mail/version.c: Unused arguments.
44867	* mail/write.c: printf formats.
44868	* mail/z.c: Signedness.
44869
448702001-09-14 Sergey Poznyakoff
44871
44872	* mailbox/mbx_mh.c: Properly handle messages with null body.
44873	Fixed bug in cyclic stream pool. Lowered MAX_OPEN_STREAMS
44874	limit. It probably should be configurable.
44875
44876	A framework for porting MH utilities. Scan utility is in
44877	working order, except that it ignores -form and -header
44878	options.
44879
44880	* configure.in: Check for presence of GNU obstack functions.
44881	* lib/Makefile.am: Added obstack.[ch]
44882	* lib/obstack.c: (new)
44883	* lib/obstack.h: (new)
44884
44885	* mh: (New directory) Implementation of MH commands.
44886	* mh/Makefile.am: (new)
44887	* mh/.cvsignore: (new)
44888	* mh/mh.h: (new) Main header for mh functions.
44889	* mh/mh_argp.c: (new) Coexistence between GNU long options,
44890	traditional UNIX-style short options and traditional MH long options.
44891	* mh/mh_error.c: (new) Diagnostic output.
44892	* mh/mh_fmtgram.y: (new) Parser for format strings.
44893	* mh/mh_format.c: (new) Run-time execution of format strings.
44894	* mh/mh_getopt.c: (new) MH-style options parsing.
44895	* mh/mh_getopt.h: (new) Its prototypes.
44896	* mh/mh_init.c: (new) Initialization module.
44897	* mh/scan.c: (new) Implementation of scan command.
44898
448992001-09-10 Sergey Poznyakoff
44900
44901	* mailbox/mbx_mh.c: Implemented append. Disabled reading of deleted
44902	messages when doing mailbox scan.
44903
44904	* mail/summary.c: Do not set first_unread or first_new to the
44905	message which is marked as deleted.
44906	* mail/z.c: Do not count deleted messages into the total number
44907	of lines output.
44908
449092001-09-09  Alain Magloire
44910
44911	This was done when cranking the number of warning generated
44912	by gcc (-Wall, etc ...)
44913
44914	* mailbox/mbx_mh.c:  Add include for pthread.
44915	seq_number is size_t.
44916	(_mh_message_name):  The problem here is that asprintf()
44917	is a GNU extension.  We want libmailbox to be as independent
44918	as possible, so it will not be required for program to be
44919	link with libmailutils(it is not even install).  Default to
44920	snprintf ().
44921	(mh_close): return an int.
44922	(_mh_message_insert): n should be size_t.
44923
449242001-09-09  Alain Magloire
44925
44926	* doc/pop3.texi: Update the doc.
44927	* doc/sfrom.c.texi: Line too long.
44928	* doc/stream.texi: Line too long.
44929
44930	For the new mailbox, one of the short coming with the old stream_t
44931	object was that select() was not cover, meaning it was not possible
44932	to check if a stream was {read,write} ready.  The old was to get
44933	the fd (stream_get_fd()) and do the select.  Providing,
44934	stream_is_readready (stream_t, int timeout);
44935	stream_is_writeready (stream_t, int timeout);
44936	stream_is_exceptionpending (stream_t, int timeout);
44937	stream_is_open (stream_t);
44938	Takes care of it.  It will work specially for tcp stream.
44939
44940	* mailbox2/stream.c: New functions for the select calls:
44941	(stream_is_readready): New function.
44942	(stream_is_writeready): New function.(stream_t, int timeout);
44943	(stream_is_exceptionpending): New function.
44944	(stream_is_open): New function.
44945	* mailbox2/bstream.c (_bs_readline): Bug was truncating the string
44946	to early.
44947	(_bs_is_readready): New file.
44948	(_bs_is_writeready): New file.
44949	(_bs_is_exceptionpending): New file.
44950	(_bs_is_open): New file.
44951	* mailbox2/fstream.c: stubs for the select functions.
44952	* mailbox2/memstream.c: stubs for the select functions.
44953	* mailbox2/mapstream.c: stubs for the select functions.
44954	* mailbox2/tcpstream.c: stubs for the select functions.
44955	* mailbox2/include/mailutils/stream.h: Adjust the prototypes
44956	* mailbox2/include/mailutils/sys/stream.h: Adjust the prototypes
44957
44958	It is better not to put threading (Pthread) code in the low level
44959	API.  But instead in mailbox_t framework, where it can be control.
44960	* mailbox2/include/mailutils/pop3.h: Adjust the prototypes.
44961	* mailbox2/pop3/*.c: Remove threading code.
44962
449632001-09-09 Sergey Poznyakoff
44964
44965	* mailbox/mbx_mh.c: Bug fix: both pool_first and pool_last must
44966	be biased by MAX_OPEN_STREAMS;
44967
449682001-09-08 Sergey Poznyakoff
44969
44970	Initial implementation of MH mailbox format. It is functional
44971	in read-only mode. In read-write, it is able to delete and
44972	undelete messages but lacks `append message' functionality.
44973	Expunge does not unlink message files but rather renames them
44974	prepending ',' to a filename, after MH fashion.
44975
44976	* mailbox/mbox_mh.c: (new)
44977	* mailbox/url_mh.c: (new)
44978	* mailbox/folder_mh.c: (new)
44979	* mailbox/Makefile.am: Added mh-related sources.
44980	* mail/mail.c: Register mh_record.
44981 	* mailbox/include/registrar0.h: Added mh-related declarations.
44982	* include/mailutils/registrar.h: Declare mh_record.
44983
44984	* mailbox/mbx_mbox.c: Check for MU_ATTRIBUTE_DELETED in
44985	mbox_expunge.
44986
44987	* libmu_scm/mu_mailbox.c: mu_scm_mailbox_print(): handle
44988	mailbox == #f case.
44989	* libmu_scm/mu_message.c: mu_scm_message_print(): handle
44990	message == #f case.
44991
449922001-09-06  Alain Magloire
44993
44994	* mailbox/folder_mbox.c (folder_mbox_open): Implemented.
44995
449962001-09-05 Sergey Poznyakoff
44997
44998	* MySql/MySql.h: New defines MHOST, MPORT, etc.
44999	* MySql/MySql.c: Improved error logging. Fixed memory leak due
45000	to absence of mysql_close() calls (noticeable on imap4d when
45001	doing multiple login attempts).
45002	Provide configurable parameters to mysql_real_reconnect to
45003	allow connecting to the remote database and/or non-standard
45004	ports.
45005
450062001-09-04  Alain Magloire
45007
45008	* mailbox/mbx_imap.c (message_operation):  Check if the
45009	imap server went away(f_imap->isopen) and flag an error.
45010
450112001-09-03  Alain Magloire
45012
45013	* mailbox/folder_imap.c (imap_use): Check return value.
45014	* mailbox/mailbox.c (mailbox_get_debug): Get the mu_debug_t
45015	object from the folder if available.
45016	* mailbox/mbx_imap.c (imap_append_message): Check for
45017	EAGAIN.
45018	(imap_header_get_value): If the operation return 0, set
45019	error to ENOENT.
45020
450212001-09-03  Alain Magloire
45022
45023	* configure.in: AC_REPLACE_FUNCS(fgetpwent);
45024
45025	* include/mailutils/parse822.h: Add a prototype for
45026	parse822_skip_nl().
45027
45028	* lib/Makefile.am: add fgetpwent.c
45029	* lib/fgetpwent.c: New file.
45030
45031	* mail/from.c (mail_from): Use the cover functions
45032	attribute_is_xxxx() instead of getting the flag.
45033
45034	* mailbox/attribute.c: Cleanup the mess.
45035	attribute_set_{read,delete,seen,flagged,answered}.
45036	attribute_unset_{read,delete,seen,flagged,answered}.
45037	attribute_is_{read,delete,seen,flagged,answered}
45038	should be no more then cover functions calling
45039	attribute_set_flags(), attribute_get_flags() and
45040	attribute_unset_flags().
45041
45042	* mailbox/folder_imap.c: MU_ATTRIBUTE_READ, is not
45043	part of IMAP protocol use \\Seen.
45044	* mailbox/mbx_imap.c: Remove the hack trying to reconnect,
45045	it does not work.
45046
45047	* mailbox/mbx_pop.c(pop_get_messages): Set the new
45048	functions for the attribute.
45049	(pop_get_attribute): New functions.
45050	(pop_set_attribute): New functions.
45051	(pop_unset_attribute): New functions.
45052	(pop_attr_flags): Removed.
45053
45054	* mutil.c (mu_hex2ul): GNU coding std.
45055	(parse822_time): Do not use tzname as a variable name tzname
45056	is global variable in libc, better clear away.
45057	(parse822_date_time): Likewise.
45058
45059	* pop3d/Makefile.am: add virtual.c
45060	* pop3d/pop3d.c (main): register getpwnam_ip_virtual,
45061	getpwnam_host_virtual
45062	* pop3d/pop3d.h: declare,
45063	getpwnam_ip_virtual(), getpwnam_host_virtual().
45064	* pop3d/virtual.c: New file.
45065
450662001-09-02  Alain Magloire
45067
45068	* mailbox/mutil.c (getpwma_virtual): Memory overrun, did not
45069	reserve enough space to accommodate the extra slash, when
45070	doing the sprintf().
45071	Include <string.h>, since we use strdup().
45072
450732001-08-31  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45074
45075	* imap4d/list.c (list_file): don't show INBOX if virtual
45076
450772001-08-31 Sergey Poznyakoff
45078
45079	* mailbix/mutil.c: Fixed declaration of _app_getpwnam.
45080	Moved mu_virtual_domain out of #ifdef guard. Fixed typo
45081	in getpwnam_virtual: erroneously returned NULL instead of
45082	p.
45083
450842001-08-31 Sergey Poznyakoff
45085
45086	Generalized mu_getpwnam interface. mu_register_getpwnam allows
45087	to register several functions which will be tried in turn in
45088	order to obtain struct passwd*. Changed virtual domain code
45089	in pop3d and imap4d to use this approach.
45090
45091	* mailbox/mutil.c: _app_getpwnam is a list of getpwnam functions.
45092	mu_getpwnam calls each function in succession until it finds one
45093	which returns non-NULL value.
45094	* include/mailutils/mutil.h: Fixed mu_.*getpwnam declarations. Added
45095	declaration for mu_virtual_domain and getpwnam_virtual()
45096	* mailbox/Makefile.am: Add -DSITE_VIRTUAL_PWDDIR to CFLAGS.
45097
45098	* configure.in: New option --with-virtual-pwddir allows to configure
45099	the path to domain passwd files. Defaults to <sysconfdir>/domain.
45100
45101	* imap4d/copy.c: Use mu_virtual_domain instead of is_virtual.
45102	* imap4d/select.c: Likewise.
45103	* imap4d/status.c: Likewise.
45104
45105	* imap4d/imap4d.c: Register getpwnam_virtual for handling virtual
45106	domains.
45107	* pop3d/pop3d.c: Likewise.
45108
45109	* imap4d/login.c: Removed imap4d_virtual. Its functionality passed
45110	to getpwnam_virtual.
45111	* pop3d/pop3d.h: Include mutil.h
45112	* pop3d/user.c: Removed pop3d_virtual. Its functions are performed
45113	by getpwnam_virtual. Renamed is_virtual to mu_virtual_domain.
45114
45115	* mail/alias.c: Use linear hash ordering.
45116
451172001-08-30  Alain Magloire
45118
45119	In the virtual code, change the chdir() and build the full
45120	pathname in a buffer.  For a daemon, it is better to stay
45121	in "/" the root.  Moving in subdirectories, will not permit
45122	the volume to be unmounted.  But we do not follow the
45123	same rule for imap4d, it should be fix.
45124
45125	* pop3d/signal.c: Shutup unused parameter warning from gcc.
45126	* pop3d/user.c: Define macro VIRTUAL_PWDDIR. use sprintf()
45127	to build filename instead of chdir().
45128	(PAM_gnupop3d_conv): Shutup unused parameter warning from gcc.
45129	Make sure variable mailbox_name is initialized.
45130
45131	* include/mailutils/mutil.h: Typo "struct password" instead of
45132	"struct passwd". Use const appropriately in the declaration
45133	of mu_register_getpwnam() and mu_getpwnam().
45134	* mailbox/mutil.c: Use const appropriately in the definition
45135	of mu_register_getpwnam() and mu_getpwnam(). Typo "struct password"
45136	instead of "struct passwd".
45137
451382001-08-30 Sergey Poznyakoff
45139
45140	More changes to better integrate mysql support. Introduced
45141	mu_getpwnam function. The function first calls system getpwnam,
45142	if it fails, it calls application-defined getpwnam function.
45143	mu_register_getpwnam can be used to register such a function.
45144
45145	* configure.in: Add -lm to AUTHLIBS when configured with
45146	--enable-mysql.
45147	When checking for PAM: Append to AUTHLIBS instead of just
45148	assigning to it.
45149	* imap4d/Makefile.am: Moved @AUTHLIBS@ before libmailutils.
45150	Needed when using mysql.
45151	* pop3d/Makefile.am: Likewise.
45152	* imap4d/imap4d.c: use mu_register_getpwnam.
45153	* pop3d/pop3d.c: Likewise.
45154
45155	* pop3d/user.c: Use mu_getpwnam.
45156	* imap4d/login.c: Likewise.
45157
45158	* mailbox/mbx_default.c: use mu_getpwnam. Removed inclusion
45159	of MySql.h.
45160	* mailbox/mutil.c: new functions: mu_getpwnam() and
45161	mu_register_getpwnam().
45162	Removed inclusion of MySql.h
45163	* include/mailbox/mutil.h: Prototypes for the new functions.
45164
451652001-08-30 Sergey Poznyakoff
45166
45167	* MySql/MySql.c: Use asprintf instead of sprintf, use xmalloc
45168	instead of malloc.
45169	Return values were allocated dynamically but never freed, this
45170	caused memory leaks if authentication functions were called more
45171	than once. Made them static, so that they get reallocated at each
45172	new invocation of getM functions, thus reclaiming lost storage.
45173	Made <config.h> the first file to be included and guard it with
45174	#ifdef HAVE_CONFIG_H
45175	Reindented text to conform to GNU coding style.
45176
45177	* MySql/Makefile.am: Use @BUILD_LIBMYSQL@ substitution instead
45178	of direct assignment to noinst_LIBRARIES, so the subdir gets
45179	distributed properly.
45180
45181	* configure.in: New substitution variable BUILD_LIBMYSQL. Append
45182	linker flags to AUTHLIBS, since modifying LIBS effectively
45183	breaks compilation.
45184
451852001-08-29  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45186
45187	* imap4d/select.c (imap4d_select0):
45188	* imap4d/copy.c (imap4d_copy0):
45189	* imap4d/status.c (imap4d_status): treat INBOX differently if virtual
45190
45191	* imap4d/login.c (imap4d_virtual): new function
45192	(imap4d_login): call imap4d_virtual
45193
45194	* imap4d/imap4d.h: add is_virtual variable
45195
45196	* configure.in (USE_VIRTUAL_DOMAINS): add virtual domain option
45197
45198	* pop3d/user.c (pop3d_virtual): new function for "virtual domains"
45199	(pop3d_user): call pop3d_virtual
45200
452012001-08-28  Alain Magloire
45202
45203	* mailbox2/include/mailutils/list.h:  the typedef list_t
45204	is rename mu_list_t, as a suggestion from Sam R.
45205	* mailbox2/list.c: All the function names are prefix with "mu_".
45206
452072001-08-27  Alain Magloire
45208
45209	* mailbox/folder_imap.c (imap_list): When \NoSelect, it is
45210	also mean that the file is a directory.
45211
452122001-08-27  Jakob 'sparky' Kaivo
45213
45214	* mail/send.c (mail_send0): change readline (NULL) to readline
45215	(" \b") so there is really no prompt
45216
452172001-08-24  Jim Hull
45218
45219	* Makefile.am:
45220	* acconfig.h:   Added support for new MySql addition to mailutils
45221	* configure.in:
45222
45223	* MySql/Makefile.am:
45224	* MySql/MySql.c:        Mini lib to link to when mysql support
45225	* MySql/MySql.h:        enabled (with --enable-mysql)
45226
45227	* doc/Readme.mysql:             Readme file for setup.
45228
45229	* imap4d/login.c:
45230	* mailbox/mbx_default.c:        The Patch pretty much works the same
45231	* mailbox/mutil.c:              all around. if getpwnam() returns null
45232	* mailbox2/mutil.c:             then your db is checked for the user,
45233	* pop3d/apop.c:                 and the struct is filled if found,
45234	* pop3d/user.c:                 returns null if not. If shadow support
45235                               is used, then the same is done with getspnam().
45236
45237	* examples/mail.MysqlMailer.c:  Simple sendmail backend support.
45238
452392001-08-24  Alain Magloire
45240
45241	* sieve/Makefile.am: To EXTRA_DIST add md5-rsa.{c,h}.
45242
45243	* mailbox2/header.c(header_aget_value): Base on discussion with Sergey
45244	if the call fails no memory should be allocated and the return status
45245	should be return i.e. status != 0.
45246
45247	* imap4d/fetch.c (fetch_bodystructure0):  Check for sp != NULL.
45248	* imap4d/fetch.c (send_parameter_list):  Check for sp != NULL.
45249
452502001-08-23 Sergey Poznyakoff
45251
45252	* mail/msgset.y: Fixed erroneous call to msgset_select
45253	(second arg should have been a pointer). Added :t (tagged)
45254	and :T (untagged) selection criteria.
45255
45256	* mail/tag.c: (new) Implementation of tag command.
45257	* mail/table.c: Added entries for "tag" and "untag".
45258	* mail/Makefile.am: Added tag.c
45259	* mail/from.c: Display tagged messages.
45260	* mail/mail.h: Added protos and defines for mail_tag().
45261
452622001-08-22  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45263
45264	* imap4d/fetch.c (bodystructure): check sp != NULL before using
45265
452662001-08-18 Sergey Poznyakoff
45267
45268	* libmu_scm/mu_mime.c: (new) Scheme primitives for handling
45269	mime messages.
45270	* libmu_scm/mu_message.c: mu_scm_message_add_owner() - add new
45271	object to the owner chain of the message.
45272	* libmu_scm/mu_scm.h: Prototypes for new functions.
45273	* libmu_scm/mu_scm.c: Call mu_scm_mime_init().
45274
45275	* guimb/scm/reject.scm: (new) Implementation of Sieve "reject"
45276	action.
45277	* guimb/scm/redirect.scm: Moved sieve-message-bounce to
45278	sieve-core.scm
45279	* guimb/scm/sieve-core.scm: New function sieve-message-bounce.
45280
452812001-08-16 Sergey Poznyakoff
45282
45283	* mail/msgset.y: Implemented :/expr/ -- search in the message
45284	body. Fixed memory leak in select_header (missed regfree).
45285
452862001-08-14 Sergey Poznyakoff
45287
45288	* mail/msgset.y: Extended regexp syntax: IDENT:/EXPR/ fetches
45289	all messages whose header IDENT matches given EXPR. The match
45290	is case-sensitive if IDENT starts with a capital letter and
45291	is case-insensitive otherwise.
45292
452932001-08-12 Alain Magloire
45294
45295	* mailbox2/*: Move more code from the original mailbox
45296	To much to enumerate.
45297
452982001-08-07 Alain Magloire
45299
45300	* m4/regex.m4: New file to check for GNU regex.
45301	* lib/regex.c: New file, GNU regex implementation.
45302	* lib/regex.h: New file.
45303	* lib/posix: New directory.
45304	* lib/posix/Makefile.am: New file.
45305	* lib/posix/regex.h: New file.
45306	* lib/Makefile.am: Add SUBDIRS=posix and regex.c dependencies.
45307
45308	* mail/msgset.y: Remove HAVE_REGEX macro and check variable
45309	"noregex" before using regex.
45310
45311	* configure.in: Check for GNU regex.
45312
453132001-08-07 Alain Magloire
45314
45315	* mail/msgset.y:  Draft implementation of a proposition
45316	to allow regular expressions.
45317	(REGEXP): Passing the address of the pointer instead of the pointer.
45318	(INDENT): Likewise.
45319	* mail/Makefile.am: Add in EXTRA_DIST msgset.c to force its
45320	generation when doing the distribution, having yacc should
45321	not be required.
45322
45323	* mailbox/mutil.c (mu_hexstr2ul): Properly cast the expression
45324	before doing the comparison.
45325
453262001-08-06 Sergey Poznyakoff
45327	* mail/msgset.y: (new) A parser for message set specifications
45328	of arbitrary complexity. Returns a singly linked list of
45329	message specifications that can be iterated without need
45330	for recursion.
45331	* mail/mail.h: Prototypes for msgset_ functions. Removed proto
45332	for util_expand_msglist.
45333	* mail/Makefile.am: Added msgset.y
45334	* mail/{copy.c, followup.c, headers.c, next.c, pipe.c,
45335	previous.c, util.c, write.c}: Use msgset_parse instead of
45336	util_expand_msglist.
45337	* mail/util.c: Added util_msgset_iterate() to iterate over a
45338	message set. Added util_get_content_type() and
45339	util_get_hdr_value() (from decode.c).
45340	* mail/decode.c: Use util_msgset_iterate(). Moved get_content_type()
45341	and get_hdr_value() to util.c
45342	* mail/table.c: Fixed synopsis for decode.
45343
45344        * libmu_scm/Makefile.am: Removed .x and .doc files from EXTRA_DIST.
45345          Thanks to Alain.
45346        * guimb/Makefile.am: Likewise.
45347        * m4/Makefile.am: Added maintain.m4
45348
453492001-08-06  Alain Magloire
45350
45351	* sieve/{exitcodes.h hmac-md5.h md5.c md5.h md5global.h}: Removed.
45352	* sieve/md5-rsa.c: New file, clearly identify that the algo.
45353	is from RSA and not GNU md5.
45354	* sieve/md5-rsa.h : New file.
45355	* sieve/Makefile.am:  added md5-rsa.[ch].
45356	* sieve/message.h:  lcase() change for strlower ().
45357	* sieve/script.c: Include md5-rsa.h.
45358	* sieve/sieve-gram.y: lcase changed for strlower ().
45359	* sieve/util.c: Remove all the unnecessary code and
45360	only implement strlower() and strupper().
45361	* sieve/util.h: Only export strlower and struppper ().
45362
45363	* messages/messages.c: Also include pop_record
45364	amd imap_record.
45365
453662001-08-05 Sergey Poznyakoff
45367	* mailbox/mbx_mbox.c: Added mbox_stream_size().
45368	* mailbox/message.c: Added message_stream_size().
45369	* mailbox/stream.c: Fixed some comments.
45370
45371	* libmu_scm/mu_port.c: (new) I/O port functions. This allows to
45372	write and read mailboxes/messages using usual scheme primitives
45373	and thus effectively obsoletes mu_body interface, but I'll keep
45374	it for a while.
45375	* libmu_scm/mu_scm.c: Call to mu_scm_port_init().
45376	* libmu_scm/mu_scm.h: Prototypes for port functions.
45377	* libmu_scm/mu_message.c: Added mu-message-get-port.
45378	mu-message-set-header: don't bail out if third argument is boolean,
45379	to allow for constructs like
45380		(mu-message-set-header
45381                  m1 "From"
45382                  (mu-message-get-header m2 "To"))
45383	* libmu_scm/mu_maibox.c: Added mu-mailbox-get-port.
45384
45385	* guimb/scm/sieve.scm: Documented some obscure data structures.
45386	* guimb/scm/sieve-core.scm: Use sieve-mailbox-open instead of
45387	mu-mailbox-open. The former searches the list of open mailboxes
45388	and returns one if found. All the mailboxes get closed at once
45389	when the sieve program finishes execution. This saves memory and
45390	speeds up the execution (fewer calls to gc, if any).
45391	sieve-regexp-to-posix: escape special characters.
45392	action-reject: Use ports instead of mu-body- interface.
45393
45394	* examples/reply.scm: Use ports instead of mu-body- interface.
45395
45396	* mail/var.c: Added checks for missing arguments.
45397
453982001-08-04 Sergey Poznyakoff
45399	* mailbox/header.c: Return value of header_aget_value() was always
45400	0. Made it consistent with that of header_get_value(). Same for
45401	header_aget_field_value().
45402
45403	* guimb/main.c: Fixed handling of default mailbox in the absence of
45404	other mailbox arguments.
45405	* guimb/collect.c: Likewise.
45406	* guimb/guimb.h: Removed unused declarations.
45407
45408	* libmu_scm/mu_message.c: Changed mu-message-get-header-fields
45409	to allow for second optional argument. The argument is a list
45410	of header names to narrow output to.
45411
45412	* guimb/scm/sieve-core.scm: Changed action-keep: it couldn't be just
45413	#f. Fixed and tested action-stop, action-redirect and test-exists.
45414	Fixed handling of null-length keys in sieve-str-str.
45415	test-address and test-header: use mu-message-get-header-fields
45416	to speed the things up.
45417	Implemented "envelope" test.
45418
45419	* guimb/scm/sieve.scm: Add final #t to the generated code, so the
45420	empty scripts work.
45421
454222001-08-03 Sergey Poznyakoff
45423	* libmu_scm/mu_logger.c: (new) Interface to syslog functions.
45424	* libmu_scm/mu_mailbox.c: Added mu-mailbox-get-url.
45425	* libmu_scm/mu_message.c: Added mu-message-get-size,
45426	mu-message-get-lines.
45427        * libmu_scm/mu_address.c: Provide mu_scm_address_init() function.
45428	* libmu_scm/mu_scm.c: Call mu_scm_address_init(), mu_scm_logger_init().
45429	Added mu-package and mu-version variables.
45430	* libmu_scm/mu_scm.h: Prototypes for mu_scm_address_init() and
45431	mu_scm_logger_init().
45432	* libmu_scm/Makefile.am: Added mu_logger.c
45433
45434	* guimb/main.c: Added --mailbox and --user options. Added escape for
45435	Scheme arguments (-{ and -}).
45436	* guimb/run_scm.c: Call collect_output() before dropping mailbox.
45437	Added exception handling. Added user-name variable.
45438	* guimb/collect.c: Added collect_output().
45439	* guimb/guimb.h: Added prototypes.
45440	* guimb/Makefile.am: Added SUBDIRS.
45441
45442	* guimb/scm: (new) Directory containing guimb modules and scripts.
45443	* guimb/scm/Makefile.am: (new)
45444	* guimb/scm/sieve.scm: (new) Sieve to Scheme translator.
45445	* guimb/scm/sieve-core.scm: (new) Sieve core functions for scripts
45446	generated by sieve.scm.
45447	* guimb/scm/redirect.scm: (new) Implementation of sieve "redirect"
45448	action.
45449
45450	* configure.in: Output guimb/scm/Makefile.
45451
45452	* mail/mail.c: Use mailbox_create_default for --file=MBOX.
45453	Some calls to exit() were placed *before* issuing diagnostics.
45454	Fixed.
45455
45456	* mailbox/folder_imap.c: Changed ENOTSUP to ENOSYS.
45457
454582001-08-02  Sam Roberts
45459
45460	* folder_imap.c: don't pretend to be authorized if we are not, it
45461	only leads to confusion
45462	* mailbox.c: mailbox created the folder, it should set it's
45463	folder's debug object when it's is set, otherwise there is no way
45464	to get debug messages from a mailbox's folder (I was getting all
45465	the pop protocol traces but not the imap ones)
45466	* TODO: updated
45467	* sieve/: script.c, sieve.c: Fixed bug, I was deleting a message
45468	after a fileinto, which was wrong.  Tweaked the logging, it's
45469	little cleaner and more useful.
45470	* sieve/COPYING: Removed the RCS keyword in the imported copyright
45471	notice.
45472	* sieve/: sieve-gram.y, sieve-lex.l: Now using xmalloc() from
45473	../lib.
45474	* examples/mbox-explode.c: Don't mkdir unless the mailbox can be
45475	opened, and better cleanup on error detection.
45476	* sieve/examples/: Test, test.out: Committing my example/test sieve
45477	scripts so I can maintain them with cvs (I use them at work and
45478	home).
45479	* mail/util.c: Not all systems have <sys/fcntl.h>, changed to use
45480	HAVE_FCNTL_H.
45481	* mailbox/mbx_pop.c: imap logged the passwd in protocol traces, pop
45482	didn't, so I made them both be the same (the way that is most
45483	useful when debugging protocol traces)
45484	* sieve/examples/: INBOX.orig, Makefile, box.sv, ex-1.10.2.sv,
45485	ex-2.3a.sv, ex-2.5.1.sv, ex-2.7.3.sv, ex-3.1a.sv, ex-3.1b.sv,
45486	ex-3.2.sv, ex-4.1.sv, ex-4.2.sv, ex-4.4a.sv, ex-4.4b.sv, ex-4.5.sv,
45487	ex-5.1.sv, ex-5.7.sv, ex-9.sv, ex-null.sv, ex-save-all.sv,
45488	example.sv, exn-2.3b.sv, exn-5.4.sv, t-exists.sv, t-fileinto.sv,
45489	t-mailutils.sv: Committing my example/test sieve scripts so I can
45490	maintain them with cvs (I use them at work and home).
45491
454922001-08-01  Alain Magloire
45493
45494	* mailbox2/header.c: Put the stubs.
45495	* mailbox2/include/mailutils/header.h: Prototypes.
45496	* mailbox2/include/mailutils/sys/header.h: Prototypes.
45497
454982001-07-31  Alain Magloire
45499
45500	More intelligence was put in decode to detect mime messages.
45501	This temporary until we articulate how to present mime messages.
45502	decode will probably replace print.c.  Parsing of mailcap is
45503	not yet done.
45504
45505	* mail/decode.c: Aware of the content_type and the encoding
45506	for mime message, will supersede [Pp]rint.
45507
45508	* mail/mail.c: Set the columns variable at startup.
45509	* mail/mail.h: Prototype fpr util_screen_columns().
45510	* mail/mailline.c: Reset COLUMNS on SIGWINCH.
45511	* mail/util.c: New function util_screen_columns();
45512
45513	* sieve/Makefile.am: Remove gcc specific flags.
45514	* sieve/xmalloc.c: Removed, use lib/xmalloc.c instead.
45515	* sieve/xmalloc.h: Removed.
45516	* sieve/sysexists.h: Removed.
45517
455182001-07-31  Alain Magloire
45519
45520	* mailbox2/Makefile.am: add new files.
45521	* mailbox2/fstream.c (_fs_write): n uninitialized.
45522	(_fs_open): Use S_ISREG() macro.
45523	* mailbox2/include/mailutils/base.h: Remove superfluous.
45524	* mailbox2/iterator.c: Define struct _iterator.
45525	* mailbox2: New files: observer.c observable.c
45526	address.c parse822.c list.c attribute.c envelope.c
45527
455282001-07-30 Sergey Poznyakoff
45529	* guimb/main.c: Set g_argv[0] to the program file name for consistency
45530	with guile.
45531	* libmu_scm/mu_message.c: Added new primitives:
45532		mu_message_copy
45533		mu_message_delete
45534		mu_message_get_flag
45535		mu_message_set_flag
45536		mu_message_get_user_flag
45537		mu_message_set_user_flag
45538	* libmu_scm/mu_scm.c: Define MU-ATTRIBUTE- constants.
45539	* libmu_scm/mu_address.c: (new) Address-related functions.
45540	* libmu_scm/Makefile.am: Added mu_address.c
45541
455422001-07-27 Sergey Poznyakoff
45543	* lib/xmalloc.c: call mu_error() instead of error().
45544	* lib/malloc.c,lib/realloc.c: (new) Provide rpl_malloc() and
45545	rpl_realloc() (required by m4/malloc.m4, m4/realloc.m4)
45546	* lib/Makefile.am: Added malloc.c, realloc.c.
45547
45548	* mail/mail.h: Include <xalloc.h>
45549	* mail/util.c: Removed util_[mc]alloc() in favor of x[mc]alloc().
45550	* mail/alias.c: Use x[mc]alloc() instead of util_[cm]alloc().
45551	* mail/alt.c: Likewise.
45552	* mail/mail.c: Likewise.
45553	* mail/mailline.c: Likewise.
45554	* mail/shell.c: Likewise.
45555	* mail/unset.c: Likewise.
45556	* mail/var.c: Likewise.
45557
45558	* TODO: updated.
45559
455602001-07-25 Alain Magloire
45561
45562	Based on Jakob's idea, an implementation for decode.
45563	But it is clearly not flexible enough:
45564
45565	  decode [msgno] [part]
45566	  ? decode 28 2
45567
45568	IF message 28 is a multipart(mime) with two parts, the second part
45569	will be decoded and sent to stdout.
45570
45571	* mail/decode.c: First implementation behind Jakob's proposal.
45572
455732001-07-23 Sergey Poznyakoff
45574	* configure.in,libmu_scm/Makefile.am,guimb/Makefile.am : Fixed to
45575	compile properly on systems with missing/incomplete guile.
45576	* include/mailutils/Makefile.am: Added mailutils.h to
45577	pkginclude_HEADERS.
45578
455792001-07-23 Alain Magloire
45580
45581	* libmu_scm/mu_scm.h: Remove HAVE_LIBGUILE_H guard.
45582	* guimb/guimb.h: Remove HAVE_LIBGUILE_H guard.
45583
455842001-07-23 Alain Magloire
45585
45586	* util.c (util_msglist_command):  Check for interruption here
45587	also and that will permit interruption on long commands like
45588	"from *"
45589
455902001-07-23 Alain Magloire
45591
45592	The reason the interrupt code did not work for me, is that
45593	by default using signal will make function calls restartable,
45594	at least on my default RH5.1, when read() was interrupted
45595	it did not return EINTR inside ml_getc().
45596
45597	* mail.c (main): Use sigaction if available to set SIGPIPE.
45598	* mailline.c (sig_handler): Reset "lines" variable.
45599	Recall signal() if we did not have sigaction.
45600	(ml_readline_init):  Use sigaction to set SIGWINCH and SIGINT.
45601
45602	* libmu_scm/mu_scm.h:  Guard with HAVE_LIBGUILE_H.
45603	* guimb/guimb.h : Guard with HAVE_LIBGUILE_H.
45604
456052001-07-22 Sergey Poznyakoff
45606	Renamed debug_.* symbols to mu_debug_.* to avoid nameclashes.
45607	Files affected:
45608	* examples/mbox-dates.c, mbox-explode.c;
45609	* from/from.c;
45610	* include/mailutils/{debug.h,folder.h,mailbox.h,mailer.h};
45611	* libmu_scm/mu_message.c;
45612	* mail/send.c;
45613	* mailbox/{debug.c,folder.c,mailbox.c,mailer.c};
45614	* mailbox/include/{debug0.h,folder0.h,mailbox0.h,mailer0.h};
45615	* mailbox2/include/mailutils/base.h;
45616	* readmsg/readmsg.c;
45617	* sieve/sieve.c;
45618
45619	* configure.in: Added --without-guile. Uncommented making
45620	libmu_scm and guimb. Added check for -ldl before
45621	checking for -lpam: both FreeBSD and OpenBSD lack libdl, but
45622	have working libpam.
45623
45624	* messages/Makefile.am: Added missing @ARGP.*@ substitutes.
45625
456262001-07-21  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45627
45628	* mail/Makefile.am (mail_SOURCES): add decode.c
45629
45630	* mail/mail.h: add mail_decode prototype
45631
45632	* mail/decode.c (mail_decode): new file, new function
45633
45634	* mail/table.c: add decode command
45635
45636	* mail/util.c (util_expand_msglist): insert placeholder for
45637	attachment operations
45638
456392001-07-20  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45640
45641	* messages/messages.c: new file, implement of elm messages command
45642	(parse_opt): add --silent and --quit options
45643	(messages_count): new function
45644
456452001-07-20 Alain Magloire
45646
45647	* mailbox/misc.c: Removed, _cpystr() function move in mutil.c
45648	and rename to util_cpystr().
45649	* mailbox/include/misc.h: Removed.
45650	* include/mailutils/mutil.h: Added prototype for util_cpystr().
45651	* mailbox/mutil.c (util_cpystr): New function, move
45652	the _cpystr() from misc.c and move here.
45653	* mailbox/Makefile.am: Removed misc.c in dependencies.
45654	* mailbox/include/Makefile.am: Removed misc.h in dependencies.
45655	* mailbox/address.c: Use util_cpystr() instead of _cpystr().
45656	Added <mailutils/mutil.h> prototype.
45657	* mailbox/auth.c: Likewise.
45658	* mailbox/url.c: Likewise.
45659	* mailbox/folder.c: Likewise.
45660
456612001-07-19 Sergey Poznyakoff
45662	Added guile interface library.
45663
45664	* Makefile.am: Added scripts libmu_scm guimb.
45665	* configure.in: Checks for presence of Guile components.
45666	Making libmu_scm and guimb commented out until we solve
45667	debug_print name clash
45668	(libguile/debug.h vs. mailutils/debug.h).
45669
45670	* scripts: (new) Contains scripts for preparing guile
45671          documentation strings from C sources. The reason for
45672	  their presence is that guile-doc-snarf scripts distributed
45673	  with guile up to version 1.4 do not work. The comment at
45674          the beginning of scripts/guile-doc-snarf describes why. We'll
45675	  have to use these until next version of guile fixes the bug.
45676	* scripts/{Makefile.am,guile-doc-snarf,guile-func-name-check,
45677          guile-snarf.awk: (new)
45678	* scripts/.cvsignore: (new)
45679
45680	* libmu_scm: (new) Guile interface library:
45681	* libmu_scm/Makefile.am: (new).
45682	* libmu_scm/mu_scm.c: (new) Main module.
45683	* libmu_scm/mu_mailbox.c: (new) Mailbox primitives.
45684        * libmu_scm/mu_message.c: (new) Message primitives.
45685        * libmu_scm/mu_body.c: (new) Message body primitives.
45686	* libmu_scm/mu_scm.h: (new) Library prototypes.
45687	* libmu_scm/.cvsignore: (new)
45688
45689	* guimb: (new) Process mailbox(es) using Guile program or
45690	  expression.
45691	* guimb/Makefile.am: (new)
45692	* guimb/main.c: (new) Main functions.
45693	* guimb/collect.c: (new) Collect input.
45694	* guimb/util.c: (new) Some utilities.
45695	* guimb/run_scm.c: (new) Initialization of libguile and libmu_scm
45696	* guimb/guimb.h: Prototypes.
45697	* guimb/.cvsignore: (new)
45698
45699	* examples/reply.scm: Automatic mail responder for use with guimb.
45700
457012001-07-18 Sam Roberts
45702
45703	* include/mailutils/url.h: New api functions for parsing.
45704	* doc/: Makefile.am, framework.texi, url.texi: Updated and
45705	  corrected URL documentation.
45706	* doc/ex-url.texi: The url api example. Derived from
45707	  ../example/url-parse by a perl script.
45708	* mailbox/url.c: Added a function to do generalized URL parsing.
45709	* mailbox/: url_imap.c, url_pop.c: Use the url_parse() function to
45710	  parse the URL.
45711	* mailbox/mbx_pop.c: Added checks for low-memory conditions, and
45712	  look for passwd in url before prompting user.
45713	* mailbox/folder_imap.c: Look for passwd in the url before
45714	  prompting.
45715	* examples/: .cvsignore, Makefile, Urls, url-parse.c: Added example
45716	  of URL parsing, and test for parsing.
45717	* examples/Urls.good: Added test for % decoding.
45718	* mailbox/mbx_mbox.c: Needed <stdlib.h> on QNX6.
45719	* mailbox/include/: registrar0.h, url0.h: Comment on schemes, and
45720	  removed comment on encoding.
45721
457222001-07-18 Alain Magloire
45723
45724	* mailbox/mbx_mbox.c (mbox_messages_count): This function does
45725	not call the observers, the callback function, on the mbox_scan()
45726	does.
45727
45728	* frm/frm.c (main): call mailbox_scan () instead of
45729	mailbox_messages_count () since we want to be notified.
45730
457312001-07-12 Sam Roberts
45732
45733	* examples/mbox-dates.c: Added pop and imap records.
45734	* include/mailutils/mutil.h, mailbox/mutil.c: New functions -
45735	mu_hex2ul(), mu_hexstr2ul().
45736	* mailbox/message.c: unistd.h needed on QNX6
45737	* TODO: Added Sergey's todo items and mine for sieve.
45738
457392001-07-12  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45740
45741	* include/mailutils/mailutils.h: new "catchall" header, includes
45742	all mailutils headers
45743
457442001-07-10 Sam Roberts
45745
45746	* examples/Addrs.good: Now mapping ENOENT to EPARSE in error
45747	reporting, its clearer.
45748
457492001-07-09 Sergey Poznyakoff
45750	* configure.in: check for termios.h termio.h sgtty.h
45751	Added MU_MAINTAINER_MODE.
45752	* m4/maintain.m4: (new) Settings specific to maintainer-mode.
45753	* m4/Makefile.am: Added maintain.m4.
45754
45755	* mailbox/attribute.c: Fixed flags_to_string(): MU_ATTRIBUTE_SEEN
45756	and MU_ATTRIBUTE_READ were swapped: the former produced 'R',
45757	and the latter 'O'.
45758
45759	* mail/file.c: run "summary" after opening new mailbox.
45760	Issue diagnostics if mailbox cannot be opened.
45761	Display summary when called without arguments.
45762	* mail/from.c: Changed flags display.
45763	* mail/mailline.c: Provide ml_reread() when compiled without
45764	readline.
45765	Check for interrupt in (both versions of) ml_reread().
45766	Use util_[cm]alloc() instead of [cm]alloc().
45767	* mail/{print.c,visual.c}: set READ instead of SEEN attribute on
45768	read messages.
45769	* mail/z.c: case D_FWD missed break; Fixed typos in the comment
45770	to D_NONE.
45771	* mail/version.c: display options with which the program is
45772	compiled.
45773	* mail/util.c: Added util_malloc(), util_calloc().
45774	* mail/mail.h: Protos for the above;
45775	* mail/alias.c: use util_[cm]alloc() instead of library functions
45776	wherever appropriate.
45777	* mail/alt.c: Likewise.
45778	* mail/mail.c: Likewise.
45779	* mail/shell.c: Likewise.
45780	* mail/unset.c: Likewise.
45781	* mail/var.c: Likewise.
45782	Implemented ~A (read signature from file).
45783	* mail/quit.c: Raise hold flag when not closing system mailbox (%).
45784
457852001-07-06  Alain Magloire
45786
45787	* mail/mailline.c: "interrupt" is actually a key word
45788	for some C compiler i.e. Watcomm C, rename it to "interrupted".
45789	* mail/util.c: The macros O_CREAT etc needs <sys/fnct.h>.
45790
457912001-07-06  Alain Magloire
45792
45793	* mail/mail.c: Be a little more verbose when mailbox_{create,open}()
45794	fails at startup.
45795	* doc/Makefile.am: Add the missing *.texi in the list of EXTRA_DIST.
45796
457972001-07-06 Sergey Poznyakoff
45798	* imap4d/fetch.c: imap4d_fetch0(): return RESP_OK on success.
45799	* imap4d/bye.c: split imap4d_bye() into imap4d_bye() and imap4d_bye0().
45800	* imap4d/logout.c: call imap4d_bye0() instead of imap4d_bye().
45801	Reason: rfc 2060 requires that the server send a BYE untagged response
45802	before the (tagged) OK response. With our implementation it was
45803	vice-versa.
45804	* imap4d/imap4d.h: proto for imap4d_bye0().
45805	* mail/mail.c: changed startup banner.
45806	* mail/mailline.c: handle SIGWINCH.
45807	* mail/util.c: Include <termios.h> when present.
45808	* configure.in: test for the presence of <termios.h>
45809
458102001-07-05  Alain Magloire
45811
45812	* mail/send.c(mail_send0): Put the mailer in debug mode
45813	if util_find_env("verbose")->set, good for debugging.
45814
458152001-07-05  Alain Magloire
45816
45817	According to the man page:
45818	"sendmail contains a command, possibly with options, that mailx
45819	invokes to send mail. You must manually set the default for this
45820	environment variable by editing ROOTDIR/etc/mailx.rc to specify the
45821	mail agent of your choice. The default is sendmail, but it can be any
45822	command that takes addresses on the command line and message contents
45823	on standard input."
45824
45825	* mail/mail.c (main): Register smtp_record too as a mailer.
45826	Set variable sendmail to _PATH_SENDMAIL as the default mailer.
45827	* mail/mail.h: New proto util_setenv(), util_find_env()
45828	change to be const char *.
45829	* mail/send.c (msg_to_pipe): New function, open a pipe()
45830	and write a message to it.
45831	(mail_send0): Now create the mailer according to
45832	util_find_env("sendmail")->value.  Use a pipe() if mailer_create()
45833	fails.
45834	* mail/set.c (mail_set): After free(entry->value) set the value
45835	to NULL.
45836	* mail/util.c (util_find_env): Change the prototype to be const.
45837	Remove hack about need_free and use a static variable to hold
45838	"asksub".
45839	* mail/util.c (util_setenv): New function to set environment
45840	model on libc call setenv().
45841
45842	* mailbox/message.c (message_sender): Set the default sender base on
45843	the passwd entry.
45844
458452001-07-05  Alain Magloire
45846
45847	We can send a message and if the address starts with '|'
45848	the message is pipe to the cmd and if starts with '/' it is
45849	save to a file.
45850	     mailx ghislaine '|cat >save'
45851	mails a message to ghislaine and also copies the message into a file
45852	called save.
45853
45854	* mail/mail.h: Change struct send_environ to contain
45855	two new fields char **outfiles and int nfiles.
45856	* mail/send.c: Look for '/' and '|' when parsing the addresses
45857	and add them to struct send_environ outfiles.
45858	(mail_send0):  Memory overflow, we were free(buf) twice.
45859	made char *buf local where it is needed.  Save the message
45860	to outfiles when set.
45861	(isfilename): New function.
45862	* mail/followup.c: Initialize the struct send_environ new fields.
45863	* mail/reply.c: Initialize the struct send_environ new fields.
45864
45865	* lib/argcv.c: Add support to consider string between
45866	single quote like one word(same as double quotes).
45867
458682001-07-04  Alain Magloire
45869
45870	* mailbox2/stream.c: stream_read() and stream_write()
45871	change prototype to be "void *" instead of "char *".
45872	* mailbox2/bstream.c: Adjust bstream_{read,write} to the
45873	new prototypes.
45874	* mailbox2/pop3/pop3_stream.c: Likewise.
45875	* mailbox2/Makefile.am: New file.
45876	* mailbox2/pop3/Makefile.am: New file.
45877	* mailbox2/mstream.c: Mapfile stream Implementation.
45878	* mailbox2/fstream.c: File stream implementation.
45879	* mailbox2/include/mailutils/sys/fstream.h: New file.
45880	* mailbox2/include/mailutils/sys/mstream.h: New file.
45881	* mailbox2/tcp.c: rename to tcpstream.c.
45882	* mailbox2/include/mailutils/sys/tcp.h: Rename to tcpstream.h
45883
45884	* mailbox/mapfile_stream.c (_mapfile_write):  Make sure
45885	the size is not zero before making the memcpy().
45886
458872001-07-03  Alain Magloire
45888
45889	* mail/headers.c:  Catch the overflow in the calculation by
45890	resetting the number of lines to default screen lines.
45891	* mail/mail.c (main): Add a "summary" call also for the
45892	initial commands on startup(in interactive).
45893	* mail.h: Proto for mail_summary() and mail_version().
45894	* table.c: Add mail_summary() and mail_version() in the cmd table.
45895	* util.c (util_getcols): First try an ioctl(TIOCGWINSZ,..) call
45896	not all shells set the COLUMNS environ.
45897	(util_getlines): Likewise. Also take to account the prompt
45898	in the lines number.
45899	* z.c (mail_z): Change the behaviour of "z." to show a screenful
45900	when the last page is reach.  This is very practical when starting
45901	mail, since "z." is the initial command to show the header summary.
45902	* mail/version.c: New file, show mail version, mail_version().
45903	* mail/summary.c: New file, display a short summary of the mailbox.
45904	mail_summary().
45905	* mail/Makefile.am: add summary.c and version.c
45906
45907	* mailbox2/include/mailutils/mbox.h: Proto for Unix-Mbox.
45908
459092001-07-03  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
45910
45911	* README-alpha: note that INSTALL is generated
45912
459132001-07-03 Sergey Poznyakoff
45914	* configure.in: --with-mail-rc option: set path to system-wide
45915	mail.rc file.
45916	* mail/Makefile.am,mail/mail.c: Likewise.
45917	* mail/send.c: check for "dot" variable. Implemented "~.",
45918	"appenddeadletter".
45919	* mail/inc.c: (new) inc[orporate] command.
45920	* mail/{mail.c,mail.h,table.c}: Ditto.
45921	* mail/print.c: Handle interrupts when fetching message body.
45922	* mail/followup.c: insert ',' between recipients' addresses.
45923	* mail/quit.c: use mailbox_save_attributes(). Implemented
45924	"hold" variable. Raise MU_ATTRIBUTE_READ on every message with
45925	MU_ATTRIBUTE_SEEN bit set (compatibility with existing mails).
45926	* mail/from.c: Changed order of checking message attribute bits to
45927	be compatible with existing implementations.
45928	* mail/z.c: removed break from the loop.
45929	* mailbox/attribute.c: added attribute_set_modified() function.
45930	Fixed attribute_unset.* functions to raise MU_ATTRIBUTE_MODIFIED bit.
45931	* include/mailutils/attribute.h: Proto for attribute_set_modified().
45932
459332001-07-02 Alain Magloire
45934
45935	* mailbox2/tcp.c: make it thread-safe.
45936	* mailbox2/bstream.c: Implement buffered stream.
45937	* mailbox2/pop3_stream.c: Use a buffered stream.
45938
459392001-07-02 Alain Magloire
45940
45941	Feedback from Sergey for the need of saving the attribute flags
45942	without expunging.  Note, this is a hack, the code is taken from
45943	mbox_expunge(mbx_mbox.c) and there is lot of duplication.  But
45944	since we are moving toward a new mailbox API, the code will be
45945	rewritten more cleanly in the new API.
45946
45947	* include/mailutils/mailbox.h: Add proto mailbox_save_attributes()
45948	* mailbox/include/mailbox0.h: New field in struct _mailbox
45949	_save_attributes (mailbox_t);
45950	* mailbox/mailbox.c: New function mailbox_save_attributes ().
45951	* mailbox/mbx_mbox.c: New function mbox_save_attributes (),
45952	implement saving the attribute flags in header field "Status:"
45953
45954	* imap4d/bye.c: call mailbox_save_attributes() when exiting.
45955	it will save the attribute flags.
45956	* imap4d/close.c: Typo.
45957	* imap4d/logout: Remove the mailbox_close() and mailbox_destroy()
45958	it is being call imap4d_bye ().
45959	* imap4d/select.c (imapr3d_select0): call mailbox_save_attributes()
45960	if a mailbox was already selected.
45961
459622001-07-01 Alain Magloire
45963
45964	* mail/util.c (util_strupper):  The first implementation was
45965	buggy, corrected.
45966
459672001-07-01 Alain Magloire
45968
45969	* mailbox2/pop3/*: Pop3 functions are thread-safe and cancel-safe.
45970	The problem is monitor.h, we will probably end up doing a monitor.h.in
45971	and set at compile time if threading is enable or not.
45972
459732001-07-01 Alain Magloire
45974
45975	* mail/util.c (util_expand_msglist): Cleanup the expand by pattern
45976	by moving some code in util_strupper(), the comparison must be
45977	case insensitive.
45978	(util_strupper): Convert the string to uppercase.
45979
459802001-07-01 Sergey Poznyakoff
45981        * mailbox/attribute.c: set MU_ATTRIBUTE_MODIFIED bit in the underlying
45982        structure when setting the flags.
45983        * mail/mail.c: Initialize readline and set user name before
45984        determining working mode.
45985        For an empty mailbox output diagnostics and quit.
45986        Read system-wide mail.rc file.
45987        Implemented "set ignoreeof".
45988        * mail/send.c: Implemented "set ignore", "set ignoreeof", "set nosave".
45989        Use doubled escape character to insert a single escape to the
45990        message body.
45991        * mail/delete.c: Implemented "set autoprint"
45992        * mail/dp.c: removed util_do_command("next"): delete does this anyway.
45993
459942001-06-30 Sergey Poznyakoff
45995	* configure.in:
45996		define READLINE_LIBS instead of linking libreadline
45997		to every binary.
45998		AC_CHECK_LIB(pthread) was missing comma before
45999		ACTION_IF_NOT_FOUND, thus have_libpthread was always no.
46000	* mail/Makefile.am: Use READLINE_LIBS
46001	* lib/argcv.[ch]: Treat a sequence of whitespace characters as
46002	a single whitespace. Break string on given delimiters. Do not
46003	split quoted arguments.
46004	* mail/set.c: Modified to use new argcv_get() syntax.
46005	* mail/delete.c: After deleting move realcursor to the next
46006	non-deleted message.
46007	* mail/alt.c: Honour "metoo" variable. Try to determine users
46008	full email address.
46009	* mail/mail.c: do not put empty or comment lines into readline
46010	history. Handle keyboard interrupts properly.
46011	Implemented `warranty' command. Warn user about arrival of a new
46012	mail.
46013	* mail/send.c: Handle keyboard interrupts. Use util_tempfile().
46014	* mail/{send.c,reply.c}: change args in call to mail_send0(): packed
46015	all header strings into one structure to facilitate escape handling.
46016	Warn user about null message body.
46017	* mail/mailline.c: (new) readline-related functions.
46018	* mail/var.c: (new) Functions for escape variable handling.
46019	* mail/util.c: added extra argument to util_find_entry(): a pointer
46020	to the table where to look up. Added util_error(), util_help(),
46021	util_tempfile().
46022	* mail/*.c: use util_error() instead of printing diagnostics to ofile.
46023	* mail/{source.c,if.c}: removed mail_is_terminal(),
46024	mail_set_is_terminal(): `interactive' is used instead.
46025	* mail/mail.h: in struct mail_command_entry changed `isflow' field
46026	to `flags'. It contains information about semantics of the command.
46027	* mail/table.c: Initialize `flags' field.
46028
46029
460302001-06-29  Alain Magloire
46031
46032	* mail/util.c (util_expand_msglist): Implement expansion of
46033	:d       All deleted messages
46034	:n       All new messages
46035	:o       All old messages
46036	:r       All messages that have already been read
46037	:u       All unread messages
46038	/string  All messages with string in the subject line
46039                 (the case of characters in string is ignored)
46040
460412001-06-27  Alain Magloire
46042
46043	* configure.in:  We were not checking for thread support
46044	at all because the test was faulty.
46045
46046	* readmsg: New directory.
46047	* readmsg/readmsg.c: New file.
46048	* readmsg/readmsg.h: New file.
46049	* readmsg/msglist.c: New file.
46050	This is base on a old testing program Dave inglis wrote
46051	to test the mime parsing code.  It is still work in progress
46052	but a good base for the readmsg(1) elm utility clone.
46053	Not enable yet in the TOP Makefile.
46054
460552001-06-26  Alain Magloire
46056
46057	* mail/from.c:  Use address_get_personal() for a more
46058	pretty print when showing the headers.
46059
460602001-06-26 Sergey Poznyakoff
46061	* mail/util.c:
46062		Added extra argument to util_msglist_command(), controlling
46063		whether it should move the cursor to the last message
46064		processed.
46065	* mail/delete.c,mail/dp.c,mail/edit.c,mail/from.c,mail/hold.c,
46066	  mail/mbox.c,mail/print.c,mail/reply.c,mail/size.c,mail/top.c,
46067	  mail/undelete.c,mail/util.c,mail/visual.c: Likewise.
46068	* mail/util.c: util_screen_lines() function.
46069		util_outfolder_name().
46070		util_save_outgoing()
46071	* mail/z.c: removed z_lines() in favor of util_screen_lines().
46072	* mail/headers.c: use util_screen_lines().
46073	* mail/touch.c: Initial implementation. Simply calls mail_mbox.
46074		Maybe the table.c entry should point to mail_mbox instead?
46075	* mail/write.c: use util_fullpath().
46076	* mail/send.c: call util_save_outgoing() to preserve sent message.
46077		Set umask 077 before calling mkstemp().
46078	* mail/folders.c: Use $LISTER.
46079	* mail/followup.c: Implemented.
46080	* mail/from.c: Changed output format.
46081	* mail/mbox.c: move mail_mbox_commit to quit.c.
46082	* mail/quit.c: Likewise. Honour "keepsave" variable.
46083
460842001-06-25  Alain Magloire
46085
46086	* mail/header.c: We were looping forever in here.  The loop
46087	is not need it, header only prints one page that includes
46088	the message specified i.e. the header command only takes
46089	a message number as an argument that will serve as a reference
46090	to display a screen full.
46091
46092	* mail/help.c: Use the pager code, the help is long.
46093
460942001-06-25  Alain Magloire
46095
46096	* doc/Makefile.am: add {c-api,framework,programs}.texi EXTRA_DIST
46097	* imap4d/imap4d.c (imap4d_usage): Cut and paste typo.
46098	* pop3d/pop3d.c (pop3d_usage): Cut and paste typo.
46099	* include/mailutils/Makefile.am: add mutil.h to the list.
46100	* lib/strisignal.c: Define __P if not set.
46101	* m4/Makefile.am: Added tm_gmtoff.m4 tm_isdst.m4 tm_zone.m4
46102
461032001-06-25 Sergey Poznyakoff
46104	* mail/if.c: Removed confusing comment.
46105	* mail/copy.c: Split off mail_copy0. It is shared between mail_copy
46106		and mail_save. Implemented Copy command.
46107		Use mailbox_open_default() instead of mailbox_open().
46108		Fixed possible memory leaks.
46109	* mail/write.c: Implemented Write. Fixed memory leaks.
46110	* mail/Makefile.am: removed discard.c
46111	* mail/discard.c: removed. Implemented in retain.c.
46112	* mail/retain.c: Implemented retain/ignore. It is more convenient
46113		to keep them in one module so they can share static data.
46114	* mail/alias.c: Implemented.
46115	* mail/unalias.c: Implemented.
46116	* mail/alt.c: Implemented.
46117	* mail/file.c:
46118		Check number of arguments.
46119		Display current mailbox name when called without args.
46120		Honour %, &, and + in mailbox names (possibly should
46121		be implemented in mailbox_open_default ?).
46122		Use mail_mbox_close(). After opening new mailbox,
46123		run "z." instead of "from *".
46124	* mail/folders.c: A (very rudimentary) implementation.
46125	* mail/headers.c: Removed if (num) clause: util_expand_msglist()
46126		now returns at least 1.
46127	* mail/pipe.c: Likewise.
46128	* mail/hold.c: Implemented.
46129	* mail/mail.c: Escape % signs in the command line before passing
46130		it to util_do_command().
46131	* mail/mail.h: Protos for implemented functions. Proto for
46132		readline() if libreadline is not linked in.
46133		Definition for MAIL_ATTRIBUTE_MBOXED.
46134	* mail/mbox.c: Implemented.
46135	* mail/print.c: Print only header fields allowed by retain/ignore
46136		settings.
46137	* mail/quit.c: mail_mbox_close() shared between this module and
46138		file.c.
46139		Print statistics information on closing the mailbox (number
46140		of messages held and saved in mbox).
46141	* mail/reply.c: Implemented.
46142	* mail/save.c: Use mail_copy0().
46143	* mail/send.c: Split off mail_send0(). It is used by mail_send()
46144		and mail_reply().
46145	* mail/util.c:
46146		util_expand_msglist(): return 1 and set msglist[0]=cursor
46147		if argc == 1.
46148		util_do_command(): Added missing va_end().
46149		util_get_sender(): Returns sender email for the given msgno.
46150			Optionally strips off domain part.
46151		util_slist_.*(): "string lists" used by alias,alt,retain,
46152			ignore.
46153		util_strcat(): Concat two strings, reallocating first
46154			to the necessary length.
46155		util_escape_percent(): Excape % signs in a string, so
46156			it can be used as format in .*printf calls.
46157
461582001-06-22 Sergey Poznyakoff
46159	* mailbox/mutil.c: added mu_get_homedir() and mu_tilde_expansion();
46160	* include/mailutils/mutil.h: protos for new mu_ functions
46161	* imap4d/util.c: use mu_tilde_expansion().
46162	* mail/z.c: implemented.
46163	* mail/if.c: implemented.
46164	* mail/mail.c: A read-eval loop function shared between mail.c and
46165		source.c. Quits gracefully upon reading EOF.
46166		Expand '~' in pathnames.
46167		Upon startup in read mode, display first screenful of from
46168		lines, instead of listing the whole mailbox. This is
46169	        compatible with existing implementations.
46170		Do not display prompt when not reading from a terminal.
46171	* mail/source.c: Use common read-eval loop.
46172	* mail/mail.h: Protos for new functions.
46173		struct mail_command_entry: added isflow field, needed
46174		for if/else/endif flow control.
46175	* mail/table.c: changes due to addition of isflow field.
46176	* mail/send.c: removed unconditional #include <paths.h>: it already
46177		was included from "mail.h".
46178	* mail/util.c: Added util_get_homedir() and util_fullpath().
46179
461802001-06-21 Sergey Poznyakoff
46181	* mailbox/mutil.c: Fixed error introduced in the initial
46182	  implementation of mu_mktime (now mu_tm2time). The comment
46183	  on mu_tm2time() describes it.
46184	  Revert the sign of the return value of mu_utc_offset(), so it
46185	  agrees with the accepted timezone rules (+ for eastern
46186	  hemisphere, - for western).
46187
461882001-06-19 Sam Roberts
46189
46190	* include/mailutils/debug.h, mailbox/debug.c: New function:
46191	  debug_printv() to complement debug_print().
46192	* examples/mbox-dates.c: parse822_date_time now takes a timezone
46193	  argument. We don't actually use the arguments, though.
46194	* include/mailutils/parse822.h: parse82_date_time() now uses the
46195	  mu_timezone structure for portability.
46196	* include/mailutils/mailbox.h: Prototyped mailbox_destroy_folder().
46197	* mailbox/mu_mktime.c: Moved mu_mktime to mutil.c as mu_tm2time,
46198	  and removed mu_mktime.c
46199	* include/mailutils/mutil.h, mailbox/Makefile.am,
46200	  mailbox/mbx_imap.c, mailbox/mutil.c, mailbox/parse822.c: Moved some
46201	  generically useful date/time handling functions to mutil.c, fixed
46202	  problems with portability of timezone information in struct tm, and
46203	  created a new structure to hold timezone information, since
46204	  struct tm doesn't do so reliably.
46205	* imap4d/: append.c, fetch.c, imap4d.h, namespace.c, search.c,
46206	  util.c: Moved date/time parsing utility functions to
46207	  mailbox/mutil.c.  Added braces to initializers and removed unused
46208	  variables prototyped shared functions, made functions that didn't
46209	  return return void. (to quiet gcc -Wall),
46210
462112001-06-17 Sam Roberts
46212
46213	* sieve/Makefile.am: More fixes to the packaging structure by
46214	Sergey.
46215	* acconfig.h, configure.in, m4/tm_gmtoff.m4, m4/tm_isdst.m4,
46216	m4/tm_zone.m4: Added tests for isdst, gmtoffset, and zone in struct
46217	tm.
46218	* mailbox/folder_pop.c: Confusing typo in comment.
46219
462202001-06-16 Sergey Poznyakoff
46221        * mailbox/mu_mktime.c(added): a wrapper around system mktime()
46222          function that honours the timezone.
46223        * mailbox/Makefile.am: add mu_mktime.c.
46224        * imap4d/fetch.c: date conversion in fetch_internaldate.
46225          get_timezone() not used anymore, removed.
46226        * imap4d/search.c: removed confusing comment.
46227        * imap4d/util.c: changed mktime() calls to mu_mktime(), this
46228          solves the timezone problem.
46229          use imap_parse_date_time() in util_parse_internal_date0().
46230	  (Proposed by Sam).
46231	* imap4d/imap4d.h: Added missing declarations.
46232        * mailbox/mbx_imap.c: Patch from Sam: added imap_parse_date_time().
46233          imap_parse_date_time() returns tm/timezone pair.
46234	* mailbox/folder_mbox.c: added #include <sys/types.h>. It is needed
46235          on FreeBSD before inclusion of <dirent.h>
46236	* sieve/sieve.c: swapped arguments in a call to va_start().
46237
462382001-06-15 Sergey Poznyakoff
46239	Bunch of patches provided by Sam Roberts:
46240	* imap4d/util.c: Fixed format bugs in util_parse.*_date functions.
46241          Use parse822_date_time() in util_parse_header_date().
46242	  Some changes to pacify gcc -Wall.
46243	* imap4d/util.c,imap4d/search.c,imap4d/imap4d.h:
46244	  Rename the confusing functions:
46245		 util_parse_header_date -> util_parse_822_date
46246		 util_parse_rfc822_date -> util_parse_ctime_date
46247	  include <ctype.h>
46248
462492001-06-14 23:01  Sam Roberts
46250
46251	* mailbox/parse822.c: I think timezone info is now placed in struct
46252	tm correctly.
46253	* include/mailutils/parse822.h: Prototypes for functions to parse
46254	rfc822 date-time.
46255	* sieve/: Makefile.am, test.c: Patches from Sergey to make the
46256	auto* stuff work, now uses lex/yacc portably, and puts all the
46257	necessary files into the distribution.
46258	* sieve/ylwrap: Portable wrapper for lex/yacc invocations, by Tom
46259	Tromey <tromey@cygnus.com>, modified by Sergey Poznyakoff
46260	<gray@farlep.net> to replace yy prefixes, so multiple grammars can
46261	co-exist.
46262	* sieve/sieve.c: Define EOK ifndefed.
46263	* examples/showmail.c: No longer relevant to the current APIs.
46264	* examples/mbox-dates.c: GNU indented.
46265	* examples/addr.c: GNU indented
46266	* examples/.cvsignore: Added example executables.
46267	* examples/mbox-explode.c: Made so it now saves all the attachments
46268	from all the messages in a folder. Also GNU indented.
46269	* doc/envelope.texi: Added some text to the envelope docs, still
46270	incomplete.
46271	* doc/url.texi: Noted the IMAP url syntax.
46272	* doc/mailutils.texi: Some of the RFCs were missing, or
46273	miscategorized in the references sect.
46274	* doc/.cvsignore: Ignoring files.
46275	* doc/rfc1939.txt: Was checked in with DOS line terminators,
46276	converted to Unix.
46277
462782001-06-11  Alain Magloire
46279
46280	* imap4d/util.c (util_msgset): When '*' was define in the
46281	set it was not added to the count.
46282	Bug reported by Jakob Kaivo.
46283
462842001-06-09  Alain Magloire
46285
46286	* mailbox2/pop3/pop3_open.c: Remove for pop3_connect.c
46287	* mailbox2/pop3/pop3_close.c: Remove for pop3_disconnect.c
46288	* mailbox2/pop3/pop3_connect.c: New.
46289	* mailbox2/pop3/pop3_disconnect.c: New.
46290	* mailbox2/include/mailutiils/error.h: New macro
46291	MU_ERROR_OPERATION_CANCELED
46292	* mailbox2/include/mailutils/pop3.h: Move the enum state in sys/pop3.h
46293
462942001-06-09 Sam Roberts
46295
46296	* rfc1738.txt, rfc2045.txt, rfc2046.txt, rfc2047.txt, rfc2049.txt,
46297	rfc2088.txt, rfc2111.txt, rfc2192.txt, rfc2193.txt, rfc2221.txt,
46298	rfc2298.txt, rfc2342.txt, rfc2368.txt, rfc2384.txt, rfc2821.txt,
46299	rfc2822.txt, rfc3028.txt, rfc821.txt, rfc822.txt: These RFCs are
46300	relevant to mailutils, and many (all?) are referenced in the
46301	mailutils documentation.
46302
463032001-06-09  Alain Magloire
46304
46305	* examples/mbox-explode.c: message_save_attachment, should take
46306	the part.  Continue if the message does have a Date or Subject field.
46307
46308	* mailbox/mapfile_stream.c (_mapfile_open): Indentation.
46309
463102001-06-09  Alain Magloire
46311
46312	* mailbox/tcp.c (_tcp_get_fd): Buglet, comparing fd against EINVAL
46313	instead of -1.
46314
46315	* mailbox2/pop3/pop3_apop.c: New.
46316	* mailbox2/pop3/pop3_capa.c: New.
46317	* mailbox2/pop3/pop3_close.c: New.
46318	* mailbox2/pop3/pop3_create.c: New.
46319	* mailbox2/pop3/pop3_dele.c: New.
46320	* mailbox2/pop3/pop3_destroy.c: New.
46321	* mailbox2/pop3/pop3_iterator.c: New.
46322	* mailbox2/pop3/pop3_list.c: New.
46323	* mailbox2/pop3/pop3_lista.c: New.
46324	* mailbox2/pop3/pop3_noop.c: New.
46325	* mailbox2/pop3/pop3_open.c: New.
46326	* mailbox2/pop3/pop3_pass.c: New.
46327	* mailbox2/pop3/pop3_quit.c: New.
46328	* mailbox2/pop3/pop3_readline.c: New.
46329	* mailbox2/pop3/pop3_response.c: New.
46330	* mailbox2/pop3/pop3_retr.c: New.
46331	* mailbox2/pop3/pop3_rset.c: New.
46332	* mailbox2/pop3/pop3_sendline.c: New.
46333	* mailbox2/pop3/pop3_stat.c: New.
46334	* mailbox2/pop3/pop3_stream.c: New.
46335	* mailbox2/pop3/pop3_timeout.c: New.
46336	* mailbox2/pop3/pop3_top.c: New.
46337	* mailbox2/pop3/pop3_uidl.c: New.
46338	* mailbox2/pop3/pop3_uidla.c: New.
46339	* mailbox2/pop3/pop3_user.c: New.
46340
46341	* mailbox2/tcp.c: New.
46342	* mailbox2/iterator.c: New.
46343	* mailbox2/stream.c: New.
46344
46345	* mailbox2/pop3/pop3client.c: Test case should probably somewhere else
46346	in example/ perhaps?
46347
463482001-06-09  Alain Magloire
46349
46350	* mailbox2/*: First attempt to define the new API.
46351	POP3 was implemented.
46352
463532001-06-07  Sam Roberts
46354
46355	* .cvsignore, AUTHORS, COPYING, Makefile.am, NEWS, README,
46356	addr-lex.l, addr.y, comparator.c, comparator.h, exitcodes.h,
46357	hmac-md5.h, imparse.c, imparse.h, interp.c, interp.h, md5.c, md5.h,
46358	md5global.h, message.c, message.h, parseaddr.c, parseaddr.h,
46359	script.c, script.h, sieve-gram.y, sieve-lex.l, sieve.c,
46360	sieve_err.c, sieve_err.h, sieve_interface.h, svfield.c, svfield.h,
46361	sysexits.h, test.c, tree.c, tree.h, util.c, util.h, xmalloc.c,
46362	xmalloc.h: Initial commit of the port of CMU's sieve engine. It
46363	builds, and some actions work, but has seen very little use.
46364
463652001-06-03  Sam Roberts
46366
46367	* mailbox/file_stream.c,mailbox/mapfile_stream.c: Return EINVAL
46368	  for meaningless combination of MU_STREAM_READ + WRITE.
46369
463702001-06-03  Alain Magloire
46371
46372	* doc/*; Bunch of typos corrected.
46373	Patch from Thomas Fletcher.
46374
463752001-06-02  Sam Roberts
46376
46377	* mailbox/parse822.c,include/mailutils/parse822.h: functions
46378	  to parse rfc822 date-time.
46379	* examples/mbox-explode.c: example of saving all mime attachments
46380	  for messages in a mailbox.
46381	* examples/mbox-dates.c: example of using the date-time parser, it
46382	  prints all the dates in a mailbox that it can't parse.
46383	* examples/Makefile: makes the mbox-* examples.
46384
463852001-06-01  Alain Magloire
46386
46387	* mailbox/mbx_pop.c (pop_writeline): if buffer is NULL noop.
46388
463892001-06-01  Sergey Poznyakoff
46390	* imap4d/search.c: case-insensitive comparison for text fields.
46391	  Error checking for stray symbols at the end of criteria.
46392
46393	* imap4d/util.c: util_strcasestr() function. Functions for
46394	  converting between text and integer representation of
46395	  attributes. Split util_parse_internal_date: the helper
46396	  function util_parse_internal_date0 also returns the
46397          pointer to the location in the string where parsing
46398          stopped.
46399
46400	* imap4d/util.h: protos for util_strcasestr() and
46401	  util_parse_.*_date() functions.
46402
46403	* imap4d/imap4d.c: force ofile to be line-buffered, so command
46404	  continuation requests are immediately visible.
46405
46406	* imap4d/append.c: implemented. Currently this needs the
46407	  helper function mailbox_destroy_folder(), so that
46408	  mailbox_set_stream does its work. Also the situation
46409          with message attributes needs to be cleared.
46410
464112001-06-01  Alain Magloire
46412
46413	* mailbox/debug.c(debug_print): Noop is format is NULL;
46414	* mailbox/mbx_imap.c (imap_messages_count):  Hack! Force a
46415	reconnect if the server timeout on us.  This is not the right
46416	approach and does not work well, fix later.
46417	(message_operation):  Check if selected is not null, first.
46418	* mailbox/folder_imap.c (folder_imap_create): Wrong state.
46419	* mailbox/mime.c: Pass down the return value if not ENOENT.
46420
464212001-05-30  Dave Inglis
46422
46423	* mailbox/mbx_pop.c (CHECK_ERROR): Force the mailbox to call connect
46424	again when an error occurred.  For example the QPopper(Qalcomm) POP3
46425	server timeout very quickly, 30 seconds violating the RFC.  So when
46426	Readin the stream again we reconnect.
46427
464282001-05-30  Dave Inglis
46429
46430	* mailbox/filter_trans.c (base64_decode): The variable should
46431	be unsigned char not signed char.  By default gcc treats a
46432	declaration of "char*" like "signed char*", CC Watcom did not.
46433	(base64_encode): Likewise.
46434	* mailbox/mime.c: Read 'itl the end of the stream.
46435
464362001-05-29  Sergey Poznyakoff
46437	* imap4d/uid.c, imap4d/search.c: support for UID SEARCH command;
46438	* imap4d/util.c: forgotten fix to util_msgset().
46439
464402001-05-27  Sergey Poznyakoff
46441	* imap4d/search.c: Added missing <message set> condition.
46442
464432001-05-27  Sergey Poznyakoff
46444
46445	* imap4d/imap4d.c, imap4d/capability.c, imap4d/copy.c,
46446	  imap4d/create.c, imap4d/delete.c, imap4d/imap4d.h,
46447          imap4d/list.c, imap4d/rename.c, imap4d/select.c,
46448          imap4d/status.c, imap4d/namespace.c (added):
46449		implemented NAMESPACE (rfc2342) support
46450
46451	* imap4d/util.c:
46452		added util_normalize_path() function.
46453		util_msgset() bailed out at 1:1 -- fixed.
46454		Added util_parse_internal_date(), util_parse_header_date(),
46455		util_parse_rfc822_date().
46456
46457	* imap4d/bye.c: typo in diagnostic output
46458	* imap4d/noop.c: issue unsolicited response (as per rfc2060)
46459	* imap4d/select.c: ditto
46460	* imap4d/store.c: set MU_ATTRIBUTE_MODIFIED on a message, so
46461		expunge will know it was modified.
46462
46463	* imap4d/search.c: implemented. Charsets other than US-ASCII are
46464		not supported, though.
46465
464662001-05-27  Sam Roberts
46467
46468	* mailbox/address.c: removed unfolding of lines at a NL before parsing.
46469	* mailbox/parse822.c: consider LF and CRLF equivalent for purposes
46470	of unfolding lines.
46471
464722001-05-23  Alain Magloire
46473
46474	* mailbox/mbx_default.c (mailbox_create_default): Check
46475	for URL in the mailbox name.
46476
464772001-05-23  Dave Inglis
46478
46479	* mailbox/mime.c (_mimepart_body_read): Use stream_is_seekable()
46480	to detect if the stream is POP for example and read 'til the end.
46481	(mime_get_part): Reuse the stream the original stream flags on the
46482	newly created message.
46483	Fix and patches provided by Dave Inglis.
46484
464852001-05-23  Sergey Poznyakoff
46486
46487	* pop3d/user.c: check for NULL return from getpwnam()
46488	* imap4d/login.c: Likewise.
46489
464902001-05-21  Alain Magloire
46491
46492	GNU md5 is GPL, but we agreed that the libraries should
46493	fall under LGPL.
46494	Same goes for basename() and pretty much everything under
46495	lib/*.[ch]
46496
46497	* mailbox/message.c (message_get_uidl): Remove the dependency
46498	from GNU md5.
46499	* mailbox/md5-rsa.c: New File.
46500	* mailbox/md5-rsa.h: New File.
46501	* mailbox/attachment.c (message_create_attachment): Remove
46502	the dependency from lib/basename.c
46503	* mailbox/mbx_mbox.c (mbox_tempfile): Remove
46504	the dependency from lib/basename.c
46505
46506	* lib/signame.c: Replace in favor of the well-known strsignal().
46507	* lib/strsignal.c: New file, use the mu_signame() written by
46508	Sergey.
46509
46510	* pop3d/signal.c: Use strsignal() unconditionally.
46511	* imap4d/signal.c: Use strsignal() unconditionally.
46512
46513	* configure.in: autoconf-2.50 is having difficulty parsing
46514	a long AC_CHECK_LIB, break it in two.
46515	Check for strsignal()
46516
46517	* doc/auth.texi: Bug fixes in texinfo.
46518	* doc/Makefile.am: Commented the ex-address.texi generation.
46519	* doc/ex-address.texi: New file.
46520
465212001-05-21  Alain Magloire
46522
46523	* configure.in, imap4d/signal.c, pop3d/signal.c:
46524	sys_siglist is not defined on some systems (namely, Solaris).
46525	* lib/signame.c: (added) Provide mu_signame() function to convert
46526	signal number to string representation.
46527	* lib/strtok_r.c: bugfix
46528
465292001-05-19  Alain Magloire
46530
46531	* AUTHORS: Update to reflect Sergey and Sam contributions.
46532
465332001-05-20  Sergey Poznyakoff
46534
46535	* mailbox/mbx_mboxscan.c:* Bug in mailbox/mbx_mboxscan.c made the
46536	stuff coredump upon encountering more than one subject in the header.
46537
46538	* pop3d/pop3d.c: Typo.
46539
465402001-05-19  Sam Roberts
46541
46542	* mailbox/parse822.c: parse822 is a little smarter in the way
46543	it handles CRLF.
46544
465452001-05-19  Alain Magloire
46546
46547	* mailbox/mbx_default (mailbox_create_default):  Base on a
46548	suggestion/patch by Sam Roberts to provide tilde, plus and equal
46549	(~ + = ) expansion.
46550	* mailbox/address.c: Unfold field-bodies with NL.
46551	* mailbox/parse822.c (parse822_field_body): New function.
46552	(parse822_field_name): New function.
46553
46554	* pop3d/user.c:  Use mailbox_create() now instead of
46555	mailbox_create_default.
46556	* pop3d/apop.c: Likewise.
46557
465582001-05-16  Dave Inglis
46559
46560	* mailbox/mime.c (_mime_parse_mpart): Better check for the
46561	boundary.
46562
465632001-05-14  Sergey Poznyakoff
46564
46565	* pop3d/user.c: After unsuccessful authorization frees cmd twice,
46566
465672001-05-13  Alain Magloire
46568
46569	* imap4d/fetch.c:  Lots of bug fixing.  To many to enumerate.
46570	* imap4d/imap4d.h: New prototypes.
46571	* imap4d/login.c: syslog() the user.
46572	* imap4d/select.c: Remove the call to mailbox_create_default.
46573	* imap4d/util.c (util_getitem): New function.
46574	(util_send_qstring): New function.
46575	(util_send_literal): New function.
46576
46577	* mailbox/address.c:  Parse822 can not handle '\n' inside
46578	the buffer, prune them out before.
46579	* mailbox/mime.c (_mime_parse_mpart_message): The mime->stream
46580	was destroy when doing mime_get_part () better get it every time.
46581	(_mime_body_fd): Likewise.
46582	* mailbox/smtp.c: Do not close the stream on destroy.
46583
465842001-05-11  Alain Magloire
46585
46586	* imap4d/fetch.c: More cleanup in the bodystructure code,
46587	arrange response indentation etc ...
46588	* impa4d/utils.c (util_send_string): New helper function.
46589
465902001-05-10  Alain Magloire
46591
46592	* imap4d/fetch.c: Implemented INTERNALDATE.
46593	* mailbox/mbx_imap.c (imap_envelope_date): ctime() always
46594	append a newline, nuke it.
46595	* mailbox/stream.c (stream_read): If the amount requested is bigger
46596	then the buffer cache size, bypass the buffering mechanism.
46597
465982001-05-09  Alain Magloire
46599
46600	Take the missing pieces from the pop3d and make the
46601	imap4d a standalone daemon.
46602
46603	* imap4d/fetch.c: Remove fetch_body_peek().
46604	and use fetch_body() instead.
46605	(fetch_operation): Malloc the entire message... not good.
46606	* imap4d/bye.c: New file.
46607	* imap4d/imap4d.c: Put the networking code taken from
46608	pop3d.c.
46609	* imap4d/lsub.c: Implemented.
46610	* imap4d/subscribe.c: Implemented.
46611	* imap4d/unsubscribe.c: Implemented.
46612
46613	* pop3d/pop3d.c: pop3d_usage() move from extra.c
46614	* pop3d/signal.c: pop3d_signal () move from extra.c
46615
46616	* mailbox/url_imap.c: It was not checking for the port number.
46617	* mailbox/filter_rfc822.c: Check for the lines if available.
46618
466192001-05-07  Alain Magloire
46620
46621	Now we can have multiple access to the mailbox and the server
46622	will update the mailbox and send the unsolicited responses.
46623	This is implemented in imap4d/sync.c.
46624
46625	* imap4d/copy.c: Move the code into imap4d_copy0() to allow
46626	the use of UID COPY.
46627	(imaprd_copy0): New function.
46628	* imap4d/fetch.c: Define a new structure command for FETCH.
46629	(fetch_getcommand): New function.
46630	(imap4d_fetch0): New function to allow the use of UID COPY.
46631	(fetch_envelope0): New function to permit to reuse the function
46632	in bodystructure.
46633	(fetch_bodystructure): Implemented.
46634	(fetch_bodystructure0): The implementation.
46635	(bodystructure): The helper function for fetch_bodystructure.
46636	* imap4d/imap4d.c (imap4d_mainloop): call imap4d_sync() in the
46637	mainloop.  Now use FILE *ifile.
46638	* imap4d/imap4d.h: Update prototypes.  Define ERR_NO_MEM and
46639	ERR_NO_OFILE.
46640	* imap4d/select.c (imap4d_select0): Call imap4d_sync() to update.
46641	* imap4d/store.c (ima4d_store): Cal imap4d_sync_flags() to
46642	update the flags in the uid_table.
46643	* imap4d/uid.c: Implemented.
46644	* imap4d/util.c (imap4d_readline):  Use fgets() and deal
46645	with literals send from the client.
46646	* imap4d/sync.c: New file.
46647
46648	* include/mailutils/header.c: Added some new headers.
46649	* mailbox/attribute.c (attribute_copy): Do a shallow copy.
46650	* mailbox/file_stream.c: Check if FILE * is null in all functions.
46651	* mailbox/mailbox.c (mailbox_is_updated): Should not return ENOSYS
46652	but rather 1.
46653
466542001-05-07  Sam Roberts
46655
46656	* mailbox/parse822.c: Now allow a unix mailbox in an address.
46657	* include/mailutils/parse822.h: Declare the function to parse them.
46658	* doc/address.texi: Document the fact.
46659	* doc/Makefile.am: Automatically build the example code from addr.c.
46660	* examples/addr.c: And update the parser test.
46661	* examples/Addrs.good: Update the parser test.
46662
466632001-05-03  Sam Roberts
46664
46665	* mail/mail.c: Typo
46666
466672001-05-03  Alain Magloire
46668
46669	* argp/argp-help.c (hol_entry_help): Some compiler like Watcomm
46670	can not initialize a local structure struct ..  = { .. }.  Do it
46671	explicitly field by field.
46672	* argp/arpg-parse.c: Watcomm choke on N_() macro.
46673	(parser_init): Watcomm does not like operation on a void * pointer.
46674
46675	* imap4d/login.c: Cast the return of crypt(), since some platforms
46676	do not provide a prototype in <unistd.h>
46677
46678	* pop3d/user.c: Cast the return of crypt(), since in may not be
46679	declare in <unistd.h>.
46680
46681	* lib/snprintf.c: Use only __STDC__ to detect <stdarg.h>
46682	* lib/snprintf.h: Use only __STDC__.
46683
46684	* mail/mail.h: The global variable should be declare extern.
46685	* mail/pipe.c: Use 512 buffer instead of BUFSIZ, go easy on the stack.
46686	* mail/print.c: Use 512 buffer instead of BUFSIZ, go easy on the stack.
46687	* mail/write.c: Use 512 buffer instead of BUFSIZ, go easy on the stack.
46688
46689	* mailbox/folder_imap.c: Declare strtock_r ().
46690
466912001-05-03  Sergey Poznyakoff
46692
46693	* pop3d/user.c: Misplace parentheses around the mailbox_xx() calls.
46694	Do not free (buf) since it is now static storage. Unfortunately most
46695	of the pam modules do openlog() on their own, thus after
46696	authentication all logging output flows to where the last pam module
46697	has directed it, which is usually `auth' facility.
46698	Put back closelog()/openlog().
46699	* pop3d/pop3d.h: ifile is now FILE *.
46700	pop3d_realine () take FILE * as a prototype.
46701	* pop3d/pop3d.c (pop3d_mainloop): Refresh lock, pop3d_touchlock().
46702	Register SIGALRM in the child.
46703	Do not free (buf) since it is now static storage.
46704	* pop3d/extra.c (pop3d_readline): Change to use
46705	fgets () and alarm ().
46706	With small modification from Alain.
46707	(pop3d_signal): ofile will be NULL in the *child* process:
46708	whereas in the parent one, ofile will always be NULL, since it lives
46709	in the BSS (FILE *ofile;) and gets initialized only in the child
46710	process. Thus, when the parent receives any signal, SIGTERM for
46711	example, it does pop3d_abquit(ERR_SIGNAL) and dies doing
46712	fprintf(ofile, ...)
46713
467142001-05-02  Alain Magloire
46715
46716	Some of the Makefile.am contain gcc specific options
46717	like -Wall, -pedantic or -ansi remove them.
46718
46719	* configure.in: Check for stdarg and sysconf.
46720	* mailbox/mime.c (_mime_set_content_type): Delayed the
46721	creation of the header-field content-type until the message
46722	is requested via mime_get_message().
46723	* pop3d/lock.: new File to implement the locking.
46724	* pop3d/apop.c: Rearrange the code around the #ifdefs
46725	to be clearrer.
46726	Make sure that when we use strncpy() that the buffer is
46727	null terminated.  Added the locking propose by Sergey to apop.
46728	* pop3d/capa.c: Announce we support PIPELINING.
46729	* pop3d/extra.c (pop3d_abquit): Remove ERR_DEAD_SOCK.
46730	Remove the extra fflush(), the call to exit()  always
46731	flush the buffers.
46732	(pop3d_readline):  Implement PIPELINING.
46733	* pop3d/pop3d.c:  Remove the typedef struct sockaddr SA
46734	for more clarity since it is not use that often.
46735	port is not longer a global variable.
46736	children should have the volatile qualification.
46737
467382001-04-29  Alain Magloire
46739
46740	* pop3d/extra.c (pop3d_readline): Modify the loop to be able
46741	to support PIPELINING.
46742	* pop3d/capa.c: Advertise that we support PIPELINING.
46743
467442001-04-29  Sergey Poznyakoff
46745
46746	Return values of all signal handlers are changed to RETSIGTYPE
46747	and configure.in is modified accordingly. This is more portable.
46748
46749	* configure.in: New Macro AC_TYPE_SIGNAL.
46750
46751	* mailbox/locker.c (locker_lock): while trying to read pid value
46752	from the pidfile passed wrong buffer length to read() call, namely:
46753	read(fd, buf, sizeof (pid_t)).
46754
467552001-04-29  Sergey Poznyakoff
46756
46757	I have modified locker.c to implement reference count. The
46758	struct _locker is now:
46759	struct _locker { int fd; int refcnt; char *fname; int flags; };
46760	The refcnt member gets incremented each time locker_lock is called and
46761	decremented each time locker_unlock is called. Actual locking is
46762	performed only if refcnt == 0 on entry to locker_lock. Similarly,
46763	unlocking is performed only when refcnt gets decremented to 0 by
46764	locker_unlock. Also I have added basic support for NFS-secure
46765	locking.
46766
46767	* mailbox/locker.c: Reference count implementation.
46768
467692001-04-25  Alain Magloire
46770
46771	* imap4d/store.c: First implementation.
46772	* mailbox/attribute.c (attribute_unset_flags): New function.
46773
467742001-04-23  Sergey Poznyakoff
46775
46776	* mailbox/mbx_mbox.c (mbx_expunge): It assumes that mbox_get_message()
46777	will place the pointer to message into mum->message member. But
46778	mbox_get_message() relies on 1-based message numbers, whereas `mum'
46779	pointer is obtained using 0-based indexing.
46780
467812001-04-23  Alain Magloire
46782
46783	Sergey Poznyakoff noted: When the user's mailbox has zero size, mmap
46784	fails on Solaris. On GNU/Linux it return NULL buf subsequent munmap
46785	fails.
46786
46787	* mailbox/mapfile_stream.c:  To take care of this, mfs->ptr is set
46788	to NULL for len == 0;
46789	*mailbox/mbx_mbox.c (mbox_is_updated): Should I have return 0 (FALSE)
46790	when size change.
46791
467922001-04-23  Sergey Poznyakoff
46793
46794	Several sources from mailbox subdirectory call fprintf(stderr,...)
46795	to issue error messages. As the stderr usually gets connected to
46796	the output socket, the client program receives all these error
46797	messages and gets confused, since they do not start with
46798	rfc-compliant +OK, -ERR keywords. So I have added a module
46799	error.c and changed all these fprintf's to error()'s. Actual
46800	function that ouputs the messages can be supplied by the
46801	application using error_set_print() call.
46802
468032001-04-23  Alain Magloire
46804
46805	* pop3d/*.[ch]:  Rename all the pop function pop3d_xx()
46806	instead of pop3_xx() to be consistent with imap4d/*.
46807
46808	* mailbox/mbx_pop.c (pop_user): This is sudden death; for many pop
46809	servers, it is important to let them time to remove locks or move
46810	the .user.pop files.  This happen when we do BUSY_CHECK().  For
46811	example, the user does not want to read the entire file, and wants
46812	start to read a new message, closing the connection and immediately
46813	contact the server again, and we'll end up having
46814	"-ERR Mail Lock busy" or something similar. To prevent this race
46815	condition we sleep 2 seconds.
46816
468172001-04-23  Sergey Poznyakoff
46818
46819	It is often convenient to separate log outputs from POP and SMTP
46820	servers. --with-log-facility flag which allows to specify to which
46821	log facility the logging output should be directed.
46822	System administrators often prefer to have more information about
46823	unsuccessful authentications. I have added more verbose logging
46824	to pop3d/user.c. Both failed attempts and possible account probes
46825	(USER immediately followed by QUIT) are logged.
46826	Made pop3d to be less verbose about its WELCOME prompt. When the
46827	symbol TERSE_MODE is defined, pop3d introduces itself just as
46828	+OK POP3 ready <apop_hash>
46829	instead of divulging its type and version. This is a bit paranoid,
46830	but it is better to be on the safe side...
46831
46832	* configure.in: ARGPINC gets assigned a relative path, due
46833	to which the compilation fails if the package is configure with
46834	--srdir=<path> option.
46835	* configure.in: --with-log-facility new option.
46836	* acconfig.h: LOG_FACILITY
46837
46838	* doc/mailutils.texi: Typo.
46839
46840	* mailbox/mapfile_stream.c: Define MAP_FAILED.
46841
46842	* pop3d/extra.c (pop3_abquit): new case ERR_MBOX_SYNC.
46843	(pop3_signal): Syslog the reason.
46844	* pop3d/pop3d.c (pop_mainloop): Syslog the hostname of
46845	the user on connect.
46846	(pop3_daemon): Log to many children.  Lacks call to exit(), so if
46847	pop3d is run as a daemon, any child after exiting from
46848	pop3_mainloop  tries to accept() from already closed socket
46849	and issues spurious error messages.
46850	(pop3_mainloop):  Check if the mailbox is uptodate if not
46851	and the size shrink, bail out.  Do not send version number.
46852	* pop3d/pop3d.h: ERR_MBOX_SYNC define. WELCOME removed.
46853	* pop3d/signal (pop3_sigchld): Lacks signal() call, due to which
46854	the signal handler gets cleared after first SIGCHLD and all
46855	subsequent children, when finished, just hang around like zombies.
46856	* pop3d/user.c: Log to LOG_FACILITY all the errors.
46857
468582001-04-23  Alain Magloire
46859
46860	Sergey Poznyakoff pointed out that errno changes depending
46861	if _REENTRANT is set or not.  So for enable thread we take
46862	the approach of always defining _REENTRANT.
46863	He also noted that when in standalone the child was not exiting.
46864
46865	* acconfig.h: Define _REENTRANT.
46866	* configure.in: Check for sigaction().
46867	* configuire.in: AC_DEFINE(_REENTRANT).
46868
46869	* doc/Makefile.am: add rfc2060-errata.
46870	* doc/rfc2060-errata: New File.
46871
46872	* imap4d/copy.c: First Implementation.
46873	* imap4d/status.c: First implementation.
46874
46875	* mailbox/file_stream.c (_file_open): For CREAT, close
46876	the fd if we failed.
46877	* mailbox/folder_imap.c: Remove the _REENTRANT.
46878	* mailbox/mbx_mbox.c: Remove the _REENTRANT.
46879	* mailbox/monitor.c: Remove the _REENTRANT.
46880
46881	* pop3d/pop3d.c (main): maxchildren boosted to 20.
46882	(pop3_daemon_init): Use sigaction() for SIGCHLD,
46883	the semantics of signal() is unreliable on some platforms.
46884	* pop3d/signal.c: Save errno.
46885
468862001-04-22  Alain Magloire
46887
46888	* imap4d/create.c: First implementation.
46889	* imap4d/delete.c: First implementation.
46890	* imap4d/list.c: First implementation.
46891	* imap4d/rename.c: First implementation.
46892	* imap4d/util.c: New functions.
46893	(util_tilde_expansion): expand ~.
46894	(util_unquote): Remove surrounding double quotes.
46895	(util_getfullpath): Expand the path to absolute.
46896	* imap4d/fetch.c:  Did not cycle through the items.
46897	(fetch_send_address): Patch from Sam Roberts, did not
46898	use the index.
46899
46900	* mailbox/attachement.c (message_unencapsulate): Little buglet
46901	strncasemp() passing the wrong size.
46902
469032001-04-19  Alain Magloire
46904
46905	* mailbox/smtp.c(smtp_readline): Because of the buffering mechanism,
46906	we must maintain the offset.
46907
46908	* imap4d/list.c: partially implemented the LIST command.
46909	* imap4d/imap4d.c: homedir new global variable.
46910	* imap4d/login.c: same ${HOME} in homedir.
46911	* imap4d/util.c (util_getword): Be aware of the quotes.
46912
46913	* lib/fnmatch.c: New replacement file.
46914	* lib/fnmatch.h: New replacement file.
46915	* configure.in: Check for fnmatch().
46916
469172001-04-18  Alain Magloire
46918
46919	Finally took time to put the code in from Jakob first draft, in
46920	an email excerpt:
46921	states is the valid states for a command (eg. LOGIN is only valid in
46922	non-authenticated state, SELECT is valid in authenticated or
46923	selected). success is the state to enter when the command completes
46924	successfully (STATE_NONE means no change) and failure is the state to
46925	enter when the command fails.
46926
46927	* imap4d/*.c:  All the commands check there state.
46928	* imap4d/fetch.c: Cleanup the fetch code, and broke
46929	the fetch_operation() routine in multiple routines.
46930	(fetch_message): New function.
46931	(fetch_header): Likewise
46932	(fetch_content): Likewise
46933	(fetch_io): Likewise
46934	(fetch_header_fields): Likewise
46935	(fetch_header_fields_not): Likewise
46936	(fetch_send_address): Likewise
46937
46938	* mailbox/header.c: Some functions were useful while
46939	programming the imap server, put them here.
46940	(header_aget_value): New function.
46941	(header_aget_field_name): New function.
46942	(header_aget_field_value): New function.
46943
46944	* mailbox/memory_stream.c: New file, implemented a
46945	malloc() buffer that you can access via the stream interface.
46946	* mailbox/file_stream.c: Remove spurious checks.
46947	* mailbox/mapfile_stream.c: Remove spurious checks.
46948	(_mapfile_read): check if there is no newline left.
46949
469502001-04-16  Alain Magloire
46951
46952	To get things to compile on Solaris, change configure to check
46953	for -lpthread since in libc the thread functions are defined
46954	but all return ENOSYS, you need to explicitly link with -lphtread.
46955	the ctype functions is*() arguments should be explicitly cast
46956	since Solaris use them as indexes.  __REENTRANT as to be define
46957	if compile with support for threads.  Never realize this but
46958	setenv() is a BSD/GNU thing, so took a variant from libiberty
46959	to cope.
46960
46961	* configure.in: Check for setenv. First check if -lphtread is ok.
46962	* lib/setenv.c: New functions.
46963	* lib/Makefile.am: add setenv.c in EXTRA_DIST.
46964	* imap4d/imap4d.h: Include <alloca.h>
46965	* mailbox/attachment.c: Include <alloca.h>
46966	* (_header_get_param): isspace() cast argument.
46967	* mail/mail.h: check if <paths.h> is available if not
46968	define _PATH_SENDMAIL=/usr/lib/sendmail.
46969	* mailbox/folder_imap.c: if pthread available, define _REENTRANT.
46970	Include <alloca.h>.
46971	(imap_bodystructure0): isdigit() cast argument.
46972	* mailbox/mbx_mbox.c: if pthread available, define _REENTRANT.
46973	Include <alloca.h>.
46974	* mailbox/parse822.c: isdigit() cast argument unsigned.
46975
469762001-04-15  Alain Magloire
46977
46978	The FILE* stream "stdout" is not an lvalue so it is an error to
46979	attempt to assign to it.  To be able to redirect at will stdout
46980	we need to assign it.  In GNU lib C, it was not error since stdout
46981	stderr, and stdin are variables, but to be portable we can not
46982	assume this.  The way out is to always use fprintf () and have
46983	a global variable "ofile" pointing to stdout.
46984
46985	* mail/*: All the files under mail been change to use fprintf()
46986	and ofile as the default stdout.
46987	Copyright updated.
46988
469892001-04-15  Alain Magloire
46990
46991	Create a argp directory, it contains the necessary
46992	files to build a standalone libargp.a
46993
46994	* argp: New directory.
46995	argp-ba.c, argp-eexst.c, argp-fmtstream.c, argp-fmtstream.h
46996	argp-fs-xinl.c, argp-help.c, argp-namefrob.h, argp-parse.c
46997	argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, pin.c.
46998
46999	* mail/mail.c:  Comment out the code that use readline
47000	specifics WITH_READLINE.
47001	* mail/mail.h: Likewise.
47002	* mail/util.c: Likewise.
47003
470042001-04-15  Alain Magloire
47005
47006	* Makefile.am: Add argp in the list of subdirs.
47007	* configure.am:  Check for argp.h and look for
47008	argp_parse().
47009	* lib/strchrnul.c: New function.
47010	* lib/strndup.c: New function.
47011	* lib/strnlen.c: New function.
47012	* lib/vasnprintf.c: New function.
47013	* lib/getopt.c: Updated.
47014	* lib/getopt1.c: Updated.
47015	* lib/getopt.h: Updated.
47016	* frm/Makefile.am: Remove -DTESTING in CFLAGS.
47017	* from/Makefile.am: Remove -DTESTING in CFLAGS.
47018	Add AUTOMAKE_OPTIONS.
47019	* imapd/Makefile.am: Likewise.
47020	* pop3d/Makefile.am: Likewise.
47021	* mail/Makefile.am: Likewise. Added ARGPLIB macro
47022
470232001-04-14  Sam Roberts
47024	* examples/{Makefile,Addrs,addr.c,Addrs.good}: address test f/w.
47025	* include/mailutils/address.h,mailbox/{address.c,parse822.c}: now
47026	  stuff a group name into an _address, and added a function to do
47027	  a quick check if it is a group.
47028	* mailbox/parse822.c: fixed bug where ",sam@foo.bar" wasn't valid.
47029
470302001-04-14  Alain Magloire
47031
47032	* mailbox/folder_imap.c: When calling imap_writeline () the
47033	cookie for the tag should be unsigned %d --> %u.
47034	(imap_send) : The number of bytes in memmove was wrong.
47035	* mailbox/mbx_imap.c: Some duplicate debug calls MAILBOX_DEBUG0()
47036	removed.
47037	(attribute_string): IMAP does not have a \\Read flag it should be
47038	the same as \\Seen so attribute_read() == attribute_seen().
47039	(flag_string): New function.
47040	(imap_attr_set_flags): Use flag_string(), instead.
47041	* mailbox/include/imap0.h:  CLEAR_STATE() should also deselect
47042	the current mailbox.
47043
47044	* mailbox/mbx_pop.c (pop_write): The number of bytes in the memmove
47045	was wrong.
47046
47047	* imap4d/imap4d.h: Add HAVE_SECURITY_PAM_APPL_H.
47048	* imap4d/login.c: PAM_ERROR wrongly define.
47049	* imap4d/expunge.c: Initialize variable sp.
47050	* imap4d/logout.c: Initialize variable sp.
47051	* imap4d/noop.c: Initialize variable sp.
47052
47053	* mailbox/attachement.c (message_create_attachment): Use base_name().
47054	* mailbox/mbx_mbox.c (mbox_tmpfile): Use base_name().
47055	* configure.in: AC_REP_FUNC(vasprintf strcasecmp strncasecmp).
47056	* include/mailutils/Makefile.am: Add property.h, parse822.h.
47057	* lib/vasprintf.c: Taken from libit.
47058	* lib/basename.c: Taken from libit/fileutils.
47059	* lib/Makefile.am.c: Always use our basename(base_name).
47060	(AM_INIT_AUTOMAKE): Change version to 0.0.9
47061
470622001-04-13  Sam Roberts
47063
47064	QNX needed to include <strings.h> for many of the useful string
47065	functions also to define _QNX_SOURCE so <sys/time.h> doesn't have
47066	an internal warning.
47067
47068	* configure.in: Check for libgen.h.
47069	* imap4d/imap4d.h: Define __QNX_SOURCE.
47070	* mailbox/mime.c: wasn't including config.h
47071	* mailbox/attachment.c: QNX needed libgen.h for basename(),
47072	include <strings.h> if define.
47073	* mailbox/filter.c: Include <strings.h>.
47074	* mailbox/mbx_mbox.c: Include <strings.h>.
47075	* mailbox/folder_imap.c: Include <strings.h>.
47076	* mailbox/header.c: Include <strings.h>.
47077	* mailbox/property.c: Include <strings.h>.
47078	* mailbox/registrar.c: Include <strings.h>.
47079	* mailbox/url.c: Include <strings.h>.
47080	* mailbox/url_pop.c: Include <strings.h>.
47081	* pop3d/user.c: QNX says getspnam(char* n), I cast away the error.
47082
470832001-04-13  Sam Roberts
47084
47085	* mailbox/parse822.c, include/mailutils/parse822.h: now can
47086	  quote the local-part of and addr-spec, and a string.
47087
470882001-04-13  Sam Roberts
47089
47090	* doc/address.texi: updated docs, now they match the parse822.
47091	* mailbox/parse822.c: small tweaks to the new parser, the changes
47092	  made during the tidying over the last month were:
47093	  - use C comments only.
47094	  - don't use C++ reserved words.
47095	  - fix is_digit() to be like the other is functions
47096	  - Changed return codes to:
47097	   . no mem (ENOMEM)
47098	   . function wasn't called correctly, usually a missing
47099	     argument (EINVAL)
47100	   . invalid syntax found during parsing (ENOENT)
47101	   . success == 0
47102	  - const-corrected the APIs
47103	  - removed unnecessary (in C) casts.
47104	  - mailbox_t* removed in favor of address_t.
47105	  - fix handful of memory leaks detected by Alain.
47106
471072001-04-10  Alain Magloire
47108
47109	* pop3d/retr.c (pop3_retr): Typo.
47110	* pop3d/top.c (pop3_top): No need to reallocate when sending the
47111	headers.
47112	* doc/mailbox.texi: Put the functions in alphabetic orders.
47113
471142001-04-10  Alain Magloire
47115
47116	* mailbox/Makefile.am: filter_trans.c added, trans_stream.c deleted.
47117	* mailbox/attachment.c (message_create_attachment): use
47118	filter_create().
47119	(message_save_attachment): use filter_create().
47120	* mailbox/body.c (body_set_lines): Wrong comparison for the owner.
47121	* mailbox/mbx_mbox.c: Do not count the line separator of part
47122	of the mailbox.
47123
47124	* mailbox/url.c (url_is_same_scheme): New function.
47125	(url_is_same_user): New function.
47126	(url_is_same_path): New function.
47127	(url_is_same_host): New function.
47128	(url_is_same_port): New function.
47129	* mailbox/folder.c : Moved the is_same_*() functions in url.c
47130	they can be generally useful.
47131	(is_same_scheme): Removed.
47132	(is_same_user): Removed.
47133	(is_same_path): Removed.
47134	(is_same_host): Removed.
47135	(is_same_port): Removed.
47136
47137	* mailbox/folder_imap.c (folder_imap_create): New function,
47138	CREATE a new mailbox.
47139	(folder_imap_open): Calls folder_imap_create when the MU_STREAM_CREAT
47140	flag is set.
47141	* mailbox/mbx_imap.c: Appending messages implemented, if the message
47142	comes from the same imap folder, it is COPY otherwise APPEND.
47143	(is_same_folder): New function.
47144	(imap_append_message): Implemented.
47145	(attribute_string): New functions.
47146	(imap_copy_message): New function.
47147	* mailbox/include/imap0.h: New enum, IMAP_APPEND, IMAP_APPEND_ACK,
47148	IMAP_APPEND_CONT, IMAP_APPEND_SEND, IMAP_COPY, IMAP_COPY_ACK,
47149	IMAP_CREATE, IMAP_CREATE_ACK.
47150
471512001-04-06  Alain Magloire
47152
47153	* mailbox/parse822.c: New parser.
47154	* include/mailutils/parse822.h: New file.
47155	* mailbox/address.c (address_create): Remove the old parsing and use
47156	parse822 as the underlying engine.
47157	(address_parse): Removed.
47158	(gettoken): Removed.
47159	(quotes): Removed.
47160	(address_get_personal): Remove the code to unquote, parse822 takes
47161	care if it. Return value when no field is ENOENT.
47162	(address_get_comments): Return value when no field ENOENT.
47163	(address_get_local_part): Return value when no field ENOENT.
47164	(address_get_domain): Return value when no field ENOENT.
47165	(address_get_email): Return value when no field ENOENT.
47166	(address_get_route): Return value when no field ENOENT.
47167	* mailbox/message.c (message_sender): Use parse822 to retrieve
47168	the email from the From: field.
47169	(message_set_mailbox): New function.
47170	* mailbox/misc.c : Removed the old parsing code.
47171	(gettoken): Removed.
47172	(parseaddr): Removed.
47173	* mailbox/include/misc.h : Removed parseaddr() prototypes.
47174	From Sam Roberts, the new parse822 parser..
47175
471762001-04-04  Alain Magloire
47177
47178	Introduction of the notion of filter_t object takes a stream and
47179	perform some filtering on it.  All the decoding streams will move
47180	to this i.e. quoted-printable, base64 etc .. This scheme will also
47181	permit users to add to the list new filters.  Still work in progress.
47182
47183	* mailbox/Makefile.am : Add filter.c filter_rfc822.c.
47184	* mailbox/body.c : When creating a floating body i.e creating
47185	a temporary file, the stream was not "own" by the body_t.
47186	(_body_get_fd): Likewise.
47187	(_body_read):_ Likewise.
47188	(_body_readline): Likewise.
47189	(_body_write): Likewise.
47190	(_body_truncate): Likewise.
47191	(_body_size): Likewise.
47192	(_body_flush): Likewise.
47193
47194	* mailbox/folder_imap.c (imap_literal_string): Check if the
47195	callback.buffer is NULL.
47196	(imap_body): Do no set the callback.type if "FIELDS" is part of the
47197	string.
47198
47199	* mailbox/header.c: Remove the support for RFC822 it will be part
47200	of the filter_t object.
47201	* mailbox/mbx_mbox.c: Likewise.
47202	* mailbox/mailbox.c (mailbox_size): Rename to mailbox_get_size().
47203
47204	* mailbox/stream.c (stream_is_seekable): New function.
47205	(stream_set_property): New function.
47206	(stream_get_property): New function.
47207
47208	* mailbox/trans_stream.c: Beautify.
47209
47210	* include/mailutils/filter.h: new file.
47211
47212	* doc/mailbox.texi: Updated.
47213	More changes to come.
47214
472152001-03-20  Alain Magloire
47216
47217	* mailbox/folder_imap.c (imap_readline) :  If the server goes away
47218	suddenly return an error.
47219	* mailbox/smtp.c (smtp_readline) :  If the server goes away
47220	suddenly return an error.
47221	* mailbox/mbx_pop.c (pop_readline) :  If the server goes away suddenly
47222	return an error.
47223	* mailbox/mbx_pop.c (pop_open) : The ticket comes from the folder.
47224
472252001-03-17  Vesselin Atanasov
47226
47227	* configure.in: AC_REQUIRE is not .. required.  Just call
47228	jm_FUNC_MALLOC and jm_FUNC_REALLOC.
47229
472302001-03-17  Alain Magloire
47231
47232	Clean the property object, mailbox and mailer have property object
47233	that you can examine.  Still a draft: the value of objects are ints.
47234	This feature was put in to help the imap4d server, in this protocol
47235	you can get a substring of the message starting from a certain offset.
47236	To make the coding of imap4d simpler the complexity was move to the
47237
47238	* mailbox/smtp.c(smtp_readline): Because of the buffering mechanism,
47239	we must maintain the offset.
47240
47241	* imap4d/list.c: partially implemented the LIST command.
47242	* imap4d/imap4d.c: homedir new global variable.
47243	* imap4d/login.c: same ${HOME} in homedir.
47244	* imap4d/util.c (util_getword): Be aware of the quotes.
47245
47246	* lib/fnmatch.c: New replacement file.
47247	* lib/fnmatch.h: New replacement file.
47248	* configure.in: Check for fnmatch().
47249
472502001-04-18  Alain Magloire
47251
47252	Finally took time to put the code in from Jakob first draft, in
47253	an email excerpt:
47254	states is the valid states for a command (eg. LOGIN is only valid in
47255	non-authenticated state, SELECT is valid in authenticated or
47256	selected). success is the state to enter when the command completes
47257	successfully (STATE_NONE means no change) and failure is the state to
47258	enter when the command fails.
47259
47260	* imap4d/*.c:  All the commands check there state.
47261	* imap4d/fetch.c: Cleanup the fetch code, and broke
47262	the fetch_operation() routine in multiple routines.
47263	(fetch_message): New function.
47264	(fetch_header): Likewise
47265	(fetch_content): Likewise
47266	(fetch_io): Likewise
47267	(fetch_header_fields): Likewise
47268	(fetch_header_fields_not): Likewise
47269	(fetch_send_address): Likewise
47270
47271	* mailbox/header.c: Some functions were useful while
47272	programming the imap server, put them here.
47273	(header_aget_value): New function.
47274	(header_aget_field_name): New function.
47275	(header_aget_field_value): New function.
47276
47277	* mailbox/memory_stream.c: New file, implemented a
47278	malloc() buffer that you can access via the stream interface.
47279	* mailbox/file_stream.c: Remove spurious checks.
47280	* mailbox/mapfile_stream.c: Remove spurious checks.
47281	(_mapfile_read): check if there is no newline left.
47282
472832001-04-16  Alain Magloire
47284
47285	To get things to compile on Solaris, change configure to check
47286	for -lpthread since in libc the thread functions are defined
47287	but all return ENOSYS, you need to explicitly link with -lphtread.
47288	the ctype functions is*() arguments should be explicitly cast
47289	since Solaris use them as indexes.  __REENTRANT as to be define
47290	if compile with support for threads.  Never realize this but
47291	setenv() is a BSD/GNU thing, so took a variant from libiberty
47292	to cope.
47293
47294	* configure.in: Check for setenv. First check if -lphtread is ok.
47295	* lib/setenv.c: New functions.
47296	* lib/Makefile.am: add setenv.c in EXTRA_DIST.
47297	* imap4d/imap4d.h: Include <alloca.h>
47298	* mailbox/attachment.c: Include <alloca.h>
47299	* (_header_get_param): isspace() cast argument.
47300	* mail/mail.h: check if <paths.h> is available if not
47301	define _PATH_SENDMAIL=/usr/lib/sendmail.
47302	* mailbox/folder_imap.c: if pthread available, define _REENTRANT.
47303	Include <alloca.h>.
47304	(imap_bodystructure0): isdigit() cast argument.
47305	* mailbox/mbx_mbox.c: if pthread available, define _REENTRANT.
47306	Include <alloca.h>.
47307	* mailbox/parse822.c: isdigit() cast argument unsigned.
47308
473092001-04-15  Alain Magloire
47310
47311	The FILE* stream "stdout" is not an lvalue so it is an error to
47312	attempt to assign to it.  To be able to redirect at will stdout
47313	we need to assign it.  In GNU lib C, it was not error since stdout
47314	stderr, and stdin are variables, but to be portable we can not
47315	assume this.  The way out is to always use fprintf () and have
47316	a global varialbe "ofile" pointing to stdout.
47317
47318	* mail/*: All the files under mail been change to use fprintf()
47319	and ofile as the default stdout.
47320	Copyright updated.
47321
473222001-04-15  Alain Magloire
47323
47324	Create a argp directory, it contains the necessary
47325	files to build a standalone libargp.a
47326
47327	* argp: New directory.
47328	argp-ba.c, argp-eexst.c, argp-fmtstream.c, argp-fmtstream.h
47329	argp-fs-xinl.c, argp-help.c, argp-namefrob.h, argp-parse.c
47330	argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, pin.c.
47331
47332	* mail/mail.c:  Comment out the code that use readline
47333	specifics WITH_READLINE.
47334	* mail/mail.h: Likewise.
47335	* mail/util.c: Likewise.
47336
473372001-04-15  Alain Magloire
47338
47339	* Makefile.am: Add argp in the list of subdirs.
47340	* configure.am:  Check for argp.h and look for
47341	argp_parse().
47342	* lib/strchrnul.c: New function.
47343	* lib/strndup.c: New function.
47344	* lib/strnlen.c: New function.
47345	* lib/vasnprintf.c: New function.
47346	* lib/getopt.c: Updated.
47347	* lib/getopt1.c: Updated.
47348	* lib/getopt.h: Updated.
47349	* frm/Makefile.am: Remove -DTESTING in CFLAGS.
47350	* from/Makefile.am: Remove -DTESTING in CFLAGS.
47351	Add AUTOMAKE_OPTIONS.
47352	* imapd/Makefile.am: Likewise.
47353	* pop3d/Makefile.am: Likewise.
47354	* mail/Makefile.am: Likewise. Added ARGPLIB macro
47355
473562001-04-14  Sam Roberts
47357	* examples/{Makefile,Addrs,addr.c,Addrs.good}: address test f/w.
47358	* include/mailutils/address.h,mailbox/{address.c,parse822.c}: now
47359	  stuff a group name into an _address, and added a function to do
47360	  a quick check if it is a group.
47361	* mailbox/parse822.c: fixed bug where ",sam@foo.bar" wasn't valid.
47362
473632001-04-14  Alain Magloire
47364
47365	* mailbox/folder_imap.c: When calling imap_writeline () the
47366	cookie for the tag should be unsigned %d --> %u.
47367	(imap_send) : The number of bytes in memmove was wrong.
47368	* mailbox/mbx_imap.c: Some duplicate debug calls MAILBOX_DEBUG0()
47369	removed.
47370	(attribute_string): IMAP does not have a \\Read flag it should be
47371	the same as \\Seen so attribute_read() == attribute_seen().
47372	(flag_string): New function.
47373	(imap_attr_set_flags): Use flag_string(), instead.
47374	* mailbox/include/imap0.h:  CLEAR_STATE() should also deselect
47375	the current mailbox.
47376
47377	* mailbox/mbx_pop.c (pop_write): The number of bytes in the memmove
47378	was wrong.
47379
47380	* imap4d/imap4d.h: Add HAVE_SECURITY_PAM_APPL_H.
47381	* imap4d/login.c: PAM_ERROR wrongly define.
47382	* imap4d/expunge.c: Initialize variable sp.
47383	* imap4d/logout.c: Initialize variable sp.
47384	* imap4d/noop.c: Initialize variable sp.
47385
47386	* mailbox/attachement.c (message_create_attachment): Use base_name().
47387	* mailbox/mbx_mbox.c (mbox_tmpfile): Use base_name().
47388	* configure.in: AC_REP_FUNC(vasprintf strcasecmp strncasecmp).
47389	* include/mailutils/Makefile.am: Add property.h, parse822.h.
47390	* lib/vasprintf.c: Taken from libit.
47391	* lib/basename.c: Taken from libit/fileutils.
47392	* lib/Makefile.am.c: Always use our basename(base_name).
47393	(AM_INIT_AUTOMAKE): Change version to 0.0.9
47394
473952001-04-13  Sam Roberts
47396
47397	QNX needed to include <strings.h> for many of the useful string
47398	functions also to define _QNX_SOURCE so <sys/time.h> doesn't have
47399	an internal warning.
47400
47401	* configure.in: Check for libgen.h.
47402	* imap4d/imap4d.h: Define __QNX_SOURCE.
47403	* mailbox/mime.c: wasn't including config.h
47404	* mailbox/attachment.c: QNX needed libgen.h for basename(),
47405	include <strings.h> if define.
47406	* mailbox/filter.c: Include <strings.h>.
47407	* mailbox/mbx_mbox.c: Include <strings.h>.
47408	* mailbox/folder_imap.c: Include <strings.h>.
47409	* mailbox/header.c: Include <strings.h>.
47410	* mailbox/property.c: Include <strings.h>.
47411	* mailbox/registrar.c: Include <strings.h>.
47412	* mailbox/url.c: Include <strings.h>.
47413	* mailbox/url_pop.c: Include <strings.h>.
47414	* pop3d/user.c: QNX says getspnam(char* n), I cast away the error.
47415
474162001-04-13  Sam Roberts
47417
47418	* mailbox/parse822.c, include/mailutils/parse822.h: now can
47419	  quote the local-part of and addr-spec, and a string.
47420
474212001-04-13  Sam Roberts
47422
47423	* doc/address.texi: updated docs, now they match the parse822.
47424	* mailbox/parse822.c: small tweaks to the new parser, the changes
47425	  made during the tidying over the last month were:
47426	  - use C comments only.
47427	  - don't use C++ reserved words.
47428	  - fix is_digit() to be like the other is functions
47429	  - Changed return codes to:
47430	   . no mem (ENOMEM)
47431	   . function wasn't called correctly, usually a missing
47432	     argument (EINVAL)
47433	   . invalid syntax found during parsing (ENOENT)
47434	   . success == 0
47435	  - const-corrected the APIs
47436	  - removed unnecessary (in C) casts.
47437	  - mailbox_t* removed in favor of address_t.
47438	  - fix handful of memory leaks detected by Alain.
47439
474402001-04-10  Alain Magloire
47441
47442	* pop3d/retr.c (pop3_retr): Typo.
47443	* pop3d/top.c (pop3_top): No need to reallocate when sending the
47444	headers.
47445	* doc/mailbox.texi: Put the functions in alphabetic orders.
47446
474472001-04-10  Alain Magloire
47448
47449	* mailbox/Makefile.am: filter_trans.c added, trans_stream.c deleted.
47450	* mailbox/attachment.c (message_create_attachment): use
47451	filter_create().
47452	(message_save_attachment): use filter_create().
47453	* mailbox/body.c (body_set_lines): Wrong comparison for the owner.
47454	* mailbox/mbx_mbox.c: Do not count the line separator of part
47455	of the mailbox.
47456
47457	* mailbox/url.c (url_is_same_scheme): New function.
47458	(url_is_same_user): New function.
47459	(url_is_same_path): New function.
47460	(url_is_same_host): New function.
47461	(url_is_same_port): New function.
47462	* mailbox/folder.c : Moved the is_same_*() functions in url.c
47463	they can be generally useful.
47464	(is_same_scheme): Removed.
47465	(is_same_user): Removed.
47466	(is_same_path): Removed.
47467	(is_same_host): Removed.
47468	(is_same_port): Removed.
47469
47470	* mailbox/folder_imap.c (folder_imap_create): New function,
47471	CREATE a new mailbox.
47472	(folder_imap_open): Calls folder_imap_create when the MU_STREAM_CREAT
47473	flag is set.
47474	* mailbox/mbx_imap.c: Appending messages implemented, if the message
47475	comes from the same imap folder, it is COPY otherwise APPEND.
47476	(is_same_folder): New function.
47477	(imap_append_message): Implemented.
47478	(attribute_string): New functions.
47479	(imap_copy_message): New function.
47480	* mailbox/include/imap0.h: New enum, IMAP_APPEND, IMAP_APPEND_ACK,
47481	IMAP_APPEND_CONT, IMAP_APPEND_SEND, IMAP_COPY, IMAP_COPY_ACK,
47482	IMAP_CREATE, IMAP_CREATE_ACK.
47483
474842001-04-06  Alain Magloire
47485
47486	* mailbox/parse822.c: New parser.
47487	* include/mailutils/parse822.h: New file.
47488	* mailbox/address.c (address_create): Remove the old parsing and use
47489	parse822 as the underlying engine.
47490	(address_parse): Removed.
47491	(gettoken): Removed.
47492	(quotes): Removed.
47493	(address_get_personal): Remove the code to unquote, parse822 takes
47494	care if it. Return value when no field is ENOENT.
47495	(address_get_comments): Return value when no field ENOENT.
47496	(address_get_local_part): Return value when no field ENOENT.
47497	(address_get_domain): Return value when no field ENOENT.
47498	(address_get_email): Return value when no field ENOENT.
47499	(address_get_route): Return value when no field ENOENT.
47500	* mailbox/message.c (message_sender): Use parse822 to retrieve
47501	the email from the From: field.
47502	(message_set_mailbox): New function.
47503	* mailbox/misc.c : Removed the old parsing code.
47504	(gettoken): Removed.
47505	(parseaddr): Removed.
47506	* mailbox/include/misc.h : Removed parseaddr() prototypes.
47507	From Sam Roberts, the new parse822 parser..
47508
475092001-04-04  Alain Magloire
47510
47511	Introduction of the notion of filter_t object takes a stream and
47512	perform some filtering on it.  All the decoding streams will move
47513	to this i.e. quoted-printable, base64 etc .. This scheme will also
47514	permit users to add to the list new filters.  Still work in progress.
47515
47516	* mailbox/Makefile.am : Add filter.c filter_rfc822.c.
47517	* mailbox/body.c : When creating a floating body i.e creating
47518	a temporary file, the stream was not "own" by the body_t.
47519	(_body_get_fd): Likewise.
47520	(_body_read):_ Likewise.
47521	(_body_readline): Likewise.
47522	(_body_write): Likewise.
47523	(_body_truncate): Likewise.
47524	(_body_size): Likewise.
47525	(_body_flush): Likewise.
47526
47527	* mailbox/folder_imap.c (imap_literal_string): Check if the
47528	callback.buffer is NULL.
47529	(imap_body): Do no set the callback.type if "FIELDS" is part of the
47530	string.
47531
47532	* mailbox/header.c: Remove the support for RFC822 it will be part
47533	of the filter_t object.
47534	* mailbox/mbx_mbox.c: Likewise.
47535	* mailbox/mailbox.c (mailbox_size): Rename to mailbox_get_size().
47536
47537	* mailbox/stream.c (stream_is_seekable): New function.
47538	(stream_set_property): New function.
47539	(stream_get_property): New function.
47540
47541	* mailbox/trans_stream.c: Beautify.
47542
47543	* include/mailutils/filter.h: new file.
47544
47545	* doc/mailbox.texi: Updated.
47546	More changes to come.
47547
475482001-03-20  Alain Magloire
47549
47550	* mailbox/folder_imap.c (imap_readline) :  If the server goes away
47551	suddenly return an error.
47552	* mailbox/smtp.c (smtp_readline) :  If the server goes away
47553	suddenly return an error.
47554	* mailbox/mbx_pop.c (pop_readline) :  If the server goes away suddenly
47555	return an error.
47556	* mailbox/mbx_pop.c (pop_open) : The ticket comes from the folder.
47557
475582001-03-17  Vesselin Atanasov
47559
47560	* configure.in: AC_REQUIRE is not .. required.  Just call
47561	jm_FUNC_MALLOC and jm_FUNC_REALLOC.
47562
475632001-03-17  Alain Magloire
47564
47565	Clean the property object, mailbox and mailer have property object
47566	that you can examine.  Still a draft: the value of objects are ints.
47567	This feature was put in to help the imap4d server, in this protocol
47568	you can get a substring of the message starting from a certain offset.
47569	To make the coding of imap4d simpler the complexity was move to the
47570	library.  It is possible now by setting a property of the mailbox
47571	to make it output rfc822 stream i.e. "\r\n" terminated stream, the
47572	offset and the size are also in term of rfc822.
47573
47574	* mailbox/property.c (property_set_int): Removed.
47575	* mailbox/property.c (property_set_long): Removed.
47576	* mailbox/property.c (property_set_double): Removed.
47577	* mailbox/property.c (property_set_set_value): Removed.
47578	* mailbox/property.c (property_set_get_value): Removed.
47579	* mailbox/property.c (property_add_property): New function.
47580	* mailbox/property.c (hash): Renamed property_hash.
47581	* include/mailutils/property.h (struct property_list): New structure.
47582
47583	* mailbox/include/mailbox0.h: new fields properties, properties_count.
47584	* mailbox/mailbox.c (mailbox_get_property): The function will create
47585	the propriety and add the default properties.
47586	(mailbox_destroy): The default properties and property are freed.
47587	(mailbox_is_updated): Return ENOSYS if the arguments are wrong.
47588	(mailbox_scan): Return ENOSYS if the arguments are wrong.
47589	(mailbox_uidvalidity): Return ENOSYS if the arguments are wrong.
47590	(mailbox_uidnext): Return ENOSYS if the arguments are wrong.
47591
47592	* mailbox/mbx_mbox.c (mbx_init): Set its default properties.
47593	(mbx_header_get_fvalue): Return the len, even if buffer is null.
47594	(mbx_body_read): If property rfc822 is set call
47595	mbx_body_readstream_rfc822 to the conversion.
47596	(mbx_body_readstream_rfc822): New function, do the conversion.
47597	(struct _mbox_message): Remove the stream field.
47598	added struct rfc822.
47599	(mbox_get_header_readstream): Removed.
47600	(mbox_header_size): Do the conversion if rfc822 set.
47601	(mbox_body_size): Do the conversion if rfc822 set.
47602	(mbox_get_message): Set the property on the header_t.
47603
47604	* mailbox/mbx_pop.c (pop_init): Set its default properties.
47605	(pop_open): Remove MU_STREAM_POP flag obsolete.
47606	(pop_readline):  Do the conversion if rfc822 is set.
47607
47608	* mailbox/mbx_imap.c (mbx_imap_init): Set its default properties.
47609	* mailbox/folder_imap.c (folder_imap_open): Remove MU_STREAM_IMAP,
47610	no longer pertinent.
47611	(imap_readline): If property rfc822 is set don't strip '\r'.
47612
47613	* mailbox/header.c (header_set_property): New functions.
47614	(header_get_property): New functions.
47615	(header_destroy): Destroy property object.
47616	(header_get_value): If property rfc822 is set
47617	convert all "\n" to "\r\n".
47618	(header_read): If property rfc822 is et convert to \n to \r\n.
47619	(header_readline): If property rfc822 is et convert to \n to \r\n.
47620	(fill_blurb): Clear the function overloading, when the blurb is fill.
47621	* mailbox/include/header0.h: New field property.
47622	* include/mailutils/header.h: Added prototypes for
47623	header_set_property and header_get_property.
47624
47625	* include/mailutils/stream.h: Remove the identification macros;
47626	MU_STREAM_IMAP, MU_STREAM_FILE, MU_STREAM_POP, it is part of the
47627	properties of each object.
47628
47629	* mailbox/mailer.c (mailer_destroy): Free the properties.
47630	* mailbox/mailer.c (mailer_get_property): New function, return the
47631	property of the mailbox.
47632
47633	* mailbox/smtp.c (_mailer_smtp_init): Set its default properties.
47634	* mailbox/sendmail.c (_sendmail_init): Set its default properties.
47635
47636	* mailbox/include/Makefile.am: Add property0.h.
47637
476382001-03-09  Sam Roberts
47639
47640	* include/mailutils/address.h: api for new parser,
47641	address_create0(), and to get route, local-part, and domain.
47642	* mailbox/address.c: implementation of 3 new get functions, first
47643	cut, needs cleanup
47644	* mailbox/include/address0.h: new members of _address, deleted
47645	one that looked unused.
47646	* mailbox/parse822.c: implementation of address_create0(),
47647	which handles groups, routes, and the hoary old comment phrase
47648	* addr/addr.c - parses addresses from its command line or
47649	stdin using create() or create0().
47650	* mailbox/mbx_imap.c: need strings.h on some systems, like Nto
47651
476522001-03-12  Sam Roberts
47653
47654	* frm/frm.c (main): Changed to only print subject if
47655	header_get_value(SUBJECT) returned success, otherwise I assume
47656	it would print the stack.
47657	(usage): Corrected a tiny typo in usage message.
47658	(long_options): Added an option -f,--field that prints the named field
47659	in the mailbox, and nothing else.
47660
476612001-03-09  Alain Magloire
47662
47663	* mailbox/Makefile.am: add property.c in the src list.
47664	* doc/mailutils.texi: add Sam to the list of acknowledgment.
47665
476662001-03-09  Sam Roberts
47667
47668	* doc/address.texi: documented all the functions in address.h
47669	* doc/url.texi: corrected location or url.h header
47670
476712001-03-08  Sam Roberts
47672
47673	* README-alpha:  Be clearer on how to configure.
47674	* doc/address.texi : New File, description of address_t object.
47675	* doc/mailutils.texi : add include address.texi.
47676
476772001-03-03  Alain Magloire
47678
47679	* imap4d/fetch.c (fetch_operation) : HEADER.FIELDS.NOT implemented.
47680	fetch_operation() take a new argument.
47681	* imap4d/util.c (util_upper) : New function string upper.
47682
47683	* mailbox/heder.c: Added new functionality to help the imap4d
47684	fetch command.
47685	(header_get_field_count) : New function returns the number of header
47686	fields in the header.
47687	(header_get_field_name): New function returns the field name.
47688	(header_get_field_value): New function returns the field value.
47689
476902001-03-03  Alain Magloire
47691
47692	* include/mailutils/address.h: s/_cplusplus/__cplusplus/g
47693	(include/mailutils/auth.h): Likewise.
47694	(include/mailutils/body.h): Likewise.
47695	(include/mailutils/debug.h): Likewise.
47696	(include/mailutils/header.h): Likewise.
47697	(include/mailutils/iterator.h): Likewise.
47698	(include/mailutils/list.h): Likewise.
47699	(include/mailutils/mailer.h): Likewise.
47700	(include/mailutils/message.h): Likewise.
47701	(include/mailutils/mime.h): Likewise.
47702	(include/mailutils/observer.h): Likewise.
47703	(include/mailutils/property.h): Likewise.
47704	(include/mailutils/registrar.h): Likewise.
47705	(mailbox/include/address0.h): Likewise.
47706	(mailbox/include/auth0.h): Likewise.
47707	(mailbox/include/body0.h): Likewise.
47708	(mailbox/include/debug0.h): Likewise.
47709	(mailbox/include/header0.h): Likewise.
47710	(mailbox/include/iterator0.h): Likewise.
47711	(mailbox/include/list0.h): Likewise.
47712	(mailbox/include/mailer0.h): Likewise.
47713	(mailbox/include/message0.h): Likewise.
47714	(mailbox/include/mime0.h): Likewise.
47715	(mailbox/include/observer0.h): Likewise.
47716	Pointed by Sam Roberts.
47717
477182001-02-28  Alain Magloire
47719
47720	* mailbox/address.c (address_get_personal): Remove surrounding quotes.
47721	* mailbox/mbx_mbox.c (mbox_scan): If the mailbox is updated don't
47722	rescan again.
47723	(mbox_expunge): Same the uidvalidity in the header field "IMABase:"
47724	on the first message of the mailbox.
47725
47726	* imap4d/fetch.c (fetch_envelope): Envelope imap4 command implemented.
47727	(fetch_send_address): New function.
47728
477292001-02-26  Alain Magloire
47730
47731	* mailbox/mbx_imap.c (imap_submessage_size): New function to
47732	retrieve message size of attachments.
47733	* imap4d/fetch.c: More functionality for the FETCH command.
47734	(fetch_operation): New operation.
47735	* imap4d/util.c (util_token): little helper function.
47736
477372001-02-25  Alain Magloire
47738
47739	* lib/strtok_r.c: If there are no delimiters left save the old string
47740	and return NULL.
47741
47742	* mailbox/folder_imap.c (imap_fetch): Finish imap FETCH command.
47743	(imap_rfc822): New Function.
47744	(imap_rfc822_text): New Function.
47745	(imap_rfc822_size): New Function.
47746	(imap_rfc822_header): New Function.
47747	(imap_uid): New Function.
47748	(imap_body): New Function.
47749	(imap_bodystructure0): Save the size.
47750
477512001-02-22  Alain Magloire
47752
47753	* mailbox/property.c: New file.
47754	* include/mailutils/property.h: New file.
47755	* mailbox/mailbox.c (mailbox_get_property): New function,
47756	a first draft to let set "property" on a mailbox that can
47757	change its behaviour.
47758	* mailbox/include/mailbox0.h: New field in struct _mailbox, property.
47759
47760	* sieve/lex-sieve.lex: Add LGPL banner.
47761	* sieve/gram-sieve.y: Add LGPL banner.
47762
477632001-02-22  Alain Magloire
47764
47765	* sieve: New Directory.
47766	* sieve/lex-sieve.lex: RFC3028 tokenizer.
47767	* sieve/gram-sieve.y: RFC3028 grammar.
47768
477692001-02-20  Alain Magloire
47770
47771	* mailbox/mailbox.c (mailbox_set_ticket): Those objects are now part
47772	of the folder if a folder is attached to the mailbox.
47773	(mailbox_set_authority: Likewise.
47774	(mailbox_set_stream): Likewise.
47775	* mailbox/mbx_imap.c (imap_message_read): If offset == 0, reset
47776	the lines to 0.
47777	(imap_body_read): Likewise.
47778
477792001-02-19  Alain Magloire
47780
47781	* mailbox/mbx_pop.c (pop_body_read): Move the CHECK_BUSY higher
47782	it should be the first thing done.  If the state is POP_NO_STATE
47783	reset the offset and the size to 0 i.e we are starting fresh.
47784	(pop_header_read): Likewise.
47785	(pop_message_read): Likewise.
47786	* mailbox/stream.c (stream_write): Don't call stream_flush().
47787
477882001-02-04  Alain Magloire
47789
47790	* mailbox/message.c (message_get_uid): Add message_get_uid() for
47791	the UID of the message (IMAP definition) and message_get_uidl() for
47792	the POP3 definition.
47793	* mailbox/attachment.c: Indentation fixes.
47794	* mailbox/file_stream.c: Make sure that the FILE* is close before		opening.
47795	* mailbox/folder_imap.c: Use strcasecmp() not strcmp().
47796	* mailbox/mailbox.c: Added mailbox_uidnext() and mailbox_uidvalidity.
47797	* mailbox/mapfile_stream.c: When munmap() failed we should check
47798	against MAP_FAILED, not NULL.
47799	* mailbox/mbx_imap.c: Implement imap_uidnext(), imap_uidvalidity()
47800	imap_message_uid().
47801	* mailbox/mbx_mbox.c: Implement mbox_uidnext(), mbox_uidvalidity()
47802	mbox_message_uid().
47803	* mailbox/mbx_mboxscan.c: Implement uidvalidity, it is save int the
47804	header of the first message, "X-IMAPbase: 127673838 12", a la c-client.
47805	Save UID, it is save in "X-UID".
47806	* mailbox/mbx_pop.c: Implement pop_messages_recent(),
47807	pop_message_unseen() and pop_uid().
47808	* mailbox/trans_stream.c: Indentation fixes.
47809
47810	* include/mailutils/message.h: New prototypes message_get_uid(),
47811	message_set_get_uid().
47812	* include/mailutils/mailbox.h: New prototypes mailbox_uidnext(),
47813	mailbox_uidvalidity().
47814
47815	* lib/snprintf.c lib/snprintf.h: Put it under the LGPL term.
47816
47817	* mailbox/imap4d/fetch.c: First draft implementation, very yucky.
47818	* mailbox/imap4d/select.c: First draft implementation.
47819	* mailbox/imap4d/util.c: Add util_msgset() and util_send().
47820	Reuse of util_getcommand() for subcommands.
47821
47822	* mailbox/pop3d/uidl.c: API change the call is message_get_uidl()
47823	to have UIDL POP3.
47824
47825
478262001-02-03  Alain Magloire
47827
47828	* mailbox/mailbox.c mailbox/mbx_mbox.c mailbox/mbx_imap.c:
47829	Implement mailbox_messages_recent() and mailbox_message_unseen(), this
47830	time as define by the IMAP rfc.
47831
478322001-02-02  Alain Magloire
47833
47834	* mailbox/header.c: ENOENT was not return if the header was
47835	not found.
47836	* mailbox/mbx_mbox.c: When expunging check to see if the registar
47837	the path_record too.
47838
478392001-02-02  Alain Magloire
47840
47841	* pop3d/extra.c (pop3_readline): Since the length of the string
47842	is known, we can use memcpy() and friends for string manipulations.
47843	memXXX() functions are builtin in GNU C (gcc) and are much faster
47844	then the strXXX() counterparts. Small change in the loop to take
47845	advantage of this.
47846
47847	* pop3d/quit.c: The rfc1939 insist that after a QUIT, we must
47848	release any resources and close the connection:
47849	"Whether the removal was successful or not, the server
47850        then releases any exclusive-access lock on the maildrop
47851        and closes the TCP connection."  This was not done if error
47852	occurred while expunging, now we will close the connection and
47853	notify the client of the error(ERR_FILE).
47854
478552001-02-01  Alain Magloire
47856
47857	"Premature Optimization Is The Root Of All Evil", Knuth.
47858
47859	* mailbox/attachment.c: Typo should be "Content-Disposition"
47860
47861	* mailbox/mbx_mbox.c mailbox/mbx_mboxscan.c mailbox/header.c:
47862	Attempt to optimize the header, header_get_fvalue() is created,
47863	The mailbox save/cache the most common headers, when doing a
47864	header_get_value(), header_get_fvalue() is call first hoping
47865	that the requested header was cache, if it fails we fall back
47866	to the usual parsing.  The common elected headers are : From,
47867	To, Cc, Subject, Date, Content-Type, X-UIDL, X-UID.
47868
47869	* mailbox/mailbox.c mailbox/mbx_mbox.c mailbox/mbx_imap.c:
47870	I've confuse the semantic of "unseen" and "recent", "unseen"
47871	means new mail, not recent.  Renamed mailbox_recent_count()
47872	to mailbox_unseen_count().
47873	* include/mailutils/mailbox.h: updated for mailbox_unseen_count()
47874
47875
478762001-01-25  Alain Magloire
47877
47878	* frm/frm.c: Forget to add --summary option and fix return status.
47879	When being very quiet just freopen(/dev/null, w, stdout).
47880
478812001-01-25  Alain Magloire
47882
47883	* pop3d/capa.c: Add UIDL in the capability list.
47884	and update Copyright.
47885	* pop3d/pop3d.c: Remove mbox_record register, only need path_record.
47886	* pop3d/retr.c: When retrieve a message should be mark as read.
47887	since we do not strip out the header "Status:".
47888	* pop3d/top.c: Adjust stream_readline().
47889
478902001-01-25  Alain Magloire
47891
47892	While working on the new version of the API mailbox, ChangeLog was
47893	discontinued, since the API could literally change overnight a
47894	maintenance of the entries were of a particular burden.
47895	The API of the library, and some utilities like pop3d are
47896	stable enough to restart normal entries.
47897
47898	* mailbox/*: New Api to access mailbox.
47899	* include/mailutils: Public prototypes of the API.
47900	* frm/frm.c frm/Makefile.am: A clone of elm frm utility.
47901	* from/from.c from/Makefile.am: A utility to scan mailboxes.
47902	* pop3d/* : GNU pop3d server.
47903
479042000-05-19  Sean 'Shaleh' Perry <shaleh@debian.org>
47905
47906	* libmailbox/mh.c: fleshed out mh_open() some more
47907
479082000-05-18  Sean 'Shaleh' Perry <shaleh@debian.org>
47909
47910	* libmailbox/mh.c: fleshed out mh_open() some more
47911
479122000-05-15  Sean 'Shaleh' Perry <shaleh@debian.org>
47913
47914	* libmailbox/*: ran some files thru emacs indent, I think I introduced
47915	some oddness with vi
47916	* libmailbox/mh.[ch]: new files, based on maildir
47917	the mh work is very empty -- just mh_open right now
47918
479192000-04-19  Jeff Bailey  <jbailey@nisa.net>
47920
47921	* configure.in: Test for limits.h and inttypes.h, add malloc
47922	and realloc checks.
47923	* m4/: New directory
47924	* m4/Makefile.am: New file to support directory
47925	* m4/malloc.m4: File to support lib/ directory
47926	* m4/realloc.m4: File to support lib/ directory
47927	* lib/Makefile.am: Distribute xalloc.h
47928	* lib/xalloc.h: New file to support xmalloc.c
47929	* lib/xmalloc.c: New version from sh-utils-2.0g
47930	* autogen.sh: Look in m4 for extra macros
47931	* doc/Makefile.am: Rearrange to quiet automake
47932
479332000-03-28  Jakob 'sparky' Kaivo  <jkaivo@elijah.nodomainname.net>
47934
47935	* pop3d/pop3d.c (main): handle SIGPIPE
47936
479372000-01-19  Sean 'Shaleh' Perry
47938
47939	* mailbox/mbx_mh.c: some more code fleshing, still ugly
47940	* README README-alpha: updates, corrected README to list mailbox as LGPL
47941
479422000-01-19  Sean 'Shaleh' Perry
47943
47944	* mailbox/mbx_mh.c: new file
47945	no header, no error checking, no hable englais
47946	* url/url_mh.[ch]: new files
47947	url support for MH mailboxes
47948
479492000-01-17  Sean 'Shaleh' Perry
47950
47951	* examples/from.c: remove extraneous copyright notice
47952
479531999-12-15  Alain Magloire
47954
47955	* url/url_mbox.h url/url_pop.h url/url_imap.h url/url_mailto.h
47956	New files.
47957
479581999-12-01  Alain Magloire
47959
47960	* url/_cpystr.c url/chewurl.c url/url.c url/url_imap.c
47961	url/url_mailto.c url/url_mbox.c url/url_pop.c : New files,
47962	first attempt to define the URL API.
47963
47964	* lib/Makefile.am: added xmalloc.c, xstrdup.c, xstrtol.{c,h}
47965	* lib/xmalloc.c lib/xstrdup.c lib/xstrtol.c lib/xstrtol.h : New files
47966
479671999-11-21  Jeff Bailey
47968
47969	* doc/rfc*: Add.  Standards followed should be included here.
47970
479711999-11-23  Jakob 'sparky' Kaivo
47972
47973	* TODO: Mention Maildir
47974	* libmailbox/mailbox.c (mbox_init): new function
47975	* libmailbox/maildir.h: new file
47976	* libmailbox/maildir.c: new file
47977	* libmailbox/mailbox.c (mbox_open): uncommented maildir_open attempt
47978
479791999-11-15  Jeff Bailey
47980
47981	* lib/ansi2knr.c lib/ansi2knr.h: Add
47982
47983	* configure.in: Add AM_C_PROTOTYPES
47984
47985	* libmailbox/Makefile.am: Add ansi2knr handling
47986
479871999-11-08  Sean 'Shaleh' Perry
47988
47989	* cleaned up some of the automake autoconf magic for non-Linux
47990
479911999-11-07  Sean 'Shaleh' Perry
47992
47993	* TODO: restructuring, now split into sections
47994	* libmailbox/mailbox.c libmailbox/mailbox.h: added two new functions
47995	to the api and began implementing them in unixmbox
47996		is_updated() => has this mailbox been updated externally?
47997		scan() => build info on mailbox, removing old data as needed
47998		currently not implemented
47999
480001999-11-06  Sean 'Shaleh' Perry
48001
48002	* libmailbox/mailbox.c: more work on expunge
48003	* libmailbox/mailbox.c: added a tester routine
48004	* Makefile.am: added -g
48005
480061999-11-06  Sean 'Shaleh' Perry
48007
48008	* libmailbox/unixmbox.c: work on expunge
48009	use read/write along with lseek still blows up -- getting there
48010	* mail/mail.c: check return value of mbox_open()
48011
480121999-10-23  Alain Magloire
48013
48014	* ChangeLog: Cleanup according to GNU std, and remove
48015	of email addresses. The emails should be AUTHORS or THANKS
48016	so if they change no need to sed everything.
48017
480181999-10-11  Jeff Bailey
48019
48020	* libmailbox/Makefile.am: Remove no-install option, add -pedantic
48021
480221999-10-12  Sean 'Shaleh' Perry
48023
48024	* made sure that the imap4 was REALLY broken
48025
480261999-10-11  Jeff Bailey
48027
48028	* imap4d/Makefile.am: New file
48029
48030	* configure.in: Create imap4d/Makefile, and no install option
48031	for library
48032
48033	* pop3d/Makefile.am: Add warnings, remove unneeded variable
48034
48035        * TODO: Update
48036
48037	* impa4rev1/: Rename to imap4d. (I asked first, really I did...)
48038
48039	* lib/Makefile.am: Update for new files
48040
48041	* lib/getline.c: New File
48042
48043	* lib/getline.h: New file
48044
480451999-10-11  Sean 'Shaleh' Perry
48046
48047	* added my imap code -- PLEASE DO NOT TOUCH
48048
480491999-10-10  Jeff Bailey
48050
48051	* THANKS: New file
48052
48053	* doc/mailutils.texi: New File
48054	Provided by Alain Magloire <alainm@rcsm.ece.mcgill.ca> with some
48055	changes so that Makeinfo reports no errors.
48056
48057	* doc/Makefile.am: New file
48058
48059	* configure.in: Deal with libsrc to lib rename
48060
48061	* pop3d/Makefile.am: Deal with libsrc to lib rename
48062
48063	* Makefile.am: Deal with libsrc to lib rename.
48064	Add reference to doc/ subdirectory.
48065
48066	* libsrc/: Rename to lib/
48067
480681999-10-09  Sean 'Shaleh' Perry
48069
48070	* Made changelog.pl output in approved format -- I miss the time stamp
48071
480721999-10-09 Sean 'Shaleh' Perry
48073
48074	* added examples/gnu-pop3d.pam
48075
480761999-10-08  Jeff Bailey
48077
48078	* doc/: New directory
48079
48080	* pop3d/Makefile.am: Remove pam detection, now handled by configure
48081	in the @AUTHLIBS@ spot.
48082
48083	* configure.in: Detect pam correctly/handle crypt case correctly
48084	Add option: --disable-pam
48085
48086	* acconfig.h: New File
48087
480881999-10-08 Sean 'Shaleh' Perry
48089
48090	* added showmail.c to examples
48091	* libmailbox: some minor code cleanups
48092
480931999-10-08 Sean 'Shaleh' Perry
48094
48095	* fixed the "if empty mailbox, return not implemented"
48096	NB: seems there was a large assumption being made:
48097	if unixmbox_open() failed, it was because it was not mbox
48098	this was wrong for many reasons, so on actual "not mbox",
48099	return EBADMSG.
48100	Prolly want to come up with a better error, but this works for now
48101	* more cleaning in the mailbox code
48102	a) added stat() call -- we can bomb earlier, plus detect if
48103	passed object is a directory or file
48104	b) unixmbox_close() free()'s mbox.  This will hamper the use
48105	when we add support for more mailboxes later.  Need to find
48106	a solution.  Perhaps a unixmbox_free() call.
48107	There was also a small leak there -- mbox->name was being left.
48108	c) To aid checking in unixbox_open(), added checks around fgets call.
48109	Now properly detects EOF, errors, etc.  This was a large cause of the
48110	spurious "not implemented" bug.
48111	d) all of unixmbox_open()'s function calls should now be checked
48112	NB: need to do the same for rest of file
48113
481141999-10-07 Sean 'Shaleh' Perry
48115
48116	* removed spurious code in from.c
48117	* added TODO file
48118
481191999-10-07  Jeff Bailey
48120
48121	* Makefile.am: Compile libsrc/ first.
48122
48123	* pop3d/Makefile.am: Link properly with crypt and libmailutils.a
48124	from libsrc/
48125
48126	* libsrc/Makefile.am: Produce one library for all functions.
48127	Do not use libtool for this library, it will never be shared.
48128
48129	* configure.in: Remove AM_MAINTAINER_MODE.  Export crypt detection
48130	to Makefiles
48131
481321999-10-07 Sean 'Shaleh' Perry
48133
48134	* included my read_a_line() in examples/
48135
481361999-10-06 Sean 'Shaleh' Perry
48137
48138	* Cleanup some compilation issues
48139	* changed "w+" to "w" in called to pop3_mainloop():ofile = fdopen()
48140	why was it called with w+?  It is only ever used for writing.
48141	* catch EINTR in call to accept() (play nice w/ our UNIX friends)
48142	* set SO_REUSEADDR on daemon's socket
48143
481441999-10-05 Sean 'Shaleh' Perry
48145
48146	* Added changelog.pl so we can have automated entries
48147	set CVS_EMAIL=me@here.com and CVS_FULLNAME="Joe Blow"
48148	usage: changelog.pl "added signal.c" or changelog.pl, an editor will
48149	then appear (uses $VISUAL and $EDITOR)
48150	the format is controlled simply via the format call at the end
48151	and the section of perl code directly above it
48152
481531999-10-05 Sean 'Shaleh' Perry
48154
48155	* added pop3d/signal.c -- contains pop3_sigchld() currently
48156
481571999-10-05 Sean 'Shaleh' Perry
48158
48159	* initial fork() rewrite, not even compiled it yet
48160
481611999-10-04 Sean 'Shaleh' Perry
48162
48163	* changed lock(int mode) to lock(mailbox_lock_t mode), this will allow
48164	the type to be changed later without affecting code compatibility
48165	* added name to AUTHORS
48166	* noticed mention of IMAP4 server and went back to coding it (-:
48167
481681999-10-03  Jeff Bailey
48169
48170	* mail/mail.c: Support --help, --version.
48171
48172	* mail/Makefile.am: Add -Wall to compile line.
48173
48174	* libmailbox/Makefile.am: Add -Wall to compile line.
48175
48176	* libmailbox/mailbox.c: Warning cleanup, second parameter of lock
48177	should be unsigned int, not int.
48178
48179	* libmailbox/mailbox.h: ""
48180
48181	* libmailbox/unixmbox.h: ""
48182
48183	* libmailbox/unixmbox.c: ""
48184
48185	* AUTHORS: Include my name. =)
48186
48187	* README: Rewrite for public consumption
48188
48189	* README-alpha: New file, add mailing list address, CVS information.
48190
48191	* libmailbox/unixmbox.c: Include config.h if defined
48192
48193	* libmailbox/mailbox.c: Include config.h if defined
48194
48195	* mail/mail.c: Include config.h if defined, update copyright.
48196
48197
481981999-10-01 Sean 'Shaleh' Perry
48199
48200	* added an examples directory and the first example, from.c
48201
482021999-10-01 Jakob 'sparky' Kaivo
48203
48204	* libmailbox/*.[ch]: added cleanup patches from Shaleh while he works
48205	on getting CVS access
48206
482071999-09-22  Jakob 'sparky' Kaivo
48208
48209	* mail/mail.c (main): added 'f' and 'F' to test mbox_header_line
48210
48211	* pop3d/apop.c (pop3_apop): cleanup, partial rewrite for libmailbox
48212
48213	* pop3d/retr.c (pop3_retr): fixed a potential segfault
48214
48215	* pop3d/user.c (pop3_user): cleanup and use mbox_lock
48216
48217	* libmailbox/mailbox.c (mbox_header_line): new function
48218	(mbox_body_lines): new function
48219
48220	* mail/Makefile.am (mail_DEPENDENCIES): added libmailbox.la
48221
48222	* pop3d/top.c (pop3_top): made it work with libmailbox
48223
48224	* libmailbox/unixmbox.c (unixmbox_open): added check to see if it's
48225	actually an mbox file
48226	(unixmbox_open): Set mbox->_lock to unixmbox_lock
48227	(unixmbox_lock): new function
48228
48229	* libmailbox/unixmbox.h: Added prototype for locking
48230
48231	* libmailbox/mailbox.c: Add dummy initializer for locking
48232
48233	* libmailbox/mailbox.h: Added interface for locking
48234	Added interfaces for mbox_header_line and mbox_body_lines
48235
48236	* pop3d/*.[ch]: changed copyright info to FSF
48237
48238	* libmailbox/*.[ch]: added copyright/licensing info
48239
482401999-09-21  Jakob 'sparky' Kaivo
48241
48242	* pop3d/Makefile.am (pop3d_LDADD): add $(AUTHLIBS)
48243
48244	* configure.in: Added libsrc/Makefile to AC_OUTPUT (duh, Jake!)
48245	fixed the PAM and crypt checks
48246
48247	* README: actually put something here, noted necessary tools to build
48248	from CVS
48249
482501999-09-14  Jakob 'sparky' Kaivo
48251
48252	* pop3d/pop3d.c (main): moved setgid() call to after option parsing
48253	(main): make --version report PACKAGE and VERSION
48254
48255	* libmailbox/mailbox.c (mbox_open): changed parameter type to const
48256
48257	* pop3d/Makefile.am (INCLUDES): change relative directories to
48258	top_srcdir base
48259
48260	* configure.in: Added checks for PAM and crypt
48261
482621999-09-13  Jakob 'sparky' Kaivo
48263
48264	* pop3d/retr.c (pop3_retr): fixed calls mbox_header => mbox_get_header
48265	and mbox_body => mbox_get_body
48266
48267	* pop3d/user.c (pop3_user): removed references to mailbox variable
48268
48269	* pop3d/stat.c (pop3_stat): fixed mbox->is_deleted => mbox_is_deleted
48270
48271	* pop3d/pop3d.c (pop3_mainloop): removed reference to lockfile variable
48272
48273	* pop3d/extra.c (pop3_abquit): change fclose(mbox) to mbox_close(mbox)
48274	removed calls to free(messages) and pop3_unlock()
48275
48276	* pop3d/dele.c (pop3_dele): fixed call to mbox_delete()
48277
48278	* Makefile.am (SUBDIRS): added pop3d and libsrc
48279
48280	* configure.in: Added checks needed for pop3d/*
48281	made it work with libtool
48282
48283	* libsrc/*: imported from gnu-pop3d tree
48284
48285	* pop3d/*: imported from gnu-pop3d tree
48286
482871999-09-11  Jeff Bailey
48288
48289	* libmailbox/unixmbox.h: Do not prefix config.h defines with _
48290
482911999-09-10  Jeff Bailey
48292
48293	* */*: Accommodate directory rearrange
48294
48295
48296Local Variables:
48297mode: change-log
48298version-control: never
48299buffer-read-only: t
48300End:
48301