12021-02-23  Sergey Poznyakoff  <gray@gnu.org>
2
3	Version 8.10
4
52021-02-15  Sergey Poznyakoff  <gray@gnu.org>
6
7	Warn about uninitialized variables; meaningful use of string variables in boolean context
8
9	* src/mailfromd.h (variable) <initialized>: New member.
10	(variable_check_initialized): New proto.
11	* src/symbols.c (init_variable): Set initialized to 0.
12	* src/gram.y: Convert the use of string variable in boolean context
13	to s != ''.
14	(create_asgn_node): Set var->initialized  to 1.
15	(create_node_variable): Check if the variable is initialized.
16	(variable_check_initialized): New function.
17	* src/lex.l (variable_or_const): Check if the variable is
18	initialized.
19
20	* mflib/dns.mf4 (dns_getname, dns_getaddr)
21	(getns,getmx): Initialize result.
22
23	* tests/arginit.at: New test.
24	* tests/Makefile.am: Add new test.
25	* tests/testsuite.at: Include new test.
26
27	* doc/mailfromd.texi: Elaborate on default values of variables.
28
29	* NEWS: Version 8.9.90
30	* configure.ac: Likewise.
31
322021-02-08  Sergey Poznyakoff  <gray@gnu.org>
33
34	Fix minimal mailutils requirement in README
35
362021-01-06  Sergey Poznyakoff  <gray@gnu.org>
37
38	Update copyright years
39
402020-12-29  Sergey Poznyakoff  <gray@gnu.org>
41
42	Fix typos in NEWS
43
44	Version 8.9
45
46	* NEWS: Update.
47	* configure.ac: Update.
48	* doc/functions.texi (dkim_verified_signature_tag): Add missing
49	type declaration.
50	* tests/hdr-cap.at: Ignore X-* headers.
51	* tests/hdr-mul.at: Likewise.
52
532020-11-19  Sergey Poznyakoff  <gray@gnu.org>
54
55	Remove old code.
56
57	* src/builtin/mbox.bi (mailbox_open): Remove a left-over workaround,
58	not needed since mailutils commit d7a596df78.
59
602020-11-08  Sergey Poznyakoff  <gray@gnu.org>
61
62	Remove obsolete ifdefs
63
64	Version 8.8.92
65
66	New builtin function: geoip2_get_json
67
68	* src/builtin/geoip2.bi (geoip2_get): Throw e_range if the lookup
69	path does not exist in the returned data.
70	Return empty string if there is no data in the entry.
71	(geoip2_get_json): New function.
72	* src/prog.c (heap_obstack_vsprintf): Don't overwrite previously
73	written data.
74	* doc/functions.texi: Describe the geoip2 functions.
75	* NEWS: Update.
76
772020-11-06  Sergey Poznyakoff  <gray@gnu.org>
78
79	geoip2 support
80
81	* configure.ac: Check for libmaxminddb.
82	* src/Makefile.am (mailfromd_LDADD): Add GEOIP2_LIBS.
83	* src/builtin/Makefile.am: Add geoip2.bi
84	* src/builtin/geoip2.bi: New file.
85	* src/main.c (mailfromd_show_defaults): Reflect the status of geoip2
86	support.
87
88	New functions for printf-style operations on the heap temporary space.
89
90	* src/builtin/snarf.m4 (MF_OBSTACK_PRINTF): New macro.
91	* src/prog.c (heap_obstack_size, heap_obstack_vsprintf)
92	(heap_obstack_sprintf): New functions.
93	(env_vsprintf): Create copy of the va_list prior to using it and
94	dispose of it afterwards.
95	* src/prog.h (heap_obstack_vsprintf, heap_obstack_sprintf): New protos.
96
972020-11-05  Sergey Poznyakoff  <gray@gnu.org>
98
99	Improve numeric overflow checking during stack/data reallocation
100
101	* src/gram.y (strtosize): Improve numeric overflow checking.
102	* src/prog.c (expand_dataseg): Change signature.  Improve
103	reallocation strategy and overflow checking.  Don't throw exception
104	on error, that's the responsibility of the caller.
105	All uses changed.
106	* src/prog.h (expand_dataseg): Change signature.
107	* src/builtin/debug.bi (_expand_dataseg): Update call to expand_dataseg.
108
1092020-11-04  Sergey Poznyakoff  <gray@gnu.org>
110
111	Reimplement several DNS functions in pure MFL
112
113	* NEWS: Update.
114	* doc/functions.texi: Update.
115	* mflib/dns.mf4 (dns_getname, dns_getaddr)
116	(getns, getmx): New functions.
117	* src/builtin/dns.bi (dns_getname, dns_getaddr)
118	(getns, getmx): Remove.
119
120	Add tests fir dns_query
121
122	* tests/dns_query.at: New file.
123	* tests/Makefile.am: Add dns_query.at
124	* tests/testsuite.at: Likewise.
125	* tests/atlocal.in (MFOPTS): Change order of the include directories.
126
127	Version 8.8.91
128
129	dns_query: remove the arbitrary limit on the number of replies
130
131	* src/builtin/dns.bi: Use the module private storage for reply table.
132
1332020-11-03  Sergey Poznyakoff  <gray@gnu.org>
134
135	Implement the dns_query function: a generalized API for DNS queries
136
137	* mflib/dns.mf4 (DNS_TYPE_A, DNS_TYPE_NS)
138	(DNS_TYPE_PTR, DNS_TYPE_MX, DNS_TYPE_TXT): New constants.
139	* src/builtin/dns.bi (dns_query): New function.
140	(dns_reply_release,dns_reply_count)
141	(dns_reply_string,dns_reply_ip): New functions.
142	* src/prog.c (eval_environ): Rename cleanup_list to function_cleanup_list.
143	New member environ_cleanup_list.
144	(env_environ_cleanup_add): New function.
145	* src/prog.h (env_environ_cleanup_add): New proto.
146	* doc/functions.texi: Document the dns_query function.
147	* NEWS: Likewise.
148
149	Doc: Remove references to non-existing DNS cache
150
151	Expect 15 shift/reduce in grammar
152
153	Don't assume smallbook in docs.
154
1552020-11-02  Sergey Poznyakoff  <gray@gnu.org>
156
157	Fix typo
158
159	Document the sed construct.  Implement the qr() builtin.
160
161	* doc/Makefile.am: Remove sexp.texi.
162	* doc/sexp.texi: Remove.
163	* doc/functions.texi: Document the sed function.
164	* doc/mailfromd.texi: Update.
165	* src/builtin/snarf.m4 (__MF_DEFUN_FLAGS__): New macro.
166	(__mf_add_defun_flag)
167	(__mf_mfl_type,__mf_arglist_init): New macros.
168	(__mf_defun): Use __mf_arglist_init to initialize __MF_ARGLIST__ and
169	the defun flags.
170	(__MF_NEEDS_CAPTURE__): Remove.
171	(MF_CAPTURE): Set MFD_BUILTIN_CAPTURE directly, instead of setting
172	__MF_NEEDS_CAPTURE__.
173	* src/builtin/string.bi (qr): New function.
174	* src/gram.y (funcall: T_BUILTIN): Special handling for builtins
175	with MFD_BUILTIN_REGEX_FLAGS flag set.
176	* src/mailfromd.h (MFD_BUILTIN_REGEX_FLAGS): New flag.
177	* tests/sed.at: Rename qr to myqr to avoid name clash with the
178	builtin.
179
180	* configure.ac: Version 8.8.90
181	* NEWS: Document the sed and qr functions.
182
1832020-11-01  Sergey Poznyakoff  <gray@gnu.org>
184
185	MFL: New built-in function "sed".
186
187	The "sed" function (actually, a statement) transforms its first argument
188	using the sed expressions given in its subsequent arguments and returns the
189	result:
190
191	  set res sed(input, 's/foo/bar/g', 's/bar/Baz/')
192
193	* lib/libmf.h (transform_append_t)
194	(transform_reduce_t): Remove typedefs.
195	(transform_string): Change signature.
196	* lib/transform.c (parse_transform_expr): Fix parsing of the
197	regexp part.
198	(transform_string): Rewrite.  No additional callbacks needed.
199	* src/drivers.c: New node types: 'sedcomp', to compile the sed
200	transformation expression, and 'sed', to apply it.
201	* src/gram.y: New production for sed(arg, expr).
202	* src/lex.l (sed): New keyword.
203	* src/mailfromd.h (sedcomp_node, sed_node): New structs.
204	(node): Add new sedcomp_node and sed_node parts to the union.
205	* src/opcodes (SEDCOMP, SED): New opcodes.
206	* src/prog.c (next_transform_index)
207	(install_transform,get_transform): New functions.
208	(instr_sedcomp, instr_sed): New instruction handlers.
209	* src/symbols.c (import_rules_eval): Simplify transform expression
210	handling.
211
212	* tests/sed.at: New file.
213	* tests/Makefile.am: Add sed.at
214	* tests/testsuite.at: Include sed.at
215
2162020-10-31  Sergey Poznyakoff  <gray@gnu.org>
217
218	Bugfix in the mfl-mode
219
220	* elisp/mfl-mode.el (mfl-next-line-indentation): Handle the beginning
221	of buffer case.
222
2232020-07-26  Sergey Poznyakoff  <gray@gnu.org>
224
225	Version 8.8
226
2272020-07-24  Sergey Poznyakoff  <gray@gnu.org>
228
229	Update copyright years
230
231	Version 8.7.92
232
2332020-07-23  Sergey Poznyakoff  <gray@gnu.org>
234
235	Fix compilation without libnettle
236
237	* NEWS: Version 8.7.91
238	* configure.ac: Likewise.
239	Define WITH_DKIM.
240	* mflib/Makefile.am [NETTLE_COND]: Add dkim.mf conditionally.
241	* src/Makefile.am [NETTLE_COND]: Remove appending to AM_CPPFLAGS:
242	symbol defined in config.h
243	* src/builtin/Makefile.am (BI_FILES): Add dkim.bi unconditionally.
244	* src/builtin/dkim.bi: Mark source with MF_COND(WITH_DKIM)
245
2462020-07-22  Sergey Poznyakoff  <gray@gnu.org>
247
248	Fix compilation with gcc 10
249
250	* gacopyz/gacopyz_priv.h (__gacopyz_log_printer): Mark as extern.
251	* lib/mfdb.h (cache_format, rate_format)
252	(tbf_rate_format,greylist_format): Mark as extern.
253	(predict_rate,predict_next_option): New externs.
254	* src/dkim.c (dkim_signature_parse): Fix improper use of unprefixed
255	WRDSF_ constant.
256	* src/mfdbtool.c (predict_rate,predict_next_option): Remove variable
257	declarations.
258	* src/savsrv.c (writeout): Use memcpy instead of strncpy to shut
259	up the gcc warning.
260	* src/srvcfg.c (negative_expire_interval): Remove declaration.
261
2622020-07-13  Sergey Poznyakoff  <gray@gnu.org>
263
264	Fix the use of deprecated CPPFunction* in mtasim
265
266	Implement enumerations in MFL
267
268	* src/gram.y: Implement enumerated constant definitions.
269	* src/mailfromd.h (define_constant): Remove const from the
270	return type.
271	* src/symbols.c: Likewise.
272
273	* tests/enum.at: New test.
274	* tests/Makefile.am: Add new test.
275	* tests/testsuite.at: Likewise.
276
277	* NEWS: Mention new features.
278	* doc/mailfromd.texi: Document new features.
279
280	Minor fix
281
282	* src/lex.l (lex_new_source_0): Initialize yylloc early.  This makes
283	sure that eventual syntax errors occurring at the first token are
284	printed with detailed location (filename:line.start-end)
285
286	Fix compilation without external preprocessor
287
2882020-07-11  Sergey Poznyakoff  <gray@gnu.org>
289
290	Minor fix in the docs
291
292	Provide DKIM_EXPL_ codes for use in MFL
293
294	* doc/functions.texi: Document changes
295	* mflib/status.mf: Define DKIM_EXPL_ constants
296	* src/dkim.c (dkim_explanation_str): Change the wording of
297	DKIM_EXPL_BAD_BASE64 error string.
298	* src/dkim.h: Define DKIM_EXPL_ using _MFL_DKIM_EXPL_ ones
299
3002020-07-10  Sergey Poznyakoff  <gray@gnu.org>
301
302	Minor fix
303
304	Minor fixes
305
306	* src/builtin/dkim.bi (dkim_sign): Insert DKIM-Signature at position 0.
307	* src/dkim.c (dkim_signature_format): Don't request MU_STREAM_STAT_OUTLN
308
309	Provide additonal data upon successful return from mfd_dkim_verify
310
311	* doc/functions.texi: Document new functions and variables.
312	* mflib/Makefile.am: Add dkim..mf
313	* mflib/dkim.mf: New function.
314	* src/builtin/dkim.bi (dkim_verified_signature): New MFL variable.
315	(dkim_verify): Set dkim_verified_signature upon return.
316	* src/dkim.c (mfd_dkim_verify): Return normalized DKIM signature
317	value in the memory location pointed to by the second argument.
318	* src/dkim.h (mfd_dkim_verify): Change signature.
319
320	Rewrite DKIM parser and formatter
321
322	DKIM: implement l= tag
323
3242020-07-09  Sergey Poznyakoff  <gray@gnu.org>
325
326	DKIM: Minor change
327
328	* src/dkim.c (dkim_hash): Use dkim_header_list_first/
329	dkim_header_list_first/dkim_header_list_end instead of mu_wordsplit
330	to iterate over the list of headers.
331
332	Implement DKIM-Signature wrapping. Fix DKIM interaction with header_replace
333
334	* src/builtin/dkim.bi (do_msgmod): When processing header_replace,
335	first check if the requested header is already present.  If it is,
336	proceed with header insert.  Otherwise do mu_header_append.  This
337	mimics the Sendmail behaviour.
338	* src/dkim.c (dkim_header_list_end, dkim_header_list_next)
339	(dkim_header_list_first): New functions.
340	(dkim_signature_format): Rewrite.  Take additional argument crlf.
341	When set, insert CRLF instead of LF when wrapping.
342
343	DKIM: Fix verification in case of wrapped DKIM-Signature
344
345	* src/dkim.c: tranlsate lf->crlf before hashing
346
347	Fix DKIM record parsing to comply to RFC 6376
348
349	* src/dkim.c (dkim_signature_parse,dnsrec_parse): Allow for FWS
350	as per RFC 6376, section 3.2
351
3522020-07-07  Sergey Poznyakoff  <gray@gnu.org>
353
354	Fixes in DKIM code
355
356	* lib/dns.c (dkim_lookup): The v= tag is optional.
357	* src/builtin/dkim.bi (dkim_sign): Insert the created header at
358	the beginning.
359	(dkim_verify): Mark with MF_DSEXP.
360	* src/dkim-canonicalize.c (dkim_canonicalizer): Fix relaxed body
361	canonicalization: ignore whitespace at the end of the line (before
362	CRLF).
363	* src/dkim.c (dkim_str_to_canon_type): Take two arguments.  Return
364	the pointer to the first character after the spec in *endp.
365	All uses changed.
366	(dkim_signature_parse): Fix typo (missing else).
367	Fix c= tag parsing.
368	(dkim_sig_validate): The q= tag is optional.
369	Fix verification of the i= tag.
370	(pubkey_validate): Validate v= tag, if supplied.
371	Fix validation of the key type and algorithm.
372	* src/dkim.h (DKIM_KEYRECORD_VERSION): New constant.
373
374	Remove mudefs.h
375
3762020-07-06  Sergey Poznyakoff  <gray@gnu.org>
377
378	Move mu_stream_shift to GNU mailutils
379
380	This partially reverts 7049008599.  The function itself, which had
381	been introduced in anticipation of its possible use in DKIM module,
382	was never actually used.
383
384	Implement DKIM verification
385
386	* lib/dns.c (dkim_lookup): New function.
387	* lib/dns.h (dkim_lookup): New proto.
388	* mflib/status.mf (DKIM_VERIFY_OK, DKIM_VERIFY_PERMFAIL)
389	(DKIM_VERIFY_TEMPFAIL): New constants.
390	* src/builtin/dkim.bi (msgmod_data) <h_list>: New member.
391	(do_msgmod): Ignore modification commands that affect headers
392	not listed in h=.
393	(dkim_sign): Initialize v, a, and q members of
394	struct dkim_signature.
395	(dkim_explanation_code, dkim_explanation): New MFL variables.
396	(dkim_verify): New function.
397	* src/dkim.c (pubkey_from_base64): New function.
398	(dkim_header_list_match): New function.
399	(dkim_signature_format): Format new members of the struct dkim_signature.
400	(dkim_signature_free): New function.
401	(dkim_signature_parse): New function.
402	(dkim_hash): New function.
403	(mfd_dkim_sign): Rewrite using dkim_hash.
404	(dkim_explanation_str)
405	(dkim_result_trans): New globals.
406	(mfd_dkim_verify): New function.
407	* src/dkim.h (dkim_header_list_match): New proto.
408	(mfd_dkim_verify): New proto.
409	(DKIM_VERSION,DKIM_SIGNATURE_HEADER)
410	(DKIM_QUERY_METHOD,DKIM_ALGORITHM): New constants.
411	(dkim_signature) <a,q,v>: New members.
412	(DKIM_EXPL_*): New constants.
413	(DKIM_VERIFY_*): New constants.
414	(dkim_explanation_str, dkim_result_trans): New externs.
415
416	* NEWS: Document changes.
417	* doc/functions.texi: Likewise.
418
4192020-07-04  Sergey Poznyakoff  <gray@gnu.org>
420
421	dkim: take into account changes applied by MMQ
422
423	* mflib/status.mf (e_badmmq): New exception: MMQ incompatible with
424	the signing function (currently for dkim_sign).
425	* src/builtin/dkim.bi (dkim_sign): Apply MMQ to the temporary message
426	prior to calling mfd_dkim_sign.
427	* src/mailfromd.h (env_msgmod_apply): Change the return type.
428	* src/prog.c (env_msgmod_apply): Return int code from mu_list_foreach.
429	* src/dkim.c (mfd_dkim_sign): Fix the type of the c auto.
430
4312020-07-03  Sergey Poznyakoff  <gray@gnu.org>
432
433	Move MMQ from milter context to program evaluation environment.
434
435	* src/engine.c: (message_data): Remove mmq.  Use env_msgmod functions
436	to access it.  All uses updated.
437	(ctx_msgmod): Removed.
438	(priv_store_msgmod_closure): Removed.
439	(mlfi_eom): Use env_msgmod_count to check the size of the message
440	modification queue and env_msgmod_apply to apply it.
441	* src/mailfromd.h (env_msgmod): Rename to env_msgmod_append.
442	(env_clear_msgmod): Rename to env_msgmod_clear.
443	(env_msgmod_apply): New proto.
444	* src/prog.c (ENVF_MSGMOD): Remove.
445	(eval_environ) <flags,mmq>: Remove.
446	(instr_result): Use env_msgmod_count to chech for mmq size.
447	(env_clear_msgmod): Rewrite and rename to env_msgmod_clear.
448	(env_msgmod): Rewrite and rename to env_msgmod_append.
449	(env_msgmod_count): New function.
450	(destroy_environment): Destroy env->mmq
451
4522020-07-02  Sergey Poznyakoff  <gray@gnu.org>
453
454	Remove header_delete_nth and header_replace_nth.
455
456	Both functions were unable to do their work properly, due to the
457	deficiences of the Milter API.
458
459	Rewrite header_rename, header_prefix_all and header_prefix_pattern.
460
461	* NEWS: Update.
462	* doc/functions.texi: Update discussion of header modification
463	functions.
464	* mflib/header_rename.mf4: Rewrite.
465	* src/builtin/header.bi (header_delete_nth)
466	(header_replace_nth): Remove.
467	* src/builtin/vars.bi (sendmail_header_count): Remove.
468	(get_sendmail_header_count,set_sendmail_header_count): Remove.
469	* src/engine.c (message_data): Remove members: hdrtrans, hdrcount.
470	All uses changed.
471	(md_hdrtrans_fill,md_hdrtrans): Remove.
472	* src/mailfromd.h (header_delete_nth,header_replace_nth): Remove.
473	All uses changed.
474
4752020-06-30  Sergey Poznyakoff  <gray@gnu.org>
476
477	Fix typos
478
4792020-05-29  Sergey Poznyakoff  <gray@gnu.org>
480
481	New function: mfd_temp_stream_shift
482
483	Shifts the contents of temporary stream between two offsets.
484
485	* lib/Makefile.am: Add new sources.
486	* lib/libmf.h (mfd_temp_stream_shift): New proto.
487	* lib/mudefs.h (MUREF): Remove.
488	Define _MFD_USE_STREAM_SHIFT depending on mailutils version.
489	* lib/mustrmshift.c: New file.
490	* lib/streamshift.c: New file.
491
492	* src/Makefile.am (AM_CPPFLAGS) [NETTLE_COND]: Define WITH_DKIM.
493	* src/main.c (mailfromd_show_defaults): Reveal whether DKIM is supported.
494
495	* tests/Makefile.am: Add new tests.
496	* tests/testsuite.at: Likewise.
497	* tests/resolv.c: Fix formatting.
498	* tests/streamshift.at: New file.
499	* tests/streamshift.c: New file.
500	* tests/.gitignore: Update.
501
5022020-05-26  Sergey Poznyakoff  <gray@gnu.org>
503
504	Implementation of DKIM signing
505
506	* configure.ac: Detect presence of nettle libraries.
507	* src/Makefile.am: Add new sources.
508	* src/dkim-canonicalize.c: New file.
509	* src/dkim.c: New file.
510	* src/dkim.h: New file.
511	* src/builtin/Makefile.am: Add new sources.
512	* src/builtin/body.bi (current_message): Rewrite as a simple
513	wrapper over bi_get_current_message.
514	* src/builtin/dkim.bi: New file.
515	* src/builtin/msg.bi (bi_get_current_message): Optionally return
516	the message itself.
517	* src/builtin/msg.h (bi_get_current_message(: Change signature.
518	* src/builtin/snarf.m4 (env_get_stream): Fix quoting.
519
520	* NEWS: Document changes.
521	* doc/functions.texi: Document the dkim_sign function
522	* doc/mailfromd.texi: Minor changes.
523
5242019-09-07  Sergey Poznyakoff  <gray@gnu.org>
525
526	Minor fixes
527
528	* src/main.c (mf_cfg_param): Remove the surplus "database"
529	section: it is already included in srvcfg.c
530	* src/prog.c (env_register_auto): Use mu_diag_cont_printf to
531	continue diagnostic message without inserting unnecessary
532	<> directives (perhaps should be fixed in mailutils).
533
5342019-06-18  Sergey Poznyakoff  <gray@gnu.org>
535
536	Don't accept database types not supported by mailutils
537
538	For details, see the last paragraph in:
539
540	http://mail.gnu.org.ua/mailman/listarchive/bug-mailfromd/2019-06/msg00001.html
541
542	* configure.ac (db_type_to_feature): Make sure empty string is never
543	returned.
544
5452019-01-29  Sergey Poznyakoff  <gray@gnu.org>
546
547	Fixes in runtime memory management
548
549	* src/builtin/sprintf.bi: Don't use pointer to format: the latter
550	might be reallocated during stack expansions, and the pointer would
551	end up pointing to freed memory area. Another way to fix it would be
552	to make env_register_auto and env_pop_auto global and to mark the
553	address of pointer with env_register_auto so it would be reallocated
554	together with format. However, I wouldn't like to expose too much of
555	the internals of prog.c.
556	* src/prog.c (env_get_locus)
557	(heap_obstack_grow,pushs): Fix argument to env_register_auto.
558	(env_register_auto): Check if the argument points to a memory
559	location within data segment + stack. This is necessary, because
560	heap_obstack_grow registers its argument, which at least in one case
561	is a pointer to an automatic variable (see MF_OBSTACK_1GROW in
562	builtin/snarf.m4).
563	(env_pop_auto,env_unregister_autos)
564	(env_fixup_autos): Make static.
565
566	Fix in callout
567
568	* src/callout.c (reset): Send \r\n after RSET.
569
5702019-01-24  Sergey Poznyakoff  <gray@gnu.org>
571
572	Minor fixes.
573
574	* doc/mtasim.texi: Fix description of the milter timeout letters.
575	* mtasim/Makefile.am (mtasim_DEPENDENCIES): Depend on libmf and
576	libgacopyz
577
5782019-01-03  Sergey Poznyakoff  <gray@gnu.org>
579
580	Version 8.7
581
582	* NEWS: Update.
583	* configure.ac: Raise minor version.
584	* doc/functions.texi: Document new functions
585
586	Include the implementation of the NS resolving MFL functions, as
587	proposed by Jan Rafaj
588
589	* lib/dns.c (ns_lookup): New function.
590	* lib/dns.h (ns_lookup): New proto.
591	* mflib/dns.mf4 (hasns): New function.
592	* src/builtin/dns.bi (primitive_hasns, getns): New functions.
593
594	Update copyright years
595
5962018-11-09  Sergey Poznyakoff  <gray@gnu.org>
597
598	Document debug categories. Fix improper use of decimal constants instead of MU_DEBUG_TRACE identifiers
599
600	Fix docstring for the "debug" statement in the config-help output.
601
6022018-11-08  Sergey Poznyakoff  <gray@gnu.org>
603
604	mtasim: don't clobber existing callout socket when used with -Xauto
605
606	* doc/mailfromd.texi: Document the --callout-socket option.
607	* mtasim/mtasim.c (start_mailfromd): Supply the --callout-socket option.
608	* src/main.c: New option --callout-socket
609
610	Silently ignore non-existing keys in dbdel
611
612	* src/builtin/db.bi (dbdel): Treat MU_ERR_NOENT as success.
613
6142018-11-07  Sergey Poznyakoff  <gray@gnu.org>
615
616	Fix the functionality of the mailfromd --mtasim option
617
618	This option must discard the effect of the server.listen statement
619	This also fixes mtasim -Xauto
620
621	* src/main.c (mailfromd_options): Process the --mtasim option immediately.
622
6232018-11-05  Sergey Poznyakoff  <gray@gnu.org>
624
625	Change generation of debug names for built-in modules
626
627	* src/builtin/Makefile.am (.bi.c): Don't define SOURCE
628	* src/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Remove.
629	(MF_MODULE_DEBUG_NAME): New macro.
630	(_init_builtin): Use MF_MODULE_DEBUG_NAME
631
632	Partially revert "Fix indentation of the generated sources"
633
634	GNU indent reformats the sources. As a result, preprocessor #line
635	directives become misleading.
636
6372018-11-04  Sergey Poznyakoff  <gray@gnu.org>
638
639	Fix indentation of the generated sources
640
641	* NEWS: Version 8.6.90
642	* configure.ac: Version 8.6.90
643	Check for GNU indent
644	* am/indent.m4: New file.
645	* src/builtin/Makefile.am (EXTRA_DIST): Add indent.pro
646	(.bi.c, .def.h): Use GNU indent if available.
647	* src/builtin/indent.pro: New file.
648	* src/builtin/snarf.m4: Minor change.
649
6502018-11-03  Sergey Poznyakoff  <gray@gnu.org>
651
652	Revise preprocessor macros for builtin functions.
653
654	* doc/mailfromd.texi: Minor change.
655	* src/builtin/Makefile.am (builtin.h): Depend pn init.m4
656	(.bi.c): Don't eliminate first #line
657	* src/builtin/snarf.m4 (MF_BUILTIN_MODULE): New macro.
658	(MF_INIT): Rewrite.
659	Revise comments.
660	* src/builtin/init.m4 (MF_BUILTIN_MODULE): New macro.
661	(MF_INIT): Remove.
662
663	* src/builtin/body.bi: Use MF_BUILTIN_MODULE statement.
664	* src/builtin/burst.bi: Likewise.
665	* src/builtin/callout.bi: Likewise.
666	* src/builtin/ctype.bi: Likewise.
667	* src/builtin/curhdr.bi: Likewise.
668	* src/builtin/db.bi: Likewise.
669	* src/builtin/debug.bi: Likewise.
670	* src/builtin/dns.bi: Likewise.
671	* src/builtin/dspam.bi: Likewise.
672	* src/builtin/email.bi: Likewise.
673	* src/builtin/from.bi: Likewise.
674	* src/builtin/geoip.bi: Likewise.
675	* src/builtin/gethostname.bi: Likewise.
676	* src/builtin/getopt.bi: Likewise.
677	* src/builtin/getpw.bi: Likewise.
678	* src/builtin/gettext.bi: Likewise.
679	* src/builtin/header.bi: Likewise.
680	* src/builtin/io.bi: Likewise.
681	* src/builtin/ipaddr.bi: Likewise.
682	* src/builtin/macro.bi: Likewise.
683	* src/builtin/mail.bi: Likewise.
684	* src/builtin/mbox.bi: Likewise.
685	* src/builtin/mmq.bi: Likewise.
686	* src/builtin/msg.bi: Likewise.
687	* src/builtin/other.bi: Likewise.
688	* src/builtin/prereq.bi: Likewise.
689	* src/builtin/progress.bi: Likewise.
690	* src/builtin/qrnt.bi: Likewise.
691	* src/builtin/rate.bi: Likewise.
692	* src/builtin/rcpt.bi: Likewise.
693	* src/builtin/sa.bi: Likewise.
694	* src/builtin/sieve.bi: Likewise.
695	* src/builtin/spf.bi: Likewise.
696	* src/builtin/sprintf.bi: Likewise.
697	* src/builtin/string.bi: Likewise.
698	* src/builtin/syslog.bi: Likewise.
699	* src/builtin/system.bi: Likewise.
700	* src/builtin/vars.bi: Likewise.
701
702	Minor change
703
704	* mflib/callout.mf4 (callout_do): Return true for null return address.
705
7062018-11-01  Sergey Poznyakoff  <gray@gnu.org>
707
708	Quote arguments in the callout transactions in poll
709
710	Minor fixes in the docs
711
712	Avoid spurious warnings from libadns
713
714	* tests/resolv_a.at: Always pass -f option to resolv to
715	prevent eventual "unknown option" messages from libadns.
716
7172018-10-26  Sergey Poznyakoff  <gray@gnu.org>
718
719	Bugfix
720
721	* lib/dns.c (dns_str_is_ipv4): Don't tolerate whitespace and
722	extra dots.
723
7242018-07-24  Sergey Poznyakoff  <gray@gnu.org>
725
726	configure: accept any DBM type supported by mailutils as the default implementation
727
728	* NEWS: Version 8.6
729	* configure.ac: New configure option --with-dbm
730	* doc/mailfromd.texi: Update.
731	* doc/upgrade.texi: Update.
732
733	Reword copyright statement in accordance with the GFDL addendum
734
735	This pacifies lintian.
736
737	Bugfixes
738
739	* elisp/mfl-mode.el: Fix byte-compilation.
740	* git2chg.awk: Ignore git-svn-id:
741	* src/pp.c (pp_extrn_shutdown): Report errors.
742
7432018-07-24  Sergey Poznyakoff  <gray@gnu.org.ua>
744
745	Version 8.5
746
747	Update copyright years
748
749	Ensure proper integer promotion in vm.
750
751	* src/prog.c (pushn): New function.
752	Use pushn wherever a numeric or boolean return type is required.
753	* src/prog.h (mf_c_cast): Minor change.
754
7552018-03-23  Sergey Poznyakoff  <gray@gnu.org>
756
757	Fix dns_resolve_ipstr
758
759	* lib/dns.c (dns_resolve_ipstr): Select rrtype depending on the
760	domain in question. This should produce the same results as it was
761	in the previous res_query implementation, which queried for T_ANY
762	and selected the first RR type returned.
763
7642017-11-21  Sergey Poznyakoff  <gray@gnu.org>
765
766	Ensure case-insensitive comparison of SPF record marker.
767
768	* lib/dns.c (spf_lookup): ignore case when looking for v=spf1
769
770	Normalize inclusion of mailutils headers
771
7722017-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
773
774	Concatenate segments of a TXT record.
775
776	* lib/dns.c (txt_lookup): Concatenate multiple ans->rrs.manyistr.
777
778	Fix resolving of queries containing invalid characters
779
780	* lib/dns.c (DEFAULT_QFLAGS): Add adns_qf_quoteok_query
781
7822017-11-03  Sergey Poznyakoff  <gray@gnu.org>
783
784	Version 8.4
785
786	* NEWS: Update.
787	* configure.ac: Update.
788	* doc/upgrade.texi: Update.
789
7902017-11-02  Sergey Poznyakoff  <gray@gnu.org>
791
792	Bugfix
793
794	* lib/srvman.c: Use mu_sys_sockaddr_to_astr
795	* configure.ac: Require mailutils 3.4
796
7972017-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
798
799	Version 8.3
800
801	Update documentation
802
803	calloutd: implement the --resolv-conf-file option
804
805	Remove cover requirement from doc license text
806
807	Documentation and configuration changes
808
809	* configure.ac: Remove leftover checks for libresolv.
810	* doc/upgrade.texi: Document recent changes.
811
8122017-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
813
814	Improve ADNS return status handling.
815
816	* lib/dns.c (adns_to_dns_status): Rewrite.
817
8182017-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
819
820	Update docs. Version 8.2.91
821
8222017-10-25  Sergey Poznyakoff  <gray@gnu.org>
823
824	Change the rc suffix to mf in test scripts.
825
826	That was a leftover from pre-6.0 times.
827
8282017-10-23  Sergey Poznyakoff  <gray@gnu.org>
829
830	Minor fix
831
8322017-10-23  Sergey Poznyakoff  <gray@gnu.org.ua>
833
834	Improve DNS API; rewrite DNS testsuite.
835
836	* lib/dns.c (dnsbase_real_init): Take configuration text
837	as argument (can be NULL).
838	Enable adns debugging on trace9
839	(dnsbase_file_init): New function.
840	(dns_reply_init): New function.
841	(dns_reply_push): New function.
842	(soa_check): New function.
843	Rewrite all functions using dns_reply_init+dns_reply_push, as appropriate.
844	* lib/dns.h (dns_reply) <maxcount, data.ptr>: New members.
845	(dnsbase_real_init, dnsbase_file_init)
846	(dns_reply_init, soa_check): New protos.
847	* src/builtin/dns.bi (resolve_host): Rewrite to return all A records.
848	(dns_replies_intersect): New static function.
849	(primitive_ismx): Rewrite taking into account all A records.
850	* src/main.c: New option --resolv-conf-file (mostly for checking.
851
852	* tests/resolv.c: Change option handling, implement new options.
853
854	* tests/atlocal.in (MF_TOPDOMAIN,MF_NAMESERVER): New variables.
855	(at_resolv_conf): New function.
856	* tests/Makefile.am: Add new tests.
857	* tests/testsuite.at: Include new tests.
858	* tests/hasmx.at: Use dedicated MF test domains,
859	* tests/hostname.at: Likewise.
860	* tests/ismx.at: Likewise.
861	* tests/rescname.at: Likewise.
862	* tests/resolve.at: Likewise.
863
864	* tests/resolv_a.at: New test.
865	* tests/resolv_mx.at: Likewise.
866	* tests/resolv_ptr.at: Likewise.
867	* tests/resolv_ptr_val.at: Likewise.
868	* tests/resolv_spf.at: Likewise.
869	* tests/resolv_txt.at: Likewise.
870
8712017-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
872
873	Bugfix
874
875	* lib/dns.c (dns_reply_resolve): Remove unneeded ntohl.
876	* src/builtin/dns.bi): Remove unneeded htonl.
877
8782017-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
879
880	Improve DNS API consistency
881
882	* lib/dns.c (dns_get_mx_records, getmx, getmxip): Replace
883	with a single function mx_lookup. All uses updated.
884
885	Bugfixes; implement test program for DNS API.
886
887	* lib/dns.c (ptr_lookup): Reverse IP octets prior to look up.
888	Use adns_r_ptr_raw to disable consistency checks.
889	(ptr_validate): Return values in struct dns_reply.
890	All uses changed.
891	* lib/dns.h (ptr_validate): Change signature.
892
893	* tests/resolv.c: New test program.
894	* tests/Makefile.am: Add resolv.c
895	* tests/.gitignore: Update.
896
897	Drop configure checks for res_ functions
898
899	Update docs
900
901	Unify DNS reply types.
902
903	* lib/dns.h (mxbuf): Remove
904	(mxbuf_init, mxbuf_free): Remove protos.
905	(dns_get_mx_records): Remove the maxdepth parameter. Return
906	MX names in struct dns_reply. All uses changed.
907	(getmx,getmxip): Return MX names in struct dns_reply. All uses changed.
908
909	Rewrite base dns functions using adns.
910
911	* configure.ac: Require libadns.
912	* lib/dns.c: Rewrite.
913	* lib/dns.h (dns_resolve_ipstr, dns_resolve_hostname): Simplify
914	parameters.
915	(dns_reply): Remove max, last_len, and last_max.
916
917	Drop ttl tracking from DNS API; drop SPF caching
918
919	* lib/dns.c: Remove ttl tracking.
920	* lib/dns.h: Fix prototypes.
921	* mflib/spf.mf: Remove caching.
922	* src/builtin/spf.bi (spf_ttl): Remove variable.
923	* src/builtin/dns.bi: Update calls to DNS API.
924	* src/spf.c: Likewise.
925	* src/spf.h (spf_answer_t): Remove ttl.
926
927	Bugfix
928
929	* lib/dns.c (cname_loop_body): Restore accidentally removed line.
930
9312017-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>
932
933	Improve DNS resolver API
934
935	Remove arbitrary size limits.
936
937	* NEWS: Version 8.2.90
938	* configure.ac: Likewise. Require Mailutils 3.3
939
940	* doc/calloutd.texi: Update.
941	* doc/functions.texi: Update.
942	* doc/mailfromd.texi: Update.
943	* doc/upgrade.texi: Update.
944
945	* lib/dns.c: Rewrite.
946	* lib/dns.h (MAXMXCOUNT, MXF_MAX): Remove.
947	(mxbuf_init,dns_resolve_ipstr)
948	(a_lookup,ptr_lookup,txt_lookup)
949	(spf_lookup): Change protos.
950	(dns_reply): New struct.
951	(dns_reply_free,dns_reply_ip): New functions.
952	* lib/libmf.h (getmxip): Change proto.
953
954	* src/builtin/dns.bi: Remove runtime configuration statements:
955	max-dns-reply-a, max-dns-reply-ptr, and max-dns-reply-mx. Rewrite using
956	the new DNS API.
957	* src/callout.c: Update.
958	* src/mailfromd.h: Update.
959	* src/main.c: Remove the max-match-mx configuration statement.
960	* src/prog.c: Update.
961	* src/spf.c: Update.
962	* src/spf.h: Update.
963	* src/srvcfg.c: Remove the max-callout-mx configuration statement.
964
965	Allocate exception buffer even if status.mf is not required
966
967	This fixes coredumps caused by calls to MF_THROW from built-in functions
968	in scripts without the 'require status' statement.
969
970	* src/exclist.c (fixup_exceptions): New function
971	* src/mailfromd.h (fixup_exceptions): New proto.
972	* src/gram.y: Call fixup_exceptions before setting up dataseg.
973
974	Require mailutils 3.3
975
9762017-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
977
978	Version 8.2
979
9802017-06-18  Sergey Poznyakoff  <gray@gnu.org>
981
982	Minor fix
983
984	* src/gram.y (free_node): Deinit locus
985
986	Switch to detailed source locations from Mailutils 3.2.92
987
988	* configure.ac: Version 8.1.92
989	* NEWS: Update.
990	* src/builtin/debug.bi (debug): Use mu_locus_range
991	* src/builtin/from.bi: Likewise.
992	* src/builtin/header.bi: Likewise.
993	* src/builtin/progress.bi: Likewise.
994	* src/builtin/qrnt.bi: Likewise.
995	* src/builtin/rcpt.bi: Likewise.
996	* src/exclist.c: Likewise.
997	* src/builtin/sieve.bi: Use mu_locus_range
998	(sieve): Accept new optional argument "col".
999	* src/drivers.c: Use mu_locus_range
1000	(MARK_LOCUS): Rewrite as inline function.
1001	* src/gram.y: Use mu_locus_range and location macros from mailutils/yyloc.h
1002	Improve error diagnostics
1003	(parse_program): Prepare mu_strerr for locus-aware diagnostics.
1004	* src/lex.l: Use mu_linetrack_t to track locations.
1005	* src/mailfromd.h: Use mu_locus_range
1006	* src/main.c: Likewise.
1007	* src/pp.c: Likewise.
1008	* src/prog.c: Likewise.
1009	* src/prog.h: Likewise.
1010	* src/symbols.c: Likewise.
1011
1012	* tests/ashadow.at: Expect detailed error locations.
1013	* tests/bctx00.at: Likewise.
1014	* tests/fctx00.at: Likewise.
1015	* tests/invcidr.at: Likewise.
1016	* tests/invcidr2.at: Likewise.
1017	* tests/module04.at: Likewise.
1018	* tests/module06.at: Likewise.
1019	* tests/poll04.at: Likewise.
1020	* tests/setvar.at: Likewise.
1021	* tests/shadow.at: Likewise.
1022	* tests/static02.at: Likewise.
1023
1024	Minor fixes.
1025
1026	* gacopyz/context.c (gacopyz_setmlreply_va): Return meaningful code.
1027	(gacopyz_setmlreply_v): Likewise.
1028	* lib/db.c (db_compact): Fix improper use of uninitialized value.
1029	* lib/userprivs.c (mf_gid_list_free): Fix loop.
1030	* mtasim/mtasim.c (smtp_mail): Remove unused variable.
1031	* src/calloutd.c (main): Likewise.
1032	* src/savsrv.c (callout_session_server): Likewise.
1033
10342017-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>
1035
1036	Fix typo in docs.
1037
10382017-04-09  Sergey Poznyakoff  <gray@gnu.org>
1039
1040	Version 8.1.90
1041
10422017-03-06  Sergey Poznyakoff  <gray@gnu.org>
1043
1044	Fix compiler message
1045
10462017-03-04  Sergey Poznyakoff  <gray@gnu.org>
1047
1048	Minor fix
1049
1050	* lib/dns.c (cnameloop): Ignore trailing dot
1051
1052	Fix syntax table in mfl-mode
1053
1054	* elisp/mfl-mode.el: Declare _ as part of word
1055
10562017-01-21  Sergey Poznyakoff  <gray@gnu.org>
1057
1058	mtasim: code cleanup
1059
1060	* mtasim/mtasim.c (argcv_split, argcv_free): Remove.
1061	(parse_email_addr): Use mu_alloc.
1062	(check_address_command): Rewrite.
1063	(smtp_mail): New function.
1064	(smtp_rcpt): Update.
1065	(smtp): Use mu_wordsplit.
1066
10672017-01-02  Sergey Poznyakoff  <gray@gnu.org>
1068
1069	Use new assoc array API (MU commit 622bc770)
1070
1071	* lib/dict.c (name_destroy): Remove
1072	(dict_init): Use new API
1073	(dict_install,dict_getsym): Likewise.
1074
1075	Happy GNU Year
1076
10772016-12-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1078
1079	Improve Sieve interface
1080
1081	* src/builtin/sieve.bi: Initialize Sieve environment
1082	* doc/functions.texi: Document changes.
1083
10842016-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
1085
1086	Version 8.1
1087
10882016-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1089
1090	Use new Sieve API
1091
1092	* src/builtin/sieve.bi: Change to use new Sieve API
1093	* configure.ac: Version 8.0.90.  Require MU 3.0.90
1094	* NEWS: Update.
1095
10962016-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
1097
1098	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd
1099
11002016-12-08  Sergey Poznyakoff  <gray@gnu.org>
1101
1102	Fix typo
1103
1104	Ensure proper type conversion when coding immediate values.
1105
1106	* src/prog.h (mf_c_cast): New define.
1107	(code_put, code_immediate): New macros.
1108	* src/prog.c (code_immediate): Rename to code_immediat_stkval.
1109	(code_put): Rename to code_put_stkval.
1110	* src/drivers.c: Use typed calls to code_immediate and code_put
1111	* src/gram.y: Likewise.
1112
1113	* src/main.c: Allocate mu_log_tag.
1114
11152016-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>
1116
1117	Bugfixes
1118
1119	* lib/mfgetopt.c (mf_getopt): Initialize cfhint.flags
1120	* src/symbols.c (free_symbols): Free buckets after freeing
1121	everything else.
1122
1123	Minor fix
1124
1125	* lib/dns.c: Use stat.res_h_errno instead of the global h_errno.
1126
11272016-11-09  Sergey Poznyakoff  <gray@gnu.org>
1128
1129	Version 8.0
1130
1131	Minor fixes
1132
1133	Update docs
1134
1135	Update docs
1136
1137	* doc/mailfromd.texi: Document the single configuration file.
1138	* doc/calloutd.texi: Update.
1139	* doc/mfdbtool.texi: Update.
1140	* doc/pmult.texi: Update.
1141	* pmult/pmult.c: Use the common configuration file.  Support
1142	database-related configuration statements for compatibility with
1143	other mailfromd utilities.
1144	* src/mfdbtool.c: compatibility fix: --predict implies --list.
1145
11462016-11-08  Sergey Poznyakoff  <gray@gnu.org>
1147
1148	Use single configuration file.
1149
1150	* lib/libmf.h (MF_GETOPT_DEFAULT)
1151	(MF_GETOPT_IN_ORDER,MF_GETOPT_NO_CONFIG): New flags.
1152	(mf_getopt): Change signature.
1153	* lib/mfgetopt.c (mf_getopt): Remove the cfile parameter.
1154	Change semantics of the 5th parameter (inorder -> flags).
1155
1156	* mtasim/mtasim.c: Change call to mf_getopt.
1157	* pmult/pmult.c: Likewise.
1158	* src/calloutd.c: Likewise.
1159	* src/main.c: Likewise.
1160	* src/mfdbtool.c: Likewise.
1161
11622016-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
1163
1164	Fix mfdbtool.
1165
1166	* lib/db.c (mf_database_mode): New global variable.
1167	(mf_dbm_open): Remove "mode" parameter.  Use mf_database_mode.
1168	(db_expire_func): Fix passing the datum size.
1169	(db_compact): Preserve mode and ownership of the database.
1170	* lib/dbcfg.c (cb_database_mode): New function.
1171	* lib/mfdb.h (mf_database_mode): New extern.
1172	(mf_dbm_open): Change signature.
1173	(cb_database_mode): New proto.
1174
1175	* src/mfdbtool.c (mfdbtool_cfg_param): New statement "database-mode".
1176	Read configuration from /etc/mailfromd.conf
1177	* src/srvcfg.c (srv_cfg_param): Likewise.
1178
1179	* lib/cache.c: Update calls to mf_dbm_open.
1180	* lib/rate.c: Likewise.
1181	* lib/tbf_rate.c: Likewise.
1182
1183	mfdbtool: add missing options
1184
11852016-11-07  Sergey Poznyakoff  <gray@gnu.org.ua>
1186
1187	Require mailutils 3.0; update documentation
1188
11892016-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
1190
1191	Follow Mailutils commit dc62b399
1192
11932016-10-31  Sergey Poznyakoff  <gray@gnu.org>
1194
1195	Bugfixes
1196
1197	* gacopyz/server.c (gacopyz_srv_reply): Return entire
1198	buffer.
1199	* pmult/pmult.c (collect_symlists): Don't attempt to print empty
1200	client name.
1201	(main): Read mailutils configuration file.
1202	* src/srvcfg.c (mfd_capa_server): Don't register srv_cfg_param.
1203	It pertains to canned section.
1204
12052016-10-30  Sergey Poznyakoff  <gray@gnu.org>
1206
1207	Version 7.99.97
1208
1209	Minor fix
1210
1211	* lib/libmf.h: Include limits.h
1212
1213	Get rid of obstack; use mu_opool_t instead
1214
1215	* configure.ac: Remove checks for obstack.
1216	Require Mailutils 2.99.993
1217	* lib/Makefile.am: Remove obstack.
1218	* lib/obstack.c: Delete.
1219	* lib/obstack.h_: Delete.
1220	* po/POTFILES.in: Remove obstack.
1221
1222	* lib/mfgetopt.c (mf_getopt): Bugfix: initialize flags.
1223
1224	* lib/db.c: Use mu_opool_t instead of obstack.
1225	* mtasim/mtasim.c: Likewise.
1226	* pmult/pmult.c: Likewise.
1227	* src/callout.c: Likewise.
1228	* src/callout.h: Likewise.
1229	* src/engine.c: Likewise.
1230	* src/gram.y: Likewise.
1231	* src/lex.l: Likewise.
1232	* src/mailfromd.h: Likewise.
1233	* src/pragma.c: Likewise.
1234	* src/prog.c: Likewise.
1235	* src/spf.c: Likewise.
1236	* src/symbols.c: Likewise.
1237
12382016-10-29  Sergey Poznyakoff  <gray@gnu.org>
1239
1240	Minor fixes
1241
12422016-10-28  Sergey Poznyakoff  <gray@gnu.org>
1243
1244	Finish conversion.  Version 7.99.96
1245
12462016-10-24  Sergey Poznyakoff  <gray@gnu.org>
1247
1248	Convert mailfromd to new interface.
1249
1250	Start transition to mu_cli interface
1251
1252	* configure.ac: Require mailutils 2.99.991
1253
1254	* src/main.c: Start transition to mu_cli
1255	* lib/optcache.c: Remove file.
1256	* lib/Makefile.am (optcache.c): Remove.
1257	* lib/libmf.h: Remove optcache prototypes.
1258	* lib/dbcfg.c: Convert to mu_option.
1259	* lib/utils.c: Likewise.
1260	* src/builtin/dns.bi: Likewise.
1261	* src/builtin/io.bi: Likewise.
1262	* src/builtin/mbox.bi: Likewise.
1263	* src/builtin/msg.bi: Likewise.
1264	* src/mfdbtool.c: Likewise.
1265	* src/savsrv.c: Likewise.
1266	* src/srvcfg.c: Likewise.
1267	* src/srvcfg.h: Likewise.
1268
12692016-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
1270
1271	Minor fixes
1272
1273	* lib/dns.c (mf_to_dns_status): New function.
1274	* lib/libmf.h (mf_to_dns_status): New proto.
1275	* lib/cache.c: Fix conversions.
1276	* lib/rate.c: Fix conversions.
1277	* lib/vercmp.c: Fix conversions.
1278	* src/builtin/dns.bi: Fix conversions.
1279	* src/builtin/string.bi: Fix conversions.
1280	* src/drivers.c: Fix conversions.
1281	* src/exclist.c: Fix conversions.
1282	* src/main.c: Fix conversions.
1283	* src/prog.c: Fix conversions.
1284	* tests/trycatch05.at: Print first field of wc output.
1285	* tests/trycatch06.at: Likewise.
1286	* tests/trycatch07.at: Likewise.
1287	* tests/trycatch08.at: Likewise.
1288	* tests/trycatch09.at: Likewise.
1289	* tests/trycatch10.at: Likewise.
1290	* tests/trycatch11.at: Likewise.
1291	* tests/trycatch12.at: Likewise.
1292	* tests/trycatch13.at: Likewise.
1293	* tests/trycatch14.at: Likewise.
1294	* tests/trycatch15.at: Likewise.
1295	* tests/trycatch16.at: Likewise.
1296	* tests/version.at: Compatibility fix in sed expression.
1297
12982016-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>
1299
1300	Minor changes (mostly po-related)
1301
13022016-08-01  Sergey Poznyakoff  <gray@gnu.org.ua>
1303
1304	Make listen(2) backlog size configurable.
1305
1306	* lib/srvman.c (mfd_server_set_backlog): New function.
1307	* lib/srvman.h: Likewise.
1308	* src/srvcfg.c (server_section_param): New statement: "backlog"
1309	* src/srvcfg.h (mf_srvcfg) <backlog>: New member.
1310
1311	* doc/mailfromd.texi: Document the backlog statement.
1312	* NEWS: Mention the backlog statement.
1313
13142016-07-06  Sergey Poznyakoff  <gray@gnu.org.ua>
1315
1316	Fix documentation of spf_explanation.
1317
1318	Bugfix
1319
1320	* gacopyz/server.c (gacopyz_srv_connect): Fix memory allocation error.
1321
1322	Handle multiple strings in SPF records.
1323
1324	* lib/dns.c (cname_loop_body): Concatenate multiple strings of
1325	a TXT record (RFC 7208, 3.3)
1326
13272016-04-26  Sergey Poznyakoff  <gray@gnu.org>
1328
1329	Improve previous commit.
1330
1331	* src/builtin/spf.bi (update_spf_vars): Add trailing null character.
1332	* src/spf.c (mech_include): Remove any mechanisms saved during
1333	call to spf_check_host_internal if the result qualifies as
1334	not matching.
1335
13362016-04-20  Sergey Poznyakoff  <gray@gnu.org>
1337
1338	List all traversed mechanisms in the spf_mechanism built-in variable.
1339
1340	* src/builtin/spf.bi (update_spf_vars): Concatenate all
1341	traversed mechanisms.
1342	* src/spf.c (spf_data): Replace exp, mech, ttl with a pointer to
1343	answer.
1344	(UPDATE_ANSWER_TTL): New macro.  Use it instead of UPDATE_TTL
1345	throughout this source.
1346	(spf_data_init): Take spf_answer_t * as 2nd argument.  All uses
1347	changed.
1348	(mech_include,mod_redirect): Propagate pointer to original spf_answer_t
1349	through subordinate spf_check_host_internal calls.
1350	(mod_exp): Expand text here.
1351	(spf_eval_record): Trace traversed mechanisms.
1352	(spf_answer_free): Free mechv array
1353	(spf_answer_add_mech): New function.
1354	* src/spf.h (spf_answer_t): Remove mech.
1355	New members: mechv, mechn, mechmax.
1356	(spf_answer_add_mech): New proto.
1357
1358	* doc/functions.texi: Document changes to the spf_mechanism
1359	built-in variable.
1360	* NEWS: Update.
1361
13622016-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
1363
1364	Bugfixes
1365
1366	* configure.ac: Fix the --with-dspam option.
1367	* doc/mailfromd.texi: Update postfix-related info.
1368
13692016-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1370
1371	Prevent NULL dereferencing when attempting to remove an unexistent symtab entry.
1372
1373	* lib/symtab.c (symtab_remove): Return if no matching entry
1374	was found.
1375
13762016-03-03  Sergey Poznyakoff  <gray@gnu.org>
1377
1378	Minor fix in pmult
1379
1380	* pmult/pmult.c: PM_MAX_MACROS was renamed to PM_MACROS_MAX.
1381
13822016-03-02  Sergey Poznyakoff  <gray@gnu.org>
1383
1384	Fix compilation of pmult with MeTA1 1.0.0.0
1385
1386	* configure.ac: In MeTA1 1.0.0.0 librcbcomm was renamed to rcbcommr,
1387	and librcb - to librcbr.
1388	* pmult/pmult.c [!PM_MAX_MACROS] (PM_MAX_MACROS): Provide default.
1389	(SM_ONERROR_ACTION): Expect const char * from smerr2txt.
1390	(pmult_connect, pmult_rcpt): Use snprintf instead of umaxtostr.
1391	(main): Call mu_set_program_name.
1392	* doc/pmult.texi: Improve pmult documentation.
1393
1394	Fix coredump:
1395
1396	* gacopyz/server.c (gacopyz_srv_clear_macros_pred): Rearrange
1397	the array after removing elements.
1398
13992016-02-17  Sergey Poznyakoff  <gray@gnu.org.ua>
1400
1401	Update copyright years
1402
1403	Fix type-related warnings.
1404
14052015-11-12  Sergey Poznyakoff  <gray@gnu.org>
1406
1407	Fix C unescaping in lex code.
1408
1409	The mailutils commit f160ca75 changed return code of
1410	mu_wordsplit_c_unquote_char.  This commit modifies the code
1411	accordingly.
1412
1413	* src/lex.l (c_unescape): New function.  Use instead of
1414	mu_wordsplit_c_unquote_char throughout the code.
1415	(QML line): remove spurious backslash.
1416
1417	Fix build with dspam and geoip
1418
1419	* src/builtin/dspam.bi: Fix the use of MF_VAR_REF.
1420	* src/builtin/geoip.bi: Use MF_RETURN.
1421
14222015-11-11  Sergey Poznyakoff  <gray@gnu.org>
1423
1424	bootstrap: pull submodules
1425
14262015-09-15  Sergey Poznyakoff  <gray@gnu.org>
1427
1428	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd
1429
1430	Version 7.99.94
1431
1432	* configure.ac: Version 7.99.94; Require Mailutils 2.99.99,
1433	use gettext 0.16
1434	* NEWS: Update.
1435	* etc/rc.in: Rewrite mailfromd_status
1436	* gacopyz/Makefile.am (AM_CPPFLAGS): Add /lib
1437	* src/builtin/io.bi (open_program_stream_ioe): Disable C escapes
1438	when splitting the command line.
1439	* src/srvcfg.c (mf_srvcfg_init): Update call to mu_register_argp_capa
1440
14412015-08-07  Sergey Poznyakoff  <gray@gnu.org.ua>
1442
1443	Fix typos.
1444
1445	Thanks to Andres Jonsson.
1446
14472015-07-11  Sergey Poznyakoff  <gray@gnu.org.ua>
1448
1449	Minor changes
1450
1451	* Makefile.am: Fix path to git2chg.awk
1452	* lib/dns.c (domain_name_cmp): Use case-insensitive comparison
1453
14542015-04-27  Sergey Poznyakoff  <gray@gnu.org.ua>
1455
1456	Update docs
1457
1458	* NEWS: Document new functions.
1459	* doc/functions.texi: Fix typos.
1460	* doc/mailfromd.texi: Likewise.
1461
1462	Update copyright years
1463
1464	Avoid casts between pointers and integers (mtasim)
1465
1466	* mtasim/mtasim.c (_def_write, _def_read, _def_close): SD points to
1467	file handle.
1468	(mta_daemon,mta_stdio): Change initialization of in and out.
1469
1470	Avoid casts between pointers and integers (group lists)
1471
1472	* lib/libmf.h (mf_gid_list): New datatype.
1473	(mf_gid_list_alloc,mf_gid_list_free)
1474	(mf_gid_list_dup,mf_gid_list_add)
1475	(mf_gid_list_array): New functions.
1476	(switch_to_privs,get_user_groups): Change signature.
1477	* lib/server.c (mf_server_retain_groups): Change type.
1478	* lib/userprivs.c (mf_gid_block,mf_gid_list): New struct.
1479	(mf_gid_list_alloc,mf_gid_list_free)
1480	(mf_gid_list_dup,mf_gid_list_add)
1481	(mf_gid_list_array): New functions.
1482	(get_user_groups): Rewrite.
1483	(switch_to_privs): Take pointer to mf_gid_list as its
1484	last argument.
1485	(grouplist_translate): Rewrite.
1486	* mtasim/mtasim.c (grouplist): Change type. All uses updated.
1487	* src/srvcfg.c (mf_option_group): Rewrite.
1488
1489	Avoid casts between pointers and integers (optcache)
1490
1491	* lib/libmf.h (mf_option_value): Union.
1492	(mf_option_cache): Rearrange members.
1493	(handler,set): Change signature.
1494	(isset): New member.
1495	(mf_optcache_set_option): Change signature.
1496	(mf_option_string,mf_option_boolean): Likewise.
1497	(mf_option_time_t,mf_option_size_t): Remove.
1498	(mf_option_timeout,mf_option_size): New prototypes.
1499	* lib/optcache.c (optcache_dup): Clear isset member for each element.
1500	(mf_optcache_set_option): Rewrite.
1501	(mf_option_string, mf_option_boolean): Rewrite.
1502	(mf_option_time_t,mf_option_size_t): Remove.
1503	(mf_option_timeout,mf_option_size): New functions.
1504
1505	* lib/utils.c: Change the use of mf_optcache functions.
1506	* src/main.c: Likewise.
1507	* src/mfdbtool.c: Likewise.
1508	* src/srvcfg.c: Likewise.
1509
1510	Avoid casts between pointers and integers (prog & runtime).
1511
1512	* src/prog.h (mf_stkval): New data type.
1513	(STKVAL): Redefine as union mf_stkval.
1514	(mft_ptr,mft_str,mft_int)
1515	(mft_uint,mft_long,mft_ulong)
1516	(mft_size,mft_string,mft_number): New data types.
1517	(mf_cat,mf_c_val): New macros.
1518	(instr_t): Moved from mailfromd.h
1519	(mf_code_cell): New union
1520	(mf_code_cell_t): New typedef.
1521	(mf_cell_instr,mf_cell_value)
1522	(mf_cell_c_value): New macros
1523	(code_peek): Moved from mailfromd.h. Change return type;
1524	(code_immediate,code_put): Moved from mailfromd.h. Change signature.
1525	(code_op,code_instr,code_exmask)
1526	(code_get_counter,dump_code,fixup_code): Moved from mailfromd.h.
1527	(prog): Change type.
1528	* src/prog.c: Use mf_c_val to extract C values from STKVAL.
1529	(get_immediate): Return STKVAL.
1530	(prog): Change type
1531	(code_cell): New function.
1532	(code_instr): Rewrite using code_cell
1533	(code_immediate): Likewise. Change argument type.
1534	(code_exmask): Use proper typecast.
1535	(code_put): Change argument type.
1536	(code_peek): Change return type.
1537	(runtime_stack_trace): Use mf_cell_instr to access instruction
1538	pointer.
1539	* src/mailfromd.h (yyerror): Change signature.
1540	(instr_t): Move to prog.h
1541	(code_put,code_peek,code_reserve)
1542	(code_immediate,code_op,code_instr)
1543	(code_exmask,code_get_counter)
1544	(dump_code,fixup_code): Move to prog.h
1545	* src/exclist.c: Use mf_c_val
1546	* src/gram.y (yyerror): Change signature.
1547	(mailfromd_run): Use mf_c_val to extract actual value.
1548
1549	* doc/functions.texi (body_has_nulls): Fix return type.
1550
1551	* src/builtin/snarf.m4 (__mf_defun): Define __MF_RETTYPE__
1552	(MF_RETURN): Take optional second argument (return type).
1553	Decide what push function to use and what type to cast the
1554	value to depending on its value and that of __MF_RETTYPE__.
1555	(MF_RETURN_STRING): Remove.
1556	(MF_RETURN_OBSTACK): Explicitly declare return type as STKVAL.
1557	(MF_VAR_REF): Take two or three arguments (second one declaring
1558	value type).
1559	(MF_ALLOC_HEAP_TEMP):
1560	(MF_VAR_STRING): Update.
1561	(END): Popdef __MF_RETTYPE__.
1562	* src/builtin/body.bi: Use MF_RETURN.
1563	(body_has_nulls): Fix return type.
1564	* src/builtin/burst.bi: Use MF_RETURN.
1565	* src/builtin/callout.bi: Likewise.
1566	* src/builtin/ctype.bi: Likewise.
1567	* src/builtin/curhdr.bi: Likewise.
1568	* src/builtin/db.bi: Likewise.
1569	* src/builtin/debug.bi: Likewise.
1570	* src/builtin/dns.bi: Likewise.
1571	* src/builtin/email.bi: Likewise.
1572	* src/builtin/geoip.bi: Likewise.
1573	* src/builtin/getopt.bi: Likewise.
1574	* src/builtin/gettext.bi: Likewise.
1575	* src/builtin/io.bi: Likewise.
1576	* src/builtin/ipaddr.bi: Likewise.
1577	* src/builtin/macro.bi: Likewise.
1578	* src/builtin/msg.bi: Likewise.
1579	* src/builtin/sa.bi: Likewise.
1580	* src/builtin/spf.bi: Likewise.
1581	* src/builtin/string.bi: Likewise.
1582	* src/builtin/system.bi: Likewise.
1583	* src/builtin/vars.bi: Likewise.
1584
1585	* src/drivers.c: Use proper typecasts when calling code_* functions.
1586	* src/optab.opc (scan_code): Use mf_cell_c_value to inspect
1587	prog[].
1588
15892015-04-24  Sergey Poznyakoff  <gray@gnu.org>
1590
1591	Minor change
1592
1593	Implement change sender function.
1594
1595	* gacopyz/gacopyz.c (gacopyz_argn_command): New function.
1596	(gacopyz_add_rcpt_par, gacopyz_chgfrom): Use gacopyz_argn_command.
1597
1598	* src/builtin/Makefile.am (BI_FILES): Add from.bi
1599	* src/builtin/from.bi: New file.
1600
1601	* src/mailfromd.h (msgmod_opcode) <set_from>: New opcode.
1602	* src/engine.c (run_msgmod): Support set_from.
1603	(smfilter): Announce SMFIF_CHGFROM flag.
1604	* src/gram.y (msgmod_opcode_str): Support set_from.
1605
1606	* NEWS: Update.
1607	* doc/functions.texi: Document set_from.
1608
16092015-04-23  Sergey Poznyakoff  <gray@gnu.org.ua>
1610
1611	Fix doc generation.
1612
1613	Default Config file applied to all output formats, which is wrong.
1614	Use a dedicated configuration file for html output formats, and
1615	defaults for the rest.
1616
1617	* doc/Makefile.am (GENDOCS): Add html-specific configuration file.
1618	* doc/Config: Rename to doc/html.init (with changes).
1619	* doc/functions.texi: Fix sectioning.
1620	* doc/mailfromd.texi: Likewise.
1621
16222015-03-01  Sergey Poznyakoff  <gray@gnu.org>
1623
1624	Switch to Texinfo 5.0
1625
1626	* doc/Config: Rewrite.
1627	* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
1628	* doc/gendocs_template: Ps is not built
1629	* imprimatur: Upgrade.
1630
16312014-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1632
1633	Minor fix (remove unused static function)
1634
1635	New function message_body_is_empty
1636
1637	* src/builtin/msg.bi (DCL_BODY_HDR): New m4 macro.
1638	(message_body_is_empty): New function.
1639
1640	* NEWS: Mention message_body_is_empty
1641	* doc/functions.texi: Document message_body_is_empty
1642
1643	* tests/nulmsg.at: New  testcase.
1644	* tests/Makefile.am: Add new test.
1645	* tests/testsuite.at: Likewise.
1646
16472014-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
1648
1649	Bugfix
1650
1651	* src/builtin/mbox.bi (mailbox_open): Fix the use of the perms
1652	argument.
1653	* doc/functions.texi: Document last argument to mailbox_open.
1654
16552014-08-27  Sergey Poznyakoff  <gray@gnu.org>
1656
1657	get translations from TP during bootstrapping
1658
16592014-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>
1660
1661	Bugfixes.
1662
1663	* src/pp.c (stderr_redirector): Fix reading loop.
1664	* src/savsrv.c (callout_session_server): Likewise.
1665
16662013-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
1667
1668	Get rid of gnulib.
1669
1670	* .gitmodules: Remove gnulib.
1671	* gnulib: Remove.
1672	* gnulib.modules: Remove.
1673	* Makefile.am: Remove gnulib. Use git2chg.awk to create
1674	ChangeLog.
1675	* bootstrap: Rewrite.
1676	* bootstrap.conf: Remove.
1677	* configure.ac: Update.
1678	* gacopyz/Makefile.am (AM_CPPFLAGS): Update.
1679	* git2chg.awk: New file.
1680	* lib/Makefile.am: Remove dependencies on gnulib.
1681	* mtasim/Makefile.am: Likewise.
1682	* pmult/Makefile.am: Likewise.
1683	* src/Makefile.am: Likewise.
1684	* src/builtin/Makefile.am: Likewise.
1685
1686	* lib/gettext.h: New file.
1687	* lib/.gitignore: New file.
1688	* lib/obstack.c: New file.
1689	* lib/obstack.h_: New file.
1690
1691	* lib/ftimestr.c (format_time_str): Rewrite using
1692	strftime and statically allocated buffer.
1693	* lib/libmf.h (transform_error_string): Change return
1694	type (const char *).
1695	* lib/proctitle.c: Rewrite using statically allocated
1696	buffer.
1697	* lib/transform.c: Use mu_ allocation and ctype functions.
1698	(transform_error_string): Use statically allocated buffer.
1699	Return a pointer to its content.
1700	* mtasim/mtasim.c Use mu_ allocation and ctype functions.
1701	(save_cwd, restore_cwd): New functions
1702
1703	* lib/db.c: Use mu_ allocation and ctype functions.
1704	* lib/dbcfg.c: Likewise.
1705	* lib/dict.c: Likewise.
1706	* lib/dns.c: Likewise.
1707	* lib/namefixup.c: Likewise.
1708	* lib/optcache.c: Likewise.
1709	* lib/parsetime.c: Likewise.
1710	* lib/server.c: Likewise.
1711	* lib/srvman.c: Likewise.
1712	* lib/userprivs.c: Likewise.
1713	* lib/utils.c: Likewise.
1714	* pmult/pmult.c: Likewise.
1715	* src/bitmask.h: Likewise.
1716	* src/builtin/burst.bi: Likewise.
1717	* src/builtin/ctype.bi: Likewise.
1718	* src/builtin/db.bi: Likewise.
1719	* src/builtin/dns.bi: Likewise.
1720	* src/builtin/dspam.bi: Likewise.
1721	* src/builtin/getopt.bi: Likewise.
1722	* src/builtin/getpw.bi: Likewise.
1723	* src/builtin/mbox.bi: Likewise.
1724	* src/builtin/msg.bi: Likewise.
1725	* src/builtin/sprintf.bi: Likewise.
1726	* src/callout.h: Likewise.
1727	* src/calloutd.c: Likewise.
1728	* src/deprecation.c: Likewise.
1729	* src/engine.c: Likewise.
1730	* src/exclist.c: Likewise.
1731	* src/gram.y: Likewise.
1732	* src/lex.l: Likewise.
1733	* src/mailfromd.h: Likewise.
1734	* src/main.c: Likewise.
1735	* src/mfdbtool.c: Likewise.
1736	* src/pp.c: Likewise.
1737	* src/pragma.c: Likewise.
1738	* src/prog.c: Likewise.
1739	* src/srvcfg.c: Likewise.
1740	* src/stack.c: Likewise.
1741	* src/symbols.c: Likewise.
1742
1743	* src/callout.c: Likewise.
1744	* po/.gitignore: Update.
1745	* po/Makevars: New file.
1746	* src/builtin/io.bi: Use mu_ allocation and ctype functions.
1747	(stderr_to_log): Use fgets instead of getline.
1748	* src/builtin/system.bi (strftime): Use statically allocated buffer
1749	and strftime.
1750	* src/savsrv.c: Use mu_ allocation and ctype functions.
1751	(trimcrlf): Return 0 if theCR(LF) has been removed and 1 otherwise.
1752	(callout_session_server): Use statically allocated buffer. Reject
1753	input lines that are longer than allowed by its capacity.
1754	* src/spf.c: Use mu_ allocation and ctype functions.
1755	(scanback): New function.
1756	(spf_reverse,spf_truncate): Use scanback instead of memrchr.
1757
17582013-07-30  Sergey Poznyakoff  <gray@gnu.org.ua>
1759
1760	Document testsuite
1761
1762	* tests/testsuite.at: Add banners
1763
17642013-07-29  Sergey Poznyakoff  <gray@gnu.org.ua>
1765
1766	Provide built-ins for effective handling of large message bodies.
1767
1768	* src/mailfromd.h (body_repl_fd): New opcode.
1769	* src/engine.c (run_msgmod): Handle body_repl_fd.
1770	* src/gram.y (msgmod_opcode_str): Handle body_repl_fd.
1771	* gacopyz/gacopyz.c (gacopyz_replace_body_fn)
1772	(gacopyz_replace_body_fd): New functions.
1773	(gacopyz_replace_body): Rewrite using gacopyz_replace_body_fn.
1774	* gacopyz/gacopyz.h (gacopyz_replace_body_fn)
1775	(gacopyz_replace_body_fd): New protos.
1776	* src/builtin/body.bi (replbody_fd): New built-in function.
1777	* src/builtin/io.bi (open_program_stream_ioe): New static.
1778	(open_program_stream): Rewrite via open_program_stream_ioe.
1779	(spawn, write_body): New built-in functions.
1780	* src/builtin/system.bi (unlink): New built-in function.
1781	* NEWS: Update.
1782	* doc/functions.texi: Document the new functions.
1783
17842012-12-30  Sergey Poznyakoff  <gray@gnu.org.ua>
1785
1786	Use AM_CPPFLAGS instead of INCLUDES in Makefiles.
1787
17882012-11-03  Sergey Poznyakoff  <gray@gnu.org.ua>
1789
1790	Fix communication with a program invoked via open().
1791
1792	* src/builtin/io.bi (REDIRECT_STDOUT_P): Fix.
1793	(open_program_stream): Remove improper calls to close().
1794	(open): Implement the |< prefix to open read-only communication
1795	with the invoked program.
1796	* doc/functions.texi: Document the |< prefix.
1797	* NEWS: Update.
1798	* THANKS: Mention Mehmet Tolga Avcioglu.
1799
18002012-09-02  Sergey Poznyakoff  <gray@gnu.org.ua>
1801
1802	Fix `next' in do-while loops.
1803
1804	The next keyword would incorrectly bypass the conditional in
1805	do-while loops.
1806
1807	* src/drivers.c (code_type_loop): Fix jump target for `next' to
1808	include end of loop conditional.
1809	* tests/next03.at: New test case.
1810	* tests/Makefile.am (TESTSUITE_AT): Add next03.at
1811	* tests/testsuite.at: Include next03.at
1812
1813	* tests/next01.at: Fix keywords.
1814	* tests/next02.at: Likewise.
1815	* tests/trycatch07.at: Likewise.
1816	* tests/trycatch08.at: Likewise.
1817	* tests/trycatch11.at: Likewise.
1818	* tests/trycatch12.at: Likewise.
1819	* tests/trycatch15.at: Likewise.
1820	* tests/trycatch16.at: Likewise.
1821
1822	* NEWS: Update.
1823
18242012-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
1825
1826	Improve DSN API.
1827
1828	* src/builtin/mail.bi (add_headers): Append headers to existing ones,
1829	instead of replacing them.
1830	Unref the header stream.
1831	(mime_create_quote): Skip envelope (UNIX From ) line.
1832	(create_dsn): New function.
1833
18342012-08-06  Sergey Poznyakoff  <gray@gnu.org.ua>
1835
1836	Rename header_rename_* functions to header_prefix_*
1837
1838	* mflib/header_rename.mf4 (header_rename_all): Rename to header_prefix_all.
1839	(header_rename_pattern): Rename to header_prefix_pattern.
1840	* NEWS: Likewise.
1841	* doc/functions.texi: Likewise.
1842
18432012-08-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1844
1845	Implement functions for modifying headers addressed by their number. Improve header renaming functions.
1846
1847	* NEWS: Updated.
1848	* doc/functions.texi: Updated.
1849	* mflib/header_rename.mf4: Rewrite from scratch.
1850	* src/builtin/curhdr.bi (get_current_header): Remove,
1851	use env_get_header instead. All uses changed.
1852	* src/builtin/header.bi (header_delete_nth)
1853	(header_replace_nth): New built-ins.
1854	* src/builtin/snarf.m4 (MF_CAPTURE): Accept opional argument.
1855	All uses updated.
1856	* src/builtin/vars.bi (sendmail_header_count): New variable.
1857	(get_sendmail_header_count)
1858	(set_sendmail_header_count): New functions.
1859	* src/engine.c (message_data) <hdrtrans,hdrcount>: New members.
1860	(test_message_data_init,priv_get): Initialize hdrtrans and hdrcount.
1861	(priv_store_msgmod_closure): Name can be NULL.
1862	(filter_cleanup): Free hdrtrans.
1863	(run_msgmod) <header_insert>: Adjust header number by the value of
1864	sendmail_header_count variable.
1865	Handle header_replace_nth and header_delete_nth opcodes.
1866	* src/gram.y (msgmod_opcode_str): Handle header_replace_nth and
1867	header_delete_nth opcodes.
1868	* src/mailfromd.h (msgmod_opcode) <header_delete_nth>
1869	<header_replace_nth>: New opcodes.
1870	(get_sendmail_header_count)
1871	(set_sendmail_header_count)
1872	(env_get_header): New protos.
1873	* src/prog.c (eval_environ) <header>: New member.
1874	(env_capture_start): Initialize header.
1875	(env_get_header): New function.
1876	(env_msgmod): Name can be NULL.
1877	(destroy_environment): Destroy the header.
1878
18792012-08-04  Sergey Poznyakoff  <gray@gnu.org.ua>
1880
1881	Fix trace output.
1882
1883	The c-escape filter used by the trace output stream suppresses
1884	newlines in output.  This is harmless when the output goes to
1885	syslog, but when it goes to stderr, all trace lines get concatenated
1886	into a single one on output.  To fix this, newline has to be sent
1887	directly to the underlying stream, bypassing the filter.
1888
1889	* src/main.c (trace): Send newline bypassing the c-escape
1890	filter (which would have converted it to the "\n" sequence).
1891	This requires MU commit 1cbbd572.
1892
18932012-07-15  Sergey Poznyakoff  <gray@gnu.org.ua>
1894
1895	Upgrade imprimatur.
1896
18972012-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
1898
1899	Minor fix.
1900
1901	* lib/db.c (db_compact): Do not unlink prior to renaming.
1902
1903	mfdbtool: fix creating the database when compacting
1904
1905	This requires MU 5eb34056 or later.
1906
1907	* lib/db.c (make_tmp_name): Prefer changing the suffix when
1908	creating temporary db name.
1909	(db_compact): Make sure file mode and owner are preserved.
1910	Use actual file name (as opposed to eventual URL) when renaming.
1911
19122012-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
1913
1914	Bugfix
1915
1916	* mflib/Makefile.am (EXTRA_DIST): Add dspam.mf
1917
1918	Restore legacy lock-* configuration statements.
1919
1920	* lib/libmf.h (config_cb_lock_retry_count)
1921	(config_cb_lock_retry_timeout)
1922	(mf_option_size_t,mf_init_lock_options): New prototypes.
1923	* lib/optcache.c (mf_option_size_t): New function.
1924	* lib/utils.c (config_cb_lock_retry_count)
1925	(config_cb_lock_retry_timeout)
1926	(mf_init_lock_options): New functions.
1927	* src/main.c (mf_cfg_param): Restore lock-retry-count and
1928	lock-retry-timeout for backward compatibility.
1929	(main): Call mf_init_lock_options.
1930	* src/mfdbtool.c (mfdbtool_cfg_param): Restore lock-retry-count and
1931	lock-retry-timeout for backward compatibility.
1932	(main): Call mf_init_lock_options.
1933	* src/calloutd.c: Likewise.
1934
1935	* lib/close-fds.c (close_fds_except): Don't access FD_SET unless
1936	i is less than FD_SETSIZE.
1937
1938	Fix database expiration in mfdbtool.
1939
1940	* NEWS: Version 7.99.92
1941	* configure.ac: 7.99.92
1942	* lib/db.c (make_tmp_name): Don't assume additional directories.
1943	* lib/mfdb.h (db_expire_t): Change signature.  All uses updated.
1944
19452012-02-08  Sergey Poznyakoff  <gray@gnu.org.ua>
1946
1947	Fix circular dependency in Makefiles.
1948
1949	This fixes 2ef494a7.  Make should process the mflib directory
1950	before src, because the latter relies on status.ex being built.
1951	On the other hand, mf sources in mflib have to be linted on
1952	make check.  The solution runs as follows: (1) mflib appears in
1953	SUBDIRS before src, and (2) src/Makefile.am runs make lint in
1954	../mflib on make check.
1955
1956	* Makefile.am (SUBDIRS): Restore mflib to its proper place.
1957	* mflib/Makefile.am (check-am): Remove rule.
1958	* src/Makefile.am (check-am): New rule.  Run make lint in mflib.
1959
1960	Fix ipv6 configuration test.
1961
19622012-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
1963
1964	Implement ltrim and rtrim
1965
1966	* src/builtin/string.bi (ltrim, rtrim): New functions.
1967	* NEWS: List new functions.
1968	* doc/functions.texi: Document new functions.
1969
19702012-02-03  Sergey Poznyakoff  <gray@gnu.org.ua>
1971
1972	Fix argument expansion in pragmas.
1973
1974	* src/pragma.c (expand_string): Fix expansion of quoted strings.
1975
1976	Fix database privileges in dbfirst.
1977
1978	* src/builtin/db.bi (dbfirst): Get db mode from the properties,
1979	use DEFAULT_DB_MODE if these are not defined.
1980
19812011-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
1982
1983	Version 7.99.91
1984
1985	More fixes.  Use mu_list_foreach instead of mu_list_do.
1986
1987	* Makefile.am (SUBDIRS): Use mflib after src, so that make check uses
1988	the freshly built version of mailfromd.
1989	* lib/userprivs.c: Use mu_list_foreach instead of mu_list_do
1990	* mtasim/mtasim.c: Likewise.
1991	* pmult/pmult.c: Likewise.
1992	* src/builtin/mbox.bi: Likewise.
1993	* src/builtin/msg.bi: Likewise.
1994	* src/engine.c: Likewise.
1995	* src/gram.y: Likewise.
1996	* src/main.c: Likewise.
1997	* src/pp.c: Likewise.
1998
1999	Bugfixes.
2000
2001	* configure.ac: Fix mu info test.
2002	* lib/db.c: Add default safety flags to mu_dbm_create* calls.
2003	* src/builtin/db.bi: Likewise.
2004
20052011-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2006
2007	Improve handling of database security flags.
2008
2009	* src/builtin/db.bi (db_prop)<hint>: New member.
2010	(dbprop): Accept additional "hint" argument.
2011	(_mf_dbm_open): Rename to _open_dbm (all uses changed). Get safety flags
2012	from the created DB and augment them with bits deduced from the file mode.
2013	* src/srvcfg.c (mf_srvcfg_flush): Add default parameters to the database
2014	URL hint.
2015
2016	Bugfixes
2017
2018	* lib/db.c (mf_dbm_open): Destroy db after failed attempt to open it.
2019	* src/builtin/db.bi (_mf_dbm_open): Likewise.
2020	(dbmap_lookup): Take db_prop as an additional argument.  Use its mode
2021	field for opening.
2022	Fix improper conditional.
2023
2024	Switch to libmu_dbm for DBM support.
2025
2026	* configure.ac (DEFAULT_DB_TYPE): New variable.
2027	Use mu info to determine which DBM is supported.
2028	* lib/Makefile.am (noinst_LIBRARIES): Remove libdbm.a
2029	* lib/mf-dbm.c: remove.
2030	* lib/mf-dbm.h: remove.
2031	* lib/cache.c: Use libmu_dbm functions.
2032	* lib/db.c: Likewise.
2033	* lib/dbcfg.c: Likewise.
2034	* lib/greylist.c: Likewise.
2035	* lib/rate.c: Likewise.
2036	* lib/tbf_rate.c: Likewise.
2037	* src/builtin/db.bi: Likewise.
2038	* src/savsrv.c: Likewise.
2039	* src/srvcfg.c (srv_cfg_param) <database-type>: New statement.
2040	* lib/libmf.h (config_cb_ignore): New proto.
2041	* lib/mfdb.h (db_item_printer_t): Change signature.
2042	* lib/utils.c (config_cb_ignore): New function.
2043	* po/POTFILES.in: Update.
2044	* src/Makefile.am (mailfromd_LDADD)
2045	(calloutd_LDADD): Remove libdbm.a.
2046	* src/calloutd.c: Update.
2047	* src/main.c (mf_cfg_param): lock-retry-count and
2048	lock-retry-timeout are no-op now.
2049	* src/mfdbtool.c: Likewise.
2050
20512011-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
2052
2053	Adapt for MU 2.99.94
2054
2055	* configure.ac: Require MU 2.99.94
2056	* lib/mf-dbm.c: Use EACCES instead of the removed MU_ERR_UNSAFE_PERMS
2057	* src/builtin/burst.bi (finish_stream): Use MU_ERR_INVALID_EMAIL instead
2058	of the removed MU_ERR_BAD_822_FORMAT.
2059	* src/mfdbtool.c (main): exit on invalid usage.
2060
20612011-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
2062
2063	Docs: fix sentence spacing; use @: where appropriate.
2064
20652011-10-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2066
2067	Use Imprimatur for doc development and maintenance.
2068
2069	* Makefile.am (SUBDIRS): Add imprimatur.
2070	* configure.ac: Invoke IMPRIMATUR_INIT
2071	* doc/Makefile.am: Update.
2072	* doc/check-docs.sh: Remove.
2073	* doc/rendition.texi: Remove.
2074	* doc/untabify.el: Remove.
2075	* doc/mastermenu.el: Remove.
2076	* doc/functions.texi: Minor changes.
2077	* doc/mailfromd.texi: Minor changes.
2078	* doc/mfdbtool.texi: Minor changes.
2079
20802011-09-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2081
2082	Bugfix
2083
2084	* src/builtin/io.bi (open_program_stream): Print the value of
2085	errno, not rc (which is irrelevant if execve fails).
2086
20872011-09-01  Sergey Poznyakoff  <gray@gnu.org.ua>
2088
2089	Document DSPAM, fix doc compilation.
2090
2091	* NEWS: Update.
2092	* doc/Makefile.am (AM_MAKEINFOFLAGS): Use abs_top_srcdir
2093	Pass --I option to texi2html.
2094	* doc/functions.texi: Document DSPAM.
2095	Use @deftypevr instead of @deftypevar.
2096	* doc/mailfromd.texi: Update.
2097
20982011-08-29  Sergey Poznyakoff  <gray@gnu.org.ua>
2099
2100	Further improvements to the message_burst interface.
2101
2102	* NEWS, doc/functions.texi: Update.
2103	* mflib/status.mf (BURST_ERR_MASK): New mask.
2104	(BURST_DECODE): New flag.
2105	* src/builtin/burst.bi (burst_stream) <on_bad_format>: Remove.
2106	<burst_ctl>: New member.
2107	(finish_stream): Select error action from burst_ctl.
2108	(burst_digest): Optionally decode MIME parts.
2109
2110	Separate C and MFL constant space.
2111
2112	* mflib/.gitignore: Add status.h
2113	* mflib/Makefile.am (noinst_HEADERS): Add status.h
2114	(BUILT_SOURCES): Expand to noinst_HEADERS
2115	* mflib/dspam.mf: Change prefix to _MFL_
2116	* mflib/status.mf: Likewise.
2117	* mflib/syslog.mf: Likewise.
2118	* src/builtin/builtin.c (_builtin_const_to_c)
2119	(_builtin_c_to_const,_builtin_const_to_bitmap): New functions.
2120	* src/builtin/builtin.def (builtin_const_trans): New struct.
2121	(_builtin_const_to_c,_builtin_c_to_const)
2122	(_builtin_const_to_bitmap): New protos.
2123	* src/builtin/burst.bi: Include mflib/status.h. Rename BURST_
2124	constants to agree with the new prefix.
2125	* src/builtin/dspam.bi: Use translation functions from builtin.c.
2126	* src/builtin/syslog.bi: Likewise.
2127	* src/builtin/io.bi: Translate shutdown modes.
2128	* src/builtin/snarf.m4 (MF_TRANS_PREFIX): New constant.
2129	(MF_TRANS): New macro.
2130	* src/builtin/system.bi: Translate access modes.
2131
2132	Fix NEWS
2133
2134	Improve error handling in message_burst.
2135
2136	* mflib/status.mf (BURST_ERR_FAIL)
2137	(BURST_ERR_IGNORE,BURST_ERR_BODY): New constants.
2138	* src/builtin/burst.bi (burst_stream) <on_bad_format>: New member.
2139	(finish_stream): If the stream cannot be converted to message,
2140	use on_bad_format to decide what to do with it.
2141	(message_burst): Take optional argument.
2142	* src/builtin/sa.bi (set_xscript): Now returns void.
2143	* src/prog.c (env_function_cleanup_del): Bugfix.
2144
2145	* NEWS, doc/functions.texi: Document the changes to message_burst.
2146
21472011-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
2148
2149	Minor changes.
2150
2151	* src/builtin/burst.bi (DEFAULT_EB_LEN): New define
2152	(MF_INIT): Initialize burst_eb_min_length.
2153	* doc/functions.texi: Document RFC 934 functions.
2154
2155	Implement a built-in function for bursting RFC 934 digests.
2156
2157	* configure.ac: Require Mailutils 2.99.93
2158
2159	* src/prog.c (_cleanup_destroy) allow for clos->cleanup == NULL.
2160	(env_function_cleanup_del): New function.
2161	* src/prog.h (env_function_cleanup_del): New proto.
2162
2163	* mflib/status.mf (e_format): New exception.
2164
2165	* src/builtin/snarf.m4 (MF_CLR_CLEANUP): New macro.
2166	* src/builtin/burst.bi: New source.
2167	* src/builtin/Makefile.am (BI_FILES): Add burst.bi
2168
2169	* src/builtin/body.bi (current_message): Pass MF_MSG_CURRENT
2170	to bi_message_register.
2171	* src/builtin/mbox.bi (mailbox_get_message): Pass MF_MSG_MAILBOX
2172	to bi_message_register.
2173	* src/builtin/msg.bi (drop_current_message)
2174	(bi_get_current_message): Check for MF_MSG_CURRENT
2175	(bi_close_message): Destroy the message if type is MF_MSG_STANDALONE.
2176	(bi_message_register): Change meaning of the last argument.
2177	* src/builtin/msg.h (MF_MSG_MAILBOX)
2178	(MF_MSG_CURRENT,MF_MSG_STANDALONE): New defines.
2179	(mf_message) <mylist>: Remove.
2180	(mf_message) <current>: Rename to type.
2181	* src/builtin/sieve.bi: Fix a bug introduced in 19f41d6c5b.
2182
2183	* NEWS: Document message_burst.
2184	* doc/functions.texi: Restructure the "Message functions" section.
2185
21862011-08-24  Sergey Poznyakoff  <gray@gnu.org.ua>
2187
2188	Improve third-party interfaces to process arbitrary messages (not only current one).
2189
2190	* NEWS: Updated.
2191	* doc/functions.texi: Reflect changes in sieve, clamav
2192	and sa (spamc) functions.
2193	* mflib/Makefile.am: Build sa.h
2194	* mflib/sa.mf (SA_SYMBOLS, SA_REPORT)
2195	(SA_LEARN_SPAM,SA_LEARN_HAM,SA_FORGET): New constants.
2196	(sa): Wrapper over spamc for backward compatibility.
2197	* src/builtin/Makefile.am (builtin.h): Depends on builtin.def
2198	* src/builtin/body.bi (current_message): Use MF_STREAM_TO_MESSAGE.
2199	* src/builtin/builtin.c: Add more includes.
2200	(_builtin_stream_cleanup): New function.
2201	(_builtin_mu_stream_to_message): New function.
2202	* src/builtin/builtin.def (_builtin_stream_cleanup)
2203	(_builtin_mu_stream_to_message): New protos.
2204	* src/builtin/dspam.bi: Use _builtin_stream_cleanup for
2205	stream cleanups.
2206	* src/builtin/msg.bi (message_from_stream): Use MF_STREAM_TO_MESSAGE.
2207	* src/builtin/sa.bi (open_connection): Register returned stream
2208	for cleanup.
2209	(sa): Rewrite as spamc function.
2210	(clamav): Take message descriptor as the first argument.
2211	* src/builtin/sieve.bi (sieve): Take message descriptor as the first argument.
2212	Use cleanups.
2213	* src/builtin/snarf.m4 (MF_STREAM_TO_MESSAGE): New macro.
2214	* src/main.c (options): Remove "debug" option, handled by srvcfg.c
2215	* tests/bctx00.at: Use current_message function.
2216	* tests/bctx01.at: Likewise.
2217	* tests/fctx00.at: Likewise.
2218	* tests/fctx01.at: Likewise.
2219
22202011-08-23  Sergey Poznyakoff  <gray@gnu.org.ua>
2221
2222	Bugfix.
2223
2224	* src/builtin/dspam.bi: Translate return code.
2225	Change handling of class_src argument.
2226	* mflib/dspam.mf: Redefine DSS_NONE,DSR_NONE to be 0.
2227
22282011-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
2229
2230	Parse dspam configuration file.
2231
2232	* mflib/dspam.mf: Start DSZ_ constants from 1.
2233	* src/builtin/dspam.bi: Parse dspam.conf
2234	* src/builtin/snarf.m4 (__MF_DSEXP_REQ): Fix quoting.
2235
22362011-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
2237
2238	Minor change
2239
2240	* src/builtin/dspam.bi: Configure training mode.
2241
22422011-08-20  Sergey Poznyakoff  <gray@gnu.org.ua>
2243
2244	Minor fixes.
2245
2246	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd
2247
2248	Implement dspam support.
2249
2250	* configure.ac: Check for dspam
2251	* mflib/.gitignore: Add dspam.h
2252	* mflib/Makefile.am: Build dspam.h
2253	Install dspam.mf
2254	* mflib/dspam.mf: New file.
2255	* src/Makefile.am (mailfromd_LDADD): Add DSPAM_LIBS
2256	(INCLUDES): Add DSPAM_CFLAGS
2257	* src/builtin/Makefile.am (BI_FILES): Add dspam.bi.
2258	(INCLUDES): Add DSPAM_CFLAGS
2259	* src/builtin/dspam.bi: New file.
2260	* src/main.c (mailfromd_show_defaults): Reflect dspam support.
2261
2262	New macros and functions for registering function cleanup sequence in environments.
2263
2264	Cleanup sequence holds pointers to data created within the function along
2265	with the corresponding functions for their disposal.  When the function
2266	terminates or raises an exception, the sequence is executed thereby freeing
2267	the temporary data.
2268
2269	* mflib/mfh.awk: Convert # comments to C-style.
2270	* src/builtin/io.bi (REDIRECT_STDOUT_P): Remove useless comparison.
2271	* src/builtin/snarf.m4 (MF_VAR_STRING): New macro
2272	(END): Call env_function_cleanup_flush.
2273	(MF_DCL_CLEANUP,MF_CLEANUP): New macros.
2274	* src/builtin/spf.bi (spf_check_host)
2275	(spf_test_record): Use MF_VAR_STRING to initialize q.exp_prefix.
2276	* src/prog.c (environ_cleanup_closure): New struct.
2277	(eval_environ)<cleanup_list>: New member.
2278	(env_create_cleanup_list): New static function.
2279	(env_function_cleanup_flush)
2280	(env_function_cleanup_add): New function.
2281	(env_throw_0): Call env_function_cleanup_flush.
2282	(create_environment): Create cleanup_list.
2283	(destroy_environment): Destroy it.
2284	* src/prog.h (env_function_cleanup_add)
2285	(env_function_cleanup_flush): New protos.
2286
22872011-08-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2288
2289	Improve I/O interface, implement new functions.
2290
2291	* mflib/status.mf (SHUT_RD,SHUT_RW)
2292	(SHUT_RDWR): New constants.
2293	* src/builtin/io.bi (io_stream) <shutdown>: New member
2294	(open_inet_stream): Set str->shutdown.
2295	(tempfile,shutdown,rewind,copy): New built-in functions.
2296	* src/builtin/mail.bi (_send): Recipient address (to)
2297	can be null.
2298	(send_mail,send_text): `To' argument is now optional.
2299	(send_message): New built-in function.
2300	* src/builtin/msg.bi (message_copy): Rename to
2301	message_to_stream
2302	(message_copy_body): Rename to message_body_to_stream.
2303	(message_to_stream): New built-in function.
2304
2305	* NEWS: Document new functions.
2306	* doc/functions.texi: Likewise.
2307
23082011-08-17  Sergey Poznyakoff  <gray@gnu.org.ua>
2309
2310	Pass content size to item printers
2311
2312	* lib/mfdb.h (db_item_printer_t): Take four arguments.
2313	* lib/cache.c: Update item printers.
2314	* lib/db.c: Likewise.
2315	* lib/greylist.c: Likewise.
2316	* lib/tbf_rate.c: Likewise.
2317	* lib/rate.c: Likewise.
2318
2319	Minor fix
2320
2321	Implement getenv() builtin and string_list_iterate macro.
2322
2323	* mflib/pp-setup (string_list_iterate): New macro.
2324	* src/builtin/system.bi (getenv): New function.
2325
2326	* NEWS: Update.
2327	* doc/functions.texi: Update.
2328	* doc/mailfromd.texi: Update.
2329
2330	Implement message_copy and message_body_copy built-ins.
2331
2332	* src/builtin/io.bi (_bi_io_fd): New function.
2333	* src/builtin/msg.bi (message_copy)
2334	(message_body_copy): New builtin functions.
2335	* src/builtin/msg.h (_bi_io_fd): New proto.
2336	* doc/functions.texi: Document new functions.
2337	* NEWS: Mention new functions.
2338
23392011-08-16  Sergey Poznyakoff  <gray@gnu.org.ua>
2340
2341	Fix IPv6 recognition in configure.
2342
2343	* am/ipv6.m4: check whether getaddrinfo works for AF_INET6.
2344	* tests/connect03.at: Fix prerequisite.
2345
23462011-08-14  Sergey Poznyakoff  <gray@gnu.org.ua>
2347
2348	Call connect handler from mtasim.
2349
2350	* configure.ac (MF_IPV6_SUPPORT): New subst var.
2351	* gacopyz/gacopyz_priv.h (GACOPYZ_IPV6PREFIX_STR)
2352	(GACOPYZ_IPV6PREFIX_LEN): New macros.
2353	* gacopyz/gacopyz.h (gacopyz_srv_connect): Rename to gacopyz_srv_open
2354	(gacopyz_srv_conn): Rename to gacopyz_srv_connect.
2355	* gacopyz/gacopyz.c (shan_connect): Use GACOPYZ_IPV6PREFIX_STR
2356	and GACOPYZ_IPV6PREFIX_LEN macros instead of the literals.
2357	<inet6>: Convert port to network byte order.
2358	* gacopyz/server.c (gacopyz_srv_connect): Rename to gacopyz_srv_open.
2359	(gacopyz_srv_conn): Remove.
2360	(gacopyz_srv_connect): New function.
2361	* mtasim/mtasim.c (sender_hostname, sender_sockaddr): New variables.
2362	(OPTION_SENDER_SOCKADDR): New option code.
2363	(options)<--sender-sockaddr>: New option.
2364	(parse_opt): Handle OPTION_SENDER_SOCKADDR.
2365	(main): Call gacopyz_srv_connect if sender_hostname is set.
2366	(smtp): Call gacopyz_srv_connect before handling first
2367	SMTP command, unless it has already been called before.
2368	(shell_help): Show \S command if available.
2369	(shell): Handle \S command.
2370	* pmult/pmult.c: Reflect the above changes.
2371	* tests/Makefile.am (TESTSUITE_AT): Add connect00.at, connect01.at,
2372	connect02.at and connect03.at.
2373	* tests/testsuite.at: Include connect00.at -- connect03.at.
2374	* tests/atlocal.in (MF_IPV6_SUPPORT): New variable.
2375	* tests/connect00.at: New testcase.
2376	* tests/connect01.at: New testcase.
2377	* tests/connect02.at: New testcase.
2378	* tests/connect03.at: New testcase.
2379
2380	* NEWS: Update.
2381	* doc/mtasim.texi: Document the \S command and the --sender-sockaddr
2382	option.
2383	* doc/mailfromd.texi: Update.
2384
23852011-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2386
2387	Add a testcase for #! ... !# comment.
2388
2389	* tests/atlocal.in (MAILFROMD): New variable.
2390	* tests/shellmagic.at: New file.
2391	* tests/Makefile.am: Add shellmagic.at
2392	* tests/testsuite.at: Include shellmagic.at
2393
2394	Minor fix.
2395
2396	* doc/mailfromd.texi: Make it clear that the initial #! must
2397	have a closing !#.
2398
23992011-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
2400
2401	Implement the initial #! ... !# block comment.
2402
2403	* src/lex.l: Handle initial #! ... !# block comment.
2404	* doc/mailfromd.texi: Document the #! ... !# comment.
2405	* NEWS: Update.
2406
24072011-07-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2408
2409	Bugfix
2410
2411	* src/builtin/mail.bi: Redo message creation using
2412	a static stream.
2413
24142011-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
2415
2416	Improve reporting of startup errors. HUP restarts the program only if syntax check succeeds.
2417
2418	* lib/libmf.h (mf_server_lint_option): New extern.
2419	* lib/server.c (mf_server_lint_option): New global
2420	variable.
2421	(sig_restart): Don't call mfd_srvman_stop.
2422	(run_lint,server_idle_hook): New functions.
2423	(mf_server_start): Install idle hook.
2424	HUP restarts the program only if syntax check succeeds.
2425	Close fds above 2 if using stderr for error output,
2426	and from 1 if using syslog.
2427	* src/calloutd.c (main): Call mu_stdstream_setup.
2428	Set mf_server_lint_option.
2429	* src/main.c (main): Check whether stderr is open as early as possible.
2430	Update call to mu_stdstream_setup (needs MU 5e1d982ec).
2431	Set mf_server_lint_option.
2432	* src/srvcfg.c (srv_parse_opt): Make sure --syslog takes effect
2433	at once.
2434
24352011-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
2436
2437	Minor improvement.
2438
2439	* lib/srvman.c (report_exit_status): Surround PIDs with square brackets
2440	to facilitate grepping in logfiles.
2441
2442	Bugfix
2443
2444	* lib/syslog_async.c (find_percent_m): Fix endless loop.
2445
24462011-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2447
2448	Minor change.
2449
2450	* etc/Makefile.am (install-data-local): Don't check for the
2451	pre-6.0 mailfromd.rc
2452
24532011-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
2454
2455	Restore last_poll_host.
2456
2457	* mflib/callout.mf4 (callout_do): Handle INIT.
2458	* src/callout.c (callout_io): Pass hostname as argument to INIT.
2459	* src/savsrv.c (savsrv_smtp_io_callback): Don't ignore INIT.
2460
24612011-03-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2462
2463	Minor fix
2464
2465	* mflib/portprobe.mf4 (portprobe): Allow for family specification
2466	in host argument.
2467
2468	Implement IPv6 support.
2469
2470	* am/ipv6.m4: New file
2471	* configure.ac: Call MF_ENABLE_IPV6
2472	* gacopyz/gacopyz.c (parse_url,do_connect)
2473	(gacopyz_parse_connection): Handle IPv6 addresses.
2474	(shan_connect): Remove IPv6: prefix from addresses.
2475	* gacopyz/gacopyz.h (milter_sockaddr_t) [GACOPYZ_IPV6] <sin6>: New member.
2476	(gacopyz_srv_set_source): Alter signature.
2477	* gacopyz/server.c (gacopyz_srv) <source_addr>: Change type to
2478	struct sockaddr. All uses updated.
2479	<source_addr_len>: New member.
2480	(gacopyz_srv_set_source): Change signature.
2481	(gacopyz_srv_destroy): Free source_addr.
2482	(srv_connect): Support IPv6
2483
2484	* lib/srvman.c (srvman_url_to_sockaddr): Handle IPv6 addresses.
2485	* mflib/status.mf (FAMILY_INET6): New constant.
2486	* src/builtin/io.bi (open_parsed_inet_stream): Handle IPv6 addresses.
2487	* src/builtin/vars.bi (set_milter_$1_address): Handle IPv6 addresses.
2488	* src/engine.c (mlfi_connect): Handle IPv6 addresses.
2489	* src/callout.c (smtp_io_open): Handle IPv6 addresses.
2490	* src/mailfromd.h (MFAM_INET6): New constant.
2491	(source_address): Change type to struct mu_sockaddr.
2492	* src/srvcfg.c (source_address): Change type to struct mu_sockaddr.
2493	(mf_srvcfg_add): Don't abort if mfd_server_new returns NULL
2494	(mf_option_source_ip,option_source_ip): Remove.
2495	(set_source_ip): Use mu_sockaddr_from_node to parse the address.
2496	(cb_source_ip): Call set_source_ip.
2497	* src/srvcfg.h (source_address): Change type to struct mu_sockaddr.
2498
24992011-03-25  Sergey Poznyakoff  <gray@gnu.org.ua>
2500
2501	Version 7.99.90
2502
2503	Version number updated to avoid confusion with the 7.x branch
2504
25052011-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
2506
2507	syslog_async: add support for %m format specifier.
2508
2509	* lib/syslog_async.c (find_percent_m): New static function.
2510	(vsyslog_async_logger): New static function, from renamed
2511	vsyslog_async.
2512	(syslog_async, vsyslog_async): Rewrite as a wrapper around
2513	vsyslog_async_logger.
2514
2515	Minor change
2516
2517	* src/callout.c (callout_host): Reword a debugging message.
2518
25192011-03-23  Sergey Poznyakoff  <gray@gnu.org.ua>
2520
2521	Minor fix
2522
2523	* src/builtin/.gitignore: Add syslog.c
2524
2525	Implement modulo operator.
2526
2527	* src/drivers.c (optimize_arith,code_type_bin): Implement modulo
2528	operator.
2529	* src/gram.y: Implement modulo operator.
2530	* src/lex.l: Withdraw support for %ident.
2531	* src/mailfromd.h (bin_opcode) <bin_mod>: New constant.
2532	* src/opcodes (MOD): New opcode.
2533	* src/prog.c (instr_mod): New function.
2534	* doc/mailfromd.texi: Update.
2535	* NEWS: Update.
2536
2537	Minor change
2538
2539	* mflib/syslog.mf: Rewrite facility constants in a
2540	traditional way, i.e. as (N<<3).
2541
2542	Implement bitwise shifts.
2543
2544	* doc/mailfromd.texi: Document << and >>
2545	* src/drivers.c (optimize_arith,optimize_type_bin): Implement
2546	bitwise operations.
2547	* src/gram.y: Implement bitwise << and >>.
2548	* src/lex.l: Likewise.
2549	* src/mailfromd.h (bin_opcode): New opcodes bin_shl and bin_shr.
2550	* src/opcodes (SHL, SHR): New opcodes.
2551
2552	Bugfix in syslog_async
2553
2554	* lib/syslog_async.c (vsyslog_async): accept the facility level
2555	ORed in the priority argument.
2556
2557	New builtin function: syslog.
2558
2559	* lib/libmf.h (logger) <log_text>: New member
2560	(logger_text): New proto.
2561	* lib/logger.c: Add static qualifiers where they belong
2562	(syslog_default_logtext,syslog_async_logtext): New static functions.
2563	(logger_text): New function.
2564	* mflib/mfh.awk: New file.
2565	* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): Add syslog.h
2566	(EXTRA_DIST): Add mfh.awk
2567	(.mf.h): Use mfh.awk to generate the goal.
2568	* mflib/.gitignore: Add syslog.h
2569	* src/builtin/syslog.bi: New file.
2570	* src/builtin/Makefile.am (BI_FILES): Add syslog.bi
2571	* NEWS: Update.
2572	* doc/functions.texi: Update.
2573
25742011-03-22  Sergey Poznyakoff  <gray@gnu.org.ua>
2575
2576	Use C-escape filter (MU b5c66e41) to format trace output.
2577
2578	* src/main.c (mf_trace_stream): New static var.
2579	(open_trace_stream): New static function.
2580	(trace): Print to mf_trace_stream.
2581
25822011-03-19  Sergey Poznyakoff  <gray@gnu.org.ua>
2583
2584	Document enable-vrfy.
2585
2586	Update docs.
2587
2588	* NEWS: Update.
2589	* doc/mailfromd.texi: Remove the description of the
2590	standalone listen statement,
2591	Move descriptionis of --lock-retry-* options to mfdbtool.texi
2592	* doc/mfdbtool.texi: Describe --lock-retry-* options.
2593	* doc/Makefile.am (check-config): Ignore keywords not
2594	starting with [a-zA-Z_].
2595
2596	Restore lock-retry-count and lock-retry-timeout configuration statements
2597
2598	* lib/mf-dbm.h (lock_retry_timeout_option): New extern.
2599	* lib/libmf.h (mf_option_time_t, config_cb_time_t): New protos.
2600	* lib/optcache.c (mf_option_time_t): New function.
2601	* lib/utils.c (config_cb_time_t): New function.
2602	* src/main.c (mf_cfg_param): Restore lock-retry-count
2603	and lock-retry-timeout statements.
2604	(cb_timeout): Remove.  Use config_cb_timeout instead
2605	* mfdbtool.c (options, parse_opt): Enable --lock-retry-count
2606	and --lock-retry-timeout options,
2607	(option_cache): Define lock-retry-count and lock-retry-timeout
2608	caches.
2609	* TODO: Update
2610
2611	Provide a definition of timersub for platforms missing it
2612
2613	* gacopyz/gacopyz_priv.h [!timersub]: Define timersub
2614
26152011-03-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2616
2617	mtasim: minor improvement
2618
2619	* mtasim/mtasim.c (start_mailfromd): Print mailfromd PID in verbose mode.
2620
2621	Rethink the solution to mtasim interaction problem (see c0535e8e).
2622
2623	* src/main.c (parse_opt) <OPTION_MTASIM>: Rollback c0535e8e.
2624	(mtasim_option): Move to srvcfg.c.
2625	* src/srvcfg.c (server_section_parser) <mu_cfg_section_end>: If
2626	mtasim_option is set, ignore the server statements.
2627
26282011-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
2629
2630	Bugfix
2631
2632	* src/builtin/debug.bi (callout_transcript): Fix return type.
2633
2634	Implement callout_transcript function to toggle SMTP transcript on and off.
2635
2636	* src/builtin/debug.bi (callout_transcript): New function.
2637	* NEWS: Mention callout_transcript.
2638	* doc/functions.texi: Document callout_transcript.
2639
2640	Improve interaction with mtasim.
2641
2642	Jan Rafaj reported that the use of mtasim -Xauto may result in
2643	the subordinate mailfromd removing the UNIX communication sockets
2644	of the main running process.  This can happen if: (1) there is
2645	a mailfromd process running on the box where mtasim is run and
2646	(2) the user does not supply --no-site-config option to the subordinate.
2647
2648	* src/main.c (parse_opt) <OPTION_MTASIM>: Inhibit
2649	loading of the default configuration files.
2650
26512011-03-14  Sergey Poznyakoff  <gray@gnu.org.ua>
2652
2653	docs: document mailfromd options
2654
2655	* doc/Makefile.am (check-config): Fix the rule
2656	* doc/mailfromd.texi: Document mailfromd options.
2657
2658	* etc/Makefile.am (.mf.lint): -I$(top_srcdir)/src is no
2659	longer needed (see 01ad06fc).
2660	* mflib/Makefile.am: Likewise.
2661
26622011-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
2663
2664	Rename .pm:server config section to .mfd:server.  Fix check-docs.
2665
2666	New function header_rename_pattern
2667
2668	* NEWS: Update.
2669	* mflib/header_rename.mf4: New function header_rename_pattern.
2670	* doc/functions.texi: Document changes to message_header_count.
2671	Document header_rename_pattern.
2672
2673	Improve docs
2674
2675	* NEWS: Update.
2676	* doc/functions.texi: Document new built-in and most library
2677	functions.
2678	* doc/upgrade.texi: Update.
2679
2680	* src/builtin/debug.bi (debug_level): Fix the use of modname.
2681	(debug_spec): Remove the minlevel parameter.
2682	* src/builtin/io.bi: Remove misleading comment.
2683	* src/main.c: Restore the --debug option.
2684
26852011-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2686
2687	Minor fix.
2688
2689	Update docs.
2690
2691	* doc/mailfromd.texi: Document new pragmas (prereq and provide-callout)
2692
2693	docs: improve check-docs, document mfdbtool.
2694
2695	* doc/mfdbtool.texi: New file.
2696	* doc/calloutd.texi: New file.
2697	* doc/Makefile.am (mailfromd_TEXINFOS): Add new files.
2698	(check-options): depend on several check-*-options goals
2699	(check-mailfromd-options)
2700	(check-calloutd-options)
2701	(check-mfdbtool-options): New goals.
2702	(check-sub-config): Scan $(top_srcdir)/lib/dbcfg.c as well.
2703	* doc/check-docs.sh: Minor change
2704	* doc/functions.texi: Remove the discussion of DNS Cache Management.
2705	* doc/macros.texi (xopindex, opsummary): Take the program name as
2706	the 2nd argument. All uses changed.
2707	* doc/mailfromd.texi: Add documentation placeholder for calloutd.
2708	Add documentation of mfdbtool.
2709	Remove description of DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL and
2710	dns database.
2711
27122011-03-11  Sergey Poznyakoff  <gray@gnu.org.ua>
2713
2714	Improve check-docs
2715
2716	* doc/Makefile.am (check-pragmas): Implement the rule.
2717	* doc/check-docs.sh: Remove leading whitespace from joinable
2718	files.
2719
2720	Ensure the same set of constants is used in the sources and in the documentation.
2721
2722	* .gitignore: Add global.h and global.texi
2723	* global.awk: New file.
2724	* global.texi: New file.
2725	* Makefile.am (SUBDIRS): Begin with .
2726	(noinst_HEADERS): Add global.h
2727	(noinst_DATA): Add global.texi
2728	(BUILT_SOURCES): Add both.
2729	(EXTRA_DIST): Likewise. Add global.def and global.awk
2730	(.def.h): New rule
2731	(.def.texi): New rule
2732	* doc/values.texi: Remove.
2733	* doc/Makefile.am (mailfromd_TEXINFOS): Remove values.texi.
2734	(AM_MAKEINFOFLAGS): Add top_srcdir to include path.
2735	* doc/mailfromd.texi: Include global.texi instead of values.texi.
2736	* doc/functions.texi: Update.
2737
2738	* src/builtin/dns.bi: Include global.h.  Use constants defined in it.
2739	* src/builtin/io.bi: Likewise.
2740	* src/builtin/mbox.bi: Likewise.
2741	* src/builtin/msg.bi: Likewise.
2742	* src/prog.c: Likewise.
2743	* src/builtin/msg.h (NMBOXES, NMSGS): Remove definitions.
2744
27452011-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2746
2747	Minor documentation changes.
2748
2749	* doc/Makefile.am (check-config, check-exceptions): Fix rules.
2750	* doc/mailfromd.texi: Document e_exists.
2751	* doc/values.texi (MIN_EXCEPTION, MAX_EXCEPTION): Remove.
2752	(E_EXCEPTIONS): New value.
2753
2754	Implement escape/unescape builtin functions and functions for email processing.
2755
2756	* mflib/.gitignore: Add email.h
2757	* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): Add email.mf
2758	* mflib/email.mf: New file.
2759	* mflib/callout.mf4 (callout_do): Escape email.
2760	* src/builtin/email.bi (email_map): New function.
2761	* src/builtin/string.bi (escape, unescape): New functions.
2762	* doc/functions.texi: Document new functions.
2763
2764	More bugfixes
2765
2766	* src/main.c (main): Call mf_server_log_setup only for
2767	mode==MAILFROMD_DAEMON.
2768	(parse_opt): Allocate strings appended to args->trace_modules.
2769	* src/prog.c (instr_xmemstk): Adjust stack before pushing to it.
2770	(dump_catch): Print exception names.
2771
27722011-03-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2773
2774	Version 7.0.95
2775
2776	* NEWS, configure.ac: Update.
2777
2778	Restore (try,catch)/loop/(break,next) functionality.
2779
2780	The commit bd4fb40f took care about breaks and nexts called from
2781	tries/catches that appear within a loop, but in the meantime it
2782	broke the functionality of breaks/nexts called within loops which
2783	are nested in a try or catch block.  This is fixed in this commit.
2784
2785	* src/drivers.c (trycatch_stack_entry) <id>: New member.
2786	(trycatch_last_id): New function.
2787	(enter_trycatch): Initialize ent.id.
2788	(_code_trycatch_exit): Break the iteration if current entry id is
2789	less than the loop id.
2790	(code_trycatch_exit): Take block ID as argument.
2791	(enter_loop): Initialize trycatch_id.
2792	(code_type_next, code_type_break): Pass loop ID to code_trycatch_exit.
2793
2794	* tests/trycatch13.at: New testcase.
2795	* tests/trycatch14.at: New testcase.
2796	* tests/Makefile.am (TESTSUITE_AT): Add new testcases.
2797	* tests/testsuite.at: Include new testcases.
2798
2799	* tests/miltermacros.at: Fix a typo.
2800
2801	Fix built-in macro expansion in strings appearing within pragmas.
2802
2803	* src/pragma.c (nextword): Advance *end past the final quote.
2804	* tests/expstr.at: New testcase.
2805	* tests/Makefile.am (TESTSUITE_AT): Add expstr.at
2806	* tests/testsuite.at: Include expstr.at
2807	* tests/macros.at: Add keywords.
2808
2809	Cleanup.
2810
2811	* po/POTFILES.in: Remove appinit.c (See e473ab7d).
2812	* src/Makefile.am: Restore incdir, needed for AM_CPPFLAGS. Was
2813	accidentally removed in 01ad06fca.
2814	* src/builtin/sa.bi (sa): Restore initialization of msize. Accidentally
2815	removed in bcd64af9.
2816	* src/main.c: Call mf_server_log_setup after compiling the sources, so
2817	that --lint spits out its diagnostics on stderr (initially placed here
2818	in e75c9a39).
2819
2820	Fix deferred variable initialization.
2821
2822	The bug was spotted by Brian Kroth.
2823
2824	* src/gram.y (deferred_decl) <locus>: New member.
2825	(defer_initialize_variable): Use string_alloc
2826	instead of literal_lookup. Take additional argument (ptr to locus). All
2827	uses updated.
2828	(apply_deferred_init): Pass a ptr to the actual locus to initialize_variable.
2829	* src/mailfromd.h (defer_initialize_variable): Change signature.
2830	* src/main.c (cb_set_variable): Deduce definition location from
2831	mu_strerr.
2832	* THANKS: Update.
2833	* tests/setvar.at: New testcase.
2834	* tests/Makefile.am (TESTSUITE_AT): Add setvar.at.
2835	* tests/testsuite.at: Include setvar.at.
2836	* tests/invcidr.at: Update experr.
2837	* tests/invcidr2.at: Likewise.
2838
2839	Bugfix.
2840
2841	* src/lex.l (lex_new_source): Fail if the fail is not a regular one.
2842
28432011-03-07  Sergey Poznyakoff  <gray@gnu.org.ua>
2844
2845	Sync with MU commit 4bcd5c9de0cb6ca85bcc3a35b1518739b939b009.
2846
2847	* lib/appinit.c: Remove.
2848	* lib/Makefile.am (libmf_a_SOURCES): Remove appinit.c
2849	* lib/libmf.h (mu_app_rcfile, mfd_app_init): Remove.
2850	* src/calloutd.c (main): Use mu_app_init. Set mu_site_rcfile beforehand.
2851	* src/main.c (main): Likewise.
2852	* src/mfdbtool.c (main): Likewise.
2853
28542011-03-05  Sergey Poznyakoff  <gray@gnu.org.ua>
2855
2856	Sync with MU commit ad938c5af.
2857
2858	* lib/appinit.c (mfd_parse_config_files): Remove.
2859	(mfd_app_init): Use new API.
2860
2861	Bugfix
2862
2863	* src/main.c (cb_set_variable): Fix argument cast.
2864
28652011-03-03  Sergey Poznyakoff  <gray@gnu.org.ua>
2866
2867	Minor changes
2868
2869	Use `volatile' qualifier for variables that can change during dataseg expansion.
2870
2871	* src/builtin/snarf.m4 (__mf_dataseg): New define.
2872	(MF_DSEXP, __MF_DSEXP_REQ)
2873	(__mf_define_fun, MF_DSEXP_SUPPRESS): New macros.
2874	(__mf_c_type): Define string arguments wiht __mf_dataseg qualifier.
2875	(MF_DEFUN): For functions returning STRING assume MF_DSEXP.
2876	(MF_ALLOC_HEAP,MF_ALLOC_HEAP_TEMP)
2877	(MF_COPY_STRING): Call __MF_DSEXP_REQ
2878	(END): Redefine __mf_dataseg to empty string.
2879
2880	* src/builtin/db.bi (dbmap_lookup): Define within a
2881	MF_DSEXP_SUPPRESS block.
2882	(dbmap): Mark as MF_DSEXP.
2883	* src/builtin/sa.bi (sa, clamav): Mark as MF_DSEXP.
2884	* src/builtin/spf.bi (update_spf_vars): Define within a
2885	MF_DSEXP_SUPPRESS block.
2886	(spf_check_host, spf_test_record): Mark as MF_DSEXP.
2887	* src/builtin/string.bi (rindex): Mark as MF_DSEXP.
2888	* src/builtin/vars.bi (set_milter_$1_address): Define within
2889	a MF_DSEXP_SUPPRESS block.
2890	(set_milter_server_id): Likewise.
2891
2892	* src/prog.c (get_string_arg): Use MFL_DATASEG qualifier for return pointer
2893	(get_pointer_arg): Likewise.
2894	(heap_obstack_grow, pushs): Use MFL_DATASEG qualifier for pointer arg.
2895	(instr_concat): Use MFL_DATASEG qualifiers for left and right declarations.
2896	* src/prog.h (MFL_DATASEG): New define.
2897	(get_pointer_arg, get_string_arg)
2898	(heap_obstack_grow, pushs): Change signature.
2899
2900	Bugfix
2901
2902	* src/prog.c (instr_backref): Reference matchstr only after
2903	eventual dataseg expansion.
2904	(env_pop_auto): New function.
2905	(pushs): Protect source pointer from changing during dataseg expansion
2906	(env_final_gc): Likewise.
2907	(heap_obstack_grow): Likewise.
2908
29092011-03-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2910
2911	Fix the usage of `next' and `break' in try/catch blocks.
2912
2913	* src/drivers.c (enter_trycatch, leave_trycatch)
2914	(code_trycatch_exit): New functions.
2915	(code_type_catch): Enclose traverse_tree in enter_trycatch/leave_trycatch.
2916	(code_type_try): Likewise.
2917	(code_type_next): Call code_trycatch_exit to make sure any
2918	outer tries/catches are exited correctly.
2919	(code_type_break): Likewise.
2920
2921	* tests/trycatch05.at: New file.
2922	* tests/trycatch06.at: New file.
2923	* tests/trycatch07.at: New file.
2924	* tests/trycatch08.at: New file.
2925	* tests/trycatch09.at: New file.
2926	* tests/trycatch10.at: New file.
2927	* tests/trycatch11.at: New file.
2928	* tests/trycatch12.at: New file.
2929	* tests/Makefile.am (TESTSUITE_AT): Add trycatch05.at - trycatch12.at
2930	* tests/testsuite.at: Include trycatch05.at - trycatch12.at
2931	* tests/trycatch01.at: Update AT_KEYWORDS.
2932	* tests/trycatch02.at: Likewise.
2933	* tests/trycatch03.at: Likewise.
2934	* tests/trycatch04.at: Likewise.
2935
2936	* doc/.gitignore: Update.
2937	* mflib/.gitignore: Update.
2938	* src/builtin/.gitignore: Update.
2939
2940	Move debugging API to a separate compilation unit.
2941
2942	Rename wd built-in to _wd.
2943
2944	* src/builtin/debug.bi: New file.
2945	* src/builtin/Makefile.am (BI_FILES): Add debug.bi
2946	* src/builtin/other.bi: Move debugging functions to debug.bi.
2947	* src/prog.c (env_register_read) <REG_REG>: Add a type cast.
2948
2949	New debugging function: _reg().
2950
2951	* mflib/_register.mf: New file.
2952	* mflib/.gitignore: Add _register.mf
2953	* mflib/Makefile.am (MF_FILES): Add _register.mf
2954	(noinst_HEADERS, BUILT_SOURCES): Add _register.h
2955	* src/builtin/other.bi (_reg): New function.
2956	* src/prog.c (env_register_read): New function.
2957	* src/prog.h (env_register_read): New proto.
2958
2959	Minor fix
2960
2961	* src/drivers.c (print_type_try): Fix output indentation.
2962
29632011-03-01  Sergey Poznyakoff  <gray@gnu.org.ua>
2964
2965	New pragma: prereq.  New function: vercmp.
2966
2967	* NEWS, configure.ac: Version 7.0.94
2968	* lib/vercmp.c: New file.
2969	* lib/Makefile.am (libmf_a_SOURCES): Add vercmp.c
2970	* lib/libmf.h (mf_vercmp): New proto.
2971
2972	* src/builtin/Makefile.am (BI_FILES): Add prereq.bi.
2973	* src/builtin/.gitignore: Add prereq.c
2974	* src/prog.c (env_throw_0): Reword unknown exception diagnostics.
2975
2976	* tests/vercmp.at: New file.
2977	* tests/vercmp01.at: New file.
2978	* tests/vercmp02.at: New file.
2979	* tests/Makefile.am (TESTSUITE_AT): Add vercmp.at, vercmp01.at
2980	and vercmp02.at.
2981	* tests/testsuite.at: Include vercmp testcases.
2982
2983	* mflib/status.mf: Require mailfromd version 7.0.94 or later.
2984	[OLD_EXCEPTION_CODES]: Remove.
2985
2986	* po/POTFILES.in: Update.
2987
2988	Store exception names in the dataseg.
2989
2990	* src/mf-status.c: Remove.
2991	* src/exclist.c: New file.
2992	* src/Makefile.am (mailfromd_SOURCES): Remove mf-status.c,
2993	add exclist.c.
2994	* src/gram.y (exdecl): Call define_exception.
2995	(dataseg_layout): Create table of exception names in dataseg.
2996	* src/mailfromd.h (define_constant): Change return value.
2997	(string_to_exception): Remove.
2998	(define_exception,enumerate_exceptions)
2999	(free_exceptions): New protos.
3000	* src/main.c (main): Call free_exceptions.
3001	* src/prog.c (exception_count): Move declaration to exclist.c
3002	(instr_throw): Add trace print.
3003	(dump_throw): Print exception number along with its symbolic value.
3004	(env_throw_0): Reword default message.
3005	* src/prog.h (EXTABIND): New macro.
3006	* src/symbols.c (define_constant): Return pointer to the allocated
3007	struct constant.
3008	* tests/eof.at: Reflect changes to env_throw_0.
3009	* tests/hdr-gete.at: Likewise.
3010	* mflib/mfex.awk: Simplify.
3011
3012	Fix src/.gitignore
3013
3014	Document e_exists and dbinsert (see commit 185360ba).
3015
3016	New built-in: body_has_nulls
3017
3018	* src/builtin/body.bi (body_has_nulls): New function.
3019	* doc/functions.texi: Document body_has_nulls.
3020
3021	Revamp declaration of built-in exception codes.
3022
3023	Exception codes are declared (via dclex) in mflib/status.mf.  The C code
3024	includes mflib/status.ex, which is generated from that file.
3025
3026	* src/status.mfh: Move to mflib.
3027	* src/mf-status.mfi: Move to mflib/status.mfh
3028	* src/mf-status.mfi: Move to src/mf-status.c
3029	(std_status_tab): Include mflib/status.ex
3030	* src/mfstat.awk: Remove.
3031	* src/status.mfi: Remove.
3032	* src/Makefile.am: Reflect these changes.
3033	* src/mailfromd.h (mf_exception_code): Remove exception declarations,
3034	include mflib/status.ex instead.
3035	* src/prog.c (exception_count): Initialize to 0.
3036	(instr_restex): If count is 0, do nothing.
3037	(env_init): Copy exceptions only if exception_count is not 0.
3038	(env_throw_0): Remove extra \n from runtime error diagnostics.
3039	(create_environment): Allocate catch_ctx and defcatch_ctx only
3040	if exception_count is not 0.
3041
3042	* mflib/.gitignore: Add status.ex
3043	* mflib/Makefile.am (inc_DATA,noinst_HEADERS,BUILT_SOURCES): Add status.mfh
3044	(MF_FILES): Add status.mf
3045	(EXTRA_DIST): Add mfex.awk
3046	(SUFFIXES): Add .ex
3047	(.mf.ex): New rule.
3048	* mflib/mfex.awk: New file.
3049
3050	* tests/Makefile.am (status.mf): Depend on $(top_srcdir)/mflib/status.mf
3051	* tests/eof.at: Reflect changes to "built-in" exceptions.
3052	* tests/hdr-gete.at: Likewise.
3053	* tests/trycatch02.at: Likewise.
3054	* tests/trycatch04.at: Likewise.
3055
30562011-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>
3057
3058	Fix the use of user-defined exceptions.
3059
3060	* src/prog.c (instr_throw): Use exception_count instead of
3061	mf_exception_count.
3062
3063	Minor change
3064
3065	Synchronize MF_SIEVE_ defines in C with the corresponding constants in MFL.
3066
3067	* Makefile.am (SUBDIRS): Place mflib before lib and src.
3068	* mflib/.gitignore: Add sieve.h
3069	* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): New variables.
3070	(.mf.h): New implicit rule.
3071	* mflib/sieve.mf: Fix comment.
3072	* po/POTFILES.in: Remove builtin/mudebug.bi.
3073	* src/builtin/Makefile.am (INCLUDES): Add $(top_srcdir)
3074	* src/builtin/sieve.bi: Include mflib/sieve.h. Remove MF_SIEVE_ defines.
3075
3076	Improve the sieve built-in.
3077
3078	* mflib/sieve.mf (MF_SIEVE_FILE,MF_SIEVE_TEXT): New constants.
3079	(MF_SIEVE_LOG,MF_SIEVE_DEBUG_TRACE)
3080	(MF_SIEVE_DEBUG_INSTR): Change numeric values.
3081	* src/builtin/other.bi (wd): New function.
3082	* src/builtin/sieve.bi (sieve): The script parameter specifies the
3083	Sieve program text (literal) if MF_SIEVE_TEXT flag is set.
3084	Additional parameters file and line can be used in this case to
3085	correct reported locations in the Sieve program.
3086	Fix memory leak (msg not being destroyed).
3087
3088	* doc/functions.texi: Document changes to the sieve function.
3089
30902011-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3091
3092	Bugfixes.
3093
3094	* src/prog.c (eval_environ) <string>: Remove.  The pointer is
3095	invalidated after dataseg expansion.  Keep offset of the
3096	last matched string in matchstr instead (data offset is
3097	invariant).  All callers updated.
3098	(expand_dataseg): Remove static qualifier.
3099	(instr_memstk, instr_xmemstk): Bugfix.  Both functions were not
3100	expansion-safe.
3101	* src/prog.h (expand_dataseg): New proto.
3102	* src/builtin/other.bi (_expand_dataseg): New function.
3103
31042011-01-20  Sergey Poznyakoff  <gray@gnu.org.ua>
3105
3106	Bugfixes.
3107
3108	* lib/mf-dbm.c (mf_dbm_insert): Add missing break.
3109
3110	* src/bitmask.h (bitmask_merge): Update bm_nset.
3111
3112	* src/prog.c (environ_locus): New struct.
3113	(eval_environ): Change type of locus to environ_locus.
3114	(ENV_LOC_FILE,ENV_LOC_LINE): New defines.
3115	(env_get_locus): Store locus in the struct locus supplied by
3116	the second argument. Register the file member as automatic variable,
3117	lest it gets clobbered by stack expansions.
3118	All callers updated.
3119	(instr_push,instr_stkalloc,instr_regmatch_mx)
3120	(instr_next): Fix trace formats.
3121	* src/prog.h (runtime_warning,runtime_error)
3122	(prog_trace): Mark as printflike.
3123	(env_get_locus): Change signature.
3124
3125	* src/builtin/header.bi (header_add,header_insert)
3126	(header_delete,header_replace): Update calls to env_get_locus.
3127	* src/builtin/progress.bi (progress): Likewise.
3128	* src/builtin/qrnt.bi (quarantine): Likewise.
3129	* src/builtin/rcpt.bi (rcpt_add,rcpt_delete): Likewise.
3130
3131	* src/builtin/snarf.m4: Minor indentation change.
3132
3133	* mflib/sieve.mf (MF_SIEVE_DEBUG_MAILUTILS)
3134	(MF_SIEVE_DEBUG_PROT): Remove.
3135	* src/builtin/sieve.bi: Likewise.
3136	* src/builtin/mudebug.bi: Remove.
3137	* src/builtin/Makefile.am (BI_FILES): Remove mudebug.bi
3138	* src/builtin/other.bi (debug): Set logstream locus information for
3139	better error diagnostics.
3140	Declare mailutils_set_debug_level as alias to debug.
3141
31422011-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
3143
3144	Implement dbinsert built-in function.
3145
3146	* src/builtin/db.bi (dbinsert): New function. Similar to dbput but
3147	allows better control over what to do if the key is already present
3148	in the database.
3149	* src/mailfromd.h (mfe_exists): New exception code.
3150
31512011-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
3152
3153	Update TODO.
3154
3155	Builtin functions obtain a reference to the capture stream, not the stream itself.
3156
3157	* src/builtin/snarf.m4 (MF_CAPTURE): Require an argument.
3158	(__mf_defun): If MF_CAPTURE was called, declare an extra
3159	mu_stream_t argument and initialize it to the capture stream
3160	reference.
3161	(return): New macro.
3162	(MF_RETURN,MF_RETURN_STRING): Go to end label, instead of returning.
3163	(MF_THROW): Unref __MF_CAPTURE__, if defined.
3164	(END): Unref __MF_CAPTURE__, if defined.
3165	Declare end label.
3166	Undefine __MF_ENDLAB__
3167
3168	* src/mailfromd.h (env_get_stream): Change prototype.
3169	* src/prog.c (env_get_stream): Return error code.
3170	Return a reference to the capture stream in the memory
3171	location pointed to by the second argument.
3172
3173	* src/builtin/body.bi (current_message): Fix MF_CAPTURE declaration.
3174	* src/builtin/curhdr.bi (current_header_count): Likewise.
3175	(current_header_nth_name,current_header_nth_value): Likewise.
3176	(current_header): Likewise.
3177	* src/builtin/sa.bi (sa, clamav): Likewise.
3178	* src/builtin/sieve.bi (sieve): Likewise.
3179	* src/builtin/getpw.bi (return_passwd): Don't use MF_RETURN_OBSTACK
3180	here.
3181	(getpwnam, getpwuid): Use it here instead.
3182	* src/builtin/io.bi (write): Fix debug format string.
3183	* src/builtin/mail.bi (build_mime): Fix memory leak (occurred on
3184	error).
3185	(send_dsn): Likewise.
3186
3187	gacopyz server: unescape % characters (complements e8f737fa).
3188
3189	* gacopyz/gacopyz.h (gacopyz_srv_reply): Return int.
3190	(gacopyz_srv_reply_raw): New proto.
3191	* gacopyz/server.c (gacopyz_srv_reply): Unescape % characters.
3192	Allocates returned string.
3193	(gacopyz_srv_reply_raw): New function (renamed from old gacopyz_srv_reply).
3194	* mtasim/mtasim.c: Use xstrdup.
3195	(smtp_ehlo, process_gacopyz_reply)
3196	(process_data_reply): Fix calls to gacopyz_srv_reply.
3197
31982011-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>
3199
3200	lib: minor fix
3201
3202	* lib/logger.c (mf_gacopyz_log_printer): Handle SMI_LOG_PROTO.
3203
3204	gacopyz: minor fix.
3205
3206	* gacopyz/context.c (format_message): Escape percent characters in
3207	the message string.
3208
32092011-01-08  Sergey Poznyakoff  <gray@gnu.org.ua>
3210
3211	Update copyright year.
3212
3213	sa,clamav: bugfixes.
3214
3215	* lib/server.c (mf_server_check_pidfile): Use mu_program_name.
3216	* src/builtin/sa.bi: Major cleanup.
3217	(set_xscript): Do not switch to MU_XSCRIPT_PAYLOAD at once.
3218	(spamd_send_stream): New function.
3219	(spamd_connect): Do not unreference transport streams.
3220	(open_connection): Use _aget to obtain path.
3221	(sa,clamav): Rewind message stream; use spamd_send_stream to
3222	send it.
3223	* src/builtin/mail.bi (build_mime): Reposition the stream to its
3224	beginning.
3225
32262010-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>
3227
3228	Bugfixes.
3229
3230	* lib/logger.c (syslog_async_open): Fix signature.
3231	* mflib/Makefile.am (.mf4.mf): Put $(AM_V_GEN) in front of
3232	the command.
3233
3234	Reflect recent changes in MU (mu_debug_handle_t/mu_debug_level_t types).
3235
32362010-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
3237
3238	Raise version number and MU requirements. Rewrite transcript support in callout.c
3239
3240	* configure.ac: Require MU 2.9.90
3241	Set version number to 7.0.93
3242	Remove dist-lzma
3243	(strtok_r): Remove unused declaration.
3244	(gnulib.modules) <strtok_r>: Remove.
3245	* src/callout.c: Rewrite transcript support using MU3 API.
3246	(transcript): Remove. All callers updated.
3247	(create_transcript_stream): New function.
3248	(smtp_io_open): Set transcript stream if smtp_transcript is set.
3249
3250	Switch to MU3 API.
3251
3252	* lib/debug.c: Remove.
3253	* lib/debug.h: Remove.
3254	* lib/Makefile.am (noinst_HEADERS): Remove debug.h
3255	(libmf_a_SOURCES): Remove debug.c
3256	* lib/appinit.c: Use new mu_stream_* calls.
3257
3258	* lib/libmf.h (config_array_to_argv,config_array_to_string): Change
3259	signatures.
3260	(config_cb_timeout): Likewise.
3261	(logger)<log_print>: Remove.
3262	<log_open>: Change signature.
3263	(logger_open): Change signature.
3264	(vlogmsg,logmsg): Rewrite as macros.
3265	* lib/logger.c: Rewrite logging support using MU3 streams.
3266
3267	* lib/utils.c (config_array_to_argv)
3268	(config_array_to_string, config_cb_timeout): Rewrite.
3269
3270	* lib/server.c (mf_server_start): Call mu_onexit_run.
3271
3272	* lib/version.c (version_etc_copyright): Rename to avoid name
3273	clash.
3274
3275	* lib/dbcfg.c: Rewrite callbacks.  Use MU3 configuration framework.
3276
3277	* lib/cache.c: Use mu_debug for debugging.
3278	* lib/db.c: Likewise.
3279	* lib/dns.c: Likewise.
3280	* lib/greylist.c: Likewise.
3281	* lib/mf-dbm.c: Likewise.
3282	* lib/rate.c: Likewise.
3283	* lib/srvman.c: Likewise.
3284	* lib/tbf_rate.c: Likewise.
3285	* src/builtin/snarf.m4: Likewise.
3286	* src/calloutd.c: Likewise.
3287	* src/engine.c: Likewise.
3288	* src/spf.c: Likewise.
3289
3290	* src/Makefile.am (mfd-dbgmod.h): Offset the indices by the value of
3291	mfd_debug_handle.
3292
3293	* src/builtin/body.bi (current_message): Use mu_stream_to_message.
3294	* src/builtin/curhdr.bi: Use MU3 API.
3295	* src/builtin/db.bi: Likewise.
3296	* src/builtin/io.bi: Likewise.
3297	* src/builtin/mail.bi: Likewise.
3298	* src/builtin/msg.bi: Likewise.
3299	* src/builtin/mudebug.bi: Likewise.
3300	* src/builtin/sieve.bi: Likewise.
3301	* src/lex.l: Likewise.
3302	* src/savsrv.c: Likewise.
3303	* src/srvcfg.c: Likewise.
3304
3305	* src/builtin/other.bi (debug_level): Rewrite using mu_debug_category_level
3306	(debug_spec): Rewrite using mu_debug_format_spec.
3307	(debug): Rewrite using mu_debug_parse_spec.
3308
3309	* src/callout.c (smtp_io_data) <send_off, recv_off>: Remove. All uses
3310	updated.
3311	(smtp_io_free, smtp_send, smtp_recvline)
3312	(smtp_io_close, callout_host, callout_mx)
3313	(libcallout_init): Use new stream and debugging API.
3314
3315	* src/mailfromd.h (mfd_debug_handle): New extern.
3316	(add_legacy_milter_port): Change signature.
3317	* src/main.c (mf_strecho): New global.
3318	(mfd_gacopyz_log_printer): Remove.
3319	(read_domain_file): Change signature.
3320	(cb_milter_timeout, cb_timeout, cb_set_variable)
3321	(cb_include_path, cb_trace_program, cb_relayed_domain_file): Rewrite.
3322	(mfd_debug_handle): New variable.
3323	(open_strecho): New function.
3324	(main): Revise logging support initialization.
3325	* src/mfdbtool.c: Use new MU API.
3326	* src/pp.c: Likewise.
3327	* src/pragma.c: Likewise.
3328
3329	* src/prog.c: Use new MU API.
3330	(instr_echo): Send output to mf_strecho.
3331	* src/prog.h (mf_strecho): New extern.
3332
3333	* src/builtin/msg.h (mf_message) <mstr, bstr>: New members.
3334	* src/builtin/sa.bi: Rewrite using new stream functions.
3335
3336	* pmult/.gitignore: Remove pdbg.h.
3337	* pmult/pdbg.hm4: Remove.
3338	* pmult/debugdef.m4: Remove.
3339	* pmult/Makefile.am (EXTRA_DIST): Remove pdbg.hm4 and debugdef.m4
3340	(pmult_SOURCES): Remove pdbg.h
3341	* pmult/pmult.c: Redo logging, debugging and configuration support.
3342
3343	* tests/hdr-gete.at: Update.
3344	* tests/testsuite.at (AT_MTA_TEST): Filter out info prefix from the
3345	'echo' output.
3346
33472010-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
3348
3349	Bugfixes.
3350
3351	* etc/Makefile.am: Install postfix-macros.sed to pkgdatadir.
3352	(install-data-local): Add missing $(DESTDIR)
3353	* src/builtin/sa.bi (sa): Check the result of the initial
3354	SPAMC command.
3355	* src/gram.y (register_macro): Set a comparator that ignores
3356	enclosing '{ }'.
3357	Always enclose in curly braces macro names longer than 1 character.
3358	* tests/miltermacros.at: New testcase.
3359	* tests/Makefile.am (TESTSUITE_AT): Add miltermacros.at.
3360	* tests/testsuite.at: Include miltermacros.at.
3361
33622010-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
3363
3364	Be careful about undefined sun_path in struct sockaddr_un.
3365
3366	* gacopyz/gacopyz.c (gacopyz_handle_connection): Log unnamed
3367	socket as [unnamed].
3368	* src/builtin/vars.bi (set_milter_$1_address): Use empty string
3369	if the socket is unnamed.
3370
33712010-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
3372
3373	Bugfixes.
3374
3375	* lib/dns.c (_dnsbase_init): Rename to dnsbase_init, now extern.
3376	(all functions): Remove calls to _dnsbase_init.
3377	* lib/libmf.h (dnsbase_init): New proto.
3378	* src/calloutd.c (main): Call dnsbase_init.
3379	* src/savsrv.c (cmd_run): Bugfix.
3380	(callout_session_server): Bugfix.
3381	* src/main.c (main): Call dnsbase_init.
3382
33832010-08-31  Sergey Poznyakoff  <gray@gnu.org.ua>
3384
3385	Implement header renaming functions.
3386
3387	* mflib/header_rename.mf4: New file.
3388	* mflib/.gitignore: Add header_rename.mf and rateok.mf.
3389	* mflib/Makefile.am (MF_FILES): Add MF4_FILES (with suffix
3390	fixup).
3391
3392	Version 7.0.92
3393
3394	Expand the functionality of the message_header_count() function.
3395
3396	* src/builtin/msg.bi (message_header_count): Optional 2nd argument
3397	specifies the name of the header to count.
3398
33992010-08-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3400
3401	Two new MFL functions for reading message headers.
3402
3403	* src/builtin/msg.bi (message_nth_header_name)
3404	(message_nth_header_value): New functions.
3405
3406	callout: optionally use the VRFY command, if the remote party provides it.
3407
3408	* src/callout.c (smtp_io_data) <nlines, esmtp_capa>: New members.
3409	(SMTP_PARSEHLO, CAPA_VRFY): New defines.
3410	(smtp_recv): Parse the EHLO reply, if SMTP_PARSEHLO flag is set.
3411	Always clear it before returning.
3412	(esmtp_vrfy): New function.
3413	(callout_io): Call esmtp_vrfy if enable_vrfy is set.
3414	(smtp_io_init, smtp_send, smtp_recvline)
3415	(smtp_recv, callout_io): Prefix all diagnostics with the transcaction
3416	ID.
3417	* src/callout.h (enable_vrfy): New extern.
3418	* src/savsrv.c (enable_vrfy): New variable.
3419	* src/srvcfg.c (srv_cfg_param)<enable-vrfy>: New statement
3420
34212010-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
3422
3423	Tiny fix.
3424
3425	* src/builtin/header.bi (header_replace): Fix a typo.
3426
34272010-08-25  Sergey Poznyakoff  <gray@gnu.org.ua>
3428
3429	Version 7.0.91
3430
34312010-08-24  Sergey Poznyakoff  <gray@gnu.org.ua>
3432
3433	Improve the caching logic in verify().
3434
3435	* src/savsrv.c (vrfy_state): Remove. All uses updated.
3436	(verify): Change the cache usage logic.
3437	(cmd_run): Take into account mf_timeout results.
3438	* lib/cache.c (EXPIRE_INTERVAL): Take into account mf_timeout results.
3439
3440	Minor change.
3441
3442	* src/callout.c (first_line_of): New static function.
3443	(smtp_last_sent): Use first_line_of.
3444	(smtp_last_received): Use first_line_of. Return the very first
3445	line in case of multiline responses.
3446
3447	Bugfix.
3448
3449	* mflib/rateok.mf: Rename to rateok.mf4. Use defined() to
3450	check whether mincnt is actually given. This fixes the bug
3451	reported by Rich Graves on August 24, 2010.
3452
34532010-08-23  Sergey Poznyakoff  <gray@gnu.org.ua>
3454
3455	Bugfixes.
3456
3457	* lib/filenames.h (DEFAULT_PIDFILE): Remove.
3458	* lib/logger.c (loggertab): Add syslog_async_fdset method for
3459	syslog:async.
3460	* src/Makefile.am (mfd-dbgmod.h): Kik off libcallout_a_SOURCES.
3461	* src/calloutd.c (_log_setup, mf_server_log_setup): Remove.
3462	(main): Call mf_srvcfg_log_setup.
3463	Update call to mf_srvcfg_init.
3464	* src/engine.c (setprocid): New static function.
3465	(mfd_callout_session_server): New function.
3466	* src/lex.l (lex_new_source_0): Bugfux.
3467	* src/mailfromd.h (mfd_callout_session_server): New proto.
3468	* src/main.c (mf_diag_syslog_printer, _log_setup)
3469	(mf_server_log_setup): Remove.
3470	(main): Call mf_srvcfg_log_setup.
3471	Update call to mf_srvcfg_init.
3472	* src/savsrv.c: Include signal.h
3473	(vrfy_state): New enum.
3474	(vrfy_queue)<state>: New member.
3475	(verify): Use rc and qp->state to decide whether to process
3476	the entry. This still needs some more work, though.
3477	(addq): Initialize qp->state.
3478	(cmd_run): Update qp->state.
3479	(callout_session_server): Ignore SIGPIPE and SIGALRM.
3480	* src/srvcfg.c (srv_options): Remove 's' option.
3481	(srv_parse_opt): Logger options update optcache.
3482	(setdefpidfilename): New static function.
3483	(mf_srvcfg_init): Take program invocation name as the
3484	first argument.  Construct pidfile name based on it, unless
3485	pidfile has already been initialized.
3486	Done update srvman_param.keepfds (see mf_srvcfg_log_setup).
3487	Initialize syslog_tag.
3488	(mf_diag_syslog_printer, mf_debug_syslog_printer): New functions.
3489	(mf_srvcfg_log_setup): New function.
3490	* src/srvcfg.h (mf_srvcfg_init): Change signature.
3491
3492	Improve default filter.
3493
3494	* src/builtin/system.bi (access): New function.
3495	* src/status.mfi (R_OK, W_OK, X_OK, F_OK): New constants.
3496	* etc/Makefile.am: Minor change.
3497	* etc/mailfromd.mf (whitelist_db): New constant.
3498	(envfrom): Test for existence of the whitelist
3499	db before trying to access it.
3500
3501	Various changes to improve backward compatibility.
3502
3503	* etc/mailfromd.mf: Clean up.
3504	* lib/server.c (mf_server_write_pidfile): New function.
3505	(mf_server_start): Call mf_server_log_setup prior to starting
3506	listeners. Issue the start up information afterwards, to make
3507	sure it is sent to the established logging channel.
3508	Call mf_server_write_pidfile instead of mu_daemon_create_pidfile,
3509	since the latter fails if the pidfile name is not absolute.
3510	Unlink the pidfile after mfd_srvman_run returns.
3511	* tests/testsuite.at (mailfromd_debug_header): Reflect the
3512	above change.
3513	* mflib/callout.mf4 (callout_open): If milter_client_address is
3514	empty (a local socket), use the word "local" instead.
3515
3516	* src/callout.c: Include srvcfg.h
3517	(transcript): Check the smtp_transcript flag.
3518	* src/callout.h: Remove externs declared in srvcfg.h
3519	* src/savsrv.c: Include srvcfg.h
3520	* src/srvcfg.c (transcript_option): Change to static.
3521	(smtp_transcript): New variable.
3522	(server_section_parser): Allow for empty label (means "default").
3523	(srv_cfg_param): Restore the `transcript' statement.
3524	(mf_srvcfg_flush): Set the value of smtp_transcript.
3525	* src/srvcfg.h (transcript_option): Remove extern.
3526	(smtp_transcript, io_timeout): New externs.
3527
35282010-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
3529
3530	Minor fixes.
3531
3532	* src/savsrv.c (mailfrom_address): Remove initializer.
3533	* src/callout.c (smtp_io_setup_callout): Allow for mailfrom==NULL.
3534
3535	Fix starting of the default callout server. Reflect the actual server URL in callout_server_url.
3536
3537	* mflib/callout.mf4 (callout_server_url): New variable.
3538	(begin): Provide a default for callout_server_url.
3539	(__callout_open_default): Return the fd.
3540	(callout): Use return from __callout_open_default as
3541	the first argument to callout_do.
3542	* mflib/poll.mf (__make_extra_arg): New static function.
3543	(_pollhost, _pollmx, stdpoll, strictpoll): Use return from
3544	__callout_open_default as the first argument to callout_do.
3545	Construct the rest of arguments using __make_extra_arg.
3546	* src/builtin/callout.bi (callout_server_url): Remove.
3547	(default_callout_server_url): New function.
3548	(MF_INIT): Remove initialization of callout_server_url.
3549	* src/mailfromd.h (default_callout_url): Rename to
3550	callout_server_url.
3551	* src/main.c (default_callout_url): Rename to
3552	callout_server_url.
3553	(provide_default_callout_server): Rewrite the condition.
3554	Don't try to reset the callout_server_url MFL variable: it
3555	is useless after compilation is finished.
3556	(mf_server_function): Fix the use of mu_list_locate.
3557	(main): Fix a typo in the server section label.
3558	* src/srvcfg.c (server_section_parser): Move the call to
3559	mf_server_function to the mu_cfg_section_end branch.
3560
3561	Complement the bugfix from 011f85d4
3562
3563	* src/mailfromd.h (SYM_PASSTOGGLE): New bit.
3564	* src/gram.y (_ds_variable_count_fun)
3565	(_ds_variable_fill_fun, _ds_reloc_fun): Use SYM_PASSTOGGLE
3566	bit to avoid processing the same variable several times.
3567	(dataseg_layout): Fix memory allocation.
3568
3569	Introduce callout session ID.
3570
3571	* lib/srvman.c (mfd_srvman_open): Print error message if no
3572	servers are configured.
3573	* mflib/Makefile.am (.mf4.mf): Call m4 -s.
3574	* mflib/callout.mf4 (callout_open): Set session ID.
3575	* src/callout.c (smtp_io_setup_callout): Replace empty
3576	mailfrom address with <>.
3577	(smtp_io_id): New function.
3578	* src/callout.h (smtp_io_id): New proto.
3579	* src/savsrv.c (session_id): New variable.
3580	(defproctitle): New function.
3581	(vrfy_free): Consistently set proctitle to reflect the current state.
3582	(addq): Save session ID in the smtp io structure.
3583	(cmd_sid): New function.
3584	(callout_command_tab)<SID>: New command.
3585
3586	Bugfix
3587
3588	* src/builtin/macro.bi (miltermacros): Fix minimal number of
3589	arguments.
3590
3591	Re-implement the `listens' function in mflib.
3592
3593	* mflib/portprobe.mf4: New implementation of the `listens' function.
3594	* mflib/Makefile.am (MF4_FILES): New variable.
3595	(MAINTAINERCLEANFILES): Add mf files produced from MF4_FILES.
3596	(.mf4.mf): Define MF_AUTOHEADER to add a warning at the top of
3597	the generated files.
3598	* mflib/pp-setup: Issue an "automatically generated file" warning
3599	if MF_AUTOHEADER is defined.
3600	* mflib/.gitignore: Add portprobe.mf
3601	* src/builtin/dns.bi: Include srvcfg.h
3602	(listens_on, listens): Remove.
3603
36042010-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
3605
3606	Restore some cfg statements for backward compatibility.
3607
3608	* src/srvcfg.h: Add copyleft header.
3609	(DEFAULT_PIDFILE): Move to lib/filenames.h.
3610	(mf_srvcfg): New struct.
3611	(mf_server_function): New proto.
3612	(parse_milter_url): New proto.
3613	* lib/filenames.h: Add copyleft header.
3614	(DEFAULT_PIDFILE): New define.
3615
3616	* src/gram.y: Use mf_list_compare_string comparator.
3617	(initialize_variable): Avoid coredump if locus==NULL.
3618	* mailfromd.h (default_callout_url): New extern.
3619	(compare_string): Remove proto.
3620	* src/main.c (default_callout_url): New function.
3621	(compare_string): Remove function. All callers use
3622	mf_list_compare_string instead.
3623	(mf_cfg_param): Remove ehlo-domain and mail-from-address
3624	statements (duplicated in srvcfg.c)
3625	Restore the callout-url statement.
3626	(mf_server_function): Change signature.
3627	Check for "option default" for callout servers.
3628	(main): Move call to mf_srvcfg_flush several lines up,
3629	before processing the filter script.
3630	* src/srvcfg.c (parse_milter_url): Remove static qualifier.
3631	(mf_srvcfg_add, server_section_parser): Use the new calling scheme
3632	of mf_server_function.
3633	(server_config_stmt): Remove struct.
3634	(server_config_stmt):Change type struct mf_srvcfg.
3635	(server_section_param) <option>: New statement.
3636	<default>: Restore statement.
3637	* src/calloutd.c (mf_server_function): Change signature.
3638
3639	* lib/libmf.h (mf_list_compare_string): New function.
3640	* lib/utils.c: Likewise.
3641	* mflib/callout.mf4 (ehlo_domain, mailfrom_address): Comment out. See
3642	callout.bi.
3643	(callout_open): Comment out sending the SET commands.
3644	* mflib/spf.mf: Remove dependency on phased-out mydomain.mf.
3645	(check_host): Revert to using ehlo_domain.
3646	* src/builtin/callout.bi (ehlo_domain, mailfrom_address): Define here
3647	(again).
3648	(MF_INIT): Initialize callout_server_url, ehlo_domain
3649	and mailfrom_address.
3650
3651	Restore the io-timeout configuration statement.
3652
3653	* src/srvcfg.c (srv_cfg_param): Restore the io-timeout statement.
3654
3655	Minor fix.
3656
3657	* pmult/pmult.c (stderr_closed_p): Remove a leftover redefinition.
3658
3659	Minor changes.
3660
3661	* mflib/mydomain.mf: Remove
3662	* mflib/Makefile.am: Remove mydomain.mf
3663	* mflib/poll.mf: Add copyleft header.
3664
3665	Fix namespace (mu_db -> mf_db)
3666
3667	Fix namespace (pm -> mf)
3668
3669	Fix debugging in calloutd.
3670
3671	* src/dbgmod.awk: Use optional `offset' variable.
3672	* src/main.c (main): Call libcallout_init.
3673	* src/calloutd.c: Likewise.
3674	* lib/db.c (db_format_install): Register format (not database file) name.
3675	* lib/debug.c (debug_next_handle): New function.
3676	(debug_init): Register "all" only once.
3677	* lib/debug.h (debug_next_handle): New proto.
3678	* src/Makefile.am (callout-dbgmod.h): Offset handles by
3679	callout_debug_handle.
3680	* src/callout.c (libcallout_init): New function.
3681	* src/callout.h (callout_debug_handle): New extern.
3682	(libcallout_init): New proto.
3683
3684	* etc/mailfromd.mf: Minor change.
3685
3686	Rename mfd -> src
3687
3688	Bugfixes
3689
3690	* mfd/engine.c (mlfi_negotiate): Fix improper use of the debug macro.
3691	* mfd/gram.y: Remove prototypes of non-existing functions.
3692	* mfd/lex.l: Remove MF_SOURCE_NAME leftover.
3693	* mfd/mailfromd.h (tie_in_onblock): Restore prototype.
3694
3695	Restore temporarly removed features.
3696
3697	* mfd/main.c (main): Restore the check for non-absolute
3698	script file name.
3699
3700	* mfd/srvcfg.c: Restore the --source-ip (-S) option and
3701	source-ip configuration statement.
3702	* tests/testsuite.at (mailfromd_script_warning): New define.
3703	(AT_MTA_TEST_X, AT_MTA_TEST_SCRIPT,
3704	(AT_MTA_TEST_FILTER_SCRIPT): Redefine mailfromd_debug_header to
3705	account for the non-absolute script file name warning.
3706
3707	Silently ignore the --remove (-r) option.
3708
3709	* mfd/srvcfg.c: Silently ignore the --remove (-r) option.
3710
3711	Restore the `on' construct.
3712
3713	* etc/mailfromd.mf: Require poll and callout.
3714	* lib/namefixup.c (pm_file_name_ptr_fixup): Bugfix.
3715	* mfd/gram.y: Restore the `on poll' construct.
3716	* mfd/lex.l: Likewise.
3717	* mflib/callout.mf4 (ehlo_domain): Remove static qualifier.
3718	* po/POTFILES.in: Update.
3719	* tests/etc/Makefile.am (RCFILES): Add vmod1.mf and vmod2.mf.
3720	* tests/etc/poll-1.rc: Require poll.
3721	* tests/etc/poll.rc: Likewise.
3722	* tests/poll.at: Rewrite using AT_MTA_TEST_FILTER.
3723	* tests/poll01.at: Likewise.
3724	* tests/poll02.at: Likewise.
3725	* tests/poll03.at: Likewise.
3726	* tests/poll04.at: Require poll.
3727
3728	Implement default callout server. Fix the handling of not imported variables in submodules.
3729
3730	* mfd/calloutd.c: New file.
3731	* mfd/builtin/callout.bi: New file.
3732	* mfd/builtin/.gitignore: Add callout.c
3733	* mfd/builtin/Makefile.am (BI_FILES): Add callout.bi.
3734	* builtin/builtin.def (provide_callout): New extern.
3735
3736	* mfd/Makefile.am (noinst_LIBRARIES): New library libcallout.a.
3737	(mailfromd_SOURCES): Remove srvcfg.c
3738	(mailfromd_LDADD, calloutd_LDADD): Add libcallout.a.
3739	(calloutd_SOURCES): Move all sources to libcallout.a.
3740	Add calloutd.c
3741	(LDADD): Remove.
3742	(mfd-dbgmod.h): Obtain symbols from libcallout_a_SOURCES as well.
3743	(callout-dbgmod.h): Obtain symbols from libcallout_a_SOURCES.
3744
3745	* lib/filenames.h (DEFAULT_CALLOUT_SOCKET): New define.
3746	* lib/libmf.h (stderr_closed_p): New proto.
3747	* lib/utils.c (stderr_closed_p): New function.
3748
3749	* mfd/callout.c: Rearrange includes.
3750	* mfd/callout.h: Rearrange includes.
3751	(ehlo_domain, mailfrom_address): New externs.
3752	(callout_session_server): New extern.
3753	* mfd/savsrv.c: Rearrange includes.
3754	(main, etc.): Remove.
3755	* mfd/srvcfg.c (set_port): Fix 1st argument to pm_srvcfg_add.
3756	(srv_cfg_param): New keywords: database and mail-from-address
3757	(pm_srvcfg_flush): Initialize ehlo_domain and timeouts.
3758
3759	* mfd/main.c: Rearrange includes.
3760	(pm_server_function): Use key as a selector value.
3761	(main): Start default milter and/or callout servers, if necessary.
3762
3763	* mfd/symbols.c (import_builtin_variables): Minor fix.
3764	(module_head, module_tail): New statics.
3765	(module_register, module_symtab_enumerate): New functions.
3766	(module_init): Register the module.
3767
3768	* mfd/mailfromd.h (SYM_INITIALIZED): New flag.
3769	(module_symtab_enumerate): New proto.
3770	* mfd/gram.y (initialize_variable): Set SYM_INITIALIZED bit.
3771	(dataseg_layout): Use module_symtab_enumerate instead of
3772	symtab_enumerate.
3773
3774	* mflib/callout.mf: Rename to mflib/callout.mf4
3775	* mflib/Makefile.am (EXTRA_DIST): Add callout.mf4
3776	* mflib/.gitignore: Add callout.mf.
3777	* mflib/poll.mf: Rewrite using the callout function.
3778
3779	New testcase.
3780
3781	* tests/etc/vmod1.mf: New file.
3782	* tests/etc/vmod2.mf: New file.
3783	* tests/module07.at: New testcase.
3784	* tests/Makefile.am: Add module07.at
3785	* tests/testsuite.at: Add module07.at
3786	(MAILFROMD_LOGOPTS): New define
3787	(MF_CHECK_PROG, MF_CHECK_TEXT, MF_RUN_TEXT)
3788	(AT_MTA_TEST_X, AT_MTA_TEST): Add MAILFROMD_LOGOPTS to
3789	the mailfromd command line.
3790
3791	Bugfix:
3792
3793	* mfd/builtin/io.bi (write, read, getdelim)
3794	(getline, fd_set_delimiter, fd_delimiter): Fix assertions.
3795	* mfd/builtin/snarf.m4 (MF_PRAGMA): Replace '-' with '_' in
3796	the name of the generated hander.
3797
3798	Improve debugging in calloutd.
3799
3800	* lib/debug.h (debug_vlog): New proto.
3801	* lib/logger.c (debug_vlog): New function.
3802	* mfd/savsrv.c (writeout): New function. Use it instead of
3803	fprintf to send out server replies.
3804
3805	Add pmtool.c
3806
3807	Provide a default milter listener.
3808
3809	* mfd/main.c (main): start a default listener if no servers
3810	have been configured.
3811	* mfd/srvcfg.c (pm_srvcfg_add): New function.
3812	(set_port): Rewrite using pm_srvcfg_add.
3813	* mfd/srvcfg.h (pm_srvcfg_add): New proto.
3814
3815	Fix testsuite (except for poll tests).
3816
3817	* tests/testsuite.at (mailfromd_debug_header)
3818	(mailfromd_debug_footer): New defines.
3819	(__MTA_TEST): New macro.
3820	(AT_MTA_TEST): Rewrite via __MTA_TEST.
3821
3822	* tests/curmsg.at: Remove mailfromd debugging output from
3823	stderr patterns. It is added automatically by AT_MTA_TEST.
3824	* tests/hdr-all.at: Likewise.
3825	* tests/hdr-cap.at: Likewise.
3826	* tests/hdr-count.at: Likewise.
3827	* tests/hdr-get.at: Likewise.
3828	* tests/hdr-gete.at: Likewise.
3829	* tests/hdr-getn.at: Likewise.
3830	* tests/hdr-itr.at: Likewise.
3831	* tests/hdr-mul.at: Likewise.
3832	* tests/rset.at: Likewise.
3833	* tests/greylist-ct.at: Call mailfromd_stop if any
3834	subtest fails.
3835
3836	Fixup database names in reference to the state dir.
3837
3838	* lib/Makefile.am (libmf_a_SOURCES): Add namefixup.c
3839	* lib/db.c (db_format_install): Register database name
3840	for fixup.
3841	* lib/libmf.h: Uncover namefixup prototypes.
3842	* lib/namefixup.c (head, tail): Statics.
3843	* lib/optcache.c: Likewise.
3844	* mfd/main.c: Fixup names.
3845
3846	Add a tool for database management.
3847
3848	* lib/pmdb.h (ignore_failed_reads_option, time_format_string): New externs.
3849	* mfd/Makefile.am (bin_PROGRAMS): New program pmtool.
3850	* mfd/gram.y (convert_rate): Remove.
3851	* mfd/srvcfg.c: Include sysexits. Handle "port" option cache.
3852	* mfd/.gitignore: Add pmtool.
3853
3854	Bugfix
3855
3856	* lib/optcache.c (find_option, pm_optcache_flush): Bugfix (ouch!)
3857
3858	Change callout protocol.
3859
3860	* mfd/builtin/vars.bi (ehlo_domain, mailfrom_address): Remove variables.
3861	(builtin_post_setup): Remove function.
3862	* mfd/callout.c (smtp_io_set_timeouts): New function.
3863	* mfd/callout.h (smtp_io_set_timeouts): New proto.
3864	* mfd/gram.y: Remove call to builtin_post_setup.
3865	* mfd/mailfromd.h (builtin_post_setup): Remove proto.
3866	* mfd/main.c (parse_opt): Allocate string before adding it to trace_modules.
3867	* mfd/savsrv.c (ehlo_domain, mailfrom_address): New variables.
3868	(callout_mode): New enum.
3869	(vrfy_queue)<mode>: New member.
3870	(verify): 2nd arg tells which timeouts to use and whether to
3871	translate mf_timeout to mf_not_found.
3872	All callers updated.
3873	(addq): Use new protocol.
3874	(cmd_vrfy): Do not free timed out entries.
3875	(callout_command_tab): Alter protocol.
3876	(callout_cfg_param): New keywords ehlo-domain and mail-from-address.
3877	(init_domain): New function.
3878	(main): Call init_domain.
3879
3880	* lib/cache.c (tempfail_expire_interval): New variable.
3881	(EXPIRE_INTERVAL): Take into account mf_temp_failure.
3882
3883	* mflib/callout.mf, mflib/mydomain.mf, mflib/poll.mf: New files.
3884	* mflib/Makefile.am (MF_FILES): Add callout.mf, mydomain.mf
3885	and poll.mf
3886	* mflib/spf.mf: Use my_domain instead of the removed ehlo_domain.
3887
3888	Move callout to a separate server
3889
3890	Move srvman and logging to lib.
3891
3892	* mfd/srvman.c, mfd/srvman.h: Move to lib, with edits.
3893	* lib/Makefile.am: Update.
3894	* mfd/Makefile.am: Update.
3895
3896	* lib/logger.c: New file.
3897	* lib/debug.c (source_info_option): New global.
3898	* lib/debug.h: Likewise.
3899	* lib/libmf.h (logger): New struct.
3900	(logger_select, logger_open)
3901	(logger_close, logger_fdset)
3902	(logger_flags, vlogmsg, logmsg): New prototypes.
3903
3904	* mfd/builtin/io.bi (stderr_to_log): Use logger_fdset.
3905	* mfd/mailfromd.h (source_info_option): Remove extern.
3906	(logmsg, vlogmsg): Remove protos.
3907	(log_to_stderr, use_syslog_async): Remove extern.
3908	* mfd/main.c (force_remove): Initialize to 1.
3909	(source_info_option): Remove.
3910	(log_to_stderr, use_syslog_async): Remove.
3911	(syslog_printer, vlogmsg, logmsg)
3912	(vformat_logmsg, format_logmsg)
3913	(format_log_si, debug_locus, debug_log)
3914	(mflog_fd): Remove.
3915	(_log_setup): Rewrite.
3916	(set_srvman_param): New function.
3917	(main): Call srvman_init and set_srvman_param.
3918	(log_stream): New variable.
3919	(option_cache): Cache logger.
3920	(OPTION_LOGGER): New constant.
3921	(OPTION_NO_SYSLOG_ASYNC, OPTION_SYSLOG_ASYNC): Remove.
3922	(options): Remove --syslog-async, --no-syslog-async. New option
3923	--logger.
3924	(arguments) <syslog_async>: Remove. All uses updated.
3925	(parse_opt): Set log_stream instead of the removed log_to_stderr.
3926	(mf_cfg_param)<syslog-async>: Remove.
3927	<logger>: New statement.
3928	(_log_setup): Change signature. All callers updated.
3929	(mflog_close): Remove function.
3930	(main): Do second log setup after calling process_options,
3931	so that the "logger" statement and "--logger" option work
3932	correctly. A side effect is that syntax errors are reported
3933	on stderr even when started in daemon mode.
3934	* mfd/pp.c (pp_extrn_start): Rewrite stderr redirection.
3935	* tests/numrcpt.at: Remove left-over % prefix.
3936	* mfd/builtin/io.bi (stderr_to_log): Use logger_open.
3937	* mfd/engine.c (mailfromd_daemon): Use logger_close.
3938
3939	Bugfix.
3940
3941	* mfd/srvman.c (mfd_srvman_run): Check if stop signal arrived
3942	right before select. This fixes sporadically reoccurring error
3943	in greylist*.at.
3944
3945	Redo debugging support in the library.
3946
3947	* mfd/debug.c: Moved to lib/debug.c.
3948	* mfd/debug.hin: Renamed to lib/debug.h.
3949	Removed calls to m4 macros.
3950	(__debug, debug): New macros.
3951	(debug_locus): New proto.
3952	* mfd/debugdef.m4: Remove.
3953	* mfd/modlist.cin: Remove.
3954	* lib/Makefile.am: Update.
3955	* lib/libmf.h (TYPE_SIGNED, INT_STRLEN_BOUND)
3956	(INT_BUFSIZE_BOUND, NUMERIC_BUFSIZE_BOUND): New defines (from mailfromd.h)
3957	(argp): Forward declaration of the struct.
3958	* mfd/.gitignore: Update.
3959	* mfd/Makefile.am (mailfromd_SOURCES): Remove debug.c and
3960	modlist.c.
3961	(noinst_HEADERS): Remove debug.h, add mfd-dbgmod.h.
3962	(EXTRA_DIST): Remove debug.hin, debugdef.m4, modlist.cin and module.list.
3963	Add dbgmod.awk.
3964	(BUILT_SOURCES): Likewise.
3965	(SUFFIXES): Remove .hin
3966	(mfd-dbgmod.h): New goal.
3967	(module.list, debug.h, modlist.c): Remove goals.
3968	(.cin.c, .hin.h): Remove rules.
3969	* mfd/dbgmod.awk: New file.
3970
3971	* mfd/builtin/snarf.m4: Change default divertion to #2.
3972	(MF_INIT): Undivert everything here.
3973	(MF_DEBUG): New macro.
3974
3975	* mfd/builtin/db.bi: Use MF_DEBUG instead of debug.
3976	* mfd/builtin/io.bi: Likewise.
3977	* mfd/builtin/mbox.bi: Likewise.
3978	* mfd/builtin/other.bi: Likewise.
3979	* mfd/builtin/sa.bi: Likewise.
3980
3981	* mfd/mailfromd.h (getmaxfd): Remove (already defined in libmf.h)
3982	Include mfd-dbgmod.h
3983	* mfd/main.c (vformat_logmsg, format_logmsg)
3984	(format_log_si): New statics.
3985	(debug_locus): New function.
3986	(debug_log): Rewrite.
3987	(modnames): New variable.
3988	(main): Call debug_init.
3989
3990	* mfd/*.c: Remove definitions of MF_SOURCE_NAME.
3991	Use debug() macro uniformly.
3992
3993	* po/POTFILES.in: Update.
3994
3995	Improve MFL getline interface.
3996
3997	* mfd/builtin/io.bi (io_stream)<delim>: New member.
3998	(close_stream): Free delim.
3999	(read_stream_delim): Take delim as char*.
4000	(open): Initialize delim.
4001	(getdelim): Optimize.
4002	(getline):  Use ioptr->delim, fall back to "\n", if not set.
4003	(fd_set_delimiter, fd_delimiter): New functions.
4004
4005	Change callout server protocol (part I).
4006
4007	* mfd/appinit.c: Moved to ../lib
4008	* mfd/Makefile.am, lib/Makefile.am: Update accordingly.
4009	* lib/libmf.h (mu_app_rcfile): New extern.
4010	(mfd_app_init): New proto.
4011
4012	* mfd/savsrv.c (callout_command)<argc>: Remove.
4013	<argmin,argmax>: New members.
4014	(vrfy_queue) <serial, result, file>: New members.
4015	(serial): New static.
4016	(vrfy_free, vrfy_del): New functions.
4017	(verify): Take one argument. Show request serial numbers in proctitle formats.
4018	(run_queue): Rewrite.
4019	(savsrv_smtp_io_callback): New function.
4020	(addq): Register i/o callback function.
4021	(cmd_vrfy): Print serial number in OK response.
4022	(cmd_run): Print results in OK response.
4023	(cmd_drop): New function.
4024	(callout_command_tab): Update.
4025	(callout_session_server): Check argmin and argmax.
4026
40272010-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4028
4029	Minor fix.
4030
4031	* mfd/engine.c (mlfi_negotiate): issue a debugging diagnostics
4032	when automatically registering the "i" macro.
4033	(milter_enable_state): Update first_used_state only if state
4034	is one of the actual SMTP states (excluding begin and end).
4035
40362010-08-07  Sergey Poznyakoff  <gray@gnu.org.ua>
4037
4038	Version 7.0
4039
4040	* NEWS, configure.ac: Update
4041	* doc/upgrade.texi: Update
4042
40432010-08-05  Sergey Poznyakoff  <gray@gnu.org.ua>
4044
4045	Minor fix.
4046
4047	* mfd/engine.c (check_pidfile): Use `name' argument,
4048	not `pidfile' global.
4049
40502010-08-03  Sergey Poznyakoff  <gray@gnu.org.ua>
4051
4052	Minor fixes. Improve callout sequence.
4053
4054	* etc/mailfromd.mf (begin): Unconditionally initialize
4055	ehlo_domain. Provide a comment explaining this.
4056	* mfd/builtin/vars.bi: Set ehlo_domain to the value of
4057	the domain name, instead of the host name.
4058	* mfd/callout.c (callout_io): Try EHLO first and fall back
4059	to HELO if it fails, as requested by RFC 2821, section
4060	3.2 "Client Initiation".
4061
4062	Bugfix.
4063
4064	* mflib/sa.mf (sa_format_report_header): Initialize ret.
4065
40662010-08-02  Sergey Poznyakoff  <gray@gnu.org.ua>
4067
4068	Register the "i" macro for use in the lowest SMTP state declared in the program.
4069
4070	* mfd/engine.c (first_used_state): New variable.
4071	(mlfi_negotiate): If first_used_state is set, register "i"
4072	macro for it.
4073	(milter_enable_state): Set first_used_state.
4074	* mfd/gram.y (register_macro): Remove static qualifier.
4075
4076	* mfd/builtin/macro.bi (miltermacros): New pragma.
4077
4078	* mfd/lex.l (paren_follows): Remove tie-in variable.
4079	* mfd/mailfromd.h (register_macro): New proto.
4080	(paren_follows): Remove extern.
4081
4082	* NEWS: Update.
4083	* doc/mailfromd.texi: Document #pragma miltermacros.
4084	* doc/functions.texi: Likewise.
4085
4086	Register the "i" macro for use in the lowest SMTP state declared in the program.
4087
4088	* mfd/engine.c (first_used_state): New variable.
4089	(mlfi_negotiate): If first_used_state is set, register "i"
4090	macro for it.
4091	(milter_enable_state): Set first_used_state.
4092	* mfd/gram.y (register_macro): Remove static qualifier.
4093
4094	* mfd/builtin/macro.bi (mta_state_macros): New pragma.
4095
4096	* mfd/lex.l (paren_follows): Remove tie-in variable.
4097	* mfd/mailfromd.h (register_macro): New proto.
4098	(paren_follows): Remove extern.
4099
4100	Minor change.
4101
4102	* mfd/builtin/db.bi: Remove extra whitespace.
4103
4104	Fix docs
4105
4106	* doc/functions.texi: Update.
4107	* doc/mailfromd.texi: Update.
4108
41092010-07-25  Sergey Poznyakoff  <gray@gnu.org.ua>
4110
4111	Update the docs.
4112
41132010-07-24  Sergey Poznyakoff  <gray@gnu.org.ua>
4114
4115	Discern between unset and zero module debugging levels.
4116
4117	* mfd/builtin/other.bi (debug_spec): Additional 3rd argument.
4118	* mfd/debug.c (module_level) <isset>: New member.
4119	(debug_level_p): Check module level only if it is set.
4120	(debug_enable_module): Set isset to 1.
4121	(debug_disable_module): New function.
4122	(parse_spec): Skip initial whitespace.  Handle !module
4123	construct (meaning to unset debugging for module).
4124	(debug_spec_string): New argument showunset.  Print unset
4125	modules explicitly (discern between !module and module=0).
4126	Allow for leading whitespace in specs.
4127	* mfd/debug.hin (debug_spec_string): Change signature.
4128
4129	* doc/functions.texi: Update.
4130	* doc/mailfromd.texi: Update.
4131
41322010-07-22  Sergey Poznyakoff  <gray@gnu.org.ua>
4133
4134	Update the docs.
4135
4136	* doc/mailfromd.texi: Update
4137
4138	Suppress cc warnings.
4139
4140	* gacopyz/server.c (gacopyz_srv_eoh): Remove unused variable.
4141	* mfd/dns.c (getmx): Likewise.
4142	* mfd/lex.l: Set nounput option.
4143
4144	Version 6.0.94
4145
4146	* NEWS, configure.ac: Update version number.
4147
4148	Update docs; other minor changes.
4149
4150	* etc/postfix-macros.sed: New file.
4151	* etc/Makefile.am (pkglibexec_DATA): Add postfix-macros.sed.
4152
4153	* lib/version.c (version_etc_copyright): Update copyright years.
4154	* mflib/spf.mf (__spf_msgid): New static.  Use it instead of
4155	referring to $i, which may be not defined.
4156
4157	* doc/mailfromd.texi: Update.
4158	* doc/pmult.texi: Update.
4159
41602010-07-21  Sergey Poznyakoff  <gray@gnu.org.ua>
4161
4162	Bugfix.
4163
4164	Minor change.
4165
4166	* mfd/builtin/.gitignore: Add mmq.c
4167
4168	Improve DNS interface. Number of MXs used in various operations is configurable.
4169
4170	* mfd/dnsbase.c (_getmx): Change prototype. Use struct mxbuf,
4171	(dns_get_mx_records): Likewise.
4172	(dns_freemx): Remove.
4173	(mxbuf_init, mxbuf_free): New functions.
4174	* mfd/dns.h (mxbuf): New struct.
4175	(mxbuf_t): Remove typedef.
4176	(mxbuf_init, mxbuf_free): New functions.
4177	(dns_get_mx_records): Change proto.
4178	(dns_freemx): Remove proto.
4179	* mfd/dnscache.c (parse_value, dns_cache_get): Change signature. All callers
4180	updated.
4181	* mfd/mailfromd.h (getmx, getmxip): Change signature.
4182	(max_callout_mx, max_match_mx): New externs.
4183	(dns_cache_get): Change signature.
4184	* mfd/main.c (max_callout_mx, max_match_mx): New globals.
4185	(mf_cfg_param): New statements "max-callout-mx" and "max-match-mx".
4186	* mfd/callout.c (callout_mx): Use new mxbuf interface.
4187	* mfd/dns.c (getmx): Change signature. Use new mxbuf interface.
4188	(getmxip): Likewise.
4189	* mfd/prog.c (mx_match): Use new mxbuf interface. Limit number
4190	of MXs by max_match_mx.
4191	* mfd/spf.c (mech_mx): Use new mxbuf interface.
4192
4193	* mfd/builtin/dns.bi (dns_cfg_param): New statement "max-dns-reply-mx".
4194	(primitive_hasmx,getmx)
4195	(primitive_ismx): Rewrite to use new mxbuf interface.
4196
4197	* doc/values.texi (MAX_DNS_MX, MAXMXCOUNT): New values.
4198	* doc/functions.texi: Update.
4199	* doc/mailfromd.texi: Update.
4200	* doc/pmult.texi: Update.
4201	* doc/values.texi (MAX_DNS_MX, MAXMXCOUNT): New values.
4202
4203	Remove hardcoded limits on the number of A and PTR records in DNS replies.
4204
4205	* mfd/main.c (mf_runtime_param_finish): Fix.
4206	* doc/functions.texi: Document changes to DNS functions.
4207	* doc/mailfromd.texi (conf-runtime): Document max-dns-reply-a
4208	and max-dns-reply-ptr.
4209	* doc/values.texi (MAX_DNS_A, MAX_DNS_PTR): New values.
4210
4211	* mfd/builtin/dns.bi (dns_cfg_param): Define new configuration
4212	statements in runtime block: max-dns-reply-a, max-dns-reply-ptr.
4213	(dns_getaddr, dns_getname): Do not use hardcoded limits.
4214	(MF_INIT): Register new configuration statements.
4215
4216	Make runtime constants in builtin/*.bi sources configurable.
4217
4218	* mfd/mailfromd.h (mf_add_runtime_params): New proto.
4219	* mfd/main.c (mf_cfg_param)<runtime>: New entry.
4220	(mf_add_runtime_params,mf_runtime_param_finish): New functions.
4221	(main): Call mf_runtime_param_finish.
4222
4223	* mfd/builtin/io.bi (nstreams): New static, used instead of
4224	NSTREAMS macro.
4225	(io_cfg_param, MF_INIT): Declare a
4226	configuration statement to confifure nstreams.
4227	* mfd/builtin/mbox.bi (nmboxes): New static, used instead of
4228	NMBOXES macro.
4229	(mbox_cfg_param, MF_INIT): Declare a
4230	configuration statement to confifure nmboxes.
4231	* mfd/builtin/msg.bi (nmsgs): New static, used instead of
4232	NMSGS macro.
4233	(msg_cfg_param, MF_INIT): Declare a
4234	configuration statement to confifure nmsgs.
4235
4236	* doc/Makefile.am (check-runtime-config): New rule.
4237	(all-check-docs): Depend on check-runtime-config.
4238	(check-sub-config): Ignore the "runtime" section.
4239
4240	* doc/functions.texi: Document the runtime limits.
4241	* doc/mailfromd.texi (conf-runtime): New node.
4242	* doc/values.texi (NSTREAMS, NMBOXES, NMSGS): New values.
4243
4244	* mfd/msg.h: Moved to builtin.
4245	* mfd/Makefile.am (noinst_HEADERS): Remove msg.h
4246	* mfd/builtin/Makefile.am (noinst_HEADERS): Add msg.h
4247
42482010-07-20  Sergey Poznyakoff  <gray@gnu.org.ua>
4249
4250	Update docs.
4251
42522010-07-17  Sergey Poznyakoff  <gray@gnu.org.ua>
4253
4254	Documentation: describe the changes since the last release and the upgrade procedure.
4255
42562010-07-15  Sergey Poznyakoff  <gray@gnu.org.ua>
4257
4258	Minor changes to the docs.
4259
4260	Write more docs.
4261
4262	* doc/deprecate.texi: Remove.
4263	* doc/pragma-database.texi: Remove.
4264	* doc/pragma-option.texi: Remove.
4265	* doc/Makefile.am (mailfromd_TEXINFOS): Remove the above.
4266	(check-pragmas): Remove the rule, but leave a placeholder for
4267	a while.
4268	(check-sub-config): Fix the rule to allow for dashes in keyword
4269	names.
4270	* doc/functions.texi: Fix a typo.
4271	* doc/macros.texi (histref): New macro.
4272	* doc/mailfromd.texi: Remove obsolete sections. Describe
4273	callout servers and SMTP timeouts.
4274
4275	* mflib/sav.mf: Remove.
4276
42772010-07-14  Sergey Poznyakoff  <gray@gnu.org.ua>
4278
4279	Document try-catch and dclex
4280
4281	* NEWS: Update.
4282	* doc/mailfromd.texi: Document try-catch and dclex.
4283	* doc/upgrade.texi : Update.
4284	* doc/values.texi (MIN_EXCEPTION, MAX_EXCEPTION): New values.
4285
4286	Improve docs: replace %var with var.
4287
4288	* doc/functions.texi: Update.
4289	* doc/mailfromd.texi: Update.
4290
4291	Restructure the manual.
4292
4293	Move function descriptions in a separate chapter.
4294
4295	* doc/functions.texi: New file.
4296	* doc/Makefile.am (info_TEXINFOS): Add functions.texi
4297	* doc/mailfromd.texi: Restructure.
4298
4299	Minor changes
4300
4301	* NEWS: Reword some passages.
4302	* etc/Makefile.am (EXTRA_DIST): Add sendmail-8.14.3.connect.diff
4303
43042010-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
4305
4306	Bugfixes in io.bi
4307
4308	* mfd/builtin/io.bi (mfd/builtin/io.bi): Free str->name.
4309	(open): Allocate memory for iotab[i].name.
4310	(open_parsed_inet_stream): Remove select-driven loop
4311	which did nothing except eating up CPU.
4312
43132010-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>
4314
4315	Minor change
4316
4317	Warn about risky uses of accept. Provide ways to properly handle them.
4318
4319	* mfd/builtin/mmq.bi: New source.
4320	* builtin/Makefile.am (BI_FILES): Add mmq.bi
4321
4322	* mfd/debug.hin (init_debug_modlist)
4323	(debug_init): New prototypes.
4324	* mfd/engine.c (message_data): Rename hdr to mmq. All uses
4325	updated.
4326	(priv_store_msgmod_closure): Purge the queue if cmd is NULL.
4327	(mlfi_eom): Emit warning if accept is called when the MMQ is
4328	not empty.
4329	* mfd/gram.y: Handle NULL closure.
4330	* mfd/mailfromd.h (env_clear_msgmod): New proto.
4331	* mfd/prog.c (ENVF_MSGMOD): New constant.
4332	(exception_context)<flags>: New member.
4333	(runtime_warning): Rewrite using mu_diag_printf.
4334	(instr_result): Warn user if `accept' is called
4335	after commands that modify message headers or
4336	body.
4337	(env_clear_msgmod): New function.
4338	(env_msgmod): Set ENVF_MSGMOD flag.
4339
4340	* NEWS, doc/mailfromd.texi: Document mmq_purge and changes to accept.
4341
43422010-06-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4343
4344	Version 6.0.93
4345
4346	* configure.ac, NEWS: Update.
4347	* mfd/mailfromd.h [USE_SYSLOG_ASYNC] (use_syslog_async): New
4348	extern.
4349
4350	Improve handling of stderr in open("|...").
4351
4352	* doc/mailfromd.texi: Document dequote and extensions to
4353	open("|..").
4354	* builtin/io.bi (STDERR_SHUT, STDERR_NULL)
4355	(STDERR_LOG, STDERR_FILE, STDERR_FILE_APPEND)
4356	(LOG_TAG_PFX, LOG_TAG_PFX_LEN): New defines.
4357	(stderr_to_log, stderr_handler)
4358	(parse_stderr_redirect): New statics.
4359	(open_program_stream): Always close or redirect stderr.
4360	* NEWS: Updated.
4361
4362	* doc/Makefile.am (check-builtins): Fix rule to match new
4363	naming convention.
4364
43652010-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
4366
4367	Smap forked into a separate project.
4368
4369	* NEWS, configure.ac: Version 6.0.92.
4370	* Makefile.am (SUBDIRS): Remove smap.
4371	* doc/Makefile.am, doc/mailfromd.texi: Remove smap docs.
4372	* doc/smap.texi: Remove.
4373	* smap/.gitignore: Remove.
4374	* smap/Makefile.am: Remove.
4375	* smap/smap.c: Remove.
4376	* po/POTFILES.in: Update.
4377
4378	Bugfix.
4379
4380	* configure.ac: Remove whitespace around shell assignment operator.
4381
43822010-06-04  Sergey Poznyakoff  <gray@gnu.org.ua>
4383
4384	Optimize boolean shortcut evaluation when one of arguments is constant.
4385
4386	* mfd/drivers.c (node_boolean_value, _optimize_shortcut): New static
4387	functions.
4388	(optimize_relational): Optimize boolean shortcut evaluation.
4389	* mfd/debug.hin (debug_register): New prototype.
4390	* NEWS: Fix typos.
4391
43922010-05-28  Sergey Poznyakoff  <gray@gnu.org.ua>
4393
4394	Minor fixes.
4395
4396	* doc/mailfromd.texi (MF_OBSTACK_1GROW): Change type of the temp
4397	variable to char.
4398	* doc/mailfromd.texi: Minor fixes.
4399
4400	Improve debugging system.
4401
4402	* mfd/debug.cin: Remove.
4403	* mfd/modlist.cin: New file.
4404	* mfd/Makefile.am (mailfromd_SOURCES): Add modlist.c.
4405	(EXTRA_DIST): Remove debug.cin, add modlist.cin.
4406	(BUILT_SOURCES): Remove debug.c, add modlist.c.
4407	(debug.c): Rewrite rule.
4408	(debug.h): Remove rule.
4409	* mfd/.gitignore: Remove debug.c, add modlist.c.
4410	* mfd/builtin/Makefile.am (module.list): Remove.
4411	* mfd/builtin/.gitignore: Likewise.
4412	* mfd/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Do not output #define
4413	directive, only return the constructed module name.
4414	(_init_builtin): Register module in the debugging subsystem and
4415	initialize debug_handle.
4416	Define MF_SOURCE_NAME to debug_handle.
4417	* mfd/debug.hin (debug_spec_string): Change signature.
4418	* mfd/main.c (main): Call init_debug_modlist.
4419
4420	* mfd/builtin/other.bi (debug_spec): Take additional argument,
4421	which specifies whether to return zero level specifications.
4422
4423	* NEWS: Update.
4424
4425	Change builtin trace control.
4426
4427	The method used so far limited number of built-in modules. This
4428	limit was already reached with the addition of email.bi module, which
4429	was the compelling reason to implement a better scalable solution.
4430
4431	* mfd/builtin/builtin.c: New file.
4432	* mfd/builtin/.gitignore: Explicitly mention ignored files.
4433	* mfd/builtin/Makefile.am (libbuiltin_a_SOURCES): Add builtin.c.
4434	* mfd/builtin/builtin.def (builtin_module) <mask>: Remove.
4435	<trace>: New member.
4436	(builtin_setup, builtin_set_module_trace)
4437	(builtin_set_all_module_trace,builtin_module_trace): New protos.
4438	* mfd/builtin/init.m4 (MF_MODULE_MASK): Replace by MF_MODULE_IDX.
4439	Change initializers of builtin_module.
4440	Define BUILTIN_IDX_MAX.
4441	* mfd/builtin/snarf.m4 (MF_MODULE_MASK): Replace by MF_MODULE_IDX.
4442	(__mf_defun): Use builtin_module_trace.
4443	* mfd/prog.c: Don't define DEFINE_BUILTIN_MODULE.
4444	(prog_trace_option): Remove variable.
4445	(PROG_TRACE_ENGINE): Rewrite macro.
4446	(enable_module_trace, disable_module_trace): Remove in favor of
4447	builtin_set_module_trace.
4448	(toggle_prog_trace): Remove.
4449	(set_prog_trace): New function.
4450	(enable_prog_trace, disable_prog_trace): Use set_prog_trace.
4451	(builtin_setup): Move to mfd/builtin/builtin.c.
4452	* po/POTFILES.in: Add mfd/builtin/builtin.c.
4453
44542010-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
4455
4456	Amend previous commit:
4457
4458	* NEWS: Update.
4459	* mfd/builtin/Makefile.am: Update.
4460	* mfd/builtin/dns.bi: Update.
4461
4462	Implement dequote function
4463
4464	* mfd/builtin/email.bi: New function.
4465	* mfd/builtin/Makefile.am (BI_FILES): Add email.bi.
4466	* mfd/builtin/dns.bi (domainpart, localpart): Move to email.bi.
4467	* NEWS: Update.
4468
4469	Reorganize source tree structure.
4470
4471	* configure.ac (AC_CONFIG_FILES): Add mfd/builtin/Makefile.
4472	* mfd/.gitignore: Update.
4473	* mfd/Makefile.am (SUBDIRS): New variable.
4474	(M4_FILES): Remove (see mfd/builtin/Makefile.am). All references updated.
4475	(noinst_HEADERS): Remove builtin.h.
4476	(EXTRA_DIST): Remove files moved to builtin.
4477	(BUILT_SOURCES): Likewise.
4478	(INCLUDES): Add -I$(top_srcdir)/mfd/builtin.
4479	(.def.h): Remove rule.
4480	(module.list): New goal.
4481	(LDADD): Add builtin.
4482	(SUFFIXES): Remove .m4 .c .def .h.
4483	(.m4.c, .def.h): Remove rules.
4484	(.cin.c, .hin.h): Rewrite.
4485	(debug.c, debug.h): Change dependencies.
4486
4487	* mfd/builtin: New directory.
4488	* mfd/bi_(.*).m4: Move to mfd/builtin/\1.bi
4489	* mfd/builtin.def: Move to mfd/builtin.
4490	* mfd/init.m4: Likewise.
4491	* mfd/snarf.m4: Likewise.
4492	* mfd/builtin/Makefile.am: New file
4493	* mfd/builtin/.gitignore: New file
4494	* mfd/builtin/init.m4 (MF_MODULE_NAME): Reflect changes in file naming.
4495	* mfd/builtin/snarf.m4 (MF_MODULE_NAME)
4496	(MF_SOURCE_DEBUG_NAME): Likewise.
4497	* mfd/debug.cin (struct modinfo): Remove.
4498	Include module.list and builtin/module.list.
4499	* mfd/debugdef.m4 (__makedebugsym): Update.
4500
4501	* po/POTFILES.in: Update.
4502
45032010-05-14  Sergey Poznyakoff  <gray@gnu.org.ua>
4504
4505	Document new features in NEWS.
4506
45072010-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4508
4509	Add comments for the translators.
4510
45112010-05-08  Sergey Poznyakoff  <gray@gnu.org.ua>
4512
4513	More compatibility fixes.
4514
4515	* lib/mudefs.h (MUREF): New macro.
4516	* pmult/pmult.c (parse_opt): Use MUREF instead of & where necessary.
4517	* smap/smap.c: Likewise.
4518
4519	Avoid name clashes.
4520
4521	* mfd/snarf.m4 (MF_VAR_SET_STRING): Prefix local variables with
4522	a double-underscore to avoid name clashes with the existing variables.
4523
45242010-04-20  Sergey Poznyakoff  <gray@gnu.org.ua>
4525
4526	Update for compatibility with Mailutils HEAD.
4527
4528	* configure.ac: Check for struct mu_argp_node_list.
4529	* doc/upgrade.texi: Replace itemize with enumerate.
4530	* lib/mudefs.h: New file.
4531	* lib/Makefile.am (noinst_HEADERS): Add mudefs.h
4532	* pmult/pmult.c: Include mudefs.h
4533	(parse_opt): Use MUDEF_ARGP_NODE_LIST instead of
4534	struct mu_argp_node_list.
4535	* smap/smap.c: Likewise.
4536
45372010-01-20  Sergey Poznyakoff  <gray@gnu.org.ua>
4538
4539	Fix keeping state information in the server.
4540
4541	* gacopyz/gacopyz.h (gacopyz_flag_op): New enum.
4542	(GACOPYZ_SRV_DISABLED): New define.
4543	(gacopyz_srv_state): Remove proto.
4544	(gacopyz_srv_flags, gacopyz_srv_get_flags): New protos.
4545	* gacopyz/server.c (gacopyz_srv_state): Remove.
4546	(_SRV_CONNECTED,_SRV_READY,_SRV_CLRDIS)
4547	(_SRV_SYS_MASK): New defines.
4548	(gacopyz_srv.state): Remove.
4549	(gacopyz_srv.flags): New member.
4550	(gacopyz_srv_state): Remove function.
4551	(gacopyz_srv_flags, gacopyz_srv_get_flags): New functions.
4552	(gacopyz_srv_create): Init flags.
4553	(gacopyz_srv_connect): Set _SRV_CONNECTED flag.
4554	(gacopyz_srv_negotiate): Set _SRV_READY flag.
4555	(gacopyz_srv_send_command): On receiving the SMFIR_REPLYCODE
4556	reply set GACOPYZ_SRV_DISABLED flag, if the original command
4557	was one of SMFIC_BODY, SMFIC_HEADER or SMFIC_EOH.
4558	(gacopyz_srv_abort): Update flags.
4559	(gacopyz_srv_quit): Likewise.
4560	(_SRV_ASSERT_FLAG): New macro.
4561	(gacopyz_srv_helo)
4562	(gacopyz_srv_envfrom,gacopyz_srv_envrcpt)
4563	(gacopyz_srv_data,gacopyz_srv_header)
4564	(gacopyz_srv_eoh,gacopyz_srv_body): Return SMFIR_CONTINUE if
4565	GACOPYZ_SRV_DISABLED bit is set.
4566	(gacopyz_srv_eom): Likewise, but clear the GACOPYZ_SRV_DISABLED
4567	bit.
4568	(gacopyz_srv_close): Do nothing if _SRV_CONNECTED is not set.
4569
4570	Minor fix.
4571
4572	* doc/mailfromd.texi: Update.
4573
45742010-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
4575
4576	Improve I/O timeout handling. Implement `progress' function.
4577
4578	* gacopyz/gacopyz_priv.h (gacopyz_read_command): Additional
4579	argument: timeout index.
4580	* gacopyz/io.c (_gacopyz_read_tm): New function.
4581	(_gacopyz_read): Wrapper around _gacopyz_read_tm.
4582	(gacopyz_read_command): Additional argument: timeout index.
4583	All callers updated.
4584	* gacopyz/server.c (srv_connect): Use configured connection
4585	timeout instead of the hardcoded value.
4586	(gacopyz_srv_send_command): Use GACOPYZ_TO_EOM (EOM timeout)
4587	if the command send was SMFIC_BODYEOB.
4588	Handle SMFIR_PROGRESS return.
4589	* mfd/Makefile.am: Add bi_progress.m4.
4590	* mfd/bi_progress.m4: New file.
4591	* mfd/bi_system.m4 (sleep): Provide optional second
4592	argument: number of microseconds to sleep.
4593	* mtasim/mtasim.c (options): New option --milter-timeout.
4594	(parse_milter_timeouts): New function.
4595	(parse_opt): Handle --milter-timeout.
4596
4597	* doc/mtasim.texi: Update.
4598	* doc/mailfromd.texi: Update.
4599	* NEWS: Update.
4600
46012010-01-17  Sergey Poznyakoff  <gray@gnu.org.ua>
4602
4603	Improve handling of abort requests.
4604
4605	* mfd/engine.c (mlfi_helo): Free previous value of
4606	md->helostr.
4607	(mlfi_abort): Do not discard helostr. See RFC 2822,
4608	section 4.1.1.5.
4609
4610	* pmult/pmult.c (rf_abort): Clear macros in gsrv.
4611
4612	Improve gacopyz server API.
4613
4614	* gacopyz/gacopyz.h (gacopyz_srv_clear_macros_pred)
4615	(gacopyz_srv_get_id,gacopyz_srv_get_portspec)
4616	(gacopyz_srv_get_state,gacopyz_srv_get_logmask)
4617	(gacopyz_srv_get_fd,gacopyz_srv_get_onerr)
4618	(gacopyz_srv_set_logmask): New prototypes.
4619	* gacopyz/server.c (gacopyz_srv_clear_macros_pred)
4620	(gacopyz_srv_get_id,gacopyz_srv_get_portspec)
4621	(gacopyz_srv_get_state,gacopyz_srv_get_logmask)
4622	(gacopyz_srv_get_fd,gacopyz_srv_get_onerr)
4623	(gacopyz_srv_set_logmask): New functions.
4624	(gacopyz_srv_set_callback): Don't switch to
4625	srv_disabled state if command returned SMFIR_REPLYCODE.
4626
46272010-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
4628
4629	Fix control flow through the try-catch construct.
4630
4631	* mfd/drivers.c (code_type_try): Fix handling
4632	of returns from both branches of the construct:
4633	the return value is preserved in the register A
4634	until RESTEX.
4635	* tests/trycatch01.at: New test case.
4636	* tests/trycatch02.at: New test case.
4637	* tests/trycatch03.at: New test case.
4638	* tests/trycatch04.at: New test case.
4639	* tests/Makefile.am: Add new tests.
4640	* tests/testsuite.at: Add new tests.
4641
4642	* tests/etc/catch.rc: Fix diagnostic message.
4643	* tests/etc/catch01.rc: Likewise.
4644	* tests/invcidr.at: Likewise.
4645	* tests/invcidr2.at: Likewise.
4646	* tests/invip.at: Likewise.
4647
46482010-01-02  Sergey Poznyakoff  <gray@gnu.org.ua>
4649
4650	Update copyright years.
4651
4652	Happy GNU Year!
4653
46542009-12-19  Sergey Poznyakoff  <gray@gnu.org.ua>
4655
4656	Improve make check.
4657
4658	* Makefile.am (git-describe): Prefix with AM_V_GEN
4659	* etc/Makefile.am (check-am): New rule.
4660	* etc/mailfromd.mf: Update. Use new syntax.
4661	* mflib/Makefile.am (.mf.lint): New rule.
4662	(check-am): Rewrite as a dependency on *.lint
4663	files.
4664	* mflib/spf.mf (spf_cached): Remove global.
4665	(__spf_log): Take `cached' as an argument.
4666
46672009-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
4668
4669	Add close_fds functions.
4670
4671	* lib/Makefile.am (libmf_a_SOURCES): Add close-fds.c
4672	* lib/libmf.h (close_fds_above)
4673	(close_fds_except): New declarations.
4674	* mfd/bi_io.m4 (open_program_stream): Use close_fds_above.
4675	* mfd/engine.c (mailfromd_daemon): Likewise.
4676	* mfd/pp.c (pp_extrn_start): Likewise.
4677	* mfd/srvman.c (close_fds): Remove.
4678	(server_run): Use close_fds_except.
4679	(srvman_url_to_sockaddr): Fix signature.
4680	All uses updated.
4681	* mfd/srvman.h (srvman_url_to_sockaddr): Fix prototype.
4682
4683	Reflect server ID in the proctitle.
4684
4685	* mfd/engine.c (milter_session_server): Call mflog_reopen
4686	to reset syslog ID.
4687	* mfd/mailfromd.h (syslog_fd): Rename to mflog_fd.
4688	(mflog_close, mflog_reopen): New functions.
4689	(log_setup): Remove.
4690	(mflog_setup): New function.
4691	* mfd/main.c (set_default_callout_server): New function.
4692	(server_config_stmt): New keyword "default".
4693	(server_section_parser): Handle "default" settings.
4694	(cb_callout_url): Call set_default_callout_server.
4695	(syslog_fd): Rename to mflog_fd.
4696	(mflog_close, mflog_reopen): New functions.
4697	(log_setup): Rename to _log_setup, now static, with changes.
4698	(mflog_setup): New function.
4699	* mfd/savsrv.c (callout_session_server): Call mflog_reopen
4700	to reset syslog ID.
4701
4702	* mfd/lex.l: Stylistic changes.
4703
4704	Minor change.
4705
4706	* mfd/lex.l (__git__): New built-in constant.
4707
4708	Fix gacopyz verbosity
4709
4710	* gacopyz/gacopyz.c (report_command): print
4711	'state %s is unreachable' warning at debug level.
4712	Previously it was treated as a warning.
4713	(gacopyz_context_loop): Likewise.
4714	Also add state transition debugging info.
4715
47162009-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
4717
4718	Minor change
4719
4720	* mfd/mu_dbm.c (mu_dbm_errcall_fcn): One more fix
4721
4722	Minor changes.
4723
4724	* mfd/mailfromd.h (set_options): Remove proto.
4725	* mfd/main.c (struct option_cache): Remove
4726	flags, confkw, conffn.
4727	(MFD_OPTION_CUMULATIVE): Remove.
4728	(set_option): Now static.
4729	Remove `override' parameter. All uses updated.
4730	* mfd/mu_dbm.c (mu_dbm_errcall_fcn)![DB_VERSION_MAJOR == 3]:
4731	Fix signature.
4732
4733	Bugfixes.
4734
4735	* lib/syslog_async.c (log_fd_async): Always return
4736	actual log_fd.
4737	* mfd/main.c (parse_milter_url): Fix parsing of sendmail-compatible
4738	URLs.
4739	(syslog_fd): New function.
4740	* mfd/savclt.c (schedule_callout): Return immediately if
4741	unable to establish connection with the server.
4742	* mfd/srvman.c (server_run): Avoid closing syslog descriptor,
4743	if the async implementation is in use.
4744
4745	Fix handling of hard timeouts in callouts.
4746
4747	* mfd/mailfromd.h (mf_timeout): New
4748	status code.
4749	(mf_status_str, mf_status_to_exception): Remove macros.
4750	(mf_status_str, mf_status_to_exception): New protos.
4751	(test_message_data_init, trimcrlf): New protos.
4752	* mfd/mf-status.mfi (mf_status_str)
4753	(mf_status_to_exception): New functions.
4754	* mfd/savsrv.c (verify): Improve proctitle info.
4755	Handle mf_timeout response as equivalent to mf_not_found.
4756	* mfd/callout.c (reset, callout_io)
4757	(smtp_io_open, callout_host)
4758	(callout_mx, callout_strict)
4759	(listens_on): Return mf_temp_failure only if
4760	received 4xx reply from the SMTP server. If there
4761	was no response within the timeout interval,
4762	return mf_timeout.
4763	* mfd/engine.c (method_strict)
4764	(method_standard): Schedule callout only if
4765	our attempt returned mf_timeout.
4766
4767	Improve --version output for alpha version.
4768
4769	The new output looks like:
4770
4771	   mailfromd (mailfromd) 6.0.91 [release-6.0-17-ga3fa5da]
4772
4773	where the string in [] is the result of git describe.  If
4774	there are uncommitted changes, that string is suffixed with
4775	`-dirty'.
4776
4777	* Makefile.am (git-describe): New goal.
4778	(dist-hook): Depend on ChangeLog and git-describe.
4779	* NEWS: Version 6.0.91.
4780	* configure.ac: Set GIT_DESCRIBE for alpha versions.
4781	* lib/version.c (mailfromd_version): Print $GIT_DESCRIBE
4782	along with the version info.
4783	* tests/version.at: Accept new version format.
4784
47852009-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
4786
4787	Version 6.0.90
4788
4789	* NEWS, configure.ac: Raise version number to 6.0.90
4790
47912009-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4792
4793	Use callout resolver to handle timed-out callouts.
4794
4795	* mfd/savclt.c: New file.
4796	* mfd/Makefile.am (mailfromd_SOURCES): Add savclt.c
4797	* mfd/callout.c (transcript): Get ID as 1st arg.
4798	Remove static qualifier. All callers updated.
4799	* mfd/engine.c (method_strict)
4800	(method_standard): If callout returned mf_temp_failure,
4801	try to pass the task to the callout server, if one is
4802	defined.
4803	* mfd/mailfromd.h (transcript)
4804	(schedule_callout): New protos.
4805	(callout_server_sa, callout_server_sa_len): New externs.
4806	* mfd/main.c (force_remove): Initialize to 0 (see srvman.c)
4807	(server_config_stmt): New statements single-process and
4808	reuseaddr.
4809	(add_legacy_milter_port, server_section_parser): Pass
4810	flags to mfd_server_new.
4811	(mf_cfg_param): New statement `callout-url'.
4812	* mfd/savsrv.c (MF_SOURCE_NAME): Fixed.
4813	(verify, callout_session_server): Set proctitle.
4814	(callout_session_server): Fix memory leak.
4815	* mfd/srvman.c (struct mfd_server): New member `flags'.
4816	(mfd_server_new): Take flags as 4th argument.
4817	(server_run): Use flags to set single-user and reuseaddr
4818	modes.
4819	* mfd/srvman.h (SRV_SINGLE_PROCESS)
4820	(SRV_KEEP_EXISTING): New defines.
4821	(mfd_server_new): Change signature.
4822	(srvman_url_to_sockaddr): New proto.
4823
4824	Implement the callout server.
4825
4826	* mfd/savsrv.c: New file.
4827	* mfd/Makefile.am (mailfromd_SOURCES): Add savsrv.c.
4828	* mfd/callout.c (struct smtp_io_data): Add new fields:
4829	email, ehlo and mailfrom.
4830	(smtp_io_create): trim trailing ': ' from the id.
4831	(smtp_io_init, smtp_io_setup_callout): New functions.
4832	(smtp_io_free): Free new members.
4833	(smtp_io_email): New function.
4834	(callout_io): Change signature.
4835	(smtp_io_open): 2nd arg is const char *.
4836	(callout): Remove.
4837	(callout_host, callout_mx)
4838	(callout_strict, callout_standard): New functions.
4839	* mfd/engine.c (mfl_smtp_io_callback): Now extern.
4840	(check_on_host, check_mx_records): Remove.
4841	(method_strict, method_standard): Rewrite using new callout
4842	support.
4843	* mfd/mailfromd.h: Fix protos.
4844	(callout_host, callout_mx)
4845	(callout_strict, callout_standard): New functions.
4846	* mfd/main.c (cb_url)
4847	(callout_resolver, callout_resolver_section_param)
4848	(callout_resolver_cfg_init): Remove.
4849	(milter_config_stmt): Rename to server_config_stmt. Add new
4850	field `server'.
4851	(cb_milter_stmt_listen): Rename to cb_server_stmt_listen.
4852	(milter_section_param): Rename to server_section_param.
4853	(milter_section_parser): Rename to server_section_parser.
4854	The label of the statement determines the server type.
4855	(milter_cfg_init): Rename to server_cfg_init.
4856	(mf_cfg_param): Rename `milter' and `callout-resolver'
4857	statements. Add new statement `server'.
4858	(main): Call server_cfg_init.
4859
4860	* mfd/bi_poll.m4 (_pollhost, _pollmx): Use callout_host
4861	and callout_mx, correspondingly.
4862
4863	* mfd/cache.c (cache_get, cache_insert)
4864	(cache_get2, cache_insert2): String args are const.
4865	* mfd/dns.c (getmx): Likewise.
4866	* mfd/srvman.c: Add debugging statements.
4867
4868	Implement multiple servers support.
4869
4870	* mfd/srvman.c: New file.
4871	* mfd/srvman.h: New file.
4872	* gacopyz/gacopyz.h (gacopyz_context_loop): New proto.
4873	* gacopyz/gacopyz.c (gacopyz_context_loop): Remove static qualifier.
4874	Take additional parameter (closure). All callers updated.
4875	(gacopyz_getclosure): New proto.
4876	* gacopyz/gacopyz_priv.h (struct smfi_str): desc is const *.
4877	(closure): New member.
4878	* mfd/Makefile.am (mailfromd_SOURCES): Add srvman.c and srvman.h.
4879	* mfd/bi_vars.m4: New MFL variable milter_server_id.
4880	(set_milter_server_id): New proto.
4881	* mfd/engine.c (priv_get): Set milter_server_id.
4882	(milter_conn_accept): Remove.
4883	(smfilter): Static.
4884	Init xxfi_accept to NULL.
4885	(milter_session_server, milter_setlogmask)
4886	(milter_settimeout): New functions.
4887	(check_local_portspec, check_portspec): Remove.
4888	(sig_stop, sig_restart): Call mfd_srvman_stop instead
4889	of smfi_stop.
4890	(mailfromd_daemon): Rewrite via srvman functions.
4891	* mfd/mailfromd.h (portspec, mailfromd_acl): Remove.
4892	(add_legacy_milter_port, free_parser_data)
4893	(set_milter_server_id)
4894	(milter_session_server, milter_setlogmask)
4895	(milter_settimeout): New prototypes.
4896	* mfd/main.c (portspec): Remove
4897	(force_remove): Initialize to 1.
4898	(mailfromd_acl): Remove.
4899	(parse_milter_url, next_server_id)
4900	(add_legacy_milter_port): New functions.
4901	(set_port): Call add_legacy_milter_port.
4902	(parse_opt): Call milter_set.* functions, instead
4903	of smfi_set.*
4904	(portspec_fixup): Remove.
4905	(main): Call milter_cfg_init.
4906	(mf_cfg_param): New block statement 'milter'.
4907
4908	* mflib/Makefile.am (check-am): Ignore
4909	configuration files.
4910
4911	Preparational work for introducing callout resolver.
4912
4913	* configure.ac: If --enable-pmilter=PATH is
4914	given, store appropriate -I statement in
4915	META1_INCLUDES. Modify CPPFLAGS for the
4916	subsequent AC_CHECK_HEADERS accordingly.
4917	Restrore LDFLAGS after checks.
4918
4919	* mfd/bi_dns.m4: Rename smtp_timeout to smtp_timeout_soft.
4920	* mfd/engine.c: Rename smtp_timeout to smtp_timeout_soft.
4921	(xlate_and_replace_body): Fix uninitialized variable.
4922	* mfd/mailfromd.h (smtp_timeout): Remove.
4923	(smtp_timeout_soft, smtp_timeout_hard): New externs.
4924	(mfd_app_init): Change signature.
4925	* mfd/main.c (smtp_timeout): Remove.
4926	(smtp_timeout_soft, smtp_timeout_hard): New externs.
4927	New configuration statement `smtp-timeout', instead of `timeout'.
4928	New block statement `callout-resolver'.
4929	* pmult/Makefile.am (INCLUDES): Add META1_INCLUDES.
4930
4931	Minor changes
4932
4933	* mfd/callout.c: Fix comment.
4934
4935	* gacopyz/context.c (format_message): Initialize
4936	xcodelen to shut up gcc warnings.
4937	* lib/utils.c, mfd/dnscache.c: Shut up gcc warnings.
4938	* mfd/appinit.c (mfd_app_init): Change signature.
4939	Take two closures: one for argp and another for
4940	mfd_parse_config_files.
4941
4942	Optimize callout support. Introduce distinct timeouts for each SMTP command.
4943
4944	* mfd/callout.c: New file.
4945	* mfd/Makefile.am (mailfromd_SOURCES): Add callout.c
4946	* mfd/bi_poll.m4 (set_last_poll_result): Remove.
4947	(set_last_poll_host)
4948	(set_last_poll_sent,set_last_poll_recv): New functions.
4949	* mfd/engine.c (struct message_data.io): Remove. All uses
4950	updated.
4951	(test_message_data_init): New function.
4952	(priv_set_io): Remove. All uses updated.
4953	(transcript, smtp_io_*, listens_on): Remove. See callout.c
4954	(mfl_smtp_io_callback): New function.
4955	(check_on_host): Rewrite using smtp_io_t functions.
4956	* mfd/gram.y (mailfromd_test, mailfromd_run): Call
4957	test_message_data_init.
4958	* mfd/mailfromd.h (connect_timeout)
4959	(response_timeout): Remove.
4960	(set_last_poll_result): Remove.
4961	(set_last_poll_host)
4962	(set_last_poll_sent,set_last_poll_recv): New proto.
4963	(listens_on): Change signature.
4964	(connect_timeout, response_timeout): Remove.
4965	(smtp_timeout): New extern.
4966	(smtp_timeout): New enum.
4967	(smtp_io_callback_t, smtp_io_t): New types.
4968	(smtp_io_create, smtp_io_free)
4969	(callout): New protos.
4970	* mfd/main.c (connect_timeout, response_timeout): Remove.
4971	(smtp_timeout): New global.
4972	(cb_io_timeout, cb_connect_timeout): Remove.
4973	(cb_initial_response_timeout): Remove.
4974	(cb_io_timeout): New function.
4975	(mf_cfg_param): New keywords: helo-timeout, mail-timeout,
4976	rcpt-timeout, rset-timeout, quit-timeout
4977	(main): Set uninitialized elements of smtp_timeout to
4978	io_timeout.
4979	* mfd/bi_dns.m4 (listens): Update call to listens_on.
4980
4981	Bugfixes (port from master).
4982
4983	* mfd/deprecation.c (init_fixup_stk): New function.
4984	(add_fixup_command, add_fixup_command_fmt): Call init_fixup_stk.
4985	* mfd/lex.l: Rewrite the rule for #pragma without using the
4986	trailing context, so it works after yyless(0).
4987	* mfd/tbf_rate.c: Inlcude inttypes.h.
4988
4989	Fix exception handling. Introduce user-defined exceptions.
4990
4991	* mfd/bitmask.h: New file.
4992	* mfd/Makefile.am: Add bitmask.h
4993	* mfd/drivers.c (print_type_catch): Take into account the `all'
4994	flag: there may be more exceptions than mf_exception_count.
4995	(code_type_catch): Use code_exmask to code exception mask values.
4996	* mfd/gram.y (codegen): Take struct exmask * as its third parameter.
4997	(%union): New member catchlist.
4998	(catchlist): Change type.
4999	(T_DCLEX): New token.
5000	(decl rule): New production: exdecl.
5001	(exdecl): New rule.
5002	(catch rule): Use bitmask.
5003	(simple_catch rule): Likewise.
5004	(catchlist rule): Rewrite.
5005	(free_parser_data): New placeholder.
5006	(exmask_create): New function.
5007	(create_on_node): Use struct exmask* instead of the fixed-size
5008	bitmask.
5009	(dataseg_layout): Store exception masks in the DS.
5010	* mfd/lex.l (dclex): New token.
5011	* mfd/mailfromd.h: Include bitmask.h
5012	(EXMASK): Rename to STATMASK.
5013	(struct catch_node, struct function): Store exception masks
5014	in struct exmask.
5015	(exmask): New struct.
5016	(exmask_create, code_exmask): New prototypes.
5017	* mfd/main.c (main): Call free_parser_data.
5018	* mfd/mf-status.mfi (mf_exception_str): Change parameter type to
5019	unsigned int. Return USER-DEFINED-%d instead of the UNKNOWN for
5020	exceptions not in the predefined range.
5021	* mfd/opcodes (CATCH): Decrease number of arguments.
5022	* mfd/prog.c (exception_count): New global.
5023	(code_exmask): New function.
5024	(exception_context): New struct.
5025	(eval_environ): defcatch and catch replaced by defcatch_ctx
5026	and catch_ctx.
5027	(instr_catch): Read exceptions from the DS. Take two arguments.
5028	(dump_catch): Update.
5029	(instr_saveex): For each exception, save on stack its entry point,
5030	tos and base addresses in the form of tos invariants.
5031	(dump_saveex): Update.
5032	(instr_restex): Do the reverse of instr_saveex.
5033	(env_init, destroy_environment)
5034	(env_save_catches): Reflect changes to eval_environ_t.
5035	(env_throw_0): Before passing control to the exception
5036	handler, restore tos and base addresses.
5037	* mfd/prog.h (exception_count): New extern.
5038	* mfd/snarf.m4: Use STATMASK instead of EXMASK.
5039	* mfd/symbols.c (function_install): Create mask
5040	using exmask_create.
5041
5042	Implement `try - catch' construct.
5043
5044	* elisp/mfl-mode.el (mfl-compute-line-indentation): Account
5045	for `try'.
5046	(mfl-keywords): New keyword `try'.
5047	* mfd/drivers.c (print_type_catch): Properly indent END CATCH.
5048	(code_type_catch): Remove adjust kludge (see prog.c).
5049	(type try): New node type.
5050	* mfd/gram.y (T_TRY): New token.
5051	(try_block, simple_catch): New types.
5052	(catch): Rewrite rule.
5053	(simple_catch): New production.
5054	(try_block): New production.
5055	(node_type): Handle node_type_try.
5056	* mfd/lex.l: Recognize the `try' keyword.
5057	* mfd/mailfromd.h (struct try_node): New struct.
5058	(struct node): Add v.try.
5059	* mfd/prog.c (instr_retcatch): Remove 2 args from stack,
5060	as per env_throw_0.
5061	* doc/mailfromd.texi: New keyword `try'.
5062
5063	Re-introduce fixup script (partial port of 7cba79054 from master).
5064
5065	* mfd/deprecation.c (add_fixup_command, add_fixup_command_fmt)
5066	(add_fixup_command_locus): New functions.
5067	(fixup_create_script): New functions.
5068	* mfd/gram.y: Issue fix-up statements for every deprecation
5069	warning.
5070	* mfd/lex.l: Likewise.
5071	* mfd/mailfromd.h (fixup_op): New enumeration.
5072	(add_fixup_command,add_fixup_command_fmt)
5073	(add_fixup_command_locus, fixup_create_script): New functions.
5074	* mfd/main.c (main): Call fixup_create_script.
5075
5076	Improve locations in diagnostic messages (port b4e793c6329 from master).
5077
5078	* mfd/deprecation.c (deprecation_warning_locus): New function.
5079	(deprecation_warning): Use print_parse_message.
5080	* mfd/gram.y: Improve error diagnostics by using Bison's locations
5081	feature.
5082	* mfd/lex.l (advance_line): Set point and leng to 0.
5083	(YY_USER_ACTION): Set yyloc.
5084	(keyword): Remove. Rely on YY_USER_ACTION for setting locations.
5085	(print_parse_message): Change scope of visibility.
5086	Print column information if location_column_option is set.
5087	(vparse_warning): Remove.
5088	* mfd/mailfromd.h (location_column_option): New extern.
5089	(struct locus): New members: point and leng.
5090	(LOCUS_EQ): Avoid coredumps on NULL file names.
5091	(mf_yyltype_t): New typedef.
5092	(YYLTYPE): New define.
5093	(vparse_warning): Remove.
5094	(print_parse_message): New proto.
5095	(deprecation_warning_locus): New proto.
5096	* mfd/main.c (location_column_option): New variable.
5097	(OPTION_LOCATION_COLUMN): New option.
5098	(options): New option --location-column.
5099	(parse_opt): Handle OPTION_LOCATION_COLUMN.
5100	* mfd/pp.c (assign_locus): Reset point and leng.
5101	* tests/poll04.at: Reflect changes in error messages.
5102
5103	Update.
5104
5105	* mflib/dns.mf4, mflib/safedb.mf4: Remove uses of %var.
5106
5107	Remove %var usage.
5108
5109	* mfd/lex.l: Warn about %var constructs outside of strings.
5110	(print_parse_message): Fix call to mu_error to avoid misinterpreting
5111	"%" in the message.
5112
5113	* tests/farg.at: Remove
5114	* tests/Makefile.am, tests/testsuite.at: Remove farg.at
5115	* mflib/gettext.mf: s/%var/var/g outside of strings.
5116	* mflib/heloarg_test.mf: Likewise.
5117	* mflib/is_ip.mf: Likewise.
5118	* mflib/localdomain.mf: Likewise.
5119	* mflib/match_cidr.mf: Likewise.
5120	* mflib/match_dnsbl.mf: Likewise.
5121	* mflib/match_rhsbl.mf: Likewise.
5122	* mflib/rateok.mf: Likewise.
5123	* mflib/revip.mf: Likewise.
5124	* mflib/sa.mf: Likewise.
5125	* mflib/sockmap.mf: Likewise.
5126	* mflib/spf.mf: Likewise.
5127	* mflib/strip_domain_part.mf: Likewise.
5128	* mflib/valid_domain.mf: Likewise.
5129	* mflib/verp.mf: Likewise.
5130	* tests/declvar.at: Likewise.
5131	* tests/eof.at: Likewise.
5132	* tests/etc/catch.rc: Likewise.
5133	* tests/etc/public.mf: Likewise.
5134	* tests/etc/static.mf: Likewise.
5135	* tests/fctx00.at: Likewise.
5136	* tests/fctx01.at: Likewise.
5137	* tests/hdr-all.at: Likewise.
5138	* tests/hdr-cap.at: Likewise.
5139	* tests/hdr-itr.at: Likewise.
5140	* tests/hdr-mul.at: Likewise.
5141	* tests/ml01.at: Likewise.
5142	* tests/next01.at: Likewise.
5143	* tests/next02.at: Likewise.
5144	* tests/regopt0.at: Likewise.
5145	* tests/shadow.at: Likewise.
5146	* tests/strings.at: Likewise.
5147
5148	The '%' prefix no longer needed to refer to variables.
5149
5150	* mfd/gram.y, mfd/lex.l: Allow to refer to variables without
5151	'%' prefix.
5152	* mfd/prog.h (add_xref): New proto.
5153	* tests/etc/ack.rc, tests/etc/catch01.rc: Replace obsolete (v1.0-style)
5154	parameter declarations with normal ones.
5155	* tests/farg.at: account for a deprecation message.
5156
5157	Simplify rules for function vs. procedure call.
5158
5159	* mfd/gram.y (T_BUILTIN_PROC, T_FUNCTION_PROC): Removed.
5160	(proccall): Removed. Use funcall instead.
5161	* /mfd/lex.l (T_BUILTIN_PROC, T_FUNCTION_PROC): Removed.
5162
5163	Initial cleanup: remove deprecated features.
5164
5165	* mfd/deprecation.c: Remove _change_conf functions and data.
5166	* mfd/drivers.c (type strcat): Remove.
5167	* mfd/gram.y: Remove deprecated features: use of "functional operators",
5168	implicit concatenation (except for literal strings), #pragma option and
5169	#pragma database.
5170	* mfd/mailfromd.h (LEGACY_SCRIPT_FILE): Remove.
5171	(set_option): Remove last argument.
5172	(legacy_script_warning, open_change_conf, write_change_conf)
5173	(write_db_config, close_change_conf): Remove.
5174	* mfd/main.c: Remove obsolete pragma support.
5175	* mfd/pp.c (parse_require): Remove.
5176
5177	* mflib/heloarg_test.mf: Remove use of obsolete features.
5178	* mflib/match_rhsbl.mf: Likewise.
5179	* mflib/strip_domain_part.mf: Likewise.
5180
5181	* tests/prec.at: Remove.
5182	* tests/Makefile.am, tests/testsuite.at: Remove prec.at and prec01.at
5183	* tests/etc/dns.rc, tests/etc/relayed.rc,
5184	tests/fctx00.at, tests/numrcpt.at, tests/strings.at: Don't use
5185	obsolete features.
5186
5187	Version 6.0
5188
5189	* NEWS: Update.
5190	* configure.ac: Update.
5191	* mfd/lex.l (module rule): Add const qualifier.
5192
51932009-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
5194
5195	Update docs
5196
51972009-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5198
5199	Version 5.9.91 (alpha)
5200
5201	Fix configuration handling. Partial port from mtax-cleanup c9f9835a1820fa85ae49f2f511ce793255618bcb
5202
5203	* mfd/appinit.c (mfd_app_init): Change signature.
5204	Take two closures: one for argp and another for mfd_parse_config_files.
5205	* mfd/mailfromd.h (mfd_app_init): Change signature.
5206	* mfd/main.c (main): Update call to mfd_app_init. Make sure
5207	to pass NULL as cfg_data, to not trigger a Mailutils bug.
5208
52092009-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
5210
5211	Minor change
5212
5213	* mfd/lex.l (print_parse_message): Use dot as a separator between line
5214	and column numbers.
5215	* doc/mailfromd.texi: Document this.
5216
52172009-11-07  Sergey Poznyakoff  <gray@gnu.org.ua>
5218
5219	Update the docs. Minor change in is_greylisted().
5220
5221	* NEWS: Update.
5222	* configure.ac: Update.
5223	* doc/mailfromd.texi: Update.
5224	* mfd/bi_db.m4 (is_greylisted_ct): Set greylist_seconds_left
5225	if returning true.
5226
52272009-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
5228
5229	Fix diagnostic messages.
5230
5231	* lib/userprivs.c
5232	* mfd/bi_body.m4
5233	* mfd/bi_curhdr.m4
5234	* mfd/bi_db.m4
5235	* mfd/bi_macro.m4
5236	* mfd/bi_mbox.m4
5237	* mfd/bi_msg.m4
5238	* mfd/bi_sieve.m4
5239	* mfd/gram.y
5240	* mfd/main.c
5241	* mfd/pp.c
5242	* mfd/pragma.c
5243	* mfd/symbols.c
5244	* mfd/tbf_rate.c
5245
5246	Syntax sugar for the `require' statement.
5247
5248	* mfd/lex.l (save_state): New static
5249	(XIDENT): New exclusive state.
5250	Enter XIDENT after `require' or initial `from'
5251	and quit after reading next symbol. Account for
5252	possible comment between `require' or `from' and
5253	the symbol.
5254
52552009-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
5256
5257	Add gnulib as a module.
5258
5259	* bootstrap: Merge changes from gnulib.
5260	* .gitmodules: Add gnulib
5261
5262	Minor fix.
5263
5264	* mfd/lex.l: Remove dependency on base_name.
5265
5266	Minor changes.
5267
5268	* mfd/Makefile.am (inc_DATA): Add status.mfh.
5269	* mfd/main.c (main): Use DEFAULT_CONFIG_FILE.
5270	* pmult/pmult.c (_cb_log_level): Bugfix.
5271
5272	Fix docs
5273
52742009-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
5275
5276	Fix handling of 5.x filter files.
5277
5278	* mfd/lex.l (INCTX_IGNORE_BYE): New flag.
5279	(string_beg): New static.
5280	(compose_start): Initialize string_beg.
5281	(compose_finish): Assign string_beg to yylloc.beg.
5282	(module rule): Fix warning message.
5283	Eat everything up to and including '.', if
5284	the module file is included.
5285	Raise INCTX_IGNORE_BYE flag in this case.
5286	(bye rule): If INCTX_IGNORE_BYE is set return EOF.
5287	* mflib/heloarg_test.mf, mflib/match_cidr.mf,
5288	mflib/match_dnsbl.mf, mflib/match_rhsbl.mf,
5289	mflib/sockmap.mf, mflib/spf.mf: Quote arguments of the
5290	`require' statements.
5291
5292	* doc/upgrade.texi: Update.
5293
5294	Spell check the docs.
5295
5296	Improve docs.
5297
5298	* NEWS, doc/deprecate.texi,
5299	doc/mailfromd.texi: Document new features.
5300	* doc/sexp.texi: New file.
5301	* doc/upgrade.texi: Update.
5302	* mfd/bi_msg.m4 (message_read_line)
5303	(message_read_body_line): Raise eof exception when there
5304	are no more lines left.
5305
53062009-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
5307
5308	Fix doc/Commit
5309
5310	* doc/Commit (gray_print_section): Output anchors before
5311	chapter/section/etc. titles, so that the heading menu in
5312	monolithic document works properly.
5313
53142009-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
5315
5316	Improve docs.
5317
5318	* doc/Makefile.am (manual.tar.bz2, man-tar): New rules.
5319	(manual): Mark as phony.
5320	* doc/gendocs_template: Upgrade for the new webpage style.
5321	* doc/mailfromd.texi: Minor changes.
5322	* doc/Config: New file.
5323
53242009-10-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5325
5326	Bugfixes.
5327
5328	* mfd/deprecation.c (init_fixup_stk): New function.
5329	(add_fixup_command, add_fixup_command_fmt): Call init_fixup_stk.
5330	* mfd/lex.l: Rewrite the rule for #pragma without using the
5331	trailing context, so it works after yyless(0).
5332	* mfd/tbf_rate.c: Inlcude inttypes.h.
5333	* tests/sh-req.at: New testcase.
5334	* tests/Makefile.am, tests/testsuite.at: Add sh-req.at.
5335	* NEWS: Update.
5336
53372009-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
5338
5339	Move pies to a stand-alone project.
5340
5341	* pies/Remove.
5342	* doc/pies.texi: Remove.
5343	* doc/Makefile.am: Update.
5344	* doc/mailfromd.texi: Update.
5345	* doc/pmult.texi: Update.
5346	* po/POTFILES.in: Update.
5347	* Makefile.am, NEWS: Update.
5348
5349	* mfd/lex.l: Use %top section to include config.h
5350
53512009-10-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5352
5353	Begin restructuring the docs.
5354
5355	* doc/deprecate.texi: New file.
5356	* doc/Makefile.am: Add deprecate.texi.
5357	* doc/upgrade.texi: Update.
5358
53592009-10-08  Sergey Poznyakoff  <gray@gnu.org.ua>
5360
5361	Fix compilation of the `catch' construct.
5362
5363	* mfd/drivers.c (print_type_catch): Properly indent END CATCH.
5364	(code_type_catch): Remove adjust kludge (see prog.c).
5365	* mfd/prog.c (instr_retcatch): Remove 2 args from stack,
5366	as per env_throw_0.
5367
53682009-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
5369
5370	Update NEWS
5371
53722009-10-06  Sergey Poznyakoff  <gray@gnu.org.ua>
5373
5374	Bugfix
5375
5376	* mfd/symbols.c (literal_lookup): Initialize only newly installed
5377	literals.
5378
5379	Minor change.
5380
5381	* mfd/gram.y: Warn about obsolete ways of declaring
5382	function parameters (hopefully no one uses them by now).
5383	* tests/etc/ack.rc, tests/etc/catch01.rc,
5384	tests/farg.at, tests/prec.at, tests/prec01.at: Update
5385
53862009-10-05  Sergey Poznyakoff  <gray@gnu.org.ua>
5387
5388	Improve fixup script generation.
5389
5390	* mfd/gram.y (pragma_database): Print deprecation warning.
5391	Issue a fixup statement.
5392
5393	Improve fixup script generation.
5394
5395	* mfd/deprecation.c (open_change_conf)
5396	(close_change_conf): Remove.
5397	(write_db_config, write_db_config, write_change_conf): Rewrite.
5398	(add_fixup_command, add_fixup_command_fmt)
5399	(add_fixup_command_locus): New functions.
5400	(fixup_create_script): New functions.
5401	* mfd/gram.y: Issue fix-up statements for every deprecation
5402	warning.
5403	* mfd/lex.l ({IDENT} rule): update locus.point along
5404	with each call to input and unput.
5405	* mfd/mailfromd.h (parse_require): Take locus as the 2nd
5406	parameter.
5407	(open_change_conf,close_change_conf): Remove.
5408	(fixup_op): New enumeration.
5409	(add_fixup_command,add_fixup_command_fmt)
5410	(add_fixup_command_locus, fixup_create_script): New functions.
5411	* mfd/main.c (set_option): Update.
5412	(main): Call fixup_create_script instead of close_change_conf.
5413	* mfd/pp.c (parse_require): Issue a fixup statement.
5414
5415	Improve locations in diagnostic messages.
5416
5417	* mfd/deprecation.c (deprecation_warning_locus): New function.
5418	(deprecation_warning): Use print_parse_message.
5419	* mfd/gram.y: Improve error diagnostics by using Bison's locations
5420	feature.
5421	* mfd/lex.l (advance_line): Set point and leng to 0.
5422	(YY_USER_ACTION): Set yyloc.
5423	(keyword): Remove. Rely on YY_USER_ACTION for setting locations.
5424	(print_parse_message): Change scope of visibility.
5425	Print column information if location_column_option is set.
5426	(vparse_warning): Remove.
5427	* mfd/mailfromd.h (location_column_option): New extern.
5428	(struct locus): New members: point and leng.
5429	(LOCUS_EQ): Avoid coredumps on NULL file names.
5430	(mf_yyltype_t): New typedef.
5431	(YYLTYPE): New define.
5432	(vparse_warning): Remove.
5433	(print_parse_message): New proto.
5434	(deprecation_warning_locus): New proto.
5435	* mfd/main.c (location_column_option): New variable.
5436	(OPTION_LOCATION_COLUMN): New option.
5437	(options): New option --location-column.
5438	(parse_opt): Handle OPTION_LOCATION_COLUMN.
5439	* mfd/pp.c (assign_locus): Reset point and leng.
5440	* tests/fctx00.at, tests/poll04.at,
5441	tests/prec.at: Reflect changes in error messages.
5442
54432009-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
5444
5445	Bugfixes.
5446
5447	* mfd/gram.y: Remove calls to add_xref.
5448	* mfd/lex.l (variable_or_const): Call add_xref
5449	before returning a constant.
5450	(print_parse_message): Bugfix: pass argument
5451	to mu_error via "%s", to avoid interpretation of
5452	% sequences in the formatted message.
5453	* mfd/prog.h (add_xref): New proto.
5454
5455	Use of function or built-in name as a prefix operator is deprecated.
5456
5457	* mfd/gram.y: Issue deprecation warning on use of
5458	a function or built-in name as a prefix operator.
5459	* mfd/lex.l (paren_follows): New global.
5460	* mfd/mailfromd.h (paren_follows): New global.
5461
5462	* mflib/heloarg_test.mf, mflib/match_rhsbl.mf,
5463	mflib/strip_domain_part.mf, tests/etc/dns.rc,
5464	tests/etc/relayed.rc, tests/strings.at: Don't use
5465	deprecated features.
5466
5467	* tests/prec.at, tests/prec01.at: Account for the
5468	new warning.
5469
5470	Minor change
5471
5472	* doc/mailfromd.texi: Add new keywords.
5473	* elisp/mfl-mode.el: Add new keywords.
5474	* tests/prec01.at: Forgotten to add in 1026a8cc51d8c.
5475
5476	Implement explicit type casts: TYPE(expr)
5477
5478	* mfd/gram.y: (atom_expr: T_TYPECAST '(' expr ')'): New rule.
5479	* mfd/lex.l: New token T_TYPECAST
5480
5481	Implement explicit concatenation operator (.)
5482
5483	* mfd/drivers.c (type strcat): A synonym for concat, used
5484	for implicit string concatenation.
5485	* mfd/gram.y: Expect 53 shift/reduces.
5486	(alloc_node, cast_to): extern
5487	(T_COMPOSE): New token.
5488	(concat_expr): New %type.
5489	(concat_expr): New rule.
5490	(node_type): handle node_type_strcat.
5491	(create_node_variable, create_node_argcount)
5492	(create_node_arg, create_node_symbol)
5493	(create_node_backref): New functions.
5494	* mfd/lex.l: Rewrite string handling. Strings with
5495	variable and/or constant substitutions within them are
5496	handled in one run and a corresponding NODE* is composed
5497	out of them. That node is then returned as T_COMPOSE
5498	token.
5499	* mfd/prog.h (alloc_node, cast_to)
5500	(create_node_variable, create_node_argcount)
5501	(create_node_arg, create_node_symbol)
5502	(create_node_backref): New protos.
5503
5504	* mflib/sa.mf, mflib/spf.mf, tests/alias.at,
5505	tests/curmsg.at, tests/etc/ack.rc, tests/etc/catch.rc,
5506	tests/etc/catch01.rc, tests/etc/public.mf,
5507	tests/hdr-all.at, tests/hdr-cap.at, tests/hdr-count.at,
5508	tests/hdr-get.at, tests/hdr-gete.at, tests/hdr-getn.at,
5509	tests/hdr-itr.at, tests/hdr-mul.at, tests/macros.at,
5510	tests/next01.at, tests/next02.at, tests/prec.at,
5511	tests/public.at, tests/shadow.at,
5512	tests/static01.at: Use explicit concatenation.
5513
5514	* tests/prec01.at: New testcase.
5515	* tests/Makefile.am, tests/testsuite.at: Add prec01.at
5516
5517	Fix coredumps on regex used with -O0
5518
5519	* mfd/drivers.c (save_regexp): New function.
5520	(optimize_type_regcomp): Call save_regexp.
5521	(code_type_regcomp): Call save_regexp if regind == -1.
5522	* mfd/gram.y (input rule): Call regex_layout before
5523	or after compile_tree, depending on whether optimization
5524	is on.
5525	* tests/regopt0.at: New test.
5526	* tests/Makefile.am, tests/testsuite.at: Add regopt0.at
5527
55282009-10-02  Sergey Poznyakoff  <gray@gnu.org.ua>
5529
5530	Minor changes.
5531
5532	* mfd/gram.y: Improve module ending rules.
5533	* mfd/lex.l: Add more comments.
5534	(lex_buffer_push): Rename to inctx_push.
5535	(lex_buffer_pop): Rename to inctx_pop.
5536	* mfd/mailfromd.h (module_push): Remove.
5537	* mfd/symbols.c: Mark module_ functions
5538	as statics.
5539
5540	Treat unquoted literals as errors.
5541
5542	* mfd/gram.y: Treat unquoted literals as errors.
5543	* doc/mailfromd.texi: Comment out the description of
5544	unquoted literals and add a FIXME.
5545
5546	Minor change (bison-dependent).
5547
5548	* mfd/gram.y: Uniformly begin all token names with T_.
5549	Provide symbolic strings to improve error diagnostics.
5550	* mfd/lex.l: Uniformly begin all token names with T_.
5551	* tests/module04.at, tests/module06.at,
5552	tests/static02.at: Reflect the above changes.
5553
5554	Fix scoping in imported modules.
5555
5556	When handling `import' (`require') statements, mailfromd
5557	in some cases could have closed and popped the module lexical
5558	context before finishing processing its actual contents. In
5559	particular, if a module ended with a variable or constant
5560	declaration (e.g. status.mf), this declaration would end up
5561	in the symbol table of the importing compilation unit. This
5562	happened because yywrap, triggered by EOF on the module unit,
5563	caused immediate popping of the lexical contents, whereas
5564	the parser still had some unreduced symbols on its stack. The
5565	actual reduction (e.g. of the rule `stmt: CONST value') happened
5566	after the lexer had supplied next symbol, but by that time the
5567	original module had already been removed from stack.
5568
5569	* mfd/gram.y (BYE): New keyword.
5570	(MODBEG, MODEND): New (pseudo)keywords.
5571	(input rule): Allow programs to begin with `module'.
5572	(modcntl): Fix parsing of the imported files.
5573	* mfd/lex.l (keyword): Rewrite as a macro.
5574	(INCTX_MODULE,INCTX_HADINPUT): New defines.
5575	(struct inctx): New member inctx_flags.
5576	(inctx_flags, emit_token): New statics.
5577	(lex_new_source): Change semantics of the second argument.
5578	(YY_USER_ACTION, YY_INPUT, YY_DECL): New defines.
5579	(module): Warn if module is used in included file, or
5580	if there were some statements before it.
5581	(yylex): New function.
5582	(lex_close_source): Error checking: yyin may be NULL on
5583	entry.
5584	(lex_drain_input, lex_bye): New functions.
5585	(yywrap): Set emit_token to MODEND if within a module.
5586	(LEX_NONE, LEX_ONCE, LEX_MODULE): New defines.
5587	(lex_bye, lex_drain_input): New functions.
5588	* mfd/pp.c (begin_module, parse_include): Update calls to lex_new_source.
5589	* mfd/status.mfi: Declare a module.
5590
5591	* mflib/Makefile.am (install-data-local): Remove.
5592	* mflib/dns.mf4, mflib/gettext.mf, mflib/heloarg_test.mf,
5593	mflib/is_ip.mf, mflib/localdomain.mf, mflib/match_cidr.mf,
5594	mflib/match_dnsbl.mf, mflib/match_rhsbl.mf, mflib/rateok.mf,
5595	mflib/revip.mf, mflib/sa.mf, mflib/safedb.mf4,
5596	mflib/sieve.mf, mflib/sockmap.mf, mflib/spf.mf,
5597	mflib/strip_domain_part.mf, mflib/valid_domain.mf,
5598	mflib/verp.mf: Declare as modules.
5599
5600	Fix memory overrun.
5601
5602	* lib/libmf.h (syment_alloc_hook, syment_free_hook): Remove.
5603	(symtab_create): New argument `alloc_fun'.
5604	* lib/symtab.c (syment_alloc_hook, syment_free_hook): Remove.
5605	(struct symtab): New members syment_alloc_fun, syment_free_fun.
5606	Remove free_syment.
5607	(syment_free): Take pointer to the owner struct symtab in
5608	first argument.
5609	(syment_alloc): Rewrite.
5610	(symtab_free_syment): Rewrite.
5611	(symtab_create): New argument `alloc_fun'.
5612	* mfd/symbols.c (alloc_entry): Fix memory overrun.
5613	Fill allocated memory with zeros.
5614	(xsymtab_create): Reflect changes to symtab_create.
5615	(module_init, init_symbols): Likewise.
5616
56172009-10-01  Sergey Poznyakoff  <gray@gnu.org.ua>
5618
5619	Update .gitignores.
5620
5621	Add basic test cases for the module system.
5622
5623	* configure.ac: Remove check for mu_get_auth.
5624	* mfd/bi_other.m4 [!HAVE_MU_GET_AUTH]: Remove.
5625	* lib/libmf.h (transform_compile): Take 2 arguments.
5626	* lib/transform.c (parse_transform_expr)
5627	(transform_compile): Take regcomp flags in an additional
5628	argument.
5629	* mfd/symbols.c (make_transform_rule): Pass regex_flags
5630	to transform_compile.
5631	(import_cpyfun): Make sure new symbol has valid locus.
5632	* mfd/lex.l: New built-in constant __module__.
5633
5634	* tests/module01.at, tests/module02.at,
5635	tests/module03.at, tests/module04.at,
5636	tests/module05.at, tests/module06.at,
5637	tests/public.at, tests/static01.at,
5638	tests/static02.at: New testcases.
5639
5640	* tests/Makefile.am: Add new tests.
5641	* tests/testsuite.at: Likewise.
5642
5643	* tests/etc/public.mf, tests/etc/static.mf,
5644	tests/etc/mod1.mf, tests/etc/mod2.mf: New test programs.
5645	* tests/etc/Makefile.am (RCFILES): Add new test programs.
5646
56472009-09-30  Sergey Poznyakoff  <gray@gnu.org.ua>
5648
5649	Improve handling of deprecated features.
5650
5651	* mfd/deprecation.c: New file.
5652	* mfd/Makefile.am (mailfromd_SOURCES): Add deprecation.c.
5653
5654	* mfd/mailfromd.h (vparse_warning): New proto.
5655	(deprecation_warning, final_deprecation_warning)
5656	(enable_deprecation_warnings, legacy_script_warning)
5657	(open_change_conf, write_change_conf, write_db_config)
5658	(close_change_conf): New functions.
5659	* mfd/main.c: Move `change_conf' functions to deprecation.c.
5660	* mfd/gram.y (parse_program): Emit final
5661	deprecation warning if MAILFROMD_DEPRECATION is
5662	set to no.
5663	* mfd/lex.l: Use deprecation_warning for its
5664	purpose.
5665	(vparse_warning): New function.
5666
5667	Fix handling of #require.
5668
5669	* mfd/gram.y (%union): New member `string'.
5670	(SHARPREQR): New token.
5671	(require: SHARPREQR): New rule.
5672	* mfd/lex.l: Fix handling of #require.
5673	* po/POTFILES.in: Add missing files.
5674
5675	Fix --dump-code and --dump-tree output.
5676
5677	* NEWS: Update.
5678	* configure.ac: Bump version number: 5.9.90
5679	* lib/libmf.h (symtab_count_entries): New proto.
5680	* lib/symtab.c (symtab_count_entries): New function.
5681	* mfd/gram.y (function_enumerator): Process only functions
5682	from one module.
5683	(print_syntax_tree): Iterate over all modules.
5684	* mfd/mailfromd.h (collect_modules): New proto.
5685	* mfd/prog.c (function_counter): Change closure type.
5686	Process only functions from one module.
5687	(function_lister): Process only functions from one module.
5688	(print_code): Iterate over all modules.
5689	* mfd/symbols.c (collect_modules): New function.
5690	(free_module_entry): Pass file name to "top" module creation
5691	call.
5692	* mflib/safedb.mf4: Require status, not "#include" it.
5693
5694	Clean-up file inclusion code.
5695
5696	* configure.ac: Call AC_PROG_LN_S.
5697	* mfd/Makefile.am: Rename status.mfh to status.mf
5698	(install-data-local): Create a link to status.mfh,
5699	for compatibility.
5700	* mfd/gram.y (print_syntax_tree): Test attempt to
5701	print all modules.
5702	* mfd/mailfromd.h (struct module): New member
5703	incl_sources.
5704	* mfd/pp.c (incl_sources): Removed.
5705	(source_lookup): Search in top_modules->incl_sources.
5706	(parse_include): Remove include_once kludge. Both
5707	include and include_once are now handled by
5708	lex_new_source, as previously.
5709	* mfd/symbols.c (import_confun): Remove spurious diagnostics.
5710	(module_init): Initialize all members.
5711	(module_free): Destroy incl_sources.
5712	* mflib/sieve.mfh: Rename to sieve.mf
5713	* mflib/Makefile.am: Rename sieve.mfh to sieve.mf
5714	(install-data-local): Create a link to sieve.mfh,
5715	for compatibility.
5716	* tests/Makefile.am: Remove status.mfh to status.mf
5717
5718	* mflib/match_cidr.mf, mflib/match_dnsbl.mf,
5719	mflib/match_rhsbl.mf, mflib/sockmap.mf,
5720	tests/etc/catch.rc, tests/etc/catch01.rc,
5721	tests/etc/poll-1.rc, tests/etc/poll.rc: Use require
5722	instead of #include_once.
5723
5724	Minor changes.
5725
5726	* mfd/gram.y (constdecl): Allow static/public qualifiers
5727	before const.
5728	* mfd/mailfromd.h (define_constant): Add `flags' argument.
5729	(module_push, advance_line): New prototypes.
5730	* mfd/symbols.c (define_constant): Take `flags' argument.
5731	* mflib/Makefile.am (check-am): New rule.
5732	* mflib/match_dnsbl.mf: Include status.mfh
5733	* mflib/match_rhsbl.mf: Likewise.
5734
57352009-09-29  Sergey Poznyakoff  <gray@gnu.org.ua>
5736
5737	Bugfixes.
5738
5739	* mfd/main.c (add_pp_option): Initialize ext_pp_options.
5740	* lib/version.c: Update copyright year.
5741
5742	Implement `static' and `public' qualifiers.
5743
5744	* mfd/gram.y: Handle new keywords: STATIC PUBLIC MODULE
5745	(moddecl): New rule.
5746	(decl): Allow qualifiers before FUNC
5747	(vardecl): Allow qualifiers before TYPE.
5748	(qualifiers): New rule.
5749	* mfd/lex.l (static, public, module): New keywords.
5750	(symbit_to_qualifier): New function.
5751	* mfd/mailfromd.h (VAR_*): Rename to SYM_*
5752	(SYM_STATIC, SYM_PUBLIC): New bitmasks.
5753	(struct mf_symbol): New member `flags'.
5754	(struct variable): Remove flags.
5755	(struct module): New members `dclname' and `flags'.
5756	(symbit_to_qualifier): New proto.
5757
5758	* mfd/bi_vars.m4, mfd/drivers.c, mfd/pp.c,
5759	mfd/snarf.m4: Reflect the above changes.
5760	* mfd/symbols.c (alloc_entry): Properly initialize struct mf_symbol.
5761	(import_selfun): Additional conditions.
5762
5763	* mflib/dns.mf4, mflib/gettext.mf, mflib/heloarg_test.mf,
5764	mflib/is_ip.mf, mflib/match_cidr.mf, mflib/match_dnsbl.mf,
5765	mflib/match_rhsbl.mf, mflib/revip.mf, mflib/sa.mf,
5766	mflib/sockmap.mf, mflib/spf.mf, mflib/strip_domain_part.mf,
5767	mflib/valid_domain.mf: Fix indentation. Use `static' as appropriate.
5768
5769	* doc/mailfromd.texi: Document new keywords.
5770	* elisp/mfl-mode.el (mfl-keywords): Add new keywords.
5771
5772	Implement module system.
5773
5774	* lib/transform.c: New file.
5775	* lib/Makefile.am (libmf_a_SOURCES): Add transform.c
5776	* lib/libmf.h (struct syment): Remove field `data',
5777	add `refcnt'.
5778	(syment_free_hook): New extern.
5779	(symtab_lookup_or_install_entry): New function.
5780	(symtab_free): Rename to symtab_destroy.
5781	(symtab_selfun, symtab_errfun, symtab_confun)
5782	(symtab_cpyfun): New typedefs.
5783	(symtab_import): New proto.
5784	(transform_t): New typedef.
5785	(transform_append_t, transform_reduce_t): New typedefs.
5786	(transform_error_string, transform_compile)
5787	(transform_free, transform_string): New functions.
5788	* lib/symtab.c (syment_alloc): New function.
5789	(symtab_free_syment): Honor reference count.
5790	(symtab_rehash): Bugfix.
5791	(symtab_get_index): New function.
5792	(symtab_lookup_or_install): Rewrite using symtab_get_index.
5793	(symtab_lookup_or_install_entry): New function.
5794	(symtab_create): Allocate tab.
5795	(symtab_free): Rename to symtab_destroy.
5796	(symtab_import): New function.
5797
5798	* mfd/gram.y: Move inclusion of obstack.h to mailfromd.h
5799	Reflect changes to symbol tables.
5800	(%union): New member import_rule_list
5801	(REQUIRE, IMPORT) New tokens.
5802	(require): New rule.
5803	(builtin_variable_install): Move to symbols.c
5804	* mfd/lex.l: Move inclusion of obstack.h to mailfromd.h
5805	(lex_buffer_pop): Do not increment line number after popping.
5806	It is done before pushing the context.
5807	(lex_new_source_0): Argument is const.
5808	(lex_new_source): First argument is const.
5809	(advance_line): External.
5810	(#require): Deprecated.
5811	(require,import): New keywords.
5812	(from): New keyword (was in <ONBLOCK> before).
5813	(yywrap): Pop module.
5814	* mfd/mailfromd.h: Include obstack.h
5815	(SYMENT_STRUCT): New define.
5816	(struct mf_symbol): New structure.
5817	(struct builtin, struct literal, struct pragma): Use SYMENT_STRUCT.
5818	(struct function, struct variable)
5819	(struct constant): Inherit from mf_symbol.
5820	(stab_module): New extern.
5821	(stab_function, stab_variable, stab_constant): Remove. These
5822	are now per-module tables.
5823	(symbol_resolve_alias): New proto.
5824	(enum import_type, struct import_rule)
5825	(struct import_rule_list): New data types.
5826	(import_rule_create): New function.
5827	(enum module_namespace, struct module)
5828	(struct module_list): New data types.
5829	(top_module): New extern.
5830	(MODULE_SYMTAB, TOP_MODULE_SYMTAB): New defines.
5831	(require_module): New function.
5832	(assign_locus, lex_new_source): Change signature.
5833	* mfd/pp.c: Move inclusion of obstack.h to mailfromd.h
5834	(begin_module): New function.
5835	(parse_include): Include_once is synonimous to #require.
5836	Use begin_module to actually switch contents in this case.
5837	(parse_require): Call begin_module.
5838	(require_module): New function.
5839	(assign_locus): Change signature.
5840	* mfd/prog.c: Move inclusion of obstack.h to mailfromd.h
5841	Reflect changes to symbol tables.
5842	* mfd/symbols.c (alloc_entry): Set refcnt to 1
5843	(free_entry): New function.
5844	(import_rule_create, import_rules_free)
5845	(import_rules_eval): New functions.
5846	(stab_function, stab_variable, stab_constant): Remove. These
5847	are now per-module tables.
5848	(import_builtin_variables, module_import_symbols): New functions.
5849	(top_module, module_stack): New globals.
5850	(module_init, module_create)
5851	(module_free, module_add_submodule)
5852	(module_has_submodule, module_push)
5853	(module_pop, set_top_module, pop_top_module): New functions.
5854	(init_symbols): Set syment_free_hook. Initialize top_module.
5855	(free_symbols, init_variable)
5856	(function_lookup_or_install,function_install
5857	(install_alias, literal_lookup, constant_lookup): Reflect changes to
5858	symbol tables. Handle aliases.
5859	(builtin_variable_install): New function (from gram.y)
5860
5861	* mfd/db.c, mfd/engine.c, mfd/main.c,
5862	mfd/pragma.c, mfd/spf.c : Move inclusion of obstack.h to mailfromd.h
5863
5864	* mfd/drivers.c: Reflect changes to symbol tables.
5865
5866	* etc/mailfromd.mf, mflib/heloarg_test.mf,
5867	* mflib/match_dnsbl.mf, mflib/match_rhsbl.mf,
5868	* mflib/spf.mf, mflib/valid_domain.mf,
5869	tests/etc/catch.rc, tests/etc/catch01.rc,
5870	tests/etc/cidr.rc: Use `require', without #.
5871
58722009-09-28  Sergey Poznyakoff  <gray@gnu.org.ua>
5873
5874	Rewrite symbol tables.
5875
5876	* lib/symtab.c: New file.
5877	* lib/Makefile.am (libmf_a_SOURCES): Add symtab.c
5878	* lib/libmf.h: Add symtab prototypes and declarations.
5879	* mfd/Makefile.am (mailfromd_SOURCES): Replace symtab.c
5880	with symbols.c.
5881	* mfd/symtab.c: Removed.
5882	* mfd/symbols.c: New file (partly based on symtab.c).
5883	* mfd/db.c (db_format_enumerate): Change signature.
5884	* mfd/gram.y: Replace calls to symbol_enumerate with
5885	symtab_enumerate.
5886	(forget_autos): Update calls to variable_replace.
5887	Use symtab_remove directly, instead of the removed
5888	function find_and_remove.
5889	* mfd/lex.l (variable_or_const): Rewrite.
5890	* mfd/mailfromd.h (struct function): New member `alias'.
5891	Remove owner.
5892	(SYM_ macros): Remove.
5893	(symbol_enumerator_t, symbol_enumerate): Remove.
5894	(stab_builtin, stab_function, stab_variable)
5895	(stab_literal, stab_constant, stab_pragma): New externs.
5896	(init_symbols): New proto.
5897	(variable_replace): Change signature.
5898	(dbfmt_enumerator_t): New typedef.
5899	(db_format_enumerate): Change signature.
5900	* mfd/main.c (db_fixup_name_enumerator)
5901	(db_proc_enumerator, db_format_enumerator): Change signatures.
5902	(main): Call init_symbols.
5903	* mfd/prog.c (function_counter, function_lister): Ignore aliases.
5904	(print_code): Use symtab_enumerate.
5905	* po/POTFILES.in: Update.
5906	* NEWS: Update.
5907
59082009-09-23  Sergey Poznyakoff  <gray@gnu.org.ua>
5909
5910	Add milter connection patch for Sendmail-8.14.3
5911
5912	* etc/sendmail-8.14.3.connect.diff: New file.
5913	* doc/mailfromd.texi: Document new patch.
5914
59152009-09-22  Sergey Poznyakoff  <gray@gnu.org.ua>
5916
5917	Minor changes.
5918
5919	* doc/upgrade.texi: Document MAILFROMD_DEPRECATION.
5920	* mfd/main.c: Remove spurious semicolon.
5921	* mfd/pp.c (pp_extrn_start): Print debug info on level >= 2.
5922	(preprocess_input): Add missing return.
5923
59242009-09-21  Sergey Poznyakoff  <gray@gnu.org.ua>
5925
5926	Rewrite preprocessing algorithm.
5927
5928	The internal preprocessor is removed. Inclusion directives
5929	(#include, #include_once and #require) are handled directly
5930	in the lexer. External preprocessor is called for each
5931	input file separately. This gives a lot of advantages:
5932	  1. The m4 namespace is kept clean. No unwanted m4 definitions
5933	  propagate between the files.
5934	  2. No need to fixup input line numbers.
5935	  3. End of each compilation unit is handled separately,
5936	  which allows to implement static variables.
5937	  4. Cleaner code.
5938
5939	* mfd/lex.l (struct inctx): New struct.
5940	(input_file_id): New variable
5941	(YY_INPUT): Remove.
5942	(inctx_locate)
5943	(lex_buffer_push, lex_buffer_pop): New functions.
5944	(lex_new_source_0, lex_new_source): New functions.
5945	(lex_close_source): New function.
5946	(input_line): Remove variable.
5947	(is_stdin, source): Remove functions.
5948	(yywrap): Rewrite.
5949	(%% - grammar): Remove line number correction.
5950	Hanlde #include, #include_once and #require
5951	directives in place.
5952	* mfd/mailfromd.h (DEF_EXT_PP): New define (from main.c).
5953	(ext_pp_options, ext_pp_options_given): New externs.
5954	(struct input_file_ident): New declaration (from pp.c).
5955	(pp_extrn_start, pp_extrn_shutdown)
5956	(parse_include, parse_require): New prototypes.
5957	(pp_fill_buffer, source, pp_make_argcv)
5958	(pp_init, pp_done): Remove.
5959	(pp_extrn_start, pp_extrn_shutdown): Change proto.
5960	(preprocess_input): Change proto.
5961	(alloc_ext_pp, assign_locus, lex_new_source): New protos.
5962	* mfd/main.c (DEF_EXT_PP): Move to mailfromd.h
5963	(alloc_ext_pp): Incorporate all -I options. Move function
5964	to pp.c.
5965	(main): Update call to preprocess_input.
5966	* mfd/pp.c: Remove internal preprocessor functions.
5967	(parse_include, parse_require): Use lex_new_source to
5968	actually load the file.
5969	(pp_extrn_start, pp_extrn_shutdown, preprocess_input): Rewrite.
5970
5971	* mfd/gram.y (parse_program): Call lex_new_source.
5972
59732009-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
5974
5975	Bugfix.
5976
5977	* pies/pies.c (_cb_action, _cb_redir): Fix arguments to
5978	mu_cfg_format_error.
5979
59802009-09-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5981
5982	Minor changes.
5983
5984	* NEWS: Document milter_client_* and milter_server_*
5985	builtin variables.
5986	* Makefile.am: Silent ChangeLog rule.
5987
5988	Improve testsuite.
5989
5990	* tests/testsuite.at (MF_CHECK_PROG): New macro.
5991	(MF_CHECK_TEXT, MF_RUN_TEXT): Unify calls to mailfromd.
5992
5993	* tests/accept.at, tests/arg.at, tests/bctx00.at,
5994	tests/bctx01.at, tests/curmsg.at, tests/declvar.at,
5995	tests/farg.at, tests/fctx00.at, tests/fctx01.at,
5996	tests/macros.at, tests/ml.at, tests/numrcpt.at,
5997	tests/prec.at, tests/reject.at, tests/shadow.at,
5998	tests/strings.at, tests/tempfail.at: Rewrite
5999	giving the filter script in place.
6000
6001	* tests/ack.at, tests/catch.at, tests/catch01.at,
6002	tests/cidr1.at, tests/cidr2.at, tests/cidr3.at,
6003	tests/cond01.at, tests/cond02.at, tests/cond03.at,
6004	tests/cond04.at, tests/cond05.at, tests/cond06.at,
6005	tests/invcidr.at, tests/invcidr2.at, tests/invip.at,
6006	tests/invip2.at, tests/relayed01.at, tests/relayed02.at,
6007	tests/switchn1.at, tests/switchn2.at, tests/switchn3.at,
6008	tests/switchn4.at, tests/switchs1.at, tests/switchs2.at,
6009	tests/switchs3.at, tests/switchs4.at: Replace AT_CHECK
6010	with the equivalent MF_CHECK_PROG
6011
6012	* tests/hasmx.at, tests/hostname.at, tests/poll.at,
6013	tests/poll01.at, tests/poll02.at, tests/poll03.at,
6014	tests/rescname.at, tests/resolve.at: Unify calls to mailfromd
6015
6016	* tests/hdr-cap.at, tests/hdr-mul.at,
6017	tests/ismx.at: Use EX_ codes instead of hardcoded ints.
6018
6019	* tests/etc/accept.rc: Remove.
6020	* tests/etc/arg.rc: Remove.
6021	* tests/etc/farg.rc: Remove.
6022	* tests/etc/macros.rc: Remove.
6023	* tests/etc/ml.rc: Remove.
6024	* tests/etc/numrcpt.rc: Remove.
6025	* tests/etc/prec.rc: Remove.
6026	* tests/etc/reject.rc: Remove.
6027	* tests/etc/sa01.rc: Remove.
6028	* tests/etc/sa02.rc: Remove.
6029	* tests/etc/sa03.rc: Remove.
6030	* tests/etc/sa04.rc: Remove.
6031	* tests/etc/shadow.rc: Remove.
6032	* tests/etc/size.rc: Remove.
6033	* tests/etc/strings.rc: Remove.
6034	* tests/etc/tempfail.rc: Remove.
6035	* tests/etc/var.rc: Remove.
6036	* tests/etc/Makefile.am (RCFILES): Remove the above files.
6037
60382009-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
6039
6040	Bugfix
6041
6042	* mfd/lex.l: Fix handling of variable references
6043	starting on new line in here-documents.
6044	* tests/ml01.at: New testcase.
6045	* tests/Makefile.am, tests/testsuite.at: Add ml01.at.
6046
6047	Bugfix
6048
6049	* mfd/main.c (alloc_ext_pp): Fix coredump.
6050
6051	Fix ismx and getmx built-ins.
6052
6053	* mfd/dns.c (comp_ipbuf): Remove.
6054	(getmxip): Change return type.
6055	* mfd/mailfromd.h (getmxip): Change prototype.
6056	* mfd/prog.c (dump_result): Fix output.
6057	* mfd/bi_dns.m4 (getmx): Rewrite using new getmxip.
6058	(primitive_ismx): Likewise.
6059	* NEWS: Update.
6060	* doc/mailfromd.texi (getmx): Update description.
6061
6062	Fix --no-preprocess.
6063
6064	* mfd/main.c (ext_pp_options_given): New variable.
6065	(alloc_ext_pp): Use ext_pp_options_given
6066	to decide whether to allocate ext_pp.
6067	(parse_opt): Set ext_pp_options_given if -D or -U were
6068	used.
6069
60702009-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
6071
6072	Fix testsuite.
6073
6074	* tests/testsuite.at (MAILFROMD_OPTIONS): New definition
6075	(MF_CHECK_TEXT, MF_RUN_TEXT, AT_MTA_TEST_X)
6076	(AT_MTA_TEST): Always pass MAILFROMD_OPTIONS to mailfromd.
6077	(AT_WITH_MAILFROMD_OPTIONS): Always prepend $MFOPTS $MFADDOPTS
6078
6079	Fix return from gacopyz_client_sockname
6080
6081	Bugfix.
6082
6083	* gacopyz/context.c (gacopyz_server_sockname)
6084	(gacopyz_client_sockname): Tolerate ctx==NULL.
6085	* gacopyz/gacopyz.h (gacopyz_client_sockname): change
6086	return type to int.
6087	* mfd/engine.c (priv_get): Check return from
6088	gacopyz_client_sockname.
6089
6090	New variables and functions for identifying milter client and server addresses.
6091
6092	* gacopyz/gacopyz_priv.h (struct smfi_str): New members addr and
6093	addrlen.
6094	* gacopyz/context.c (gacopyz_server_sockname)
6095	(gacopyz_client_sockname): New functions.
6096	(gacopyz_context_loop): Get connection source address (sockaddr)
6097	and its length as arguments. Store them in ctx.
6098	(gacopyz_handle_connection): Pass connection source address and its length
6099	to gacopyz_context_loop.
6100	* gacopyz/gacopyz.h (gacopyz_context_loop): Remove useless prototype.
6101	(gacopyz_client_sockname, gacopyz_server_sockname): New prototypes.
6102
6103	* mfd/bi_vars.m4 (milter_client_family, milter_client_address)
6104	(milter_server_family, milter_server_address): New built-in variables.
6105	(define_milter_address): New macro.
6106	* mfd/engine.c (priv_get): Initialize milter_client_* and milter_server_*
6107	MFL variables.
6108	(MFAM_STDIO, MFAM_UNIX, MFAM_INET): Move to mailfromd.h
6109	* mfd/mailfromd.h (MFAM_STDIO, MFAM_UNIX, MFAM_INET): New defines.
6110	(set_milter_client_address)
6111	(set_milter_server_address): New prototypes.
6112	* mfd/snarf.m4 (MF_VAR_SET_STRING): Optimize the use of $2.
6113
61142009-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
6115
6116	Improve configuration and creation of mailfromd-newconf.sh  script.
6117
6118	* NEWS: Update.
6119	* configure.ac: Produce xz and lzma compressed distributions.
6120	* doc/mailfromd.texi: Update.
6121	* mfd/main.c (struct option_cache): New member "conffn".
6122	(option_cache): Set conffn for negative-, positive-, and
6123	rates-expire-interval.
6124	(set_option): Prefer conffn over write_change_conf.
6125	(cb_negative_expire_interval, cb_positive_expire_interval)
6126	(cb_rates_expire_interval): Remove.
6127	(mf_cfg_param): Remove positive-expire-interval,
6128	negative-expire-interval and rates-expire-interval.
6129
61302009-09-03  Sergey Poznyakoff  <gray@gnu.org.ua>
6131
6132	Improve the upgrade conversion script. Update docs.
6133
6134	* NEWS: Update.
6135	* doc/Makefile.am (check-config, check-sub-config): New goals.
6136	(all-check-docs): Depend on the above.
6137	* doc/mailfromd.texi: Document syslog-async configuration
6138	statement.
6139	* doc/pragma-option.texi: Move the ignore block to doc/mailfromd.texi.
6140	* doc/upgrade.texi (5x0-600): Describe the changes and the
6141	proposed conversion procedure.
6142	* mfd/main.c (rename_legacy_file): new variable.
6143	(close_change_conf): Improve the created script.
6144	(cb_db_expire_interval): Bugfix.
6145	(database_section_param): File statement is mu_cfg_callback.
6146	(main): Set rename_legacy_file if necessary.
6147
6148	Minor fixes.
6149
6150	* doc/pragma-option.texi: Fix xrefs to conf-database.
6151
6152	Define the `database' configuration statement. Document new configuration.
6153
6154	* doc/pragma-option.texi: New file.
6155	* doc/pragma-database.texi: New file.
6156	* doc/Makefile.am (mailfromd_TEXINFOS): Add new files.
6157	* doc/mailfromd.texi: Document configuration file.
6158	* doc/upgrade.texi (5x0-600): New section.
6159	* mfd/gram.y (pragma_database): Add calls to write_db_config.
6160	* mfd/main.c (write_db_config): New function.
6161	(close_change_conf): Handle 'G' records.
6162	(cb_relay_file): Remove duplicate function.
6163	(cb_db_expire_interval, cb_db_positive_expire_interval)
6164	(cb_db_negative_expire_interval): New functions.
6165	(database_section_param): New configuration file statement:
6166	"database".
6167	(database_cfg_init): New function.
6168	(main): Call database_cfg_init.
6169	* mfd/mailfromd.h (write_db_config): New prototype.
6170
61712009-09-02  Sergey Poznyakoff  <gray@gnu.org.ua>
6172
6173	Expand built-in constants in pragma arguments.
6174
6175	* mfd/lex.l: Allow %{...} form for built-in constants.
6176	(builtin_const_value): New function.
6177	(builtin_const): do not expect null-terminated string as input.
6178	* mfd/mailfromd.h (builtin_const_value): New function.
6179	* mfd/pragma.c: (nextword, expand_builtin)
6180	(find_double_underscore, is_delim)
6181	(expand_string, expand_text): New functions.
6182	(parse_pragma): Expand built-in constants in
6183	pragma string.
6184
61852009-09-01  Sergey Poznyakoff  <gray@gnu.org.ua>
6186
6187	Minor change.
6188
6189	* mfd/main.c (close_change_conf): Fix warning message.
6190
6191	Implement relayed-domain-file configuration statement.
6192
6193	* mfd/main.c: Implement relayed-domain-file configuration statement.
6194
6195	Mark all `#pragma option's as deprecated. Create a script for fixing them.
6196
6197	* mfd/main.c (option_deprecated): Remove.
6198	(open_change_conf,write_change_conf)
6199	(close_change_conf): New functions.
6200	(config_statement_type): New function.
6201	(MFD_OPTION_DEPRECATED): Remove. Not used any more.
6202	(option_cache): All options are deprecated.
6203	(enable_pragma_deprecation_warning): New function.
6204	(set_option): Create a script for fixing
6205	configuration files.
6206	(main): Call close_change_conf.
6207	(mf_cfg_param): New statements: expire-interval,
6208	positive-expire-interval, negative-expire-interval,
6209	rates-expire-interval.
6210	* etc/mailfromd.mf: Remove deprecated pragmas.
6211
6212	Minor change
6213
6214	* mfd/bi_io.m4 (open): Default open mode is read-only.
6215
62162009-08-31  Sergey Poznyakoff  <gray@gnu.org.ua>
6217
6218	Begin separation of configuration from filter script.
6219
6220	The purpose is to separate compilation entities (filter script
6221	and files included therein), from the actual runtime configuration.
6222	This changeset introduces a separate mailfromd configuration file,
6223	located in SYSCONFDIR/mailfromd.conf. The filter script is called
6224	mailfromd.mf and located in SYSCONFDIR as well (but perhaps it
6225	should better be located elsewhere?) The old script name,
6226	mailfromd.rc, was a misnomer since its suffix suggested that the
6227	file was a configuration file, which as a matter of fact it was
6228	not. However, if this "legacy" file is present and readable, it is
6229	used and a warning message is issued.
6230
6231	All `#pragma option' statements are considered deprecated, and explicit
6232	warnings are issued if they are used in the script file.
6233
6234	* NEWS: Update.
6235	* mfd/appinit.c: New file.
6236	* mfd/Makefile.am (mailfromd_SOURCES): Add appinit.c
6237	* mfd/gram.y (pragma_option): Update call to set_option.
6238	Pass NULL locus to initialize_variable.
6239	(initialize_variable): Issue the "variable already initialized"
6240	warning only if previous initialization was in a source file,
6241	not from command line or a configuration statement.
6242	* mfd/mailfromd.h (DEFAULT_SCRIPT_FILE): Change definition.
6243	(LEGACY_SCRIPT_FILE): New define.
6244	(DEFAULT_CONFIG_FILE): New define.
6245	(set_option): Takes four arguments.
6246	(mu_app_rcfile): New extern.
6247	(mfd_app_init): New prototype.
6248	* mfd/main.c (need_config): Rename to need_script.
6249	(struct option_cache): Rename `cumulative' to `flags'.
6250	New member `confkw'.
6251	(set_option): Fourth argument specifies whether the
6252	function was called from a pragma option handler.
6253	(set_cmdline_option): New define.
6254	(struct arguments): New data type.
6255	(init_arguments, flush_trace_module)
6256	(flush_arguments, destroy_trace_item): New functions.
6257	(parse_opt): Use set_cmdline_option to set overridable
6258	options.
6259	(cb_trace_program): New callback.
6260	(mf_cfg_param): New statements: syslog-async, trace-actions,
6261	trace-program, transcript.
6262	(main): Use mfd_app_init instead of mu_app_init. Initialize
6263	mu_app_rcfile beforehand.
6264	Use legacy filter script (mailfromd.rc), if present.
6265	* mfd/prog.c (enable_module_trace): take 2 args, the 2nd one
6266	specifying the length of the first.
6267	(disable_module_trace): Likewise.
6268	(toggle_prog_trace): New function.
6269	(enable_prog_trace,disable_prog_trace): Rewrite using
6270	toggle_prog_trace.
6271	* tests/atlocal.in (MFADDOPTS): New variable.
6272	(checkstatedir): Define MFADDOPTS.
6273	(mailfromd_start): Pass $MFADDOPTS to the mailfromd invocation.
6274	* tests/etc/config.in: Remove.
6275	* tests/etc/Makefile.am: Remove config.in
6276	* tests/etc/dns.rc: Remove inclusion of config.rc
6277	* tests/etc/greylist-ct.rc: Likewise.
6278	* tests/etc/greylist.rc: Likewise.
6279	* tests/greylist-ct.at: Likewise.
6280	* tests/hasmx.at, tests/hostname.at, tests/ismx.at,
6281	tests/rescname.at, tests/resolve.at, tests/testsuite.at: Pass
6282	$MFADDOPTS to mailfromd invocations.
6283	* tets/invcidr.at: update stderr expectation
6284	(see changes to initialize_variable in gram.y)
6285	* tests/invcidr2.at: Likewise.
6286	* etc/mailfromd.rc: Rename to etc/mailfromd.mf
6287	* etc/Makefile.am: Rename mailfromd.rc to mailfromd.mf.
6288
62892009-08-28  Sergey Poznyakoff  <gray@gnu.org.ua>
6290
6291	Update tests/.gitignore
6292
6293	Fix handling of Milter abort commands. Introduce "precious" variables.
6294
6295	* mfd/engine.c (mlfi_abort): Call env_init_dataseg and
6296	reset md->helostr.
6297	* mfd/gram.y (variable_count): Initialize to 0.
6298	(precious_count): New variable.
6299	(PRECIOUS): New token.
6300	(vardecl): Opional qualifier may appear before data
6301	type.
6302	(builtin_variable_install): Take 4th argument: addrptr.
6303	(_ds_variable_fun): Remove function.
6304	(_ds_variable_count_fun, _ds_variable_fill_fun): New
6305	functions.
6306	(vtab_comp): New function.
6307	(dataseg_layout): Revamp computation of variable
6308	offsets in the data segment. Ensure all precious variables
6309	are placed after non-precious ones.
6310	Set dvarsize to the number of the latter.
6311	* mfd/lex.l: Recognize the `precious' keyword.
6312	* mfd/mailfromd.h (VAR_PRECIOUS): New constant.
6313	(struct variable.addrptr): New member.
6314	(builtin_variable_install): Change proto.
6315	(env_init_dataseg): New proto.
6316	* mfd/prog.c (dvarsize): New global.
6317	(env_init_dataseg): New function.
6318	(init_dataseg): Take 2 arguments.
6319	* mfd/prog.h (dvarsize): New extern.
6320	* mfd/snarf.m4 (MF_VAR): Optional third argument gives
6321	additional flags.
6322	* mfd/symtab.c (init_variable): Initialize addrptr.
6323	* mtasim/mtasim.c (get_input_line): Call add_history
6324	before adding \n to the string.
6325	(smtp): Call gacopyz_srv_abort in reaction to RSET.
6326	* mfd/bi_vars.m4 (ehlo_domain,mailfrom_address): Mark
6327	as precious.
6328
6329	* tests/rset.at: New file.
6330	* tests/Makefile.am: Add rset.at.
6331	* tests/testsuite.at (AT_MTA_TEST_FILTER_SCRIPT): Fix
6332	definition.
6333	Include rset.at.
6334
6335	* NEWS: Update.
6336	* configure.ac: Version 5.2.90
6337	* doc/mailfromd.texi: Document `precious' keyword.
6338
63392009-08-27  Sergey Poznyakoff  <gray@gnu.org.ua>
6340
6341	Fix diagnostic and help messages.
6342
6343	1. Option descriptions in `--help' output do not constitute
6344	   conceptual sentences. Therefore, they should not begin
6345	   with a capital letter, nor end with a final point.
6346	2. According to standards.texi, a diagnostic message in a
6347	   non-interactive program "should not begin with a capital letter
6348	   when it follows a program name and/or file name, because that
6349	   isn't the beginning of a sentence.  (The sentence conceptually
6350	   starts at the beginning of the line.)  Also, it should not end
6351	   with a period."
6352
6353	Affected files:
6354
6355	* gacopyz/gacopyz.c
6356	* gacopyz/proc.c
6357	* gacopyz/server.c
6358	* gacopyz/smfi.c
6359	* mfd/bi_db.m4
6360	* mfd/bi_dns.m4
6361	* mfd/bi_io.m4
6362	* mfd/bi_ipaddr.m4
6363	* mfd/bi_mail.m4
6364	* mfd/bi_other.m4
6365	* mfd/bi_poll.m4
6366	* mfd/bi_sa.m4
6367	* mfd/bi_string.m4
6368	* mfd/cache.c
6369	* mfd/db.c
6370	* mfd/dnscache.c
6371	* mfd/drivers.c
6372	* mfd/engine.c
6373	* mfd/gram.y
6374	* mfd/lex.l
6375	* mfd/main.c
6376	* mfd/mu_dbm.c
6377	* mfd/optab.opc
6378	* mfd/prog.c
6379	* mfd/rate.c
6380	* mfd/symtab.c
6381	* mtasim/mtasim.c
6382	* mtasim/openat-die.c
6383	* pies/pies.c
6384	* pies/progman.c
6385	* pmult/pmult.c
6386	* smap/smap.c
6387	* tests/ashadow.at
6388	* tests/bctx00.at
6389	* tests/fctx00.at
6390	* tests/hdr-gete.at
6391	* tests/invcidr.at
6392	* tests/invcidr2.at
6393	* tests/shadow.at
6394
6395	Version 5.2
6396
6397	* NEWS, configure.ac: Raise version number.
6398
6399	Minor fixes.
6400
6401	* mfd/main.c (parse_opt): Add missing break.
6402	(cb_include_path): Fix use of improper variable
6403	in MU_CFG_LIST branch.
6404	* am/aggr.m4 (IU_CHECK_MEMBER): Remove improper use of dnl.
6405	* doc/Makefile.am (check-builtins, check-mflib): Do not
6406	split sed expressions over multiple lines: Makefile format
6407	cannot handle it properly.
6408	* doc/mailfromd.texi: Update.
6409	* bootstrap: Do not apply `silentize' to gnu/gnulib.mk. Latest
6410	gnulib takes care of it itself.
6411
64122009-08-18  Sergey Poznyakoff  <gray@gnu.org.ua>
6413
6414	Add mfd/bi_getpw.m4
6415
6416	Fix definition of `next'.
6417
6418	* mfd/drivers.c (struct loop_stack): Replace `begjmp' with `nxtjmp'.
6419	(enter_loop): Reflect this.
6420	(code_type_next): Likewise.
6421	(code_type_loop): Rewrite jump fixup for `next' chain.
6422
6423	* tests/next01.at, tests/next02.at: New testcases.
6424	* tests/Makefile.am: Add next01.at and next02.at
6425	* tests/testsuite.at: Likewise.
6426
6427	* NEWS, doc/mailfromd.texi: Update
6428
6429	Implement getpw.* interfaces
6430
6431	* mfd/bi_getpw.m4: New file.
6432	* mfd/Makefile.am (M4_FILES): Add bi_getpw.m4
6433	* doc/Makefile.am (check-builtins): Take into
6434	account @deftypefnx
6435	* NEWS, doc/mailfromd.texi: Update
6436
6437	Bugfixes
6438
6439	* mfd/bi_io.m4 (read): Add terminating zero.
6440	* mflib/match_dnsbl.mf (match_dnsbl): Return
6441	0 if address is not resolved.
6442	* mflib/sockmap.mf (sockmap_single_lookup): Fix typo.
6443
6444	Improve conditional building of pmult.
6445
6446	* configure.ac (PMULT_COND): New condition
6447	(ENABLE_PMULT): Rename subst variable.
6448	* pmult/Makefile.am: Remove subst variable.
6449	* Makefile.am (SUBDIRS): Include pmult conditionally
6450	(ChangeLog rule): Improve formatting.
6451	* NEWS: Improve wording.
6452
64532009-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
6454
6455	Bugfix.
6456
6457	* mfd/bi_dns.m4 (dns_getname): Missed call to MF_OBSTACK_BEGIN.
6458	* mfd/prog.c (runtime_stack_trace): Prevent coredump on arriving to
6459	pc == 0.
6460
64612009-06-29  Sergey Poznyakoff  <gray@gnu.org.ua>
6462
6463	Bugfix.
6464
6465	* mfd/bi_db.m4 (db_prop_lookup): Fix conditional.
6466	Reported by Jan Rafaj.
6467
64682009-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
6469
6470	Implement e_eof exception code (based on patch by Jan Rafaj).
6471
6472	* doc/mailfromd.texi: Document e_eof.
6473	* mfd/Makefile.am (status.mfh): Define dependencies.
6474	* mfd/bi_io.m4 (read_stream_delim): Return number of
6475	bytes read.
6476	(read, getdelim, getline): Raise e_eof on EOF.
6477	* mfd/mailfromd.h (mfe_eof): New exception code.
6478	* tests/eof.at: New testcase.
6479	* tests/Makefile.am (TESTSUITE_AT): Add eof.at
6480	* tests/testsuite.at (MF_RUN_TEXT): New define.
6481	Include eof.at.
6482
64832009-06-17  Sergey Poznyakoff  <gray@gnu.org.ua>
6484
6485	Minor changes.
6486
6487	* configure.ac: Check for struct pmilter_S.pmfi_fdmax
6488	* doc/pmult.texi: Document new pmult configuration statements.
6489	* pmult/pmult.c: Make pmilter.pmfi_fdmax configurable.
6490
6491	Bugfixes.
6492
6493	* pies/pies.c (main): Change main loop to do..while,
6494	otherwise a signal arriving before entering the loop
6495	might cause the program to terminate.
6496	* pmult/pmult.c (internal_macro_p): New function.
6497	(collect_stage_symbols): Do not report internal
6498	macros as untranslatable.
6499	* mfd/gram.y (register_macro): Copy macro name to
6500	allocated storage.
6501
65022009-06-16  Sergey Poznyakoff  <gray@gnu.org.ua>
6503
6504	Minor fixes.
6505
6506	* mfd/engine.c (child_start): modify program title.
6507	* mfd/main.c (environ): extern.
6508
65092009-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
6510
6511	Fix and improve termination actions in pies.
6512
6513	* pies/pies.h (MAX_RETURN_CODE): Remove.
6514	(STATUS_SIG_BIT, STATUS_CODE): New defines
6515	(struct action): New fields next, nstat, status, command.
6516	(struct component): Keep singly-linked list of termination
6517	actions.
6518	* pies/progman.c (run_command): New function.
6519	(progman_cleanup): Redo iteration over termination actions.
6520	* pies/pies.c (return_code_cfg_param): Pass offsets in
6521	struct component.
6522	(create_action): Accept signal numbers (SIG.* or SIG\+[0-9]+)
6523	in tag.
6524	(return_code_section_parser): Update.
6525	(pies_check_status): Set *pid before returning pies_status_stale.
6526	* doc/pies.texi: Document changes.
6527	* NEWS: Updated.
6528
6529	Implement socket I/O and sockmaps in mflib.
6530
6531	* mfd/bi_io.m4 (struct io_stream): Add cleanup and cleanup_data.
6532	(close_stream): Use those members.
6533	(read_stream_line): Remove.
6534	(read_stream_delim): New function.
6535	(open_program_stream): Add the `env' argument.
6536	(open_file_stream): Likewise.
6537	(open_parsed_inet_stream, open_inet_stream): New functions.
6538	(alloc_streams): Update declaration of opf and the call thereof.
6539	(open): Prefix @ in first argument designates the connection URL.
6540	(read,getdelim): New functions.
6541	* mflib/Makefile.am (inc_DATA): Add sockmap.mf
6542	* mflib/sockmap.mf: New function.
6543	* doc/mailfromd.texi: Document new functions.
6544	* NEWS: Update.
6545
65462009-06-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6547
6548	Reflect program state in the ps(1) output.
6549
6550	* mfd/main.c (main): Call mf_proctitle_init
6551	* mfd/engine.c (mlfi_connect, mlfi_helo, mlfi_envfrom)
6552	(mlfi_envrcpt, mlfi_data, mlfi_header, mlfi_eoh)
6553	(mlfi_body, mlfi_eom)
6554	(mlfi_abort, mlfi_close): Call mf_proctitle_format to reflect
6555	the program state in the ps output.
6556	* NEWS: Update.
6557
65582009-06-05  Sergey Poznyakoff  <gray@gnu.org.ua>
6559
6560	Bugfixes.
6561
6562	* pmult/pmult.c (client_block_begin): Set default
6563	logmask to '>info'
6564	(pmult_connect): Close gsrv if pmult_std_reply fails.
6565	This fixes FD leak.
6566	* gacopyz/gacopyz.c, mfd/dns.h, mfd/dnsbase.c,
6567	mfd/engine.c, mtasim/mtasim.c, pmult/pmult.c: Add typecasts between
6568	signed/unsigned char*.
6569
65702009-06-04  Sergey Poznyakoff  <gray@gnu.org.ua>
6571
6572	Version 5.1.91
6573
6574	* configure.ac, NEWS: Version 5.1.91
6575	* pmult/pmult.c: Bugfix
6576
6577	MeTA1-related improvements.
6578
6579	* configure.ac: Check for pmilter_S.pmfi_thrmax_[sh]. Requires
6580	28/0009-pmilter-configurable-maxthr.diff.
6581	* pmult/pmult.c: New configuration statements: max-threads-soft
6582	and max-threads-hard.
6583	* pies/pies.c (_cm_include_meta1): Fix coredump on syntax errors
6584	in meta1.conf.
6585
65862009-05-31  Sergey Poznyakoff  <gray@gnu.org.ua>
6587
6588	Implement `localdomain' function + several improvements.
6589
6590	* NEWS: Update.
6591	* etc/mailfromd.rc: Use localdomain to determine the domain
6592	name.
6593	Remove the `#error' statement.  Hopefully, this file can be
6594	used as is.
6595	* mfd/bi_gethostname.m4 (gethostname): Add an optional argument.
6596	* mfd/gram.y: Handle function declarations with only optional
6597	arguments, e.g.: func foo(; string bar)
6598	(mailfromd_test): Add missing env_init calls.
6599	* mfd/lex.l: Remove trailing newline before displaying the
6600	`#error' diagnostics.
6601	* mflib/localdomain.mf: New file.
6602	* mflib/Makefile.am (inc_DATA): Add localdomain.mf.
6603	* mflib/safedb.mf4 (safedb_verbose): New variable.
6604	(safedbmap, safedbdel): New function.
6605	(safedbget, safedbput): Verbosely print exceptions caught if
6606	safedb_verbose is set.
6607
66082009-05-23  Sergey Poznyakoff  <gray@gnu.org.ua>
6609
6610	Add new debugging function.
6611
6612	* mfd/bi_mudebug.m4: New file.
6613	* mfd/Makefile.am (M4_FILES): Add bi_mudebug.m4
6614	* NEWS, doc/mailfromd.texi: Update.
6615
6616	Minor organizational changes.
6617
6618	* elisp/Makefile.am (LISPSRC): Add obfemail-mode.el
6619	* elisp/mfl-mode.el (mfl-mode): Fix docstring.
6620	* THANKS: Use obfemail mode to encode emails.
6621
66222009-05-22  Sergey Poznyakoff  <gray@gnu.org.ua>
6623
6624	Minor fix
6625
66262009-05-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6627
6628	More work on `silent rules' mode
6629
6630	* bootstrap (silent_rules_prog): Preserve leading
6631	whitespace verbatim, when inserting the AM_V variables.
6632	Suggested by Ralf Wildenhues.
6633	Optionally insert the definitions of
6634	AM_DEFAULT_VERBOSITY, AM_V_GEN and AM_V_at: useful for
6635	po/Makefile.in.in
6636	(silentize): New function.
6637	(slurp): Call silentize
6638	Call silentize on po/Makefile.in.in.
6639	* doc/Makefile.am, etc/Makefile.am,
6640	pies/Makefile.am, pmult/Makefile.am,
6641	tests/Makefile.am, tests/etc/Makefile.am: Add silent rule markers.
6642
6643	Switch to `silent rules' mode
6644
6645	* bootstrap (slurp): Convert gnulib Makefile.am to
6646	support silent rules.
6647	* configure.ac (AM_INIT_AUTOMAKE): Add silent-rules.
6648	Enable silent rules by default.
6649	* gacopyz/Makefile.am, mfd/Makefile.am: Add silent rules markers.
6650
6651	Bugfix
6652
6653	* mfd/mu_dbm.c (mu_dbm_errcall_fcn): Fix arguments for BDBv4.
6654
66552009-05-20  Sergey Poznyakoff  <gray@gnu.org.ua>
6656
6657	Minor changes.
6658
6659	* am/gcc.m4: New file.
6660	* configure.ac: Raise autotools requirements to 2.63/1.11
6661	Call MF_GCC_QUIRKS.
6662	* gacopyz/gacopyz.c (ctx_free): Change return type.
6663
66642009-05-19  Sergey Poznyakoff  <gray@gnu.org.ua>
6665
6666	Implement GeoIP support.
6667
6668	* NEWS: Update.
6669	* configure.ac: Version 5.1.90
6670	New option --with-geoip
6671	(GEOIP_LIBS): New AC_SUBST
6672	* doc/mailfromd.texi: Document geoip functions.
6673	* mfd/bi_geoip.m4: New file.
6674	* mfd/Makefile.am (M4_FILES): Add bi_geoip.m4
6675	(LDADD): Add GEOIP_LIBS.
6676	* mfd/mailfromd.h (pp_define): New function.
6677	* mfd/main.c (pp_define): New function.
6678	* mfd/snarf.m4 (MF_DEFINED, MF_OPTVAL): Fix error diagnostics.
6679	(MF_COND): New macro.
6680	(MF_INIT): Handle MF_COND sources.
6681
66822009-05-14  Sergey Poznyakoff  <gray@gnu.org.ua>
6683
6684	Fix typo in docs
6685
66862009-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6687
6688	Raise version to 5.1
6689
6690	Minor change
6691
6692	* mfd/bi_db.m4: Fix comment.
6693	* pies/progman.c: Use _exit in child processes.  This
6694	is a work over a fault in MU design: it registers
6695	the pidfile removal function via atexit.
6696
6697	Bugfixes.
6698
6699	* doc/mailfromd.texi: Fix declaration of `uname'
6700	* mtasim/mtasim.c: Fix handling of header continuation.
6701	When sending headers and body to the milter, consistently
6702	use \r\n line terminators.
6703
67042009-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6705
6706	Fix diagnostics spelling
6707
6708	Version 5.0.94
6709
6710	* NEWS, configure.ac: Update.
6711	* mfd/prog.c (env_free_captured): env->bi_priv_array can be NULL.
6712
67132009-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>
6714
6715	Implement functional notation for reply actions
6716
6717	* NEWS, doc/mailfromd.texi: Update.
6718	* mfd/drivers.c (print_type_result, mark_type_result)
6719	(optimize_type_result, code_type_result): Rewrite.
6720	* mfd/gram.y: Rewrite action rules.
6721	* mfd/lex.l (CODE,XCODE): Remove.
6722	* mfd/opcodes (RESULT): Takes one immediate parameter.
6723	(instr_result): Get arguments from stack.
6724
6725	Implement some system information functions.
6726
6727	* mfd/bi_gethostname.m4: New file.
6728	* NEWS, doc/mailfromd.texi: Update.
6729	* mfd/Makefile.am (M4_FILES): Add bi_gethostname.m4.
6730	* mfd/bi_system.m4 (uname): New function.
6731	* mfd/prog.c (heap_obstack_cancel, heap_obstack_base): New function.
6732	* mfd/prog.h: Likewise.
6733	* mfd/snarf.m4 (MF_OBSTACK_BASE, MF_OBSTACK_CANCEL): New defuns.
6734	* mtasim/mtasim.c (stop_mailfromd): Reset signal handler before
6735	doing kill, so that waitpid works on hosts with BSD signal semantics.
6736
67372009-05-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6738
6739	Implement current header access functions.
6740
6741	* mfd/bi_curhdr.m4: New file: implementation of
6742	current header functions.
6743	* mfd/Makefile.am (M4_FILES): Add bi_curhdr.m4
6744	* mfd/bi_mbox.m4 (mailbox_open): Work over MU lossage.
6745	* mfd/bi_msg.m4 (bi_drop_current_message): Remove.
6746	(drop_current_message): New function.
6747	* mfd/mailfromd.h (env_reposition): New prototype.
6748	* mfd/msg.h (bi_drop_current_message): Remove.
6749	* mfd/prog.c (struct eval_environ.reposition): New member.
6750	(env_reposition): New function. Work over MU lossage.
6751	(env_capture_start): Call env_free_captured to release any
6752	module private captured data.
6753	Reset env->reposition to 0.
6754	(env_capture_write): If env->reposition is set, move
6755	stream pointer to the end of stream.
6756	(struct builtin_priv.free_capture): New member.
6757	(builtin_priv_register): Take 3 arguments.
6758	(env_free_captured): New function.
6759	* mfd/prog.h (builtin_priv_register): Update proto.
6760	* mfd/snarf.m4 (MF_DECLARE_DATA): Get at most 3 arguments.
6761
6762	* NEWS, doc/mailutils.texi: Document new functions.
6763	* tests/etc/hdr.mts: New file (message transfer session).
6764	* tests/etc/hdr2.mts: Likewise.
6765	* tests/etc/Makefile.am (EXTRA_DIST): Add new files.
6766	* tests/hdr-all.at: New testcase.
6767	* tests/hdr-cap.at: New testcase.
6768	* tests/hdr-count.at: New testcase.
6769	* tests/hdr-gete.at: New testcase.
6770	* tests/hdr-getn.at: New testcase.
6771	* tests/hdr-itr.at: New testcase.
6772	* tests/hdr-mul.at: New testcase.
6773	* tests/Makefile.am (TESTSUITE_AT): Add new testcase.
6774	* tests/atlocal.in (TESTDIR): New variable.
6775	* tests/testsuite.at (MTASIM_DEFS): New define.
6776	(AT_MTA_TEST): Rename to AT_MTA_TEST_FILTER.  All uses
6777	updated.
6778	(AT_MTA_TEST_SCRIPT,AT_MTA_TEST_FILTER_SCRIPT): New defines.
6779	Include new testcases.
6780	* tests/arg.at, tests/curmsg.at, tests/numrcpt.at,
6781	tests/reject.at, tests/tempfail.at: Updated.
6782
6783	Fix the docs
6784
67852009-05-08  Sergey Poznyakoff  <gray@gnu.org.ua>
6786
6787	Update docs.
6788
6789	* NEWS: Document Milter v.6 support.
6790	* doc/mailfromd.texi: Likewise.
6791	* doc/smap.texi: Document smap.
6792
67932009-05-07  Sergey Poznyakoff  <gray@gnu.org.ua>
6794
6795	Fix exception handling code (saveex/restex).
6796
6797	* mfd/drivers.c (code_type_funcdecl): Exmask handling
6798	and jump fixups are handled within codegen.
6799	(code_type_progdecl): Update call to codegen.
6800	* mfd/gram.y (codegen): Take an extra argument specifying
6801	the exception mask to handle.  Unless it is zero, code
6802	saveex/restex pair around the main code.  This makes sure
6803	local allocations do not disturb exception handling code.
6804	Also, take care of jump fixup here.
6805	(mailfromd_test): Fix bug in numeric argument passing.
6806	* mfd/prog.c (instr_saveex): Provide additional debugging
6807	diagnostics (temporary).
6808	(dump_saveex): Fix retrieving of the exmask (seftover
6809	from earlier version).
6810	(instr_memstk, instr_xmemstk, instr_deref)
6811	(instr_ston, instr_ntos, instr_cmp)
6812	(instr_logand, instr_logor, instr_logxor)
6813	(instr_add, instr_sub, instr_mul)
6814	(instr_div, instr_regex, instr_regcomp)
6815	(instr_funcall): Make sure PC and stack adjustments
6816	occur after outputting trace info.
6817
6818	Implement v6 negotiation in pmult.
6819
6820	* pmult/pmult.c (define_single_macro): Check for table overflow.
6821	(collect_stage_symbols, collect_symlists): New functions.
6822	(pmult_negotiate) [HAVE_SM_PMFI_SETMACS]: Call collect_symlists.
6823
6824	Implement v6 negotiation on the server side.
6825
6826	* gacopyz/stagenames.c: New file.
6827	* gacopyz/Makefile.am (libgacopyz_a_SOURCES): Add stagenames.c.
6828
6829	* gacopyz/gacopyz.c (gacopyz_context_loop): Free req_macros.
6830	(gacopyz_addrcpt_par): rename to gacopyz_add_rcpt_par.
6831	* gacopyz/gacopyz.h (SM_LM_VRS_MAJOR, SM_LM_VRS_MAJOR)
6832	(SM_LM_VRS_PLVL, GACOPYZ_SM_MKVER): New macros.
6833	(macro_index): Rename to gacopyz_stage. All uses updated.
6834	(smfi_version): New proto.
6835	(gacopyz_addrcpt_par): rename to gacopyz_add_rcpt_par.
6836	(gacopyz_stage_name): New declaration.
6837	(gacopyz_srv_get_required_macros): New proto.
6838	(gacopyz_srv_set_version, gacopyz_srv_set_protocol)
6839	(gacopyz_srv_set_actions): 2nd argument is unsigned long.
6840	* gacopyz/server.c (struct gacopyz_srv): New member req_macros.
6841	(gacopyz_srv_get_required_macros): New function.
6842	(gacopyz_srv_destroy): Free req_macros.
6843	(gacopyz_srv_negotiate): Read macros.
6844	* mfd/gram.y (milter_state_name): Removed. Use gacopyz_stage_name instead.
6845
6846	* mtasim/mtasim.c: New options: --gacopyz-log, --milter-proto, --milter-acts.
6847
6848	* doc/mtasim.texi, doc/mailfromd.texi: Update.
6849
6850	Implement v6 negotiation on the server side.
6851
6852	* gacopyz/stagenames.c: New file.
6853	* gacopyz/Makefile.am (libgacopyz_a_SOURCES): Add stagenames.c.
6854
6855	* gacopyz/gacopyz.c (gacopyz_context_loop): Free req_macros.
6856	(gacopyz_addrcpt_par): rename to gacopyz_add_rcpt_par.
6857	* gacopyz/gacopyz.h (SM_LM_VRS_MAJOR, SM_LM_VRS_MAJOR)
6858	(SM_LM_VRS_PLVL, GACOPYZ_SM_MKVER): New macros.
6859	(macro_index): Rename to gacopyz_stage. All uses updated.
6860	(smfi_version): New proto.
6861	(gacopyz_addrcpt_par): rename to gacopyz_add_rcpt_par.
6862	(gacopyz_stage_name): New declaration.
6863	(gacopyz_srv_get_required_macros): New proto.
6864	(gacopyz_srv_set_version, gacopyz_srv_set_protocol)
6865	(gacopyz_srv_set_actions): 2nd argument is unsigned long.
6866	* gacopyz/server.c (struct gacopyz_srv): New member req_macros.
6867	(gacopyz_srv_get_required_macros): New function.
6868	(gacopyz_srv_destroy): Free req_macros.
6869	(gacopyz_srv_negotiate): Read macros.
6870	* mfd/gram.y (milter_state_name): Removed. Use gacopyz_stage_name instead.
6871
6872	* mtasim/mtasim.c: New options: --gacopyz-log, --milter-proto, --milter-acts.
6873
6874	* doc/mtasim.texi, doc/mailfromd.texi: Update.
6875
6876	Implement Milter protocol version 6.
6877
6878	* gacopyz/Makefile.am (trans.h): Pass -vheader_file
6879	argument to the trans.awk script.
6880	* gacopyz/dummy.c (smfilter): Update initialization.
6881	* gacopyz/gacopyz.c (trans_fixup): New function.
6882	(convert_sfsistat): Handle new codes.
6883	(make_optneg_buf): New function.
6884	(send_reply): Handle SMFIP_NR_* flags.
6885	Update SMFIC_OPTNEG case.
6886	(shan_optneg): Implement milter 1.0 (proto 6)
6887	(gacopyz_context_loop): Call trans_fixup.
6888	(ok_to_send): Use the negotiated aflags.
6889	(gacopyz_addrcpt_par, gacopyz_chgfrom)
6890	(gacopyz_setsymlist): New functions.
6891	* gacopyz/gacopyz.h (GACOPYZ_VERSION_MAJOR): Raise to 2.
6892	(SMFI_VERSION): Set to 0x01000000
6893	(SMFI_PROT_VERSION, SMFI_PROT_VERSION_MIN): New defines.
6894	(SMFIR_ADDRCPT_PAR, SMFIR_CHGFROM): New defines.
6895	(SMFIP_NR_HDR, SMFIP_SKIP, SMFIP_RCPT_REJ): New defines.
6896	(SMFIP_NR_CONN, SMFIP_NR_HELO, SMFIP_NR_MAIL)
6897	(SMFIP_NR_RCPT, SMFIP_NR_DATA, SMFIP_NR_UNKN)
6898	(SMFIP_NR_EOH, SMFIP_NR_BODY, SMFIP_HDR_LEADSPC)
6899	(SMFI_DEFAULT_PROT, SMFIF_CHGFROM)
6900	(SMFIF_ADDRCPT_PAR): New defines.
6901	(SMFIS_NOREPLY, SMFIS_SKIP, SMFIS_ALL_OPTS): New constants.
6902	(enum macro_index): New data type, from gacopyz_priv.h
6903	(SMFIM_CONNECT, SMFIM_HELO, SMFIM_ENVFROM)
6904	(SMFIM_ENVRCPT, SMFIM_DATA, SMFIM_EOM)
6905	(SMFIM_EOH): New defines.
6906	(struct gacopyz_milter_descr): New member: xxfi_negotiate
6907	(smfi_addrcpt_par, smfi_chgfrom, smfi_setsymlist)
6908	(gacopyz_addrcpt_par, gacopyz_setsymlist)
6909	(gacopyz_chgfrom): New protos.
6910	* gacopyz/gacopyz_priv.h (struct macro_assoc): Rename flags to pflags.
6911	New members: aflags, version, mta_pflags, req_macros.
6912	* gacopyz/server.c (struct gacopyz_srv): Remove flags.
6913	(struct gacopyz_srv.version, acts, proto): Change type.
6914	(gacopyz_srv_create): Change defaults.
6915	(gacopyz_srv_negotiate): Rewrite.
6916	* gacopyz/smfi.c (smfi_addrcpt_par, smfi_chgfrom)
6917	(smfi_setsymlist): New functions.
6918	* gacopyz/trans.awk (END): Print the state_nr_mask array.
6919
6920	* mfd/bi_db.m4: Add missing includes.
6921	* mfd/engine.c: Implement mlfi_negotiate.
6922	* mfd/gram.y (register_macro): Arrange stored macros by
6923	gacopyz macro index. All uses updated.
6924	(get_stage_macro_string): New function.
6925	* mfd/mailfromd.h (get_stage_macro_string): New proto.
6926	(check_tbf_rate): Add proto.
6927
69282009-05-06  Sergey Poznyakoff  <gray@gnu.org.ua>
6929
6930	Update docs
6931
6932	Minor changes.
6933
6934	* NEWS: Update.
6935	* doc/mailfromd.texi: Reorder material.
6936	* doc/upgrade.texi: New file.
6937	* doc/fdl.texi, doc/gacopyz.texi, doc/strftime.texi: Move
6938	sectioning commands to the main source.
6939	* etc/mailfromd.rc: Reflect recent changes.
6940	* mfd/lex.l: Change semantics of __statedir__
6941	and __preproc__. Introduce __defstatedir__ and
6942	__defpreproc__.
6943
69442009-05-04  Sergey Poznyakoff  <gray@gnu.org.ua>
6945
6946	Version 5.0.93
6947
6948	* NEWS, configure.ac: Raise patchlevel to 93.
6949	* doc/mailfromd.texi: Document new features.
6950	* mfd/tbf_rate.c (tbf_rate_format_struct): Change dbid to
6951	`tbf'.
6952
69532009-05-03  Sergey Poznyakoff  <gray@gnu.org.ua>
6954
6955	Improve the rate function.
6956
6957	* mfd/bi_other.m4 (rate): Add second optional
6958	parameter: a threshold.
6959	* mfd/mailfromd.h (get_rate): Change prototype.
6960	* mfd/rate.c (get_rate): Take two more parameters:
6961	threshold and interval. Return rate as long.
6962	Do not increment the hit counters if the observed
6963	rate is higher than the threshold.
6964	Expire the record if no mails were sent during a
6965	time longer than `interval' seconds.
6966	* mflib/rateok.mf: New file.
6967	* mflib/Makefile.am (inc_DATA): Add rateok.
6968	* NEWS: Update
6969
6970	Minor change.
6971
6972	* NEWS: Update.
6973	* .gitignore: Update.
6974
69752009-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
6976
6977	Add an alternative implementation of the greylist function.
6978
6979	* mfd/bi_db.m4: Add a new implementation of
6980	the greylist function, proposed by Con Tassios.
6981	In this implementation, the database keeps
6982	the time the greylisting period is set to expire,
6983	rather than the time the greylisting was activated.
6984	This allows to implement is_greylisted function.
6985	The implementation to use is selected by #pragma
6986	greylist.
6987	* tests/greylist-ct.at: New file. Testcase for Con Tassios
6988	style greylist.
6989	* tests/Makefile.am (TESTSUITE_AT): Add greylist-ct.at.
6990	* tests/greylist.at: Update.
6991	* tests/testsuite.at: Include greylist-ct.at.
6992	* tests/etc/greylist-ct.rc: New file.
6993	* tests/etc/Makefile.am (RCFILES): Add greylist-ct.rc.
6994	* THANKS: Fix alphabetical ordering.
6995
69962009-05-02  Ben McKeegan  <ben@netservers.co.uk>
6997
6998	Implement token bucket filter.
6999
7000	* mfd/tbf_rate.c: New file.
7001	* gnulib.modules: Add inttypes.
7002	* mfd/Makefile.am (mailfromd_SOURCES): Add tbf_rate.c.
7003	* mfd/bi_other.m4 (tbf_rate): New function.
7004	* mfd/mailfromd.h (tbf_rate_format): New global.
7005	* mfd/main.c (db_format_setup): Set tbf_rate_format.
7006
70072009-04-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7008
7009	Version 5.0.92
7010
7011	Do not use RFC822 filter.
7012
7013	* mfd/bi_sa.m4 (write_822): New function to replace MU's "rfc822" filter,
7014	which is a pile of junk (sorry). Improves performance, besides.
7015	(spamd_send_stream): Use write_822 instead of the filter. See above.
7016	* mfd/engine.c: Fix comment.
7017	* mfd/mailfromd.h (mem_search): New proto.
7018	* mfd/prog.c (env_capture_write): Use mem_search.
7019
70202009-04-18  Sergey Poznyakoff  <gray@gnu.org.ua>
7021
7022	Version 5.0.91
7023
7024	Fix CRLF/LF inconsistencies. Fix bug in SAVEEX/RESTEX.
7025
7026	* mfd/prog.c (instr_restex): Bugfix. Use pop to restore catch
7027	addresses. This also fixes the resulting tos value.
7028	* mfd/bi_body.m4 (current_message): Use mf_stream_to_message
7029	* mfd/bi_sa.m4 (spamd_send_stream): Return int. Recode delimiters to
7030	"\r\n".
7031	(sa): Check return from spamd_send_stream. Adjust reported stream size.
7032	(clamav): Check return from spamd_send_stream.
7033	* mfd/bi_sieve.m4 [MAILUTILS_VERSION_NUMBER < 1290]: Remove
7034	* mfd/mailfromd.h (env_get_line_count, mf_stream_to_message): New functions.
7035	* mfd/prog.c (struct eval_environ.line_count): New member.
7036	(env_get_line_count): New function.
7037	(env_capture_start): Init eval_environ.line_count
7038	(env_capture_write): Recode "\r\n" -> "\r". Update eval_environ.line_count.
7039
7040	* mtasim/mtasim.c (send_body): New function.
7041	(smtp): Use CRLF as line terminator in message body.
7042	* pmult/pmult.c (collect_headers): strip off \r's.
7043
70442009-04-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7045
7046	Document #pragma dbprop
7047
7048	Fix strict callout method.
7049
7050	* mfd/engine.c (check_mx_records): Propagate mf_failure, mf_temp_failure,
7051	and mf_not_found returns to the caller.
7052	(method_strict): Dismiss return mf_not_found from check_mx_records, if
7053	there were no MXs.
7054
70552009-04-08  Sergey Poznyakoff  <gray@gnu.org.ua>
7056
7057	The `dbprop' pragma allows to define database properties.
7058
7059	* mfd/Makefile.am (mailfromd_SOURCES): Add pragma.c
7060	* mfd/pragma.c: New file.
7061	* mfd/bi_db.m4: New pragma `dbprop'.
7062	(dbmap, dbget, dbput, dbdel): take database properties from dbprop settings.
7063	(dbfirst): Open database for reading only.
7064	* mfd/gram.y (pragma_regex, pragma_option, pragma_stacksize)
7065	(pragma_database): Rewrite to match new pragma interface.
7066	(pragma_setup): New function.
7067	* mfd/mailfromd.h (SYM_PRAGMA): New symbol type.
7068	(install_pragma, lookup_pragma): New protos.
7069	(parse_pragma): Arg is const.
7070	* mfd/main.c (main): Call pragma_setup.
7071	* mfd/snarf.m4 (MF_PRAGMA): New define.
7072	* mfd/symtab.c ((install_pragma, lookup_pragma): New functions.
7073
7074	* .gitignore, tests/.gitignore: Update.
7075
70762009-03-19  Con Tassios  <ct@swin.edu.au>
7077
7078	Bugfix
7079
7080	* mfd/bi_db.m4 (greylist): Initialize greylist_seconds_left for expired records.
7081
70822009-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7083
7084	Finish migration to Git.
7085
7086	* Makefile.am (dist-hook): Create ChangeLog.
7087	(ChangeLog): New rule.
7088	* NEWS, README-alpha, README-hacking: Update
7089	* gnulib.modules: Add gitlog-to-changelog
7090	* ChangeLog: Rename to ChangeLog.svn
7091
7092	* tests/hasmx.at, tests/hostname.at, tests/ismx.at,
7093	tests/poll.at, tests/poll01.at, tests/poll02.at,
7094	tests/poll03.at, tests/rescname.at, tests/resolve.at,
7095	tests/testsuite.at: Skip tests if the network is down.
7096
7097	Add .gitignores
7098
70992009-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
7100
7101	Fix the current_message function and subprocess handling in mtasim.
7102
7103	* mtasim/mtasim.c (stop_mailfromd): Wait for the mailfromd child
7104	to terminate and analyze its return status.
7105
7106	* mfd/bi_msg.m4 (bi_drop_current_message): New function.
7107	* mfd/prog.c (env_capture_start): Call bi_drop_current_message if
7108	the capture stream already exists (i.e. when starting processing
7109	2nd or later message in a session).
7110	* mfd/msg.h (bi_drop_current_message): New prototype.
7111	* gacopyz/server.c (srv_connect): Retry attempts to connect
7112	if they fail with ECONNREFUSED. Implement 5-second timeout.
7113
7114	* tests/testsuite.at (MAILFROMD_OPTIONS): New define.
7115	(AT_MTA_TEST): Pass MAILFROMD_OPTIONS to mtasim invocation.
7116	(AT_WITH_MAILFROMD_OPTIONS): New macro.
7117	Include curmsg.at.
7118	* tests/curmsg.at: New file
7119	* tests/etc/Makefile.am (RCFILES): Add size.rc
7120	* tests/etc/size.rc: New file
7121
71222009-03-11  Sergey Poznyakoff  <gray@gnu.org.ua>
7123
7124	Minor fixes.
7125
7126	* mfd/prog.c (env_get_macro, instr_symbol): Minor fixes
7127	(env_capture_start): Seek to 0 after truncating the stream.
7128	Mailutils should know better and do it automatically.
7129
71302009-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7131
7132	Bugfixes
7133
7134	* mfd/prog.c (env_capture_start): Do not create the stream if it
7135	already exists. Bug reported by Con Tassios.
7136	* mfd/bi_sieve.m4 (sieve): Don't free unexistend Sieve machines.
7137	* THANKS: Update
7138	* NEWS: Update
7139
71402009-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
7141
7142	Raise version number to 5.0.90
7143
7144	Bugfix
7145
7146	* mfd/bi_io.m4 (write): Fix spurious runtime exceptions, raised if
7147	the third argument was not given.
7148
7149	Minor changes
7150
7151	* mfd/engine.c (mlfi_envfrom, mlfi_envrcpt): Fix second argument,
7152	so that it does not include $1.
7153	* THANKS: Update.
7154	* mflib/sa.mf (sa_format_report_header): Improve formatting.
7155
71562009-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
7157
7158	Minor changes
7159
7160	* mfd/engine.c (mlfi_envfrom, mlfi_envrcpt): Fix second argument,
7161	so that it does not include $1.
7162	* THANKS: Update.
7163	* mflib/sa.mf (sa_format_report_header): Improve formatting.
7164
71652009-02-18  Sergey Poznyakoff  <gray@gnu.org.ua>
7166
7167	Bugfix
7168
7169	* mfd/gram.y (state_parms): Fix number of arguments to
7170	envfrom and envrcpt.  Bug reported by Patrick Dalais
7171	<patrick@depari.co.za>.
7172
7173	* tests/fromargs.at, tests/rcptargs.at: New tests.
7174	* tests/testsuite.at, tests/Makefile.am: Add new tests.
7175	* tests/etc/ack.rc: Increase stack allocation.
7176
71772008-12-26  Sergey Poznyakoff  <gray@gnu.org.ua>
7178
7179	Version 5.0
7180
7181	* configure.ac, NEWS: Version 5.0.
7182	* doc/mailfromd.texi, doc/pies.texi, doc/pmult.texi: Update.
7183	* doc/Makefile.am (check-builtins): Account for
7184	MF_DEFUN_VARARGS_NO_PROM.
7185
71862008-12-16  Sergey Poznyakoff  <gray@gnu.org.ua>
7187
7188	Fix sprintf, accidentally broken on 2008-07-14.
7189
7190	* mfd/symtab.c (va_builtin_install): Initialize flags to 0.
7191	(va_builtin_install_ex): Remove capture and varargs, replace them
7192	with flags.
7193	* mfd/snarf.m4 (__mf_defun,MF_DEFUN_VARARGS): Reflect changes to
7194	va_builtin_install_ex.
7195	(MF_DEFUN_VARARGS_NO_PROM): New defun.
7196	* mfd/gram.y (cast_arg_list): Add 4th argument, controlling
7197	argument type promotion.
7198	* mfd/drivers.c (code_type_builtin): Use builtin.flags.
7199	* mfd/mailfromd.h (MFD_BUILTIN_*): New defines.
7200	(struct builtin): Remove capture and varargs, replace them
7201	with flags.
7202	* mfd/bi_sprintf.m4: Define sprintf as MF_DEFUN_VARARGS_NO_PROM.
7203
72042008-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
7205
7206	Update
7207
7208	Update
7209
7210	Documentation and minor fixes.
7211
7212	* pies/pies.c, pies/progman.c, pies/meta1gram.y, pies/pies.h,
7213	pies/meta1lex.l: Normalize output redirection terminology, fix the
7214	debug levels.
7215	* pmult/pmult.c: Fix error message
7216	* doc/pies.texi: Document the configuration.
7217
7218	Documentation and minor fixes.
7219
7220	* pies/pies.c, pies/progman.c, pies/meta1gram.y, pies/pies.h,
7221	pies/meta1lex.l: Normalize output redirection terminology, fix the
7222	debug levels.
7223	* pmult/pmult.c: Fix error message
7224	* doc/pies.texi: Document the configuration.
7225
72262008-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
7227
7228	Add const qualifiers to gacopyz_getsymval, gacopyz_replace_body and derived functions.
7229
7230	Bugfixes/improvements.
7231
7232	* doc/mailfromd.texi: Document replbody. Use @WRITEME where appropriate.
7233	* doc/rendition.texi (WRITEME): New macro.
7234	(UNREVISED): Reword.
7235	* doc/pies.texi, doc/smap.texi: Use @WRITEME
7236	* doc/Makefile.am (check-writeme): New rule.
7237	(all-check-docs): Depend on check-writeme.
7238	* mfd/bi_body.m4 (replbody): Can be used in any handler.
7239	* NEWS: Rearrange material.
7240
7241	Emulate Sendmail behavior for SMFIR_REPLBODY.
7242
7243	* pmult/pmult.c (struct pmult_priv_data): New members hdrbuf and
7244	body_itr. Remove body_off.
7245	(pmult_append_body_chunk): Set bucket size to PMILTER_CHUNK_SIZE.
7246	(pmult_clear): Free new pmult_priv_data members.
7247	(pmult_free): Call pmult_clear first.
7248	(pmult_eom): Initialize pmult_priv_data members for eventual body
7249	replacement.
7250	(pmult_msg_rplc): First send headers, then body.
7251
72522008-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
7253
7254	Minor changes.
7255
7256	* pmult/pmult.c: Remove obsolete comment.
7257	* mfd/engine.c (run_msgmod): Ensure the message for gacopyz_replace_body
7258	has \r\n endings.
7259
72602008-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7261
7262	Initial implementation of body replacement.
7263
7264	* mfd/engine.c (run_msgmod): Handle body_repl
7265	* mfd/gram.y (msgmod_opcode_str): Likewise.
7266	* mfd/mailfromd.h (enum msgmod_opcode): New constant body_repl.
7267	* mfd/bi_body.m4 (replbody): New function (proof-of-concept).
7268
7269	* pmult/pmult.c (struct pmult_priv_data): New fields body_off,
7270	body_chunks.
7271	(pmult_append_body_chunk): New function.
7272	(cb_reply): Handle SMFIR_REPLBODY
7273	(pmult_std_reply): Likewise.
7274	(pmult_clear): Destroy body_chunks
7275	(pmult_eom): Request body replacement if body_chunks is not NULL.
7276	(pmult_msg_rplc,pmult_msg_rplc_stat): New functions.
7277	(pmilter): Register pmult_msg_rplc and pmult_msg_rplc_stat.
7278
72792008-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7280
7281	Pies: ensure all prereqs are started in right order before starting a dependency.
7282
7283	* pies/pies.c (component_cfg_param): New statement settle-timeout.
7284	* pies/progman.c (recompute_alarm): New static;
7285	(prog_start): Start the component only if all of its prerequisites
7286	are running.
7287	(progman_recompute_alarm): New function.
7288	(progman_start): Reset recompute_alarm to 0.
7289	(check_stopping): New function.
7290	(progman_wake_sleeping): Handle also status_stopping and
7291	status_enabled. Recompute alarm before leaving.
7292	(prog_start_prerequisites): Return 0 or 1 depending on whether all
7293	prerequisites have been started.
7294	(prog_stop): Raise recompute_alarm for stopping components.
7295	(progman_cleanup): Force status_enabled before attepmting to
7296	start a component.
7297	(progman_cleanup): Add a \n after debugging message.
7298	Run progman_wake_sleeping unlsess expect_term is set.
7299	* pies/meta1gram.y (translate_node_list): Force settle-timeout =
7300	1.
7301	* pies/pies.h (struct component.settle_timeout): New member.
7302
7303	Improve pies.
7304
7305	* pies/pies.c (main): New options --force, --dump-prereq and
7306	--dump-depmap.
7307	Refuse to start if another instance is already running.
7308	(pies_check_status): New function.
7309	(pies_status): Rewrite using pies_check_status.
7310	* pies/progman.c (component_fixup_depend): Bugfix: move
7311	mu_list_append off the conditional.
7312	(progman_dump_prereq, progman_dump_depmap): New functions.
7313	* pies/meta1gram.y (yyerror): Return 0.
7314	* pies/pies.h (progman_dump_prereq, progman_dump_depmap): New
7315	protos.
7316	(meta1_parser_set_debug, meta1lex, meta1error)
7317	(meta1parse): Likewise.
7318
7319	Improve pies.
7320
7321	* pies/progman.c (print_dep): New function.
7322	(progman_build_depmap): Call print_dep to facilitate fixing cyclic
7323	dependencies.
7324	(prog_start_prerequisites): Fix debugging output.
7325	Remove spurious second loop (was it a typo or copy-paste
7326	leftover?)
7327	(prog_stop_dependents): Fix debugging output.
7328	(progman_dump_stats): Avoid race conditions between running and
7329	querying instances.
7330
73312008-11-17  Sergey Poznyakoff  <gray@gnu.org.ua>
7332
7333	Add pies.texi and smap.texi
7334
7335	Document and improve pmult.
7336
7337	* pmult/pmult.c (debug_level): Remove.
7338	(struct pmult_priv_data): Remove debug. Use pmult_debug instead.
7339	(macro_trans): Define Sendmail compatibility macros cn_issuer and
7340	cn_subject.
7341	(builtin_macros): Fix typo in "multiplexer".
7342	(define_macros): Rewrite.  The "define-macros" statement takes
7343	exactly two arguments, each of which can be either a string or a
7344	list of strings.
7345	* doc/values.texi, doc/mailfromd.texi, doc/pmult.texi: Update.
7346
7347	* doc/Makefile.am (check-fixmes): Scan all texinfo documents.
7348
7349	Fix handling of retranslators.
7350
7351	* pies/pies.c (main): Call progman_build_depmap and
7352	progman_create_sockets before starting up components.
7353	* pies/progman.c (struct prog): New member `retr'.
7354	(destroy_prog): New function.
7355	(retr_tag): Change signature. Fix erroneous condition for
7356	xalloc_die.
7357	(register_retr): Return prog. Make static. Initialize idx
7358	with -1.
7359	(update_retr): Register retranslator, if necessary.
7360	(progman_register_retranslators): Remove.
7361	(register_prog0): 2nd argument: index.
7362	(register_prog): Do not create socket at once.
7363	(prog_start): Remove debugging fprintf.
7364	(progman_accept): Update call to register_prog0.
7365	(progman_create_sockets): New function.
7366	(progman_start): Remove calls to progman_register_retranslators
7367	and progman_build_depmap. They must be done only once.
7368	(prog_stop_retranslators): New function.
7369	(prog_stop_dependents): Call prog_stop_retranslators.
7370	(progman_cleanup): Remove dangling retranslators.
7371	* pies/pies.h (progman_create_sockets): New prototype.
7372
7373	Fix handling of retranslators.
7374
7375	* pies/pies.c (main): Call progman_build_depmap and
7376	progman_create_sockets before starting up components.
7377	* pies/progman.c (struct prog): New member `retr'.
7378	(destroy_prog): New function.
7379	(retr_tag): Change signature. Fix erroneous condition for
7380	xalloc_die.
7381	(register_retr): Return prog. Make static. Initialize idx
7382	with -1.
7383	(update_retr): Register retranslator, if necessary.
7384	(progman_register_retranslators): Remove.
7385	(register_prog0): 2nd argument: index.
7386	(register_prog): Do not create socket at once.
7387	(prog_start): Remove debugging fprintf.
7388	(progman_accept): Update call to register_prog0.
7389	(progman_create_sockets): New function.
7390	(progman_start): Remove calls to progman_register_retranslators
7391	and progman_build_depmap. They must be done only once.
7392	(prog_stop_retranslators): New function.
7393	(prog_stop_dependents): Call prog_stop_retranslators.
7394	(progman_cleanup): Remove dangling retranslators.
7395	* pies/pies.h (progman_create_sockets): New prototype.
7396
73972008-11-16  Sergey Poznyakoff  <gray@gnu.org.ua>
7398
7399	Improve pies.
7400
7401	* pies/pies.h (create_socket): Change proto to 3 arguments.
7402	* pies/socket.c (create_socket): Take two additional arguments.
7403	Allow to configure ownership and mode of created UNIX sockets.
7404	* pies/progman.c (register_prog, prog_start): Update calls to
7405	create_socket.
7406
7407	Implement ctype functions.
7408
7409	* mfd/bi_ctype.m4: New function.
7410	* mfd/Makefile.am (inc_DATA): Add bi_ctype.m4.
7411	* doc/Makefile.am (check-builtins): Update source sed expression.
7412	* doc/mailfromd.texi, NEWS: Document ctype functions.
7413
74142008-11-15  Sergey Poznyakoff  <gray@gnu.org.ua>
7415
7416	Improve handling of program privileges.
7417
7418	* lib/libmf.h (struct mf_privs): New data type.
7419	(get_user_groups, mf_priv_setup, mf_epriv_setup): New prototypes.
7420	* lib/userprivs.c (get_user_groups, mf_priv_setup)
7421	(mf_epriv_setup): New functions.
7422
7423	* smap/smap.c: If user is specified, switch to effective uid/gid,
7424	in order for msrv to create files with right privileges, on one
7425	hand, and to be able to create pidfile in root-owned directories
7426	(e.g. /var/run), on the other hand. This requires todays snapshot
7427	of Mailutils.
7428
7429	* pies/pies.h (struct pies_privs_data): Remove
7430	(struct component): Change type of `privs' to struct mf_privs.
7431	(priv_setup): Remove.
7432	* pies/pies.c: Use mf_priv* stuff to manipulate privileges.
7433	* pies/progman.c: Likewise.
7434	* pies/meta1gram.y (list): allow for trailing comma.
7435
74362008-11-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7437
7438	Bugfix.
7439
7440	* mfd/bi_string.m4 (index) (rindex): Third argument (start index)
7441	can equal string length.
7442
7443	Bugfix.
7444
7445	* pies/Makefile.am (LDADD): Add MF_PROCTITLE_LIBS
7446
7447	Bugfix.
7448
7449	* lib/proctitle.c (mf_proctitle_format):
7450	* pies/progman.c (progman_register_retranslators): Register
7451	retranslators only for retr_syslog.
7452	(open_retranslator): Do not prepend program name to the proctitle.
7453	It is done automatically by the library.
7454	* lib/proctitle.c: Declare environ.
7455	Define __progname if not defined in libc.
7456	(mf_proctitle_init): Set __progname.
7457	(mf_proctitle_format): Prepend program name to the proctitle.
7458
7459	Implement file output redirection.
7460
7461	* pies/pies.h (enum retr_type): New constants.
7462	(struct retranslator): New type.
7463	(struct component): Change type of retr to struct retranslator.
7464	All uses updated.
7465	* pies/pies.c (_cb_retr): Takes two arguments:
7466	redirection type and file name or syslog priority.
7467	(make_full_name): New function.
7468	(component_verify): Check retr file names.
7469	* pies/progman.c (redirect_to_file): New function.
7470	(open_retranslator): Handle file redirects.
7471	(prog_start): Open /dev/null in wronly mode.
7472	* pies/meta1gram.y (create_retr_node): New function.
7473	(translate_node_list): Create default "stderr" statement.
7474
7475	Implement setproctitle functionality for pies.
7476
7477	* am: New directory.
7478	* am/aggr.m4, am/debug.m4: New files (from acinclude.m4)
7479	* am/proctitle.m4: New file.
7480	* acinclude.m4: Removed.
7481	* configure.ac: Call MF_PROCTITLE.
7482	* lib/libmf.h (mf_proctitle_format): New prototype.
7483	* lib/proctitle.c: New file.
7484	* lib/Makefile.am (libmf_a_SOURCES): Add proctitle.c.
7485	* Makefile.am (ACLOCAL_AMFLAGS): Add -I am
7486
7487	* pies/pies.c (main): Call mf_proctitle_init.
7488	* pies/progman.c (retr_tag): Rewrite in a safer way.
7489	(open_retranslator): Set program title in child.
7490
7491	Allow to complement existing components (useful for MeTA1 includes).
7492
7493	* pies/pies.c (component_verify): New function.
7494	(component_section_parser): Call component_verify.
7495	(_cm_include_meta1): Reduce the tree at once.
7496	(parse_meta1_conf): Not needed any more.
7497	* pies/progman.c (progman_register_retranslators): New function.
7498	(pies/progman.c): Do not register retranslators: wait until the
7499	entire config is parsed and do that in progman_start.
7500	(progman_start): Call progman_register_retranslators.
7501
7502	Optonal semicolon after a simple statement
7503
75042008-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
7505
7506	Implement dependencies/prerequisites in MeTA1.
7507
7508	* pies/pies.c (component_cfg_param): Rename "depend" to
7509	"prerequisites". Add new keyword "dependents".
7510	(pies_cfg_param): New keyword "limits".
7511	* pies/progman.c (struct prog): Rename "depend" to "prereq".
7512	(prog_start_dependencies): Rename to prog_start_prerequisites
7513	(register_prog0): Do not fill prereq. This will be done later,
7514	when all dependencies are resolved.
7515	(prog_rebuild_prerequisites): New function.
7516	(prog_start): Per-component limitis override system-wide ones.
7517	(component_fixup_depend, fixup_prerequisites)
7518	(rebuild_prerequisites): New functions.
7519	(progman_build_depmap): Call fixup_prerequisites and
7520	rebuild_prerequisites.
7521	(prog_stop_dependent): Rename to prog_stop_dependents.
7522	* pies/meta1gram.y: Implement restart_dependencies.
7523	* pies/pies.h (struct component): Rename "depend" to "prereq". Add
7524	new member "depend".
7525	(pies_limits): New extern.
7526
7527	* pies/pies.rcin: Update
7528
7529	Update
7530
7531	Implement MeTA1 configuration file parser.
7532
7533	* configure.ac: Require Mailutils 1.9.93
7534	* doc/mailfromd.texi, NEWS: Update.
7535	* pies/pies.c (_cb_depend): Accept list argument.
7536	(component_cfg_param): New statement: program.
7537	(pies_cfg_param): New statements: include-meta1 and
7538	meta1-queue-dir.
7539	(parse_meta1_conf, pies_cfg_verifier): New functions.
7540	(main): Set mu_app_cfg_verifier. Call parse_meta1_conf.
7541	* pies/progman.c (progman_lookup_component): New function.
7542	(prog_start): Pass program name (eventually differing from
7543	argv[0]).
7544	* pies/pies.h (struct component): New member `program'.
7545	(progman_lookup_component): New prototype.
7546	* pies/meta1gram.y, pies/meta1lex.h, pies/meta1lex.l: New files.
7547	* pies/Makefile.am (pies_SOURCES): Add meta1gram.y and
7548	pies/meta1lex.h.
7549	(noinst_HEADERS, AM_YFLAGS, AM_LFLAGS): New variables.
7550
7551	Implement MeTA1 configuration file parser.
7552
7553	* configure.ac: Require Mailutils 1.9.93
7554	* doc/mailfromd.texi, NEWS: Update.
7555	* pies/pies.c (_cb_depend): Accept list argument.
7556	(component_cfg_param): New statement: program.
7557	(pies_cfg_param): New statements: include-meta1 and
7558	meta1-queue-dir.
7559	(parse_meta1_conf, pies_cfg_verifier): New functions.
7560	(main): Set mu_app_cfg_verifier. Call parse_meta1_conf.
7561	* pies/progman.c (progman_lookup_component): New function.
7562	(prog_start): Pass program name (eventually differing from
7563	argv[0]).
7564	* pies/pies.h (struct component): New member `program'.
7565	(progman_lookup_component): New prototype.
7566	* pies/meta1gram.y, pies/meta1lex.h, pies/meta1lex.l: New files.
7567	* pies/Makefile.am (pies_SOURCES): Add meta1gram.y and
7568	pies/meta1lex.h.
7569	(noinst_HEADERS, AM_YFLAGS, AM_LFLAGS): New variables.
7570
75712008-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
7572
7573	Bugfixes
7574
7575	* pies/pies.c (component_cfg_param, pies_cfg_param): New keyword:
7576	allgroups.
7577	(pies_add_allgroups): New function.
7578	* pies/limits.c: Fix debug statements.
7579	* pies/progman.c (build_depmap): Rename to
7580	progman_build_depmap. Make extern, for future use. All callers
7581	updated.
7582	* pies/pies.h (progman_build_depmap): New proto.
7583
7584	pies: rename open_socket to create_socket
7585
7586	Bugfixes
7587
7588	* pies/pies.c: Fix ACTION_COMPRELOAD
7589	* pies/progman.c (open_retranslator): (child) close all open
7590	sockets, except p[0] (pipe input).
7591	(prog_start): Bugfix: mark sleeping components with
7592	status_sleeping.
7593	(prog_start): stdout retranslation works for pies_comp_pass_fd.
7594	Mark started processes with status_enabled.
7595	(progman_start): Start enabled processes if pid is 0.
7596	(progman_stop_component): Correctly handle various status types.
7597	(progman_dump_stats): Mark processes being stopped.
7598
7599	Bugfixes
7600
7601	* pies/pies.c (component_cfg_param): Bugfix.
7602	(component_section_parser): Initialize comp->pass_fd_socket
7603	* pies/progman.c (prog_start): Listen on the socket, if in pass_fd
7604	mode. Avoid closing it.
7605	(prog_stop_all): Kill programs being stopped.
7606	* pies/socket.c (pass_fd): Check return from open_unix_socket.
7607
7608	Bugfixes
7609
7610	* pies/pies.c (component_cfg_param): Bugfix.
7611	(component_section_parser): Initialize comp->pass_fd_socket
7612	* pies/progman.c (prog_start): Listen on the socket, if in pass_fd
7613	mode. Avoid closing it.
7614	(prog_stop_all): Kill programs being stopped.
7615	* pies/socket.c (pass_fd): Check return from open_unix_socket.
7616
76172008-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7618
7619	Rewrite pies to incorporate into it the functionality of inetd and mcp.
7620
7621	* pies/pies.c (pmult_debug): Rename to pies_debug.
7622	(pies_acl): New global.
7623	(component_cfg_param): New statements: mode, socket,
7624	pass-fd-socket, acl, limits.
7625	(component_section_parser): Allocate comp. Check its consistency
7626	on mu_cfg_section_end.
7627	(pies_cfg_param): New statement: acl.
7628	(main): Call mu_acl_cfg_init. Use pies_pause instead of pause.
7629	* pies/limits.c: New file.
7630	* pies/progman.c (enum prog_status): New status: status_listener.
7631	(struct prog): Keep a pointer to the original struct component,
7632	instead of copying its fields (except for depend, which is copied
7633	anyway). All uses updated.
7634	(prog_lookup_by_socket, unlink_prog, register_prog0): New
7635	functions.
7636	(prog_start, progman_cleanup, progman_stop_component): Rewrite to
7637	take into account various component modes.
7638	(pies_check_acl): New function.
7639	(progman_accept): New function.
7640	* pies/pies.h (limits_record_t): New typedef.
7641	(enum pies_comp_mode): New constants.
7642	(struct component): New members: mode, limits, socket_url,
7643	pass_fd_socket, acl.
7644	(progman_accept): New proto.
7645	(pies_pause, register_listener, pass_fd, open_socket)
7646	(parse_limits, set_limits): New protos.
7647	* pies/Makefile.am (pies_SOURCES): Add limits.c and socket.c
7648	* pies/socket.c: New file.
7649
7650	* configure.ac: Check for msg_control and msg_accrights in struct
7651	msghdr.
7652	* acinclude.m4 (IU_CHECK_MEMBER, IU_CHECK_MEMBERS): New macros
7653	(from inetutils).
7654
7655	Minor fixes.
7656
7657	* pies/progman.c (prog_start): Bugfix.
7658	* pmult/pmult.c (pmult_cfg_param): New configuration statement
7659	pmilter-debug.
7660	(main): Call sm_pmfi_setdbg.
7661
7662	Minor fixes.
7663
7664	* pies/progman.c (prog_start): Bugfix.
7665	* pmult/pmult.c (pmult_cfg_param): New configuration statement
7666	pmilter-debug.
7667	(main): Call sm_pmfi_setdbg.
7668
76692008-11-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7670
7671	Update
7672
7673	Add built-in functions for accessing Sendmail macros.
7674
7675	* mfd/mailfromd.h (env_get_macro): New proto.
7676	* mfd/prog.c (env_get_macro): New function.
7677	* mfd/bi_macro.m4: New file.
7678	* mfd/Makefile.am (M4_FILES): Add bi_macro.m4.
7679	* NEWS: Update.
7680	* doc/mailfromd.texi (Macro access): New subsubsection.
7681
76822008-11-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7683
7684	* mfd/bi_mbox.m4 (mailbox_open): Take 2nd optional argument, specifying the permissions of the mailbox, if it is to be created. * doc/mailfromd.texi, NEWS: Update.
7685
76862008-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
7687
7688	Bugfix & minor improvement.
7689
7690	* pmult/pmult.c (collect_headers): Rewrite state machine to ensure
7691	each state either advances off or switches to the new state.
7692	(builtin_macros): New variable.
7693	(translate_macros0): Add builtin macros.
7694	(pmult_connect): Do not free priv_data even if some milters
7695	returned rejects.
7696
7697	Bugfix
7698
7699	* pmult/pmult.c (collect_headers): Rewrite state machine to ensure
7700	each state either advances off or switches to the new state.
7701
7702	Bugfix
7703
7704	* pmult/pmult.c (collect_headers): Rewrite state machine to ensure
7705	each state either advances off or switches to the new state.
7706
77072008-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
7708
7709	Bugfix.
7710
7711	* mfd/lex.l: Fix default condition for ML state, introduced on
7712	2008-11-02.
7713
77142008-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
7715
7716	Improvements.
7717
7718	* mflib/verp.mf (verp_extract_user): Pass email as the first
7719	argument.
7720	* doc/mailfromd.texi: Update.
7721	* doc/Makefile.am: Add pmult.texi
7722	* doc/pmult.texi: New file.
7723	* mfd/lex.l: %% and $$ in quoted strings are replaced by single %
7724	and $, correspondingly.
7725	* NEWS: Update.
7726
77272008-11-03  Sergey Poznyakoff  <gray@gnu.org.ua>
7728
7729	Improve docs.
7730
7731	* doc/mailfromd.texi, NEWS: Document `getopt' and run (script)
7732	mode.
7733	* mfd/lex.l: Octal characters can contain 1 to 3 octal characters.
7734	* mfd/bi_getopt.m4: Allow to specify long options (without short
7735	option equivalents) that take arguments.
7736	* mfd/main.c (options): Document optional argument to the `--run'
7737	option.
7738
77392008-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
7740
7741	Minor improvement in the lexer.
7742
7743	* mfd/lex.l (start_locus): New variable.
7744	(BEGIN_X): New macro.
7745	Add a rule to ignore any characters at EOF in ML state.
7746	(yywrap): Report an error if the file is left not in the INITIAL
7747	state, i.e. EOFs in comments or strings.
7748
7749	Improve the docs.
7750
7751	* doc/mailfromd.texi, NEWS: Update.
7752
7753	Minor fix.
7754
7755	* mfd/drivers.c (mark_type_asgn): Mark variable as referenced if
7756	it is assigned a value.
7757
7758	Get rid of ml_header.  Gacopyz takes care about the header formatting.
7759
7760	* gacopyz/gacopyz.h (gacopyz_safe_header_value): New proto.
7761	* gacopyz/gacopyz.c (gacopyz_safe_header_value): New function.
7762	(gacopyz_header_command): Use gacopyz_safe_header_value to format
7763	header value.
7764	* mfd/bi_sa.m4 (sa): Remove unused variable.
7765	* mfd/bi_string.m4: Remove ml_header.
7766	* doc/mailfromd.texi: Remove ml_header.
7767
7768	New functions: replstr, ml_header, sa_format_score, sa_format_report_header
7769
7770	* mflib/sa.mf: New file.
7771	* mflib/Makefile.am (inc_DATA): Add sa.mf
7772	* mfd/bi_string.m4 (replstr): New function.
7773
7774	* doc/mailfromd.texi: Document new functions.
7775	* NEWS: Update.
7776
7777	New functions: replstr, ml_header, sa_format_score, sa_format_report_header
7778
7779	* mflib/sa.mf: New file.
7780	* mflib/Makefile.am (inc_DATA): Add sa.mf
7781	* mfd/bi_string.m4 (replstr): New function.
7782
7783	* doc/mailfromd.texi: Document new functions.
7784	* NEWS: Update.
7785
77862008-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
7787
7788	mfd/bi_string.m4 (rindex): Fix bug introduced on 2008-10-29.
7789
7790	Implement spamd REPORT in sa.
7791
7792	* mfd/snarf.m4 (MF_OBSTACK_FINISH): New macro.
7793	* mfd/bi_string.m4 (ml_header): New function.
7794	* mfd/bi_sa.m4 (spamd_read_line0): New function.
7795	(spamd_read_line): Remove last argument. Use spamd_read_line0.
7796	(sa): Take a 3rd optional argument, specirying whether to
7797	return spam report in sa_keywords.
7798
7799	Bugfix.
7800
7801	* mfd/gram.y (ADD,REPLACE): Cast 2nd argument to string.
7802	* mfd/bi_system.m4 (strftime): Add missing MF_OPTVAL.
7803
7804	Bugfix.
7805
7806	* mfd/gram.y (ADD,REPLACE): Cast 2nd argument to string.
7807	* mfd/bi_system.m4 (strftime): Add missing MF_OPTVAL.
7808
78092008-10-31  Sergey Poznyakoff  <gray@gnu.org.ua>
7810
7811	Update
7812
7813	Update.
7814
7815	* pmult/pmult.c (pmult_eom): Get macros from PM_SMST_DOT list.
7816
7817	Allow to configure which macros to pass to the filter.
7818
7819	* gnulib.modules: Add inttostr
7820	* smap/smap.c, pies/progman.c, pies/pies.h: Use umaxtostr, instead
7821	of mu_umaxtostr.
7822
7823	* pmult/pmult.c (struct pmult_priv_data): New members: argc,
7824	argv.
7825	(macro_trans, meta_stage_trans, macrotab, macronames): New
7826	globals.
7827	(translate_macros0, translate_macros): New functions.
7828	(define_macros, define_macros_iter): New functions.
7829	(_cb_define, request_auth_macros): New functions.
7830	(pmult_cfg_param): New keyword `define-macro'.
7831	(pmult_free): Free argv.
7832	(pmult_negotiate): Use sm_pmfi_setmacs, if available.
7833	(pmult_connect, pmult_helo, pmult_mail, pmult_rcpt)
7834	(pmult_data, process_headers, pmult_eom): Use translate_macros.
7835	(main): Handle want_auth_macros.
7836
7837	* configure.ac: Check for sm_pmfi_setmacs. This function should
7838	appear in meta1-1.0.PreAlpha28.0.
7839
78402008-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
7841
7842	Bugfix
7843
7844	* pmult/pmult.c (collect_headers): Bugfix, following changes
7845	dated 2008-10-14.
7846
78472008-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
7848
7849	Improve string functions.
7850
7851	* mfd/bi_string.m4 (index, rindex): Take an optional third
7852	argument, indicating where to start searching.
7853	* NEWS, doc/mailfromd.texi: Document changes to index and rindex.
7854
78552008-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
7856
7857	Bugfixes
7858
7859	* pmult/pmult.c (pmult_std_reply): Handle SMFIR_ACCEPT.
7860	* configure.ac, NEWS: Raise version patchlevel to 96
7861	* mfd/drivers.c (mark_type_asgn): Add a comment.
7862	* mfd/main.c (main): Do not try to start up if script_dump_xref
7863	was given.
7864
78652008-10-24  Sergey Poznyakoff  <gray@gnu.org.ua>
7866
7867	* mflib/verp.mf: New file. * mflib/Makefile.am: Add verp.mf.
7868
78692008-10-22  Sergey Poznyakoff  <gray@gnu.org.ua>
7870
7871	* gacopyz/server.c (gacopyz_srv_send_command): Fix arguments to gacopyz_io_log
7872
7873	Fixes in Gacopyz server.
7874
7875	* gacopyz/server.c (gacopyz_srv_abort): Reset state to srv_ready.
7876	(gacopyz_srv_helo): If called in srv_msgproc, reset the milter
7877	state by calling gacopyz_srv_abort before sending the command.
7878	(gacopyz_srv_envfrom): Likewise.
7879
78802008-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7881
7882	Pass auth macros to milter.
7883
7884	* pmult/pmult.c: New configuration statement auth-macros.
7885	(pmult_negotiate): Request auth macros for PM_SMST_MAIL if
7886	auth-macros was requested.
7887	(pmult_mail): Translate auth macros if present.
7888
7889	* gacopyz/server.c (gacopyz_srv_negotiate): Additional
7890	diagnostics.
7891	(gacopyz_srv_send_macros): Send macros only for those commands
7892	that do require them.
7893	(gacopyz_srv_send_command): Additional diagnostics.
7894	* gacopyz/gacopyz.c (gacopyz_context_loop): Additional diagnostics.
7895
78962008-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
7897
7898	* pmult/pmult.c (_cb_log_level): Handle > level specifier (all levels from the given one up). * gacopyz/gacopyz.h (SMI_LOG_FROM): Handle n==0.
7899
79002008-10-15  Sergey Poznyakoff  <gray@gnu.org.ua>
7901
7902	* pies/progman.c (env_setup): Port new implementation from Rush.
7903
7904	* gnulib.modules: Add c-ctype
7905	* mtasim/mtasim.c, pies/pies.h, pmult/pmult.c, lib/parsetime.c,
7906	mfd/lex.l, mfd/gram.y, mfd/mailfromd.h, mfd/spf.c,
7907	mfd/bi_sprintf.m4, mfd/bi_io.m4, mfd/pp.c, mfd/main.c: Use c-ctype,
7908	instead of ctype.
7909
79102008-10-14  Sergey Poznyakoff  <gray@gnu.org.ua>
7911
7912	Minor improvement.
7913
7914	* pmult/pmult.c (enum pmult_msg_state): Add more states.
7915	(collect_headers): Correctly handle end-of-message marker,
7916	even though it should never appear here.
7917	(pmult_msg_handler): Make sure the handler always processes first
7918	handlers, then body, even if some of these two is missing.
7919
79202008-10-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7921
7922	Bugfixes.
7923
7924	* gacopyz/server.c (gacopyz_srv_eom): Reset state to srv_ready.
7925
7926	Bugfixes.
7927
7928	* mfd/engine.c (mlfi_eom): Destroy md->hdr.
7929	* pmult/pmult.c: Fix comment.
7930	* NEWS: Update.
7931
79322008-10-06  Sergey Poznyakoff  <gray@gnu.org.ua>
7933
7934	Bugfix.
7935
7936	* mfd/main.c (read_domain_file): Select first word from each
7937	line.  This allows to use meta1/mt.
7938
79392008-10-04  Sergey Poznyakoff  <gray@gnu.org.ua>
7940
7941	Introduce "precious" components.
7942
7943	* pies/pies.c (component_cfg_param): New configuration statement
7944	`precious'.
7945	* pies/progman.c (struct prog): New member `precious'.
7946	(register_prog): Set precious.
7947	(prog_start_dependencies): Do not mark disabled precious
7948	dependencies of a disabled component.
7949	* pies/pies.h (pies/pies.h): New member `precious'.
7950	* pies/pies.rcin (mcp): Mark as precious.
7951
7952	Bugfix.
7953
7954	* pies/pies.c (return_code_section_parser): Fix to work with tag
7955	of any type.
7956	* pies/pies.rcin: Minor change.
7957
7958	Raise version number to 4.9.95.
7959
7960	Terminate components in reverse order.
7961
7962	* pies/pies.c (main): Do cleanup after main action processing and
7963	only if action == ACTION_CONT.
7964	* pies/progman.c (struct prog): New member `prev'.
7965	(link_prog): Maintain doubly-linked list.
7966	(prog_stop_dependent): Avoid printing diagnostics if there are
7967	no dependencies to be stopped.
7968	(prog_stop): Do nothing if prog->pid is zero.
7969	Do not call prog_stop_dependent, it will be done by
7970	progman_cleanup.
7971	(prog_stop_all): Terminate components from last to first.
7972	* pies/pies.rcin: Improve example, by adding mcp component.
7973
7974	Improvements in pies.
7975
7976	* pies/pies.c (_cb_depend): Handle single string value.
7977	(_cb_retr): Fix diagnostic message.
7978	(_cb_facility): New function.
7979	(component_cfg_param): New statement `facility'.
7980	(component_section_parser): Initialize comp.facility to the
7981	default value.
7982	* pies/progman.c (struct prog): New member `facility'.
7983	(register_prog): Initialize facility.
7984	(open_retranslator): Use master->facility.
7985	* pies/pies.h (struct component): New member `facility'.
7986
7987	Improvements in pies.
7988
7989	* pies/pies.c (_cb_depend): Handle single string value.
7990	(_cb_retr): Fix diagnostic message.
7991	(_cb_facility): New function.
7992	(component_cfg_param): New statement `facility'.
7993	(component_section_parser): Initialize comp.facility to the
7994	default value.
7995	* pies/progman.c (struct prog): New member `facility'.
7996	(register_prog): Initialize facility.
7997	(open_retranslator): Use master->facility.
7998	* pies/pies.h (struct component): New member `facility'.
7999
80002008-10-03  Sergey Poznyakoff  <gray@gnu.org.ua>
8001
8002	Bugfix.
8003
8004	* pies/progman.c (register_prog): Remove stray semicolon.
8005	(retr_exit): Use _exit.
8006	(prog_stop_dependent): Bugfix: stop retranlators as well as
8007	components.
8008
80092008-09-29  Sergey Poznyakoff  <gray@gnu.org.ua>
8010
8011	Remove unused vars
8012
8013	Set patchlevel 94
8014
8015	Fix MU configuration file support.
8016
8017	* lib/libmf.h (config_array_to_argv)
8018	(config_array_to_string, config_cb_timeout): new prototypes.
8019	* lib/utils.c: New
8020	* lib/Makefile.am (libmf_a_SOURCES): Add utils.c
8021	* mfd/gram.y (defer_initialize_variable): Both args are const.
8022	* mfd/mailfromd.h (defer_initialize_variable)
8023	(add_include_dir): Change signatures.
8024	* mfd/pp.c (add_include_dir): Arg is const.
8025	* pies/pies.c, pmult/pmult.c, mfd/main.c: Rewrite configuration
8026	file support to match changes in Mailutils.
8027
80282008-09-20  Sergey Poznyakoff  <gray@gnu.org.ua>
8029
8030	Improve stack memory management.
8031
8032	* mfd/gram.y (strtosize, get_stack_max, get_stack_incr)
8033	(get_stack_size): New functions.
8034	(pragma_stacksize): Rewrite. Take maximum stack size as an optional third
8035	argument.
8036	* mfd/mailfromd.h (stack_max_size): New declaration.
8037	(stack_max_size): New function.
8038	(expand_dataseg): Signal exception if new memory size would be greater than
8039	the stack size limit.
8040	* NEWS, doc/mailfromd.texi: Update.
8041
8042	Improve stack memory management.
8043
8044	* mfd/gram.y (strtosize, get_stack_max, get_stack_incr)
8045	(get_stack_size): New functions.
8046	(pragma_stacksize): Rewrite. Take maximum stack size as an optional third
8047	argument.
8048	* mfd/mailfromd.h (stack_max_size): New declaration.
8049	(stack_max_size): New function.
8050	(expand_dataseg): Signal exception if new memory size would be greater than
8051	the stack size limit.
8052	* NEWS, doc/mailfromd.texi: Update.
8053
80542008-09-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8055
8056	Implement two stack growth policies.
8057
8058	* mfd/gram.y (pragma_stacksize): Implement two stack growth
8059	policies.
8060	* mfd/mailfromd.h (enum stack_expand_policy): New enum.
8061	(stack_expand_incr, stack_expand_policy): New global variables.
8062	* mfd/prog.c (stack_expand_incr)
8063	(stack_expand_policy): New global variables.
8064
8065	* NEWS: Update.
8066	* doc/mailfromd.texi (stacksize): Document changes to pragma
8067	stacksize.
8068	* doc/values.texi (STACK-INCR): New value.
8069
80702008-09-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8071
8072	Fix typo
8073
8074	Implement new last_poll_ variables.
8075
8076	* doc/mailfromd.texi: Document new variables.
8077	* mfd/engine.c (check_on_host, method_strict, method_standard):
8078	Implement last_poll_helo and last_poll_greeting variables,
8079	proposed by Jan Rafaj.
8080
8081	* Makefile.am: Implement a dist-hook, preventing distributing an unfinished NEWS file. * doc/mailfromd.texi: Document new mfl-mode customization variables. Add missing index entries. * NEWS: Update. * elisp/mfl-mode.el: Improve auto-indentation support.
8082
80832008-09-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8084
8085	Minor fix.
8086
8087	* Makefile.am (dist-hook): New rule. Test for leftover FIXMEs in NEWS.
8088
8089	Minor improvement.
8090
8091	* mfd/bi_getopt.m4 (opterr, optopt): New globals.
8092	(getopt): Handle opterr and optopt.
8093	(MF_INIT): Initialize opterr to 1.
8094
8095	* mfd/bi_getopt.m4 (getopt): Use | as a short/long option separator. Make sure optind/optarg are set before returning EOF. * mfd/gram.y (mailfromd_run): Remove superfluous call to env_leave_frame. * mfd/drivers.c (mark_type_argx, mark_type_vaptr): New functions. * mfd/prog.c (env_vaptr): Cast the result. * mfd/main.c (argpflag): Understand abbreviated forms of the --run option.
8096
8097	* mfd/bi_db.m4 (dbfirst, dbnext, dbkey, dbvalue): New functions
8098	(proof of concept).
8099
81002008-09-16  Sergey Poznyakoff  <gray@gnu.org.ua>
8101
8102	Implement functions with variable number of arguments and 'run' mode.
8103
8104	* mfd/symtab.c (function_install): Take additional argument.
8105	* mfd/lex.l: New tokens `vaptr', `...' and ARGX.
8106	* mfd/snarf.m4 (MF_VASTRING): New define.
8107	* mfd/gram.y: Handle functions with variable number of arguments,
8108	$(expr), and vaptr() expressions.  This raises shift/reduce
8109	expectation to 29 conflicts.
8110	(parmtype_function): Return dtype_string for
8111	arguments from vararg list.
8112	(FUNC_HIDDEN_ARGS): Return 1 if f->varargs is set.
8113	(type_to_string): Handle pointer argument.
8114	(function_call): Handle function->varargs.
8115	(node_type): Handle node_type_argx, and node_type_vaptr.
8116	(cast_arg_list): Handle variable number of arguments.
8117	(cast_to): Handle dtype_pointer as dtype_number.
8118	* mfd/drivers.c (argx, vaptr): New node types.
8119	(code_type_call): Handle variable number of arguments.
8120	(code_cast): Handle dtype_pointer as dtype_number.
8121	* mfd/mailfromd.h (MAILFROMD_RUN): New define.
8122	(struct argx_node): New type.
8123	(struct node): Add argx_node.
8124	(struct function): New member `varargs'.
8125	(function_install): Add varargs.
8126	(mailfromd_run): New prototype.
8127	* mfd/prog.c (env_vaptr, env_get_reg): New functions.
8128	(env_make_frame0): New function.
8129	(instr_xmemstk): New instruction handler.
8130	* mfd/opcodes (XMEMSTK): New opcode.
8131	* mfd/prog.h (env_get_reg, env_vaptr): New protos.
8132	* mfd/main.c (options): New option `--run'.
8133	(main): Handle `run' mode.
8134	* mfd/Makefile.am (M4_FILES): Add bi_getopt.m4.
8135	* NEWS: Update.
8136
81372008-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
8138
8139	Add a test suite for aliases.
8140
8141	* tests/alias.at: New file.
8142	* tests/Makefile.am (TESTSUITE_AT): Add alias.at
8143	* tests/testsuite.at: Add alias.at.
8144
8145	* elisp/mfl-mode.el (mfl-next-line-indentation) (mfl-find-line-indentation): Fix computations for `alias', `returns' and for comment lines. (mfl-returns-offset, mfl-comment-offset): New customization variables.
8146
8147	Add sav.mf
8148
8149	Minor fix
8150
8151	* elisp/mfl-mode.el (mfl-mode): Make compile-command buffer-local.
8152
8153	Implement function aliases.
8154
8155	* mfd/symtab.c (struct alias): New data type.
8156	(union symentry): New member `alias'.
8157	(lookup_or_install): Remove erroneous condition, introduced in
8158	r1627 (branches/release_4_3_patches), which caused third
8159	argument (install) to be ignored if SYM_BITS was set in state.
8160	(function_install, function_lookup): Account for aliases.
8161	(install_alias): New function.
8162	* mfd/lex.l (alias): New keyword.
8163	* mfd/gram.y: Allow to define function aliases.
8164	* mfd/mailfromd.h (SYM_ALIAS): New define.
8165	(install_alias): New proto.
8166
8167	* doc/mailfromd.texi: Document function aliases.
8168	* doc/NEWS: Likewise.
8169
8170	* elisp/mfl-mode.el (mfl-mfd-command): Change command name.
8171	(mfl-keywords): Add alias.
8172
81732008-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8174
8175	Version 4.9.93
8176
8177	* configure.ac: Version 4.9.93
8178	* NEWS: Likewise.
8179	* pies/pies.c: Change description.
8180
81812008-09-08  Sergey Poznyakoff  <gray@gnu.org.ua>
8182
8183	* mfd/prog.c (instr_stkalloc): Expand stack segment if needed.
8184
81852008-08-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8186
8187	Bugfixes. * mflib/pp-setup (_, N_): If used without arguments, insert _ and N_ verbatim. * README: Update. * tests/Makefile.am (clean-local): Fix rule. * configure.ac: Fix check for res_query.
8188
8189	* mfd/engine.c (mailfromd_daemon): Use mailfromd_umask instead of
8190	a hardcoded value.
8191	* mfd/mailfromd.h (mailfromd_umask): New prototype.
8192	* mfd/main.c (mailfromd_umask): New fucntion.
8193	* mfd/bi_system.m4 (umask): New built-in function.
8194	* gacopyz/gacopyz.c (do_connect): Ensure umask 0117 when binding
8195	the socket.
8196
8197	* doc/mailfromd.texi: Improve usage of @deffn.
8198	(System functions): Document umask.
8199
82002008-07-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8201
8202	Implement mailbox_append_message built-in function.
8203
8204	* NEWS, doc/mailfromd.texi: Document mailbox_append_message.  Document new
8205	semantics of `a' and `a+' in mailbox_open.
8206	* mfd/bi_msg.m4 (bi_message_from_descr): New function.
8207	* mfd/bi_body.m4 (current_message): Fix return value.
8208	* mfd/bi_mbox.m4 (mailbox_open): Discern between `a' and `a+'.
8209	(mailbox_append_message): New function.
8210	* mfd/msg.h (bi_message_from_descr): New prototype.
8211
82122008-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
8213
8214	* pies/pies.h: Include stdint.h * configure.ac: Fix checking for libresolv.
8215
82162008-06-22  Sergey Poznyakoff  <gray@gnu.org.ua>
8217
8218	Minor fixes.
8219
8220	* doc/mailfromd.texi: Fix a typo.
8221	* mfd/prog.c: Fix comment.
8222	* gacopyz/server.c: Fix erroneous range checking condition.
8223
82242008-05-15  Sergey Poznyakoff  <gray@gnu.org.ua>
8225
8226	Fixup C variables that point to dataseg after expanding it. Bug reported by Sergey Afonin.
8227
8228	* mfd/snarf.m4 (mf_c_argdcl): Produce only C declarations.
8229	(mf_c_arginit): New macro.
8230	(__mf_c_argdcl_list,__mf_c_arginit_list): New auxiliary macros.
8231	(__mf_c_arglist): Rewrite using the above macros.
8232	(mf_c_arglist,MF_VA_ARG): Reflect changes to get_.*_arg functions.
8233	* mfd/bi_sprintf.m4: Update invocations of MF_VA_ARG.
8234	* mfd/prog.c (struct eval_environ): New members auto_ptr and
8235	numautos.
8236	(env_register_auto, env_unregister_autos, env_fixup_autos): New
8237	functions.
8238	(expand_dataseg): Call env_fixup_autos.
8239	(get_literal, get_string_arg): Change signature. Call
8240	env_register_auto. All callers updated.
8241	(get_numeric_arg): Change signature for consistency with other
8242	get_ functions. All callers updated.
8243	(get_pointer_arg): New function.
8244	(eval_environment): Call env_unregister_autos after running each
8245	instruction.
8246	* mfd/prog.h (get_pointer_arg): New function.
8247	(get_string_arg, get_numeric_arg): Change prototypes.
8248	* mfd/bi_sieve.m4: Minor stylistic fix.
8249	* NEWS: Update.
8250
8251	* mfd/drivers.c (code_cast): Handle dtype_pointer
8252
82532008-04-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8254
8255	New builtins: message_size, message_body_size and message_header_size
8256
82572008-04-05  Sergey Poznyakoff  <gray@gnu.org.ua>
8258
8259	Version 4.9.92
8260
8261	svn:ignore .references
8262
8263	* mtasim/mtasim.c: New command line options --user and --group. * doc/mailfromd.texi, doc/mtasim.texi, NEWS: Update.
8264
8265	Introduce MU interface functions.
8266
8267	* mfd/bi_msg.m4, mfd/bi_mbox.m4, mfd/msg.h: New files.
8268	* mfd/Makefile.am: Add new files.
8269	* mfd/bi_string.m4 (substring): 3rd argument can be negative.
8270	* mfd/bi_body.m4 (current_message): New function.
8271	* NEWS: Update.
8272
82732008-04-02  Sergey Poznyakoff  <gray@gnu.org.ua>
8274
8275	* doc/mailfromd.texi: Document changes to prog body.
8276
8277	Add new MFL datatype `POINTER' and convert `body' handler to take first argument of that type. Provide a function for converting POINTER to STRING.
8278
8279	* mfd/Makefile.am (M4_FILES): Add bi_body.m4
8280	* mfd/bi_body.m4: New file.
8281
8282	* mfd/engine.c (mlfi_body): Pass bodyp as a generic pointer.
8283	* mfd/snarf.m4 (__mf_argtype, __mf_ctype, __mf_c_getarg)
8284	(__mf_printf_type): Handle new data type POINTER.
8285	* mfd/gram.y (state_parms): Change type of the first parameter
8286	to body to dtype_pointer.
8287	(cast_to): Handle dtype_pointer.
8288	* mfd/mailfromd.h (data_type_t): New type dtype_pointer.
8289	(env_push_pointer): New function.
8290	* mfd/prog.c (env_push_pointer): New function.
8291	* mfd/prog.h (get_pointer_arg): New macro.
8292	* NEWS: Update.
8293
8294	Bugfixes:
8295
8296	* mtasim/mtasim.c (get_input_line): Make sure the return line
8297	always terminates with a newline.
8298	(smtp): Remove erroneous break.
8299	* mfd/symtab.c (variable_replace): Maintain correct value of
8300	newvar->owner.
8301	* mfd/pp.c (push_source): Prevent coredump on the first call.
8302
83032008-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8304
8305	* doc/Makefile.am (check-refs, check-fixmes): Print correct locations for multiple input files. Return a meaningful error code. * TODO: Update.
8306
8307	Rewrite the bootstrap suite.
8308
8309	* README-alpha: Rewritten.
8310	* bootstrap.conf: Rewritten.
8311	* bootstrap: Slightly modified version from gnulib.
8312	* gnulib.modules, README-hacking: New files.
8313	* doc/mailfromd.texi: Minor fix.
8314
83152008-03-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8316
8317	Fix handling of handler/handler name clashes.
8318
8319	* mfd/drivers.c (code_type_progdecl): Warn if a header is
8320	redeclared.
8321	* doc/mailfromd.texi: Document resolving of handler/handler name
8322	clashes.
8323
83242008-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8325
8326	Added missing acknowledgments
8327
8328	Update
8329
8330	* mflib/strip_domain_part.mf, mflib/heloarg_test.mf, mflib/gettext.mf, mflib/valid_domain.mf, mflib/spf.mf, mflib/match_cidr.mf, mflib/is_ip.mf, mflib/safedb.mf4, mflib/dns.mf4: Indent using mfl-mode.
8331
8332	* mflib/match_dnsbl.mf, mflib/match_rhsbl.mf: Indent using
8333	mfl-mode. Remove m4 conditionals.
8334
8335	* mflib/strip_domain_part.mf, mflib/heloarg_test.mf, mflib/gettext.mf, mflib/valid_domain.mf, mflib/spf.mf, mflib/match_cidr.mf, mflib/is_ip.mf, mflib/safedb.mf4, mflib/dns.mf4: Indent using mfl-mode.
8336
8337	* mflib/match_dnsbl.mf, mflib/match_rhsbl.mf: Indent using
8338	mfl-mode. Remove m4 conditionals.
8339
8340	Port r1632 of branches/release_4_3_patches.
8341
83422008-03-05  Sergey Poznyakoff  <gray@gnu.org.ua>
8343
8344	Use ngettext
8345
83462008-03-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8347
8348	Minor fixes in translatable strings
8349
83502008-03-01  Sergey Poznyakoff  <gray@gnu.org.ua>
8351
8352	Ported r1619 from branches/release_4_3_patches.
8353
8354	* src/prog.c, src/prog.h (advance_pc): Fix type of the 2nd
8355	argument.
8356	* configure.ac: Use AC_TRY_LINK to check for libresolve.
8357	* THANKS: Update
8358	* NEWS: Update
8359
83602008-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
8361
8362	* pies/pies.c: New configuration statement "chdir". * pies/progman.c (struct prog.v.p): New member `dir'. (register_prog): Initialize newp->v.p.dir; (prog_start): Change to the working directory, if required by config.
8363
83642008-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8365
8366	Update
8367
8368	* mfd/main.c (mf_error_on_locus): Mark as printflike. (cb_milter_timeout): Fix format. (mf_cfg_param): Fix erroneous description of include-path.
8369
83702008-02-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8371
8372	Merged HEAD from branches/gmach
8373
8374	* README, configure.ac, NEWS: Update * src/version.c: Update copyright years. * doc/mailfromd.texi
8375
83762008-02-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8377
8378	* THANKS: Add Tom Lynch. Obfuscate email addresses.
8379
83802008-02-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8381
8382	* src/dnsbase.c: Define MAX, if necessary. * src/mailfromd.h: Define INADDR_NONE. * configure.ac: Check for librt. Add auth to AM_GNU_MAILUTILS. * gacopyz/gacopyz.c (do_connect): Fix typo. * bootstrap (MODLIST): Add vasprintf.
8383
8384	configure.ac: Check for libsocket and libnsl.
8385
8386	* src/dnsbase.c (dns_resolve_hostname,a_lookup): Change initialization of domainbuf. * src/syslog_async.c: Include fcntl.h.
8387
83882008-02-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8389
8390	* configure.ac: Check for locale.h * src/db.c, src/bi_sprintf.m4, src/prog.c, src/bi_db.m4, src/engine.c: Fix format arguments (ported from branches/gmach@{2008-01-28 and 2008-01-09). * src/main.c, src/mtasim.c: Include locale.h
8391
83922008-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8393
8394	* src/symtab.c: Ported r1584 from branches/gmach. * NEWS: Update. * doc/mailfromd.texi: Updated. * configure.ac: Version 4.3 (preparing for the release).
8395
83962008-01-15  Sergey Poznyakoff  <gray@gnu.org.ua>
8397
8398	Ported r1556 from branches/gmach.
8399
8400	* src/gram.y (DELETE string): Initialize hdr.value.
8401	* src/drivers.c (code_type_header): Value can be NULL.
8402
8403	Fix compatibility with MU CVS:
8404
8405	* src/main.c: Use mu_log_facility.
8406	* src/mtasim.c [MAILUTILS_VERSION_NUMBER > 1290]: Include
8407	gettext.h, define _ and N_.
8408	* configure.ac: Check for mu_log_facility.
8409
84102007-12-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8411
8412	* src/Makefile.am (libmf_a_DEPENDENCIES): Add BUILD_SYSLOG_ASYNC
8413
84142007-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8415
8416	(mf_cfg_param): Add docstrings.
8417
8418	Ported r1536 from branches/release_4_2_patches (= r1535 from tags/release_4_2):
8419
84202007-12-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8421
8422	Reflect recent changes to Mailutils.
8423
84242007-11-22  Sergey Poznyakoff  <gray@gnu.org.ua>
8425
8426	* src/main.c: Implement MU configuration statements. * tests/atlocal.in (MFOPTS): Ignore site-wide and per-user configuration files. * doc/mailfromd.texi: Document sieve interface.
8427
8428	Update
8429
84302007-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8431
8432	* src/bi_io.m4 (write): Implement optional third argument. * src/bi_sieve.m4: New file. * src/mailfromd.h (vlogmsg): New proto. * src/main.c (capa): Request "common" capability. (main): Register all mailbox formats (needed for sieve). * src/Makefile.am (M4_FILES): Add bi_sieve.m4 * src/mtasim.c (process_header): chop trailing newline. * mflib/sieve.mfh: New file. * mflib/Makefile.am (inc_DATA): Add sieve.mfh. * configure.ac: Set patchlevel 90. (AM_GNU_MAILUTILS): Request 'all' and 'sieve' link flags. * doc/mailfromd.texi: Document 3rd argument of write. * NEWS: Update.
8433
8434	* src/bi_io.m4 (write): Implement optional third argument. * src/bi_sieve.m4: New file. * src/mailfromd.h (vlogmsg): New proto. * src/main.c (capa): Request "common" capability. (main): Register all mailbox formats (needed for sieve). * src/Makefile.am (M4_FILES): Add bi_sieve.m4 * src/mtasim.c (process_header): chop trailing newline. * mflib/sieve.mfh: New file. * mflib/Makefile.am (inc_DATA): Add sieve.mfh. * configure.ac: Set patchlevel 90. (AM_GNU_MAILUTILS): Request 'all' and 'sieve' link flags. * doc/mailfromd.texi: Document 3rd argument of write. * NEWS: Update.
8435
84362007-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>
8437
8438	* README-alpha: Update * configure.ac: Use AM_GNU_MAILUTILS. * acinclude.m4: Minor fix.
8439
8440	* smap: New directory. * smap/smap.c: New file. A general-purpose socket map for MeTA1 (for future use).
8441
8442	* src/mu_dbm.c [WITH_GDBM]: do not bail out if the database does not exist. * src/mailfromd.h: Add argp.h * src/bi_sa.m4: Minor fixes. * src/main.c: Support for Mailutils CVS HEAD. * configure.ac: Likewise.
8443
84442007-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8445
8446	* src/engine.c (check_on_host): Wait for an answer to QUIT. Fix courtesy of Nacho Gonzalez Lopez. * src/bi_sa.m4: Revert the changes inadvertently pushed on 2007-10-21. * doc/Makefile.am: Use texi2html to produce HTML version of the manual. * doc/gendocs_template: Likewise * doc/gendocs.sh: Remove. Changes incorporated into the Texinfo repository. * doc/gendocs_template: Use conditionals, introduced in the Texinfo CVS.
8447
84482007-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
8449
8450	(domain_name_cmp): Yet another bugfix
8451
84522007-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
8453
8454	(domain_name_cmp): Allow for trailing dot after domain.
8455
84562007-10-23  Sergey Poznyakoff  <gray@gnu.org.ua>
8457
8458	Generate html docs using texi2html
8459
8460	Reimplement syslog-async. Thanks Simon Kelley for relicensing it under GPLv3.
8461
84622007-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8463
8464	s/assing_locus/assign_locus/
8465
8466	* src/dnsbase.c (cname_loop_body): Return TXT only if explicitly required. Bug reported by Jan Rafaj.
8467
8468	* src/engine.c: Fix timeout calculations (struct timeout_ctl): New data type (UPDATE_TTW,smtp_stream_wait,smtp_wait): Operate on struct timeout_ctl. All callers updated. (init_timeout_ctl): New function.
8469
84702007-10-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8471
8472	Update
8473
8474	* src/mtasim.c (_def_read): Return 0 if zero bytes were read (get_input_line): Fix counting of input bytes. (smtp): Fix checking for returns from process_data_reply. * gacopyz/server.c (srv_format_macros): Do not add trailing zero to the packet.
8475
84762007-10-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8477
8478	* src/mailfromd.h [!ENABLE_NLS] (bindtextdomain): Fix definition. * src/cache.c (cache_get2): Fix misplaced variable definition.
8479
8480	* src/dnsbase.c (dns_resolve_hostname): Remove stray free, left over after 2007-09-03.
8481
84822007-09-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8483
8484	Bugfix
8485
8486	Fix MU version detection
8487
84882007-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8489
8490	(log_setup): Set up gacopyz_syslog_log_printer when logging to syslog.
8491
84922007-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8493
8494	* src/mu_dbm.c [WITH_GDBM] (mu_dbm_firstkey,mu_dbm_nextkey): Return MU_ERR_NOENT instead of MU_ERR_FAILURE. * src/mailfromd.h (get_rate): New argument mincount * src/rate.c: Likewise * src/bi_other.m4 (rate): Optional argument mincnt * src/mtasim.c: Accept MAIL FROM: and RCPT TO: without extra space after `:'. * doc/mailfromd.texi, NEWS: Update
8495
84962007-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8497
8498	Update
8499
85002007-09-03  Sergey Poznyakoff  <gray@gnu.org.ua>
8501
8502	Update
8503
8504	* src/dnsbase.c (dns_resolve_hostname): Make name buffer big enough to hold eventual CNAME expansions. Reporte by Jan Rafaj. * configure.ac: Improve to compile with the latest MU CVS.
8505
85062007-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8507
8508	Update
8509
8510	Update
8511
85122007-08-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8513
8514	Update
8515
8516	(a_lookup): Make name buffer big enough to hold eventual CNAME expansions.
8517
8518	Update
8519
8520	* src/gram.y (on_cond): Fix coredump if target address is not specified. (vardecl): Signal error if an auto variable is doubly defined. * tests/testsuite.at (EX_OK--EX_CONFIG): New defines (MF_CHECK_TEXT): New macro Add poll04.at and ashadow.at * tests/ashadow.at, tests/poll04.at: New files * doc/mailfromd.texi: Minor fixes
8521
85222007-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8523
8524	Use URL instead of FSF address in copyright statements
8525
8526	Update
8527
8528	Update
8529
85302007-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
8531
8532	Relicense under the GPLv3
8533
85342007-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8535
8536	Minor fixes
8537
8538	Bugfixes
8539
85402007-06-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8541
8542	Version 4.1
8543
8544	(next_line): Bugfix
8545
85462007-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
8547
8548	Update
8549
85502007-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8551
8552	Update
8553
85542007-06-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8555
8556	Update
8557
85582007-06-01  Sergey Poznyakoff  <gray@gnu.org.ua>
8559
8560	Fix line counting within here-documents
8561
85622007-05-29  Sergey Poznyakoff  <gray@gnu.org.ua>
8563
8564	Update
8565
8566	Update
8567
8568	Bugfixes
8569
8570	Update
8571
85722007-05-27  Sergey Poznyakoff  <gray@gnu.org.ua>
8573
8574	Improve mfl-mode
8575
85762007-05-26  Sergey Poznyakoff  <gray@gnu.org.ua>
8577
8578	Initial implementation
8579
8580	Add framework for Emacs MFL Major Mode
8581
85822007-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8583
8584	Minor fix
8585
8586	Minor fix
8587
8588	Lots of critical bugfixes
8589
85902007-05-24  Sergey Poznyakoff  <gray@gnu.org.ua>
8591
8592	Minor rename/cleanup
8593
8594	Further fixes
8595
8596	Improve docs
8597
8598	Implement NLS support
8599
8600	Finish implementing sprintf
8601
8602	Almost implemented sprintf
8603
86042007-05-23  Sergey Poznyakoff  <gray@gnu.org.ua>
8605
8606	Support for built-in functions with varying number of arguments. Implement a limited version of sprintf.
8607
8608	Update
8609
86102007-05-22  Sergey Poznyakoff  <gray@gnu.org.ua>
8611
8612	Build mflib/dns.mf and mflib/safedb.mf from M4 sources
8613
8614	Discontinue supporting &code (specifying an exception code) Implement $# and @parm, which expands to the ordinal number of a parameter:
8615
8616	  func foo(string x ; number y)
8617	  do
8618	      echo @y
8619	  done
8620
8621	gives 1.
8622
8623	(__mf_defined_argname): Bugfix
8624
8625	Add missing comments
8626
8627	Arguments are passed in the same order for both built-in and MFL-level functions.
8628
8629	If a builtin takes optional arguments, the actual number of arguments is
8630	passed in a hidden first argument.  This allows to discern between zero
8631	arguments (emtpy strings) and absent arguments.
8632
86332007-05-20  Sergey Poznyakoff  <gray@gnu.org.ua>
8634
8635	Bugfixes
8636
8637	Improve external preprocessor usage
8638
8639	Bugfix
8640
8641	Implement built-in and external preprocessors
8642
8643	Update
8644
8645	(listens_on): port argument was ignored
8646
86472007-05-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8648
8649	Fix a typo
8650
86512007-05-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8652
8653	Update
8654
8655	(listens): Bugfix
8656
8657	Update
8658
8659	Set exec property
8660
8661	 Get translations from the TP.
8662
8663	Generated automatically
8664
8665	Move to po repository
8666
8667	Move to po repository
8668
86692007-05-16  Sergey Poznyakoff  <gray@gnu.org.ua>
8670
8671	Update
8672
8673	Add missing NLS markers
8674
8675	Save namespace from pollution: Use m4_ prefixed keywords.
8676
8677	Update
8678
8679	Update
8680
8681	(mailfromd_daemon): Leave the first three descriptors open before attemtping to restart
8682
8683	(instr_symbol): Add missing NLS marker.
8684
8685	(EXTRA_DIST): Add daemon.c
8686
8687	Fix typo
8688
86892007-05-15  Sergey Poznyakoff  <gray@gnu.org.ua>
8690
8691	(debug_level_p): Change logic so that per-module specification takes precedence over the global one
8692
8693	NLS-related fixes; Version no. 4.0.90
8694
86952007-05-14  Sergey Poznyakoff  <gray@gnu.org.ua>
8696
8697	Update
8698
8699	Update
8700
87012007-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8702
8703	Forgotten autopoint
8704
8705	Mailfromd goes international
8706
87072007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8708
8709	Remove the note about the openat-die patch.  It is already in gnulib
8710
8711	Add release date
8712
8713	Fix typo
8714
8715	Final update
8716
8717	Update for the recent gnulib changes
8718
87192007-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8720
8721	start cindexes with a lower case letter
8722
8723	Change svn:ignore
8724
8725	Use new version output format. Prepare for 4.0
8726
87272007-05-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8728
8729	Minor fixes
8730
87312007-05-08  Sergey Poznyakoff  <gray@gnu.org.ua>
8732
8733	Bugfix
8734
8735	[WITH_BDB] (mu_dbm_open): Locking mode depends on the open flags.
8736
87372007-05-06  Sergey Poznyakoff  <gray@gnu.org.ua>
8738
8739	Update
8740
8741	Update
8742
8743	update
8744
87452007-05-05  Sergey Poznyakoff  <gray@gnu.org.ua>
8746
8747	Update
8748
8749	Fixup pidfile and portspec according to state directory settings
8750
8751	Fix overfull boxes
8752
8753	Update
8754
8755	Update
8756
87572007-05-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8758
8759	Update
8760
8761	Fixes
8762
8763	SIGHUP instructs `mailfromd' to restart itself. Remove UNIX socket after closing it.
8764
87652007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
8766
8767	Update
8768
8769	(mu_dbm_strerror): Improve error logging
8770
87712007-05-01  Sergey Poznyakoff  <gray@gnu.org.ua>
8772
8773	(lock_file): fcntl can return non-null values. Retry if F_GETLK returns F_UNLCK (mu_dbm_open): Always use O_RDWR if the file could need to be locked for writing afterwards.
8774
8775	Fixes
8776
8777	Ensure begin blocks can set exception handlers
8778
87792007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
8780
8781	Fix typo
8782
8783	Use inner context to check for action usage in begin/end blocks.  This allows to define global catches.
8784
8785	Update
8786
8787	Update
8788
87892007-04-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8790
8791	Minor wording fixes
8792
8793	fix typo
8794
8795	Bugfixes
8796
87972007-04-27  Sergey Poznyakoff  <gray@gnu.org.ua>
8798
8799	update
8800
8801	Implement begin/end statements.  Allow to disable/enable caching
8802
8803	Improve locking algorithm
8804
88052007-04-26  Sergey Poznyakoff  <gray@gnu.org.ua>
8806
8807	Fix typo
8808
8809	Update
8810
8811	Shut up gcc warnings and fix minor issues
8812
88132007-04-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8814
8815	Fix typos
8816
8817		* NEWS: Update 	* src/lex.l (parse_require): Bugfix 	* mflib/heloarg_test.mf, mflib/spf.mf: Begin the names of the static 	functions with __ 	* doc/Makefile.am (check-refs): Scan all texi sources 	(check-mflib): Ignore static names (__.*) 	* doc/mailfromd.texi, doc/mtasim.texi, doc/macros.texi: Update.
8818
8819	update
8820
88212007-04-24  Sergey Poznyakoff  <gray@gnu.org.ua>
8822
8823		* src/lex.l (parse_require): Bugfix 	* src/bi_mail.m4: Bugfix 	* src/mtasim.c: Implement help, fix directory removal at exit, 	implement readline history file.  Bugfixes in smtp() 	* tests/testsuite.at, tests/accept.at, tests/greylist.at, 	tests/arg.at, tests/reject.at, tests/numrcpt.at, 	tests/tempfail.at: Use mtasim -Xauto when necessary 	* configure.ac, NEWS: Raise patchlevel to 92 	* doc/mailfromd.texi: Update 	* doc/mtasim.texi: mtasim documentation 	* doc/Makefile.am: Add mtasim.texi 	* gacopyz/gacopyz_priv.h (struct gacopyz_conn): Keep information 	about children pids 	* gacopyz/proc.c (gacopyz_register_child) 	(gacopyz_unregister_child): New functions 	(cleanup_children): Call gacopyz_unregister_child 	(gacopyz_cleanup_conn): Terminate children individualy instead of 	sending TERM to the whole process group, because we might be not 	the group leader. 	* gacopyz/gacopyz.c (gacopyz_handle_connection): Register child 	pid after startup. 	* bootstrap: Require save-cwd.  Test if lib/daemon.c exists before 	attempting to create it.
8824
88252007-04-23  Sergey Poznyakoff  <gray@gnu.org.ua>
8826
8827	implement mtasim --port=auto
8828
8829	Update
8830
8831	update
8832
8833	Introduce the module system
8834
88352007-04-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8836
8837	update
8838
8839	Reimplement debugging macros and supporting functions
8840
8841	Provide a patch for Sendmail to honor extended codes and textual messages returned by the connect handler.
8842
8843	Improve logging
8844
88452007-04-20  Sergey Poznyakoff  <gray@gnu.org.ua>
8846
8847	Implement asyncronous syslog
8848
88492007-04-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8850
8851	Fix typo
8852
8853	Document new macros
8854
8855	When possible lock BDB databases directly. For version 2.x fall back to external lock method. Fix handling of optional variables in built-in functions.
8856
8857	Implement stack traces
8858
8859	Update
8860
8861	Use <> in #include statements
8862
88632007-04-17  Sergey Poznyakoff  <gray@gnu.org.ua>
8864
8865	Bug fixes
8866
88672007-04-16  Sergey Poznyakoff  <gray@gnu.org.ua>
8868
8869	Fix Milter packet length calculation & redo Berkeley DB locking
8870
8871	Update
8872
8873	(instr_restex): Fix stack addressing (broken after 2007-04-01).  Add trace output.
8874
88752007-04-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8876
8877	Re-implement database locking for Berkeley DB
8878
8879	        * src/mu_dbm.c, src/mu_dbm.h (mu_dbm_strerror): New function         (mu_dbm_firstkey, mu_dbm_nextkey): Change signature 	* src/dnscache.c, src/db.c, src/cache.c, src/rate.c, 	src/bi_db.m4: Update for new mu_dbm interface.
8880
88812007-04-11  Sergey Poznyakoff  <gray@gnu.org.ua>
8882
8883	Provide a special exception type for unresolved sendmail macros.
8884
88852007-04-04  Sergey Poznyakoff  <gray@gnu.org.ua>
8886
8887	Document SPF functions
8888
8889	Update
8890
88912007-04-03  Sergey Poznyakoff  <gray@gnu.org.ua>
8892
8893	(mlfi_connect): Fix invocation of a wrong header
8894
8895	(mlfi_abort): Do not call filter_cleanup
8896
8897	(env_final_gc): Top heap limit is inclusive
8898
8899	Bug fixes
8900
8901	Minor fix
8902
8903	Bugfixes
8904
89052007-04-02  Sergey Poznyakoff  <gray@gnu.org.ua>
8906
8907		* src/gram.y (loop_parm): Is a stmtlist 	* src/prog.c (instr_echo): Pop the argument
8908
89092007-04-01  Sergey Poznyakoff  <gray@gnu.org.ua>
8910
8911	Implement loop statement
8912
8913	(s_off_cmp): Revert sorting order to match that of heap growth.
8914
8915	Minor changes
8916
8917	Update
8918
8919	Revert stack growth direction. Expand stack as the need arises.
8920
8921	(dataseg_layout): Make sure all global variables are subject to final_gc
8922
89232007-03-31  Sergey Poznyakoff  <gray@gnu.org.ua>
8924
8925	Switch to flat address space model. Data space (and stack) contain only references to objects within the data space (virtual addresses), no actual pointers are passed.
8926
8927	* src/snarf.m4 (MF_ALLOC_HEAP, MF_COPY_STRING): Take two arguments
8928	(MF_BEGIN_TEMP_SPACE): Use env_data_ref
8929	(MF_VAR_SET_STRING): New macro
8930	* src/bi_poll.m4, src/bi_string.m4, src/bi_dns.m4, src/bi_spf.m4,
8931	src/bi_sa.m4, src/bi_vars.m4, src/bi_db.m4: Use new heap
8932	allocation macros.
8933	* src/drivers.c (code_memref, code_type_string): Use opcode_push
8934	(code_type_variable): Remove opcode_svalidate. This time for good
8935	* src/mailfromd.h (env_throw_0): Change signature
8936	* src/prog.c (struct eval_environ.stack): Remove. Use plain
8937	addressing model. All references updated.
8938	(env_reference,env_var_ref): Remove
8939	(heap_reserve_words, heap_reserve): Return offset into the data
8940	space instead of the pointer. All uses updated.
8941	(env_data_ref): New function
8942	* src/opcodes (MEMEXT,MEM,SVALIDATE): Remove
8943	* src/prog.h (env_data_ref): New function
8944	(heap_reserve_words): New function
8945	(heap_reserve): Return size_t
8946	* TODO: Update
8947
8948	Use different argument accessors for different argument types
8949
8950	(_fixup): Set .compile
8951
8952	Update svn:ignore
8953
8954	Reverted unintentionally applied changes
8955
8956	Update svn:ignore
8957
8958	Update svn:ignore
8959
8960	Use reserved rt_regex slots for dynamically compiled regular expressions.
8961
89622007-03-28  Sergey Poznyakoff  <gray@gnu.org.ua>
8963
8964	mtasim supports standard options
8965
8966	mtasim supports standard options
8967
8968	Update
8969
8970	Prepare the instruction set for array data type: remove PUSH_LITERAL, PUSH_IMMEDIATE, VARIABLE, AUTO, ARG; introduce instead MEM, MEMSTK, MEMEXT, DEREF; Change semantics of ASGN
8971
8972	Update
8973
8974	Update
8975
89762007-03-27  Sergey Poznyakoff  <gray@gnu.org.ua>
8977
8978	Bugfix
8979
8980	Reimplement pre-compiled regular expressions
8981
89822007-03-24  Sergey Poznyakoff  <gray@gnu.org.ua>
8983
8984	Update
8985
8986	Update
8987
8988	Updat
8989
8990	Switch to Autotest based testsuite
8991
89922007-03-22  Sergey Poznyakoff  <gray@gnu.org.ua>
8993
8994	Remove `next' node type
8995
8996	Rework code generation rules
8997
89982007-03-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8999
9000	New built-in getmx
9001
9002	Minor fix
9003
9004	(open_connection): Raise mf_url if unknown protocol is specified in the URL.
9005
9006	(mx_match): Do not raise exception if mf_not_found is returned.
9007
90082007-03-20  Sergey Poznyakoff  <gray@gnu.org.ua>
9009
9010	Update
9011
9012	(state_parms.types): Fix dimensions
9013
90142007-03-19  Sergey Poznyakoff  <gray@gnu.org.ua>
9015
9016	Update
9017
9018	Implement connect handler. Pass additional argument to envfrom and envrcpt
9019
9020	Testsuite uses mtasim instead of sendmail
9021
9022	Update
9023
9024	Implement db_name
9025
90262007-03-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9027
9028	Implement `#pragma regex push|pop'
9029
9030		* configure.ac, Makefile.am: Add mflib 	* NEWS: Update
9031
9032		* mflib: New subdirectory
9033		* mflib/match_dnsbl.mf, mflib/strip_domain_part.mf,
9034		mflib/heloarg_test.mf, mflib/is_ip.mf, mflib/safedb.mf,
9035		mflib/mx.mf, mflib/dns.mf, mflib/revip.mf, mflib/valid_domain.mf,
9036		mflib/match_rhsbl.mf, mflib/spf.mf, mflib/Makefile.am,
9037		mflib/match_cidr.mf: New files
9038
9039		* doc/Makefile.am: Remove extract.awk
9040		* doc/extract.awk: Remove
9041		* doc/mailfromd.texi: Update
9042
9043		* src/symtab.c, src/gram.y, src/mailfromd.h: Implement optional
9044		arguments for user functions
9045		* src/lex.l: Implement #include_once
9046		* src/prog.c (name_destroy): Free the object
9047		* src/bi_ipaddr.m4 (match_cidr): Remove. The function is
9048		implemented in MFL (mflib/match_cidr.mf)
9049
9050		* testsuite/lib/mailfromd.exp, testsuite/etc/cidr.rc,
9051		testsuite/etc/catch.rc, testsuite/etc/catch01.rc,
9052		etc/mailfromd.rc: Use includes when necessary
9053
9054		* src/snarf.m4, src/bi_dns.m4, src/bi_dns.m4, src/bi_sa.m4, 	src/bi_other.m4, src/bi_mail.m4, src/bi_db.m4: Use MF_THROW 	instead of MF_CATCH
9055
9056		* src/gram.y, src/mailfromd.h,  src/prog.c, src/opcodes,
9057		src/prog.h, TODO: Provide access for outermost auto variables and
9058		parameters from catch blocks.
9059
9060		* testsuite/etc/hasmx.rc, testsuite/etc/dns.rc: Use primitive_
9061		functions.
9062
90632007-03-17  Sergey Poznyakoff  <gray@gnu.org.ua>
9064
9065		* src/lex.l, src/gram.y, src/mailfromd.h, src/prog.c, 	src/opcodes: Implement throw statement 	* src/bi_dns.m4 (match_cidr): Move into bi_ipaddr.m4 	* src/bi_ipaddr.m4: New module 	* src/Makefile.am: Add bi_ipaddr.m4 	* doc/mailfromd.texi: Initial doc for IP functions 	* NEWS: Update
9066
90672007-03-15  Sergey Poznyakoff  <gray@gnu.org.ua>
9068
9069		* src/dnsbase.c (comp_pref): Secondary ordering by MX name 	* src/main.c, testsuite/lib/mailfromd.exp, doc/mailfromd.texi: 	Discontinue support for the old semantics of options -c, -l and -L. 	* doc/Makefile.am (check-exceptions): Fix the rule 	* NEWS: Update
9070
9071	Minor stylistic and bug fixes
9072
90732007-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
9074
9075	Update
9076
90772007-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9078
9079	Update
9080
90812007-03-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9082
9083	* src/engine.c, src/gram.y, src/mailfromd.h: Implement prog data * src/mtasim.c: Implement headers * gacopyz/gacopyz_priv.h, gacopyz/gacopyz.c: Fix processing of data and eoh * gacopyz/server.c: Implement most of the stuff
9084
9085	Implement mail from and rcpt to
9086
90872007-03-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9088
9089		* src/Makefile.am: Allow to specify the m4 binary.
9090
9091		* src/prog.c (env_push_string): Use pushs. This makes sure that
9092		the handler arguments are allocated in heap, which is necessary
9093		for normal functioning of the gc.
9094		* src/engine.c (mlfi_body): Pass bodyp as number. This is a
9095		temporary kludge.
9096		* testsuite/etc/ack.rc: The above change needs extra 2 words for
9097		the stack allocation.
9098
9099		* NEWS: Update
9100
91012007-03-02  Sergey Poznyakoff  <gray@gnu.org.ua>
9102
9103	Update
9104
9105	Fix builtin context checks and implement the same for functions
9106
9107	Update svn:ignore
9108
9109	Start implementing test MTA simulator and Gacopyz server code
9110
91112007-02-27  Sergey Poznyakoff  <gray@gnu.org.ua>
9112
9113	Bugfix
9114
91152007-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>
9116
9117	Update
9118
91192007-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9120
9121	Limit include/redirect recursion
9122
9123	* src/spf.c (spf_data): Add mech (parse_record): Always allocate expr_space * src/bi_spf.m4 (update_spf_vars): Bugfix * src/prog.c (instr_backref): Allow to reference optional groups * src/Makefile.am (noinst_HEADERS): Add spf.h
9124
9125	* src/lex.l: New built-in macro __statedir__ * NEWS: Update * src/mailfrom.h: Finally renamed to * src/mailfromd.h: this
9126
9127	Affected files:
9128
9129	* src/symtab.c, src/mu_dbm.c, src/engine.c, src/snarf.m4,
9130	src/dnscache.c, src/gram.y, src/dnsbase.c, src/dns.c, src/db.c,
9131	src/spf.c, src/spf.h, src/cache.c, src/optab.opc, src/prog.c,
9132	src/mf-status.mfi, src/main.c, src/Makefile.am, src/rate.c
9133
91342007-02-20  Sergey Poznyakoff  <gray@gnu.org.ua>
9135
9136	src/gram.y (constdecl): Return NULL. Fixes coredump if const is used within a code block.
9137
91382007-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>
9139
9140	* src/mailfrom.h (node_type_noop): New node type * src/gram.y: Allow declarations of initialized variables. (print_node) <node_type_return>: Fix coredump on void returns (optimize_node): Fix coredump on `if 0 <expr>'
9141
9142	* src/mailfrom.h (node_type_noop): New node type * src/gram.y: Allow declarations of initialized variables. (print_node) <node_type_return>: Fix coredump on void returns (optimize_node): Fix coredump on `if 0 <expr>'
9143
9144	Minor fixes
9145
9146	Update
9147
9148	Change handling of modifiers
9149
9150	Change calling convention for the interface functions (spf_query_t, spf_answer_t); fix IP address comparisons; implement builtin spf variables
9151
9152	Syntax cleanup
9153
91542007-02-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9155
9156	Implement all SPF modifiers, improve debugging.
9157
91582007-02-17  Sergey Poznyakoff  <gray@gnu.org.ua>
9159
9160	Implement all SPF mechanisms
9161
9162	Implement A. Allow mechanisms followed by /
9163
9164	Begin implementing SPF support
9165
91662007-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
9167
9168	gacopyz/trans.awk: Always quote /dev/stderr
9169
91702007-02-08  Sergey Poznyakoff  <gray@gnu.org.ua>
9171
9172	Update
9173
9174	Move version control under SVN. Remove .cvsignore files.
9175
91762007-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>
9177
9178	Update
9179
9180	Change deprecation warning.
9181
9182	Update copyright statements
9183
9184	Update
9185
9186	(mailfromd_daemon): Improve logging
9187
9188	(gacopyz_cleanup_conn): Print debugging message; Do not display spurious 'signal 15' messages
9189
9190	Update
9191
9192	Hide deprecated command line options
9193
9194	Update
9195
9196	Use DEFAULT_FROM_ADDRESS
9197
9198	(DEFAULT_FROM_ADDRESS): New define
9199
9200	(builtin_post_setup): Use string_alloc to allocate literals
9201
9202	Update
9203
9204	 (scan_code): Remove special handling for xlat(s)
9205
9206	(XLAT, XLATS): instruction data has 2 words
9207
9208	(struct switch_stmt): Additional fields to help code generation
9209
9210	Store xlat tables in the data segment.
9211
9212	Update
9213
9214	(struct optab): New data type (scan_code): New function (prog): extern decl
9215
9216	(prog): Remove static qualifier (code_op): New function (dump_*): Change number of arguments (optab,find_op): Remove (dump_code): Rewrite using scan_code (fixup_code): New function (print_code): Rewrite using dump_code
9217
9218	Indicate c mode for emacs.
9219
9220	(main): Call fixup code
9221
9222	(instr_*): Remove prototypes.  (code_op, fixup_code): New prototypes.
9223
9224	Use code_op instead of code_instr
9225
9226	Add optab.opc, optab.oph, opcode.awk
9227
92282007-01-22  Sergey Poznyakoff  <gray@gnu.org.ua>
9229
9230	Update
9231
9232	Print informative warning messages where (pragma or command line option) ehlo or mailfrom is used
9233
9234	(parse_warning,parse_warning_locus): New functions
9235
9236	Use parse_warning where appropriate
9237
9238	Remove pragma option mailfrom and ehlo
9239
92402007-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9241
9242	(smtp_domain,postmaster_email): Remove --ehlo and --mailfrom deprecated
9243
9244	Update
9245
9246	Update
9247
9248	Update invocations of mailfromd
9249
9250	(union symentry): Remove v.db (free_symbols): New function (db_format_install, db_format_lookup): Remove. Reimplement in db.c
9251
9252	minor fixes
9253
9254	(options, parse_opt): New option -v (mailfromd_expire, mailfromd_compact) (mailfromd_show_defaults): Use db_format_enumerate instead of symbol_enumerate (main): Free symbol and string space after compiling the script.
9255
9256	(struct old_header_node.name): const (SYM_DB_FORMAT): Remove macro (free_symbols,defer_initialize_variable,free_string_space) (db_format_enumerate): New functions.
9257
9258	(free_string_space, mf_strdup): New functions
9259
9260	Provide for deferred variable initialization (to initialize variables from the command line).
9261
9262	(MLFIPRIV): Remove unused macro. Use gacopyz_calls instead of smfi_ ones, except for initialization functions
9263
9264	(_resolve_ipstr): Always copy ipstr to namebuf
9265
9266	(db_format_enumerate, db_format_install) (db_format_lookup): New functions
9267
9268	Minor fixes.
9269
9270	(gacopyz_setpriv, gacopyz_getpriv): New functions.
9271
9272	(smfi_setpriv, smfi_getpriv): Rename to gacopyz_*
9273
92742007-01-19  Sergey Poznyakoff  <gray@gnu.org.ua>
9275
9276	Update
9277
9278	(struct optab): Fix opname for instr_asgn (env_final_gc): Bugfix
9279
9280	Update
9281
9282	Update
9283
9284	(instr_variable): Print more trace info (instr_svalidate): Restore - synch with 3.1 branch.
9285
9286	(main): Remove call to builtin_post_setup.
9287
9288	Warn about legacy constant usage only once Implement #error.
9289
9290	(asgn:): Remove erroneous flag assignement (branch:): Warn about legacy constant usage only once (LOCUS_EQ): Moved to mailfrom.h (code_node): Restore svalidate - synch with 3.1 branch. Call MARK_LOCUS under node_type_result
9291
9292	(check-exceptions): Fix rule
9293
92942007-01-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9295
9296	Update
9297
9298	(struct stmtlist): New data type
9299
9300	Do not compile autogenerated functions at once. Expand unprefixed named constants only when a value is expected
9301
93022007-01-17  Sergey Poznyakoff  <gray@gnu.org.ua>
9303
9304	Update
9305
9306	Update include path
9307
9308	Include <status.mfh>, do not use &const.
9309
9310	(post_parse): Remove
9311
9312	(string_off,string_count): Removed. Relocation table is used instead.
9313
9314	(lex_setup): Change default include path Issue deprecation warning if &const is used. Allow to use constants both in the program text and in literals
9315
9316	(string: STRING): Fix incorrect argument to parse_error (parse_program): Remove call to post_parse (branch: WHEN): Issue deprecation warning if &const is used. (string_to_stat, mf_status_str): Defined in separate source
9317
9318	(mf_resolve): Rename to mf_noresolve
9319
9320	*** empty log message ***
9321
9322	(status.mfh, mf-status.c): New built sources
9323
9324	Raise patchlevel to 91
9325
93262007-01-15  Sergey Poznyakoff  <gray@gnu.org.ua>
9327
9328	Update copyright year
9329
93302007-01-14  Sergey Poznyakoff  <gray@gnu.org.ua>
9331
9332	Store  locus.file in the dataseg
9333
9334	Update
9335
9336	Minor change
9337
9338	Implement const declarations
9339
93402007-01-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9341
9342	Update
9343
9344	(string_alloc,string_finish): Return literal
9345
9346	Use literals instead of string pointers. Each string reference in the resulting program should point within the current stack or data space (except for the values of Sendmail macros).
9347
9348	(builtin_post_setup): Change initialization of ehlo_domain and mailfrom_address.
9349
9350	Minor fixes
9351
9352	(VBUFSIZE): Rename to GACOPYZ_VBUFSIZE (format_vbuf): Rename to gacopyz_format_vbuf; make extern
9353
9354	(GACOPYZ_VBUFSIZE): New define (gacopyz_format_vbuf): New decl
9355
93562007-01-06  Sergey Poznyakoff  <gray@gnu.org.ua>
9357
9358	Update
9359
9360	(B2STACK): New macro (moved from prog.c) (variable_declared_p,declare_variable): Removed (ensure_initialized_variable): New function (dataseg,datasize,dataseg_reloc,dataseg_reloc_count): New externs
9361
9362	Redo data segment initialization and handling. (dataseg,datasize,dataseg_reloc,dataseg_reloc_count): New variables. (struct eval_environ.var): Rename to dataseg.
9363
9364	Put string values initially assigned to the variables into the data segment. Redo its planning. Process only variables marked as volatile (built-in) or as referenced. (builtin_variable_install): Initialize flags. (vardecl): Remove initialization of var->off (externdecl): Change declaration. (initialize_variable,ensure_initialized_variable) (dataseg_layout): New functions
9365
9366	(builtin_post_setup): Change initialization of ehlo_domain and mailfrom_address built-in variables.
9367
93682007-01-04  Sergey Poznyakoff  <gray@gnu.org.ua>
9369
9370	Update
9371
9372	Add new testcase
9373
9374	(init_variable): New function (variable_install): Use init_variable (variable_replace): New function
9375
9376	(enum lexical_context): New data type. (struct catch_node.context): New field (struct progdecl, struct funcdecl): New data types. (enum node_type): Add new types: node_type_funcdecl and node_type_progdecl. (struct node.v): New members progdecl and funcdecl (VAR_REFERENCED): New macros (struct variable): New fields next and owner (variable_replace): New function
9377
9378	New keyword `const'. (parse_error,parse_error_locus): Increase buffer size to 512.
9379
9380	First build the entire tree, than compile it at once. Fix varaible shadowing. Reorganize lexical tie-ins.
9381
9382	(smtp_last_received): Remove superfluous conditional (method_strict,method_standard): Set last_poll_* variables to "", not NULL
9383
93842006-12-27  Sergey Poznyakoff  <gray@gnu.org.ua>
9385
9386	Update
9387
9388	Fix typo
9389
93902006-12-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9391
9392	Update
9393
9394	 (option_deprecated): mark as warning
9395
9396	(check_on_host): Issue RSET if the previous MAIL FROM returned 4xx (mlfi_helo): Push malloced copy of helohost
9397
9398	(unfold) new function
9399
9400	Do not quote DEFAULT_LOG_FACILITY
9401
94022006-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9403
9404	Update
9405
9406	(message_header_decode, message_header_encode): New functions.
9407
94082006-12-15  Sergey Poznyakoff  <gray@gnu.org.ua>
9409
9410	(resolve_ipstr_domain): New function
9411
9412	Allow `==' as well as `='
9413
9414	(is_ipaddr): Stricter check (struct loop_data.atype): New member (cnameloop): Return the type of obtained answer in atype (_resolve_ipstr): Additional argument: domain to look up into. If not NULL, the ipstr is not reversed (resolve_ipstr_domain): New function (resolve_ipstr): Rewrite using resolve_ipstr_domain (_resolve_hostname): Convert IP to string if gotten T_A. All callers updated.
9415
9416	(resolve): Take an optional second argument
9417
9418	Update
9419
9420	Update
9421
9422	Capitalize diagnostics messages
9423
9424	Update
9425
9426	(switch_to_privs): Refuse to run as root
9427
9428	Fix typo
9429
94302006-12-14  Sergey Poznyakoff  <gray@gnu.org.ua>
9431
9432	(main): Set log_facility
9433
9434	Update
9435
9436	New configuration variable DEFAULT_LOG_FACILITY
9437
9438	Update
9439
9440	Revert accidental commit
9441
9442	Fix the previous patch
9443
9444	Update
9445
9446	Update
9447
9448	Allow any amount of whitespace between the function name and the opening parenthesis.
9449
94502006-12-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9451
9452	Synchronization with 3.1 branch
9453
94542006-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9455
9456	Update
9457
9458	(get_rate): Bug fix: attempt to free auto storage
9459
9460	(install-data-local): Rename leftover MAILFROMSTATEDIR
9461
94622006-12-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9463
9464	Update
9465
9466	Version 3.1
9467
94682006-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>
9469
9470	Update
9471
9472	Finished docs for 3.1
9473
9474	Update patchlevel
9475
9476	Update
9477
9478	Fix overfull hblock
9479
9480	Update
9481
9482	Almost finished
9483
9484	Handle @multitable blocks.  Print a diagnostic message if some other function is required
9485
9486	(extract): Handle include dependencies
9487
9488	Mark comparison operators as nonassoc
9489
9490	(resolve): Return "0" if the argument is not resolved.
9491
9492	(MAILFROMSTATEDIR): Rename to DEFAULT_STATE_DIR
9493
94942006-12-05  Sergey Poznyakoff  <gray@gnu.org.ua>
9495
9496	Remove extra space
9497
9498	(print_locus): Bugfix
9499
9500	Update
9501
9502	Minor change
9503
9504	Minor fix
9505
9506	Update
9507
9508	Allow hex numbers to be prefixed with 0X as well.
9509
9510	Remove -c option. Remove the inconsistent usage of config_ prefix.
9511
9512	(builtin.h): Depend on M4_FILES
9513
9514	Do not use obsolete -c option to mailfromd
9515
9516	Consistently use `filter script' instead of `configuration file'.  Add some missing information.
9517
9518	(EXTRA_DIST): Add untabify.el (check-format,untabify,final): New targets
9519
9520	*** empty log message ***
9521
95222006-12-04  Sergey Poznyakoff  <gray@gnu.org.ua>
9523
9524	Fix changecom
9525
9526	Update
9527
9528	Use "mailer" capability
9529
9530	Add bi_mail.m4
9531
9532	Update
9533
9534	Update
9535
9536	Implement bitwise operations
9537
9538	Accept C-like notations for hex and octal numbers.
9539
9540	Implement bitwise operators: &, |, ^, ~ Implicit declarations within functions create automatic variables.
9541
9542	(get_mx_records): Use resolve_ipstr to resolve IP addresses.
9543
9544	Update
9545
9546	Update
9547
9548	New file
9549
9550	Update
9551
9552	Remove conditional
9553
9554	(start_daemon,mailfromd_exec): Add -I option
9555
9556	Remove :RCDIR instruction
9557
9558	Include config.rc
9559
9560	Add config.rc, remove greylist.rc
9561
9562	(RCFILES): Add config.in.  Replace greylist.in with greylist.rc (noinst_DATA, CLEANFILES): Add config.rc, remove greylist.rc
9563
9564	Replace greylist.in with greylist.rc
9565
9566	New option -I (--include)
9567
9568	(add_include_dir): New proto.
9569
9570	Implement search path for include files
9571
9572	(dns_cache_get): Do not log error message if the file does not exist. Make sure rc is meaningful (dns_cache_put): Free temporary storage
9573
9574	(print_status): Log normal child exits at SMI_LOG_INFO priority
9575
9576	There's no use to pass MAILFROMSTATEDIR and DEFAULT_SOCKET in config.h, revert to the prior scheme
9577
9578	Fix changecom
9579
9580	Update
9581
9582	[!USE_DBM]: Remove.  DBM is now required
9583
9584	(AM_CPPFLAGS): Remove extra defines.  These are now passed via config.h
9585
9586	Refuse to build without DBM. Pass all default values via config.h Print configuration summary at the end of the run.
9587
95882006-12-03  Sergey Poznyakoff  <gray@gnu.org.ua>
9589
9590	Update
9591
9592	Add dns.exp
9593
9594	(db_format_enumerator): Handle special cases for `database dns'
9595
9596	(pragma_database): Handle special cases for `database dns'
9597
9598	(dns_cache_put): Fix calculation of the expiration date for negative records. (dns_cache_format_struct): Use DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL
9599
9600	(getmx,resolve_ipstr,resolve_hostname): Enable negative caching
9601
9602	(AM_CPPFLAGS): Define DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL
9603
9604	Define DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL
9605
9606	(alpha,alphacheck): New rules
9607
9608	Update
9609
9610	Document the dns database.
9611
9612	Update
9613
9614	*** empty log message ***
9615
9616	(RCFILES): Add dns.rc
9617
9618	New test case
9619
9620	(struct eval_environ.dict): Remove. All uses updated.
9621
9622	(host_in_relayed_domain_p): Rewrite using new resolve_ipstr (db_format_setup): Initialize dns_cache_format
9623
9624	(resolve_ipstr): Change prototype (resolve_hostname): New function (DEFAULT_DNS_DATABASE): New define (dns_cache_get,dns_cache_put): New functions
9625
9626	Rewrite using global cache  (resolve_hostname): New function (resolve_ipstr): Change signature
9627
9628	Rewrite using new dns functions
9629
9630	Add dnscache.c
9631
9632	New file
9633
9634	(MI_TIMEOUT): Rename to GACOPYZ_TIMEOUT (mi_uint32_t): Rename to gacopyz_uint32_t Set gacopyz_uint32_t based on the result of a configure check (MILTER_OPTLEN): Rename to GACOPYZ_OPTLEN
9635
9636	(noinst_PROGRAMS): Remove
9637
9638	Check for unsigned 32-bit integer type
9639
96402006-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>
9641
9642	Update
9643
9644	(env_final_gc): Free temporary storagee before returning.
9645
96462006-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>
9647
9648	Update
9649
9650	Raise patchlevel to 92
9651
9652	(mlfi_envrcpt): print entire argument array in debug level 70
9653
9654	Update
9655
9656	(debug macros): Rewritten
9657
9658	(mlfi_envfrom): print entire argument array in debug level 70
9659
96602006-11-29  Sergey Poznyakoff  <gray@gnu.org.ua>
9661
9662	Update
9663
9664	(print_node): Handle nonprintable characters in strings.
9665
9666	Minor change
9667
9668	Add a comment
9669
9670	Update
9671
9672	(post_parse): New proto
9673
9674	Implement simple GC for compacting the heap space.
9675
9676	New option --xref (--dump-xref)
9677
9678	(struct variable): New member xref. (env_final_gc): New proto.
9679
9680	Implement cross-reference listing.
9681
9682	(method_standard): Fix the call to set_last_poll_result.
9683
9684	Update
9685
96862006-11-28  Sergey Poznyakoff  <gray@gnu.org.ua>
9687
9688	Update
9689
9690	(instr_retcatch): Call env_leave_frame with nargs=1 (env_catch pushes one argument.) (env_init): Remove initializatio of toh (create_environment): Initialize toh here (see the comment).
9691
9692	Minor indentation fix
9693
9694	Update
9695
9696	(optab): Add missing entry (NEG)
9697
9698	(parse_error_locus): Bugfix
9699
9700	(copy_node): New function (print_node): Print "STRING" for node_type_string (optimize_arith): Immediate calculations if one of the arguments is 0 or 1. Side effect: catches all types of division by zero errors. (optimize_node): Optimize concatenations with an empty string (codegen): Do not attempt to generate code if the optimization resulted in errors.
9701
9702	Update
9703
9704	(eval_environment): Prevent coredumps on invalid PC values.
9705
9706	Fix indentation
9707
9708	Update
9709
9710	Update
9711
9712	(disable_prog_trace): Rename to cancel_program_trace
9713
9714	(MF_RETURN_TEMP_SPACE): Bugfix - call heap_fix_tempspace. Take an optional argument specifying the size of the data stored in the temporary memory.
9715
9716	(bi_strftime): Call MF_RETURN_TEMP_SPACE with an argument.
9717
97182006-11-27  Sergey Poznyakoff  <gray@gnu.org.ua>
9719
9720	Update
9721
9722	Assume C comments
9723
9724	Change to new tracing scheme
9725
9726	(disable_prog_trace,debug_level_p,enable_debug) (enable_debug_list,disable_debug_list): New functions The option --debug can take a comma-separated list of debug specifications. The option --trace-program takes as an optional argument a comma-separated list of modules to trace
9727
9728	(__DBG): Change definition (enable_module_trace,disable_module_trace,enable_prog_trace) (disable_prog_trace,debug_level_p,enable_debug) (enable_debug_list,disable_debug_list): New functions (prog_trace_option): Remove declaration
9729
9730	Use MF_INIT without arguments
9731
9732	(noinst_HEADERS,EXTRA_DIST,BUILT_SOURCES): Add builtin.h, builtin.def, init.m4 (.def.h): New rule
9733
9734	New file
9735
97362006-11-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9737
9738	Update
9739
9740	(instr_symbol): Return the value using pushs, not push.
9741
9742	Update
9743
9744	Allow constant expressions in top-level set statements.
9745
9746	(system): Return exit code of the executed command.
9747
9748	Throw exception after closing the db  (dbdel): New function
9749
9750	*** empty log message ***
9751
97522006-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
9753
9754	Update
9755
9756	(MF_BEGIN_TEMP_SPACE,MF_END_TEMP_SPACE,MF_RETURN_TEMP_SPACE): New macros
9757
9758	(heap_max_tempspace, heap_fix_tempspace): New functions.
9759
9760	Fix handling of escape sequences at the beginning of a string and before the beginning of an interpreted sequence within the string.
9761
9762	(strftime): New function
9763
9764	Various fixes
9765
9766	Update
9767
9768	Add new tests
9769
9770	(remove_symbol): Fix assertion
9771
9772	Handle zero argument count correctly
9773
9774	(BUILTIN_P,FUNCTION_P): New tokens (IDENT}/"("): New rule
9775
9776	(codegen): Two more arguments (forget_autos): Take number of parameters as an argument. Clear auto_list (BUILTIN_P): Renamed to BUILTIN_PROC (FUNCTION_P): Renamed to FUNCTION_PROC (BUILTIN_P,FUNCTION_P): New tokens. Lowest precedence Fix code generation for function arguments and the precedence of function or built-in calls without parens
9777
9778	(time): New built-in
9779
9780	(dbmap_lookup): Defval can be NULL Make sure returned string is null-terminated (dbput): New built-in function
9781
97822006-11-23  Sergey Poznyakoff  <gray@gnu.org.ua>
9783
9784	Update
9785
9786	(va_builtin_install_ex): Bugfix (variable_install, function_install): Init all members
9787
9788	(MF_DECLARE_DATA,MF_GET_DATA): New macros
9789
9790	(env_get_builtin_priv,builtin_priv_register, error_count): New declaration
9791
9792	Keep builtin-specific private data in struct eval_environ. (builtin_priv_register,env_get_builtin_priv): New functions (builtin_setup): Call system_init_builtin and io_init_builtin
9793
9794	(mf_ioerr): New exception
9795
9796	New tokens FUNCTION_P and BUILTIN_P (parse_error,parse_error_locus): Increment error_count unless fmt begins with `warning:'.
9797
9798	Modify error handling and proccall production. Get rid of svalidate.
9799
9800	Add bi_io.m4 and bi_system.m4
9801
98022006-11-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9803
9804	Update
9805
9806	svalidate is not needed any more (I hope)
9807
9808	Document pragma stacksize
9809
9810	Fix the precedence of function calls and boolean negation.
9811
9812	Add strings.exp
9813
98142006-11-20  Sergey Poznyakoff  <gray@gnu.org.ua>
9815
9816	Update
9817
9818	New file
9819
9820	(RCFILES): Add strings.rc
9821
9822	(MF_VAR): Set VAR_VOLATILE by default
9823
9824	(dump_asgn): Bugfix
9825
9826	(node_type_auto): Remove, node_type_variable does the job (VAR_VOLATILE,VAR_EXTERN): New defines (for future use) (struct variable): New member flags.
9827
9828	Rewrite expression rules to properly handle concatenations and to reduce the number of conflicts. Compute automatic and parameter offsets locally Rewrite optimizer.
9829
9830	(toupper, tolower): Fix return type declarations (substr,rindex): Fix bugs
9831
9832	(dbmap_lookup): Avoid needless memory allocation
9833
9834	Document string and db functions
9835
98362006-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9837
9838	Update
9839
9840	New file
9841
9842	Update
9843
9844	Use xmalloc instead of emalloc (emalloc): Remove (find_and_remove): Fix coredump
9845
9846	Handle OPTIONAL keyword (MF_ALLOC_HEAP_TEMP): New macro
9847
9848	(heap_tempspace): New function
9849
9850	Include xalloc.h (struct builtin): New member optcount (va_builtin_install_ex): take 8 mandatory arguments (emalloc): Remove (heap_tempspace): New function
9851
9852	Hanlde optional arguments to built-ins Use xmalloc instead of emalloc
9853
9854	Use xmalloc instead of emalloc (xalloc_die): New function
9855
9856	Use xmalloc instead of emalloc
9857
9858	(substr): New function
9859
9860	(dbmap): Take an optional third argument. (dbget): New built-in
9861
9862	Create MAILFROMSTATEDIR with the right privileges.
9863
9864	(INITIAL-RESPONSE-TIMEOUT): Update.
9865
98662006-11-14  Sergey Poznyakoff  <gray@gnu.org.ua>
9867
9868	Bugfix
9869
9870	Update
9871
9872	Bug fixes
9873
9874	Update
9875
9876	New option -O (--optimize)
9877
9878	Export string functions from lex.l
9879
9880	Export string functions
9881
9882	Implement code optimization
9883
9884	Document -O option
9885
9886	Raise version to 3.0.91
9887
9888	Update
9889
9890	Update
9891
9892	Add macros.exp
9893
9894	New test case
9895
9896	Use full type names
9897
9898	(RCFILES): Add macros.rc
9899
9900	New file
9901
9902	(function_name): New function
9903
9904	New built-in macros
9905
9906	 Document built-in macros
9907
9908	Define split version
9909
99102006-11-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9911
9912	Fix typo
9913
9914	Update
9915
9916	*** empty log message ***
9917
9918	Update
9919
9920	(decode_debug): Remove legacy handling of `cdyl' flags.
9921
9922	Remove legacy handling for `rate' New keywords __file__, __line__ and __function__
9923
9924	Remove legacy handling for `rate' (function_name): New function
9925
9926	Document `echo' statement
9927
9928	update
9929
9930	(numrcpt): Removed
9931
99322006-11-12  Sergey Poznyakoff  <gray@gnu.org.ua>
9933
9934	Update
9935
9936	Add
9937
9938	Make sure symbol table entries do not change their address during rehashing
9939
9940	Allow for auto variables in handlers (print_node): Print variable offset with SET (forget_autos): Use find_and_remove to remove the variable from the symtab
9941
9942	Rewrite function examples using the new style
9943
9944	Update
9945
99462006-11-11  Sergey Poznyakoff  <gray@gnu.org.ua>
9947
9948	Update
9949
9950	Make sure N in $N is positive
9951
9952	Implement automatic variables
9953
9954	Update
9955
9956	(remove_symbol): Split in two functions. (variable_remove): New function
9957
9958	(storage_class_t): New type (struct variable): New members: storage_class, locus, shadowed (variable_remove): New function
9959
9960	Implement named function parameters and the framework for automatic variables.
9961
9962	(remove_symbol): Fix typo
9963
99642006-11-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9965
9966	Update
9967
9968	Make sure the test works offline
9969
9970	(remove_symbol): New function
9971
9972	(MF_RETURN, MF_RETURN_STRING, MF_ALLOC_HEAP, MF_VAR_INC, MF_COPY_STRING,MF_VAR_REF): New defines (MF_VAR): Declare offset as static
9973
9974	(env_var_inc, variable_declared_p,declare_variable): New decls
9975
9976	(env_var_inc): New function (struct declvar): Replace var with name and off.  It is not safe to keep the address of the variable as it can change during rehashing of the symtable (find_declared_variable): Replace with variable_declared_p (rcpt_count_loc,ehlo_domain_var,mailfrom_address_var): Remove (get_rcpt_count,clear_rcpt_count,incr_rcpt_count) (bi_numrcpt,builtin_post_setup): Move to bi_vars.m4
9977
9978	(declare_numeric_variable,declare_string_variable): Remove
9979
9980	(ctx_getsym): use gacopyz_setreply
9981
9982	Replace calls to declare_string_variable and declare_numeric_variable with declare_variable (code_node): Fix coredump if node==NULL
9983
9984	Use MF_RETURN, MF_RETURN_STRING, MF_VAR_REF, et al
9985
9986	(M4_FILES): Add bi_vars.m4 (mailfromd_SOURCES): Remove ml.c
9987
9988	*** empty log message ***
9989
9990	build the targets inconditionally
9991
9992	Remove legacy section
9993
9994	Update
9995
9996	Incorporate changes from 3.0 branch
9997
9998	Update to match recent changes (string is a keyword)
9999
10000	Update to match recent changes
10001
10002	New rules for returning TYPE
10003
10004	Control types during tree generation Start implementing strict type checking and the new way of declaring function parameters and return types. Implement functions without return value (procedures).
10005
10006	Use the new way of declaring MF variables.
10007
10008	(MF_VAR): New macro (__mf_argtype,mf_typelist): Change expansion according to mailfrom.h
10009
100102006-11-08  Sergey Poznyakoff  <gray@gnu.org.ua>
10011
10012	Fix typo
10013
10014	Update
10015
10016	 Fix version: 3.0.90 (3.0.1 is moved to bug-fixing branch)
10017
10018	Use catch/assert macros.
10019
10020	(MF_CATCH, MF_CATCH_VAL, MF_ASSERT): New macros
10021
10022	Update
10023
10024	(struct function): Remove misleading comment
10025
10026	New token type PROCEDURE
10027
10028	(function_call): New function Allow functions returning unspecified (procedures) to be used as statements
10029
10030	(parse_state_arg): Bugfix: do not reuse parsing buffer!
10031
10032	(mailfromd_stop): Fix arithmetical expression syntax
10033
10034	Raise version number to 3.0.1
10035
100362006-11-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10037
10038	Update
10039
10040	Update FIXME-xref.
10041
10042	Update
10043
10044	(mu_dbm_open) [WITH_GDBM]: Use GDBM_NOLOCK, as we do the locking ourselves
10045
100462006-11-06  Sergey Poznyakoff  <gray@gnu.org.ua>
10047
10048	Update
10049
10050	Put back the changes, only make sure the leading white space is properly stripped off the argument.c
10051
10052	Fix multiple from address handling
10053
10054	(opton_ehlo): Adjust for changes in option mailfrom syntax
10055
10056	(pragma_option): Undo the change from 2006-10-30.
10057
10058	Update
10059
10060	Update
10061
10062	Update copyright year
10063
100642006-11-05  Sergey Poznyakoff  <gray@gnu.org.ua>
10065
10066	Update
10067
10068	New file
10069
10070	Update
10071
10072	Finish changes for 3.0
10073
10074	(function-begin, function-end): Remove macros (example-output): New macro
10075
10076	New file
10077
10078	(mailfromd_TEXINFOS): Add gacopyz.texi (EXTRA_DIST): Add extract.awk (extract): New rule
10079
10080	(gacopyz_cleanup_conn): Ignore SIGTERM while stopping children.
10081
10082	(gacopyz_handle_connection): Reset SIGTERM and SIGHUP in child.
10083
10084	Install mailfromd in sbin
10085
10086	Update
10087
10088	Set the version number to 3.0 (dropping libmilter support calls for raising the major number).
10089
100902006-11-04  Sergey Poznyakoff  <gray@gnu.org.ua>
10091
10092	 (ctx_read,ctx_write): Return immediately on timeout and eof.
10093
10094	New option `macros'.
10095
10096	Add missing documentation
10097
10098	(function-begin,function-end): New macros
10099
10100	(check-pragmas): Minor change
10101
10102	Update
10103
101042006-11-03  Sergey Poznyakoff  <gray@gnu.org.ua>
10105
10106	Update
10107
10108	(check_portspec): Minor fix: no use to make sp static. (mailfromd_daemon): Stop on SIGTERM, SIGQUIT, SIGHUP and SIGINT. Finally!
10109
10110	Do not keep the list of children. gacopyz_cleanup_children now does the housekeeping job.
10111
10112	(gacopyz_cleanup_children): Change signature
10113
10114	(gacopyz_run): Update invocation of gacopyz_cleanup_children.
10115
10116	New command 'configtest' (proposed by Jan)
10117
10118	Update
10119
10120	(smfilter): Set child start handler
10121
10122	Fix conditionals for definition of res_n* wrappers.
10123
10124	Remove any references to libmilter
10125
10126	Warn if libmilter is requested
10127
10128	Update
10129
10130	Update
10131
10132	Define wrappers for phread and res_n* functions,if necessary
10133
10134	(on pollstmt do branches): Fix passing of arguments to the built-in poller
10135
10136	Replace pthread-specific calls with macro wrappers
10137
10138	Fix trace output (AS part)
10139
10140	(macro_assoc_free): Initialize macro_assoc_t fields to NULL
10141
10142	Autodetect the presence of res_n* functions Define HAVE_PTHREAD if we need to use libpthread
10143
10144	Update
10145
10146	(smfi_main): Remove debugging hook
10147
10148	Update
10149
10150	Include mfapi.h without leading directory. -I should take care of it. [GACOPYZ_VERSION_MAJOR]: Provide wrapper for gacopyz_setreply
10151
10152	Do not include mfapi (MAILFROMD_DAEMON,MAILFROMD_TEST,MAILFROMD_DELETE,MAILFROMD_LIST) (MAILFROMD_EXPIRE,MAILFROMD_COMPACT) (MAILFROMD_SHOW_DEFAULTS): Move defines to mailfrom.h
10153
10154	Include mfapi.h without leading directory. -I should take care of it. (MAILFROMD_DAEMON,MAILFROMD_TEST,MAILFROMD_DELETE,MAILFROMD_LIST) (MAILFROMD_EXPIRE,MAILFROMD_COMPACT) (MAILFROMD_SHOW_DEFAULTS): Moved from main.c (mode): New global
10155
10156	Remove include mfapi.h (priv_get): Special provision for test mode
10157
10158	(INCLUDES): Add MILTER_INCLUDES
10159
10160	Raise version number to 2.0.4 Default to using libgacopyz. If the user really calls for trouble, allow him to use libmilter (possibly forked), instead.
10161
10162	(SUBDIRS): Replace libmilter with gacopyz
10163
10164	*** empty log message ***
10165
10166	See /libmilter for the previous history
10167
10168	Update
10169
10170	Everything moved to /gacopyz; Some fixes applied as well
10171
10172	Everything moved to /gacopyz; Some fixes applied as well
10173
10174	Update
10175
10176	Skip -f option and its argument.
10177
10178	Finished libmilter implementation.
10179
10180	Update
10181
10182	(g_milter_setmlreply_v, smfi_setmlreply): Improved implementation. (g_milter_setmlreply_va): New function
10183
101842006-11-02  Sergey Poznyakoff  <gray@gnu.org.ua>
10185
10186	Update
10187
10188	Implement sending reply strings to sendmail.
10189
10190	Update
10191
10192	Fix type casting of arguments.
10193
10194	Update
10195
10196	Add to the repository
10197
10198	Finish context loop implementation
10199
10200	Update
10201
10202	Define state_name array
10203
10204	(macro_assoc_t): New data type (struct smfi_str.macros): Change type to macro_assoc_t
10205
10206	(SMFI_V1_ACTS,SMFI_V2_ACTS): New defines (smfi_getsymval): Define to g_milter_getsymval (g_milter_getsymval): New prototype
10207
10208	(trans_ok, get_command): Change signature (send_reply): Remove translation of the command. (union state_arg): Change contents. (state_ret_type): New data type (state_handler_fn): Change type and signature. (state_disp): New field `name'. (shan_abort,shan_macro,shan_optneg): Implemented (find_disp): New function (parse_state_arg): New function (g_milter_context_loop): Initial loop implementation. (g_milter_getsymval): New function
10209
102102006-11-01  Sergey Poznyakoff  <gray@gnu.org.ua>
10211
10212	Update
10213
10214	(END): Emit st_none
10215
10216	(smfi_register): Fix declaration (smfi_main): Temporarly force foreground mode
10217
10218	(enum macro_index) (milter_sockaddr_t,mi_uint32_t): New data type (struct smfi_str.macros): Change type
10219
10220	(smfi_register): Fix prototype (g_smfi_logdump): New function
10221
10222	Lots of fixes. Start implementing the read and eval loop.
10223
10224	(g_smfi_logdump): New function
10225
10226	Build dummy - a test program for libmilter
10227
10228	(BUILD_DUMMY): New var
10229
10230	Update
10231
10232	Initial commit
10233
10234	Update
10235
10236	Conditionally build libmilter.a
10237
10238	Add testing framework for libmilter; Raise version number to 2.0.3
10239
10240	(SUBDIRS): Add libmilter
10241
10242	Added to the repository
10243
10244	Update
10245
10246	(instr_ston): Fix runtime error diagnostic message
10247
102482006-10-30  Sergey Poznyakoff  <gray@gnu.org.ua>
10249
10250	(pragma_option): Return the rest of the line as the option argument for `pragma option mailfromd'
10251
10252	Document multiple from addresses.
10253
10254	(check-exceptions): New goal (all-check-docs): Depend on check-exceptions
10255
10256	Update
10257
10258	Test multiple from addresses
10259
10260	(set_mailfrom): Check if value is a valid mail address (or a list thereof)
10261
10262	(check_on_host): Iterate over addresses from `mailfrom' until either the list is exhausted or the remote server replies 2xx. Generalization of Jan's idea.
10263
10264	Update
10265
10266	(check_mx_records): Update declaration
10267
10268	(check_mx_records): Return actual number of MXs in the location given by the last argument. All callers updated (method_standard): Do the last-resort poll (i.e. querying the domain part of the sender email, treated as an MX) only if the domain has no MX records.
10269
10270	_pollmx): Update invocation of check_mx_records
10271
102722006-10-29  Sergey Poznyakoff  <gray@gnu.org.ua>
10273
10274	Update
10275
10276	(struct eval_environ): Fix setheader prototype.
10277
10278	Update
10279
10280	(ismx): New built-in function
10281
10282	(connect_timeout, connect_attempts): New variables.
10283
10284	(smtp_stream_wait, smpt_wait) (check_on_host, listens_on): Use connect_wait/connect_timeout for the initial connection and io_wait/io_timeout for the I/O operations. Proposed by Jan.
10285
102862006-10-28  Sergey Poznyakoff  <gray@gnu.org.ua>
10287
10288	Update
10289
10290	Minor comment fixes
10291
10292	(clamav): New built-in function
10293
10294	Version 2.0.2
10295
10296	Update
10297
10298	(env_get_stream): New macro. Make sure env_get_stream is used only within capturing function definitions.
10299
10300	Update
10301
10302	(check-pragmas, check-options,check-builtins): Use new check-docs.sh invocation syntax
10303
10304	Allow to take any number of "source"  arguments.
10305
10306	Remove ignored deftypefn of numrcpt
10307
103082006-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>
10309
10310	Update
10311
10312	(instr_header): The value for the header is obtained as the 1st argument. (struct optab): Change instr_header description (create_environment) Change type of the 4th argument
10313
10314	New option --dump-macros
10315
10316	(struct old_header_node): Renamed from header_node (struct header_node): New structure. (print_config_macros): New function (create_environment): Change type of the 4th argument (priv_store_header_command): Remove declaration (compare_string): New declaration
10317
10318	Rules for header modification changed to allow an expression as the second argument. (register_macro,print_used_macros): New functions (dbg_setheader): Change type of the second argument to struct old_header_node. (print_node,code_node): Change handling of node_type_header
10319
10320	(ctx_setheader,priv_store_header_command): Change type of the second argument to struct old_header_node.
10321
10322	(MF_INIT): Install greylist_seconds_left variable
10323
10324	Update
10325
10326	Spam-Assassin interface.
10327
10328	(va_builtin_install_ex): New function
10329
10330	Change quoting symbols to [<,>] (MF_STATE, MF_CAPTURE): New defines (MF_DEFUN): use va_builtin_install_ex
10331
10332	(sa_init_builtin): New function
10333
10334	Include stdarg.h (struct eval_environ): New member `stream' (env_get_stream,env_capture_start,env_capture_write) (env_capture_write_args): New functions (destroy_environment): Destroy the capture stream (builtin_setup): Call sa_init_builtin.
10335
10336	(mf_status): New status mf_url (struct builtin): New fields rettype, statemask, capture. (va_builtin_install_ex): New function (env_get_stream,env_capture_start,env_capture_write, env_capture_write_args): New functions
10337
10338	 (parse_include): Remove unused variable
10339
10340	Check if builtin invocations are allowed in the current state. (status_tab): Add mf_url
10341
10342	(mlfi_envfrom,mlfi_header,mlfi_eoh) (mlfi_body, mlfi_eom): Capture support (mlfi_eom): Bugfix: mlfi_eval called with wrong state tag
10343
10344	Remove unneded quoting
10345
10346	(M4_FILES): Add bi_sa.m4
10347
10348	Check for SIGRETTYPE
10349
10350	Update
10351
10352	(rate_print_item): Remove unused variables
10353
10354	(other_init_builtin): New extern
10355
10356	Move all milter-related stuff to engine.c
10357
10358	Add external declarations, necessary for engine.c
10359
10360	(substring): Fix swapping of start and end offsets.
10361
10362	(mailfromd_SOURCES): Add engine.c
10363
103642006-10-23  Sergey Poznyakoff  <gray@gnu.org.ua>
10365
10366	Update
10367
10368	Add comments
10369
10370	Minor indentation changes
10371
103722006-10-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10373
10374	Update
10375
10376	Use familiar \N notation for back references. Expand \0ooo and \xhh notations in double-quoted strings.
10377
103782006-10-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10379
10380	Update
10381
10382	Allow variable and macro interpretation and backreference substitution in "" strings.
10383
10384	Bugfix
10385
10386	Update
10387
10388	Implement regexp back-references
10389
10390	Update
10391
10392	*** empty log message ***
10393
103942006-10-20  Sergey Poznyakoff  <gray@gnu.org.ua>
10395
10396	Update
10397
10398	Builtin framework
10399
10400	Update
10401
10402	Include prog.h Remove implementations of builtin functions. They all go into the corresponding m4 files. (advance_pc,adjust_stack): Functions, instead of macros (env_var_ref,env_dict_getsym,env_dict_install,env_get_locus): New functions.
10403
10404	(check_on_host): Return mf_temp_failure if stream_open fails.
10405
10406	New status mf_range
10407
10408	(status_tab): New status mf_range
10409
10410	Add rules for generating builtin implementation files from m4 sources
10411
10412	Built-in function implementations
10413
10414	Update
10415
104162006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
10417
10418	Update
10419
10420	(set_last_poll_result): Allow NULL arguments
10421
10422	Update
10423
10424	(bi_hostname, bi_resolve): Cache negative results (valid_user_p): Use mu_get_auth if available and throw appropriate exceptions if the user validity cannot be confirmed.
10425
10426	Check for mu_get_auth (MU >= 1.0.1)
10427
104282006-10-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10429
10430	Update
10431
10432	Apply some fixes, proposed by Jan
10433
104342006-10-11  Sergey Poznyakoff  <gray@gnu.org.ua>
10435
10436	Update
10437
10438	(method_standard, method_strict): Initialize last_poll_sent, last_poll_recv to empty strings if cache was used.
10439
104402006-10-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10441
10442	Update
10443
10444	Document here-documents.
10445
10446	(ml_split): Fix counting of lines in the reply.  The last line was not taken into account unless it ended with a newline.
10447
10448	Allow interpretation of variables and macros within here-documents. Special form to remove all leading whitespace from the here-document lines.
10449
104502006-10-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10451
10452	Update
10453
10454	Provide example of cached_data usage.
10455
10456	Update
10457
10458	[WITH_BDB] (mu_dbm_open): Use DB_VERSION_MAJOR to select the version-dependent code.
10459
10460	(INCLUDES): Add MU_COMMON_INCLUDES
10461
10462	Fix Berkeley DB autodetection
10463
104642006-10-06  Sergey Poznyakoff  <gray@gnu.org.ua>
10465
10466	Update
10467
10468	(method_strict, method_standard): Set cache_used to 1 or 0 depending on whether the cached data were used or not.
10469
10470	(set_cache_used): New function
10471
10472	Document cache_used variable
10473
10474	NEWS
10475
10476	Update
10477
10478	Document new variables
10479
10480	(rate_expire_item): Compute the interval relative to the current time.
10481
10482	(env_get_context, env_get_context): New function (greylist_expire_item): New function (greylist_format_struct): Add expire field. (greylist_format_struct): Declare last_poll_host, last_poll_send, last_poll_recv
10483
10484	[WITH_BDB] (mu_dbm_open): Support Berkeley DB 4
10485
10486	(smtp_send): Clear reply before proceeding (smtp_last_sent,smtp_last_received): Return literal "nothing" if nothing was sent/received. (check_mx_records,method_strict) (method_standard): Change first argument type to eval_environ_t (check_on_host): Change first argument type to eval_environ_t. Return last polled host, sent command and received reply in variables last_poll_host, last_poll_send and last_poll_recv.
10487
10488	(set_last_poll_result): New function. (env_get_context): New function. (check_on_host,check_mx_records,method_strict) (method_standard): Change first argument type to eval_environ_t
10489
10490	Add explicit support for Berkeley DB 4.  Raise version number to 2.0.1
10491
104922006-09-15  Sergey Poznyakoff  <gray@gnu.org.ua>
10493
10494	Update
10495
10496	Update
10497
10498	Update
10499
10500	(filter_cleanup): Free md->helostr (mlfi_helo): Allocate md->helostr.
10501
10502	Finished
10503
10504	Raise version number to 2.0
10505
10506	Update
10507
10508	(main): Enclose PACKAGE_BUGREPORT in angle brackets
10509
105102006-09-14  Sergey Poznyakoff  <gray@gnu.org.ua>
10511
10512	Do not enclose dbm-related variables in #ifdef USE_DBM.
10513
10514	Warn about unquoted strings
10515
10516	Update
10517
10518	Update
10519
10520	Include sys/types.h
10521
10522	Fix coredump if "rate" is not defined
10523
10524	Define program_name
10525
10526	Update
10527
10528	New option -l (--lint)
10529
10530	Fix counting of the input lines
10531
10532	Update
10533
10534	Update
10535
105362006-09-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10537
10538	Update
10539
10540	Update
10541
10542	Update
10543
10544	(rate_print_item): Use format_time_str.
10545
10546	(greylist_print_item): Use format_time_str.
10547
10548	(time_format_string): New global New option --time-format
10549
10550	(format_time_str): New function (time_format_string): New global
10551
10552	(convert_rate): allow a separator ("per" or a punctuation) between the message count and the interval spec.
10553
10554	(format_time_str): New function
10555
10556	(cache_print_item): Use format_time_str
10557
10558	(INCLUDES): Add lib (for fprintftime.h)
10559
10560	Update (fprintftime gnulib module is required).
10561
10562	(mailfromd_TEXINFOS): Add strftime.texi (check-builtins): Update rule (check-refs,check-fixmes): New rules (all-check-docs): New rule (check-docs): Rewrite via all-check-docs
10563
10564	Add new file
10565
10566	Update
10567
105682006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10569
10570	Update
10571
10572	Update
10573
10574	(env_catch): Reset the exception handler.
10575
10576	Update
10577
105782006-09-11  Sergey Poznyakoff  <gray@gnu.org.ua>
10579
10580	Update
10581
10582	Update
10583
10584	(xopindex): Prefix option name with --
10585
105862006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10587
10588	Update
10589
10590	Update
10591
10592	Update
10593
10594	(options): Fix wrongly placed N_()s.
10595
10596	Set the precedence of  MATCHES and FNMATCHES to that of EQ (print_bin_op): Add missing opcodes (print_node): Fix printing of NEG argument
10597
10598	(xprindex): Not used now
10599
10600	(check-pragmas): Modify (check-docs): Add check-builtins to the lst of prerequisites. (check-builtins): New rule (RENDITION): Remove variable assignment
10601
10602	Set doc hints depending on the version (alpha vs. stable).
10603
106042006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10605
10606	Update
10607
10608	(valid_user_p): Do not suppose argument is an email address.
10609
10610	Use ifdef USE_DBM where appropriate
10611
10612	(mailfromd_TEXINFOS): Add macros.texi (check-pragmas,check-options): New rules (EXTRA_DIST): Add check-docs.sh
10613
10614	*** empty log message ***
10615
10616	Add texinfo to the prerequisites
10617
106182006-09-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10619
10620	Update
10621
10622	(bi_domainpart, bi_localpart): New function (dbmap): Signal dbfailure exception if the database cannot be opened.  Do not suppose the argument is an email address.
10623
10624	Almost finished Tutorial chapter
10625
106262006-09-05  Sergey Poznyakoff  <gray@gnu.org.ua>
10627
10628	Update
10629
10630	Update
10631
10632	(bi_toupper, bi_tolower): New built-ins. (bi_stdpoll, bi_strictpoll, bi__pollhost, bi__pollmx): Signal runtime error on unhandled exceptions.
10633
10634	Update
10635
10636	New option --all (stderr_error_printer): Use program_invocation_short_name (main): Set stderr_error_printer early, before parsing command line.
10637
10638	(parse_error): Do not output locus is locus.file is not set.
10639
10640	(db_compact): Print debugging info at the beginning
10641
10642	Update
10643
10644	Update
10645
10646	Removed
10647
10648	New options --lock-retry-count and --lock-retry-timeout
10649
10650	Switch to using gnulib
10651
10652	(SUBDIRS): Add lib
10653
10654	Building instructions for alpha and CVS versions
10655
106562006-09-03  Sergey Poznyakoff  <gray@gnu.org.ua>
10657
10658	Update
10659
10660	(pop_source): Do not free locus.file. It has already been referenced by now.
10661
10662	(log_status): Avoid logging SMFIS_CONTINUE actions.
10663
10664	Implement #include directive
10665
10666	Update
10667
106682006-09-02  Sergey Poznyakoff  <gray@gnu.org.ua>
10669
10670	Raise version number to 1.9.93
10671
10672	Update
10673
10674	*** empty log message ***
10675
10676	Update
10677
10678	Minor changes
10679
10680	(mu_dbm_unlock): Return void
10681
10682	Include mailutils/error.h
10683
10684	(source_info_option): New option (struct message_data.msgid): New member (priv_get): Init msgid (mailfromd_msgid,mailfromd_timestr): New functions (trace, transcript): Use mailfromd_msgid() (check_on_host): Print exit code on debug level 1
10685
10686	(debug macros): Print source location only if source_info_option is set (source_info_option): New extern (builtin_post_setup,print_code,yylex,yyerror,onblock,string_to_stat) (mailfromd_msgid,mailfromd_timestr,logmsg): (xeval,check_on_host,check_mx_records,get_rate): Add missing declarations
10687
10688	(ECHO): Rename to KW_ECHO to avoid clashes with the lex macro name.
10689
10690	Print status code and time stamps in human-readable form.
10691
10692	Updated Jan's record
10693
10694	Update
10695
10696	*** empty log message ***
10697
10698	Use RFC-compliant reply codes.
10699
10700	Add hasmx.exp
10701
10702	Add catch01.rc and hasmx.rc
10703
10704	New file
10705
10706	(builtin_post_setup): New function (builtin_setup): Install ehlo_domain and mailfrom_address vars (bi_strictpoll): Fix parameter order (bi__pollhost, bi__pollmx): New functions (bi_match_cidr): Fix coredump
10707
10708	(get_smtp_domain): Remove function (main): Call builtin_post_setup after configuration
10709
10710	(smtp_domain): New extern (get_smtp_domain): Remove function
10711
10712	(on_cond): Use the values of %ehlo_domain and %mailfrom_address variables as default values for ehlo domain and sender address.
10713
10714	Update
10715
10716	(instr_catch, dump_catch): Update for the new catch calling convention. Remove includes of onwrap_std.c and onwrap_strict.c.
10717
10718	(struct poll_node): Remove (struct poll_data): New data type (struct catch_node): Replace mf_status *values with unsigned exmask (enum node_type): Remove poll_node (std_on_wrapper_func,strict_on_wrapper_func): Remove
10719
10720	Allow to specify catches for all exceptions (catch *). Allow to use any function as a selector to `on' statement. Get rid of poll_node.
10721
10722	Remove bootstrap. Not needed any more.
10723
10724	Remove
10725
10726	Add to the repository
10727
10728	(bootstrap): New goal
10729
10730	Update
10731
10732	Update catch syntax
10733
10734	(prog_trace): New function. Used in all instructions and builtins instead of debugN(100...). (instr_callout): Removed (instr_retcatch, instr_saveex, instr_restex): New instructions (env_catch): Return an error code (bi_stdpoll, bi_strictpoll): New builtins
10735
10736	New option --trace-prog
10737
10738	(mf_status): Add new status codes (it'd be better to call them exception codes, perhaps). (EXMASK): New macro (prog_trace_option): New global (struct poll_action): Removed (struct poll_node): Change type of `actions' to struct case_stmt (struct function.exmask): New member (std_on_wrapper_func, strict_on_wrapper_func): New globals (instr_callout): Removed (instr_retcatch, instr_saveex, instr_restex): New instructions (env_catch): Return an error code
10739
10740	The sequences poll, host, for, as and from are valid keywords only if used in ONBLOCK state. (onblock): New function
10741
10742	Change catch semantics: a catch handler always causes exit from the function or prog it was called from.  The scope of a catch handler installed in a function ends with the end of that function. Rewrite ON statement using CATCH + wrappers over stdpoll or strictpoll functions.
10743
10744	Add rules for generation of onwrap_std.c and onwrap_strict.c
10745
107462006-08-30  Sergey Poznyakoff  <gray@gnu.org.ua>
10747
10748	Fix typo
10749
10750	Update
10751
10752	Rewrite using new syntax
10753
10754	(instr_ntos): Remove unused variable
10755
10756	Simplity case syntax: do not require do .. donearound statement lists
10757
10758	Rewrite using 2.x syntax
10759
10760	Bugfix
10761
10762	Update
10763
10764	Minor fix
10765
10766	Set log_to_stderr=1 for some working modes (e.g. --test, --compact, --expire) (mailfromd_show_defaults): Remove NDBM/DBM leftovers
10767
10768	(NUMERIC_BUFSIZE_BOUND): New macro
10769
10770	New notation &word (for future use)
10771
10772	Use NUMERIC_BUFSIZE_BOUND to declare buffers for numeric conversion
10773
10774	Update
10775
10776	New testcase
10777
10778	Add switch.exp
10779
10780	Rewrite to use new greylist syntax
10781
10782	(RCFILES): Add switch.rc
10783
10784	(db_format_install): Return struct db_format *
10785
10786	(instr_xlat,instr_xlats,instr_jreg): New instructions (code_peek,code_reserve): New functions
10787
10788	(positive_expire_interval,rates_expire_interval): Remove globals. Use corresponding db_format fields instead. All references updated. (db_format_setup): Protect by #ifdef USE_DBM (mailfromd_show_defaults): Use symbol_enumerate to dump available database information.
10789
10790	(DEFAULT_GREYLIST_DATABASE): New define (positive_expire_interval,rates_expire_interval): Remove globals (struct value,struct valist,struct case_stmt) (struct switch_stmt): New data types (node_type_switch): New node type (struct node.v.switch_stmt): New member (instr_xlat,instr_xlats,instr_jreg): New instructions (code_peek,code_reserve): New functions (struct db_format.expire_interval): New member (db_format_install): Return struct db_format *
10791
10792	Implement switch statement
10793
10794	Use rate format
10795
10796	Use cache_format
10797
10798	Update
10799
10800	Document switch statement, database pragma and the new greylist syntax
10801
108022006-08-23  Sergey Poznyakoff  <gray@gnu.org.ua>
10803
10804	Update
10805
10806	(stderr_error_printer): New function (main): Set stderr_error_printer as the default error printer if log_to_stderr is true. Bail out if extra arguments are given in daemon mode.
10807
10808	Update
10809
10810	(rate_print_item): Improved output
10811
10812	(instr_rate): Remove (bi_interval,bi_rate): New functions
10813
10814	Options ending in "timeout" and "expire-interval" take time interval specification as their argument.
10815
10816	(node_type_rate): Remove type (instr_rate): Remove function
10817
10818	Allow to use multi-letter sendmail variables without surrounding cury braces.
10819
10820	Remove rate statement, use the built-in function instead. (pragma_option): Several pragmas take time interval specification as their argument. (time_multiplier): Analize the part of the first argument up to the first space characrer. Allow for abbreviated time units. (parse_time_interval): New function (convert_rate): Rewrite unsing parse_time_interval
10821
10822	(getmx): Do not recurse to parent domains
10823
108242006-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>
10825
10826	Update
10827
10828	Switch to user privileges before compacting the database
10829
10830	Update
10831
10832	Rewrite using the new syntax
10833
10834	Update the comment
10835
10836	Add new testcase
10837
10838	(variable_install): Do not overwrite existing variables. (function_install): Locus pointer is const
10839
10840	(declare_numeric_variable) (declare_string_variable): New function (env_decl_vars): New function (create_environment): Call env_decl_vars
10841
10842	(parse_error_locus,function_install): Locus pointer is const (declare_numeric_variable,declare_string_variable): New function
10843
10844	(parse_error_locus): Locus pointer is const
10845
10846	The legacy syntax (statement list without any prog declaration) is no longer supported SET statements are allowed between declarations, they declare global variables and assign initial values to them.
10847
10848	Update
10849
10850	Add new testcases: ack and catch
10851
10852	(instr_add,instr_sub,instr_mul,instr_div): Adjust stack (instr_result): Fix the debug diagnostics (instr_builtin): Advance pc before calling the handler, so it can use env_catch (instr_variable,instr_asgn,instr_svalidate,instr_arg) (instr_return,instr_adjust,instr_popreg,instr_pushreg): Provide appropriate debug diagnostics (bi_hasmx): Call freemx only ig getmx returned success. Call env_catch otherwise
10853
10854	(FUNC declaration): Assign the entry point early to properly handle recursive functions (variable): Throw error if the variable is not defined
10855
10856	Update
10857
10858	Implement user-defined functions
10859
108602006-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10861
10862	Update
10863
10864	(SYM_.*): Move defines to mailfrom.h (symbol_enumerate): new function (function_install): New function
10865
10866	(struct eval_environ): New member `base' (pop): Return popped value (instr_ston): Fix format spec (instr_echo): New instruction (env_make_frame, env_leave_frame): New functions (env_catch): Create normal stack frame for the catch handler. Pass it the exception code as its argument. (print_code): New function.
10867
10868	(mlfi_helo, mlfi_envfrom, mlfi_envrcpt, mlfi_header) (mlfi_eoh, mlfi_body, mlfi_eom): Create normal stack frame before calling the handler. (main): Use print_code to handle --dump-code option
10869
10870	(node_type_echo): New node type (symbol_enumerator_t): New data type (symbol_enumerate): New function) (instr_echo): New instruction (env_make_frame,env_leave_frame,function_install): New functions
10871
10872	(echo): New statement. Begin implementing user-defined functions
10873
10874	Update
10875
10876	(struct eval_environ): New member `catch' (instr_catch): New function (env_catch): New function (dump_locus,dump_push_immediate,dump_symbol,dump_branch,dump_return) (dump_header,dump_builtin,dump_variable,mx_match): Change signature. All callers updated (instr_catch,dump_catch): New function (env_init): Initialize catch array
10877
10878	(mf_status_count): New value (struct catch_node): New data type (node_type_catch): New node type (instr_catch): New function
10879
10880	Implement catch statement
10881
108822006-08-20  Sergey Poznyakoff  <gray@gnu.org.ua>
10883
10884	Update
10885
10886	(instr_fnmatch_mx,instr_regex_mx): New functions (instr_regex,instr_regcomp): Rewritten
10887
10888	(bin_regex,struct regex_node): Remove (struct bin_node): New member qualifier (node_type_push,node_type_regcomp): New node types (struct node.v.re): Removed
10889
10890	(MXMATCHES,MXFNMATCHES): New tokens
10891
10892	Implement MX MATCHES and MX FNMATCHES. Change handling of compiled regular expressions. (%union): New member matchtype (MXMATCHES,MXFNMATCHES): New tokens (optimize,optimize_node): New function (codegen): Call optimize
10893
10894	Update
10895
10896	Update for new --test semantics
10897
10898	(instr_add,instr_sub,instr_mul,instr_div) (instr_neg,env_set_variable): New functions.
10899
10900	The --test option takes an optional argument specifying which state handler to test.  Only one handler can be tested per invocation. Command line interface allows to define all types of variables (sendmail, mailfromd and positional arguments).
10901
10902	(bin_add,bin_sub,bin_mul,bin_div): New binary opcodes (unary_minus): New unary opcode (instr_add,instr_sub,instr_mul,instr_div,instr_neg): New functions (env_init,env_push_string,env_push_number,env_set_variable): New declarations. (test_program): Removed (mailfromd_test): New declaration
10903
10904	Add arithmetical operations. Fix the implicit type conversion rules. (test_program): Removed (mailfromd_test): New function
10905
109062006-08-19  Sergey Poznyakoff  <gray@gnu.org.ua>
10907
10908	Update
10909
10910	Update to 1.9.92
10911
10912	(freemx): New function
10913
10914	Update copyright year
10915
10916	(bi_hasmx): use freemx
10917
10918	(check_mx_records): Use freemx
10919
10920	Rearrange and add comments
10921
10922	Return CODE only for strings consisting of three digits. Other number of digits form NUMBER token. Allow to split strings among multiple lines using \ as the last character on the line
10923
10924	Use verbose error diagnostics. (NUMBER): New token
10925
109262006-08-18  Sergey Poznyakoff  <gray@gnu.org.ua>
10927
10928	Update
10929
10930	Add new test case (arg)
10931
10932	Bugfixes
10933
10934	Update
10935
10936	Indentation fix
10937
10938	(env_init,env_push_string,env_push_number): New functions. (get_rcpt_count,clear_rcpt_count,incr_rcpt_count): New functions (define_numeric_var): Remove function (bi_numrcpt): Directly update %rcpt_count cell. (bi_greylist): Directly update %greylist_seconds_left cell (builtin_setup): Initialize offsets of the internal variables
10939
10940	(struct message_data): Remove numrcpt (mlfi_helo,mlfi_envfrom,mlfi_envrcpt,mlfi_header,mlfi_eoh) (mlfi_body,mlfi_eom): Init env and pass positional parameters. (mlfi_envrcpt): Update rcpt_count variable using incr_rcpt_count (mlfi_eom): Clear %rcpt_count
10941
10942	(node_type_arg): New node type (define_numeric_var): Removed (get_rcpt_count,clear_rcpt_count,incr_rcpt_count): New functions (mf_status_str): New declaration (builtin_variable_install): Change return value
10943
10944	$N notation (positional parameter) Fix IDENTIFIER rule to accept single-character identifiers
10945
10946	Handle positional arguments (state_tag,state_args): New variables (action: ACT_CONTINUE, ACT_DISCARD): Initialize $$->v.ret to all zeros. (parse_config): Fix return value (mf_status_str): extern (test_program): Call env_init  (builtin_variable_install): Change return value
10947
10948	(format_status): Remove function. Use mf_status_str instead.
10949
10950	Update
10951
10952	Update
10953
10954	(ignore_failed_reads_option): New variable Do not use debug level 100, it is reserved for instruction traces. (--ignore-failed-reads): New option
10955
10956	(DEFAULT_RATE_DATABASE): Include suffix
10957
10958	Debug level 100 is reserved for instruction traces
10959
10960	(db_list_item,db_delete): Include trailing nul to the key size (db_expire): Do not return error on failed reads if ignore_failed_reads_option is set. (db_compact): Add trailing zero to the keys missing it.
10961
10962	Include trailing nul to the  key size.
10963
10964	Update
10965
10966	Remove NDBM and DBM support. Implement locking functions.
10967
10968	(db_format_setup): Initialize locking parameters
10969
10970	(DEFAULT_DATABASE): File name with suffix
10971
10972	(db_compact): Implement locking. Improve error checking.
10973
10974	Lock the database before writing to it
10975
10976	Remove NDBM and DBM support
10977
10978	Update
10979
10980	(mu_dbm_file_name): New function Remove obsolete __P() declaration wrappers.
10981
10982	(mu_dbm_file_name): New function (mu_dbm_stat): Rewrite using mu_dbm_file_name.
10983
10984	 (options --expire,--list,--delete): Do not take argument. --format and/or --file should be used instead (--format, --file): New options
10985
10986	(struct db_format): New data type (db_format_install,db_format_lookup): New functions
10987
10988	(SYM_DB_FORMAT): New symbol state (struct symtab.v): New member db (db_format_install,db_format_lookup): New functions
10989
10990	(all functions): Change data types to int. Improve error checking (db_compact): New function (Note: no locking so far!)
10991
10992	Rewritten using new DB format handling primitives
10993
109942006-08-17  Sergey Poznyakoff  <gray@gnu.org.ua>
10995
10996	Update
10997
10998	New testcase
10999
11000	Add ml.exp
11001
11002	Add ml.rc, ml.pat
11003
11004	(bi_greylist): Define greylist_seconds_left in both branches of the conditional.
11005
11006	(ctx_setreply): Implement multy-line responses.
11007
11008	(sendmail_mlreply): New function.
11009
11010	Implement multy-line strings
11011
11012	Bugfixes
11013
11014	Rewrite db_expire to avoid skipping some keys using broken backends (namely, GDBM)
11015
11016	A wrapper to implement multy-line responses
11017
11018	(mailfromd_SOURCES): Add ml.c
11019
11020	Update
11021
11022	(RCFILES,PATFILES): Add numrcpt test
11023
11024	(mlfi_envrcpt): Define %rcpt_count
11025
11026	Add comparison operators (<,<=,>,>=) (struct eval_environ): Remove mailpool. Use heap to keep string values. Remove numrcpt. The number of recipients is kept in the variable %rcpt_count (pushs): New function (instr_arg): New function (for future use) (env_set_numrcpt,env_alloc,free_meme): Removed (define_numeric_var): New function
11027
11028	Add comparison operators (<,<=,>,>=) (define_numeric_var): New function
11029
11030	Add comparison operators (<,<=,>,>=)
11031
110322006-08-16  Sergey Poznyakoff  <gray@gnu.org.ua>
11033
11034	Update
11035
11036	(SYM_VARIABLE): New entry state. (struct symtab.name): Move to the union. All references updated. (variable_install,variable_lookup): New functions.
11037
11038	(stack_size): new variable (struct eval_environ): Remove stacksize. New members: toh, var (struct environ_state): Remove (push): Do not realloc stack. Take into account heap top when computing stack space left. (heap_reserve): New function (instr_return): Remove third immediate argument (message). Take it from the stack instead (dump_return): Likewise (instr_concat,instr_variable,instr_asgn,instr_svalidate): New instructions. (struct optab): Add new instructions (eval_environment): Initialize tos and toh (create_environment): stack_size gives the total size of the stack+heap. Allocate memory for the variable array. (bi_greylist): Do not prolong greylisting period if the function is called within a greylisting interval. Variable greylist_seconds_left keeps the number of seconds left to the end of the greylisting period. (builtin_setup): Install greylist_seconds_left variable.
11039
11040	(stack_size, variable_count): New variables. (struct return_node.message): Change type to NODE (struct concat_node, asgn_node): New data types (node_type_concat,node_type_asgn,node_type_variable): New node types. (struct node.v): add new structures. (instr_concat,instr_variable,instr_asgn,instr_svalidate): New instructions. (struct function): New member `name' (struct varuable): New structure (variable_install,variable_lookup,builtin_variable_install): New functions.
11041
11042	Implement internal variables (%name notation)
11043
11044	Implement concatenation of expressions and internal variables
11045
11046	Start rewriting
11047
110482006-08-14  Sergey Poznyakoff  <gray@gnu.org.ua>
11049
11050	Update
11051
11052	(MARK_LOCUS): Optimize insertion of instr_locus codes.
11053
11054	Initial commit
11055
110562006-08-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11057
11058	Update
11059
11060	(instr_header): Allocate header_node
11061
110622006-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11063
11064	Update
11065
11066	Call umask in child process. Set default umask to 0117.
11067
11068	Update
11069
11070	New file
11071
11072	Add new files
11073
11074	(start_daemon): Prefix config name with MAILFROMD_ETC_DIR only if it does not already begin with / (mailfromd_init): Initialize MAILFROMD_STATE_DIR instead of doing it in (default_mailfromd_start) (default_mailfromd_version, mailfromd_version) (mailfromd_check_capability,mailfromd_exec): New functions (mailfromd_pat): New keyword :RCDIR
11075
11076	(RCFILES): Add cidr.rc, cond.rc, greylist.in, relayed.list, relayed.rc (PATFILES): Add greylist.pat (CLEANFILES, noinst_DATA): Add greylist.rc (.in.rc): New implicit rule
11077
11078	(SUBDIRS): Remove .
11079
11080	(eval_environment): Initialize status to SMFIS_CONTINUE.
11081
11082	(mailfromd_show_defaults): Print version instead of the method.
11083
11084	(line_finish): Extra debug
11085
11086	Remove stray AC_DEFINE
11087
11088	Update
11089
11090	Initial import
11091
11092	Initial import
11093
11094	(option_pidfile): Assign *pval (mailfromd_daemon): Bail out if daemon fails
11095
11096	(AC_CONFIG_FILES): Add testsuite/* Makefiles
11097
11098	(SUBDIRS): Add testsuite
11099
111002006-08-11  Sergey Poznyakoff  <gray@gnu.org.ua>
11101
11102	Update
11103
11104	New test greylist
11105
11106	New option --log-tag (-L) sets syslog tag.
11107
11108	Warn if accept is used with arguments. Check codes and xcodes for reject and tmpfail actions.
11109
111102006-08-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11111
11112	Update
11113
11114	(struct eval_environ) Remove statepool and smtp_state. (environ_save_state,environ_restore_state,environ_state_free): Remove. (instr_symbol): Fix debug diagnostic corresponding to previous cases of deferred evaluation. (instr_pushenv,instr_iter,dump_iter,instr_suspend): Remove (dump_code): Take two arguments. (eval_environment): Check second argument type (prog_counter_t). (environment_get_null_symbol): Return location where the undefined symbol occurs in the memory location pointed to by the second variable. (bi_numrcpt): Remove non-local jump
11115
11116	(check_on_host): Be more liberal. Return mf_temp_failure if any transport error occurs Send QUIT after exiting the loop, so that we close the transaction correctly even if we get a negative reply. (xeval,mlfi_eval): New functions. (mlfi_helo,mlfi_envfrom,mlfi_envrcpt,mlfi_header,mlfi_eoh) (mlfi_eom,mlfi_body): Use mlfi_eval to evaluate the response. (smfilter,milter_enable_state): Set all handlers on request, when a specified PROG is available to avoid useless milter calls.
11117
11118	(enum smtp_state): smtp_state_first marks first executable SMTP state, smtp_state_count gives the number of available states. (struct iter_node,node_type_iter,instr_iter,instr_pushenv) (instr_suspend): Removed. (entry_point): New global data (environment_get_null_symbol): Return locus in the location pointed to by the second argument. (codegen): Remove declaration (dump_code): Accepts two arguments.
11119
11120	(iter): Remove keyword (prog): New keyword
11121
11122	Major change in confguration language. By default all code will be executed in envfrom SMTP state. The parts of code enclosed in 'PROG <state> DO ... DONE' will be executed when the requested <state> is handled. Deferred evaluation is considered a failed experiment and is removed. ITER statement is removed as well, since it is no longer needed.
11123
11124	(_getmx,cnameloop): Use res_n* functions to assure thread safety.
11125
11126	(db_expire): Rewritten the loop after the proposal of Jan Rafaj.
11127
11128	Raise version number to 1.9.91
11129
11130	Add Jan Rafaj
11131
111322006-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
11133
11134	Fix
11135
11136	Update
11137
11138	Exit immediately if any of the --dump options was given
11139
11140	(code_node): Optimize code generation for `ON POLL' statements, avoiding multiple generation of action code for `or' branches.
11141
111422006-08-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11143
11144	Update
11145
11146	(instr_symbol): Improve debugging messages (bi_match_cidr): New builtin.
11147
11148	(mlfi_helo): Do not clear md->helostr after processing. We don't rely on sendmail setting $s any more.
11149
111502006-08-01  Sergey Poznyakoff  <gray@gnu.org.ua>
11151
11152	Update
11153
11154	(AC_ARG_WITH([berkeley-db])): Fix the help string
11155
11156	Update
11157
11158	(code_instr,code_immediate): Take const argument (bi_resolve): Fix inet_ntoa usage (dbmap_lookup_p): Change first argument
11159
11160	(mlfi_header,mlfi_header,mlfi_eoh): Initial implementation. (milter_enable_state): New function (set_milter_header,set_milter_body): Removed Removed "API control" options (--milter-body and --milter-header).
11161
11162	(struct builtin_node) const struct builtin (code_instr,code_immediate): Take const argument (milter_enable_state): New function
11163
11164	(%union): const struct builtin (iter): Call milter_enable_state
11165
111662006-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>
11167
11168	Update
11169
11170	(dbmap_lookup_p): Protect the text by ifdef USE_DBM (builtin_setup): Do not install bi_dbmap if DBM is not used.
11171
11172	(get_smtp_domain): New function (main): Remove initialization of smtp_domain.
11173
11174	(smtp_domain): Removed declaration; (get_smtp_domain): New function
11175
11176	Use get_smtp_domain() instead of smtp_domain
11177
11178	Update
11179
11180	(mlfi_envrcpt): Remove implicit looping in envrcpt state. (struct message_data): Remove envstate. All references updated
11181
11182	Support ITER construct (struct eval_environ): New member statepool (struct environ_state): New member next (environ_save_state): Create the state in the internal environment memory pool (destroy_environment): Free states from the pool (instr_pushenv,instr_iter,dump_iter,instr_suspend): New functions
11183
11184	Support ITER construct
11185
11186	Support ITER construct (string_to_state,state_to_string): New functions
11187
11188	(string_to_state,state_to_string): New functions (instr_iter,instr_pushenv,instr_suspend): New functions (struct iter_node): New data type
11189
111902006-07-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11191
11192	Update
11193
11194	Use direct boolean arithmetics: 1 means true, 0 means false. (bi_resolve,bi_hasmx): New builtins
11195
11196	Use direct boolean arithmetics: 1 means true, 0 means false.
11197
11198	Update
11199
11200	Initial commit
11201
11202	Update
11203
11204	(instr_rate): Bugfix
11205
11206	(struct option_cache): New option cumulative (sync with 1.x) Mark relay as cumulative (set_option): Ignore override for cumulative options
11207
11208	Update version number to 1.9.90
11209
11210	Update
11211
11212	(environ_state_free): State can be NULL (bi_dbmap): Fix order of arguments
11213
11214	(mu_dbm_open): Fix for DB 3.x
11215
11216	New option --group (pragrma group) (switch_to_privs): Retain groups specified with --group options (mailfromd_show_defaults): Show DB version in use. (main): Call MU_AUTH_REGISTER_ALL_MODULES
11217
11218	Change DB options to those used by MU configure.
11219
11220	Update
11221
11222	(struct eval_environ): New fields numrcpt, smtp_state (struct environ_state): New data type (environ_save_state,environ_restore_state,environ_state_free): New functions. (instr_ston,instr_ntos): Bugfix: do not advance pc (instr_symbol): Do not set env->status before longjump (env_set_numrcpt): New function (eval_environment): Take 2nd argument: the smtp state (bi_numrcpt,bi_validuser,bi_dbmap): New builtins (builtin_setup): Register new builtins
11223
11224	(struct message_data): New member envstate (priv_get,filter_cleanup): Handle envstate (mlfi_helo,mlfi_envfrom): Update call to eval_environment (mlfi_envrcpt): Save environment state on the first call, restore it on subsequent ones. Keep track of the number of recipients. (mlfi_header): Call eval_environment (mlfi_eom): Call eval_environment. Return tempfail if the configuration program did not finish. (capa): Use "auth" capability
11225
11226	(enum node_type): New type node_type_number (enum smtp_state, environ_state_t): new data type (eval_environment): Takes 2nd argument: smtp_state. All callers updated. (environ_save_state,environ_restore_state,environ_state_free): New functions. (emalloc): New prototype
11227
11228	Allow numeric constants in the program
11229
11230	(MAILUTILS_LIBS): Link with MU Auth
11231
112322006-07-29  Sergey Poznyakoff  <gray@gnu.org.ua>
11233
11234	Update
11235
11236	(get_rate): Remove unused variable
11237
11238	(check_mx_records): Add default case (listens_on): New function (for compatibility with 1.x branch) (mlfi_eom): Clear numrcpt (main): Call builtin_setup. Check return value of codegen
11239
11240	Add missing prototypes. Make debug macros safe to use within if blocks (struct builtin, struct function): New data types
11241
11242	Introduce builtin functions. Remove rules for HOSTNAME and RELAYED: they are builtins now
11243
11244	(mailfromd_SOURCES): Add symtab.c
11245
11246	Initial commit
11247
112482006-07-26  Sergey Poznyakoff  <gray@gnu.org.ua>
11249
11250	Update
11251
11252	(get_immediate): Compensate for changes in eval_environment (eval_environment): Fix reenterability: increase env->pc only when the instruction returns successfully.
11253
11254	(struct message_data): New members env, helostr and numrcpt (priv_get): Initialize new message_data members (ctx_getsym): Special handling for $s - sendmail does not set it when calling xxfi_helo (filter_cleanup): Use priv_get instead of MLFIPRIV Destroy the environment (mlfi_helo): Use priv_get instead of MLFIPRIV Set md->helostr (mlfi_envfrom): Use priv_get instead of MLFIPRIV Use md->env instead of creating new environment (mlfi_envrcpt): Increase numrcpt (mlfi_eom): Use priv_get instead of MLFIPRIV
11255
11256	(LDADD): Use MILTER variable instead of hardcoding -lmilter
11257
11258	Implement --with-forks option from 1.x branch.
11259
112602006-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
11261
11262	Update
11263
11264	Adopt new MU namespace (instr_and,instr_or): Remove
11265
11266	Adopt new MU namespace New option --source
11267
11268	(instr_and,instr_or): Remove Adopt new MU namespace
11269
11270	Adopt new MU namespace
11271
11272	Adopt new MU namespace (code_node): Fix generation of 'and' and 'or' code
11273
11274	Remove MU_COMPAT. We need the latest mailutils (pre 1.0)
11275
112762006-01-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11277
11278	Updated
11279
11280	(check_portspec): Fix eventual coredump and add more checks.
11281
112822006-01-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11283
11284	Updated
11285
11286	(adjust_stack): Fix typo (reverted sign) (get_immediate): pc is already advanced by 1 by the time the function is called. (instr_bz, instr_bnz, instr_jmp): Fix 2nd. argument to advance_pc (instr_callout): Fix typo: adjust_stack instead of advance_pc.
11287
11288	(config_dump): Renamed to config_dump_tree. (code_dump): Renamed to config_dump_code. New opions --dump-tree (eq. --debug=d), --dump-grammar-trace (eq. --debug=y), --dump-lex-trace (eq. --debug=l), --dump-code (eq. --debug=c).
11289
11290	(code_node): Use BNZ for branching. [poll]: bugfix
11291
11292	Fix typo
11293
11294	Update
11295
11296	(code_dump): New  variable (--debug=c option) (ctx_getsym,ctx_setreply,ctx_setheader): Moved from gram.y (mlfi_envfrom): Rewritten using new functions (decode_debug): Handle [cC] (main): Generate code and, if required, print it on stdout
11297
11298	(regex_flags): Extern declaration (eval_environ_t,instr_t,prog_counter_t): New types. (instr_xchg,instr_ston,instr_ntos,instr_locus,instr_push_immediate) (instr_symbol,instr_bz,instr_bnz,instr_jmp,instr_callout,instr_dup) (instr_cmp,instr_pop,instr_and,instr_or,instr_regex,instr_regcomp) (instr_fnmatch,instr_not,instr_next,instr_return,instr_header) (instr_resolve,instr_relayed_domain,instr_rate,instr_eqn,instr_eqs) (instr_nen,instr_nen,create_environment,destroy_environment) (eval_environment,environment_get_status,codegen) (parse_error_locus): New functions
11299
11300	Return EQ and NE as keywords. (parse_error_locus): New function.
11301
11302	(codegen): Add code generation functions. (name_comp,name_destroy,dict_init,dict_install,dict_destroy) (dict_getsym): Move to prog.c (eval_poll,eval_hostname,eval_rate,eval_node) (eval_node_list,run_program): Remove runtime evaluation functions (ctx_getsym,ctx_setreply,ctx_setheader): Moved to main.c (test_program): Rewritten using new functions
11303
11304	Run-time evaluation
11305
11306	(mailfromd_SOURCES): Add rate.c
11307
113082006-01-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11309
11310	Update
11311
11312	Update
11313
11314	Remove leftover argc_unquote_char
11315
113162006-01-05  Sergey Poznyakoff  <gray@gnu.org.ua>
11317
11318	Updated
11319
11320	Updated
11321
11322	Updated
11323
11324	(check_portspec): New function.
11325
11326	Mention BROKEN_PTHREAD_SLEEP Sendmail variable
11327
11328	Raise version number to 1.3
11329
113302005-11-24  Sergey Poznyakoff  <gray@gnu.org.ua>
11331
11332	Updated
11333
11334	(AM_CPPFLAGS): Define MU_COMPAT, needed for latest mailutils.
11335
113362005-09-20  Sergey Poznyakoff  <gray@gnu.org.ua>
11337
11338	(resolve_ipstr): Lock critical section
11339
11340	Updated
11341
11342	(resolve_ipstr): Removed in favor of the new implementation.
11343
11344	(resolve_ipstr): New implementation, taking into account cnames.
11345
113462005-08-18  Sergey Poznyakoff  <gray@gnu.org.ua>
11347
11348	Updated
11349
113502005-08-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11351
11352	Updated
11353
11354	 Raised version number to 1.2
11355
11356	(AUTOMAKE_OPTIONS): New variable
11357
11358	Added to the repository
11359
11360	(db_delete): Fix
11361
11362	Updated
11363
11364	(rate_delete): New function
11365
11366	Option --delete takes an optional argument, as --list and --expire
11367
11368	(db_delete): New function
11369
11370	(cache_delete): Rewritten using db_delete
11371
11372	Updated
11373
11374	(line_add_unescape): Use argcv_unquote_char
11375
11376	Updated
11377
11378	(getmx): Return immediately in mf_temp_failure.
11379
11380	Use separate expiration times for \negative and positive entries.
11381
11382	Use separate expiration times for negative and positive entries.
11383
113842005-08-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11385
11386	Updated
11387
11388	New option --syslog (cancels --stderr). (parse_opt) Make sure the errors are reported on stderr wherever it is connected to a tty (unless in daemon mode or otherwise directed by --syslog option).
11389
113902005-08-08  Sergey Poznyakoff  <gray@gnu.org.ua>
11391
11392	Minor fixes
11393
11394	Updated
11395
11396	(node_type_continue): Renamed to node_type_next
11397
11398	(NEXT): New token
11399
11400	(stmtlist): Bugfix (NEXT): New token
11401
11402	Updated
11403
11404	(node_type_continue): New node type
11405
11406	(ACT_CONTINUE): Continue execution of the program
11407
11408	Update
11409
11410	New file
11411
11412	(get_rate): Optimized expiration logic. (rate_list_item,rate_list_db): Rewritten using functions from db.c (rate_expire_db): New function
11413
11414	(MAILFROMD_EXPIRE_RATEDB): New mode (parse_opt): Removed --list-rates option. Both --list and --expire now take an optional argument, specifying which database to operate upon. (set_rates_expire): New function. Handles rates-expire-interval pragma.
11415
11416	(cache_list_item,cache_list_db,cache_expire_db): Rewritten using functions from db.c
11417
11418	(db_item_printer_t,db_expire_t): New types (rate_expire_db,db_list_item,db_list,db_expire): New functions
11419
11420	(mailfromd_SOURCES): Add db.c (AM_CPPFLAGS): Define DEFAULT_EXPIRE_RATES_INTERVAL
11421
11422	(DEFAULT_EXPIRE_RATES_INTERVAL): New variable
11423
114242005-08-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11425
11426	Updated
11427
11428	Documented rate statement
11429
11430	Rename getmx_status to mf_status
11431
11432	Add support for rate statement
11433
11434	Add rate.c
11435
11436	Added to the repository
11437
11438	Complain if a DB support is required but not found.
11439
114402005-07-31  Sergey Poznyakoff  <gray@gnu.org.ua>
11441
11442	Updated
11443
11444	(_getmx): Fix eventual buffer overflow.
11445
11446	(check_on_host): Destroy IO data only if these have been initialized.
11447
114482005-07-28  Sergey Poznyakoff  <gray@gnu.org.ua>
11449
11450	Update
11451
11452	Do not include gram.h         (eval_hostname): Return with unmodified val if resolve_ipstr         fails.
11453
11454	Updated
11455
11456	Include resolv.h after netinet/in.h
11457
11458	Bugfix: place LIBOBJS into LDADD
11459
11460	Raised version number to 1.1         Check for argcv_unescape_char vs. argcv_unquote_char (CVS         mailutils declares the latter).
11461
114622005-06-30  Sergey Poznyakoff  <gray@gnu.org.ua>
11463
11464	Updated
11465
11466	Fixed usage of @email{}
11467
11468	Minor fixes in @url usage
11469
114702005-06-17  Sergey Poznyakoff  <gray@gnu.org.ua>
11471
11472	Updated
11473
11474	(method_strict): Give precedence to temporary failure, if it occurs in any poll. (method_standard): Check the client host unless mx check gives success. Give precedence to temporary failure, if it occurs in any poll.
11475
11476	(cache_expire_db): Check for res==NULL.
11477
114782005-06-16  Sergey Poznyakoff  <gray@gnu.org.ua>
11479
11480	Updated
11481
11482	(eval_poll): Fix wording in the trace message
11483
11484	Updated
11485
11486	(smtp_send2,smtp_send3): Send fully formed command, along with final CRLF, in one go.
11487
114882005-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11489
11490	(method_standard): Bugfix: probe MXs first.
11491
114922005-06-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11493
11494	Updated
11495
11496	Updated
11497
11498	Updated
11499
11500	Finished
11501
11502	(distuninstallcheck_listfiles): New variable. The install-data-local rule in etc/Makefile.am breaks distuninstall checks, hence the need to fix it.
11503
11504	Raised version number to 1.0
11505
11506	Updated
11507
11508	check_on_host,check_mx_records,method_strict,method_standard): Accept two additional arguments.
11509
11510	(smtp_domain,postmaster_email): External declarations.
11511
11512	Handle new keywords: not, as, from.
11513
11514	Allow two additional arguments to poll: as and from.
11515
11516	Install mailfromd.rc
11517
11518	Updated to match recent changes.
11519
11520	Warn if DBM support is not configured
11521
115222005-06-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11523
11524	Updated
11525
11526	Changed option handling
11527
11528	Add new declarations
11529
11530	Parse pragma directives
11531
11532	Add configurable regcomp flags. (parse_pragma): New function
11533
11534	Add missing includes. (free_mx_buffer): Removed
11535
11536	(MAILFROMSTATEDIR): Remove definition
11537
11538	Added to the repository
11539
11540	New subst variable MAILFROMSTATEDIR
11541
11542	(SUBDIRS): Add etc
11543
11544	Minor formatting fixes
11545
11546	Bugfix
11547
115482005-06-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11549
11550	Updated
11551
11552	(relayed_domain_p): Verify full hostname as well (method_strict,method_standard): Return success on empty email.
11553
11554	Implement new keyword 'relayed'
11555
11556	Updated
11557
11558	(do_trace): New variable (option --trace) (vlogmsg,logmsg,transcript): Fixed signature (const char *fmt). (trace): New function. (parse_opt): Handle --trace option.
11559
11560	(debug4,debug5,debug6): New macros (struct locus): new data type (struct poll_action, struct node): Include locus (get_locus, trace): New functions
11561
11562	Return locus along with the keyword
11563
11564	Improved tracing and debugging output
11565
11566	(EXTRA_DIST): Added gram.h
11567
11568	Raised version number to 0.9.9
11569
11570	Updated
11571
11572	Reimplement header operations
11573
11574	New keyword HOSTNAME.
11575
11576	Use new debug macros
11577
11578	New debug macros. (node_type_hostname): New node type
11579
115802005-06-08  Sergey Poznyakoff  <gray@gnu.org.ua>
11581
11582	Updated
11583
11584	src/.cvsignore
11585
11586	Major rewrite: removed predefined and configurable actions, get *the program* to be executed from the configuration file.
11587
11588	Add new includes (DEFAULT_CONFIG_FILE): New define Add parse tree-related data types (parse_error,yyparse,source,parse_config): New declarations
11589
11590	 mailutils/mailutils.h are now included from mailfrom.h
11591
11592	(mailfromd_SOURCES): Add gram.y lex.l (AM_CPPFLAGS): Define SYSCONFDIR (AM_YFLAGS,AM_LFLAGS): New vars
11593
11594	Configuration file lexical analyzer.
11595
11596	Configuration file grammar and run-time support.
11597
11598	Check for yacc and lex
11599
11600	Updated
11601
11602	(smtp_stream_wait): Take an additional argument: number of attempts. Loop until the stream is ready or the number of attempts is exhausted. All callers updated.
11603
116042005-06-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11605
11606	Updated
11607
11608	Updated
11609
11610	(method_fp,method_standard,method_strict): Changed return type. All callers updated. (check_on_host): Issue EHLO if remote party refuses HELO.
11611
116122005-06-06  Sergey Poznyakoff  <gray@gnu.org.ua>
11613
11614	Updated
11615
11616	(method_standard): Check the host first, only if it does not answer, check MXs.
11617
11618	Minor fix
11619
11620	(install-data-local): use $(mkdir_p)
11621
11622	Updated
11623
11624	Updated
11625
11626	(action_failure_default): Changed to return:reject (SMTP_MAJOR): New macro (check_on_host): Use SMTP_MAJOR
11627
11628	More docs
11629
116302005-06-05  Sergey Poznyakoff  <gray@gnu.org.ua>
11631
11632	Updated
11633
11634	(add_header): Removed. Use per-message private data to keep it. All referers updated. (--delete): New mode (--expire): New mode
11635
11636	(cache_expire_db): New function
11637
11638	(install-data-local): Create MAILFROMSTATEDIR
11639
11640	More documentation
11641
11642	Updated
11643
11644	(capa): Add license capability.
11645
11646	(cache_get): Do not update timestamps on each retrieval.
11647
11648	Created documentation framework
11649
11650	Bugfixes
11651
11652	Updated
11653
11654	(check_mx_records): Bugfix. Provide default return value in case no MX records are found. (mailfromd_show_defaults): Show MAILFROMSTATEDIR
11655
11656	(_getmx): Rewritten using BIND-4-style interface. See comment to this function for the reasons of this regress.
11657
11658	(DEFAULT_PIDFILE,DEFAULT_DATABASE): Use MAILFROMSTATEDIR instead of LOCALSTATEDIR.
11659
11660	(AM_CPPFLAGS): Define MAILFROMSTATEDIR instead of LOCALSTATEDIR (LDADD): Get rid of static linkage with libresolv
11661
11662	(DEFAULT_SOCKET): Change default
11663
116642005-06-04  Sergey Poznyakoff  <gray@gnu.org.ua>
11665
11666	Updated
11667
11668	Added to the repository
11669
11670	(postmaster_email): New variable (check_on_host): Use postmaster_email instead of hardcoding <> address. (options): New option --postmaster-email; Fixed several bugs. (parse_opt): Handle --postmaster-email option. Minor fixes.
11671
11672	(AC_CONFIG_FILES): Add doc/Makefile
11673
11674	(SUBDIRS): Add doc
11675
11676	Bugfix
11677
11678	Bugfix
11679
11680	Get rid of xmalloc
11681
11682	Updated
11683
11684	New file
11685
11686	Caching functions
11687
11688	Added to the repository
11689
11690	Moved from ../. Added result caching and new operating modes.
11691
11692	Moved from ../
11693
11694	Moved to src/
11695
11696	Updated for deep directory structure. Detect DBM/NDBM/GDBM, define variables for caching. Raised version number to 0.2
11697
11698	Updated for deep directory stru\cture
11699
11700	Updated
11701
11702	Implemented two methods: standard (the default) and strict (the one that was implemented initially).
11703
11704	Do not skip hostname when checking. Handle both IP address and FQDN as input.
11705
11706	(parse_action): Use strtok_r
11707
11708	Removed standard file
11709
11710	Updated
11711
11712	Rewritten action system. Documented the code.
11713
117142005-06-03  Sergey Poznyakoff  <gray@gnu.org.ua>
11715
11716	Updated
11717
11718	(parse_opt): Ordered switch cases. (main): Switch to user's privileges only if started as root.
11719
11720	Updated
11721
11722	Initial revision
11723
117242005-06-03  (no author)  <(no author)@7a8a7f39-df28-0410-adc6-e0d955640f24>
11725
11726	New repository initialized by cvs2svn.
11727
11728
11729Local Variables:
11730mode: change-log
11731version-control: never
11732buffer-read-only: t
11733End:
11734Local Variables:
11735mode: change-log
11736version-control: never
11737buffer-read-only: t
11738End:
11739