/ [mailfromd] / trunk / ChangeLog
To checkout: svn checkout http://svn.gnu.org.ua/sources/mailfromd/trunk/ChangeLog
Puszcza

Annotation of /trunk/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1779 - (hide annotations)
Thu Mar 12 21:55:08 2009 UTC (12 years, 7 months ago) by gray
File size: 203839 byte(s)
Fix the current_message function and subprocess handling in mtasim.

* mtasim/mtasim.c (stop_mailfromd): Wait for the mailfromd child
to terminate and analyze its return status.

* mfd/bi_msg.m4 (bi_drop_current_message): New function.
* mfd/prog.c (env_capture_start): Call bi_drop_current_message if
the capture stream already exists (i.e. when starting processing
2nd or later message in a session).
* mfd/msg.h (bi_drop_current_message): New prototype.
* gacopyz/server.c (srv_connect): Retry attempts to connect
if they fail with ECONNREFUSED. Implement 5-second timeout.

* tests/testsuite.at (MAILFROMD_OPTIONS): New define.
(AT_MTA_TEST): Pass MAILFROMD_OPTIONS to mtasim invocation.
(AT_WITH_MAILFROMD_OPTIONS): New macro.
Include curmsg.at.
* tests/curmsg.at: New file
* tests/etc/Makefile.am (RCFILES): Add size.rc
* tests/etc/size.rc: New file

<
1 gray 1779 2009-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
2    
3     Fix the current_message function and subprocess handling in mtasim.
4    
5     * mtasim/mtasim.c (stop_mailfromd): Wait for the mailfromd child
6     to terminate and analyze its return status.
7    
8     * mfd/bi_msg.m4 (bi_drop_current_message): New function.
9     * mfd/prog.c (env_capture_start): Call bi_drop_current_message if
10     the capture stream already exists (i.e. when starting processing
11     2nd or later message in a session).
12     * mfd/msg.h (bi_drop_current_message): New prototype.
13     * gacopyz/server.c (srv_connect): Retry attempts to connect
14     if they fail with ECONNREFUSED. Implement 5-second timeout.
15    
16     * tests/testsuite.at (MAILFROMD_OPTIONS): New define.
17     (AT_MTA_TEST): Pass MAILFROMD_OPTIONS to mtasim invocation.
18     (AT_WITH_MAILFROMD_OPTIONS): New macro.
19     Include curmsg.at.
20     * tests/curmsg.at: New file
21     * tests/etc/Makefile.am (RCFILES): Add size.rc
22     * tests/etc/size.rc: New file
23    
24 gray 1777 2009-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
25    
26     * mfd/prog.c (env_capture_start): Do not create the stream if it
27     already exists. Bug reported by Con Tassios.
28     * mfd/bi_sieve.m4 (sieve): Don't free unexistend Sieve machines.
29     * THANKS: Update
30     * NEWS: Update
31    
32 gray 1775 2009-02-20 Sergey Poznyakoff <gray@mirddin.farlep.net>
33    
34     * mfd/bi_io.m4 (write): Fix spurious runtime exceptions, raised if
35     the third argument was not given.
36    
37 gray 1774 2009-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
38    
39     * mfd/engine.c (concat_args): Do not print debugging info, it is
40     done by the caller.
41     (mlfi_envfrom, mlfi_envrcpt): Include argv[0] in the debugging
42     info. This complements the yesterday's change.
43    
44 gray 1773 2009-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
45    
46     * mfd/engine.c (mlfi_envfrom, mlfi_envrcpt): Fix second argument,
47     so that it does not include $1.
48     * THANKS: Update.
49     * mflib/sa.mf (sa_format_report_header): Improve formatting.
50    
51 gray 1772 2009-02-18 Sergey Poznyakoff <gray@mirddin.farlep.net>
52    
53     * mfd/gram.y (state_parms): Fix number of arguments to
54     envfrom and envrcpt. Bug reported by Patrick Dalais
55 gray 1773 <patrick AT depari.co.za>.
56 gray 1772
57     * tests/fromargs.at, tests/rcptargs.at: New tests.
58     * tests/testsuite.at, tests/Makefile.am: Add new tests.
59     * tests/etc/ack.rc: Increase stack allocation.
60    
61 gray 1771 2008-12-26 Sergey Poznyakoff <gray@gnu.org.ua>
62    
63     Version 5.0
64    
65     * configure.ac, NEWS: Version 5.0.
66     * doc/mailfromd.texi, doc/pies.texi, doc/pmult.texi: Update.
67     * doc/Makefile.am (check-builtins): Account for
68     MF_DEFUN_VARARGS_NO_PROM.
69    
70 gray 1770 2008-12-16 Sergey Poznyakoff <gray@gnu.org.ua>
71    
72     Fix sprintf, accidentally broken on 2008-07-14.
73    
74     * mfd/symtab.c (va_builtin_install): Initialize flags to 0.
75     (va_builtin_install_ex): Remove capture and varargs, replace them
76     with flags.
77     * mfd/snarf.m4 (__mf_defun,MF_DEFUN_VARARGS): Reflect changes to
78     va_builtin_install_ex.
79     (MF_DEFUN_VARARGS_NO_PROM): New defun.
80     * mfd/gram.y (cast_arg_list): Add 4th argument, controlling
81     argument type promotion.
82     * mfd/drivers.c (code_type_builtin): Use builtin.flags.
83     * mfd/mailfromd.h (MFD_BUILTIN_*): New defines.
84     (struct builtin): Remove capture and varargs, replace them
85     with flags.
86     * mfd/bi_sprintf.m4: Define sprintf as MF_DEFUN_VARARGS_NO_PROM.
87    
88 gray 1767 2008-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
89    
90     Documentation and minor fixes.
91    
92     * pies/pies.c, pies/progman.c, pies/meta1gram.y, pies/pies.h,
93     pies/meta1lex.l: Normalize output redirection terminology, fix the
94     debug levels.
95     * pmult/pmult.c: Fix error message
96     * doc/pies.texi: Document the configuration.
97    
98 gray 1763 2008-11-28 Sergey Poznyakoff <gray@gnu.org.ua>
99    
100 gray 1765 * mfd/engine.c, mfd/gram.y, mfd/mailfromd.h, mfd/prog.c,
101     mfd/prog.h, gacopyz/gacopyz.h, gacopyz/context.c,
102     gacopyz/gacopyz.c: Add const qualifiers to gacopyz_getsymval,
103     gacopyz_replace_body and derived functions.
104    
105 gray 1763 Emulate Sendmail behavior for SMFIR_REPLBODY.
106    
107     * pmult/pmult.c (struct pmult_priv_data): New members hdrbuf and
108     body_itr. Remove body_off.
109     (pmult_append_body_chunk): Set bucket size to PMILTER_CHUNK_SIZE.
110     (pmult_clear): Free new pmult_priv_data members.
111     (pmult_free): Call pmult_clear first.
112     (pmult_eom): Initialize pmult_priv_data members for eventual body
113     replacement.
114     (pmult_msg_rplc): First send headers, then body.
115    
116 gray 1761 2008-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
117    
118     Initial implementation of body replacement.
119    
120     * mfd/engine.c (run_msgmod): Handle body_repl
121     * mfd/gram.y (msgmod_opcode_str): Likewise.
122     * mfd/mailfromd.h (enum msgmod_opcode): New constant body_repl.
123     * mfd/bi_body.m4 (replbody): New function (proof-of-concept).
124    
125     * pmult/pmult.c (struct pmult_priv_data): New fields body_off,
126     body_chunks.
127     (pmult_append_body_chunk): New function.
128     (cb_reply): Handle SMFIR_REPLBODY
129     (pmult_std_reply): Likewise.
130     (pmult_clear): Destroy body_chunks
131     (pmult_eom): Request body replacement if body_chunks is not NULL.
132     (pmult_msg_rplc,pmult_msg_rplc_stat): New functions.
133     (pmilter): Register pmult_msg_rplc and pmult_msg_rplc_stat.
134    
135 gray 1758 2008-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
136    
137 gray 1760 * pies/pies.c (component_cfg_param): New statement settle-timeout.
138     * pies/progman.c (recompute_alarm): New static;
139     (prog_start): Start the component only if all of its prerequisites
140     are running.
141     (progman_recompute_alarm): New function.
142     (progman_start): Reset recompute_alarm to 0.
143     (check_stopping): New function.
144     (progman_wake_sleeping): Handle also status_stopping and
145     status_enabled. Recompute alarm before leaving.
146     (prog_start_prerequisites): Return 0 or 1 depending on whether all
147     prerequisites have been started.
148     (prog_stop): Raise recompute_alarm for stopping components.
149     (progman_cleanup): Force status_enabled before attepmting to
150     start a component.
151     (progman_cleanup): Add a \n after debugging message.
152     Run progman_wake_sleeping unlsess expect_term is set.
153     * pies/meta1gram.y (translate_node_list): Force settle-timeout =
154     1.
155     * pies/pies.h (struct component.settle_timeout): New member.
156    
157 gray 1759 * pies/pies.c (main): New options --force, --dump-prereq and
158     --dump-depmap.
159     Refuse to start if another instance is already running.
160     (pies_check_status): New function.
161     (pies_status): Rewrite using pies_check_status.
162     * pies/progman.c (component_fixup_depend): Bugfix: move
163     mu_list_append off the conditional.
164     (progman_dump_prereq, progman_dump_depmap): New functions.
165     * pies/meta1gram.y (yyerror): Return 0.
166     * pies/pies.h (progman_dump_prereq, progman_dump_depmap): New
167     protos.
168     (meta1_parser_set_debug, meta1lex, meta1error)
169     (meta1parse): Likewise.
170    
171 gray 1758 * pies/progman.c (print_dep): New function.
172     (progman_build_depmap): Call print_dep to facilitate fixing cyclic
173     dependencies.
174     (prog_start_prerequisites): Fix debugging output.
175     Remove spurious second loop (was it a typo or copy-paste
176     leftover?)
177     (prog_stop_dependents): Fix debugging output.
178     (progman_dump_stats): Avoid race conditions between running and
179     querying instances.
180    
181 gray 1755 2008-11-17 Sergey Poznyakoff <gray@gnu.org.ua>
182    
183 gray 1756 Document and improve pmult.
184    
185     * pmult/pmult.c (debug_level): Remove.
186     (struct pmult_priv_data): Remove debug. Use pmult_debug instead.
187     (macro_trans): Define Sendmail compatibility macros cn_issuer and
188     cn_subject.
189     (builtin_macros): Fix typo in "multiplexer".
190     (define_macros): Rewrite. The "define-macros" statement takes
191     exactly two arguments, each of which can be either a string or a
192     list of strings.
193     * doc/values.texi, doc/mailfromd.texi, doc/pmult.texi: Update.
194    
195     * doc/Makefile.am (check-fixmes): Scan all texinfo documents.
196    
197 gray 1755 Fix handling of retranslators.
198    
199     * pies/pies.c (main): Call progman_build_depmap and
200     progman_create_sockets before starting up components.
201     * pies/progman.c (struct prog): New member `retr'.
202     (destroy_prog): New function.
203     (retr_tag): Change signature. Fix erroneous condition for
204     xalloc_die.
205     (register_retr): Return prog. Make static. Initialize idx
206     with -1.
207     (update_retr): Register retranslator, if necessary.
208     (progman_register_retranslators): Remove.
209     (register_prog0): 2nd argument: index.
210     (register_prog): Do not create socket at once.
211     (prog_start): Remove debugging fprintf.
212     (progman_accept): Update call to register_prog0.
213     (progman_create_sockets): New function.
214     (progman_start): Remove calls to progman_register_retranslators
215     and progman_build_depmap. They must be done only once.
216     (prog_stop_retranslators): New function.
217     (prog_stop_dependents): Call prog_stop_retranslators.
218     (progman_cleanup): Remove dangling retranslators.
219     * pies/pies.h (progman_create_sockets): New prototype.
220    
221 gray 1752 2008-11-16 Sergey Poznyakoff <gray@gnu.org.ua>
222    
223 gray 1753 Improve pies.
224    
225     * pies/pies.h (create_socket): Change proto to 3 arguments.
226     * pies/socket.c (create_socket): Take two additional arguments.
227     Allow to configure ownership and mode of created UNIX sockets.
228     * pies/progman.c (register_prog, prog_start): Update calls to
229     create_socket.
230    
231 gray 1752 Implement ctype functions.
232    
233     * mfd/bi_ctype.m4: New function.
234     * mfd/Makefile.am (inc_DATA): Add bi_ctype.m4.
235     * doc/Makefile.am (check-builtins): Update source sed expression.
236     * doc/mailfromd.texi, NEWS: Document ctype functions.
237    
238 gray 1751 2008-11-15 Sergey Poznyakoff <gray@gnu.org.ua>
239    
240     Improve handling of program privileges.
241    
242     * lib/libmf.h (struct mf_privs): New data type.
243     (get_user_groups, mf_priv_setup, mf_epriv_setup): New prototypes.
244     * lib/userprivs.c (get_user_groups, mf_priv_setup)
245     (mf_epriv_setup): New functions.
246    
247     * smap/smap.c: If user is specified, switch to effective uid/gid,
248     in order for msrv to create files with right privileges, on one
249     hand, and to be able to create pidfile in root-owned directories
250     (e.g. /var/run), on the other hand. This requires todays snapshot
251     of Mailutils.
252    
253     * pies/pies.h (struct pies_privs_data): Remove
254     (struct component): Change type of `privs' to struct mf_privs.
255     (priv_setup): Remove.
256     * pies/pies.c: Use mf_priv* stuff to manipulate privileges.
257     * pies/progman.c: Likewise.
258     * pies/meta1gram.y (list): allow for trailing comma.
259    
260 gray 1745 2008-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
261    
262 gray 1748 Bugfix.
263 gray 1750
264     * mfd/bi_string.m4 (index) (rindex): Third argument (start index)
265     can equal string length.
266 gray 1749 * pies/Makefile.am (LDADD): Add MF_PROCTITLE_LIBS
267 gray 1748 * lib/proctitle.c (mf_proctitle_format):
268     * pies/progman.c (progman_register_retranslators): Register
269     retranslators only for retr_syslog.
270     (open_retranslator): Do not prepend program name to the proctitle.
271     It is done automatically by the library.
272     * lib/proctitle.c: Declare environ.
273     Define __progname if not defined in libc.
274     (mf_proctitle_init): Set __progname.
275     (mf_proctitle_format): Prepend program name to the proctitle.
276    
277 gray 1747 Implement file output redirection.
278    
279     * pies/pies.h (enum retr_type): New constants.
280     (struct retranslator): New type.
281     (struct component): Change type of retr to struct retranslator.
282     All uses updated.
283     * pies/pies.c (_cb_retr): Takes two arguments:
284     redirection type and file name or syslog priority.
285     (make_full_name): New function.
286     (component_verify): Check retr file names.
287     * pies/progman.c (redirect_to_file): New function.
288     (open_retranslator): Handle file redirects.
289     (prog_start): Open /dev/null in wronly mode.
290     * pies/meta1gram.y (create_retr_node): New function.
291     (translate_node_list): Create default "stderr" statement.
292    
293     * lib/libmf.h (mf_proctitle_init): New prototype.
294     * lib/proctitle.c: Include stdio.h
295     * bootstrap: Fix invocation of aclocal.
296    
297 gray 1746 Implement setproctitle functionality for pies.
298    
299     * am: New directory.
300     * am/aggr.m4, am/debug.m4: New files (from acinclude.m4)
301     * am/proctitle.m4: New file.
302     * acinclude.m4: Removed.
303     * configure.ac: Call MF_PROCTITLE.
304     * lib/libmf.h (mf_proctitle_format): New prototype.
305     * lib/proctitle.c: New file.
306     * lib/Makefile.am (libmf_a_SOURCES): Add proctitle.c.
307     * Makefile.am (ACLOCAL_AMFLAGS): Add -I am
308    
309     * pies/pies.c (main): Call mf_proctitle_init.
310     * pies/progman.c (retr_tag): Rewrite in a safer way.
311     (open_retranslator): Set program title in child.
312    
313 gray 1745 Allow to complement existing components (useful for MeTA1
314     includes).
315    
316     * pies/pies.c (component_verify): New function.
317     (component_section_parser): Call component_verify.
318     (_cm_include_meta1): Reduce the tree at once.
319     (parse_meta1_conf): Not needed any more.
320     * pies/progman.c (progman_register_retranslators): New function.
321     (pies/progman.c): Do not register retranslators: wait until the
322     entire config is parsed and do that in progman_start.
323     (progman_start): Call progman_register_retranslators.
324    
325 gray 1739 2008-11-12 Sergey Poznyakoff <gray@gnu.org.ua>
326    
327 gray 1743 Implement dependencies/prerequisites in MeTA1.
328    
329     * pies/pies.c (component_cfg_param): Rename "depend" to
330     "prerequisites". Add new keyword "dependents".
331     (pies_cfg_param): New keyword "limits".
332     * pies/progman.c (struct prog): Rename "depend" to "prereq".
333     (prog_start_dependencies): Rename to prog_start_prerequisites
334     (register_prog0): Do not fill prereq. This will be done later,
335     when all dependencies are resolved.
336     (prog_rebuild_prerequisites): New function.
337     (prog_start): Per-component limitis override system-wide ones.
338     (component_fixup_depend, fixup_prerequisites)
339     (rebuild_prerequisites): New functions.
340     (progman_build_depmap): Call fixup_prerequisites and
341     rebuild_prerequisites.
342     (prog_stop_dependent): Rename to prog_stop_dependents.
343     * pies/meta1gram.y: Implement restart_dependencies.
344     * pies/pies.h (struct component): Rename "depend" to "prereq". Add
345     new member "depend".
346     (pies_limits): New extern.
347    
348 gray 1739 Implement MeTA1 configuration file parser.
349    
350     * configure.ac: Require Mailutils 1.9.93
351     * doc/mailfromd.texi, NEWS: Update.
352     * pies/pies.c (_cb_depend): Accept list argument.
353     (component_cfg_param): New statement: program.
354     (pies_cfg_param): New statements: include-meta1 and
355     meta1-queue-dir.
356     (parse_meta1_conf, pies_cfg_verifier): New functions.
357     (main): Set mu_app_cfg_verifier. Call parse_meta1_conf.
358     * pies/progman.c (progman_lookup_component): New function.
359     (prog_start): Pass program name (eventually differing from
360     argv[0]).
361     * pies/pies.h (struct component): New member `program'.
362     (progman_lookup_component): New prototype.
363     * pies/meta1gram.y, pies/meta1lex.h, pies/meta1lex.l: New files.
364     * pies/Makefile.am (pies_SOURCES): Add meta1gram.y and
365     pies/meta1lex.h.
366     (noinst_HEADERS, AM_YFLAGS, AM_LFLAGS): New variables.
367    
368 gray 1735 2008-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
369    
370 gray 1738 * pies/pies.c (component_cfg_param, pies_cfg_param): New keyword:
371     allgroups.
372     (pies_add_allgroups): New function.
373     * pies/limits.c: Fix debug statements.
374     * pies/progman.c (build_depmap): Rename to
375     progman_build_depmap. Make extern, for future use. All callers
376     updated.
377     * pies/pies.h (progman_build_depmap): New proto.
378    
379     * pies/pies.c: Fix ACTION_COMPRELOAD
380     * pies/progman.c (open_retranslator): (child) close all open
381     sockets, except p[0] (pipe input).
382     (prog_start): Bugfix: mark sleeping components with
383     status_sleeping.
384     (prog_start): stdout retranslation works for pies_comp_pass_fd.
385     Mark started processes with status_enabled.
386     (progman_start): Start enabled processes if pid is 0.
387     (progman_stop_component): Correctly handle various status types.
388     (progman_dump_stats): Mark processes being stopped.
389    
390 gray 1735 * pies/pies.c (component_cfg_param): Bugfix.
391     (component_section_parser): Initialize comp->pass_fd_socket
392     * pies/progman.c (prog_start): Listen on the socket, if in pass_fd
393     mode. Avoid closing it.
394     (prog_stop_all): Kill programs being stopped.
395 gray 1738
396 gray 1735 * pies/socket.c (pass_fd): Check return from open_unix_socket.
397    
398 gray 1732 2008-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
399    
400 gray 1733 Rewrite pies to incorporate into it the functionality of inetd and
401     mcp.
402    
403     * pies/pies.c (pmult_debug): Rename to pies_debug.
404     (pies_acl): New global.
405     (component_cfg_param): New statements: mode, socket,
406     pass-fd-socket, acl, limits.
407     (component_section_parser): Allocate comp. Check its consistency
408     on mu_cfg_section_end.
409     (pies_cfg_param): New statement: acl.
410     (main): Call mu_acl_cfg_init. Use pies_pause instead of pause.
411     * pies/limits.c: New file.
412     * pies/progman.c (enum prog_status): New status: status_listener.
413     (struct prog): Keep a pointer to the original struct component,
414     instead of copying its fields (except for depend, which is copied
415     anyway). All uses updated.
416     (prog_lookup_by_socket, unlink_prog, register_prog0): New
417     functions.
418     (prog_start, progman_cleanup, progman_stop_component): Rewrite to
419     take into account various component modes.
420     (pies_check_acl): New function.
421     (progman_accept): New function.
422     * pies/pies.h (limits_record_t): New typedef.
423     (enum pies_comp_mode): New constants.
424     (struct component): New members: mode, limits, socket_url,
425     pass_fd_socket, acl.
426     (progman_accept): New proto.
427     (pies_pause, register_listener, pass_fd, open_socket)
428     (parse_limits, set_limits): New protos.
429     * pies/Makefile.am (pies_SOURCES): Add limits.c and socket.c
430     * pies/socket.c: New file.
431    
432     * configure.ac: Check for msg_control and msg_accrights in struct
433     msghdr.
434     * acinclude.m4 (IU_CHECK_MEMBER, IU_CHECK_MEMBERS): New macros
435     (from inetutils).
436    
437 gray 1732 * pies/progman.c (prog_start): Bugfix.
438     * pmult/pmult.c (pmult_cfg_param): New configuration statement
439     pmilter-debug.
440     (main): Call sm_pmfi_setdbg.
441    
442 gray 1729 2008-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
443    
444     Add built-in functions for accessing Sendmail macros.
445    
446     * mfd/mailfromd.h (env_get_macro): New proto.
447     * mfd/prog.c (env_get_macro): New function.
448     * mfd/bi_macro.m4: New file.
449     * mfd/Makefile.am (M4_FILES): Add bi_macro.m4.
450     * NEWS: Update.
451     * doc/mailfromd.texi (Macro access): New subsubsection.
452    
453 gray 1728 2008-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
454    
455     * mfd/bi_mbox.m4 (mailbox_open): Take 2nd optional argument,
456     specifying the permissions of the mailbox, if it is to be created.
457     * doc/mailfromd.texi, NEWS: Update.
458    
459 gray 1726 2008-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
460    
461     * pmult/pmult.c (collect_headers): Rewrite state machine to ensure
462     each state either advances off or switches to the new state.
463 gray 1727 (builtin_macros): New variable.
464     (translate_macros0): Add builtin macros.
465     (pmult_connect): Do not free priv_data even if some milters
466     returned rejects.
467 gray 1726
468 gray 1724 2008-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
469    
470     * mfd/lex.l: Fix default condition for ML state, introduced on
471     2008-11-02.
472    
473 gray 1722 2008-11-03 Sergey Poznyakoff <gray@gnu.org.ua>
474    
475 gray 1723 * mflib/verp.mf (verp_extract_user): Pass email as the first
476     argument.
477     * doc/mailfromd.texi: Update.
478     * doc/Makefile.am: Add pmult.texi
479     * doc/pmult.texi: New file.
480     * mfd/lex.l: %% and $$ in quoted strings are replaced by single %
481     and $, correspondingly.
482     * NEWS: Update.
483    
484 gray 1722 Improve docs.
485    
486     * doc/mailfromd.texi, NEWS: Document `getopt' and run (script)
487     mode.
488     * mfd/lex.l: Octal characters can contain 1 to 3 octal characters.
489     * mfd/bi_getopt.m4: Allow to specify long options (without short
490     option equivalents) that take arguments.
491     * mfd/main.c (options): Document optional argument to the `--run'
492     option.
493    
494 gray 1716 2008-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
495    
496 gray 1721 Minor improvement in the lexer.
497    
498     * mfd/lex.l (start_locus): New variable.
499     (BEGIN_X): New macro.
500     Add a rule to ignore any characters at EOF in ML state.
501     (yywrap): Report an error if the file is left not in the INITIAL
502     state, i.e. EOFs in comments or strings.
503    
504 gray 1720 Improve the docs.
505    
506     * doc/mailfromd.texi, NEWS: Update.
507    
508 gray 1719 Minor fix.
509    
510     * mfd/drivers.c (mark_type_asgn): Mark variable as referenced if
511     it is assigned a value.
512    
513 gray 1718 Get rid of ml_header. Gacopyz takes care about the header
514     formatting.
515    
516     * gacopyz/gacopyz.h (gacopyz_safe_header_value): New proto.
517     * gacopyz/gacopyz.c (gacopyz_safe_header_value): New function.
518     (gacopyz_header_command): Use gacopyz_safe_header_value to format
519     header value.
520     * mfd/bi_sa.m4 (sa): Remove unused variable.
521     * mfd/bi_string.m4: Remove ml_header.
522     * doc/mailfromd.texi: Remove ml_header.
523    
524 gray 1716 New functions: replstr, ml_header, sa_format_score,
525     sa_format_report_header.
526    
527     * mflib/sa.mf: New file.
528     * mflib/Makefile.am (inc_DATA): Add sa.mf
529     * mfd/bi_string.m4 (replstr): New function.
530    
531     * doc/mailfromd.texi: Document new functions.
532     * NEWS: Update.
533    
534 gray 1713 2008-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
535    
536 gray 1715 * mfd/bi_string.m4 (rindex): Fix bug introduced on 2008-10-29.
537    
538 gray 1714 Implement spamd REPORT in sa.
539    
540     * mfd/snarf.m4 (MF_OBSTACK_FINISH): New macro.
541     * mfd/bi_string.m4 (ml_header): New function.
542     * mfd/bi_sa.m4 (spamd_read_line0): New function.
543     (spamd_read_line): Remove last argument. Use spamd_read_line0.
544     (sa): Take a 3rd optional argument, specirying whether to
545     return spam report in sa_keywords.
546    
547 gray 1713 Bugfix.
548    
549     * mfd/gram.y (ADD,REPLACE): Cast 2nd argument to string.
550     * mfd/bi_system.m4 (strftime): Add missing MF_OPTVAL.
551    
552 gray 1709 2008-10-31 Sergey Poznyakoff <gray@gnu.org.ua>
553    
554 gray 1710 * pmult/pmult.c (pmult_eom): Get macros from PM_SMST_DOT list.
555    
556 gray 1709 * gnulib.modules: Add inttostr
557     * smap/smap.c, pies/progman.c, pies/pies.h: Use umaxtostr, instead
558     of mu_umaxtostr.
559    
560     * pmult/pmult.c (struct pmult_priv_data): New members: argc,
561     argv.
562     (macro_trans, meta_stage_trans, macrotab, macronames): New
563     globals.
564     (translate_macros0, translate_macros): New functions.
565     (define_macros, define_macros_iter): New functions.
566     (_cb_define, request_auth_macros): New functions.
567     (pmult_cfg_param): New keyword `define-macro'.
568     (pmult_free): Free argv.
569     (pmult_negotiate): Use sm_pmfi_setmacs, if available.
570     (pmult_connect, pmult_helo, pmult_mail, pmult_rcpt)
571     (pmult_data, process_headers, pmult_eom): Use translate_macros.
572     (main): Handle want_auth_macros.
573    
574     * configure.ac: Check for sm_pmfi_setmacs. This function should
575 gray 1710 appear in meta1-1.0.PreAlpha28.0.
576 gray 1709
577 gray 1708 2008-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
578    
579     * pmult/pmult.c (collect_headers): Bugfix, following changes
580     dated 2008-10-14.
581    
582 gray 1707 2008-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
583    
584     * mfd/bi_string.m4 (index, rindex): Take an optional third
585     argument, indicating where to start searching.
586     * NEWS, doc/mailfromd.texi: Document changes to index and rindex.
587    
588 gray 1706 2008-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
589    
590     * pmult/pmult.c (pmult_std_reply): Handle SMFIR_ACCEPT.
591     * configure.ac, NEWS: Raise version patchlevel to 96
592     * mfd/drivers.c (mark_type_asgn): Add a comment.
593     * mfd/main.c (main): Do not try to start up if script_dump_xref
594     was given.
595    
596 gray 1705 2008-10-24 Sergey Poznyakoff <gray@gnu.org.ua>
597    
598     * mflib/verp.mf: New file.
599     * mflib/Makefile.am: Add verp.mf.
600    
601 gray 1703 2008-10-22 Sergey Poznyakoff <gray@gnu.org.ua>
602    
603     * gacopyz/server.c (gacopyz_srv_abort): Reset state to srv_ready.
604     (gacopyz_srv_helo): If called in srv_msgproc, reset the milter
605     state by calling gacopyz_srv_abort before sending the command.
606     (gacopyz_srv_envfrom): Likewise.
607    
608 gray 1702 2008-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
609    
610     * pmult/pmult.c: New configuration statement auth-macros.
611     (pmult_negotiate): Request auth macros for PM_SMST_MAIL if
612     auth-macros was requested.
613     (pmult_mail): Translate auth macros if present.
614    
615     * gacopyz/server.c (gacopyz_srv_negotiate): Additional
616     diagnostics.
617     (gacopyz_srv_send_macros): Send macros only for those commands
618     that do require them.
619     (gacopyz_srv_send_command): Additional diagnostics.
620     * gacopyz/gacopyz.c (gacopyz_context_loop): Additional diagnostics.
621    
622 gray 1701 2008-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
623    
624     * pmult/pmult.c (_cb_log_level): Handle > level specifier (all
625     levels from the given one up).
626     * gacopyz/gacopyz.h (SMI_LOG_FROM): Handle n==0.
627    
628 gray 1700 2008-10-15 Sergey Poznyakoff <gray@gnu.org.ua>
629    
630     * pies/progman.c (env_setup): Port new implementation from Rush.
631    
632     * gnulib.modules: Add c-ctype
633     * mtasim/mtasim.c, pies/pies.h, pmult/pmult.c, lib/parsetime.c,
634     mfd/lex.l, mfd/gram.y, mfd/mailfromd.h, mfd/spf.c,
635     mfd/bi_sprintf.m4, mfd/bi_io.m4, mfd/pp.c, mfd/main.c: Use c-ctype,
636     instead of ctype.
637    
638 gray 1699 2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
639    
640     * pmult/pmult.c (enum pmult_msg_state): Add more states.
641     (collect_headers): Correctly handle end-of-message marker,
642     even though it should never appear here.
643     (pmult_msg_handler): Make sure the handler always processes first
644     handlers, then body, even if some of these two is missing.
645    
646 gray 1697 2008-10-13 Sergey Poznyakoff <gray@gnu.org.ua>
647    
648 gray 1698 * gacopyz/server.c (gacopyz_srv_eom): Reset state to srv_ready.
649    
650 gray 1697 * mfd/engine.c (mlfi_eom): Destroy md->hdr.
651     * pmult/pmult.c: Fix comment.
652     * NEWS: Update.
653    
654 gray 1696 2008-10-06 Sergey Poznyakoff <gray@gnu.org.ua>
655    
656     * mfd/main.c (read_domain_file): Select first word from each
657     line. This allows to use meta1/mt.
658    
659 gray 1690 2008-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
660    
661 gray 1694 * pies/pies.c (component_cfg_param): New configuration statement
662     `precious'.
663     * pies/progman.c (struct prog): New member `precious'.
664     (register_prog): Set precious.
665     (prog_start_dependencies): Do not mark disabled precious
666     dependencies of a disabled component.
667     * pies/pies.h (pies/pies.h): New member `precious'.
668     * pies/pies.rcin (mcp): Mark as precious.
669    
670 gray 1693 * pies/pies.c (return_code_section_parser): Fix to work with tag
671     of any type.
672     * pies/pies.rcin: Minor change.
673    
674 gray 1692 * configure.ac, NEWS: Raise version number to 4.9.95.
675    
676 gray 1691 * pies/pies.c (main): Do cleanup after main action processing and
677     only if action == ACTION_CONT.
678     * pies/progman.c (struct prog): New member `prev'.
679     (link_prog): Maintain doubly-linked list.
680     (prog_stop_dependent): Avoid printing diagnostics if there are
681     no dependencies to be stopped.
682     (prog_stop): Do nothing if prog->pid is zero.
683     Do not call prog_stop_dependent, it will be done by
684     progman_cleanup.
685     (prog_stop_all): Terminate components from last to first.
686     * pies/pies.rcin: Improve example, by adding mcp component.
687    
688 gray 1690 * pies/pies.c (_cb_depend): Handle single string value.
689     (_cb_retr): Fix diagnostic message.
690     (_cb_facility): New function.
691     (component_cfg_param): New statement `facility'.
692     (component_section_parser): Initialize comp.facility to the
693     default value.
694     * pies/progman.c (struct prog): New member `facility'.
695     (register_prog): Initialize facility.
696     (open_retranslator): Use master->facility.
697     * pies/pies.h (struct component): New member `facility'.
698    
699 gray 1687 2008-10-03 Sergey Poznyakoff <gray@gnu.org.ua>
700    
701     * pies/progman.c (register_prog): Remove stray semicolon.
702     (retr_exit): Use _exit.
703     (prog_stop_dependent): Bugfix: stop retranlators as well as
704     components.
705    
706 gray 1680 2008-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
707    
708 gray 1682 * configure.ac, NEWS: Set patchlevel 94.
709    
710 gray 1680 Fix MU configuration file support.
711    
712     * lib/libmf.h (config_array_to_argv)
713     (config_array_to_string, config_cb_timeout): new prototypes.
714     * lib/utils.c: New
715     * lib/Makefile.am (libmf_a_SOURCES): Add utils.c
716     * mfd/gram.y (defer_initialize_variable): Both args are const.
717     * mfd/mailfromd.h (defer_initialize_variable)
718     (add_include_dir): Change signatures.
719     * mfd/pp.c (add_include_dir): Arg is const.
720     * pies/pies.c, pmult/pmult.c, mfd/main.c: Rewrite configuration
721     file support to match changes in Mailutils.
722    
723 gray 1677 2008-09-20 Sergey Poznyakoff <gray@gnu.org.ua>
724    
725     Improve stack memory management.
726    
727     * mfd/gram.y (strtosize, get_stack_max, get_stack_incr)
728     (get_stack_size): New functions.
729     (pragma_stacksize): Rewrite. Take maximum stack size as an
730     optional third argument.
731     * mfd/mailfromd.h (stack_max_size): New declaration.
732     (stack_max_size): New function.
733     (expand_dataseg): Signal exception if new memory size would be
734     greater than the stack size limit.
735     * NEWS, doc/mailfromd.texi: Update.
736    
737 gray 1676 2008-09-19 Sergey Poznyakoff <gray@gnu.org.ua>
738    
739     * mfd/gram.y (pragma_stacksize): Implement two stack growth
740     policies.
741     * mfd/mailfromd.h (enum stack_expand_policy): New enum.
742     (stack_expand_incr, stack_expand_policy): New global variables.
743     * mfd/prog.c (stack_expand_incr)
744     (stack_expand_policy): New global variables.
745    
746     * NEWS: Update.
747     * doc/mailfromd.texi (stacksize): Document changes to pragma
748     stacksize.
749     * doc/values.texi (STACK-INCR): New value.
750    
751 gray 1673 2008-09-18 Sergey Poznyakoff <gray@gnu.org.ua>
752    
753     * Makefile.am: Implement a dist-hook, preventing distributing
754     an unfinished NEWS file.
755     * doc/mailfromd.texi: Document new mfl-mode customization
756     variables.
757     Add missing index entries.
758     * NEWS: Update.
759     * elisp/mfl-mode.el: Improve auto-indentation support.
760 gray 1675 (mfl-compute-line-indentation): Fix typo.
761    
762 gray 1670 2008-09-17 Sergey Poznyakoff <gray@gnu.org.ua>
763    
764 gray 1672 * Makefile.am (dist-hook): New rule. Test for leftover FIXMEs in
765     NEWS.
766    
767 gray 1671 * mfd/bi_getopt.m4 (opterr, optopt): New globals.
768     (getopt): Handle opterr and optopt.
769     (MF_INIT): Initialize opterr to 1.
770    
771 gray 1670 * mfd/bi_getopt.m4 (getopt): Use | as a short/long option
772     separator.
773     Make sure optind/optarg are set before returning EOF.
774     * mfd/gram.y (mailfromd_run): Remove superfluous call to
775     env_leave_frame.
776     * mfd/drivers.c (mark_type_argx, mark_type_vaptr): New functions.
777     * mfd/prog.c (env_vaptr): Cast the result.
778     * mfd/main.c (argpflag): Understand abbreviated forms of the --run
779     option.
780    
781     * mfd/bi_db.m4 (dbfirst, dbnext, dbkey, dbvalue): New functions
782     (proof of concept).
783    
784 gray 1669 2008-09-16 Sergey Poznyakoff <gray@gnu.org.ua>
785    
786     Implement functions with variable number of arguments and 'run' mode.
787    
788     * mfd/symtab.c (function_install): Take additional argument.
789     * mfd/lex.l: New tokens `vaptr', `...' and ARGX.
790     * mfd/snarf.m4 (MF_VASTRING): New define.
791     * mfd/gram.y: Handle functions with variable number of arguments,
792     $(expr), and vaptr() expressions. This raises shift/reduce
793     expectation to 29 conflicts.
794     (parmtype_function): Return dtype_string for
795     arguments from vararg list.
796     (FUNC_HIDDEN_ARGS): Return 1 if f->varargs is set.
797     (type_to_string): Handle pointer argument.
798     (function_call): Handle function->varargs.
799     (node_type): Handle node_type_argx, and node_type_vaptr.
800     (cast_arg_list): Handle variable number of arguments.
801     (cast_to): Handle dtype_pointer as dtype_number.
802     * mfd/drivers.c (argx, vaptr): New node types.
803     (code_type_call): Handle variable number of arguments.
804     (code_cast): Handle dtype_pointer as dtype_number.
805     * mfd/mailfromd.h (MAILFROMD_RUN): New define.
806     (struct argx_node): New type.
807     (struct node): Add argx_node.
808     (struct function): New member `varargs'.
809     (function_install): Add varargs.
810     (mailfromd_run): New prototype.
811     * mfd/prog.c (env_vaptr, env_get_reg): New functions.
812     (env_make_frame0): New function.
813     (instr_xmemstk): New instruction handler.
814     * mfd/opcodes (XMEMSTK): New opcode.
815     * mfd/prog.h (env_get_reg, env_vaptr): New protos.
816     * mfd/main.c (options): New option `--run'.
817     (main): Handle `run' mode.
818     * mfd/Makefile.am (M4_FILES): Add bi_getopt.m4.
819     * NEWS: Update.
820    
821 gray 1664 2008-09-15 Sergey Poznyakoff <gray@gnu.org.ua>
822    
823 gray 1668 * tests/alias.at: New file.
824     * tests/Makefile.am (TESTSUITE_AT): Add alias.at
825     * tests/testsuite.at: Add alias.at
826    
827 gray 1667 * elisp/mfl-mode.el (mfl-next-line-indentation)
828     (mfl-find-line-indentation): Fix computations for `alias',
829     `returns' and for comment lines.
830     (mfl-returns-offset, mfl-comment-offset): New customization
831     variables.
832    
833 gray 1666 * mflib/sav.mf: New file. Initial implementation of SAV functions
834     entirely in MFL.
835    
836 gray 1665 * elisp/mfl-mode.el (mfl-mode): Make compile-command buffer-local.
837    
838 gray 1664 * mfd/symtab.c (struct alias): New data type.
839     (union symentry): New member `alias'.
840     (lookup_or_install): Remove erroneous condition, introduced in
841     r1627 (branches/release_4_3_patches), which caused third
842     argument (install) to be ignored if SYM_BITS was set in state.
843     (function_install, function_lookup): Account for aliases.
844     (install_alias): New function.
845     * mfd/lex.l (alias): New keyword.
846     * mfd/gram.y: Allow to define function aliases.
847     * mfd/mailfromd.h (SYM_ALIAS): New define.
848     (install_alias): New proto.
849    
850     * doc/mailfromd.texi: Document function aliases.
851     * doc/NEWS: Likewise.
852    
853     * elisp/mfl-mode.el (mfl-mfd-command): Change command name.
854     (mfl-keywords): Add alias.
855    
856 gray 1662 2008-09-09 Sergey Poznyakoff <gray@gnu.org.ua>
857    
858     * configure.ac: Version 4.9.93
859     * NEWS: Likewise.
860     * pies/pies.c: Change description.
861    
862 gray 1660 2008-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
863    
864     * mfd/prog.c (instr_stkalloc): Expand stack segment if needed.
865    
866 gray 1659 2008-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
867    
868     * mflib/pp-setup (_, N_): If used without arguments, insert
869     _ and N_ verbatim.
870     * README: Update.
871     * tests/Makefile.am (clean-local): Fix rule.
872     * configure.ac: Fix check for res_query.
873    
874     * mfd/engine.c (mailfromd_daemon): Use mailfromd_umask instead of
875     a hardcoded value.
876     * mfd/mailfromd.h (mailfromd_umask): New prototype.
877 gray 1662 * mfd/main.c (mailfromd_umask): New variable.
878 gray 1659 * mfd/bi_system.m4 (umask): New built-in function.
879     * gacopyz/gacopyz.c (do_connect): Ensure umask 0117 when binding
880     the socket.
881    
882     * doc/mailfromd.texi: Improve usage of @deffn.
883     (System functions): Document umask.
884    
885 gray 1658 2008-07-04 Sergey Poznyakoff <gray@gnu.org.ua>
886    
887     Implement mailbox_append_message built-in function.
888    
889     * NEWS, doc/mailfromd.texi: Document mailbox_append_message.
890     Document new semantics of `a' and `a+' in mailbox_open.
891     * mfd/bi_msg.m4 (bi_message_from_descr): New function.
892     * mfd/bi_body.m4 (current_message): Fix return value.
893     * mfd/bi_mbox.m4 (mailbox_open): Discern between `a' and `a+'.
894     (mailbox_append_message): New function.
895     * mfd/msg.h (bi_message_from_descr): New prototype.
896    
897 gray 1657 2008-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
898    
899     * pies/pies.h: Include stdint.h
900     * configure.ac: Fix checking for libresolv.
901    
902 gray 1656 2008-06-22 Sergey Poznyakoff <gray@gnu.org.ua>
903    
904     Minor fixes.
905    
906     * doc/mailfromd.texi: Fix a typo.
907     * mfd/prog.c: Fix comment.
908     * gacopyz/server.c: Fix erroneous range checking condition.
909    
910 gray 1655 2008-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
911    
912     Fixup C variables that point to dataseg after expanding it.
913     Bug reported by Sergey Afonin.
914    
915     * mfd/snarf.m4 (mf_c_argdcl): Produce only C declarations.
916     (mf_c_arginit): New macro.
917     (__mf_c_argdcl_list,__mf_c_arginit_list): New auxiliary macros.
918     (__mf_c_arglist): Rewrite using the above macros.
919     (mf_c_arglist,MF_VA_ARG): Reflect changes to get_.*_arg functions.
920     * mfd/bi_sprintf.m4: Update invocations of MF_VA_ARG.
921     * mfd/prog.c (struct eval_environ): New members auto_ptr and
922     numautos.
923     (env_register_auto, env_unregister_autos, env_fixup_autos): New
924     functions.
925     (expand_dataseg): Call env_fixup_autos.
926     (get_literal, get_string_arg): Change signature. Call
927     env_register_auto. All callers updated.
928     (get_numeric_arg): Change signature for consistency with other
929     get_ functions. All callers updated.
930     (get_pointer_arg): New function.
931     (eval_environment): Call env_unregister_autos after running each
932     instruction.
933     * mfd/prog.h (get_pointer_arg): New function.
934     (get_string_arg, get_numeric_arg): Change prototypes.
935     * mfd/bi_sieve.m4: Minor stylistic fix.
936     * NEWS: Update.
937    
938     * mfd/drivers.c (code_cast): Handle dtype_pointer
939    
940 gray 1654 2008-04-13 Sergey Poznyakoff <gray@gnu.org.ua>
941    
942     * configure.ac: Require Mailutils 1.9.90
943     * doc/mailfromd.texi: Update.
944     * mfd/bi_msg.m4 (message_size, message_body_size)
945     (message_header_size): New functions.
946     * NEWS: Update.
947    
948 gray 1650 2008-04-05 Sergey Poznyakoff <gray@gnu.org.ua>
949    
950 gray 1651 * mtasim/mtasim.c: New command line options --user and --group.
951     * doc/mailfromd.texi, doc/mtasim.texi, NEWS: Update.
952    
953 gray 1650 Introduce MU interface functions.
954    
955     * mfd/bi_msg.m4, mfd/bi_mbox.m4, mfd/msg.h: New files.
956     * mfd/Makefile.am: Add new files.
957     * mfd/bi_string.m4 (substring): 3rd argument can be negative.
958     * mfd/bi_body.m4 (current_message): New function.
959     * NEWS: Update.
960     * doc/mailfromd.texi: Update.
961    
962 gray 1648 2008-04-02 Sergey Poznyakoff <gray@gnu.org.ua>
963    
964     Add new MFL datatype `POINTER' and convert `body' handler to
965     take first argument of that type. Provide a function for
966     converting POINTER to STRING.
967    
968     * mfd/Makefile.am (M4_FILES): Add bi_body.m4
969     * mfd/bi_body.m4: New file.
970    
971     * mfd/engine.c (mlfi_body): Pass bodyp as a generic pointer.
972     * mfd/snarf.m4 (__mf_argtype, __mf_ctype, __mf_c_getarg)
973     (__mf_printf_type): Handle new data type POINTER.
974     * mfd/gram.y (state_parms): Change type of the first parameter
975     to body to dtype_pointer.
976     (cast_to): Handle dtype_pointer.
977     * mfd/mailfromd.h (data_type_t): New type dtype_pointer.
978     (env_push_pointer): New function.
979     * mfd/prog.c (env_push_pointer): New function.
980     * mfd/prog.h (get_pointer_arg): New macro.
981     * NEWS: Update.
982 gray 1649 * doc/mailfromd.texi: Document changes to prog body.
983    
984 gray 1648 Bugfixes:
985    
986     * mtasim/mtasim.c (get_input_line): Make sure the return line
987     always terminates with a newline.
988     (smtp): Remove erroneous break.
989     * mfd/symtab.c (variable_replace): Maintain correct value of
990     newvar->owner.
991     * mfd/pp.c (push_source): Prevent coredump on the first call.
992    
993 gray 1642 2008-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
994    
995 gray 1645 * doc/Makefile.am (check-refs, check-fixmes): Print correct
996     locations for multiple input files. Return a meaningful error
997     code.
998     * TODO: Update.
999    
1000 gray 1642 Rewrite the bootstrap suite.
1001    
1002     * README-alpha: Rewritten.
1003     * bootstrap.conf: Rewritten.
1004     * bootstrap: Slightly modified version from gnulib.
1005     * gnulib.modules, README-hacking: New files.
1006     * doc/mailfromd.texi: Minor fix.
1007    
1008 gray 1641 2008-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
1009    
1010     Fix handling of handler/handler name clashes.
1011    
1012     * mfd/drivers.c (code_type_progdecl): Warn if a header is
1013     redeclared.
1014     * doc/mailfromd.texi: Document resolving of handler/handler name
1015     clashes.
1016    
1017 gray 1634 2008-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
1018    
1019 gray 1635 * mflib/strip_domain_part.mf, mflib/heloarg_test.mf,
1020     mflib/gettext.mf, mflib/valid_domain.mf, mflib/spf.mf,
1021     mflib/match_cidr.mf, mflib/is_ip.mf, mflib/safedb.mf4,
1022     mflib/dns.mf4: Indent using mfl-mode.
1023    
1024     * mflib/match_dnsbl.mf, mflib/match_rhsbl.mf: Indent using
1025     mfl-mode. Remove m4 conditionals.
1026    
1027 gray 1634 Port r1632 of branches/release_4_3_patches.
1028    
1029     * configure.ac, NEWS: Version 4.4
1030    
1031     * mfd/mailfromd.h (enum mf_status_code): Add a comma and a count
1032 gray 1641 definition, needed for `make check-exceptions' in docs.
1033 gray 1634 * mfd/status.mfi (m4_ifdef): Use OLD_EXCEPTION_CODES instead of
1034     COMPAT_4_3.
1035     * mfd/main.c: New command line options: -D (--define), and -U
1036     (--undefine).
1037     * mflib/match_dnsbl.mf (match_dnsbl): Use LAZY_MATCH_RBL instead of
1038     COMPAT_4_3.
1039     Throw e_invip if address is invalid.
1040     * mflib/match_rhsbl.mf (match_rhsbl): Use LAZY_MATCH_RBL instead
1041     of COMPAT_4_3.
1042     * doc/mailfromd.texi: Document variable shadowing and new
1043     features.
1044     * doc/Makefile.am (check-exceptions): Update the rule.
1045     * NEWS: Update.
1046     Fix the test suite. The file status.mfh now contains m4 statements,
1047     yet the test suite uses --no-preproc files, so we have to use an
1048     already preprocessed version of that file.
1049    
1050     * tests/atlocal.in (MFOPTS): Add -I@abs_builddir@
1051     * tests/Makefile.am (status.mfh): New rule.
1052     (check_local): Depend on status.mfh
1053     (clean-local): Remove status.mfh
1054     * NEWS: Raise version number.
1055    
1056     Prefix all exception codes with `e_'.
1057    
1058     * mfd/mfstat.awk: Look for mf_exception_code/mf_exception_count.
1059     * mfd/lex.l (variable_or_const): Add type cast.
1060     * mfd/mailfromd.h (enum mf_status_code): Retain only first four proper
1061     status codes.
1062     (enum mf_exception_code): New type.
1063     (mf_status_to_exception): New macro
1064     (mf_exception_str,string_to_exception): New functions
1065     (mf_status_str): Rewrite as macro.
1066     (string_to_stat): Remove.
1067     * mfd/mf-status.mfi: Prefix codes with e_
1068     * mfd/status.mfi: Prefix exception codes with e_. Retain
1069     succes, not_found, failure, and temp_failure for backward
1070     compatibility.
1071     Retain old exception names if m4 symbol COMPAT_4_3 is defined.
1072     * mfd/gram.y, mfd/snarf.m4, mfd/bi_poll.m4, mfd/bi_string.m4,
1073     mfd/drivers.c, mfd/bi_dns.m4, mfd/bi_system.m4, mfd/bi_spf.m4,
1074     mfd/prog.c, mfd/bi_ipaddr.m4, mfd/bi_sa.m4, mfd/bi_io.m4,
1075     mfd/bi_sieve.m4, mfd/bi_vars.m4, mfd/bi_other.m4, mfd/bi_mail.m4,
1076     mfd/bi_gettext.m4, mfd/bi_db.m4, : Use new exception names.
1077     * configure.ac (MF_VERSION_PATCH): Set to 90
1078     * doc/mailfromd.texi: Document changes.
1079    
1080     Name clashes between constants and variables went unnoticed by the
1081     compiler. Bug reported by Thomas Lynch.
1082     Fix this and rename exception codes to minimize chances of such
1083     clashes.
1084    
1085     * mfd/symtab.c (lookup_or_install): Allow to search using state
1086     masks.
1087     (variable_or_constant_lookup): New function.
1088     (constant_lookup): Return const struct constant *.
1089     (constant_lookup_value): New function.
1090     * mfd/lex.l (get_const): Remove.
1091     (variable_or_const): New function.
1092     * mfd/gram.y: Display warnings on a clash of constant and variable
1093     names.
1094     (VARIABLE): Change union type to var. Modify `variable' production
1095     accordingly.
1096     * mfd/mailfromd.h (_SYM_COUNT,SYM_MASK,SYM_BITS): New defines.
1097     (constant_lookup): Return const struct constant *.
1098     (constant_lookup_value): New function.
1099     (variable_or_constant_lookup): New function.
1100     * mfd/status.mfi: Prefix exception codes with `e_' to avoid name
1101     clashes.
1102     Provide backward-compatible constants.
1103     * mflib/match_dnsbl.mf (match_dnsbl): Rename range to iprange to
1104     avoid name clashes with the exception code.
1105     Remove buggy conditions. Provide a correctly working replacement
1106     for them if the m3 symbol `COMPAT_4_3' is defined.
1107     * mflib/match_rhsbl.mf (match_rhsbl): Rename range to iprange to
1108     avoid name clashes with the exception code.
1109     Remove buggy conditions. Provide a correctly working replacement
1110     for them if the m3 symbol `COMPAT_4_3' is defined.
1111     * mflib/match_cidr.mf, mflib/safedb.mf4, tests/etc/catch.rc,
1112     tests/etc/catch01.rc: Use new exception codes.
1113    
1114    
1115 gray 1620 2008-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
1116    
1117     Ported r1619 from branches/release_4_3_patches.
1118    
1119     * src/prog.c, src/prog.h (advance_pc): Fix type of the 2nd
1120     argument.
1121     * configure.ac: Use AC_TRY_LINK to check for libresolve.
1122     * THANKS: Update
1123     * NEWS: Update
1124    
1125     * mfd/main.c: Minor changes in doc string.
1126    
1127 gray 1618 2008-02-26 Sergey Poznyakoff <gray@gnu.org.ua>
1128    
1129     * pies/pies.c: New configuration statement "chdir".
1130     * pies/progman.c (struct prog.v.p): New member `dir'.
1131     (register_prog): Initialize newp->v.p.dir;
1132     (prog_start): Change to the working directory, if required by
1133     config.
1134    
1135 gray 1617 2008-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
1136    
1137     * mfd/main.c (mf_error_on_locus): Mark as printflike.
1138     (cb_milter_timeout): Fix format.
1139     (mf_cfg_param): Fix erroneous description of include-path.
1140    
1141 gray 1610 2008-02-10 Sergey Poznyakoff <gray@gnu.org.ua>
1142    
1143 gray 1612 Merged HEAD from branches/gmach.
1144 gray 1610
1145 gray 1609 2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
1146    
1147     * THANKS: Add Tom Lynch. Obfuscate email addresses.
1148 gray 1612 * pmult/pmult.c: Remove kludges that were necessary to include
1149     files from meta1 source tree. Assume PreAlpha24.1 at least.
1150     * pmult/Makefile.am (INCLUDES): Remove @META1_INCLUDES@
1151     * configure.ac (--enable-pmilter option): Assume all the necessary
1152     libraries are installed under ${path}/include/sm, and libraries
1153     under ${path}/lib/meta1.
1154 gray 1609
1155 gray 1604 2008-02-06 Sergey Poznyakoff <gray@gnu.org.ua>
1156    
1157 gray 1612 Ported r1606 from trunk.
1158    
1159     * src/dnsbase.c: Define MAX, if necessary.
1160     * src/mailfromd.h: Define INADDR_NONE.
1161     * configure.ac: Check for librt.
1162     Add auth to AM_GNU_MAILUTILS.
1163     * gacopyz/server.c (srv_connect): Fix typo.
1164 gray 1606 * gacopyz/gacopyz.c (do_connect): Fix typo.
1165 gray 1612 * bootstrap (MODLIST): Add vasprintf.
1166     * configure.ac: Check for libsocket and libnsl.
1167     * src/dnsbase.c (dns_resolve_hostname,a_lookup): Change
1168     initialization of domainbuf.
1169     * src/syslog_async.c: Include fcntl.h.
1170    
1171     2008-02-01 Sergey Poznyakoff <gray@gnu.org.ua>
1172    
1173     * pies/pies.c (progman_wake_disabled): Renamed to
1174     progman_wake_sleeping.
1175     * pies/progman.c: Implement proper handling of dependencies.
1176     * pies/pies.h ((progman_wake_disabled): Renamed to
1177     progman_wake_sleeping.
1178     (pies_depmap_t,pies_depmap_pos_t,enum pies_depmap_direction): New
1179     types.
1180     (depmap_alloc,depmap_copy,depmap_set,depmap_isset,depmap_tc)
1181     (depmap_first,depmap_next): New functions.
1182     * pies/depmap.c: New file.
1183     * pies/Makefile.am (pies_SOURCES): Add depmap.c.
1184    
1185     * smap/smap.c (version): Fix indentation.
1186     * pies/pies.c (return_code_section_parser): Allow to use symbolic
1187     exit codes.
1188     (priv_setup): Exit with EX_CONFIG if the user does not exist.
1189     (main): Catch early sigchlds as well.
1190     * pies/progman.c (progman_cleanup): Fix notice wording.
1191     * pies/pies.rcin: Add sample return-code section.
1192     (component pmult): Redirect stderr/stdout to syslog.
1193    
1194     2008-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
1195    
1196     Implement configurable actions depending on the exit code of
1197     a component.
1198 gray 1606
1199 gray 1612 * pies/pies.c: New configuration file section "return-code".
1200     (capa): Add mailer and debug.
1201     (main): Register "return-code" section and all mailer formats.
1202     * pies/progman.c (enum prog_status): New type.
1203     (struct prog): Remove `disabled'. New fields `status' and `act'.
1204     (register_prog): Initialize act.
1205     (prog_start): Exit with EX_SOFTWARE code if the component cannot
1206     be started.
1207     (progman_start): Do not start disabled components.
1208     (progman_wake_disabled): Wake only components marked as
1209     status_stopped.
1210     (notify): New function.
1211     (progman_cleanup): Act in accordance with the `act' field if the
1212     component terminates.
1213     (progman_stop_component,progman_dump_stats): Take into account
1214     prog->v.p.status.
1215     * pies/pies.h (MAX_RETURN_CODE): New define.
1216     (enum return_action): New type.
1217     (struct component.act): New member.
1218     (default_component): New global.
1219 gray 1605
1220 gray 1612 2008-01-28 Sergey Poznyakoff <gray@gnu.org.ua>
1221 gray 1604
1222 gray 1612 * mfd/bi_db.m4 (dbdel): Fix format arguments.
1223 gray 1603
1224 gray 1612 2008-01-27 Sergey Poznyakoff <gray@gnu.org.ua>
1225 gray 1603
1226 gray 1612 * doc/mailfromd.texi: Document header_insert and sleep.
1227     * mfd/bi_header.m4 (header_insert): New function.
1228     * NEWS: Update.
1229    
1230     2008-01-26 Sergey Poznyakoff <gray@gnu.org.ua>
1231    
1232     * pmult/pmult.c: Handle signals in the main thread by default.
1233     Remove --sigthread option, introduce --no-signal-handler option.
1234     (struct pmult_client): New member hdr
1235     (cb_reply): Fully implement header modification commands in their
1236     Sendmail semantics (as far as bugs of MeTA1 do not impede for it
1237     to work).
1238     (pmult_runlist0): New function.
1239     (pmult_runlist): Rewrite using pmult_runlist0.
1240     (pmult_clear): New function.
1241     (pmult_shutdown,pmult_eom): Call pmult_clear.
1242     (process_headers): Populate p->hdr.
1243     (pmult_msg_handler): New function.
1244     (pmult_msg): Rewrite using pmult_msg_handler.
1245    
1246     * mfd/mailfromd.h (enum msgmod_opcode): New value header_insert.
1247     * mfd/bi_header.m4 (header_add): Implement optional index
1248     argument.
1249     * mfd/engine.c (run_msgmod): Handle header_insert.
1250     * mfd/gram.y (msgmod_opcode_str): Likewise.
1251    
1252     * doc/mailfromd.texi: Update.
1253     * NEWS, TODO: Update.
1254    
1255     * pmult/pmult.c (wait_for_signal): Handle SIGABRT and SIGSEGV.
1256     (pmult_msg): Print body text at debug level trace7.
1257    
1258     2008-01-25 Sergey Poznyakoff <gray@gnu.org.ua>
1259    
1260     * pmult/pmult.c (pmult_runlist,pmult_shutdown,pmult_connect): Lock
1261     context before proceeding.
1262     * mfd/bi_system.m4: New function `sleep'.
1263    
1264     2008-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
1265    
1266     * pies/pies.c, pmult/pmult.c: Fix handling of the --log-tag option.
1267    
1268     * pies/progman.c (prog_start): Remove unconditional debugging
1269     output.
1270     * gacopyz/gacopyz.h (SMI_LOG_PROTO): New debugging level.
1271     (gacopyz_io_logdump): Remove useless level argument.
1272     * gacopyz/log.c, gacopyz/io.c, gacopyz/gacopyz.c: Dump protocol
1273     traces only if SMI_LOG_PROTO is set.
1274    
1275     * pmult/pdbg.hm4, pmult/debugdef.m4: New files. Provide serialized
1276     versions of MU_DEBUG macros.
1277    
1278     * pmult/pmult.c: Use debugging macros from pdbg.h
1279     Do not protect accesses to p->srvlist by mutexes, they should not
1280     be concurrent anyway.
1281     (pmult_abort): Do not shutdown priv_data.
1282    
1283     2008-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
1284    
1285     * mtasim/mtasim.c: Do not use gacopyz_srv_define_macro0.
1286     * pmult/pmult.c: (log_setup): Always set mu_debug_default_printer
1287     to override bug in libmailutils.
1288     (client_block_end): Bugfix.
1289     (pmult_connect): Do not use gacopyz_srv_define_macro0.
1290     * mfd/main.c (log_setup): Always set mu_debug_default_printer to
1291     override bug in libmailutils.
1292    
1293     * gacopyz/gacopyz.h (gacopyz_srv_define_macro0): Remove.
1294     * gacopyz/log.c (gacopyz_io_logdump): Bugfix.
1295     * gacopyz/server.c (gacopyz_srv_define_macro0): Remove.
1296     (gacopyz_srv_define_macro): Do not use gacopyz_srv_define_macro0.
1297    
1298     * pies/pies.c (log_setup): Always set mu_debug_default_printer to
1299     override bug in libmailutils.
1300     (component_cfg_param): New keyword `env'.
1301     (main): Bugfix: It is -R that allows arguments, not -r.
1302     * pies/progman.c (struct prog): New member env.
1303     (register_prog): Avoid unnecessary allocations. Copy env.
1304     (env_setup): New function.
1305     (prog_start): Set up environment.
1306     * pies/pies.h (struct component): New member env.
1307    
1308 gray 1585 2008-01-21 Sergey Poznyakoff <gray@gnu.org.ua>
1309    
1310 gray 1612 * doc/mailfromd.texi, NEWS: Update.
1311     * doc/Makefile.am: Rename /src/ to /mfd/.
1312    
1313     * mfd/symtab.c (rehash): Bugfix: Update variable owner.
1314     * mfd/mailfromd.h (SP): New macro.
1315     (struct locus.line): Change type to unsigned long.
1316     (enum header_opcode): Replace with enum msgmod_opcode.
1317     (struct old_header_node): Replace with struct msgmod_closure.
1318     (header_command_str): Replace with msgmod_opcode_str.
1319     (parse_error,parse_warning,parse_warning_locus): Mark as
1320     printflike.
1321     (env_throw,env_throw_bi): Likewise.
1322     (logmsg,trace): Likewise.
1323     (create_environment): Change proto.
1324     (env_msgmod): New function.
1325    
1326     * mfd/bi_rcpt.m4: New file. Envelope modification functions.
1327     * mfd/bi_qrnt.m4: New file. Quarantine functions.
1328     * mfd/bi_header.m4: New file. Header modification functions.
1329     * mfd/Makefile.am (M4_FILES): Add bi_rcpt.m4, bi_header.m4 and
1330     bi_qrnt.m4.
1331     * mfd/engine.c, mfd/gram.y, mfd/drivers.c, mfd/prog.c
1332    
1333     * gacopyz/server.c: Minor changes in debug diagnostics.
1334    
1335     2008-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
1336    
1337     * pmult/pmult.c: Use callback to handle header modification
1338     commands.
1339     * gacopyz/gacopyz.h (gacopyz_srv_set_callback)
1340     (gacopyz_srv_set_callback_data): New function.
1341     * gacopyz/server.c (struct gacopyz_srv.cb_reply,cb_data): New
1342     members.
1343     (gacopyz_srv_set_callback)
1344     (gacopyz_srv_set_callback_data): New functions.
1345     (gacopyz_srv_send_command): Read all header, recipient and body
1346     modification replies.
1347     * doc/mailfromd.texi: Update.
1348    
1349     * tests/testsuite.at: Skip MTA tests if running with root privileges.
1350     * tests/Makefile.am: Add missing depedency.
1351    
1352     * */*: Roll back the latest rename. Changing a well-known program
1353     name doesn't pay.
1354    
1355     2008-01-16 Sergey Poznyakoff <gray@gnu.org.ua>
1356    
1357     IV. Emulate more milter macros:
1358    
1359     * pmult/pmult.c: Emulate more milter macros.
1360    
1361     III. Bugfix
1362    
1363     * gacopyz/server.c (gacopyz_srv_con): Pass port number.
1364    
1365     II. Move mtasim into a separate directory.
1366    
1367     * mtasim: New directory.
1368     * mtasim/openat-die.c, mtasim/mtasim.c: Move from src/
1369     * mtasim/Makefile.am: New file.
1370     * configure.ac, Makefile.am: Add mtasim.
1371     * tests/atlocal.in: Add mtasim to PATH.
1372     * po/POTFILES.in: Add missing files.
1373    
1374     I. Rename mailfromd to mfd.
1375    
1376     * src, src/mfstat.awk, src/symtab.c, src/lex.l, src/mu_dbm.c,
1377     src/engine.c, src/stack.c, src/snarf.m4, src/dnscache.c,
1378     src/mu_dbm.h, src/opcode.awk, src/gram.y, src/debug.cin,
1379     src/drivers.c, src/bi_poll.m4, src/bi_string.m4, src/mailfromd.h,
1380     src/dnsbase.c, src/debug.hin, src/dns.c, src/openat-die.c,
1381     src/db.c, src/spf.c, src/dns.h, src/drv.awk, src/bi_system.m4,
1382     src/bi_dns.m4, src/spf.h, src/bi_sprintf.m4, src/bi_spf.m4,
1383     src/init.m4, src/debugdef.m4, src/cache.c, src/optab.opc,
1384     src/prog.c, src/optab.oph, src/bi_ipaddr.m4, src/bi_sa.m4,
1385     src/opcodes, src/mf-status.mfi, src/prog.h, src/status.mfi,
1386     src/bi_io.m4, src/pp.c, src/builtin.def, src/bi_sieve.m4,
1387     src/bi_vars.m4, src/main.c, src/Makefile.am, src/bi_other.m4,
1388     src/bi_mail.m4, src/mtasim.c, src/rate.c, src/bi_gettext.m4,
1389     src/bi_db.m4: Move to mfd.
1390     * configure.ac, Makefile.am, mfd/mtasim.c, mfd/Makefile.am: Use
1391     mfd instead of src.
1392     * mfd: New directory.
1393    
1394     * mfd/engine.c (milter_conn_accept): Take a third argument,
1395     specifying the actual length of the sa structure.
1396     Return 0 if mailfromd_acl is not given.
1397     * gacopyz/gacopyz.h, gacopyz/gacopyz.c: xxfi_accept takes third
1398     argument, specifying the actual lengthof the sa structure.
1399    
1400     * tests/farg.at, tests/ismx.at, tests/atlocal.in, tests/catch.at,
1401     tests/catch01.at, tests/cond02.at, tests/shadow.at,
1402     tests/version.at, tests/ashadow.at, tests/cond04.at,
1403     tests/relayed02.at, tests/cond06.at, tests/testsuite.at,
1404     tests/ack.at, tests/invcidr.at, tests/switchn1.at,
1405     tests/bctx00.at, tests/switchn3.at, tests/greylist.at,
1406     tests/cidr2.at, tests/fctx00.at, tests/switchs1.at,
1407     tests/switchs3.at, tests/invip2.at, tests/poll02.at,
1408     tests/poll04.at, tests/hostname.at, tests/resolve.at,
1409     tests/invcidr2.at, tests/hasmx.at, tests/declvar.at,
1410     tests/cond01.at, tests/macros.at, tests/invip.at, tests/cond03.at,
1411     tests/relayed01.at, tests/cond05.at, tests/prec.at,
1412     tests/strings.at, tests/rescname.at, tests/bctx01.at,
1413     tests/switchn2.at, tests/cidr1.at, tests/switchn4.at,
1414     tests/cidr3.at, tests/fctx01.at, tests/poll.at, tests/switchs2.at,
1415     tests/poll01.at, tests/ml.at, tests/switchs4.at,
1416     tests/poll03.at: Rename mailfromd to mfd.
1417    
1418     2008-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
1419    
1420     * src/engine.c, src/mailfromd.h, src/main.c: Implement ACLs.
1421 gray 1585 * NEWS: Update.
1422 gray 1612
1423     * src/main.c, smap/smap.c, pies/pies.c, pies/progman.c,
1424     pies/pies.h, pmult/pmult.c: Sync with MU CVS: Use mu_log_facility
1425     and mu_log_tag.
1426     * gacopyz/gacopyz.h (struct gacopyz_milter_descr): New member
1427     xxfi_accept.
1428     * gacopyz/gacopyz.c (gacopyz_handle_connection): Close connection
1429     immediately if conn->desc.xxfi_accept returns 1.
1430    
1431     * src/mailfromd.h, src/engine.c, src/smap.c: Use uniform startup
1432     and shutdown messages.
1433    
1434     2008-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
1435    
1436     * pies/pies.c (_cb_group): Bugfix: store group number in the list,
1437     not its name.
1438     (component_section_parser): Initialize retr to default values.
1439     * pmult/pmult.c: New option --sigthread: handle SIGHUP and SIGTERM
1440     in the main thread. Necessary (at least) for Linux 2.4.*
1441    
1442     * src/lex.l, src/mailfromd.h (parse_warning, parse_warning_locus)
1443     (parse_error,parse_error_locus): fmt is const.
1444     * src/gram.y (dbg_dict_getsym): Auxiliary function.
1445     * src/prog.c, src/prog.h (pushs): 2nd argument is const.
1446     * src/bi_gettext.m4 (bindtextdomain): Minor fix.
1447     * pies/Makefile.am, smap/Makefile.am,
1448     pmult/Makefile.am (LDADD): Place libgnu.a after
1449     MAILUTILS_LIBS.
1450     * pmult/pmult.c: Fix indentation.
1451     * lib/libmf.h: Include stdio.h
1452     * lib/userprivs.c: Include libmf.h.
1453     * lib/parsetime.c: Includestring.h and time.h
1454 gray 1585
1455 gray 1612 * pies: New directory.
1456     * pies/Makefile.am: New file.
1457     * pies/pies.c, pies/progman.c, pies/pies.h, pies/pies.rcin: New
1458     files.
1459     * smap/smap.c (switch_to_privs): Remove. Use library version instead.
1460     * pmult/pmult.c: New configuration file statement `pidfile'.
1461     (pmult_connect): Ignore gsrv if its remote milter is not
1462     listening.
1463     * configure.ac, Makefile.am: Add pies.
1464     * lib/libmf.h (getmaxfd): New define.
1465     * NEWS: Update.
1466    
1467     2008-01-12 Sergey Poznyakoff <gray@gnu.org.ua>
1468 gray 1569
1469 gray 1612 * lib/libmf.h: Add switch_to_privs.
1470     * lib/userprivs.c: New file.
1471     * lib/Makefile.am: Add userprivs.c.
1472     * src/gram.y (time_multiplier): Remove forward dcl.
1473     * src/main.c: Move switch_to_privs to lib.
1474 gray 1569
1475 gray 1612 * src/prog.c (instr_header): Improve trace output.
1476     * pmult/pmult.c: Implement recipient and header modifications.
1477     * configure.ac: Link libmta/libcstrr.a (for pmult).
1478     * TODO: Update.
1479    
1480     * gacopyz/server.c (gacopyz_srv_send_command): Do not bail out on
1481     message modification responses.
1482     * gacopyz/gacopyz.c (gacopyz_header_command): Improve trace output.
1483    
1484 gray 1569 * src/gram.y (DELETE string): Initialize hdr.value.
1485     * src/drivers.c (code_type_header): Value can be NULL.
1486 gray 1612
1487     * pmult/pmult.c: Implement most of the SMTP functionality.
1488 gray 1569
1489 gray 1612 * src/mailfromd.h, lib/libmf.h (dict_init, dict_install)
1490     (dict_destroy, dict_getsym): Move to lib/libmf.h.
1491     * src/prog (dict_init, dict_install, dict_destroy)
1492     (dict_getsym): Move to lib/dict.c.
1493     * lib/dict.c: New file.
1494     * lib/Makefile.am: Add dict.c.
1495 gray 1569
1496 gray 1612 * pmult/pmult.c: Implement framework for milter macros.
1497    
1498     2008-01-11 Sergey Poznyakoff <gray@gnu.org.ua>
1499    
1500     * gacopyz/gacopyz.c (parse_url): Bugfix.
1501     * pmult/pmult.c: Update.
1502 gray 1569
1503 gray 1612 * pmult/pmult.c: Update.
1504     * gacopyz/gacopyz.h, gacopyz/server.c: Implement gacopyz_srv_conn.
1505    
1506     * src/gram.y (parse_time_interval): Move to lib/parsetime.c.
1507     * src/mailfromd.h (parse_time_interval): Move to lib/libmf.h
1508     * lib/libmf.h (parse_time_interval): New proto.
1509     * lib/Makefile.am: Add parsetime.c.
1510     * lib/parsetime.c: New file.
1511     * smap/smap.c: Include mailutils/daemon.h.
1512     * pmult: New directory.
1513     * pmult/pmult.c: New file. A framework for pmilter multiplexer.
1514     * pmult/Makefile.am: New file.
1515     * configure.ac: New option --enable-pmilter.
1516     * Makefile.am (SUBDIRS): Add pmult.
1517    
1518     2008-01-09 Sergey Poznyakoff <gray@gnu.org.ua>
1519    
1520     * src/engine.c (check_pidfile): Bugfix.
1521     * src/gram.y (mailfromd): dict is mu_assoc_t.
1522     * src/mailfromd.h (dict_init,dict_install,dict_destroy)
1523     (dict_getsym): dict is mu_assoc_t.
1524     * src/prog.c: Likewise.
1525     * src/main.c (mf_diag_syslog_printer): Return 0.
1526     * smap/smap.c (expand_reply_text): Tolerate arg==NULL.
1527     (--foreground,--inetd,--daemon): New options.
1528     (argp_capa): Add debug.
1529     * lib/nls.c (mf_init_nls): Bind "mailfromd" domain.
1530    
1531     * gacopyz/smfi.c, gacopyz/gacopyz.h, gacopyz/gacopyz_priv.h,
1532     gacopyz/log.c, gacopyz/proc.c, gacopyz/server.c,
1533     gacopyz/gacopyz.c: Move logmask and ctx_timeout from
1534     gacopyz_conn_t to gacopyz_milter_descr. Fix some minor issues.
1535    
1536     * src/db.c, src/bi_dns.m4, src/bi_sprintf.m4, src/prog.c,
1537     src/bi_db.m4: Fix format strings/arguments.
1538     * src/bi_sieve.m4: Minor fixes.
1539     * src/mtasim.c: Include libmf.h
1540     * smap/smap.c: Include mailutils/server.h. Minor bugfixes.
1541     * tests/version.at, tests/macros.at: Use mailfromd canonical name,
1542     not AT_PACKAGE_NAME (in message patterns).
1543    
1544     2008-01-08 Sergey Poznyakoff <gray@gnu.org.ua>
1545    
1546     * src/gram.y, src/main.c: Remove deprecated features.
1547     * doc/mailfromd.texi, NEWS: Update.
1548     * gacopyz/gacopyz.c: Support URLs.
1549    
1550     * lib/libmf.h (mf_init_nls): New proto.
1551     * lib/nls.c: New file.
1552     * lib/Makefile: Add nls.c.
1553     * bootstrap: Fix TP issues.
1554     * src/main.c, src/mtasim.c, smap/smap.c: Use mf_init_nls.
1555     * lib/version.c: Update year.
1556    
1557     * configure.ac (AC_INIT): Rename to gmach (working name).
1558     (MF_VERSION_PATCH): Raise to 91
1559     Require at least MU-1.2.90
1560     (AC_CONFIG_FILES): Add gnu/Makefile and smap/Makefile.
1561     * NEWS: Update.
1562    
1563     * bootstrap: Place gnulib files in gnu/
1564    
1565     * lib: New directory.
1566     * lib/libmf.h: New file.
1567     * src/daemon.c, src/syslog_async.c, src/syslog_async.h,
1568     src/version.c: Moved to lib
1569     * src/mailfromd.h: Incude sysexits.h unconditionally.
1570     Include libmf.h
1571     * src/bi_sa.m4: Rewrite using mu_socket_stream_t.
1572     * src/main.c: Remove pre-mu-1.2.90 dependencies.
1573    
1574     * Makefile.am (SUBDIRS): Add gnu and smap.
1575     * src/Makefile.am, gacopyz/Makefile.am: Update.
1576    
1577     * src/mtasim.c (main): Remove (now superfluous) invocation of
1578     mu_error_set_print.
1579    
1580     * smap/smap.c: Rewrite using MU-1.2.90
1581    
1582     * po/POTFILES.in: Update.
1583    
1584 gray 1540 2007-12-28 Sergey Poznyakoff <gray@gnu.org.ua>
1585    
1586     * src/Makefile.am (libmf_a_DEPENDENCIES): Add BUILD_SYSLOG_ASYNC
1587    
1588 gray 1539 2007-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
1589    
1590     * src/main.c (mf_cfg_param): Add docstrings.
1591    
1592 gray 1534 2007-12-12 Sergey Poznyakoff <gray@gnu.org.ua>
1593    
1594 gray 1538 Ported r1536 from branches/release_4_2_patches (= r1535 from
1595     tags/release_4_2):
1596    
1597     * src/syslog_async.c: Include config.h, netinet/in.h and signal.h
1598     Conditionally include paths.h, provide replacements for _PATH_LOG
1599     and _PATH_CONSOLE if it is absent.
1600     Provide dummy replacement for MSG_NOSIGNAL and LOG_PERROR.
1601     (log_write_async): Ignore SIGPIPE if MSG_NOSIGNAL is not defined.
1602     * src/main.c: Conditionally compile syslog-async stuff.
1603     * src/Makefile.am: Likewise.
1604     * configure.ac: Check for paths.h.
1605     Restore previous meaning of --enable-syslog-async.
1606     (DEFAULT_SYSLOG_ASYNC): New variable.
1607    
1608     * doc/mailfromd.texi: Reflect above-mentioned changes.
1609    
1610 gray 1534 * src/main.c: Reflect recent changes to Mailutils.
1611 gray 1538
1612 gray 1532 2007-11-22 Sergey Poznyakoff <gray@gnu.org.ua>
1613    
1614 gray 1533 * src/main.c: Implement MU configuration statements.
1615     * tests/atlocal.in (MFOPTS): Ignore site-wide and per-user
1616     configuration files.
1617     * doc/mailfromd.texi: Document sieve interface.
1618    
1619     2007-11-22 Sergey Poznyakoff <gray@gnu.org.ua>
1620    
1621 gray 1532 * doc/mailfromd.texi: Update
1622    
1623 gray 1530 2007-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
1624    
1625     * src/bi_io.m4 (write): Implement optional third argument.
1626 gray 1531 * src/bi_sieve.m4: New file.
1627     * src/mailfromd.h (vlogmsg): New proto.
1628     * src/main.c (capa): Request "common" capability.
1629     (main): Register all mailbox formats (needed for sieve).
1630     * src/Makefile.am (M4_FILES): Add bi_sieve.m4
1631     * src/mtasim.c (process_header): chop trailing newline.
1632     * mflib/sieve.mfh: New file.
1633     * mflib/Makefile.am (inc_DATA): Add sieve.mfh.
1634     * configure.ac: Set patchlevel 90.
1635     (AM_GNU_MAILUTILS): Request 'all' and 'sieve' link flags.
1636     * doc/mailfromd.texi: Document 3rd argument of write.
1637     * NEWS: Update.
1638 gray 1530
1639 gray 1527 2007-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
1640    
1641 gray 1529 * README-alpha: Update
1642     * configure.ac: Use AM_GNU_MAILUTILS.
1643     * acinclude.m4: Minor fix.
1644    
1645 gray 1528 * smap: New directory.
1646     * smap/smap.c: New file. A general-purpose socket map for MeTA1
1647     (for future use).
1648    
1649 gray 1527 * src/mu_dbm.c [WITH_GDBM]: do not bail out if the database does
1650     not exist.
1651     * src/mailfromd.h: Add argp.h
1652     * src/bi_sa.m4: Minor fixes.
1653     * src/main.c: Support for Mailutils CVS HEAD.
1654     * configure.ac: Likewise.
1655    
1656 gray 1526 2007-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
1657    
1658     * src/engine.c (check_on_host): Wait for an answer to QUIT.
1659     Fix courtesy of Nacho Gonzalez Lopez.
1660     * src/bi_sa.m4: Revert the changes inadvertently pushed on
1661     2007-10-21.
1662     * doc/Makefile.am: Use texi2html to produce HTML version of the
1663     manual.
1664     * doc/gendocs_template: Likewise
1665     * doc/gendocs.sh: Remove. Changes incorporated into the Texinfo
1666     repository.
1667     * doc/gendocs_template: Use conditionals, introduced in the
1668     Texinfo CVS.
1669    
1670 gray 1524 2007-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
1671    
1672     * src/dnsbase.c (domain_name_cmp): Allow for trailing dot after
1673     the domain.
1674    
1675 gray 1520 2007-10-23 Sergey Poznyakoff <gray@gnu.org.ua>
1676    
1677 gray 1521 * doc/mailfromd.texi: Do not use subheading commands inside of
1678     deffn.
1679     * doc/Makefile.am
1680     * doc/gendocs.sh: New file. A customized version.
1681     * doc/gendocs_template: Update
1682    
1683 gray 1520 * configure.ac, src/syslog_async.c, src/syslog_async.h,
1684     src/main.c, src/Makefile.am: Reimplement syslog-async. Thanks
1685     Simon Kelley for relicensing it under GPLv3.
1686     * doc/mailfromd.texi, NEWS: Update
1687    
1688 gray 1517 2007-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
1689    
1690 gray 1518 * src/dnsbase.c (cname_loop_body): Return TXT only if explicitly
1691     required. Bug reported by Jan Rafaj.
1692    
1693 gray 1517 * src/engine.c: Fix timeout calculations
1694     (struct timeout_ctl): New data type
1695     (UPDATE_TTW,smtp_stream_wait,smtp_wait): Operate on struct timeout_ctl.
1696     All callers updated.
1697     (init_timeout_ctl): New function.
1698    
1699 gray 1516 2007-10-12 Sergey Poznyakoff <gray@gnu.org.ua>
1700    
1701     * src/mtasim.c (_def_read): Return 0 if zero bytes were read
1702     (get_input_line): Fix counting of input bytes.
1703     (smtp): Fix checking for returns from process_data_reply.
1704     * gacopyz/server.c (srv_format_macros): Do not add trailing zero
1705     to the packet.
1706    
1707 gray 1513 2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua>
1708    
1709 gray 1514 * src/mailfromd.h [!ENABLE_NLS] (bindtextdomain): Fix definition.
1710     * src/cache.c (cache_get2): Fix misplaced variable definition.
1711    
1712 gray 1513 * src/dnsbase.c (dns_resolve_hostname): Remove stray free, left
1713     over after 2007-09-03.
1714    
1715 gray 1511 2007-09-13 Sergey Poznyakoff <gray@gnu.org.ua>
1716    
1717 gray 1512 * src/prog.c (heap_obstack_grow): Bugfix. The condition didn't
1718     take into account usignedness.
1719     (get_numeric_arg): Extra safety fix.
1720    
1721 gray 1511 * configure.ac (MAILUTILS_VERSION): Bugfix.
1722    
1723 gray 1510 2007-09-12 Sergey Poznyakoff <gray@gnu.org.ua>
1724    
1725     * src/main.c (log_setup): Set up gacopyz_syslog_log_printer when
1726     logging to syslog.
1727    
1728 gray 1509 2007-09-11 Sergey Poznyakoff <gray@gnu.org.ua>
1729    
1730     * src/mu_dbm.c [WITH_GDBM] (mu_dbm_firstkey,mu_dbm_nextkey):
1731     Return MU_ERR_NOENT instead of MU_ERR_FAILURE.
1732     * src/mailfromd.h (get_rate): New argument mincount
1733     * src/rate.c: Likewise
1734     * src/bi_other.m4 (rate): Optional argument mincnt
1735     * src/mtasim.c: Accept MAIL FROM: and RCPT TO: without extra space
1736     after `:'.
1737     * doc/mailfromd.texi, NEWS: Update
1738    
1739 gray 1505 2007-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
1740    
1741     * src/dnsbase.c (dns_resolve_hostname): Make name buffer big
1742 gray 1510 enough to hold eventual CNAME expansions. Reported by Jan Rafaj.
1743 gray 1505 * configure.ac: Improve to compile with the latest MU CVS.
1744    
1745 gray 1503 2007-08-11 Sergey Poznyakoff <gray@gnu.org.ua>
1746    
1747     * configure.ac (check_slackware_bdb): Add heuristics to find the
1748     correct include directory.
1749    
1750 gray 1499 2007-08-10 Sergey Poznyakoff <gray@gnu.org.ua>
1751    
1752     * src/gram.y (on_cond): Fix coredump if target address is not
1753     specified.
1754     (vardecl): Signal error if an auto variable is doubly defined.
1755     * tests/testsuite.at (EX_OK--EX_CONFIG): New defines
1756     (MF_CHECK_TEXT): New macro
1757     Add poll04.at and ashadow.at
1758     * tests/ashadow.at, tests/poll04.at: New files
1759     * doc/mailfromd.texi: Minor fixes
1760 gray 1502 * src/dnsbase.c (a_lookup): Make name buffer big enough to hold
1761     eventual CNAME expansions.
1762 gray 1499
1763 gray 1497 2007-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
1764    
1765     * src/engine.c (check_on_host): Do not send space character after
1766     MAIL FROM: and RCPT TO:
1767     * doc/mailfromd.texi, TODO: Minor fixes.
1768     * NEWS: Update
1769    
1770 gray 1495 2007-06-30 Sergey Poznyakoff <gray@gnu.org.ua>
1771    
1772     Relicense everything under the GPLv3.
1773    
1774     * src/syslog_async.c, src/syslog_async.h: Removed
1775    
1776 gray 1491 2007-06-11 Sergey Poznyakoff <gray@gnu.org.ua>
1777    
1778     * configure.ac, NEWS: Version 4.1
1779     * doc/mailfromd.texi: Update
1780     * src/pp.c (next_line): Bugfix
1781    
1782 gray 1489 2007-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
1783    
1784     * doc/mailfromd.texi (NLS Functions): Update
1785     * elisp/mfl-mode.el (mfl-mode-syntax-table): Update
1786    
1787 gray 1486 2007-06-01 Sergey Poznyakoff <gray@gnu.org.ua>
1788    
1789     * src/lex.l: Fix line counting within here-documents
1790    
1791 gray 1479 2007-05-27 Sergey Poznyakoff <gray@gnu.org.ua>
1792    
1793     * elisp/mfl-mode.el: Initial implementation
1794     * tests/shadow.at, tests/bctx00.at, tests/fctx00.at,
1795     tests/macros.at, tests/etc/reject.rc, tests/etc/farg.rc,
1796     tests/etc/cidr.rc, tests/etc/catch.rc, tests/etc/catch01.rc,
1797     tests/etc/cond.rc, tests/etc/dns.rc, tests/etc/macros.rc,
1798     tests/etc/shadow.rc, tests/etc/relayed.rc, tests/etc/var.rc,
1799     tests/etc/numrcpt.rc, tests/etc/strings.rc, tests/etc/prec.rc,
1800     tests/etc/ack.rc, tests/etc/accept.rc, tests/etc/switch.rc,
1801     tests/etc/tempfail.rc, tests/etc/greylist.rc, tests/etc/poll-1.rc,
1802     tests/etc/sa01.rc, tests/etc/sa02.rc, tests/etc/poll.rc,
1803     tests/etc/sa03.rc, tests/etc/sa04.rc, tests/etc/ml.rc,
1804     tests/etc/arg.rc, etc/mailfromd.rc: Use MFL Emacs mode
1805    
1806 gray 1477 2007-05-26 Sergey Poznyakoff <gray@gnu.org.ua>
1807    
1808     * doc/mailfromd.texi: Update
1809     * Makefile.am: Update
1810     * elisp: New directory
1811     * elisp/mfl-mode.el: New file
1812     * elisp/Makefile.am: New file
1813    
1814 gray 1474 2007-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
1815    
1816     * src/snarf.m4 (MF_OPTVAL): Fix a leftover bug
1817     * src/gram.y (on_cond): Reverse selector argument list.
1818 gray 1475 * src/drivers.c (code_type_call): Provide placeholders for
1819 gray 1476 missing optional arguments, so they can be safely accessed and
1820 gray 1474 assigned.
1821     * src/bi_dns.m4, src/bi_db.m4: Use MF_OPTVAL insted of MF_DEFINED.
1822     * src/bi_sa.m4: Avoid splitting strings within NLS markers,
1823 gray 1477 because M4 inserts line directives in between, which causes grief
1824 gray 1474 for many compilers.
1825     * src/Makefile.am (.m4.c): Fix the sed rule
1826     * src/mtasim.c (recursive_rmdir): Do not complain when attempting
1827     to delete a non-existing file.
1828    
1829 gray 1468 2007-05-24 Sergey Poznyakoff <gray@gnu.org.ua>
1830    
1831 gray 1470 * src/bi_gettext.m4: Built-in NLS support
1832     * mflib/gettext.mf: NLS support; library level.
1833     * src/Makefile.am, mflib/Makefile.am, mflib/pp-setup: Implement
1834     NLS support
1835    
1836 gray 1469 * src/snarf.m4 (mf_c_arglist,MF_RETURN_TEMP_SPACE): Fix stack
1837     offset calculation for adjust_stack and unroll_stack
1838     (MF_VA_ARG): Raise an exception if the argument number is out of
1839     range.
1840     (MF_THROW): Avoid outputting extra newlines
1841     (MF_ASSERT): Remove spurious semicolon
1842     * src/bi_sprintf.m4: Implemented xXu.
1843     * src/Makefile.am (.m4.c): Fix the sed rule.
1844     * mflib/pp-setup (printf): New macro
1845    
1846 gray 1468 * src/snarf.m4 (MF_GROW_TEMP_SPACE): Take optional 3rd argument
1847     * src/bi_sprintf.m4: Implement all modifiers, flags and basic
1848     conversions
1849     * src/prog.c (struct eval_environ.temp_start): New field.
1850     (heap_tempspace_begin,heap_tempspace_finish)
1851     (heap_tempspace_grow): Update tos in sync with temp_size so that
1852     heap_tempspace() can be used.
1853     * src/Makefile.am (builtin.h): Depend on Makefile.am
1854    
1855 gray 1467 2007-05-23 Sergey Poznyakoff <gray@gnu.org.ua>
1856    
1857     * src/symtab.c (va_builtin_install_ex): Extra argument: varargs
1858    
1859     * src/snarf.m4 (MF_DEFUN_VARARGS,MF_VA_START,MF_VA_END)
1860     (MF_VA_COUNT,MF_VA_ARG): New macros: Support for variable number
1861     of arguments to built-in functions
1862     (MF_BEGIN_TEMP_SPACE,MF_GROW_TEMP_SPACE,MF_1GROW_TEMP_SPACE)
1863     (MF_END_TEMP_SPACE): New macros. Improved growable heap space
1864     support.
1865     (m4wrap): Use m4_m4wrap.
1866    
1867     * src/gram.y (cast_arg_list): Take extra argument
1868     (funcall: BUILTIN): Allow for builtins taking varying number of
1869     arguments.
1870     * src/drivers.c (code_type_builtin): Allow for builtins taking
1871     varying number of arguments.
1872     * src/mailfromd.h (struct builtin.varargs): New field
1873     (va_builtin_install_ex): Change signature.
1874     * src/bi_dns.m4 (dns_getaddr, dns_getname, getmx): Use new heap
1875     allocation macros.
1876     * src/bi_system.m4 (strftime): Rewrite using MF_ALLOC_HEAP
1877     * src/prog.c (struct eval_environ.temp_size): New field
1878     (unroll_stack): New function
1879     (expand_dataseg): If errtext is NULL return 1/0 isntead of raising
1880     a runtime error.
1881     (push): Fix expansion condition
1882     (heap_tempspace_begin, heap_tempspace_finish)
1883     (heap_tempspace_grow): New functions
1884     (heap_max_tempspace): Remove
1885     (env_vsprintf): Rewrite.
1886     * src/prog.h (heap_max_tempspace,heap_fix_tempspace): Remove
1887     (heap_tempspace_begin,heap_tempspace_finish)
1888     (heap_tempspace_grow,unroll_stack): New functions
1889     * src/bi_sprintf.m4: New file. Sprintf support (limited at the time)
1890     * src/Makefile.am: Add bi_sprintf.m4
1891     * doc/mailfromd.texi: Update
1892    
1893 gray 1461 2007-05-22 Sergey Poznyakoff <gray@gnu.org.ua>
1894    
1895 gray 1465 * mflib/dns.mf: Rewritten as
1896     * mflib/dns.mf4: .. this
1897     * mflib/safedb.mf: Rewritten as
1898     * mflib/safedb.mf4: .. this
1899     * mflib/Makefile.am (.mf4.mf): New rule
1900    
1901 gray 1464 * src/lex.l: Discontinue supporting &code form.
1902     New lexical entities: $# with the usual meaning and @parm,
1903     for getting ordinal number of parameter `parm' in the parameter
1904     list.
1905     New built-in constant __preproc__. Expands to the command name of
1906     the preprocessor.
1907     * src/snarf.m4 (MF_THROW): Bugfix: do not output ": " after the
1908     function name, it is done automatically by the error reporting
1909     routines.
1910 gray 1465 * src/gram.y: Support $# and @parm. Fix missing occurrences of
1911 gray 1464 `reverse' (yesterday's changes).
1912     * src/drivers.c (code_type_builtin): Fix passing $#
1913     (code_type_call): Implement $# (a hidden first argument) for MFL
1914     functions.
1915     (type offset): New node type
1916     * src/mailfromd.h (struct variable.ord): New field.
1917     * mflib/dns.mf, mflib/safedb.mf: Reflect the recent changes in
1918     optional argument handling.
1919     * mflib/pp-setup (defined): New macro
1920     * NEWS: Update
1921    
1922 gray 1461 * src/snarf.m4 (__mf_has_optarg): New macro
1923     (__mf_defined_argname,__mf_defined_argnames)
1924     (mf_defined_argnames,mf_argpos): New macro
1925     (__mf_optarg_defined,__mf_defined,MF_DEFINED,MF_OPTVAL)
1926     (__mf_c_arglist,mf_c_arglist)
1927     Fix typo (m4_errprint)
1928     * src/gram.y: Arguments are passed the in the same order for both
1929     built-in and MFL-level functions.
1930     (print_node_list_reverse): New function
1931     * src/bi_string.m4 (substr): Bugfix: Use MF_DEFINED
1932     * src/drivers.c (print_type_builtin): Use print_node_list_reverse
1933     (code_type_builtin): Pass total number of arguments in a hidden
1934     argument if the built-in takes optional parameters.
1935     * src/mailfromd.h: Fix typo
1936     * src/main.c: Make sure logging goes to stderr for --dump-*
1937     options.
1938     * TODO: Update
1939    
1940 gray 1454 2007-05-20 Sergey Poznyakoff <gray@gnu.org.ua>
1941    
1942 gray 1459 * src/lex.l: Fix input file location tracing
1943     * src/pp.c (try_file): extra argument err_not_found controls
1944     whether to bail out if the file is not found.
1945    
1946 gray 1458 * src/lex.l: Use pp_extrn_start/pp_extrn_shutdown to launch the
1947     external preprocessor.
1948     * src/mailfromd.h (pp_extrn_start, pp_extrn_shutdown, pp_init)
1949     (pp_done): New functions
1950     * src/pp.c (pp_extrn_start, pp_extrn_shutdown): New functions
1951     (preprocess_input): If a file named "pp-setup" is found in the
1952     include path, feed its contents to the preprocessor first.
1953     * mflib/pp-setup: Default preprocessor setup file.
1954     * mflib/Makefile.am (inc_DATA): Add pp-setup
1955     * configure.ac: Install default pp-setup file if the preprocessor
1956     is m4
1957    
1958 gray 1456 Implement built-in and external preprocessors.
1959    
1960     * src/pp.c: New file. Built-in preprocessor
1961     * src/lex.l, src/gram.y, src/mailfromd.h, src/main.c: Use
1962     preprocessor feature.
1963     * src/Makefile.am (mailfromd_SOURCES): Add pp.c
1964     (AM_CPPFLAGS): Define DEFAULT_PREPROCESSOR
1965     * tests/atlocal.in (MFOPTS): Disable external preprocessor
1966     * configure.ac: New option --with-preprocessor and variable
1967     DEFAULT_PREPROCESSOR
1968    
1969 gray 1454 * src/engine.c (listens_on): port argument was ignored
1970    
1971 gray 1447 2007-05-17 Sergey Poznyakoff <gray@gnu.org.ua>
1972    
1973 gray 1451 * src/bi_dns.m4 (listens): Bugfix
1974    
1975 gray 1447 * po/pl.po, po/uk.po: Move to
1976     http://svn.gnu.org.ua/sources/mailfromd/trunk/po. Mailfromd is now
1977     officially registered at TP.
1978     * po/LINGUAS: Remove. The file is generated automatically
1979     * bootstrap: Get translations from the TP.
1980 gray 1449 * README-alpha: Update
1981    
1982 gray 1438 2007-05-16 Sergey Poznyakoff <gray@gnu.org.ua>
1983    
1984 gray 1442 * src/snarf.m4, src/init.m4, src/Makefile.am: Save namespace from
1985     pollution: Use m4_ prefixed keywords.
1986     * src/main.c: Add missing NLS markers
1987    
1988 gray 1438 * src/Makefile.am (EXTRA_DIST): Add daemon.c
1989     * src/prog.c (instr_symbol): Add missing NLS marker.
1990     * src/engine.c (mailfromd_daemon): Leave the first three
1991     descriptors open before attemtping to restart.
1992    
1993 gray 1433 2007-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
1994    
1995     * src/debug.cin (debug_level_p): Change logic so that per-module
1996     specification takes precedence over the global one.
1997    
1998 gray 1430 2007-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
1999    
2000 gray 1431 * po/uk.po: Ukrainian translation
2001 gray 1430 * po/pl.po: Minor fixes
2002     * po/LUNGUAS: Add uk
2003 gray 1431 * src/lex.l, src/gram.y, src/bi_dns.m4, src/mtasim.c,
2004     gacopyz/gacopyz.c: Minor fixes.
2005 gray 1430
2006 gray 1428 2007-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
2007    
2008     * src/symtab.c, src/lex.l, src/mu_dbm.c, src/engine.c,
2009     src/snarf.m4, src/dnscache.c, src/gram.y, src/debug.cin,
2010     src/drivers.c, src/bi_string.m4, src/bi_poll.m4, src/dnsbase.c,
2011     src/mailfromd.h, src/db.c, src/openat-die.c, src/spf.c,
2012     src/bi_dns.m4, src/cache.c, src/optab.opc, src/prog.c,
2013     src/bi_ipaddr.m4, src/bi_sa.m4, src/mf-status.mfi, src/bi_io.m4,
2014     src/main.c, src/Makefile.am, src/bi_other.m4, src/bi_mail.m4,
2015     src/mtasim.c, src/rate.c, src/bi_db.m4, tests/shadow.at,
2016     tests/invcidr.at, tests/invcidr2.at, configure.ac, gacopyz/smfi.c,
2017     gacopyz/gacopyz_priv.h, gacopyz/proc.c, gacopyz/server.c,
2018     gacopyz/io.c, gacopyz/Makefile.am, gacopyz/gacopyz.c,
2019     bootstrap: Add i18n framework
2020    
2021     * po: New directory
2022     * po/POTFILES.in: New file
2023     * po/LINGUAS: New file
2024     * po/pl.po: New translation
2025    
2026 gray 1422 2007-05-12 Sergey Poznyakoff <gray@gnu.org.ua>
2027    
2028 gray 1423 -= Release 4.0 =-
2029    
2030     2007-05-12 Sergey Poznyakoff <gray@gnu.org.ua>
2031    
2032 gray 1422 * bootstrap: Avoid importing openat-die. This needs the following
2033     patch:
2034     http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00056.html
2035     * README-alpha: Update
2036     * src/openat-die.c: New source
2037     * src/Makefile.am (mtasim_SOURCES): Add openat-die.c
2038     * doc/mailfromd.texi, doc/mtasim.texi: Update
2039    
2040 gray 1419 2007-05-11 Sergey Poznyakoff <gray@gnu.org.ua>
2041    
2042     * configure.ac, NEWS: Raise version number to 4.0. Ready for the
2043     release.
2044     * src/version.c: New file.
2045     * src/Makefile.am (libmf.a): New library
2046     * bootstrap (MODLIST): Add version-etc
2047     * src/mailfromd.h (mailfromd_version): New function
2048     * src/main.c, src/mtasim.c: Use mailfromd_version to display
2049     program version/license. Remove --license option, because
2050     --version does the job.
2051     * tests/version.at: Fix version format to match that of version-etc
2052     output.
2053    
2054     * doc/mailfromd.texi: Final polish.
2055    
2056 gray 1418 2007-05-10 Sergey Poznyakoff <gray@gnu.org.ua>
2057    
2058     * src/mu_dbm.c [WITH_BDB] (mu_dbm_open): Up to v.4.1 there were no
2059     txn argument to db->open.
2060     * src/engine.c (check_on_host): Clear last_poll_* values before
2061     startning the new poll.
2062    
2063 gray 1416 2007-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
2064    
2065 gray 1417 * src/engine.c (check_portspec): Bugfix
2066    
2067 gray 1416 * src/mu_dbm.c [WITH_BDB] (mu_dbm_open): Locking mode
2068     depends on the open flags.
2069    
2070 gray 1414 2007-05-06 Sergey Poznyakoff <gray@gnu.org.ua>
2071    
2072     * src/mtasim.c: \E can take 1 and 2 digit codes.
2073     Correctly close the milter server before exiting
2074     * configure.ac: Call MU_DEBUG_MODE
2075     * doc/mailfromd.texi, doc/mtasim.texi: Update
2076     * acinclude.m4: New file
2077     * gacopyz/gacopyz.h, gacopyz/server.c (gacopyz_srv_abort)
2078     (gacopyz_srv_quit): New functions
2079     * gacopyz/gacopyz.c: Do not complain if the socket does not exist.
2080    
2081 gray 1411 2007-05-05 Sergey Poznyakoff <gray@gnu.org.ua>
2082    
2083     * src/mailfromd.h (DEFAULT_PIDFILE): Use file name relative to
2084     the state directory
2085     * src/main.c (portspec,pidfile): Initialize dynamically.
2086     (init_names): New function
2087     (state_dir_fixup,portspec_fixup,fixup_state_dir_names): New
2088     functions
2089     (main): Call init_names and fixup_state_dir_names
2090     (mailfromd_show_defaults): Use variables, not defines (hmmm)
2091    
2092 gray 1405 2007-05-04 Sergey Poznyakoff <gray@gnu.org.ua>
2093    
2094 gray 1406 * src/gram.y (convert_rate): Bugfix.
2095     * src/main.c: --predict implies --format=rate --list
2096     Update copyright years
2097     * doc/mailfromd.texi: Update
2098     * etc/Makefile.am (.in.mailfromd): Set executable bit on the
2099     target.
2100    
2101 gray 1405 * src/mu_dbm.c [WITH_BDB] (mu_dbm_open): install errcall fn if
2102     debug level >= 1
2103     * src/engine.c (save_cmdline,sig_restart): New function
2104     (mailfromd_daemon): SIGHUP causes restart (if the program is
2105     invoked using the absolute file name)
2106     * src/mailfromd.h (getmaxfd): New macro from bi_io.m4
2107     (script_file,mtasim_option): New globals
2108     (log_setup,save_cmdline): New functions
2109     * src/bi_io.m4 (getmaxfd): move to src/mailfromd.h
2110     * src/main.c: New option --mtasim for mtasim interaction
2111     (log_setup): New function
2112     (main): Initial logging stream depends on whether stderr is closed
2113     or not.
2114     Save command line unless script file is not an absolute file name
2115     * src/mtasim.c (start_mailfromd): Use --mtasim instead of
2116     --foreground (mainly for further use.
2117     * configure.ac: Check for sysconf and getdtablesize
2118     * doc/mailfromd.texi: Update
2119     * doc/Makefile.am (check-fixmes): The rule missed multiline fixmes
2120     * etc/rc.in (mailfromd_status): remove trailing space from the
2121     first grep pattern
2122     (mailfromd_reload): New function
2123     New option `reload'
2124    
2125     * gacopyz/gacopyz_priv.h (struct gacopyz_conn): New members
2126     cleanup and cleanup_data.
2127     * gacopyz/proc.c (gacopyz_cleanup_conn): Call conn->cleanup
2128     * gacopyz/gacopyz.c (do_connect): Install a cleanup handler to
2129     remove the UNIX socket.
2130     * NEWS: Update
2131    
2132 gray 1404 2007-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
2133    
2134     * src/mu_dbm.c (mu_dbm_strerror): Improve error logging.
2135    
2136 gray 1399 2007-05-01 Sergey Poznyakoff <gray@gnu.org.ua>
2137    
2138 gray 1402 * src/mu_dbm.c (lock_file): fcntl can return non-null values.
2139     Retry if F_GETLK returns F_UNLCK
2140     (mu_dbm_open): Always use O_RDWR if the file could need to be
2141     locked for writing afterwards.
2142    
2143 gray 1399 Ensure begin blocks can set exception handlers:
2144    
2145     * doc/mailfromd.texi: Update
2146     * src/engine.c (xeval): Call env_save_catches after running begin
2147     blocks
2148     * src/prog.c (struct eval_environ.defcatch): New field
2149    
2150 gray 1397 2007-04-30 Sergey Poznyakoff <gray@gnu.org.ua>
2151    
2152     * src/gram.y: Use inner context to check for action usage in
2153     begin/end blocks. This allows to define global catches.
2154    
2155 gray 1389 2007-04-28 Sergey Poznyakoff <gray@gnu.org.ua>
2156    
2157     * src/mu_dbm.c: Use F_SETLKW
2158     * src/engine.c (priv_get, filter_cleanup): Add missing env_init
2159     * src/gram.y: Reset state_tag after reducing prog rules
2160     (sendmail_action, header_action): Additional checks
2161     * src/main.c: New option --gacopyz-log
2162     * doc/mailfromd.texi: Document --gacopyz-log
2163    
2164 gray 1390 * gacopyz/smfi.c (smfi_setlogmask): Do what its name suggests.
2165 gray 1389 * gacopyz/gacopyz.h (SMI_LOG_UPTO, SMI_LOG_FROM): New macros
2166     (gacopyz_string_to_log_level, gacopyz_log_level_to_string): New
2167     functions
2168     * gacopyz/log.c (gacopyz_string_to_log_level)
2169     (gacopyz_log_level_to_string): New functions.
2170    
2171 gray 1386 2007-04-27 Sergey Poznyakoff <gray@gnu.org.ua>
2172    
2173 gray 1387 * src/mailfromd.h (smtp_state_begin,smtp_state_end): New
2174     (pseudo)states.
2175     (struct db_format.enabled): New field
2176     * src/lex.l (begin,end): New keywords
2177     * src/gram.y (begin,end): New statements
2178     * src/engine.c (priv_get, filter_cleanup): call `begin' and `end'
2179     handlers.
2180     (mlfi_abort): Clear session-specific information
2181    
2182     * src/dnscache.c, src/cache.c, src/rate.c: Honor `.enabled' field
2183     * src/bi_db.m4: Honor `.enabled' field
2184     (db_get_active,db_set_active): New builtins
2185     (greylist): Remove spurious debugging info
2186     * doc/mailfromd.texi: Update
2187     * NEWS: Update
2188    
2189 gray 1386 * src/mu_dbm.c [WITH_BDB]: Improve locking algo: yield control to
2190     the system before locking DB for writing to give other processes a
2191     chance to get the DB.
2192     * src/engine.c: Use SIGUSR1 to let the siblings know we changed
2193     lock status.
2194     (mailfromd_daemon,child_start): Ignore SIGUSR1.
2195    
2196 gray 1381 2007-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
2197    
2198     * NEWS: Update
2199     * src/lex.l (parse_require): Bugfix
2200     * mflib/heloarg_test.mf, mflib/spf.mf: Begin the names of the static
2201     functions with __
2202     * doc/Makefile.am (check-refs): Scan all texi sources
2203     (check-mflib): Ignore static names (__.*)
2204     * doc/mailfromd.texi, doc/mtasim.texi, doc/macros.texi: Update.
2205    
2206 gray 1379 2007-04-24 Sergey Poznyakoff <gray@gnu.org.ua>
2207    
2208     * src/lex.l (parse_require): Bugfix
2209     * src/bi_mail.m4: Bugfix
2210     * src/mtasim.c: Implement help, fix directory removal at exit,
2211     implement readline history file. Bugfixes in smtp()
2212     * tests/testsuite.at, tests/accept.at, tests/greylist.at,
2213     tests/arg.at, tests/reject.at, tests/numrcpt.at,
2214     tests/tempfail.at: Use mtasim -Xauto when necessary
2215     * configure.ac, NEWS: Raise patchlevel to 92
2216     * doc/mailfromd.texi: Update
2217     * doc/mtasim.texi: mtasim documentation
2218     * doc/Makefile.am: Add mtasim.texi
2219     * gacopyz/gacopyz_priv.h (struct gacopyz_conn): Keep information
2220     about children pids
2221     * gacopyz/proc.c (gacopyz_register_child)
2222     (gacopyz_unregister_child): New functions
2223     (cleanup_children): Call gacopyz_unregister_child
2224     (gacopyz_cleanup_conn): Terminate children individualy instead of
2225     sending TERM to the whole process group, because we might be not
2226     the group leader.
2227     * gacopyz/gacopyz.c (gacopyz_handle_connection): Register child
2228     pid after startup.
2229     * bootstrap: Require save-cwd. Test if lib/daemon.c exists before
2230     attempting to create it.
2231    
2232 gray 1374 2007-04-23 Sergey Poznyakoff <gray@gnu.org.ua>
2233    
2234 gray 1377 * src/mtasim.c: Implement --port=auto, a special mode, where
2235     mtasim starts the mailfromd on an agreed-upon port and terminates
2236     it before exiting.
2237     * bootstrap: Require mkdtemp
2238    
2239 gray 1375 * mflib/mx.mf: Remove. Superceded by the `getmx' builtin function.
2240     * mflib/Makefile.am: Remove mx.mf
2241     * doc/mailfromd.texi, NEWS: Update
2242    
2243 gray 1374 * src/debug.cin, src/debugdef.m4 (debug_spec_string): New function
2244     (modname): Redefine as char *[]
2245     * src/lex.l, mflib/match_dnsbl.mf, mflib/heloarg_test.mf,
2246     mflib/mx.mf, mflib/valid_domain.mf, mflib/match_rhsbl.mf,
2247     mflib/spf.mf, tests/etc/cidr.rc, tests/etc/catch.rc,
2248     tests/etc/catch01.rc, tests/etc/poll-1.rc, etc/mailfromd.rc,
2249     NEWS: Introduce module system
2250    
2251     * src/main.c: Minor wording fixes
2252     * src/Makefile.am (.cin.c): Require line info from m4
2253     * src/bi_other.m4 (debug_spec, debug_level): New functions.
2254    
2255 gray 1372 2007-04-21 Sergey Poznyakoff <gray@gnu.org.ua>
2256    
2257     * src/debugdef.m4, src/debug.cin, src/debug.hin: Debugging macros
2258     and supporting functions.
2259     * src/snarf.m4 (MF_SOURCE_DEBUG_NAME): New macro
2260     * src/lex.l, src/engine.c, src/dnscache.c,
2261     src/gram.y, src/dnsbase.c, src/mailfromd.h, src/dns.c, src/db.c,
2262     src/spf.c, src/cache.c, src/prog.c, src/main.c, src/rate.c: Use
2263     new debugging system.
2264     * src/Makefile.am: Build debug.[ch]
2265     * src/bi_other.m4 (cancel_debug): Removed
2266    
2267     * etc/sendmail-8.13.7.connect.diff: New file. Patch for Sendmail
2268     to honor extended codes and textual messages returned by the connect
2269     handler.
2270     * etc/Makefile.am: Add sendmail-8.13.7.connect.diff
2271    
2272     * gacopyz/smfi.c, gacopyz/gacopyz.h (smfi_setlogmask): New function
2273     * gacopyz/gacopyz.c (gacopyz_handle_connection): Log an info
2274     message before finishing.
2275    
2276 gray 1368 2007-04-20 Sergey Poznyakoff <gray@gnu.org.ua>
2277    
2278     * src/syslog_async.c, src/syslog_async.h: Async syslog
2279     implementation by Simon Kelley
2280     * src/mailfromd.h, src/main.c, src/Makefile.am,
2281     configure.ac: Implement async syslog.
2282    
2283     * doc/mailfromd.texi, NEWS: Document syslog-async
2284    
2285     * gacopyz/gacopyz.c (gacopyz_handle_connection): Print connection
2286     info after forking, so the actual PID is displayed.
2287    
2288 gray 1362 2007-04-18 Sergey Poznyakoff <gray@gnu.org.ua>
2289    
2290 gray 1365 * src/mu_dbm.c: When possible lock BDB databases directly.
2291     For version 2.x fall back to external lock method.
2292    
2293     * src/snarf.m4 (MF_DEFINED, MF_OPTVAL): New macros
2294     * src/bi_string.m4, src/bi_dns.m4, src/bi_mail.m4,
2295     src/bi_db.m4: Use MF_DEFINED and MF_OPTVAL to test values of
2296     the optional variables.
2297     * src/main.c: New option --state-directory
2298     * doc/mailfromd.texi: Revert the description of `#pragma option'
2299    
2300 gray 1363 * src/gram.y (apply_deferred_init): Fix error messages
2301     * src/mailfromd.h, src/prog.c, src/main.c, src/bi_other.m4,
2302     NEWS: Implement stack traces.
2303    
2304 gray 1362 * mflib/match_dnsbl.mf, mflib/heloarg_test.mf,
2305     mflib/valid_domain.mf, mflib/match_rhsbl.mf, mflib/spf.mf,
2306     mflib/match_cidr.mf, doc/mailfromd.texi: Use <> in #include
2307     statements
2308    
2309 gray 1357 2007-04-17 Sergey Poznyakoff <gray@gnu.org.ua>
2310    
2311     * src/engine.c (mailfromd_daemon): Do not call
2312     mu_daemon_remove_pidfile, this results in a duplicate free at
2313     exit (compensate for mailutils bug)
2314     * src/bi_dns.m4 (getmx): Fix iteration over mxbuf
2315    
2316 gray 1354 2007-04-16 Sergey Poznyakoff <gray@gnu.org.ua>
2317    
2318 gray 1355 * src/mu_dbm.c, src/mu_dbm.h: Use external lock file for Berkeley
2319     DB (argghh)
2320     * src/mailfromd.h, src/db.c, src/main.c: Implement pragma option
2321     state-directory
2322     * tests/etc/config.in: Use #pragma option state-directory
2323     * doc/mailfromd.texi: Document #pragma option state-directory
2324    
2325     * gacopyz/gacopyz.c (shan_connect): Fix packet length calculation.
2326     * NEWS: Update
2327    
2328 gray 1354 * src/prog.c (instr_restex): Fix stack addressing (broken after
2329     2007-04-01). Add trace output.
2330    
2331 gray 1351 2007-04-12 Sergey Poznyakoff <gray@gnu.org.ua>
2332    
2333 gray 1352 * src/mu_dbm.c: Re-implement database locking for Berkeley DB
2334    
2335 gray 1351 * src/mu_dbm.c, src/mu_dbm.h (mu_dbm_strerror): New function
2336     (mu_dbm_firstkey, mu_dbm_nextkey): Change signature
2337     * src/dnscache.c, src/db.c, src/cache.c, src/rate.c,
2338     src/bi_db.m4: Update for new mu_dbm interface.
2339    
2340 gray 1348 2007-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
2341    
2342     * src/engine.c, src/mailfromd.h, src/prog.c, src/main.c,
2343     TODO, doc/mailfromd.texi: Provide a special exception type for
2344     unresolved sendmail macros.
2345    
2346 gray 1346 2007-04-04 Sergey Poznyakoff <gray@gnu.org.ua>
2347    
2348     * doc/mailfromd.texi, NEWS: Document SPF functions
2349    
2350 gray 1341 2007-04-03 Sergey Poznyakoff <gray@gnu.org.ua>
2351    
2352     * src/engine.c (concat_args): Print all arguments in debuging
2353     mode.
2354     (mailfromd_daemon): Set single-process mode if requested
2355 gray 1343 (mlfi_abort): Do not call filter_cleanup.
2356    
2357 gray 1341 * src/mailfromd.h (single_process_option): New variable
2358     * src/prog.c: Fix initialization of toh and computation of
2359     heap bounds in gc.
2360     * src/main.c: New option --single-process (Do not use, unless you
2361     know what you are doing!)
2362     * gacopyz/smfi.c, gacopyz/gacopyz.h (smfi_set_foreground): New
2363     function.
2364    
2365 gray 1339 2007-04-02 Sergey Poznyakoff <gray@gnu.org.ua>
2366    
2367     * src/gram.y (FOR ..) takes a stmtlist
2368     * src/bi_string.m4 (substr): Extra argument check
2369     * src/bi_dns.m4 (dns_getaddr, dns_getname): New functions
2370     * src/prog.c (expand_dataseg): Update `base'
2371     * doc/mailfromd.texi: Update
2372    
2373     * src/gram.y (loop_parm): Is a stmtlist
2374     * src/prog.c (instr_echo): Pop the argument
2375    
2376 gray 1332 2007-04-01 Sergey Poznyakoff <gray@gnu.org.ua>
2377    
2378 gray 1337 * src/lex.l, src/stack.c, src/gram.y, src/drivers.c,
2379     src/mailfromd.h, src/prog.h, doc/mailfromd.texi, NEWS: Implement
2380     loop statement.
2381     * etc/mailfromd.rc: Replace `next' with `pass'
2382    
2383 gray 1336 * src/prog.c (s_off_cmp): Revert sorting order to match that of
2384     heap growth.
2385    
2386 gray 1333 * src/drivers.c (code_memref, code_type_arg),
2387     src/prog.c (struct eval_environ, adjust_stack, env_base, get_arg)
2388     (push, pop, heap_reserve_words, heap_tempspace, heap_max_tempspace)
2389     (heap_fix_tempspace, instr_xchg, instr_dup, env_init)
2390     (env_make_frame, env_leave_frame, eval_environment, env_final_gc),
2391     src/prog.h, NEWS, doc/mailfromd.texi: Revert stack growth
2392     direction. Expand stack as the need arises.
2393    
2394 gray 1332 * src/gram.y (dataseg_layout): Make sure all global variables are
2395     subject to final_gc
2396    
2397 gray 1323 2007-03-31 Sergey Poznyakoff <gray@gnu.org.ua>
2398    
2399 gray 1332 Switch to flat address space model. Data space (and stack) contain
2400     only references to objects within the data space (virtual
2401     addresses), no actual pointers are passed.
2402    
2403     * src/snarf.m4 (MF_ALLOC_HEAP, MF_COPY_STRING): Take two arguments
2404     (MF_BEGIN_TEMP_SPACE): Use env_data_ref
2405     (MF_VAR_SET_STRING): New macro
2406     * src/bi_poll.m4, src/bi_string.m4, src/bi_dns.m4, src/bi_spf.m4,
2407     src/bi_sa.m4, src/bi_vars.m4, src/bi_db.m4: Use new heap
2408     allocation macros.
2409     * src/drivers.c (code_memref, code_type_string): Use opcode_push
2410     (code_type_variable): Remove opcode_svalidate. This time for good
2411     * src/mailfromd.h (env_throw_0): Change signature
2412     * src/prog.c (struct eval_environ.stack): Remove. Use plain
2413     addressing model. All references updated.
2414     (env_reference,env_var_ref): Remove
2415     (heap_reserve_words, heap_reserve): Return offset into the data
2416     space instead of the pointer. All uses updated.
2417     (env_data_ref): New function
2418     * src/opcodes (MEMEXT,MEM,SVALIDATE): Remove
2419     * src/prog.h (env_data_ref): New function
2420     (heap_reserve_words): New function
2421     (heap_reserve): Return size_t
2422     * TODO: Update
2423    
2424 gray 1329 * src/snarf.m4, src/prog.c, src/prog.h: Use different argument
2425     accessors for different argument types.
2426    
2427 gray 1323 * src/drivers.c (code_type_bin, code_type_regex,
2428     optimize_type_regcomp, code_type_regcomp), src/mailfromd.h (struct
2429     regcomp_data), src/prog.c (register_regex, instr_regex,
2430     instr_regcomp, instr_regmatch, instr_regmatch_mx): Use reserved
2431     rt_regex slots for dynamically compiled regular expressions.
2432    
2433 gray 1320 2007-03-28 Sergey Poznyakoff <gray@gnu.org.ua>
2434    
2435 gray 1322 * src/Makefile.am, src/mtasim.c: mtasim supports standard options.
2436    
2437 gray 1320 * src/drivers.c, src/prog.c, src/opcodes: Prepare the instruction
2438     set for array data type: remove PUSH_LITERAL, PUSH_IMMEDIATE,
2439     VARIABLE, AUTO, ARG; introduce instead MEM, MEMSTK, MEMEXT, DEREF;
2440     Change semantics of ASGN
2441    
2442 gray 1314 2007-03-27 Sergey Poznyakoff <gray@gnu.org.ua>
2443    
2444     * src/symtab.c, src/lex.l, src/gram.y, src/drivers.c,
2445     src/mailfromd.h, src/optab.opc, src/prog.c, src/opcodes,
2446     src/prog.h, src/main.c: Reimplement pre-compiled regular
2447     expressions.
2448    
2449 gray 1310 2007-03-24 Sergey Poznyakoff <gray@gnu.org.ua>
2450    
2451     * configure.ac, Makefile: Switch to Autotest based testsuite
2452     * testsuite/: Remove
2453     * tests/: New directory
2454     * tests/farg.at, tests/ismx.at, tests/atlocal.in, tests/catch.at,
2455     tests/catch01.at, tests/version.at, tests/cond02.at,
2456     tests/shadow.at, tests/cond04.at, tests/relayed02.at,
2457     tests/cond06.at, tests/testsuite.at, tests/invcidr.at,
2458     tests/ack.at, tests/accept.at, tests/bctx00.at,
2459     tests/switchn1.at, tests/greylist.at, tests/switchn3.at,
2460     tests/cidr2.at, tests/fctx00.at, tests/switchs1.at,
2461     tests/invip2.at, tests/switchs3.at, tests/poll02.at,
2462     tests/arg.at, tests/reject.at, tests/hostname.at,
2463     tests/resolve.at, tests/hasmx.at, tests/invcidr2.at,
2464     tests/macros.at, tests/cond01.at, tests/invip.at, tests/cond03.at,
2465     tests/relayed01.at, tests/numrcpt.at, tests/cond05.at,
2466     tests/prec.at, tests/strings.at, tests/rescname.at,
2467     tests/tempfail.at, tests/bctx01.at, tests/switchn2.at,
2468     tests/cidr1.at, tests/switchn4.at, tests/cidr3.at,
2469     tests/fctx01.at, tests/Makefile.am, tests/poll.at,
2470     tests/switchs2.at, tests/poll01.at, tests/ml.at, tests/switchs4.at,
2471     tests/poll03.at: New files
2472     * tests/etc: New directory
2473     * tests/etc/reject.rc, tests/etc/farg.rc, tests/etc/cidr.rc,
2474     tests/etc/catch.rc, tests/etc/catch01.rc, tests/etc/cond.rc,
2475     tests/etc/dns.rc, tests/etc/macros.rc, tests/etc/relayed.rc,
2476     tests/etc/shadow.rc, tests/etc/var.rc, tests/etc/numrcpt.rc,
2477     tests/etc/strings.rc, tests/etc/prec.rc, tests/etc/relayed.list,
2478     tests/etc/ack.rc, tests/etc/accept.rc, tests/etc/tempfail.rc,
2479     tests/etc/switch.rc, tests/etc/greylist.rc, tests/etc/poll-1.rc,
2480     tests/etc/sa01.rc, tests/etc/sa02.rc, tests/etc/poll.rc,
2481     tests/etc/sa03.rc, tests/etc/config.in, tests/etc/sa04.rc,
2482     tests/etc/ml.rc, tests/etc/arg.rc: Move from testsuite/etc
2483    
2484 gray 1307 2007-03-22 Sergey Poznyakoff <gray@gnu.org.ua>
2485    
2486 gray 1310 * src/gram.y, srv/drivers.c: Remove `next' node type
2487    
2488     * src/drivers.c: New file. Code generation drivers.
2489 gray 1307 * src/gram.y: Include drivers.c and node-tab.c.
2490     * src/drv.awk: New file. Generate node-type.h and node-tab.c
2491     headers.
2492     * src/mailfromd.h: Include node-type.h instead of defining
2493     node_type.
2494     * src/Makefile.am: Add drivers.c, drv.awk and build rules for
2495     node-type.h and node-tab.c
2496    
2497 gray 1305 2007-03-21 Sergey Poznyakoff <gray@gnu.org.ua>
2498    
2499     * src/mailfromd.h (getmxip): New function
2500     * src/dns.c (getmxip): New function
2501     * src/bi_dns.m4: (getmx): New built-in
2502     * doc/mailfromd.texi: Document getmx
2503    
2504     * src/prog.c (mx_match): Do not raise exception if mf_not_found is
2505     returned.
2506     * src/bi_sa.m4 (open_connection): Raise mf_url if unknown protocol
2507     is specified in the URL.
2508     * src/mtasim.c: Minor fix
2509    
2510 gray 1295 2007-03-19 Sergey Poznyakoff <gray@gnu.org.ua>
2511    
2512 gray 1297 * src/engine.c, src/gram.y, src/status.mfi, doc/mailfromd.texi:
2513     Implement connect handler. Pass additional argument to envfrom and
2514     envrcpt.
2515     * gacopyz/gacopyz.c (shan_connect): Bugfix
2516     * NEWS: Update
2517    
2518 gray 1296 * src/mtasim.c (process_gacopyz_reply): Do not switch to quit
2519     state unless SMFIR_SHUTDOWN is received.
2520    
2521     * testsuite/lib/mailfromd.exp: Use mtasim instead of sendmail
2522     * testsuite/etc/ml.pat, testsuite/etc/reject.pat: Adopt for
2523     mtasim.
2524     * gacopyz/server.c (gacopyz_srv_send_command): Bugfix
2525    
2526 gray 1295 * src/gram.y, src/mailfromd.h, src/prog.c, src/opcodes: Code
2527     regex_flags along with regcomp.
2528     * src/bi_dns.m4 (primitive_hasmx): Do not free mxbuf if the lookup
2529     failed.
2530     * testsuite/mailfromd/hasmx.exp: Modify
2531    
2532     * src/lex.l: Fix handling of double % and $ in literals
2533     * src/bi_ipaddr.m4 (len_to_netmask): Raise mf_range if n is out of
2534     range.
2535     * mflib/heloarg_test.mf: Fix typo
2536     * mflib/revip.mf: Revrite using IP built-ins
2537     * mflib/match_dnsbl.mf, mflib/strip_domain_part.mf,
2538     mflib/is_ip.mf, mflib/match_rhsbl.mf: Move detailed descriptions
2539     to the docs
2540     * mflib/revip.mf: Rewrite using ntohl().
2541    
2542     * doc/mailfromd.texi: Update
2543     * doc/Makefile.am (check-mflib): New rule
2544     * NEWS: Update
2545    
2546 gray 1292 2007-03-18 Sergey Poznyakoff <gray@gnu.org.ua>
2547    
2548 gray 1293 * src/stack.c: New file
2549     * src/Makefile.am: Add stack.c
2550     * src/gram.y, src/mailfromd.h, doc/mailfromd.texi: Implement
2551     `#pragma regex push|pop'
2552     * mflib/match_dnsbl.mf, mflib/strip_domain_part.mf,
2553     mflib/heloarg_test.mf, mflib/is_ip.mf, mflib/revip.mf,
2554     mflib/match_rhsbl.mf, mflib/spf.mf, mflib/match_cidr.mf: preserve
2555     user regex settings.
2556    
2557 gray 1292 * configure.ac, Makefile.am: Add mflib
2558     * NEWS: Update
2559    
2560     * mflib: New subdirectory
2561     * mflib/match_dnsbl.mf, mflib/strip_domain_part.mf,
2562     mflib/heloarg_test.mf, mflib/is_ip.mf, mflib/safedb.mf,
2563     mflib/mx.mf, mflib/dns.mf, mflib/revip.mf, mflib/valid_domain.mf,
2564     mflib/match_rhsbl.mf, mflib/spf.mf, mflib/Makefile.am,
2565     mflib/match_cidr.mf: New files
2566    
2567     * doc/Makefile.am: Remove extract.awk
2568     * doc/extract.awk: Remove
2569     * doc/mailfromd.texi: Update
2570    
2571     * src/symtab.c, src/gram.y, src/mailfromd.h: Implement optional
2572     arguments for user functions
2573     * src/lex.l: Implement #include_once
2574     * src/prog.c (name_destroy): Free the object
2575     * src/bi_ipaddr.m4 (match_cidr): Remove. The function is
2576     implemented in MFL (mflib/match_cidr.mf)
2577    
2578     * testsuite/lib/mailfromd.exp, testsuite/etc/cidr.rc,
2579     testsuite/etc/catch.rc, testsuite/etc/catch01.rc,
2580     etc/mailfromd.rc: Use includes when necessary
2581    
2582 gray 1290 2007-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
2583    
2584 gray 1291 * src/snarf.m4, src/bi_dns.m4, src/bi_dns.m4, src/bi_sa.m4,
2585     src/bi_other.m4, src/bi_mail.m4, src/bi_db.m4: Use MF_THROW
2586     instead of MF_CATCH
2587    
2588     * src/gram.y, src/mailfromd.h, src/prog.c, src/opcodes,
2589     src/prog.h, TODO: Provide access for outermost auto variables and
2590     parameters from catch blocks.
2591    
2592     * testsuite/etc/hasmx.rc, testsuite/etc/dns.rc: Use primitive_
2593     functions.
2594    
2595 gray 1290 * src/lex.l, src/gram.y, src/mailfromd.h, src/prog.c,
2596     src/opcodes: Implement throw statement
2597     * src/bi_dns.m4 (match_cidr): Move into bi_ipaddr.m4
2598     * src/bi_ipaddr.m4: New module
2599     * src/Makefile.am: Add bi_ipaddr.m4
2600     * doc/mailfromd.texi: Initial doc for IP functions
2601     * NEWS: Update
2602    
2603 gray 1287 2007-03-15 Sergey Poznyakoff <gray@gnu.org.ua>
2604    
2605 gray 1289 * src/dnsbase.c (comp_pref): Secondary ordering by MX name
2606     * src/main.c, testsuite/lib/mailfromd.exp, doc/mailfromd.texi:
2607     Discontinue support for the old semantics of options -c, -l and -L.
2608     * doc/Makefile.am (check-exceptions): Fix the rule
2609     * NEWS: Update
2610    
2611 gray 1287 * src/engine.c, src/gram.y, src/dnsbase.c, src/mtasim.c: Minor
2612     stylistic and bug fixes.
2613    
2614 gray 1286 2007-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
2615    
2616     * doc/mailfromd.texi (Data Types): Fix description of numeric
2617     data type implementation.
2618    
2619     * etc/Makefile.am (DEFAULT_PIDFILE): Fix the leftover usage of
2620     MAILFROMSTATEDIR
2621     * src/engine.c (check_on_host): Break sender email iteration if
2622     the server tempfails.
2623    
2624 gray 1284 2007-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
2625    
2626     * src/mtasim.c: Implement basic milter support
2627     Implement long options.
2628     * gacopyz/gacopyz.h, gacopyz/gacopyz_priv.h, gacopyz/server.c: Update
2629    
2630 gray 1282 2007-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
2631    
2632 gray 1283 * src/engine.c, src/gram.y, src/mailfromd.h: Implement prog data
2633     * src/mtasim.c: Implement headers
2634     * gacopyz/gacopyz_priv.h, gacopyz/gacopyz.c: Fix processing of
2635     data and eoh
2636     * gacopyz/server.c: Implement most of the stuff
2637    
2638 gray 1282 * src/mtasim.c: Implement mail from and rcpt to
2639     * gacopyz/gacopyz.h: Likewise
2640     * gacopyz/gacopyz_priv.h: Likewise
2641     * gacopyz/log.c: Likewise
2642     * gacopyz/server.c: Likewise
2643     * gacopyz/io.c: Likewise
2644    
2645 gray 1281 2007-03-07 Sergey Poznyakoff <gray@gnu.org.ua>
2646    
2647     * src/Makefile.am: Allow to specify the m4 binary.
2648    
2649     * src/prog.c (env_push_string): Use pushs. This makes sure that
2650     the handler arguments are allocated in heap, which is necessary
2651     for normal functioning of the gc.
2652     * src/engine.c (mlfi_body): Pass bodyp as number. This is a
2653     temporary kludge.
2654     * testsuite/etc/ack.rc: The above change needs extra 2 words for
2655     the stack allocation.
2656    
2657     * NEWS: Update
2658    
2659    
2660 gray 1269 2007-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
2661    
2662 gray 1271 * src/symtab.c (function_install): Init statemask
2663     * src/gram.y: Fix builtin context checks. Implement function
2664     context checks.
2665     * src/mailfromd.h (struct function): New member `statemask'
2666     * src/Makefile.am: Exempt mtasim from installcheck
2667     * testsuite/mailfromd/functx.exp: New testcase
2668     * testsuite/mailfromd/DISTFILES: Add functx.exp
2669     * testsuite/etc/Makefile.am: Add sa*.rc
2670     * testsuite/etc/sa01.rc, testsuite/etc/sa02.rc,
2671     testsuite/etc/sa03.rc, testsuite/etc/sa04.rc: New files.
2672    
2673     * NEWS: Update
2674    
2675 gray 1269 Start implementing test MTA simulator.
2676    
2677     * src/mtasim.c: New file
2678     * src/gram.y: Minor fixes
2679     * src/main.c: New option --gacopyz-debug
2680     * src/Makefile.am: Build nullmta
2681     * gacopyz/io.c: New file
2682     * gacopyz/server.c: New file
2683     * gacopyz/gacopyz.h, gacopyz/gacopyz_priv.h, gacopyz/log.c,
2684     gacopyz/gacopyz.c, gacopyz/Makefile.am: Start implementing server
2685     code.
2686    
2687 gray 1263 2007-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
2688    
2689 gray 1264 * src/spf.c (spf_data): Add mech
2690     (parse_record): Always allocate expr_space
2691     * src/bi_spf.m4 (update_spf_vars): Bugfix
2692     * src/prog.c (instr_backref): Allow to reference optional groups
2693     * src/Makefile.am (noinst_HEADERS): Add spf.h
2694    
2695 gray 1263 * src/lex.l: New built-in macro __statedir__
2696     * NEWS: Update
2697     * src/mailfrom.h: Finally renamed to
2698     * src/mailfromd.h: this
2699    
2700     Affected files:
2701    
2702     * src/symtab.c, src/mu_dbm.c, src/engine.c, src/snarf.m4,
2703     src/dnscache.c, src/gram.y, src/dnsbase.c, src/dns.c, src/db.c,
2704     src/spf.c, src/spf.h, src/cache.c, src/optab.opc, src/prog.c,
2705     src/mf-status.mfi, src/main.c, src/Makefile.am, src/rate.c
2706    
2707 gray 1262 2007-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
2708    
2709     * src/gram.y (constdecl): Return NULL. Fixes coredump if const is
2710     used within a code block.
2711    
2712 gray 1257 2007-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
2713    
2714 gray 1259 * src/mailfrom.h (node_type_noop): New node type
2715     * src/gram.y: Allow declarations of initialized variables.
2716     (print_node) <node_type_return>: Fix coredump on void returns
2717     (optimize_node): Fix coredump on `if 0 <expr>'
2718 gray 1260 * NEWS: Update
2719 gray 1259
2720 gray 1257 * src/spf.c: Change handling of modifiers.
2721    
2722     * src/dnsbase.c, src/spf.c, src/dns.h, src/spf.h,
2723     bi_spf.m4: Change calling convention for the interface
2724     functions (spf_query_t, spf_answer_t); fix IP address comparisons;
2725     implement builtin spf variables
2726    
2727 gray 1253 2007-02-18 Sergey Poznyakoff <gray@gnu.org.ua>
2728    
2729     * src/spf.c: Implement all modifiers, improve debugging.
2730    
2731 gray 1250 2007-02-17 Sergey Poznyakoff <gray@gnu.org.ua>
2732    
2733 gray 1252 * src/dnsbase.c (_getmx, dns_get_mx_records): ttl can be NULL
2734     * src/spf.c: Implement all mechanisms
2735    
2736 gray 1250 * src/spf.c, src/spf.h: Templates for SPF support
2737     * src/bi_spf.m4: Interface definitions for SPF support
2738     * src/dns.c: Move generic DNS calls to dnsbase.c. Retain only
2739     interface calls.
2740     * src/dnsbase.c, src/dns.h: Generic DNS support
2741    
2742     * src/mailfrom.h: Move generic DNS declarations to dns.h
2743     * src/engine.c, src/bi_dns.m4, src/prog.c: Rename freemx to
2744     dns_freemx
2745     * src/main.c: Fix warning message wording
2746     * src/Makefile.am: Add new sources
2747     * bootstrap (MODLIST): Add memrchr
2748    
2749 gray 1248 2007-02-11 Sergey Poznyakoff <gray@gnu.org.ua>
2750    
2751     * gacopyz/trans.awk: Always quote /dev/stderr
2752    
2753 gray 1244 2007-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
2754    
2755     Move version control under SVN. Remove .cvsignore files.
2756     CVS copy kept around for references.
2757    
2758 gray 1226 2007-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
2759    
2760 gray 1243 * doc/mailfromd.texi: Update
2761     * src/gram.y: Change deprecation warning.
2762    
2763 gray 1240 * gacopyz/proc.c (gacopyz_cleanup_conn): Print debugging message;
2764     Do not display spurious 'signal 15' messages
2765     * src/engine.c (mailfromd_daemon): Improve logging
2766    
2767 gray 1237 * src/main.c: Hide deprecated command line options
2768    
2769 gray 1235 * src/bi_vars.m4 (builtin_post_setup): Use string_alloc to
2770     allocate literals
2771     * src/mailfrom.h (DEFAULT_FROM_ADDRESS): New define
2772     * src/main.c: Use DEFAULT_FROM_ADDRESS
2773    
2774 gray 1231 * src/gram.y: Store xlat tables in the data segment.
2775     * src/prog.c: Likewise
2776     * src/mailfrom.h (struct switch_stmt): Additional fields to help
2777     code generation
2778     * src/opcodes (XLAT, XLATS): instruction data has 2 words
2779     * src/optab.opc (scan_code): Remove special handling for xlat(s)
2780    
2781 gray 1226 Create a relocatable code. Fixup relocatable references before
2782     entering the working mode.
2783    
2784     * src/optab.opc: New file
2785     * src/optab.oph: New file
2786     * src/opcode.awk: New file
2787     * src/opcodes: New file
2788     * src/Makefile.am: Add optab.opc, optab.oph, opcode.awk
2789     * src/gram.y: Use code_op instead of code_instr
2790     * src/mailfrom.h (instr_*): Remove prototypes.
2791     (code_op, fixup_code): New prototypes.
2792     * src/main.c (main): Call fixup code
2793     * src/mf-status.mfi: Indicate c mode for emacs.
2794     * src/prog.c (prog): Remove static qualifier
2795     (code_op): New function
2796     (dump_*): Change number of arguments
2797     (optab,find_op): Remove
2798     (dump_code): Rewrite using scan_code
2799     (fixup_code): New function
2800     (print_code): Rewrite using dump_code
2801     * src/prog.h (struct optab): New data type
2802     (scan_code): New function
2803     (prog): extern decl
2804    
2805 gray 1218 2007-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
2806    
2807     * NEWS: Update
2808     * doc/mailfromd.texi: Update
2809     * etc/mailfromd.rc: Remove pragma option mailfrom and ehlo
2810     * src/gram.y,src/symtab.c: Use parse_warning where appropriate
2811     * src/lex.l, src/mailfrom.h (parse_warning)
2812     (parse_warning_locus): New functions
2813     * src/main.c: Print informative warning messages where
2814     (pragma or command line option) ehlo or mailfrom is used
2815    
2816 gray 1211 2007-01-21 Sergey Poznyakoff <gray@gnu.org.ua>
2817    
2818 gray 1213 * NEWS: Update
2819     * doc/mailfromd.texi: Update
2820     * src/bi_vars.m4 (builtin_post_setup): smtp_domain and
2821     postmaster_email removed.
2822     * src/gram.y: Bugfix
2823     * src/main.c (smtp_domain,postmaster_email): Remove
2824     --ehlo and --mailfrom deprecated
2825    
2826 gray 1211 * gacopyz/context.c (smfi_setpriv, smfi_getpriv): Rename to
2827     gacopyz_*
2828     * gacopyz/gacopyz.h (gacopyz_setpriv, gacopyz_getpriv): New
2829     functions.
2830     * src/bi_other.m4, src/bi_sa.m4: Minor fixes.
2831     * src/db.c (db_format_enumerate, db_format_install)
2832     (db_format_lookup): New functions
2833     * src/dns.c (_resolve_ipstr): Always copy ipstr to namebuf
2834     * src/engine.c (MLFIPRIV): Remove unused macro. Use gacopyz_
2835     calls instead of smfi_ ones, except for initialization functions.
2836     * src/gram.y: Provide for deferred variable initialization (to
2837     initialize variables from the command line).
2838     * src/lex.l (free_string_space, mf_strdup): New functions
2839     * src/mailfrom.h (struct old_header_node.name): const
2840     (SYM_DB_FORMAT): Remove macro
2841     (free_symbols,defer_initialize_variable,free_string_space)
2842     (db_format_enumerate): New functions.
2843     * src/main.c (options, parse_opt): New option -v
2844     (mailfromd_expire, mailfromd_compact)
2845     (mailfromd_show_defaults): Use db_format_enumerate instead of
2846     symbol_enumerate
2847     (main): Free symbol and string space after compiling the script.
2848     * src/prog.c (env_reference): Minor enhancement
2849     (env_set_variable): Fix call to mu_error
2850     * src/symtab.c (union symentry): Remove v.db
2851     (free_symbols): New function
2852     (db_format_install, db_format_lookup): Remove. Reimplement in db.c
2853     * testsuite/mailfromd/catch.exp: Update invocations of mailfromd
2854    
2855 gray 1194 2007-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
2856    
2857 gray 1197 * doc/mailfromd.texi: Update
2858     * src/prog.c (struct optab): Fix opname for instr_asgn
2859     (env_final_gc): Bugfix
2860    
2861 gray 1194 * doc/Makefile.am (check-exceptions): Fix rule
2862     * doc/mailfromd.texi: Update
2863     * src/gram.y (asgn:): Remove erroneous flag assignement
2864     (branch:): Warn about legacy constant usage only once
2865     (LOCUS_EQ): Moved to mailfrom.h
2866     (code_node): Restore svalidate - synch with 3.1 branch.
2867     Call MARK_LOCUS under node_type_result
2868     * src/lex.l: Warn about legacy constant usage only once
2869     Implement #error.
2870 gray 1197
2871 gray 1194 * etc/mailfromd.rc: Update
2872     * src/main.c (main): Remove call to builtin_post_setup.
2873     * src/prog.c (instr_variable): Print more trace info
2874     (instr_svalidate): Restore - synch with 3.1 branch.
2875    
2876 gray 1188 2007-01-18 Sergey Poznyakoff <gray@gnu.org.ua>
2877    
2878     * src/gram.y: Do not compile autogenerated functions at once.
2879     Expand unprefixed named constants only when a value is expected
2880     * src/lex.l: Likewise
2881     * src/mailfrom.h (struct stmtlist): New data type
2882    
2883 gray 1185 2007-01-17 Sergey Poznyakoff <gray@gnu.org.ua>
2884    
2885     * NEWS: Update
2886     * configure.ac: Raise patchlevel to 91
2887     * doc/mailfromd.texi: Update
2888     * src/Makefile.am (status.mfh, mf-status.c): New built sources
2889     * src/mfstat.awk: New file
2890     * src/status.mfi: New file
2891     * src/mf-status.mfi: New file
2892     * src/mailfrom.h, src/bi_dns.m4 (mf_resolve): Rename to mf_noresolve
2893     * src/gram.y (string: STRING): Fix incorrect argument to parse_error
2894     (parse_program): Remove call to post_parse
2895     (branch: WHEN): Issue deprecation warning if &const is used.
2896     (string_to_stat, mf_status_str): Defined in separate source
2897     * src/lex.l (lex_setup): Change default include path
2898     Issue deprecation warning if &const is used.
2899     Allow to use constants both in the program text and in literals
2900     * src/prog.c (string_off,string_count): Removed. Relocation table
2901     is used instead.
2902     * src/prog.h (post_parse): Remove
2903     * testsuite/etc/catch.rc: Include <status.mfh>, do not use &const.
2904     * testsuite/etc/catch01.rc: Likewise
2905     * testsuite/etc/hasmx.rc: Likewise
2906     * testsuite/etc/poll-1.rc: Likewise
2907     * testsuite/etc/poll.rc: Likewise
2908     * testsuite/lib/mailfromd.exp: Update include path
2909    
2910 gray 1172 2007-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
2911    
2912 gray 1173 * src/gram.y, src/lex.l, src/mailfrom.h, src/prog.c: Store
2913     locus.file in the dataseg.
2914    
2915 gray 1172 * src/gram.y: Implement const declarations
2916     * src/lex.l: Likewise
2917     * src/mailfrom.h: Likewise
2918     * src/symtab.c: Likewise
2919     * src/main.c: Minor change
2920     * src/prog.c: Minor change
2921    
2922 gray 1169 2007-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
2923    
2924     * gacopyz/gacopyz.h (GACOPYZ_VBUFSIZE): New define
2925     (gacopyz_format_vbuf): New decl
2926     * gacopyz/log.c (VBUFSIZE): Rename to GACOPYZ_VBUFSIZE
2927     (format_vbuf): Rename to gacopyz_format_vbuf; make extern
2928     * src/bi_mail.m4, src/bi_sa.m4, src/bi_system.m4, src/cache.c,
2929     src/dns.c, src/dnscache.c, src/engine.c, src/main.c,
2930     src/rate.c: Minor fixes
2931     * src/bi_vars.m4 (builtin_post_setup): Change initialization of
2932     ehlo_domain and mailfrom_address.
2933     * src/gram.y, src/mailfrom.h, src/prog.c, src/symtab.c: Use
2934     literals instead of string pointers.
2935     Each string reference in the resulting program should point
2936     within the current stack or data space (except for the values of
2937     Sendmail macros).
2938     * src/lex.l (string_alloc,string_finish): Return literal
2939    
2940 gray 1162 2007-01-06 Sergey Poznyakoff <gray@gnu.org.ua>
2941    
2942     * src/bi_vars.m4 (builtin_post_setup): Change initialization of
2943     ehlo_domain and mailfrom_address built-in variables.
2944     * src/gram.y: Put string values initially assigned to the
2945     variables into the data segment. Redo its planning.
2946     Process only variables marked as volatile (built-in) or as
2947     referenced.
2948     (builtin_variable_install): Initialize flags.
2949     (vardecl): Remove initialization of var->off
2950     (externdecl): Change declaration.
2951     (initialize_variable,ensure_initialized_variable)
2952     (dataseg_layout): New functions
2953     * src/prog.c: Redo data segment initialization and handling.
2954     (dataseg,datasize,dataseg_reloc,dataseg_reloc_count): New
2955     variables
2956     (struct eval_environ.var): Rename to dataseg
2957     * src/prog.h (B2STACK): New macro (moved from prog.c)
2958     (variable_declared_p,declare_variable): Removed
2959     (ensure_initialized_variable): New function
2960     (dataseg,datasize,dataseg_reloc,dataseg_reloc_count): New externs
2961    
2962 gray 1157 2007-01-04 Sergey Poznyakoff <gray@gnu.org.ua>
2963    
2964     * TODO: Update
2965     * src/engine.c (smtp_last_received): Remove superfluous
2966     conditional
2967     (method_strict,method_standard): Set last_poll_* variables to "",
2968     not NULL
2969     * src/gram.y: First build the entire tree, than compile it at
2970     once.
2971     Fix varaible shadowing.
2972     Reorganize lexical tie-ins.
2973     * src/lex.l: New keyword `const'.
2974     (parse_error,parse_error_locus): Increase buffer size to 512.
2975     * src/mailfrom.h (enum lexical_context): New data type.
2976     (struct catch_node.context): New field
2977     (struct progdecl, struct funcdecl): New data types.
2978     (enum node_type): Add new types: node_type_funcdecl and
2979     node_type_progdecl.
2980     (struct node.v): New members progdecl and funcdecl
2981     (VAR_REFERENCED): New macros
2982     (struct variable): New fields next and owner
2983     (variable_replace): New function
2984     * src/symtab.c (init_variable): New function
2985     (variable_install): Use init_variable
2986     (variable_replace): New function
2987     * testsuite/etc/shadow.rc: New file
2988     * testsuite/etc/Makefile.am (RCFILES): Add shadow.rc
2989     * testsuite/mailfromd/shadow.exp: New file
2990     * testsuite/mailfromd/DISTFILES: Add shadow.exp
2991    
2992 gray 1144 2006-12-27 Sergey Poznyakoff <gray@gnu.org.ua>
2993    
2994     * doc/mailfromd.texi: Fix typo
2995    
2996 gray 1142 2006-12-25 Sergey Poznyakoff <gray@gnu.org.ua>
2997    
2998     * configure.ac: Do not quote DEFAULT_LOG_FACILITY
2999     * NEWS: update
3000     * src/bi_string.m4 (unfold) new function
3001     * src/engine.c (check_on_host): Issue RSET if the previous MAIL
3002     FROM returned 4xx
3003     (mlfi_helo): Push malloced copy of helohost
3004     * src/main.c (option_deprecated): mark as warning.
3005    
3006 gray 1137 2006-12-21 Sergey Poznyakoff <gray@gnu.org.ua>
3007    
3008     * NEWS: Update
3009     * src/bi_string.m4 (message_header_decode, message_header_encode):
3010     New functions.
3011    
3012 gray 1128 2006-12-15 Sergey Poznyakoff <gray@gnu.org.ua>
3013    
3014 gray 1131 * NEWS: Update
3015     * TODO: Update
3016     * doc/mailfromd.texi: Update the description of resolve and the
3017     code of match_dnsbl and match_rhsbl
3018     * src/bi_dns.m4 (resolve): Take an optional second argument
3019     * src/dns.c (is_ipaddr): Stricter check
3020     (struct loop_data.atype): New member
3021     (cnameloop): Return the type of obtained answer in atype
3022     (_resolve_ipstr): Additional argument: domain to look up into. If
3023     not NULL, the ipstr is not reversed
3024     (resolve_ipstr_domain): New function
3025     (resolve_ipstr): Rewrite using resolve_ipstr_domain
3026     (_resolve_hostname): Convert IP to string if gotten T_A. All
3027     callers updated.
3028     * src/lex.l: Allow `==' as well as `='
3029     * src/mailfrom.h (resolve_ipstr_domain): New function
3030    
3031 gray 1128 * src/main.c (switch_to_privs): Refuse to run as root
3032     * doc/mailfromd.texi: Fix typo.
3033 gray 1130 * bi_io.m4, db.c, dnscache.c, engine.c, gram.y, lex.l, main.c,
3034     prog.c: Capitalize diagnostic messages
3035    
3036 gray 1118 2006-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
3037    
3038 gray 1124 * NEWS: Update
3039     * configure.ac: New configuration variable DEFAULT_LOG_FACILITY
3040     * doc/mailfromd.texi: Update
3041     * src/main.c (main): Set log_facility.
3042    
3043 gray 1118 * src/lex.l: Allow any amount of whitespace between the function
3044     name and the opening parenthesis.
3045 gray 1122 * src/lex.l: Fix the previous patch
3046     * src/gram.y: Revert accidental commit
3047 gray 1118
3048 gray 1116 2006-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
3049    
3050     Synchronization with 3.1 branch:
3051    
3052     * NEWS, configure.ac: Version 3.1.90
3053     * doc/mailfromd.texi: Fix typo
3054     * src/bi_sa.m4 (spamd_send_stream): Assume captured stream already
3055     has \r in front of each \n
3056     (clamav): always shutdown data stream as a fd-style stream.
3057     * src/dns.c (_resolve_ipstr): First argument is const
3058     (resolve_ipstr,resolve_hostname): First argument is const
3059     * src/dnscache.c (parse_value,dns_make_key)
3060     (dns_cache_get,dns_cache_put): keystr is const
3061     * src/gram.y (optimize_node): Fix typo that caused correct
3062     `matches' conditions to be rejected (e.g. strip_domain_part.mf)
3063     * src/mailfrom.h (resolve_ipstr,resolve_hostname): First argument
3064     is const
3065     (dns_cache_get,dns_cache_put): keystr is const
3066     * src/snarf.m4 (MF_BEGIN_TEMP_SPACE): Do not terminate with a
3067     semicolon, since the statement is supposed to be used in argument
3068     declarations.
3069    
3070     2006-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
3071    
3072     * NEWS: Update
3073     * doc/mailfromd.texi: Fix typo
3074     * src/bi_sa.m4 (spamd_send_stream): Assume captured stream already
3075     has \r in front of each \n
3076     (clamav): always shutdown data stream as a fd-style stream.
3077     * src/dns.c (_resolve_ipstr): First argument is const
3078     (resolve_ipstr,resolve_hostname): First argument is const
3079     * src/dnscache.c (parse_value,dns_make_key)
3080     (dns_cache_get,dns_cache_put): keystr is const
3081     * src/gram.y (optimize_node): Fix typo that caused correct
3082     `matches' conditions to be rejected (e.g. strip_domain_part.mf)
3083     * src/mailfrom.h (resolve_ipstr,resolve_hostname): First argument
3084     is const
3085     (dns_cache_get,dns_cache_put): keystr is const
3086     * src/snarf.m4 (MF_BEGIN_TEMP_SPACE): Do not terminate with a
3087     semicolon, since the statement is supposed to be used in argument
3088     declarations.
3089    
3090 gray 1105 2006-12-10 Sergey Poznyakoff <gray@gnu.org.ua>
3091    
3092     * src/Makefile.am (install-data-local): Rename leftover
3093     MAILFROMSTATEDIR
3094     * src/rate.c (get_rate): Bug fix: attempt to free auto storage
3095    
3096 gray 1100 2006-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
3097    
3098     * NEWS, configure.ac: Version 3.1
3099    
3100 gray 1093 2006-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
3101    
3102 gray 1105 * NEWS, configure.ac: Update patchlevel
3103     * doc/mailfromd.texi: Finished docs for 3.1
3104    
3105 gray 1093 * configure.ac (MAILFROMSTATEDIR): Rename to DEFAULT_STATE_DIR
3106     * src/Makefile.am: Likewise
3107     * src/mailfrom.h: Likewise
3108     * src/main.c: Likewise
3109     * src/bi_dns.m4 (resolve): Return "0" if the argument is not
3110     resolved.
3111     * src/gram.y: Mark comparison operators as nonassoc
3112    
3113     * doc/Makefile.am (extract): Handle include dependencies
3114     * doc/extract.awk: Handle @multitable blocks. Print a diagnostic
3115     message if some other function is required
3116     * doc/mailfromd.texi: Almost finished
3117 gray 1095 * doc/fdl.texi: Fix overfull hblock
3118 gray 1093
3119 gray 1081 2006-12-05 Sergey Poznyakoff <gray@gnu.org.ua>
3120    
3121     * NEWS: Update
3122 gray 1084 * doc/Makefile.am: Minor change
3123     * doc/mailfromd.texi: Update
3124     * src/gram.y (print_locus): Bugfix
3125     * testsuite/etc/config.in: Remove extra space
3126    
3127     * NEWS: Update
3128 gray 1081 * doc/untabify.el: New file
3129     * doc/Makefile.am (EXTRA_DIST): Add untabify.el
3130     (check-format,untabify,final): New targets
3131     * doc/mailfromd.texi: Consistently use `filter script' instead of
3132     `configuration file'. Add some missing information.
3133     * etc/rc.in: Do not use obsolete -c option to mailfromd
3134     * testsuite/lib/mailfromd.exp, testsuite/mailfromd/ack.exp,
3135     testsuite/mailfromd/arg.exp, testsuite/mailfromd/catch.exp,
3136     testsuite/mailfromd/cidr.exp, testsuite/mailfromd/cond.exp,
3137     testsuite/mailfromd/dns.exp, testsuite/mailfromd/hasmx.exp,
3138     testsuite/mailfromd/macros.exp, testsuite/mailfromd/poll.exp,
3139     testsuite/mailfromd/prec.exp, testsuite/mailfromd/relayed.exp,
3140     testsuite/mailfromd/strings.exp, testsuite/mailfromd/switch.exp,
3141     testsuite/mailfromd/var.exp: Likewise
3142    
3143     * src/Makefile.am (builtin.h): Depend on M4_FILES
3144    
3145     * src/gram.y, src/mailfrom.h, src/main.c: Remove -c option. Remove
3146     the inconsistent usage of `config_' prefix.
3147     * src/lex.l: Allow hex numbers to be prefixed with 0X as well.
3148    
3149 gray 1045 2006-12-04 Sergey Poznyakoff <gray@gnu.org.ua>
3150    
3151     * NEWS: Update
3152 gray 1072 * src/bi_mail.m4: New file
3153     * src/Makefile.am: Add bi_mail.m4
3154     * src/main.c: Use "mailer" capability
3155    
3156     * NEWS: Update
3157 gray 1068 * doc/mailfromd.texi: Update
3158     * src/dns.c (get_mx_records): Use resolve_ipstr to resolve IP
3159     addresses.
3160     * src/gram.y: Implement bitwise operators: &, |, ^, ~
3161     Implicit declarations within functions create automatic
3162     variables.
3163     * src/lex.l: Accept C-like notations for hex and octal numbers.
3164     * src/mailfrom.h: Implement bitwise operations
3165     * src/prog.c: Likewise
3166    
3167     * NEWS: Update
3168 gray 1060 * configure.ac: There's no use to pass MAILFROMSTATEDIR and
3169     DEFAULT_SOCKET in config.h, revert to the prior scheme
3170     * src/Makefile.am (AM_CPPFLAGS): Likewise
3171     * gacopyz/proc.c (print_status): Log normal child exits at
3172     SMI_LOG_INFO priority
3173     * src/dnscache.c (dns_cache_get): Do not log error message if the
3174     file does not exist.
3175     Make sure rc is meaningful
3176     (dns_cache_put): Free temporary storage
3177     * src/lex.l: Implement search path for include files
3178     * src/mailfrom.h (add_include_dir): New proto.
3179     * src/main.c: New option -I (--include)
3180     * testsuite/etc/greylist.in: Remove
3181     * testsuite/etc/greylist.rc: New file
3182     * testsuite/etc/Makefile.am (RCFILES): Add config.in. Replace
3183     greylist.in with greylist.rc
3184     (noinst_DATA, CLEANFILES): Add config.rc, remove greylist.rc
3185     * testsuite/etc/.cvsignore: Add config.rc, remove greylist.rc
3186 gray 1062 * testsuite/etc/config.in: New file
3187 gray 1060 * testsuite/etc/dns.rc: Include config.rc
3188     * testsuite/etc/hasmx.rc: Likewise
3189     * testsuite/etc/greylist.pat: Remove :RCDIR instruction
3190     * testsuite/lib/mailfromd.exp (start_daemon,mailfromd_exec): Add
3191     -I option
3192     * testsuite/mailfromd/greylist.exp: Remove conditional
3193    
3194     * NEWS: Update
3195 gray 1045 * configure.ac: Refuse to build without DBM.
3196     Pass all default values via config.h
3197     Print configuration summary at the end of the run.
3198     * doc/mailfromd.texi: Update
3199     * src/Makefile.am (AM_CPPFLAGS): Remove extra defines. These are
3200     now passed via config.h
3201     * src/bi_db.m4, src/cache.c, src/db.c, src/dnscache.c,
3202     src/mailfrom.h, src/main.c, src/rate.c [!USE_DBM]: Remove. DBM is
3203     now required.
3204    
3205 gray 1030 2006-12-03 Sergey Poznyakoff <gray@gnu.org.ua>
3206    
3207 gray 1041 * Makefile.am (alpha,alphacheck): New rules
3208     * NEWS: Update
3209     * configure.ac: Define DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL
3210     * doc/mailfromd.texi: Update
3211     * src/Makefile.am (AM_CPPFLAGS): Define
3212     DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL
3213     * src/dns.c (getmx,resolve_ipstr,resolve_hostname): Enable
3214     negative caching
3215     * src/dnscache.c (dns_cache_put): Fix calculation of the
3216     expiration date for negative records.
3217     (dns_cache_format_struct): Use
3218     DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL
3219     * src/gram.y (pragma_database): Handle special cases for `database
3220     dns'.
3221     * src/main.c (db_format_enumerator): Likewise
3222     * testsuite/mailfromd/DISTFILES: Add dns.exp
3223    
3224 gray 1032 * doc/mailfromd.texi: Document the dns database
3225    
3226 gray 1030 * configure.ac: Check for unsigned 32-bit integer type
3227     * gacopyz/Makefile.am (noinst_PROGRAMS): Remove
3228     * gacopyz/gacopyz_priv.h: (MI_TIMEOUT): Rename to GACOPYZ_TIMEOUT
3229     (mi_uint32_t): Rename to gacopyz_uint32_t
3230     Set gacopyz_uint32_t based on the result of a configure check
3231     (MILTER_OPTLEN): Rename to GACOPYZ_OPTLEN
3232     * gacopyz/gacopyz.c: Likewise
3233     * src/dnscache.c: New file
3234     * src/Makefile.am: Add dnscache.c
3235     * src/bi_dns.m4: Rewrite using new dns functions
3236     * src/dns.c: Rewrite using global cache
3237     (resolve_hostname): New function
3238     (resolve_ipstr): Change signature
3239     * src/mailfrom.h (resolve_ipstr): Change prototype
3240     (resolve_hostname): New function
3241     (DEFAULT_DNS_DATABASE): New define
3242     (dns_cache_get,dns_cache_put): New functions
3243     * src/main.c (host_in_relayed_domain_p): Rewrite using new
3244     resolve_ipstr
3245     (db_format_setup): Initialize dns_cache_format
3246     * src/prog.c (struct eval_environ.dict): Remove. All uses updated.
3247     * testsuite/etc/dns.rc: New file
3248     * testsuite/etc/Makefile.am (RCFILES): Add dns.rc
3249     * testsuite/etc/dns.exp: New test case
3250     * testsuite/mailfromd/DISTFILES: Add dns.exp
3251    
3252 gray 1016 2006-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
3253    
3254     * src/prog.c (env_final_gc): Free temporary storagee before
3255     returning.
3256    
3257 gray 1011 2006-11-30 Sergey Poznyakoff <gray@gnu.org.ua>
3258    
3259     * src/engine.c (mlfi_envfrom): print entire argument array in
3260     debug level 70
3261 gray 1014 (mlfi_envrcpt): Likewise.
3262    
3263 gray 1011 * src/mailfrom.h (debug macros): Rewritten
3264    
3265 gray 1014 * configure.ac: Raise patchlevel to 92
3266     * NEWS: Likewise.
3267    
3268 gray 996 2006-11-29 Sergey Poznyakoff <gray@gnu.org.ua>
3269    
3270 gray 1008 * bootstrap: Minor change
3271     * doc/mailfromd.texi: Update
3272     * src/gram.y (print_node): Handle nonprintable characters in strings.
3273    
3274 gray 996 * NEWS: Update
3275     * src/engine.c (method_standard): Fix the call to
3276     set_last_poll_result.
3277     * src/gram.y: Implement cross-reference listing.
3278     * src/mailfrom.h (struct variable): New member xref.
3279     (env_final_gc): New proto.
3280     * src/main.c: New option --xref (--dump-xref)
3281     * src/prog.c: Implement simple GC for compacting the heap space.
3282     * src/prog.h (post_parse): New proto
3283    
3284 gray 984 2006-11-28 Sergey Poznyakoff <gray@gnu.org.ua>
3285    
3286 gray 995 * src/bi_poll.m4: Minor indentation fix
3287     * src/prog.c (instr_retcatch): Call env_leave_frame with nargs=1
3288     (env_catch pushes one argument)
3289 gray 996 (env_init): Remove initialization of toh
3290 gray 995 (create_environment): Initialize toh here (see the comment).
3291    
3292 gray 992 * src/gram.y (copy_node): New function
3293     (print_node): Print "STRING" for node_type_string
3294     (optimize_arith): Immediate calculations if one of the arguments
3295     is 0 or 1. Side effect: catches all types of division by zero
3296     errors.
3297     (optimize_node): Optimize concatenations with an empty string
3298     (codegen): Do not attempt to generate code if the optimization
3299     resulted in errors.
3300     * src/lex.l (parse_error_locus): Bugfix
3301     * src/prog.c (optab): Add missing entry (NEG)
3302    
3303 gray 988 * src/prog.c (eval_environment): Prevent coredumps on invalid
3304     PC values.
3305    
3306 gray 985 * src/bi_other.m4 (disable_program_trace): Rename to
3307     cancel_program_trace.
3308     * NEWS: Update
3309    
3310 gray 984 * src/bi_system.m4 (bi_strftime): Call MF_RETURN_TEMP_SPACE with
3311     an argument.
3312     * src/snarf.m4 (MF_RETURN_TEMP_SPACE): Bugfix - call
3313     heap_fix_tempspace.
3314     Take an optional argument specifying the size of the data stored
3315     in the temporary memory.
3316    
3317 gray 980 2006-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
3318    
3319     * src/builtin.def: New file
3320     * src/init.m4: New file
3321     * src/Makefile.am (noinst_HEADERS,EXTRA_DIST,BUILT_SOURCES): Add
3322     builtin.h, builtin.def, init.m4
3323     (.def.h): New rule
3324     * src/bi_db.m4, src/bi_dns.m4, src/bi_io.m4, src/bi_other.m4,
3325     src/bi_poll.m4, src/bi_sa.m4, src/bi_string.m4, src/bi_system.m4,
3326     src/bi_vars.m4: Use MF_INIT without arguments
3327     * src/mailfrom.h (__DBG): Change definition
3328     (enable_module_trace,disable_module_trace,enable_prog_trace)
3329     (disable_prog_trace,debug_level_p,enable_debug)
3330     (enable_debug_list,disable_debug_list): New functions
3331     (prog_trace_option): Remove declaration
3332     * src/main.c (disable_prog_trace,debug_level_p,enable_debug)
3333     (enable_debug_list,disable_debug_list): New functions
3334     The option --debug can take a comma-separated list of debug
3335     specifications.
3336     The option --trace-program takes as an optional argument a
3337     comma-separated list of modules to trace
3338     * src/prog.c, src/prog.h: Change to new tracing scheme
3339     * src/snarf.m4: Assume C comments
3340     (MF_MODULE_NAME,MF_MODULE_MASK): New defines
3341     (mf_prog_trace): New define
3342     (MF_DEFUN): Change to new tracing scheme
3343     (MF_INIT): Do not take a mandatory argument. Deduce the module
3344     name from the file name.
3345    
3346 gray 970 2006-11-25 Sergey Poznyakoff <gray@gnu.org.ua>
3347    
3348 gray 972 * src/prog.c (instr_symbol): Return the value using pushs, not
3349     push.
3350    
3351 gray 970 * NEWS: Update
3352     * doc/mailfromd.texi: Update
3353     * src/bi_db.m4 (dbput): Throw exception after closing the db
3354     (dbdel): New function
3355     * src/bi_system.m4 (system): Return exit code of the executed
3356     command.
3357     * src/gram.y: Allow constant expressions in top-level set
3358     statements.
3359    
3360 gray 959 2006-11-24 Sergey Poznyakoff <gray@gnu.org.ua>
3361    
3362 gray 965 * src/bi_system.m4 (strftime): New function
3363     * src/lex.l: Fix handling of escape sequences at the beginning of
3364     a string and before the beginning of an interpreted sequence
3365     within the string.
3366     * src/prog.c (heap_max_tempspace, heap_fix_tempspace): New
3367     functions.
3368     * src/prog.h: Likewise
3369     * src/snarf.m4 (MF_BEGIN_TEMP_SPACE,MF_END_TEMP_SPACE)
3370     (MF_RETURN_TEMP_SPACE): New macros
3371    
3372 gray 960 * src/gram.y: Various fixes
3373    
3374 gray 959 * src/bi_db.m4 (dbmap_lookup): Defval can be NULL
3375     Make sure returned string is null-terminated
3376     (dbput): New built-in function
3377     * src/bi_system.m4 (time): New built-in
3378     * src/gram.y (codegen): Two more arguments
3379     (forget_autos): Take number of parameters as an argument.
3380     Clear auto_list
3381     (BUILTIN_P): Renamed to BUILTIN_PROC
3382     (FUNCTION_P): Renamed to FUNCTION_PROC
3383     (BUILTIN_P,FUNCTION_P): New tokens. Lowest precedence
3384     Fix code generation for function arguments and the precedence of
3385     function or built-in calls without parens
3386     * src/lex.l (BUILTIN_P,FUNCTION_P): New tokens
3387     (IDENT}/"("): New rule
3388     * src/snarf.m4: Fix handling of zero argument count
3389     * src/symtab.c (remove_symbol): Fix assertion
3390     * testsuite/etc/farg.rc: New file
3391     * testsuite/etc/prec.rc: New file
3392     * testsuite/etc/Makefile.am (RCFILES): Add farg.rc and prec.rc
3393     * testsuite/mailfromd/DISTFILES: Add prec.exp
3394     * testsuite/mailfromd/arg.exp: Add new test (farg.rc)
3395    
3396 gray 951 2006-11-23 Sergey Poznyakoff <gray@gnu.org.ua>
3397    
3398     * src/bi_io.m4: New file
3399     * src/bi_system.m4: New file
3400     * src/Makefile.am (RCFILES): Add bi_io.m4 and bi_system.m4
3401     * src/gram.y: Modify error handling and proccall production.
3402     Get rid of svalidate.
3403     * src/lex.l: New tokens FUNCTION_P and BUILTIN_P
3404     (parse_error,parse_error_locus): Increment error_count unless fmt
3405     begins with `warning:'.
3406     * src/mailfrom.h (mf_ioerr): New exception
3407     * src/prog.c: Keep builtin-specific private data in struct
3408     eval_environ.
3409     (builtin_priv_register,env_get_builtin_priv): New functions
3410     (builtin_setup): Call system_init_builtin and io_init_builtin
3411     * src/prog.h (env_get_builtin_priv)
3412     (builtin_priv_register, error_count): New declaration
3413     * src/snarf.m4 (MF_DECLARE_DATA,MF_GET_DATA): New macros
3414     * src/symtab.c (va_builtin_install_ex): Bugfix
3415     (variable_install, function_install): Init all members
3416    
3417 gray 939 2006-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
3418    
3419 gray 942 * doc/mailfromd.texi: Document pragma stacksize
3420     * doc/values.texi: Update
3421     * src/gram.y: svalidate is not needed any more (I hope)
3422     * src/prog.c: Likewise
3423    
3424 gray 939 * src/gram.y: Fix the precedence of function calls and boolean
3425     negation.
3426     * doc/mailfromd.texi
3427    
3428 gray 937 2006-11-20 Sergey Poznyakoff <gray@gnu.org.ua>
3429    
3430     * doc/mailfromd.texi: Document string and db functions
3431     * src/bi_db.m4 (dbmap_lookup): Avoid needless memory allocation
3432     * src/bi_string.m4 (toupper, tolower): Fix return type
3433     declarations
3434     (substr,rindex): Fix bugs
3435     * src/gram.y: Rewrite expression rules to properly handle
3436     concatenations and to reduce the number of conflicts.
3437     Compute automatic and parameter offsets locally
3438     Rewrite optimizer.
3439     * src/mailfrom.h (node_type_auto): Remove, node_type_variable does
3440     the job
3441     (VAR_VOLATILE,VAR_EXTERN): New defines (for future use)
3442     (struct variable): New member flags.
3443     * src/prog.c (dump_asgn): Bugfix
3444     * src/snarf.m4 (MF_VAR): Set VAR_VOLATILE by default
3445     * testsuite/etc/Makefile.am (RCFILES): Add strings.rc
3446     * testsuite/etc/strings.rc: New file
3447 gray 938 * testsuite/mailfromd/strings.exp: New file
3448     * testsuite/mailfromd/DISTFILES: Add strings.exp
3449 gray 937
3450 gray 925 2006-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
3451    
3452 gray 927 * bootstrap: New file
3453     * NEWS: Update
3454 gray 925 * doc/values.texi (INITIAL-RESPONSE-TIMEOUT): Update.
3455     * doc/mailfromd.texi: Update
3456     * src/Makefile.am: Create MAILFROMSTATEDIR with the right
3457     privileges.
3458     * src/bi_db.m4 (dbmap): Take an optional third argument.
3459     (dbget): New built-in
3460     * src/bi_string.m4 (substr): New function
3461     * src/db.c: Use xmalloc instead of emalloc
3462     * src/lex.l: Likewise
3463     * src/main.c: Likewise
3464     (xalloc_die): New function
3465     * src/gram.y: Hanlde optional arguments to built-ins
3466     Use xmalloc instead of emalloc
3467     * src/mailfrom.h: Include xalloc.h
3468     (struct builtin): New member optcount
3469     (va_builtin_install_ex): take 8 mandatory arguments
3470     (emalloc): Remove
3471     (heap_tempspace): New function
3472     * src/prog.c (heap_tempspace): New function
3473     Use xmalloc instead of emalloc
3474     * src/prog.h (heap_tempspace): New function
3475     * src/snarf.m4: Handle OPTIONAL keyword
3476     (MF_ALLOC_HEAP_TEMP): New macro
3477     * src/symtab.c: Use xmalloc instead of emalloc
3478     (emalloc): Remove
3479     (find_and_remove): Fix coredump
3480    
3481 gray 901 2006-11-14 Sergey Poznyakoff <gray@gnu.org.ua>
3482    
3483 gray 912 * src/gram.y: Bug fixes
3484    
3485 gray 901 * NEWS: Update
3486 gray 910 * configure.ac: Raise version to 3.0.91
3487     * doc/mailfromd.texi: Document -O option
3488     * src/gram.y: Implement code optimization
3489     * src/lex.l: Export string functions
3490     * src/mailfrom.h: Export string functions from lex.l
3491     * src/main.c: New option -O (--optimize)
3492    
3493     * NEWS: Update
3494 gray 901 * configure.ac: Define split version
3495     * doc/mailfromd.texi: Document built-in macros
3496     * src/lex.l: New built-in macros
3497     * src/mailfrom.h (function_name): New function
3498     * testsuite/etc/macros.rc: New file
3499     * testsuite/etc/Makefile.am (RCFILES): Add macros.rc
3500     * testsuite/etc/ack.rc: Use full type names
3501     * testsuite/mailfromd/macros.exp: New test case
3502     * testsuite/mailfromd/DISTFILES: Add macros.exp
3503    
3504 gray 881 2006-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
3505    
3506     * NEWS: Update
3507 gray 888 * doc/mailfromd.texi: Document `echo' statement
3508     * src/gram.y: Remove legacy handling for `rate'
3509     (function_name): New function
3510     * src/lex.l: Remove legacy handling for `rate'
3511     New keywords __file__, __line__ and __function__
3512     * src/main.c (decode_debug): Remove legacy handling of `cdyl'
3513     flags.
3514 gray 890 * etc/sendmail-8.13.7.diff: Removed
3515 gray 888
3516     * NEWS: Update
3517 gray 881 * README-alpha: Update
3518     * doc/mailfromd.texi: Update
3519     * src/bi_vars.m4 (numrcpt): Removed
3520    
3521 gray 874 2006-11-12 Sergey Poznyakoff <gray@gnu.org.ua>
3522    
3523     * NEWS: Update
3524     * doc/mailfromd.texi: Rewrite function examples using the new
3525     style
3526     * src/gram.y: Allow for auto variables in handlers
3527     (print_node): Print variable offset with SET
3528     (forget_autos): Use find_and_remove to remove the variable from
3529     the symtab
3530     * src/symtab.c: Make sure symbol table entries do not change their
3531     address during rehashing
3532    
3533 gray 870 2006-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
3534    
3535 gray 873 * src/gram.y, src/mailfrom.h, src/prog.c: Implement automatic
3536     variables
3537     * src/lex.l: Make sure N in $N is positive
3538    
3539 gray 870 * src/gram.y: Implement named function parameters and
3540     the framework for automatic variables.
3541     * src/mailfrom.h (storage_class_t): New type
3542     (struct variable): New members: storage_class, locus, shadowed
3543     (variable_remove): New function
3544     * src/symtab.c (remove_symbol): Split in two functions.
3545     (variable_remove): New function
3546    
3547 gray 850 2006-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
3548    
3549 gray 873 * configure.ac: Remove the legacy section
3550 gray 865 * gacopyz/Makefile.am: Inconditionally build the targets
3551     * src/bi_vars.m4: New file
3552     * src/ml.c: Remove
3553     * src/Makefile.am (M4_FILES): Add bi_vars.m4
3554     (mailfromd_SOURCES): Remove ml.c
3555     * src/bi_db.m4: Use MF_RETURN, MF_RETURN_STRING, MF_VAR_REF
3556     * src/bi_dns.m4: Likewise
3557     * src/bi_other.m4: Likewise
3558     * src/bi_poll.m4: Likewise
3559     * src/bi_sa.m4: Likewise
3560     * src/bi_sa.m4: Likewise
3561     * src/engine.c (ctx_getsym): use gacopyz_setreply
3562     * src/gram.y: Replace calls to declare_string_variable and
3563     declare_numeric_variable with declare_variable
3564     (code_node): Fix coredump if node==NULL
3565     * src/mailfrom.h (declare_numeric_variable)
3566     (declare_string_variable): Remove
3567     * src/prog.c (env_var_inc): New function
3568     (struct declvar): Replace var with name and off. It is not safe
3569     to keep the address of the variable as it can change during
3570     rehashing of the symtable
3571     (find_declared_variable): Replace with variable_declared_p
3572     (rcpt_count_loc,ehlo_domain_var,mailfrom_address_var): Remove
3573     (get_rcpt_count,clear_rcpt_count,incr_rcpt_count)
3574     (bi_numrcpt,builtin_post_setup): Move to bi_vars.m4
3575     * src/prog.h (env_var_inc, variable_declared_p)
3576     (declare_variable): New decls
3577     * src/snarf.m4 (MF_RETURN, MF_RETURN_STRING, MF_ALLOC_HEAP, MF_VAR_INC)
3578     (MF_COPY_STRING,MF_VAR_REF): New defines
3579     (MF_VAR): Declare offset as static
3580     * src/symtab.c (remove_symbol): New function
3581    
3582     * testsuite/etc/accept.pat: Make sure the test works offline
3583     * testsuite/etc/ml.pat: Likewise
3584     * testsuite/etc/numrcpt.pat: Likewise
3585     * testsuite/etc/reject.pat: Likewise
3586     * testsuite/etc/tempfail.pat: Likewise
3587     * testsuite/mailfromd/poll.exp: Likewise
3588    
3589 gray 850 * src/snarf.m4 (MF_VAR): New macro
3590     (__mf_argtype,mf_typelist): Change expansion according to mailfrom.h
3591 gray 851 * src/bi_db.m4, src/bi_poll.m4, src/bi_sa.m4: Use the new way of
3592 gray 850 declaring MF variables.
3593    
3594     * src/gram.y: Control types during tree generation
3595     Start implementing strict type checking and the new way of
3596     declaring function parameters and return types. Implement
3597     functions without return value (procedures).
3598     * src/lex.l: New rules for returning TYPE
3599     * src/prog.c: Update to match recent changes
3600     * src/symtab.c: Update to match recent changes
3601     * testsuite/etc/var.rc: Update to match recent changes (string is
3602     a keyword)
3603    
3604     Incorporate changes from 3.0 branch:
3605    
3606     * NEWS: Update
3607    
3608     * src/cache.c: Update invocations of mu_dbm_open, remove calls to
3609     mu_dbm_lock/mu_dbm_unlock.
3610     * src/db.c: Likewise.
3611     * src/mu_dbm.c: Likewise.
3612     * src/mu_dbm.h: Likewise.
3613    
3614     * doc/Makefile.am (mailfromd_TEXINFOS): Add values.texi.
3615     * doc/values.texi: New file
3616     * doc/mailfromd.texi: Include values.texi. Document SMTP
3617     timeouts.
3618     * src/engine.c (smtp_stream_wait,smtp_wait,smtp_recvline)
3619     (check_on_host,listens_on): Implement new timeout control scheme.
3620     (smtp_recv_tm): New function
3621     * src/mailfrom.h (io_attempts,connect_attempts): Remove
3622     (io_timeout,connect_timeout): Change the type to time_t
3623     (response_timeout): New declaration
3624    
3625     (instr_rettype): Rename to data_type_t
3626     (rettype_string,rettype_number,rettype_unspecified): Rename to
3627     dtype_.*
3628     (struct un_node.result_type): New field
3629     (struct cast_node, positional_arg): New data types
3630     (enum node_type, node_type_cast): New value
3631    
3632    
3633     * src/main.c (io_attempts,connect_attempts): Remove
3634     (io_timeout,connect_timeout): Change the type to time_t
3635     (response_timeout): New variable
3636     (option_cache): Deprecate options connect-retry and
3637     io-retry
3638     (process_options): Additionally check if p->set is not NULL.
3639    
3640    
3641 gray 820 2006-11-08 Sergey Poznyakoff <gray@gnu.org.ua>
3642 gray 807
3643 gray 820 * configure.ac, NEWS: Fix version: 3.0.90 (3.0.1 is moved to
3644     bug-fixing branch)
3645    
3646 gray 816 * configure.ac: Raise version number to 3.0.1
3647     * NEWS: Update
3648     * etc/rc.in (mailfromd_stop): Fix arithmetical expression syntax
3649     * gacopyz/gacopyz.c (parse_state_arg): Bugfix: do not reuse
3650     parsing buffer!
3651     * src/gram.y (function_call): New function
3652     Allow functions returning unspecified (procedures) to be used as
3653     statements
3654     * src/lex.l: New token type PROCEDURE
3655     * src/mailfrom.h (struct function): Remove misleading comment
3656    
3657     * src/snarf.m4 (MF_CATCH, MF_CATCH_VAL, MF_ASSERT): New macros
3658     * src/bi_db.m4: Use catch/assert macros.
3659     * src/bi_dns.m4: Likewise.
3660     * src/bi_other.m4: Likewise.
3661     * src/bi_poll.m4: Likewise.
3662     * src/bi_sa.m4: Likewise.
3663     * src/bi_string.m4: Likewise.
3664 gray 820
3665     2006-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
3666    
3667 gray 809 * src/gram.y: Update FIXME-xref.
3668 gray 807 * src/mu_dbm.c (mu_dbm_open) [WITH_GDBM]: Use GDBM_NOLOCK, as we
3669     do the locking ourselves
3670    
3671 gray 797 2006-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
3672    
3673 gray 805 * src/engine.c: Fix multiple from address handling
3674     * src/gram.y: Put back the changes, only make sure the leading
3675     white space is properly stripped off the argument.c
3676    
3677     * src/gram.y (pragma_option): Undo the change from 2006-10-30.
3678     * src/main.c (opton_ehlo): Adjust for changes in option mailfrom
3679     syntax.
3680    
3681     2006-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
3682    
3683 gray 798 Release 3.0
3684    
3685 gray 797 * doc/mailfromd.texi: Update
3686 gray 798 * etc/rc.in: Update
3687 gray 797
3688 gray 793 2006-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
3689    
3690     * NEWS, configure.ac: Set the version number to 3.0
3691     (dropping libmilter support calls for raising the major number).
3692     * TODO: Update
3693    
3694     * src/Makefile.am: Install mailfromd in sbin
3695 gray 795 * etc/Makefile.am (.in.mailfromd): Likewise
3696 gray 793 * gacopyz/gacopyz.c (gacopyz_handle_connection): Reset SIGTERM and
3697     SIGHUP in child.
3698     * gacopyz/proc.c (gacopyz_cleanup_conn): Ignore SIGTERM while
3699     stopping children.
3700    
3701     * doc/gacopyz.texi: New file
3702     * doc/Makefile.am (mailfromd_TEXINFOS): Add gacopyz.texi
3703     (EXTRA_DIST): Add extract.awk
3704     (extract): New rule
3705     * doc/macros.texi (function-begin, function-end): Remove macros
3706     (example-output): New macro
3707     * doc/mailfromd.texi: Finish changes for 3.0
3708    
3709 gray 778 2006-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
3710    
3711     * NEWS: Update
3712     * TODO: Update
3713     * doc/Makefile.am (check-pragmas): Minor change
3714     * doc/macros.texi (function-begin,function-end): New macros
3715     * doc/mailfromd.texi: Add missing documentation
3716     * etc/rc.in: New option `macros'.
3717     * gacopyz/gacopyz.c (ctx_read,ctx_write): Return immediately on
3718     timeout and eof.
3719    
3720 gray 740 2006-11-03 Sergey Poznyakoff <gray@gnu.org.ua>
3721    
3722 gray 777 * etc/rc.in: New command 'configtest' (proposed by Jan)
3723     * gacopyz/gacopyz.c (gacopyz_run): Update invocation of
3724     gacopyz_cleanup_children.
3725     * gacopyz/gacopyz.h (gacopyz_cleanup_children): Change signature
3726     * gacopyz/proc.c: Do not keep the list of
3727     children. gacopyz_cleanup_children now does the housekeeping job.
3728     * src/engine.c (check_portspec): Minor fix: no use to make sp
3729     static.
3730     (mailfromd_daemon): Stop on SIGTERM, SIGQUIT, SIGHUP and SIGINT.
3731     Finally!
3732    
3733    
3734 gray 771 * src/engine.c (smfilter): Set child start handler
3735    
3736     * NEWS: Update
3737     * configure.ac: Warn if libmilter is requested
3738     * doc/mailfromd.texi: Remove any references to libmilter
3739     * src/mailfrom.h: Fix conditionals for definition of res_n*
3740     wrappers.
3741    
3742 gray 765 * configure.ac: Autodetect the presence of res_n* functions
3743     Define HAVE_PTHREAD if we need to use libpthread
3744     * gacopyz/gacopyz.c (macro_assoc_free): Initialize macro_assoc_t
3745     fields to NULL
3746     * src/bi_poll.m4: Fix trace output (AS part)
3747     * src/dns.c: Replace pthread-specific calls with macro wrappers
3748     * src/gram.y (on pollstmt do branches): Fix passing of arguments
3749     to the built-in poller
3750     * src/mailfrom.h: Define wrappers for phread and res_n* functions,
3751     if necessary
3752    
3753 gray 756 * libmilter: Removed. Everything moved to /gacopyz
3754     * gacopyz: New directory. See libmilter for the previous history
3755     * Makefile.am (SUBDIRS): Replace libmilter with gacopyz
3756     * NEWS: Update
3757     * configure.ac: Raise version number to 2.0.4
3758     Default to using libgacopyz. If the user really calls for trouble,
3759     allow him to use libmilter (possibly forked), instead.
3760     * src/Makefile.am (INCLUDES): Add MILTER_INCLUDES
3761     * src/engine.c: Remove include mfapi.h
3762     (priv_get): Special provision for test mode
3763     * src/mailfrom.h: Include mfapi.h without leading directory. -I
3764     should take care of it.
3765     (MAILFROMD_DAEMON,MAILFROMD_TEST,MAILFROMD_DELETE,MAILFROMD_LIST)
3766     (MAILFROMD_EXPIRE,MAILFROMD_COMPACT)
3767     (MAILFROMD_SHOW_DEFAULTS): Moved from main.c
3768     (mode): New global
3769     * src/main.c: Do not include mfapi
3770     (MAILFROMD_DAEMON,MAILFROMD_TEST,MAILFROMD_DELETE,MAILFROMD_LIST)
3771     (MAILFROMD_EXPIRE,MAILFROMD_COMPACT)
3772     (MAILFROMD_SHOW_DEFAULTS): Move defines to mailfrom.h
3773     * src/ml.c: Include mfapi.h without leading directory. -I
3774     should take care of it.
3775     [GACOPYZ_VERSION_MAJOR]: Provide wrapper for gacopyz_setreply
3776 gray 758 * gacopyz/smfi.c (smfi_main): Remove debugging hook
3777 gray 756
3778 gray 743 * libmilter/dummy.c: Update
3779     * libmilter/milter.c, libmilter/milter.h, libmilter/smfi.c:
3780     Finished libmilter implementation.
3781     * testsuite/mail.null: Skip -f option and its argument.
3782    
3783 gray 740 * libmilter/context.c, libmilter/milter.h, libmilter/smfi.c:
3784     (g_milter_setmlreply_v, smfi_setmlreply): Improved implementation.
3785     (g_milter_setmlreply_va): New function
3786    
3787 gray 731 2006-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
3788    
3789 gray 738 * libmilter/context.c, libmilter/milter.c, libmilter/milter.h
3790     libmilter/milter_priv.h, libmilter/smfi.c: Implement sending reply
3791     strings to sendmail.
3792    
3793 gray 736 * src/gram.y: Fix type casting of arguments.
3794    
3795 gray 734 * libmilter/milter.c, libmilter/milter.h,
3796     libmilter/milter_priv.h: Finish context loop implementation.
3797     * libmilter/dummy.c: Add to the repository
3798    
3799 gray 731 * libmilter/milter.c (trans_ok, get_command): Change signature
3800     (send_reply): Remove translation of the command.
3801     (union state_arg): Change contents.
3802     (state_ret_type): New data type
3803     (state_handler_fn): Change type and signature.
3804     (state_disp): New field `name'.
3805     (shan_abort,shan_macro,shan_optneg): Implemented
3806     (find_disp): New function
3807     (parse_state_arg): New function
3808     (g_milter_context_loop): Initial loop implementation.
3809     (g_milter_getsymval): New function
3810     * libmilter/milter.h (SMFI_V1_ACTS,SMFI_V2_ACTS): New defines
3811     (smfi_getsymval): Define to g_milter_getsymval
3812     (g_milter_getsymval): New prototype
3813     * libmilter/milter_priv.h (macro_assoc_t): New data type
3814     (struct smfi_str.macros): Change type to macro_assoc_t
3815     * libmilter/trans.awk: Define state_name array
3816    
3817 gray 710 2006-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
3818    
3819 gray 726 * configure.ac (BUILD_DUMMY): New var
3820     * libmilter/Makefile.am: Build dummy - a test program for
3821     libmilter
3822     * libmilter/log.c (g_smfi_logdump): New function
3823     * libmilter/milter.c: Lots of fixes. Start implementing the read
3824     and eval loop.
3825     * libmilter/milter.h (smfi_register): Fix prototype
3826     (g_smfi_logdump): New function
3827     * libmilter/milter_priv.h (enum macro_index)
3828     (milter_sockaddr_t,mi_uint32_t): New data type
3829     (struct smfi_str.macros): Change type
3830     * libmilter/smfi.c (smfi_register): Fix declaration
3831     (smfi_main): Temporarly force foreground mode
3832     * libmilter/trans.awk (END): Emit st_none
3833    
3834 gray 715 * Makefile.am (SUBDIRS): Add libmilter
3835     * configure.ac: Add testing framework for libmilter
3836     Raise version number to 2.0.3
3837     * libmilter/Makefile.am: Conditionally build libmilter.a
3838    
3839     * libmilter/: Initial commit
3840     * context.c: Initial commit
3841     * log.c: Initial commit
3842     * milter.c: Initial commit
3843     * milter.h: Initial commit
3844     * milter_priv.h: Initial commit
3845     * proc.c: Initial commit
3846     * smfi.c: Initial commit
3847     * trans.awk: Initial commit
3848     * trans.tab: Initial commit
3849 gray 717 * libmilter/.cvsignore: Initial commit
3850    
3851 gray 710 * src/prog.c (instr_ston): Fix runtime error diagnostic message
3852    
3853 gray 700 2006-10-30 Sergey Poznyakoff <gray@gnu.org.ua>
3854    
3855 gray 705 * src/engine.c (check_on_host): Iterate over addresses from
3856     `mailfrom' until either the list is exhausted or the remote server
3857     replies 2xx. Generalization of Jan's idea.
3858     * src/main.c (set_mailfrom): Check if value is a valid mail
3859     address (or a list thereof)
3860     * testsuite/etc/poll-1.rc: New file
3861     * testsuite/etc/Makefile.am (RCFILES): Add poll-1.rc
3862     * testsuite/mailfromd/poll.exp: Test multiple from addresses.
3863     * NEWS: Update
3864     * doc/Makefile.am (check-exceptions): New goal
3865     (all-check-docs): Depend on check-exceptions
3866     * doc/mailfromd.texi: Document multiple from addresses.
3867     * src/gram.y (pragma_option): Return the rest of the line as the
3868     option argument for `pragma option mailfromd'
3869    
3870 gray 700 * NEWS, TODO: Update
3871     * src/bi_poll.m4 (_pollmx): Update invocation of check_mx_records
3872     * src/engine.c (check_mx_records): Return actual number of MXs in
3873     the location given by the last argument. All callers updated
3874     (method_standard): Do the last-resort poll (i.e. querying the
3875     domain part of the sender email, treated as an MX) only if the
3876     domain has no MX records.
3877     * src/mailfrom.h (check_mx_records): Update declaration
3878    
3879 gray 694 2006-10-29 Sergey Poznyakoff <gray@gnu.org.ua>
3880    
3881     * src/bi_dns.m4 (ismx): New built-in function
3882 gray 696
3883 gray 694 Implement connect-timeout and connect-retry options proposed by
3884     Jan:
3885    
3886     * src/engine.c (smtp_stream_wait, smpt_wait)
3887     (check_on_host, listens_on): Use connect_wait/connect_timeout for
3888     the initial connection and io_wait/io_timeout for the I/O
3889     operations.
3890     * src/mailfrom.h (connect_timeout, connect_attempts): New
3891     variables.
3892     * src/main.c: Likewise.
3893    
3894 gray 696 * src/prog.c (struct eval_environ): Fix setheader prototype.
3895 gray 694 * TODO, NEWS: Update
3896    
3897 gray 684 2006-10-28 Sergey Poznyakoff <gray@gnu.org.ua>
3898    
3899 gray 690 * NEWS, configure.ac: Version 2.0.2
3900     * src/bi_sa.m4 (clamav): New built-in function
3901     * src/snarf.m4: Minor comment fixes
3902    
3903 gray 686 * src/snarf.m4 (env_get_stream): New macro. Make sure
3904     env_get_stream is used only within capturing function
3905     definitions.
3906    
3907 gray 684 * doc/Makefile.am (check-pragmas, check-options)
3908     (check-builtins): Use new check-docs.sh invocation syntax
3909     * doc/check-docs.sh: Allow to take any number of "source"
3910     arguments.
3911     * doc/mailfromd.texi: Remove ignored deftypefn of numrcpt
3912    
3913 gray 660 2006-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
3914    
3915 gray 680 * NEWS: Update
3916     * src/bi_db.m4 (MF_INIT): Install greylist_seconds_left variable
3917     * src/engine.c (ctx_setheader,priv_store_header_command): Change
3918     type of the second argument to struct old_header_node.
3919     * src/gram.y: Rules for header modification changed to allow an
3920     expression as the second argument.
3921     (register_macro,print_used_macros): New functions
3922     (dbg_setheader): Change type of the second argument to struct
3923     old_header_node.
3924     (print_node,code_node): Change handling of node_type_header
3925     * src/mailfrom.h (struct old_header_node): Renamed from header_node
3926     (struct header_node): New structure.
3927     (print_config_macros): New function
3928     (create_environment): Change type of the 4th argument
3929     (priv_store_header_command): Remove declaration
3930     (compare_string): New declaration
3931     * src/main.c: New option --dump-macros
3932     * src/prog.c (instr_header): The value for the header is obtained
3933     as the 1st argument.
3934     (struct optab): Change instr_header description
3935     (create_environment) Change type of the 4th argument
3936    
3937 gray 673 * configure.ac: Check for SIGRETTYPE
3938     * src/Makefile.am (M4_FILES): Add bi_sa.m4
3939     * src/bi_db.m4, src/bi_dns.m4, src/bi_string.m4: Remove unneded
3940     quoting
3941     * src/engine.c (mlfi_envfrom,mlfi_header,mlfi_eoh)
3942     (mlfi_body, mlfi_eom): Capture support
3943     (mlfi_eom): Bugfix: mlfi_eval called with wrong state tag
3944     * src/gram.y: Check if builtin invocations are allowed in the
3945     current state.
3946     (status_tab): Add mf_url
3947     * src/lex.l (parse_include): Remove unused variable
3948     * src/mailfrom.h (mf_status): New status mf_url
3949     (struct builtin): New fields rettype, statemask, capture.
3950     (va_builtin_install_ex): New function
3951     (env_get_stream,env_capture_start,env_capture_write,
3952     env_capture_write_args): New functions
3953     * src/prog.c: Include stdarg.h
3954     (struct eval_environ): New member `stream'
3955     (env_get_stream,env_capture_start,env_capture_write)
3956     (env_capture_write_args): New functions
3957     (destroy_environment): Destroy the capture stream
3958     (builtin_setup): Call sa_init_builtin.
3959     * src/prog.h (sa_init_builtin): New function
3960     * src/snarf.m4: Change quoting symbols to [<,>]
3961     (MF_STATE, MF_CAPTURE): New defines
3962     (MF_DEFUN): use va_builtin_install_ex
3963     * src/symtab.c (va_builtin_install_ex): New function
3964     * src/bi_sa.m4: New file. Spam-Assassin interface.
3965