"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ChangeLog" between
mailfromd-8.11.tar.xz and mailfromd-8.12.tar.xz

About: Mailfromd is a general-purpose mail filtering daemon for Sendmail, Postfix and MeTA1 (interfaces with the MTA using Milter or PMilter protocols).

<
ChangeLog  (mailfromd-8.11.tar.xz):ChangeLog  (mailfromd-8.12.tar.xz)
2021-05-26 Sergey Poznyakoff <gray@gnu.org> 2021-08-06 Sergey Poznyakoff <gray@gnu.org>
Version 8.11 Version 8.12
2021-05-25 Sergey Poznyakoff <gray@gnu.org> 2021-08-06 Sergey Poznyakoff <gray@gnu.org>
Fix operation on big-endian architectures (tested on s390x) Improve docs
* NEWS: Version 8.10.90 2021-08-06 Sergey Poznyakoff <gray@gnu.org>
* configure.ac: Version 8.10.90
* lib/dns.c (ptr_lookup): Don't assume little-endianness. Housekeeping changes
* src/drivers.c: Make sure retrieved member of STKVAL.c_value
has the same width as the stored one.
* src/gram.y: Likewise.
* src/prog.c: Likewise.
Skip callout tests if port 25 on test SMTP server is not reachable. * Makefile.am (ChangeLog): Rebuild using git alone.
* git2chg.awk: Remove.
* tests/portprobe.c: New file. 2021-07-23 Sergey Poznyakoff <gray@gnu.org>
* tests/.gitignore: Add portprobe.
* tests/Makefile.am: Build portprobe.
* tests/testsuite.at (AT_REQUIRE_SMTP): New macro.
* tests/poll.at: Use AT_REQUIRE_SMTP.
* tests/poll01.at: Likewise.
* tests/poll02.at: Likewise.
* tests/poll03.at: Likewise.
Minor fixes. New filtering functions: filter_string and filter_fd
* src/builtin/filter.bi: New source.
* src/builtin/Makefile.am: Add filter.bi
* src/builtin/msg.bi: Remove unnecessary calls to
MF_CLR_CLEANUP.
* NEWS: Document changes.
* doc/functions.texi: Describe new functions. Reorder the
material.
* doc/mailfromd.texi: Move filter descriptions to a subsection
of
"Filtering functions".
2021-07-23 Sergey Poznyakoff <gray@gnu.org>
Minor changes
2021-07-23 Sergey Poznyakoff <gray@gnu.org>
Document new functions and filter pipes
2021-07-19 Sergey Poznyakoff <gray@gnu.org>
Bugfix
* lib/fltpipe.c (context_error): Fix end position
2021-07-19 Sergey Poznyakoff <gray@gnu.org>
Document the $n and $(n) constructs
2021-07-19 Sergey Poznyakoff <gray@gnu.org>
Fix optimization of $(n) construct
The $(n) construct would not work with optimization enabled.
This is fixed.
* src/drivers.c (optimize_type_argx): Fix computation.
2021-07-17 Sergey Poznyakoff <gray@gnu.org>
Rewrite filter support in message_body_to_stream and related
functions
* lib/Makefile.am: Add new file.
* lib/fltpipe.c: New file.
* lib/libmf.h (mfl_filter_pipe_create): New proto.
* mflib/.gitignore: Update.
* mflib/Makefile.am: Build mime.mf
* mflib/mime.mf: Rename to mflib/mime.mf4
* mflib/mime.mf4 (message_body_decode)
(message_part_decode): Take two optional arguments: charset and
charset_fallback.
* src/builtin/.gitignore: Update.
* src/builtin/msg.bi (charset, charset_fallback): Remove
globals.
(mime_decode_filter): Move charset-related part to a separate
function.
(mime_charset_filter): New function.
(message_body_to_stream): Use mfl_filter_pipe_create to handle
the fltchain argument.
2021-07-22 Sergey Poznyakoff <gray@gnu.org>
Make sure callout defaults are sent each time address
verification is requested
* mflib/callout.mf4 (callout_setvars): New function.
(callout_open): Use callout_setvars.
(__callout_open_default): If socket descriptor is already open,
call callout_setvars to send the relevant SET statements.
2021-07-22 Sergey Poznyakoff <gray@gnu.org>
Improve callout interface to SET command
* mflib/callout.mf4 (setvar): Quote the value.
(callout_open): Remove the superfluous try-catch.
2021-07-22 Sergey Poznyakoff <gray@gnu.org>
Fix coredump in MFL stack trace. Improve trace.
* src/prog.c (stack_trace_entry): New function. Print
instr_builtin names as well.
(runtime_stack_trace): Use stack_trace_entry.
(env_init): Initialize pc to 0.
2021-07-22 Sergey Poznyakoff <gray@gnu.org>
Implement the "SET" command in the callout protocol.
* mflib/callout.mf4 (callout_open): Emit the "set" commands. For
backward compatibility, don't bail out if the server refuses
them.
* src/savsrv.c (cmd_set): New function.
(callout_command_tab): New command: "SET"
2021-07-17 Sergey Poznyakoff <gray@gnu.org>
Minor fixes
* doc/mailfromd.texi: Fix @cindex formatting.
* src/prog.c: Remove unused function.
2021-07-15 Sergey Poznyakoff <gray@gnu.org>
Bugfix in getlne() built-in
* src/builtin/io.bi (read_stream_delim): Gracefully handle
missing delimiter.
* src/builtin/io.bi (io_stream): Remove unused member. 2021-07-15 Sergey Poznyakoff <gray@gnu.org>
* src/main.c: Fix the "relayed-domain-file" configuration statement.
Several improvements to MIME decoding mechanism
* mflib/status.mf (e_ilseq): New exception.
* src/builtin/msg.bi (charset_fallback): New variable.
(charset): Initialize to empty string (meaning "no conversion").
(mfl_filter_chain_create): Provide a workaround for
mu_filter_chain_create.
(charset_setup): Take empty charset value as "no conversion
needed". Take into account the charset_fallback variable.
* doc/functions.texi: Detailed description of charset recoding
process.
* doc/mailfromd.texi: Document the charset_fallback variable and
e_ilseq runtime exception.
2021-07-13 Sergey Poznyakoff <gray@gnu.org>
Functions for decoding MIME messages
* configure.ac: Version 8.11.90
* NEWS: Document changes.
* doc/functions.texi: Document new functions.
* doc/mailfromd.texi: Document the "charset" variable.
* src/gram.y (ensure_initialized_variable): Remove.
(ds_init_variable): New function.
* src/prog.h (ensure_initialized_variable): Remove.
(ds_init_variable): New proto.
* src/builtin/msg.bi (message_body_to_stream): If the first word
in fltchain is "mimedecode", decode the MIME part.
(message_content_type): New function.
* src/builtin/burst.bi: Use ds_init_variable.
* src/builtin/callout.bi: Likewise.
* src/builtin/getopt.bi: Likewise.
* mflib/Makefile.am: Add mime.mf
* mflib/mime.mf: New file.
2021-05-26 Sergey Poznyakoff <gray@gnu.org>
Version 8.11
2021-05-25 Sergey Poznyakoff <gray@gnu.org>
Fix operation on big-endian architectures (tested on s390x)
* NEWS: Version 8.10.90
* configure.ac: Version 8.10.90
* lib/dns.c (ptr_lookup): Don't assume little-endianness.
* src/drivers.c: Make sure retrieved member of STKVAL.c_value
has the same width as the stored one.
* src/gram.y: Likewise.
* src/prog.c: Likewise.
Skip callout tests if port 25 on test SMTP server is not
reachable.
* tests/portprobe.c: New file.
* tests/.gitignore: Add portprobe.
* tests/Makefile.am: Build portprobe.
* tests/testsuite.at (AT_REQUIRE_SMTP): New macro.
* tests/poll.at: Use AT_REQUIRE_SMTP.
* tests/poll01.at: Likewise.
* tests/poll02.at: Likewise.
* tests/poll03.at: Likewise.
Minor fixes.
* src/builtin/io.bi (io_stream): Remove unused member.
* src/main.c: Fix the "relayed-domain-file" configuration
statement.
2021-05-23 Sergey Poznyakoff <gray@gnu.org> 2021-05-23 Sergey Poznyakoff <gray@gnu.org>
Minor fixes Minor fixes
2021-02-23 Sergey Poznyakoff <gray@gnu.org> 2021-02-23 Sergey Poznyakoff <gray@gnu.org>
Version 8.10 Version 8.10
2021-02-15 Sergey Poznyakoff <gray@gnu.org> 2021-02-15 Sergey Poznyakoff <gray@gnu.org>
Warn about uninitialized variables; meaningful use of string variables in Warn about uninitialized variables; meaningful use of string
boolean context variables in boolean context
* src/mailfromd.h (variable) <initialized>: New member. * src/mailfromd.h (variable) <initialized>: New member.
(variable_check_initialized): New proto. (variable_check_initialized): New proto.
* src/symbols.c (init_variable): Set initialized to 0. * src/symbols.c (init_variable): Set initialized to 0.
* src/gram.y: Convert the use of string variable in boolean context * src/gram.y: Convert the use of string variable in boolean
to s != ''. context to s != ''.
(create_asgn_node): Set var->initialized to 1. (create_asgn_node): Set var->initialized to 1.
(create_node_variable): Check if the variable is initialized. (create_node_variable): Check if the variable is initialized.
(variable_check_initialized): New function. (variable_check_initialized): New function.
* src/lex.l (variable_or_const): Check if the variable is * src/lex.l (variable_or_const): Check if the variable is
initialized. initialized.
* mflib/dns.mf4 (dns_getname, dns_getaddr) * mflib/dns.mf4 (dns_getname, dns_getaddr)
(getns,getmx): Initialize result. (getns,getmx): Initialize result.
* tests/arginit.at: New test. * tests/arginit.at: New test.
* tests/Makefile.am: Add new test. * tests/Makefile.am: Add new test.
* tests/testsuite.at: Include new test. * tests/testsuite.at: Include new test.
* doc/mailfromd.texi: Elaborate on default values of variables. * doc/mailfromd.texi: Elaborate on default values of variables.
* NEWS: Version 8.9.90 * NEWS: Version 8.9.90
* configure.ac: Likewise. * configure.ac: Likewise.
2021-02-08 Sergey Poznyakoff <gray@gnu.org> 2021-02-08 Sergey Poznyakoff <gray@gnu.org>
Fix minimal mailutils requirement in README Fix minimal mailutils requirement in README
2021-01-06 Sergey Poznyakoff <gray@gnu.org> 2021-01-06 Sergey Poznyakoff <gray@gnu.org>
Update copyright years Update copyright years
2020-12-29 Sergey Poznyakoff <gray@gnu.org> 2020-12-29 Sergey Poznyakoff <gray@gnu.org>
Fix typos in NEWS Fix typos in NEWS
Version 8.9 2020-12-29 Sergey Poznyakoff <gray@gnu.org>
* NEWS: Update. Version 8.9
* configure.ac: Update.
* doc/functions.texi (dkim_verified_signature_tag): Add missing * NEWS: Update.
type declaration. * configure.ac: Update.
* tests/hdr-cap.at: Ignore X-* headers. * doc/functions.texi (dkim_verified_signature_tag): Add missing
* tests/hdr-mul.at: Likewise. type declaration.
* tests/hdr-cap.at: Ignore X-* headers.
* tests/hdr-mul.at: Likewise.
2020-11-19 Sergey Poznyakoff <gray@gnu.org> 2020-11-19 Sergey Poznyakoff <gray@gnu.org>
Remove old code. Remove old code.
* src/builtin/mbox.bi (mailbox_open): Remove a left-over workaround, * src/builtin/mbox.bi (mailbox_open): Remove a left-over
not needed since mailutils commit d7a596df78. workaround, not needed since mailutils commit d7a596df78.
2020-11-08 Sergey Poznyakoff <gray@gnu.org> 2020-11-08 Sergey Poznyakoff <gray@gnu.org>
Remove obsolete ifdefs Remove obsolete ifdefs
Version 8.8.92 2020-11-08 Sergey Poznyakoff <gray@gnu.org>
New builtin function: geoip2_get_json Version 8.8.92
* src/builtin/geoip2.bi (geoip2_get): Throw e_range if the lookup 2020-11-08 Sergey Poznyakoff <gray@gnu.org>
path does not exist in the returned data.
Return empty string if there is no data in the entry. New builtin function: geoip2_get_json
(geoip2_get_json): New function.
* src/prog.c (heap_obstack_vsprintf): Don't overwrite previously * src/builtin/geoip2.bi (geoip2_get): Throw e_range if the
written data. lookup path does not exist in the returned data. Return empty
* doc/functions.texi: Describe the geoip2 functions. string if there is no data in the entry.
* NEWS: Update. (geoip2_get_json): New function.
* src/prog.c (heap_obstack_vsprintf): Don't overwrite previously
written data.
* doc/functions.texi: Describe the geoip2 functions.
* NEWS: Update.
2020-11-06 Sergey Poznyakoff <gray@gnu.org> 2020-11-06 Sergey Poznyakoff <gray@gnu.org>
geoip2 support geoip2 support
* configure.ac: Check for libmaxminddb. * configure.ac: Check for libmaxminddb.
* src/Makefile.am (mailfromd_LDADD): Add GEOIP2_LIBS. * src/Makefile.am (mailfromd_LDADD): Add GEOIP2_LIBS.
* src/builtin/Makefile.am: Add geoip2.bi * src/builtin/Makefile.am: Add geoip2.bi
* src/builtin/geoip2.bi: New file. * src/builtin/geoip2.bi: New file.
* src/main.c (mailfromd_show_defaults): Reflect the status of geoip2 * src/main.c (mailfromd_show_defaults): Reflect the status of
support. geoip2 support.
New functions for printf-style operations on the heap temporary space. 2020-11-06 Sergey Poznyakoff <gray@gnu.org>
* src/builtin/snarf.m4 (MF_OBSTACK_PRINTF): New macro. New functions for printf-style operations on the heap temporary
* src/prog.c (heap_obstack_size, heap_obstack_vsprintf) space.
(heap_obstack_sprintf): New functions.
(env_vsprintf): Create copy of the va_list prior to using it and * src/builtin/snarf.m4 (MF_OBSTACK_PRINTF): New macro.
dispose of it afterwards. * src/prog.c (heap_obstack_size, heap_obstack_vsprintf)
* src/prog.h (heap_obstack_vsprintf, heap_obstack_sprintf): New protos. (heap_obstack_sprintf): New functions.
(env_vsprintf): Create copy of the va_list prior to using it and
dispose of it afterwards.
* src/prog.h (heap_obstack_vsprintf, heap_obstack_sprintf): New
protos.
2020-11-05 Sergey Poznyakoff <gray@gnu.org> 2020-11-05 Sergey Poznyakoff <gray@gnu.org>
Improve numeric overflow checking during stack/data reallocation Improve numeric overflow checking during stack/data reallocation
* src/gram.y (strtosize): Improve numeric overflow checking. * src/gram.y (strtosize): Improve numeric overflow checking.
* src/prog.c (expand_dataseg): Change signature. Improve * src/prog.c (expand_dataseg): Change signature. Improve
reallocation strategy and overflow checking. Don't throw exception reallocation strategy and overflow checking. Don't throw
on error, that's the responsibility of the caller. exception on error, that's the responsibility of the caller. All
All uses changed. uses changed.
* src/prog.h (expand_dataseg): Change signature. * src/prog.h (expand_dataseg): Change signature.
* src/builtin/debug.bi (_expand_dataseg): Update call to expand_dataseg. * src/builtin/debug.bi (_expand_dataseg): Update call to
expand_dataseg.
2020-11-04 Sergey Poznyakoff <gray@gnu.org> 2020-11-04 Sergey Poznyakoff <gray@gnu.org>
Reimplement several DNS functions in pure MFL Reimplement several DNS functions in pure MFL
* NEWS: Update. * NEWS: Update.
* doc/functions.texi: Update. * doc/functions.texi: Update.
* mflib/dns.mf4 (dns_getname, dns_getaddr) * mflib/dns.mf4 (dns_getname, dns_getaddr)
(getns, getmx): New functions. (getns, getmx): New functions.
* src/builtin/dns.bi (dns_getname, dns_getaddr) * src/builtin/dns.bi (dns_getname, dns_getaddr)
(getns, getmx): Remove. (getns, getmx): Remove.
Add tests fir dns_query 2020-11-04 Sergey Poznyakoff <gray@gnu.org>
Add tests fir dns_query
* tests/dns_query.at: New file. * tests/dns_query.at: New file.
* tests/Makefile.am: Add dns_query.at * tests/Makefile.am: Add dns_query.at
* tests/testsuite.at: Likewise. * tests/testsuite.at: Likewise.
* tests/atlocal.in (MFOPTS): Change order of the include directories. * tests/atlocal.in (MFOPTS): Change order of the include
directories.
Version 8.8.91 2020-11-04 Sergey Poznyakoff <gray@gnu.org>
dns_query: remove the arbitrary limit on the number of replies Version 8.8.91
2020-11-04 Sergey Poznyakoff <gray@gnu.org>
* src/builtin/dns.bi: Use the module private storage for reply table. dns_query: remove the arbitrary limit on the number of replies
* src/builtin/dns.bi: Use the module private storage for reply
table.
2020-11-03 Sergey Poznyakoff <gray@gnu.org> 2020-11-03 Sergey Poznyakoff <gray@gnu.org>
Implement the dns_query function: a generalized API for DNS queries Implement the dns_query function: a generalized API for DNS
queries
* mflib/dns.mf4 (DNS_TYPE_A, DNS_TYPE_NS) * mflib/dns.mf4 (DNS_TYPE_A, DNS_TYPE_NS)
(DNS_TYPE_PTR, DNS_TYPE_MX, DNS_TYPE_TXT): New constants. (DNS_TYPE_PTR, DNS_TYPE_MX, DNS_TYPE_TXT): New constants.
* src/builtin/dns.bi (dns_query): New function. * src/builtin/dns.bi (dns_query): New function.
(dns_reply_release,dns_reply_count) (dns_reply_release,dns_reply_count)
(dns_reply_string,dns_reply_ip): New functions. (dns_reply_string,dns_reply_ip): New functions.
* src/prog.c (eval_environ): Rename cleanup_list to function_cleanup_list * src/prog.c (eval_environ): Rename cleanup_list to
. function_cleanup_list. New member environ_cleanup_list.
New member environ_cleanup_list. (env_environ_cleanup_add): New function.
(env_environ_cleanup_add): New function. * src/prog.h (env_environ_cleanup_add): New proto.
* src/prog.h (env_environ_cleanup_add): New proto. * doc/functions.texi: Document the dns_query function.
* doc/functions.texi: Document the dns_query function. * NEWS: Likewise.
* NEWS: Likewise.
2020-11-03 Sergey Poznyakoff <gray@gnu.org>
Doc: Remove references to non-existing DNS cache Doc: Remove references to non-existing DNS cache
Expect 15 shift/reduce in grammar 2020-11-03 Sergey Poznyakoff <gray@gnu.org>
Expect 15 shift/reduce in grammar
Don't assume smallbook in docs. 2020-11-03 Sergey Poznyakoff <gray@gnu.org>
Don't assume smallbook in docs.
2020-11-02 Sergey Poznyakoff <gray@gnu.org> 2020-11-02 Sergey Poznyakoff <gray@gnu.org>
Fix typo Fix typo
2020-11-02 Sergey Poznyakoff <gray@gnu.org>
Document the sed construct. Implement the qr() builtin. Document the sed construct. Implement the qr() builtin.
* doc/Makefile.am: Remove sexp.texi. * doc/Makefile.am: Remove sexp.texi.
* doc/sexp.texi: Remove. * doc/sexp.texi: Remove.
* doc/functions.texi: Document the sed function. * doc/functions.texi: Document the sed function.
* doc/mailfromd.texi: Update. * doc/mailfromd.texi: Update.
* src/builtin/snarf.m4 (__MF_DEFUN_FLAGS__): New macro. * src/builtin/snarf.m4 (__MF_DEFUN_FLAGS__): New macro.
(__mf_add_defun_flag) (__mf_add_defun_flag)
(__mf_mfl_type,__mf_arglist_init): New macros. (__mf_mfl_type,__mf_arglist_init): New macros.
(__mf_defun): Use __mf_arglist_init to initialize __MF_ARGLIST__ and (__mf_defun): Use __mf_arglist_init to initialize __MF_ARGLIST__
the defun flags. and the defun flags.
(__MF_NEEDS_CAPTURE__): Remove. (__MF_NEEDS_CAPTURE__): Remove.
(MF_CAPTURE): Set MFD_BUILTIN_CAPTURE directly, instead of setting (MF_CAPTURE): Set MFD_BUILTIN_CAPTURE directly, instead of
__MF_NEEDS_CAPTURE__. setting
* src/builtin/string.bi (qr): New function. __MF_NEEDS_CAPTURE__.
* src/gram.y (funcall: T_BUILTIN): Special handling for builtins * src/builtin/string.bi (qr): New function.
with MFD_BUILTIN_REGEX_FLAGS flag set. * src/gram.y (funcall: T_BUILTIN): Special handling for builtins
* src/mailfromd.h (MFD_BUILTIN_REGEX_FLAGS): New flag. with MFD_BUILTIN_REGEX_FLAGS flag set.
* tests/sed.at: Rename qr to myqr to avoid name clash with the * src/mailfromd.h (MFD_BUILTIN_REGEX_FLAGS): New flag.
builtin. * tests/sed.at: Rename qr to myqr to avoid name clash with the
builtin.
* configure.ac: Version 8.8.90 * configure.ac: Version 8.8.90
* NEWS: Document the sed and qr functions. * NEWS: Document the sed and qr functions.
2020-11-01 Sergey Poznyakoff <gray@gnu.org> 2020-11-01 Sergey Poznyakoff <gray@gnu.org>
MFL: New built-in function "sed". MFL: New built-in function "sed".
The "sed" function (actually, a statement) transforms its first argument The "sed" function (actually, a statement) transforms its first
using the sed expressions given in its subsequent arguments and returns t argument using the sed expressions given in its subsequent
he arguments and returns the result:
result:
set res sed(input, 's/foo/bar/g', 's/bar/Baz/')
set res sed(input, 's/foo/bar/g', 's/bar/Baz/')
* lib/libmf.h (transform_append_t)
* lib/libmf.h (transform_append_t) (transform_reduce_t): Remove typedefs.
(transform_reduce_t): Remove typedefs. (transform_string): Change signature.
(transform_string): Change signature. * lib/transform.c (parse_transform_expr): Fix parsing of the
* lib/transform.c (parse_transform_expr): Fix parsing of the regexp part.
regexp part. (transform_string): Rewrite. No additional callbacks needed.
(transform_string): Rewrite. No additional callbacks needed. * src/drivers.c: New node types: 'sedcomp', to compile the sed
* src/drivers.c: New node types: 'sedcomp', to compile the sed transformation expression, and 'sed', to apply it.
transformation expression, and 'sed', to apply it. * src/gram.y: New production for sed(arg, expr).
* src/gram.y: New production for sed(arg, expr). * src/lex.l (sed): New keyword.
* src/lex.l (sed): New keyword. * src/mailfromd.h (sedcomp_node, sed_node): New structs.
* src/mailfromd.h (sedcomp_node, sed_node): New structs. (node): Add new sedcomp_node and sed_node parts to the union.
(node): Add new sedcomp_node and sed_node parts to the union. * src/opcodes (SEDCOMP, SED): New opcodes.
* src/opcodes (SEDCOMP, SED): New opcodes. * src/prog.c (next_transform_index)
* src/prog.c (next_transform_index) (install_transform,get_transform): New functions.
(install_transform,get_transform): New functions. (instr_sedcomp, instr_sed): New instruction handlers.
(instr_sedcomp, instr_sed): New instruction handlers. * src/symbols.c (import_rules_eval): Simplify transform
* src/symbols.c (import_rules_eval): Simplify transform expression expression handling.
handling.
* tests/sed.at: New file.
* tests/sed.at: New file. * tests/Makefile.am: Add sed.at
* tests/Makefile.am: Add sed.at * tests/testsuite.at: Include sed.at
* tests/testsuite.at: Include sed.at
2020-10-31 Sergey Poznyakoff <gray@gnu.org> 2020-10-31 Sergey Poznyakoff <gray@gnu.org>
Bugfix in the mfl-mode Bugfix in the mfl-mode
* elisp/mfl-mode.el (mfl-next-line-indentation): Handle the beginning * elisp/mfl-mode.el (mfl-next-line-indentation): Handle the
of buffer case. beginning of buffer case.
2020-07-26 Sergey Poznyakoff <gray@gnu.org> 2020-07-26 Sergey Poznyakoff <gray@gnu.org>
Version 8.8 Version 8.8
2020-07-24 Sergey Poznyakoff <gray@gnu.org> 2020-07-24 Sergey Poznyakoff <gray@gnu.org>
Update copyright years Update copyright years
2020-07-24 Sergey Poznyakoff <gray@gnu.org>
Version 8.7.92 Version 8.7.92
2020-07-23 Sergey Poznyakoff <gray@gnu.org> 2020-07-23 Sergey Poznyakoff <gray@gnu.org>
Fix compilation without libnettle Fix compilation without libnettle
* NEWS: Version 8.7.91 * NEWS: Version 8.7.91
* configure.ac: Likewise. * configure.ac: Likewise. Define WITH_DKIM.
Define WITH_DKIM. * mflib/Makefile.am [NETTLE_COND]: Add dkim.mf conditionally.
* mflib/Makefile.am [NETTLE_COND]: Add dkim.mf conditionally. * src/Makefile.am [NETTLE_COND]: Remove appending to
* src/Makefile.am [NETTLE_COND]: Remove appending to AM_CPPFLAGS: AM_CPPFLAGS: symbol defined in config.h
symbol defined in config.h * src/builtin/Makefile.am (BI_FILES): Add dkim.bi
* src/builtin/Makefile.am (BI_FILES): Add dkim.bi unconditionally. unconditionally.
* src/builtin/dkim.bi: Mark source with MF_COND(WITH_DKIM) * src/builtin/dkim.bi: Mark source with MF_COND(WITH_DKIM)
2020-07-22 Sergey Poznyakoff <gray@gnu.org> 2020-07-22 Sergey Poznyakoff <gray@gnu.org>
Fix compilation with gcc 10 Fix compilation with gcc 10
* gacopyz/gacopyz_priv.h (__gacopyz_log_printer): Mark as extern. * gacopyz/gacopyz_priv.h (__gacopyz_log_printer): Mark as
* lib/mfdb.h (cache_format, rate_format) extern.
(tbf_rate_format,greylist_format): Mark as extern. * lib/mfdb.h (cache_format, rate_format)
(predict_rate,predict_next_option): New externs. (tbf_rate_format,greylist_format): Mark as extern.
* src/dkim.c (dkim_signature_parse): Fix improper use of unprefixed (predict_rate,predict_next_option): New externs.
WRDSF_ constant. * src/dkim.c (dkim_signature_parse): Fix improper use of
* src/mfdbtool.c (predict_rate,predict_next_option): Remove variable unprefixed WRDSF_ constant.
declarations. * src/mfdbtool.c (predict_rate,predict_next_option): Remove
* src/savsrv.c (writeout): Use memcpy instead of strncpy to shut variable declarations.
up the gcc warning. * src/savsrv.c (writeout): Use memcpy instead of strncpy to shut
* src/srvcfg.c (negative_expire_interval): Remove declaration. up the gcc warning.
* src/srvcfg.c (negative_expire_interval): Remove declaration.
2020-07-13 Sergey Poznyakoff <gray@gnu.org>
Fix the use of deprecated CPPFunction* in mtasim
2020-07-13 Sergey Poznyakoff <gray@gnu.org> 2020-07-13 Sergey Poznyakoff <gray@gnu.org>
Fix the use of deprecated CPPFunction* in mtasim Implement enumerations in MFL
Implement enumerations in MFL * src/gram.y: Implement enumerated constant definitions.
* src/mailfromd.h (define_constant): Remove const from the
return type.
* src/symbols.c: Likewise.
* tests/enum.at: New test.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Likewise.
* src/gram.y: Implement enumerated constant definitions. * NEWS: Mention new features.
* src/mailfromd.h (define_constant): Remove const from the * doc/mailfromd.texi: Document new features.
return type.
* src/symbols.c: Likewise.
* tests/enum.at: New test. 2020-07-13 Sergey Poznyakoff <gray@gnu.org>
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Likewise.
* NEWS: Mention new features. Minor fix
* doc/mailfromd.texi: Document new features.
Minor fix * src/lex.l (lex_new_source_0): Initialize yylloc early. This
makes sure that eventual syntax errors occurring at the first
token are printed with detailed location
(filename:line.start-end)
* src/lex.l (lex_new_source_0): Initialize yylloc early. This makes 2020-07-13 Sergey Poznyakoff <gray@gnu.org>
sure that eventual syntax errors occurring at the first token are
printed with detailed location (filename:line.start-end)
Fix compilation without external preprocessor Fix compilation without external preprocessor
2020-07-11 Sergey Poznyakoff <gray@gnu.org> 2020-07-11 Sergey Poznyakoff <gray@gnu.org>
Minor fix in the docs Minor fix in the docs
Provide DKIM_EXPL_ codes for use in MFL 2020-07-11 Sergey Poznyakoff <gray@gnu.org>
* doc/functions.texi: Document changes Provide DKIM_EXPL_ codes for use in MFL
* mflib/status.mf: Define DKIM_EXPL_ constants
* src/dkim.c (dkim_explanation_str): Change the wording of * doc/functions.texi: Document changes
DKIM_EXPL_BAD_BASE64 error string. * mflib/status.mf: Define DKIM_EXPL_ constants
* src/dkim.h: Define DKIM_EXPL_ using _MFL_DKIM_EXPL_ ones * src/dkim.c (dkim_explanation_str): Change the wording of
DKIM_EXPL_BAD_BASE64 error string.
* src/dkim.h: Define DKIM_EXPL_ using _MFL_DKIM_EXPL_ ones
2020-07-10 Sergey Poznyakoff <gray@gnu.org> 2020-07-10 Sergey Poznyakoff <gray@gnu.org>
Minor fix Minor fix
Minor fixes 2020-07-10 Sergey Poznyakoff <gray@gnu.org>
* src/builtin/dkim.bi (dkim_sign): Insert DKIM-Signature at position 0. Minor fixes
* src/dkim.c (dkim_signature_format): Don't request MU_STREAM_STAT_OUTLN
Provide additonal data upon successful return from mfd_dkim_verify * src/builtin/dkim.bi (dkim_sign): Insert DKIM-Signature at
position 0.
* src/dkim.c (dkim_signature_format): Don't request
MU_STREAM_STAT_OUTLN
* doc/functions.texi: Document new functions and variables. 2020-07-10 Sergey Poznyakoff <gray@gnu.org>
* mflib/Makefile.am: Add dkim..mf
* mflib/dkim.mf: New function. Provide additonal data upon successful return from
* src/builtin/dkim.bi (dkim_verified_signature): New MFL variable. mfd_dkim_verify
(dkim_verify): Set dkim_verified_signature upon return.
* src/dkim.c (mfd_dkim_verify): Return normalized DKIM signature * doc/functions.texi: Document new functions and variables.
value in the memory location pointed to by the second argument. * mflib/Makefile.am: Add dkim..mf
* src/dkim.h (mfd_dkim_verify): Change signature. * mflib/dkim.mf: New function.
* src/builtin/dkim.bi (dkim_verified_signature): New MFL
variable.
(dkim_verify): Set dkim_verified_signature upon return.
* src/dkim.c (mfd_dkim_verify): Return normalized DKIM signature
value in the memory location pointed to by the second argument.
* src/dkim.h (mfd_dkim_verify): Change signature.
2020-07-10 Sergey Poznyakoff <gray@gnu.org>
Rewrite DKIM parser and formatter Rewrite DKIM parser and formatter
DKIM: implement l= tag 2020-07-10 Sergey Poznyakoff <gray@gnu.org>
DKIM: implement l= tag
2020-07-09 Sergey Poznyakoff <gray@gnu.org> 2020-07-09 Sergey Poznyakoff <gray@gnu.org>
DKIM: Minor change DKIM: Minor change
* src/dkim.c (dkim_hash): Use dkim_header_list_first/ * src/dkim.c (dkim_hash): Use dkim_header_list_first/
dkim_header_list_first/dkim_header_list_end instead of mu_wordsplit dkim_header_list_first/dkim_header_list_end instead of
to iterate over the list of headers. mu_wordsplit to iterate over the list of headers.
Implement DKIM-Signature wrapping. Fix DKIM interaction with header_repla ce 2020-07-09 Sergey Poznyakoff <gray@gnu.org>
* src/builtin/dkim.bi (do_msgmod): When processing header_replace, Implement DKIM-Signature wrapping. Fix DKIM interaction with
first check if the requested header is already present. If it is, header_replace
proceed with header insert. Otherwise do mu_header_append. This
mimics the Sendmail behaviour.
* src/dkim.c (dkim_header_list_end, dkim_header_list_next)
(dkim_header_list_first): New functions.
(dkim_signature_format): Rewrite. Take additional argument crlf.
When set, insert CRLF instead of LF when wrapping.
DKIM: Fix verification in case of wrapped DKIM-Signature * src/builtin/dkim.bi (do_msgmod): When processing
header_replace, first check if the requested header is already
present. If it is, proceed with header insert. Otherwise do
mu_header_append. This mimics the Sendmail behaviour.
* src/dkim.c (dkim_header_list_end, dkim_header_list_next)
(dkim_header_list_first): New functions.
(dkim_signature_format): Rewrite. Take additional argument
crlf. When set, insert CRLF instead of LF when wrapping.
* src/dkim.c: tranlsate lf->crlf before hashing 2020-07-09 Sergey Poznyakoff <gray@gnu.org>
Fix DKIM record parsing to comply to RFC 6376 DKIM: Fix verification in case of wrapped DKIM-Signature
* src/dkim.c (dkim_signature_parse,dnsrec_parse): Allow for FWS * src/dkim.c: tranlsate lf->crlf before hashing
as per RFC 6376, section 3.2
2020-07-09 Sergey Poznyakoff <gray@gnu.org>
Fix DKIM record parsing to comply to RFC 6376
* src/dkim.c (dkim_signature_parse,dnsrec_parse): Allow for FWS
as per RFC 6376, section 3.2
2020-07-07 Sergey Poznyakoff <gray@gnu.org> 2020-07-07 Sergey Poznyakoff <gray@gnu.org>
Fixes in DKIM code Fixes in DKIM code
* lib/dns.c (dkim_lookup): The v= tag is optional.
* src/builtin/dkim.bi (dkim_sign): Insert the created header at
the beginning.
(dkim_verify): Mark with MF_DSEXP.
* src/dkim-canonicalize.c (dkim_canonicalizer): Fix relaxed body
canonicalization: ignore whitespace at the end of the line
(before CRLF).
* src/dkim.c (dkim_str_to_canon_type): Take two arguments.
Return the pointer to the first character after the spec in
*endp. All uses changed.
(dkim_signature_parse): Fix typo (missing else). Fix c= tag
parsing.
(dkim_sig_validate): The q= tag is optional. Fix verification of
the i= tag.
(pubkey_validate): Validate v= tag, if supplied. Fix validation
of the key type and algorithm.
* src/dkim.h (DKIM_KEYRECORD_VERSION): New constant.
2020-07-07 Sergey Poznyakoff <gray@gnu.org>
Remove mudefs.h
2020-07-06 Sergey Poznyakoff <gray@gnu.org>
* lib/dns.c (dkim_lookup): The v= tag is optional. Move mu_stream_shift to GNU mailutils
* src/builtin/dkim.bi (dkim_sign): Insert the created header at
the beginning.
(dkim_verify): Mark with MF_DSEXP.
* src/dkim-canonicalize.c (dkim_canonicalizer): Fix relaxed body
canonicalization: ignore whitespace at the end of the line (before
CRLF).
* src/dkim.c (dkim_str_to_canon_type): Take two arguments. Return
the pointer to the first character after the spec in *endp.
All uses changed.
(dkim_signature_parse): Fix typo (missing else).
Fix c= tag parsing.
(dkim_sig_validate): The q= tag is optional.
Fix verification of the i= tag.
(pubkey_validate): Validate v= tag, if supplied.
Fix validation of the key type and algorithm.
* src/dkim.h (DKIM_KEYRECORD_VERSION): New constant.
Remove mudefs.h This partially reverts 7049008599. The function itself, which
had been introduced in anticipation of its possible use in DKIM
module, was never actually used.
2020-07-06 Sergey Poznyakoff <gray@gnu.org> 2020-07-06 Sergey Poznyakoff <gray@gnu.org>
Move mu_stream_shift to GNU mailutils Implement DKIM verification
This partially reverts 7049008599. The function itself, which had * lib/dns.c (dkim_lookup): New function.
been introduced in anticipation of its possible use in DKIM module, * lib/dns.h (dkim_lookup): New proto.
was never actually used. * mflib/status.mf (DKIM_VERIFY_OK, DKIM_VERIFY_PERMFAIL)
(DKIM_VERIFY_TEMPFAIL): New constants.
Implement DKIM verification * src/builtin/dkim.bi (msgmod_data) <h_list>: New member.
(do_msgmod): Ignore modification commands that affect headers
* lib/dns.c (dkim_lookup): New function. not listed in h=.
* lib/dns.h (dkim_lookup): New proto. (dkim_sign): Initialize v, a, and q members of struct
* mflib/status.mf (DKIM_VERIFY_OK, DKIM_VERIFY_PERMFAIL) dkim_signature.
(DKIM_VERIFY_TEMPFAIL): New constants. (dkim_explanation_code, dkim_explanation): New MFL variables.
* src/builtin/dkim.bi (msgmod_data) <h_list>: New member. (dkim_verify): New function.
(do_msgmod): Ignore modification commands that affect headers * src/dkim.c (pubkey_from_base64): New function.
not listed in h=. (dkim_header_list_match): New function.
(dkim_sign): Initialize v, a, and q members of (dkim_signature_format): Format new members of the struct
struct dkim_signature. dkim_signature.
(dkim_explanation_code, dkim_explanation): New MFL variables. (dkim_signature_free): New function.
(dkim_verify): New function. (dkim_signature_parse): New function.
* src/dkim.c (pubkey_from_base64): New function. (dkim_hash): New function.
(dkim_header_list_match): New function. (mfd_dkim_sign): Rewrite using dkim_hash.
(dkim_signature_format): Format new members of the struct dkim_signature. (dkim_explanation_str)
(dkim_signature_free): New function. (dkim_result_trans): New globals.
(dkim_signature_parse): New function. (mfd_dkim_verify): New function.
(dkim_hash): New function. * src/dkim.h (dkim_header_list_match): New proto.
(mfd_dkim_sign): Rewrite using dkim_hash. (mfd_dkim_verify): New proto.
(dkim_explanation_str) (DKIM_VERSION,DKIM_SIGNATURE_HEADER)
(dkim_result_trans): New globals. (DKIM_QUERY_METHOD,DKIM_ALGORITHM): New constants.
(mfd_dkim_verify): New function. (dkim_signature) <a,q,v>: New members.
* src/dkim.h (dkim_header_list_match): New proto. (DKIM_EXPL_*): New constants.
(mfd_dkim_verify): New proto. (DKIM_VERIFY_*): New constants.
(DKIM_VERSION,DKIM_SIGNATURE_HEADER) (dkim_explanation_str, dkim_result_trans): New externs.
(DKIM_QUERY_METHOD,DKIM_ALGORITHM): New constants.
(dkim_signature) <a,q,v>: New members.
(DKIM_EXPL_*): New constants.
(DKIM_VERIFY_*): New constants.
(dkim_explanation_str, dkim_result_trans): New externs.
* NEWS: Document changes. * NEWS: Document changes.
* doc/functions.texi: Likewise. * doc/functions.texi: Likewise.
2020-07-04 Sergey Poznyakoff <gray@gnu.org> 2020-07-04 Sergey Poznyakoff <gray@gnu.org>
dkim: take into account changes applied by MMQ dkim: take into account changes applied by MMQ
* mflib/status.mf (e_badmmq): New exception: MMQ incompatible with * mflib/status.mf (e_badmmq): New exception: MMQ incompatible
the signing function (currently for dkim_sign). with the signing function (currently for dkim_sign).
* src/builtin/dkim.bi (dkim_sign): Apply MMQ to the temporary message * src/builtin/dkim.bi (dkim_sign): Apply MMQ to the temporary
prior to calling mfd_dkim_sign. message prior to calling mfd_dkim_sign.
* src/mailfromd.h (env_msgmod_apply): Change the return type. * src/mailfromd.h (env_msgmod_apply): Change the return type.
* src/prog.c (env_msgmod_apply): Return int code from mu_list_foreach. * src/prog.c (env_msgmod_apply): Return int code from
* src/dkim.c (mfd_dkim_sign): Fix the type of the c auto. mu_list_foreach.
* src/dkim.c (mfd_dkim_sign): Fix the type of the c auto.
2020-07-03 Sergey Poznyakoff <gray@gnu.org> 2020-07-03 Sergey Poznyakoff <gray@gnu.org>
Move MMQ from milter context to program evaluation environment. Move MMQ from milter context to program evaluation environment.
* src/engine.c: (message_data): Remove mmq. Use env_msgmod functions * src/engine.c: (message_data): Remove mmq. Use env_msgmod
to access it. All uses updated. functions to access it. All uses updated.
(ctx_msgmod): Removed. (ctx_msgmod): Removed.
(priv_store_msgmod_closure): Removed. (priv_store_msgmod_closure): Removed.
(mlfi_eom): Use env_msgmod_count to check the size of the message (mlfi_eom): Use env_msgmod_count to check the size of the
modification queue and env_msgmod_apply to apply it. message modification queue and env_msgmod_apply to apply it.
* src/mailfromd.h (env_msgmod): Rename to env_msgmod_append. * src/mailfromd.h (env_msgmod): Rename to env_msgmod_append.
(env_clear_msgmod): Rename to env_msgmod_clear. (env_clear_msgmod): Rename to env_msgmod_clear.
(env_msgmod_apply): New proto. (env_msgmod_apply): New proto.
* src/prog.c (ENVF_MSGMOD): Remove. * src/prog.c (ENVF_MSGMOD): Remove.
(eval_environ) <flags,mmq>: Remove. (eval_environ) <flags,mmq>: Remove.
(instr_result): Use env_msgmod_count to chech for mmq size. (instr_result): Use env_msgmod_count to chech for mmq size.
(env_clear_msgmod): Rewrite and rename to env_msgmod_clear. (env_clear_msgmod): Rewrite and rename to env_msgmod_clear.
(env_msgmod): Rewrite and rename to env_msgmod_append. (env_msgmod): Rewrite and rename to env_msgmod_append.
(env_msgmod_count): New function. (env_msgmod_count): New function.
(destroy_environment): Destroy env->mmq (destroy_environment): Destroy env->mmq
2020-07-02 Sergey Poznyakoff <gray@gnu.org> 2020-07-02 Sergey Poznyakoff <gray@gnu.org>
Remove header_delete_nth and header_replace_nth. Remove header_delete_nth and header_replace_nth.
Both functions were unable to do their work properly, due to the Both functions were unable to do their work properly, due to the
deficiences of the Milter API. deficiences of the Milter API.
Rewrite header_rename, header_prefix_all and header_prefix_pattern. Rewrite header_rename, header_prefix_all and
header_prefix_pattern.
* NEWS: Update. * NEWS: Update.
* doc/functions.texi: Update discussion of header modification * doc/functions.texi: Update discussion of header modification
functions. functions.
* mflib/header_rename.mf4: Rewrite. * mflib/header_rename.mf4: Rewrite.
* src/builtin/header.bi (header_delete_nth) * src/builtin/header.bi (header_delete_nth)
(header_replace_nth): Remove. (header_replace_nth): Remove.
* src/builtin/vars.bi (sendmail_header_count): Remove. * src/builtin/vars.bi (sendmail_header_count): Remove.
(get_sendmail_header_count,set_sendmail_header_count): Remove. (get_sendmail_header_count,set_sendmail_header_count): Remove.
* src/engine.c (message_data): Remove members: hdrtrans, hdrcount. * src/engine.c (message_data): Remove members: hdrtrans,
All uses changed. hdrcount. All uses changed.
(md_hdrtrans_fill,md_hdrtrans): Remove. (md_hdrtrans_fill,md_hdrtrans): Remove.
* src/mailfromd.h (header_delete_nth,header_replace_nth): Remove. * src/mailfromd.h (header_delete_nth,header_replace_nth):
All uses changed. Remove. All uses changed.
2020-06-30 Sergey Poznyakoff <gray@gnu.org> 2020-06-30 Sergey Poznyakoff <gray@gnu.org>
Fix typos Fix typos
2020-05-29 Sergey Poznyakoff <gray@gnu.org> 2020-05-29 Sergey Poznyakoff <gray@gnu.org>
New function: mfd_temp_stream_shift New function: mfd_temp_stream_shift
Shifts the contents of temporary stream between two offsets. Shifts the contents of temporary stream between two offsets.
* lib/Makefile.am: Add new sources. * lib/Makefile.am: Add new sources.
* lib/libmf.h (mfd_temp_stream_shift): New proto. * lib/libmf.h (mfd_temp_stream_shift): New proto.
* lib/mudefs.h (MUREF): Remove. * lib/mudefs.h (MUREF): Remove. Define _MFD_USE_STREAM_SHIFT
Define _MFD_USE_STREAM_SHIFT depending on mailutils version. depending on mailutils version.
* lib/mustrmshift.c: New file. * lib/mustrmshift.c: New file.
* lib/streamshift.c: New file. * lib/streamshift.c: New file.
* src/Makefile.am (AM_CPPFLAGS) [NETTLE_COND]: Define WITH_DKIM. * src/Makefile.am (AM_CPPFLAGS) [NETTLE_COND]: Define WITH_DKIM.
* src/main.c (mailfromd_show_defaults): Reveal whether DKIM is supported. * src/main.c (mailfromd_show_defaults): Reveal whether DKIM is
supported.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Likewise. * tests/Makefile.am: Add new tests.
* tests/resolv.c: Fix formatting. * tests/testsuite.at: Likewise.
* tests/streamshift.at: New file. * tests/resolv.c: Fix formatting.
* tests/streamshift.c: New file. * tests/streamshift.at: New file.
* tests/.gitignore: Update. * tests/streamshift.c: New file.
* tests/.gitignore: Update.
2020-05-26 Sergey Poznyakoff <gray@gnu.org> 2020-05-26 Sergey Poznyakoff <gray@gnu.org>
Implementation of DKIM signing Implementation of DKIM signing
* configure.ac: Detect presence of nettle libraries. * configure.ac: Detect presence of nettle libraries.
* src/Makefile.am: Add new sources. * src/Makefile.am: Add new sources.
* src/dkim-canonicalize.c: New file. * src/dkim-canonicalize.c: New file.
* src/dkim.c: New file. * src/dkim.c: New file.
* src/dkim.h: New file. * src/dkim.h: New file.
* src/builtin/Makefile.am: Add new sources. * src/builtin/Makefile.am: Add new sources.
* src/builtin/body.bi (current_message): Rewrite as a simple * src/builtin/body.bi (current_message): Rewrite as a simple
wrapper over bi_get_current_message. wrapper over bi_get_current_message.
* src/builtin/dkim.bi: New file. * src/builtin/dkim.bi: New file.
* src/builtin/msg.bi (bi_get_current_message): Optionally return * src/builtin/msg.bi (bi_get_current_message): Optionally return
the message itself. the message itself.
* src/builtin/msg.h (bi_get_current_message(: Change signature. * src/builtin/msg.h (bi_get_current_message(: Change signature.
* src/builtin/snarf.m4 (env_get_stream): Fix quoting. * src/builtin/snarf.m4 (env_get_stream): Fix quoting.
* NEWS: Document changes. * NEWS: Document changes.
* doc/functions.texi: Document the dkim_sign function * doc/functions.texi: Document the dkim_sign function
* doc/mailfromd.texi: Minor changes. * doc/mailfromd.texi: Minor changes.
2019-09-07 Sergey Poznyakoff <gray@gnu.org> 2019-09-07 Sergey Poznyakoff <gray@gnu.org>
Minor fixes Minor fixes
* src/main.c (mf_cfg_param): Remove the surplus "database" * src/main.c (mf_cfg_param): Remove the surplus "database"
section: it is already included in srvcfg.c section: it is already included in srvcfg.c
* src/prog.c (env_register_auto): Use mu_diag_cont_printf to * src/prog.c (env_register_auto): Use mu_diag_cont_printf to
continue diagnostic message without inserting unnecessary continue diagnostic message without inserting unnecessary
<> directives (perhaps should be fixed in mailutils). <> directives (perhaps should be fixed in mailutils).
2019-06-18 Sergey Poznyakoff <gray@gnu.org> 2019-06-18 Sergey Poznyakoff <gray@gnu.org>
Don't accept database types not supported by mailutils Don't accept database types not supported by mailutils
For details, see the last paragraph in: For details, see the last paragraph in:
http://mail.gnu.org.ua/mailman/listarchive/bug-mailfromd/2019-06/msg00001 .html http://mail.gnu.org.ua/mailman/listarchive/bug-mailfromd/2019-06/msg0000 1.html
* configure.ac (db_type_to_feature): Make sure empty string is never * configure.ac (db_type_to_feature): Make sure empty string is
returned. never returned.
2019-01-29 Sergey Poznyakoff <gray@gnu.org> 2019-01-29 Sergey Poznyakoff <gray@gnu.org>
Fixes in runtime memory management Fixes in runtime memory management
* src/builtin/sprintf.bi: Don't use pointer to format: the latter * src/builtin/sprintf.bi: Don't use pointer to format: the
might be reallocated during stack expansions, and the pointer would latter might be reallocated during stack expansions, and the
end up pointing to freed memory area. Another way to fix it would be pointer would end up pointing to freed memory area. Another way
to make env_register_auto and env_pop_auto global and to mark the to fix it would be to make env_register_auto and env_pop_auto
address of pointer with env_register_auto so it would be reallocated global and to mark the address of pointer with env_register_auto
together with format. However, I wouldn't like to expose too much of so it would be reallocated together with format. However, I
the internals of prog.c. wouldn't like to expose too much of the internals of prog.c.
* src/prog.c (env_get_locus) * src/prog.c (env_get_locus)
(heap_obstack_grow,pushs): Fix argument to env_register_auto. (heap_obstack_grow,pushs): Fix argument to env_register_auto.
(env_register_auto): Check if the argument points to a memory (env_register_auto): Check if the argument points to a memory
location within data segment + stack. This is necessary, because location within data segment + stack. This is necessary, because
heap_obstack_grow registers its argument, which at least in one case heap_obstack_grow registers its argument, which at least in one
is a pointer to an automatic variable (see MF_OBSTACK_1GROW in case is a pointer to an automatic variable (see MF_OBSTACK_1GROW
builtin/snarf.m4). in builtin/snarf.m4).
(env_pop_auto,env_unregister_autos) (env_pop_auto,env_unregister_autos)
(env_fixup_autos): Make static. (env_fixup_autos): Make static.
2019-01-29 Sergey Poznyakoff <gray@gnu.org>
Fix in callout Fix in callout
* src/callout.c (reset): Send \r\n after RSET. * src/callout.c (reset): Send \r\n after RSET.
2019-01-24 Sergey Poznyakoff <gray@gnu.org> 2019-01-24 Sergey Poznyakoff <gray@gnu.org>
Minor fixes. Minor fixes.
* doc/mtasim.texi: Fix description of the milter timeout letters. * doc/mtasim.texi: Fix description of the milter timeout
* mtasim/Makefile.am (mtasim_DEPENDENCIES): Depend on libmf and letters.
libgacopyz * mtasim/Makefile.am (mtasim_DEPENDENCIES): Depend on libmf and
libgacopyz
2019-01-03 Sergey Poznyakoff <gray@gnu.org> 2019-01-03 Sergey Poznyakoff <gray@gnu.org>
Version 8.7 Version 8.7
* NEWS: Update.
* configure.ac: Raise minor version.
* doc/functions.texi: Document new functions
Include the implementation of the NS resolving MFL functions, as * NEWS: Update.
proposed by Jan Rafaj * configure.ac: Raise minor version.
* doc/functions.texi: Document new functions
Include the implementation of the NS resolving MFL functions, as
proposed by Jan Rafaj
* lib/dns.c (ns_lookup): New function.
* lib/dns.h (ns_lookup): New proto.
* mflib/dns.mf4 (hasns): New function.
* src/builtin/dns.bi (primitive_hasns, getns): New functions.
* lib/dns.c (ns_lookup): New function. 2019-01-03 Sergey Poznyakoff <gray@gnu.org>
* lib/dns.h (ns_lookup): New proto.
* mflib/dns.mf4 (hasns): New function.
* src/builtin/dns.bi (primitive_hasns, getns): New functions.
Update copyright years Update copyright years
2018-11-09 Sergey Poznyakoff <gray@gnu.org> 2018-11-09 Sergey Poznyakoff <gray@gnu.org>
Document debug categories. Fix improper use of decimal constants instead Document debug categories. Fix improper use of decimal constants
of MU_DEBUG_TRACE identifiers instead of MU_DEBUG_TRACE identifiers
Fix docstring for the "debug" statement in the config-help output. 2018-11-09 Sergey Poznyakoff <gray@gnu.org>
Fix docstring for the "debug" statement in the config-help
output.
2018-11-08 Sergey Poznyakoff <gray@gnu.org> 2018-11-08 Sergey Poznyakoff <gray@gnu.org>
mtasim: don't clobber existing callout socket when used with -Xauto mtasim: don't clobber existing callout socket when used with
-Xauto
* doc/mailfromd.texi: Document the --callout-socket option. * doc/mailfromd.texi: Document the --callout-socket option.
* mtasim/mtasim.c (start_mailfromd): Supply the --callout-socket option. * mtasim/mtasim.c (start_mailfromd): Supply the --callout-socket
* src/main.c: New option --callout-socket option.
* src/main.c: New option --callout-socket
Silently ignore non-existing keys in dbdel 2018-11-08 Sergey Poznyakoff <gray@gnu.org>
* src/builtin/db.bi (dbdel): Treat MU_ERR_NOENT as success. Silently ignore non-existing keys in dbdel
* src/builtin/db.bi (dbdel): Treat MU_ERR_NOENT as success.
2018-11-07 Sergey Poznyakoff <gray@gnu.org> 2018-11-07 Sergey Poznyakoff <gray@gnu.org>
Fix the functionality of the mailfromd --mtasim option Fix the functionality of the mailfromd --mtasim option
This option must discard the effect of the server.listen statement This option must discard the effect of the server.listen
This also fixes mtasim -Xauto statement This also fixes mtasim -Xauto
* src/main.c (mailfromd_options): Process the --mtasim option immediately * src/main.c (mailfromd_options): Process the --mtasim option
. immediately.
2018-11-05 Sergey Poznyakoff <gray@gnu.org> 2018-11-05 Sergey Poznyakoff <gray@gnu.org>
Change generation of debug names for built-in modules Change generation of debug names for built-in modules
* src/builtin/Makefile.am (.bi.c): Don't define SOURCE * src/builtin/Makefile.am (.bi.c): Don't define SOURCE
* src/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Remove. * src/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Remove.
(MF_MODULE_DEBUG_NAME): New macro. (MF_MODULE_DEBUG_NAME): New macro.
(_init_builtin): Use MF_MODULE_DEBUG_NAME (_init_builtin): Use MF_MODULE_DEBUG_NAME
Partially revert "Fix indentation of the generated sources" 2018-11-05 Sergey Poznyakoff <gray@gnu.org>
GNU indent reformats the sources. As a result, preprocessor #line Partially revert "Fix indentation of the generated sources"
directives become misleading.
GNU indent reformats the sources. As a result, preprocessor
#line directives become misleading.
2018-11-04 Sergey Poznyakoff <gray@gnu.org> 2018-11-04 Sergey Poznyakoff <gray@gnu.org>
Fix indentation of the generated sources Fix indentation of the generated sources
* NEWS: Version 8.6.90 * NEWS: Version 8.6.90
* configure.ac: Version 8.6.90 * configure.ac: Version 8.6.90 Check for GNU indent
Check for GNU indent * am/indent.m4: New file.
* am/indent.m4: New file. * src/builtin/Makefile.am (EXTRA_DIST): Add indent.pro
* src/builtin/Makefile.am (EXTRA_DIST): Add indent.pro (.bi.c, .def.h): Use GNU indent if available.
(.bi.c, .def.h): Use GNU indent if available. * src/builtin/indent.pro: New file.
* src/builtin/indent.pro: New file. * src/builtin/snarf.m4: Minor change.
* src/builtin/snarf.m4: Minor change.
2018-11-02 Sergey Poznyakoff <gray@gnu.org>
Revise preprocessor macros for builtin functions.
* doc/mailfromd.texi: Minor change.
* src/builtin/Makefile.am (builtin.h): Depend pn init.m4
(.bi.c): Don't eliminate first #line
* src/builtin/snarf.m4 (MF_BUILTIN_MODULE): New macro.
(MF_INIT): Rewrite. Revise comments.
* src/builtin/init.m4 (MF_BUILTIN_MODULE): New macro.
(MF_INIT): Remove.
* src/builtin/body.bi: Use MF_BUILTIN_MODULE statement.
* src/builtin/burst.bi: Likewise.
* src/builtin/callout.bi: Likewise.
* src/builtin/ctype.bi: Likewise.
* src/builtin/curhdr.bi: Likewise.
* src/builtin/db.bi: Likewise.
* src/builtin/debug.bi: Likewise.
* src/builtin/dns.bi: Likewise.
* src/builtin/dspam.bi: Likewise.
* src/builtin/email.bi: Likewise.
* src/builtin/from.bi: Likewise.
* src/builtin/geoip.bi: Likewise.
* src/builtin/gethostname.bi: Likewise.
* src/builtin/getopt.bi: Likewise.
* src/builtin/getpw.bi: Likewise.
* src/builtin/gettext.bi: Likewise.
* src/builtin/header.bi: Likewise.
* src/builtin/io.bi: Likewise.
* src/builtin/ipaddr.bi: Likewise.
* src/builtin/macro.bi: Likewise.
* src/builtin/mail.bi: Likewise.
* src/builtin/mbox.bi: Likewise.
* src/builtin/mmq.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/builtin/other.bi: Likewise.
* src/builtin/prereq.bi: Likewise.
* src/builtin/progress.bi: Likewise.
* src/builtin/qrnt.bi: Likewise.
* src/builtin/rate.bi: Likewise.
* src/builtin/rcpt.bi: Likewise.
* src/builtin/sa.bi: Likewise.
* src/builtin/sieve.bi: Likewise.
* src/builtin/spf.bi: Likewise.
* src/builtin/sprintf.bi: Likewise.
* src/builtin/string.bi: Likewise.
* src/builtin/syslog.bi: Likewise.
* src/builtin/system.bi: Likewise.
* src/builtin/vars.bi: Likewise.
2018-11-03 Sergey Poznyakoff <gray@gnu.org> 2018-11-03 Sergey Poznyakoff <gray@gnu.org>
Revise preprocessor macros for builtin functions. Minor change
* doc/mailfromd.texi: Minor change. * mflib/callout.mf4 (callout_do): Return true for null return
* src/builtin/Makefile.am (builtin.h): Depend pn init.m4 address.
(.bi.c): Don't eliminate first #line
* src/builtin/snarf.m4 (MF_BUILTIN_MODULE): New macro.
(MF_INIT): Rewrite.
Revise comments.
* src/builtin/init.m4 (MF_BUILTIN_MODULE): New macro.
(MF_INIT): Remove.
* src/builtin/body.bi: Use MF_BUILTIN_MODULE statement.
* src/builtin/burst.bi: Likewise.
* src/builtin/callout.bi: Likewise.
* src/builtin/ctype.bi: Likewise.
* src/builtin/curhdr.bi: Likewise.
* src/builtin/db.bi: Likewise.
* src/builtin/debug.bi: Likewise.
* src/builtin/dns.bi: Likewise.
* src/builtin/dspam.bi: Likewise.
* src/builtin/email.bi: Likewise.
* src/builtin/from.bi: Likewise.
* src/builtin/geoip.bi: Likewise.
* src/builtin/gethostname.bi: Likewise.
* src/builtin/getopt.bi: Likewise.
* src/builtin/getpw.bi: Likewise.
* src/builtin/gettext.bi: Likewise.
* src/builtin/header.bi: Likewise.
* src/builtin/io.bi: Likewise.
* src/builtin/ipaddr.bi: Likewise.
* src/builtin/macro.bi: Likewise.
* src/builtin/mail.bi: Likewise.
* src/builtin/mbox.bi: Likewise.
* src/builtin/mmq.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/builtin/other.bi: Likewise.
* src/builtin/prereq.bi: Likewise.
* src/builtin/progress.bi: Likewise.
* src/builtin/qrnt.bi: Likewise.
* src/builtin/rate.bi: Likewise.
* src/builtin/rcpt.bi: Likewise.
* src/builtin/sa.bi: Likewise.
* src/builtin/sieve.bi: Likewise.
* src/builtin/spf.bi: Likewise.
* src/builtin/sprintf.bi: Likewise.
* src/builtin/string.bi: Likewise.
* src/builtin/syslog.bi: Likewise.
* src/builtin/system.bi: Likewise.
* src/builtin/vars.bi: Likewise.
Minor change 2018-11-01 Sergey Poznyakoff <gray@gnu.org>
* mflib/callout.mf4 (callout_do): Return true for null return address. Quote arguments in the callout transactions in poll
2018-11-01 Sergey Poznyakoff <gray@gnu.org> 2018-11-01 Sergey Poznyakoff <gray@gnu.org>
Quote arguments in the callout transactions in poll Minor fixes in the docs
Minor fixes in the docs 2018-11-01 Sergey Poznyakoff <gray@gnu.org>
Avoid spurious warnings from libadns Avoid spurious warnings from libadns
* tests/resolv_a.at: Always pass -f option to resolv to * tests/resolv_a.at: Always pass -f option to resolv to prevent
prevent eventual "unknown option" messages from libadns. eventual "unknown option" messages from libadns.
2018-10-26 Sergey Poznyakoff <gray@gnu.org> 2018-10-26 Sergey Poznyakoff <gray@gnu.org>
Bugfix Bugfix
* lib/dns.c (dns_str_is_ipv4): Don't tolerate whitespace and * lib/dns.c (dns_str_is_ipv4): Don't tolerate whitespace and
extra dots. extra dots.
2018-07-24 Sergey Poznyakoff <gray@gnu.org> 2018-07-24 Sergey Poznyakoff <gray@gnu.org>
configure: accept any DBM type supported by mailutils as the default impl configure: accept any DBM type supported by mailutils as the
ementation default implementation
* NEWS: Version 8.6 * NEWS: Version 8.6
* configure.ac: New configure option --with-dbm * configure.ac: New configure option --with-dbm
* doc/mailfromd.texi: Update. * doc/mailfromd.texi: Update.
* doc/upgrade.texi: Update. * doc/upgrade.texi: Update.
Reword copyright statement in accordance with the GFDL addendum 2018-07-23 Sergey Poznyakoff <gray@gnu.org>
This pacifies lintian. Reword copyright statement in accordance with the GFDL addendum
Bugfixes This pacifies lintian.
* elisp/mfl-mode.el: Fix byte-compilation. 2018-07-23 Sergey Poznyakoff <gray@gnu.org>
* git2chg.awk: Ignore git-svn-id:
* src/pp.c (pp_extrn_shutdown): Report errors.
2018-07-24 Sergey Poznyakoff <gray@gnu.org.ua> Bugfixes
Version 8.5 * elisp/mfl-mode.el: Fix byte-compilation.
* git2chg.awk: Ignore git-svn-id:
* src/pp.c (pp_extrn_shutdown): Report errors.
Update copyright years 2018-04-13 Sergey Poznyakoff <gray@gnu.org.ua>
Version 8.5
2018-04-13 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright years
2018-04-13 Sergey Poznyakoff <gray@gnu.org.ua>
Ensure proper integer promotion in vm. Ensure proper integer promotion in vm.
* src/prog.c (pushn): New function. * src/prog.c (pushn): New function. Use pushn wherever a numeric
Use pushn wherever a numeric or boolean return type is required. or boolean return type is required.
* src/prog.h (mf_c_cast): Minor change. * src/prog.h (mf_c_cast): Minor change.
2018-03-23 Sergey Poznyakoff <gray@gnu.org> 2018-03-23 Sergey Poznyakoff <gray@gnu.org>
Fix dns_resolve_ipstr Fix dns_resolve_ipstr
* lib/dns.c (dns_resolve_ipstr): Select rrtype depending on the * lib/dns.c (dns_resolve_ipstr): Select rrtype depending on the
domain in question. This should produce the same results as it was domain in question. This should produce the same results as it
in the previous res_query implementation, which queried for T_ANY was in the previous res_query implementation, which queried for
and selected the first RR type returned. T_ANY and selected the first RR type returned.
2017-11-21 Sergey Poznyakoff <gray@gnu.org> 2017-11-21 Sergey Poznyakoff <gray@gnu.org>
Ensure case-insensitive comparison of SPF record marker. Ensure case-insensitive comparison of SPF record marker.
* lib/dns.c (spf_lookup): ignore case when looking for v=spf1 * lib/dns.c (spf_lookup): ignore case when looking for v=spf1
Normalize inclusion of mailutils headers 2017-11-21 Sergey Poznyakoff <gray@gnu.org>
Normalize inclusion of mailutils headers
2017-11-20 Sergey Poznyakoff <gray@gnu.org.ua> 2017-11-20 Sergey Poznyakoff <gray@gnu.org.ua>
Concatenate segments of a TXT record. Concatenate segments of a TXT record.
* lib/dns.c (txt_lookup): Concatenate multiple ans->rrs.manyistr. * lib/dns.c (txt_lookup): Concatenate multiple
ans->rrs.manyistr.
Fix resolving of queries containing invalid characters 2017-11-20 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/dns.c (DEFAULT_QFLAGS): Add adns_qf_quoteok_query Fix resolving of queries containing invalid characters
* lib/dns.c (DEFAULT_QFLAGS): Add adns_qf_quoteok_query
2017-11-03 Sergey Poznyakoff <gray@gnu.org> 2017-11-03 Sergey Poznyakoff <gray@gnu.org>
Version 8.4 Version 8.4
* NEWS: Update. * NEWS: Update.
* configure.ac: Update. * configure.ac: Update.
* doc/upgrade.texi: Update. * doc/upgrade.texi: Update.
2017-11-02 Sergey Poznyakoff <gray@gnu.org> 2017-11-02 Sergey Poznyakoff <gray@gnu.org>
Bugfix Bugfix
* lib/srvman.c: Use mu_sys_sockaddr_to_astr * lib/srvman.c: Use mu_sys_sockaddr_to_astr
* configure.ac: Require mailutils 3.4 * configure.ac: Require mailutils 3.4
2017-11-02 Sergey Poznyakoff <gray@gnu.org.ua> 2017-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
Version 8.3 Version 8.3
Update documentation 2017-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
calloutd: implement the --resolv-conf-file option Update documentation
Remove cover requirement from doc license text 2017-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
Documentation and configuration changes calloutd: implement the --resolv-conf-file option
* configure.ac: Remove leftover checks for libresolv. 2017-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/upgrade.texi: Document recent changes.
Remove cover requirement from doc license text
2017-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
Documentation and configuration changes
* configure.ac: Remove leftover checks for libresolv.
* doc/upgrade.texi: Document recent changes.
2017-11-01 Sergey Poznyakoff <gray@gnu.org.ua> 2017-11-01 Sergey Poznyakoff <gray@gnu.org.ua>
Improve ADNS return status handling. Improve ADNS return status handling.
* lib/dns.c (adns_to_dns_status): Rewrite. * lib/dns.c (adns_to_dns_status): Rewrite.
2017-10-25 Sergey Poznyakoff <gray@gnu.org.ua> 2017-10-25 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs. Version 8.2.91 Update docs. Version 8.2.91
2017-10-25 Sergey Poznyakoff <gray@gnu.org> 2017-10-25 Sergey Poznyakoff <gray@gnu.org>
Change the rc suffix to mf in test scripts. Change the rc suffix to mf in test scripts.
That was a leftover from pre-6.0 times. That was a leftover from pre-6.0 times.
2017-10-23 Sergey Poznyakoff <gray@gnu.org> 2017-10-23 Sergey Poznyakoff <gray@gnu.org>
Minor fix Minor fix
2017-10-23 Sergey Poznyakoff <gray@gnu.org.ua> 2017-10-23 Sergey Poznyakoff <gray@gnu.org.ua>
Improve DNS API; rewrite DNS testsuite. Improve DNS API; rewrite DNS testsuite.
* lib/dns.c (dnsbase_real_init): Take configuration text * lib/dns.c (dnsbase_real_init): Take configuration text as
as argument (can be NULL). argument (can be NULL). Enable adns debugging on trace9
Enable adns debugging on trace9 (dnsbase_file_init): New function.
(dnsbase_file_init): New function. (dns_reply_init): New function.
(dns_reply_init): New function. (dns_reply_push): New function.
(dns_reply_push): New function. (soa_check): New function. Rewrite all functions using
(soa_check): New function. dns_reply_init+dns_reply_push, as appropriate.
Rewrite all functions using dns_reply_init+dns_reply_push, as appropriate * lib/dns.h (dns_reply) <maxcount, data.ptr>: New members.
. (dnsbase_real_init, dnsbase_file_init)
* lib/dns.h (dns_reply) <maxcount, data.ptr>: New members. (dns_reply_init, soa_check): New protos.
(dnsbase_real_init, dnsbase_file_init) * src/builtin/dns.bi (resolve_host): Rewrite to return all A
(dns_reply_init, soa_check): New protos. records.
* src/builtin/dns.bi (resolve_host): Rewrite to return all A records. (dns_replies_intersect): New static function.
(dns_replies_intersect): New static function. (primitive_ismx): Rewrite taking into account all A records.
(primitive_ismx): Rewrite taking into account all A records. * src/main.c: New option --resolv-conf-file (mostly for
* src/main.c: New option --resolv-conf-file (mostly for checking. checking.
* tests/resolv.c: Change option handling, implement new options. * tests/resolv.c: Change option handling, implement new options.
* tests/atlocal.in (MF_TOPDOMAIN,MF_NAMESERVER): New variables. * tests/atlocal.in (MF_TOPDOMAIN,MF_NAMESERVER): New variables.
(at_resolv_conf): New function. (at_resolv_conf): New function.
* tests/Makefile.am: Add new tests. * tests/Makefile.am: Add new tests.
* tests/testsuite.at: Include new tests. * tests/testsuite.at: Include new tests.
* tests/hasmx.at: Use dedicated MF test domains, * tests/hasmx.at: Use dedicated MF test domains,
* tests/hostname.at: Likewise. * tests/hostname.at: Likewise.
* tests/ismx.at: Likewise. * tests/ismx.at: Likewise.
* tests/rescname.at: Likewise. * tests/rescname.at: Likewise.
* tests/resolve.at: Likewise. * tests/resolve.at: Likewise.
* tests/resolv_a.at: New test. * tests/resolv_a.at: New test.
* tests/resolv_mx.at: Likewise. * tests/resolv_mx.at: Likewise.
* tests/resolv_ptr.at: Likewise. * tests/resolv_ptr.at: Likewise.
* tests/resolv_ptr_val.at: Likewise. * tests/resolv_ptr_val.at: Likewise.
* tests/resolv_spf.at: Likewise. * tests/resolv_spf.at: Likewise.
* tests/resolv_txt.at: Likewise. * tests/resolv_txt.at: Likewise.
2017-10-21 Sergey Poznyakoff <gray@gnu.org.ua> 2017-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix Bugfix
* lib/dns.c (dns_reply_resolve): Remove unneeded ntohl. * lib/dns.c (dns_reply_resolve): Remove unneeded ntohl.
* src/builtin/dns.bi): Remove unneeded htonl. * src/builtin/dns.bi): Remove unneeded htonl.
2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua> 2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
Improve DNS API consistency Improve DNS API consistency
* lib/dns.c (dns_get_mx_records, getmx, getmxip): Replace * lib/dns.c (dns_get_mx_records, getmx, getmxip): Replace with a
with a single function mx_lookup. All uses updated. single function mx_lookup. All uses updated.
Bugfixes; implement test program for DNS API. 2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/dns.c (ptr_lookup): Reverse IP octets prior to look up. Bugfixes; implement test program for DNS API.
Use adns_r_ptr_raw to disable consistency checks.
(ptr_validate): Return values in struct dns_reply.
All uses changed.
* lib/dns.h (ptr_validate): Change signature.
* tests/resolv.c: New test program. * lib/dns.c (ptr_lookup): Reverse IP octets prior to look up.
* tests/Makefile.am: Add resolv.c Use adns_r_ptr_raw to disable consistency checks.
* tests/.gitignore: Update. (ptr_validate): Return values in struct dns_reply. All uses
changed.
* lib/dns.h (ptr_validate): Change signature.
* tests/resolv.c: New test program.
* tests/Makefile.am: Add resolv.c
* tests/.gitignore: Update.
Drop configure checks for res_ functions 2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
Drop configure checks for res_ functions
2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs
Update docs 2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
Unify DNS reply types.
* lib/dns.h (mxbuf): Remove
(mxbuf_init, mxbuf_free): Remove protos.
(dns_get_mx_records): Remove the maxdepth parameter. Return MX
names in struct dns_reply. All uses changed.
(getmx,getmxip): Return MX names in struct dns_reply. All uses
changed.
2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
Unify DNS reply types. Rewrite base dns functions using adns.
* lib/dns.h (mxbuf): Remove * configure.ac: Require libadns.
(mxbuf_init, mxbuf_free): Remove protos. * lib/dns.c: Rewrite.
(dns_get_mx_records): Remove the maxdepth parameter. Return * lib/dns.h (dns_resolve_ipstr, dns_resolve_hostname): Simplify
MX names in struct dns_reply. All uses changed. parameters.
(getmx,getmxip): Return MX names in struct dns_reply. All uses changed. (dns_reply): Remove max, last_len, and last_max.
Rewrite base dns functions using adns. 2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: Require libadns. Drop ttl tracking from DNS API; drop SPF caching
* lib/dns.c: Rewrite.
* lib/dns.h (dns_resolve_ipstr, dns_resolve_hostname): Simplify
parameters.
(dns_reply): Remove max, last_len, and last_max.
Drop ttl tracking from DNS API; drop SPF caching * lib/dns.c: Remove ttl tracking.
* lib/dns.h: Fix prototypes.
* mflib/spf.mf: Remove caching.
* src/builtin/spf.bi (spf_ttl): Remove variable.
* src/builtin/dns.bi: Update calls to DNS API.
* src/spf.c: Likewise.
* src/spf.h (spf_answer_t): Remove ttl.
* lib/dns.c: Remove ttl tracking. 2017-10-20 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/dns.h: Fix prototypes.
* mflib/spf.mf: Remove caching.
* src/builtin/spf.bi (spf_ttl): Remove variable.
* src/builtin/dns.bi: Update calls to DNS API.
* src/spf.c: Likewise.
* src/spf.h (spf_answer_t): Remove ttl.
Bugfix Bugfix
* lib/dns.c (cname_loop_body): Restore accidentally removed line. * lib/dns.c (cname_loop_body): Restore accidentally removed
line.
2017-10-19 Sergey Poznyakoff <gray@gnu.org.ua> 2017-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
Improve DNS resolver API Improve DNS resolver API
Remove arbitrary size limits. Remove arbitrary size limits.
* NEWS: Version 8.2.90 * NEWS: Version 8.2.90
* configure.ac: Likewise. Require Mailutils 3.3 * configure.ac: Likewise. Require Mailutils 3.3
* doc/calloutd.texi: Update. * doc/calloutd.texi: Update.
* doc/functions.texi: Update. * doc/functions.texi: Update.
* doc/mailfromd.texi: Update. * doc/mailfromd.texi: Update.
* doc/upgrade.texi: Update. * doc/upgrade.texi: Update.
* lib/dns.c: Rewrite.
* lib/dns.h (MAXMXCOUNT, MXF_MAX): Remove.
(mxbuf_init,dns_resolve_ipstr)
(a_lookup,ptr_lookup,txt_lookup)
(spf_lookup): Change protos.
(dns_reply): New struct.
(dns_reply_free,dns_reply_ip): New functions.
* lib/libmf.h (getmxip): Change proto.
* src/builtin/dns.bi: Remove runtime configuration statements:
max-dns-reply-a, max-dns-reply-ptr, and max-dns-reply-mx.
Rewrite using the new DNS API.
* src/callout.c: Update.
* src/mailfromd.h: Update.
* src/main.c: Remove the max-match-mx configuration statement.
* src/prog.c: Update.
* src/spf.c: Update.
* src/spf.h: Update.
* src/srvcfg.c: Remove the max-callout-mx configuration
statement.
2017-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/dns.c: Rewrite. Allocate exception buffer even if status.mf is not required
* lib/dns.h (MAXMXCOUNT, MXF_MAX): Remove.
(mxbuf_init,dns_resolve_ipstr)
(a_lookup,ptr_lookup,txt_lookup)
(spf_lookup): Change protos.
(dns_reply): New struct.
(dns_reply_free,dns_reply_ip): New functions.
* lib/libmf.h (getmxip): Change proto.
* src/builtin/dns.bi: Remove runtime configuration statements:
max-dns-reply-a, max-dns-reply-ptr, and max-dns-reply-mx. Rewrite using
the new DNS API.
* src/callout.c: Update.
* src/mailfromd.h: Update.
* src/main.c: Remove the max-match-mx configuration statement.
* src/prog.c: Update.
* src/spf.c: Update.
* src/spf.h: Update.
* src/srvcfg.c: Remove the max-callout-mx configuration statement.
Allocate exception buffer even if status.mf is not required
This fixes coredumps caused by calls to MF_THROW from built-in functions
in scripts without the 'require status' statement.
* src/exclist.c (fixup_exceptions): New function
* src/mailfromd.h (fixup_exceptions): New proto.
* src/gram.y: Call fixup_exceptions before setting up dataseg.
Require mailutils 3.3 This fixes coredumps caused by calls to MF_THROW from built-in
functions in scripts without the 'require status' statement.
* src/exclist.c (fixup_exceptions): New function
* src/mailfromd.h (fixup_exceptions): New proto.
* src/gram.y: Call fixup_exceptions before setting up dataseg.
2017-10-19 Sergey Poznyakoff <gray@gnu.org.ua>
Require mailutils 3.3
2017-10-18 Sergey Poznyakoff <gray@gnu.org.ua> 2017-10-18 Sergey Poznyakoff <gray@gnu.org.ua>
Version 8.2 Version 8.2
2017-06-18 Sergey Poznyakoff <gray@gnu.org> 2017-06-18 Sergey Poznyakoff <gray@gnu.org>
Minor fix Minor fix
* src/gram.y (free_node): Deinit locus * src/gram.y (free_node): Deinit locus
Switch to detailed source locations from Mailutils 3.2.92 2017-06-18 Sergey Poznyakoff <gray@gnu.org>
* configure.ac: Version 8.1.92 Switch to detailed source locations from Mailutils 3.2.92
* NEWS: Update.
* src/builtin/debug.bi (debug): Use mu_locus_range
* src/builtin/from.bi: Likewise.
* src/builtin/header.bi: Likewise.
* src/builtin/progress.bi: Likewise.
* src/builtin/qrnt.bi: Likewise.
* src/builtin/rcpt.bi: Likewise.
* src/exclist.c: Likewise.
* src/builtin/sieve.bi: Use mu_locus_range
(sieve): Accept new optional argument "col".
* src/drivers.c: Use mu_locus_range
(MARK_LOCUS): Rewrite as inline function.
* src/gram.y: Use mu_locus_range and location macros from mailutils/yyloc
.h
Improve error diagnostics
(parse_program): Prepare mu_strerr for locus-aware diagnostics.
* src/lex.l: Use mu_linetrack_t to track locations.
* src/mailfromd.h: Use mu_locus_range
* src/main.c: Likewise.
* src/pp.c: Likewise.
* src/prog.c: Likewise.
* src/prog.h: Likewise.
* src/symbols.c: Likewise.
* tests/ashadow.at: Expect detailed error locations. * configure.ac: Version 8.1.92
* tests/bctx00.at: Likewise. * NEWS: Update.
* tests/fctx00.at: Likewise. * src/builtin/debug.bi (debug): Use mu_locus_range
* tests/invcidr.at: Likewise. * src/builtin/from.bi: Likewise.
* tests/invcidr2.at: Likewise. * src/builtin/header.bi: Likewise.
* tests/module04.at: Likewise. * src/builtin/progress.bi: Likewise.
* tests/module06.at: Likewise. * src/builtin/qrnt.bi: Likewise.
* tests/poll04.at: Likewise. * src/builtin/rcpt.bi: Likewise.
* tests/setvar.at: Likewise. * src/exclist.c: Likewise.
* tests/shadow.at: Likewise. * src/builtin/sieve.bi: Use mu_locus_range
* tests/static02.at: Likewise. (sieve): Accept new optional argument "col".
* src/drivers.c: Use mu_locus_range
(MARK_LOCUS): Rewrite as inline function.
* src/gram.y: Use mu_locus_range and location macros from
mailutils/yyloc.h Improve error diagnostics
(parse_program): Prepare mu_strerr for locus-aware diagnostics.
* src/lex.l: Use mu_linetrack_t to track locations.
* src/mailfromd.h: Use mu_locus_range
* src/main.c: Likewise.
* src/pp.c: Likewise.
* src/prog.c: Likewise.
* src/prog.h: Likewise.
* src/symbols.c: Likewise.
* tests/ashadow.at: Expect detailed error locations.
* tests/bctx00.at: Likewise.
* tests/fctx00.at: Likewise.
* tests/invcidr.at: Likewise.
* tests/invcidr2.at: Likewise.
* tests/module04.at: Likewise.
* tests/module06.at: Likewise.
* tests/poll04.at: Likewise.
* tests/setvar.at: Likewise.
* tests/shadow.at: Likewise.
* tests/static02.at: Likewise.
Minor fixes. 2017-06-18 Sergey Poznyakoff <gray@gnu.org>
* gacopyz/context.c (gacopyz_setmlreply_va): Return meaningful code. Minor fixes.
(gacopyz_setmlreply_v): Likewise.
* lib/db.c (db_compact): Fix improper use of uninitialized value. * gacopyz/context.c (gacopyz_setmlreply_va): Return meaningful
* lib/userprivs.c (mf_gid_list_free): Fix loop. code.
* mtasim/mtasim.c (smtp_mail): Remove unused variable. (gacopyz_setmlreply_v): Likewise.
* src/calloutd.c (main): Likewise. * lib/db.c (db_compact): Fix improper use of uninitialized
* src/savsrv.c (callout_session_server): Likewise. value.
* lib/userprivs.c (mf_gid_list_free): Fix loop.
* mtasim/mtasim.c (smtp_mail): Remove unused variable.
* src/calloutd.c (main): Likewise.
* src/savsrv.c (callout_session_server): Likewise.
2017-04-14 Sergey Poznyakoff <gray@gnu.org.ua> 2017-04-14 Sergey Poznyakoff <gray@gnu.org.ua>
Fix typo in docs. Fix typo in docs.
2017-04-09 Sergey Poznyakoff <gray@gnu.org> 2017-04-09 Sergey Poznyakoff <gray@gnu.org>
Version 8.1.90 Version 8.1.90
2017-03-06 Sergey Poznyakoff <gray@gnu.org> 2017-03-06 Sergey Poznyakoff <gray@gnu.org>
Fix compiler message Fix compiler message
2017-03-04 Sergey Poznyakoff <gray@gnu.org> 2017-03-04 Sergey Poznyakoff <gray@gnu.org>
Minor fix Minor fix
* lib/dns.c (cnameloop): Ignore trailing dot
* lib/dns.c (cnameloop): Ignore trailing dot 2017-03-04 Sergey Poznyakoff <gray@gnu.org>
Fix syntax table in mfl-mode Fix syntax table in mfl-mode
* elisp/mfl-mode.el: Declare _ as part of word * elisp/mfl-mode.el: Declare _ as part of word
2017-01-21 Sergey Poznyakoff <gray@gnu.org> 2017-01-21 Sergey Poznyakoff <gray@gnu.org>
mtasim: code cleanup mtasim: code cleanup
* mtasim/mtasim.c (argcv_split, argcv_free): Remove. * mtasim/mtasim.c (argcv_split, argcv_free): Remove.
(parse_email_addr): Use mu_alloc. (parse_email_addr): Use mu_alloc.
(check_address_command): Rewrite. (check_address_command): Rewrite.
(smtp_mail): New function. (smtp_mail): New function.
(smtp_rcpt): Update. (smtp_rcpt): Update.
(smtp): Use mu_wordsplit. (smtp): Use mu_wordsplit.
2017-01-02 Sergey Poznyakoff <gray@gnu.org> 2017-01-02 Sergey Poznyakoff <gray@gnu.org>
Use new assoc array API (MU commit 622bc770) Use new assoc array API (MU commit 622bc770)
* lib/dict.c (name_destroy): Remove * lib/dict.c (name_destroy): Remove
(dict_init): Use new API (dict_init): Use new API
(dict_install,dict_getsym): Likewise. (dict_install,dict_getsym): Likewise.
2017-01-02 Sergey Poznyakoff <gray@gnu.org>
Happy GNU Year Happy GNU Year
2016-12-20 Sergey Poznyakoff <gray@gnu.org.ua> 2016-12-20 Sergey Poznyakoff <gray@gnu.org.ua>
Improve Sieve interface Improve Sieve interface
* src/builtin/sieve.bi: Initialize Sieve environment * src/builtin/sieve.bi: Initialize Sieve environment
* doc/functions.texi: Document changes. * doc/functions.texi: Document changes.
2016-12-13 Sergey Poznyakoff <gray@gnu.org.ua> 2016-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
Version 8.1 Version 8.1
2016-12-12 Sergey Poznyakoff <gray@gnu.org.ua> 2016-12-12 Sergey Poznyakoff <gray@gnu.org.ua>
Use new Sieve API Use new Sieve API
* src/builtin/sieve.bi: Change to use new Sieve API * src/builtin/sieve.bi: Change to use new Sieve API
* configure.ac: Version 8.0.90. Require MU 3.0.90 * configure.ac: Version 8.0.90. Require MU 3.0.90
* NEWS: Update. * NEWS: Update.
2016-12-08 Sergey Poznyakoff <gray@gnu.org.ua> 2016-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd
2016-12-08 Sergey Poznyakoff <gray@gnu.org> 2016-12-08 Sergey Poznyakoff <gray@gnu.org>
Fix typo Fix typo
2016-12-08 Sergey Poznyakoff <gray@gnu.org>
Ensure proper type conversion when coding immediate values. Ensure proper type conversion when coding immediate values.
* src/prog.h (mf_c_cast): New define. * src/prog.h (mf_c_cast): New define.
(code_put, code_immediate): New macros. (code_put, code_immediate): New macros.
* src/prog.c (code_immediate): Rename to code_immediat_stkval. * src/prog.c (code_immediate): Rename to code_immediat_stkval.
(code_put): Rename to code_put_stkval. (code_put): Rename to code_put_stkval.
* src/drivers.c: Use typed calls to code_immediate and code_put * src/drivers.c: Use typed calls to code_immediate and code_put
* src/gram.y: Likewise. * src/gram.y: Likewise.
* src/main.c: Allocate mu_log_tag. * src/main.c: Allocate mu_log_tag.
2016-12-08 Sergey Poznyakoff <gray@gnu.org.ua> 2016-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes Bugfixes
* lib/mfgetopt.c (mf_getopt): Initialize cfhint.flags * lib/mfgetopt.c (mf_getopt): Initialize cfhint.flags
* src/symbols.c (free_symbols): Free buckets after freeing * src/symbols.c (free_symbols): Free buckets after freeing
everything else. everything else.
2016-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix Minor fix
* lib/dns.c: Use stat.res_h_errno instead of the global h_errno. * lib/dns.c: Use stat.res_h_errno instead of the global h_errno.
2016-11-09 Sergey Poznyakoff <gray@gnu.org> 2016-11-09 Sergey Poznyakoff <gray@gnu.org>
Version 8.0 Version 8.0
Minor fixes 2016-11-09 Sergey Poznyakoff <gray@gnu.org>
Minor fixes
Update docs 2016-11-09 Sergey Poznyakoff <gray@gnu.org>
Update docs Update docs
* doc/mailfromd.texi: Document the single configuration file. 2016-11-09 Sergey Poznyakoff <gray@gnu.org>
* doc/calloutd.texi: Update.
* doc/mfdbtool.texi: Update. Update docs
* doc/pmult.texi: Update.
* pmult/pmult.c: Use the common configuration file. Support * doc/mailfromd.texi: Document the single configuration file.
database-related configuration statements for compatibility with * doc/calloutd.texi: Update.
other mailfromd utilities. * doc/mfdbtool.texi: Update.
* src/mfdbtool.c: compatibility fix: --predict implies --list. * doc/pmult.texi: Update.
* pmult/pmult.c: Use the common configuration file. Support
database-related configuration statements for compatibility with
other mailfromd utilities.
* src/mfdbtool.c: compatibility fix: --predict implies --list.
2016-11-08 Sergey Poznyakoff <gray@gnu.org> 2016-11-08 Sergey Poznyakoff <gray@gnu.org>
Use single configuration file. Use single configuration file.
* lib/libmf.h (MF_GETOPT_DEFAULT) * lib/libmf.h (MF_GETOPT_DEFAULT)
(MF_GETOPT_IN_ORDER,MF_GETOPT_NO_CONFIG): New flags. (MF_GETOPT_IN_ORDER,MF_GETOPT_NO_CONFIG): New flags.
(mf_getopt): Change signature. (mf_getopt): Change signature.
* lib/mfgetopt.c (mf_getopt): Remove the cfile parameter. * lib/mfgetopt.c (mf_getopt): Remove the cfile parameter. Change
Change semantics of the 5th parameter (inorder -> flags). semantics of the 5th parameter (inorder -> flags).
* mtasim/mtasim.c: Change call to mf_getopt. * mtasim/mtasim.c: Change call to mf_getopt.
* pmult/pmult.c: Likewise. * pmult/pmult.c: Likewise.
* src/calloutd.c: Likewise. * src/calloutd.c: Likewise.
* src/main.c: Likewise. * src/main.c: Likewise.
* src/mfdbtool.c: Likewise. * src/mfdbtool.c: Likewise.
2016-11-08 Sergey Poznyakoff <gray@gnu.org.ua> 2016-11-08 Sergey Poznyakoff <gray@gnu.org.ua>
Fix mfdbtool. Fix mfdbtool.
* lib/db.c (mf_database_mode): New global variable. * lib/db.c (mf_database_mode): New global variable.
(mf_dbm_open): Remove "mode" parameter. Use mf_database_mode. (mf_dbm_open): Remove "mode" parameter. Use mf_database_mode.
(db_expire_func): Fix passing the datum size. (db_expire_func): Fix passing the datum size.
(db_compact): Preserve mode and ownership of the database. (db_compact): Preserve mode and ownership of the database.
* lib/dbcfg.c (cb_database_mode): New function. * lib/dbcfg.c (cb_database_mode): New function.
* lib/mfdb.h (mf_database_mode): New extern. * lib/mfdb.h (mf_database_mode): New extern.
(mf_dbm_open): Change signature. (mf_dbm_open): Change signature.
(cb_database_mode): New proto. (cb_database_mode): New proto.
* src/mfdbtool.c (mfdbtool_cfg_param): New statement "database-mode". * src/mfdbtool.c (mfdbtool_cfg_param): New statement
Read configuration from /etc/mailfromd.conf "database-mode". Read configuration from /etc/mailfromd.conf
* src/srvcfg.c (srv_cfg_param): Likewise. * src/srvcfg.c (srv_cfg_param): Likewise.
* lib/cache.c: Update calls to mf_dbm_open. * lib/cache.c: Update calls to mf_dbm_open.
* lib/rate.c: Likewise. * lib/rate.c: Likewise.
* lib/tbf_rate.c: Likewise. * lib/tbf_rate.c: Likewise.
2016-11-08 Sergey Poznyakoff <gray@gnu.org.ua>
mfdbtool: add missing options mfdbtool: add missing options
2016-11-07 Sergey Poznyakoff <gray@gnu.org.ua> 2016-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
Require mailutils 3.0; update documentation Require mailutils 3.0; update documentation
2016-11-02 Sergey Poznyakoff <gray@gnu.org.ua> 2016-11-02 Sergey Poznyakoff <gray@gnu.org.ua>
Follow Mailutils commit dc62b399 Follow Mailutils commit dc62b399
2016-10-31 Sergey Poznyakoff <gray@gnu.org> 2016-10-31 Sergey Poznyakoff <gray@gnu.org>
Bugfixes Bugfixes
* gacopyz/server.c (gacopyz_srv_reply): Return entire * gacopyz/server.c (gacopyz_srv_reply): Return entire buffer.
buffer. * pmult/pmult.c (collect_symlists): Don't attempt to print empty
* pmult/pmult.c (collect_symlists): Don't attempt to print empty client name.
client name. (main): Read mailutils configuration file.
(main): Read mailutils configuration file. * src/srvcfg.c (mfd_capa_server): Don't register srv_cfg_param.
* src/srvcfg.c (mfd_capa_server): Don't register srv_cfg_param. It pertains to canned section.
It pertains to canned section.
2016-10-30 Sergey Poznyakoff <gray@gnu.org> 2016-10-30 Sergey Poznyakoff <gray@gnu.org>
Version 7.99.97 Version 7.99.97
Minor fix 2016-10-30 Sergey Poznyakoff <gray@gnu.org>
* lib/libmf.h: Include limits.h Minor fix
Get rid of obstack; use mu_opool_t instead * lib/libmf.h: Include limits.h
* configure.ac: Remove checks for obstack. 2016-10-30 Sergey Poznyakoff <gray@gnu.org>
Require Mailutils 2.99.993
* lib/Makefile.am: Remove obstack. Get rid of obstack; use mu_opool_t instead
* lib/obstack.c: Delete.
* lib/obstack.h_: Delete. * configure.ac: Remove checks for obstack. Require Mailutils
* po/POTFILES.in: Remove obstack. 2.99.993
* lib/Makefile.am: Remove obstack.
* lib/mfgetopt.c (mf_getopt): Bugfix: initialize flags. * lib/obstack.c: Delete.
* lib/obstack.h_: Delete.
* lib/db.c: Use mu_opool_t instead of obstack. * po/POTFILES.in: Remove obstack.
* mtasim/mtasim.c: Likewise.
* pmult/pmult.c: Likewise. * lib/mfgetopt.c (mf_getopt): Bugfix: initialize flags.
* src/callout.c: Likewise.
* src/callout.h: Likewise. * lib/db.c: Use mu_opool_t instead of obstack.
* src/engine.c: Likewise. * mtasim/mtasim.c: Likewise.
* src/gram.y: Likewise. * pmult/pmult.c: Likewise.
* src/lex.l: Likewise. * src/callout.c: Likewise.
* src/mailfromd.h: Likewise. * src/callout.h: Likewise.
* src/pragma.c: Likewise. * src/engine.c: Likewise.
* src/prog.c: Likewise. * src/gram.y: Likewise.
* src/spf.c: Likewise. * src/lex.l: Likewise.
* src/symbols.c: Likewise. * src/mailfromd.h: Likewise.
* src/pragma.c: Likewise.
* src/prog.c: Likewise.
* src/spf.c: Likewise.
* src/symbols.c: Likewise.
2016-10-29 Sergey Poznyakoff <gray@gnu.org> 2016-10-29 Sergey Poznyakoff <gray@gnu.org>
Minor fixes Minor fixes
2016-10-28 Sergey Poznyakoff <gray@gnu.org> 2016-10-28 Sergey Poznyakoff <gray@gnu.org>
Finish conversion. Version 7.99.96 Finish conversion. Version 7.99.96
2016-10-24 Sergey Poznyakoff <gray@gnu.org> 2016-10-24 Sergey Poznyakoff <gray@gnu.org>
Convert mailfromd to new interface. Convert mailfromd to new interface.
2016-10-24 Sergey Poznyakoff <gray@gnu.org>
Start transition to mu_cli interface Start transition to mu_cli interface
* configure.ac: Require mailutils 2.99.991 * configure.ac: Require mailutils 2.99.991
* src/main.c: Start transition to mu_cli * src/main.c: Start transition to mu_cli
* lib/optcache.c: Remove file. * lib/optcache.c: Remove file.
* lib/Makefile.am (optcache.c): Remove. * lib/Makefile.am (optcache.c): Remove.
* lib/libmf.h: Remove optcache prototypes. * lib/libmf.h: Remove optcache prototypes.
* lib/dbcfg.c: Convert to mu_option. * lib/dbcfg.c: Convert to mu_option.
* lib/utils.c: Likewise. * lib/utils.c: Likewise.
* src/builtin/dns.bi: Likewise. * src/builtin/dns.bi: Likewise.
* src/builtin/io.bi: Likewise. * src/builtin/io.bi: Likewise.
* src/builtin/mbox.bi: Likewise. * src/builtin/mbox.bi: Likewise.
* src/builtin/msg.bi: Likewise. * src/builtin/msg.bi: Likewise.
* src/mfdbtool.c: Likewise. * src/mfdbtool.c: Likewise.
* src/savsrv.c: Likewise. * src/savsrv.c: Likewise.
* src/srvcfg.c: Likewise. * src/srvcfg.c: Likewise.
* src/srvcfg.h: Likewise. * src/srvcfg.h: Likewise.
2016-10-24 Sergey Poznyakoff <gray@gnu.org.ua> 2016-10-24 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes Minor fixes
* lib/dns.c (mf_to_dns_status): New function. * lib/dns.c (mf_to_dns_status): New function.
* lib/libmf.h (mf_to_dns_status): New proto. * lib/libmf.h (mf_to_dns_status): New proto.
* lib/cache.c: Fix conversions. * lib/cache.c: Fix conversions.
* lib/rate.c: Fix conversions. * lib/rate.c: Fix conversions.
* lib/vercmp.c: Fix conversions. * lib/vercmp.c: Fix conversions.
* src/builtin/dns.bi: Fix conversions. * src/builtin/dns.bi: Fix conversions.
* src/builtin/string.bi: Fix conversions. * src/builtin/string.bi: Fix conversions.
* src/drivers.c: Fix conversions. * src/drivers.c: Fix conversions.
* src/exclist.c: Fix conversions. * src/exclist.c: Fix conversions.
* src/main.c: Fix conversions. * src/main.c: Fix conversions.
* src/prog.c: Fix conversions. * src/prog.c: Fix conversions.
* tests/trycatch05.at: Print first field of wc output. * tests/trycatch05.at: Print first field of wc output.
* tests/trycatch06.at: Likewise. * tests/trycatch06.at: Likewise.
* tests/trycatch07.at: Likewise. * tests/trycatch07.at: Likewise.
* tests/trycatch08.at: Likewise. * tests/trycatch08.at: Likewise.
* tests/trycatch09.at: Likewise. * tests/trycatch09.at: Likewise.
* tests/trycatch10.at: Likewise. * tests/trycatch10.at: Likewise.
* tests/trycatch11.at: Likewise. * tests/trycatch11.at: Likewise.
* tests/trycatch12.at: Likewise. * tests/trycatch12.at: Likewise.
* tests/trycatch13.at: Likewise. * tests/trycatch13.at: Likewise.
* tests/trycatch14.at: Likewise. * tests/trycatch14.at: Likewise.
* tests/trycatch15.at: Likewise. * tests/trycatch15.at: Likewise.
* tests/trycatch16.at: Likewise. * tests/trycatch16.at: Likewise.
* tests/version.at: Compatibility fix in sed expression. * tests/version.at: Compatibility fix in sed expression.
2016-08-09 Sergey Poznyakoff <gray@gnu.org.ua> 2016-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes (mostly po-related) Minor changes (mostly po-related)
2016-08-01 Sergey Poznyakoff <gray@gnu.org.ua> 2016-08-01 Sergey Poznyakoff <gray@gnu.org.ua>
Make listen(2) backlog size configurable. Make listen(2) backlog size configurable.
* lib/srvman.c (mfd_server_set_backlog): New function. * lib/srvman.c (mfd_server_set_backlog): New function.
* lib/srvman.h: Likewise. * lib/srvman.h: Likewise.
* src/srvcfg.c (server_section_param): New statement: "backlog" * src/srvcfg.c (server_section_param): New statement: "backlog"
* src/srvcfg.h (mf_srvcfg) <backlog>: New member. * src/srvcfg.h (mf_srvcfg) <backlog>: New member.
* doc/mailfromd.texi: Document the backlog statement. * doc/mailfromd.texi: Document the backlog statement.
* NEWS: Mention the backlog statement. * NEWS: Mention the backlog statement.
2016-07-06 Sergey Poznyakoff <gray@gnu.org.ua> 2016-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
Fix documentation of spf_explanation. Fix documentation of spf_explanation.
Bugfix 2016-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
* gacopyz/server.c (gacopyz_srv_connect): Fix memory allocation error. Bugfix
Handle multiple strings in SPF records. * gacopyz/server.c (gacopyz_srv_connect): Fix memory allocation
error.
* lib/dns.c (cname_loop_body): Concatenate multiple strings of 2016-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
a TXT record (RFC 7208, 3.3)
Handle multiple strings in SPF records.
* lib/dns.c (cname_loop_body): Concatenate multiple strings of a
TXT record (RFC 7208, 3.3)
2016-04-26 Sergey Poznyakoff <gray@gnu.org> 2016-04-26 Sergey Poznyakoff <gray@gnu.org>
Improve previous commit. Improve previous commit.
* src/builtin/spf.bi (update_spf_vars): Add trailing null character. * src/builtin/spf.bi (update_spf_vars): Add trailing null
* src/spf.c (mech_include): Remove any mechanisms saved during character.
call to spf_check_host_internal if the result qualifies as * src/spf.c (mech_include): Remove any mechanisms saved during
not matching. call to spf_check_host_internal if the result qualifies as not
matching.
2016-04-20 Sergey Poznyakoff <gray@gnu.org> 2016-04-20 Sergey Poznyakoff <gray@gnu.org>
List all traversed mechanisms in the spf_mechanism built-in variable. List all traversed mechanisms in the spf_mechanism built-in
variable.
* src/builtin/spf.bi (update_spf_vars): Concatenate all * src/builtin/spf.bi (update_spf_vars): Concatenate all
traversed mechanisms. traversed mechanisms.
* src/spf.c (spf_data): Replace exp, mech, ttl with a pointer to * src/spf.c (spf_data): Replace exp, mech, ttl with a pointer to
answer. answer.
(UPDATE_ANSWER_TTL): New macro. Use it instead of UPDATE_TTL (UPDATE_ANSWER_TTL): New macro. Use it instead of UPDATE_TTL
throughout this source. throughout this source.
(spf_data_init): Take spf_answer_t * as 2nd argument. All uses (spf_data_init): Take spf_answer_t * as 2nd argument. All uses
changed. changed.
(mech_include,mod_redirect): Propagate pointer to original spf_answer_t (mech_include,mod_redirect): Propagate pointer to original
through subordinate spf_check_host_internal calls. spf_answer_t through subordinate spf_check_host_internal calls.
(mod_exp): Expand text here. (mod_exp): Expand text here.
(spf_eval_record): Trace traversed mechanisms. (spf_eval_record): Trace traversed mechanisms.
(spf_answer_free): Free mechv array (spf_answer_free): Free mechv array
(spf_answer_add_mech): New function. (spf_answer_add_mech): New function.
* src/spf.h (spf_answer_t): Remove mech. * src/spf.h (spf_answer_t): Remove mech. New members: mechv,
New members: mechv, mechn, mechmax. mechn, mechmax.
(spf_answer_add_mech): New proto. (spf_answer_add_mech): New proto.
* doc/functions.texi: Document changes to the spf_mechanism * doc/functions.texi: Document changes to the spf_mechanism
built-in variable. built-in variable.
* NEWS: Update. * NEWS: Update.
2016-04-19 Sergey Poznyakoff <gray@gnu.org.ua> 2016-04-19 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes Bugfixes
* configure.ac: Fix the --with-dspam option. * configure.ac: Fix the --with-dspam option.
* doc/mailfromd.texi: Update postfix-related info. * doc/mailfromd.texi: Update postfix-related info.
2016-03-12 Sergey Poznyakoff <gray@gnu.org.ua> 2016-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
Prevent NULL dereferencing when attempting to remove an unexistent symtab Prevent NULL dereferencing when attempting to remove an
entry. unexistent symtab entry.
* lib/symtab.c (symtab_remove): Return if no matching entry * lib/symtab.c (symtab_remove): Return if no matching entry was
was found. found.
2016-03-03 Sergey Poznyakoff <gray@gnu.org> 2016-03-03 Sergey Poznyakoff <gray@gnu.org>
Minor fix in pmult Minor fix in pmult
* pmult/pmult.c: PM_MAX_MACROS was renamed to PM_MACROS_MAX. * pmult/pmult.c: PM_MAX_MACROS was renamed to PM_MACROS_MAX.
2016-03-02 Sergey Poznyakoff <gray@gnu.org> 2016-03-02 Sergey Poznyakoff <gray@gnu.org>
Fix compilation of pmult with MeTA1 1.0.0.0 Fix compilation of pmult with MeTA1 1.0.0.0
* configure.ac: In MeTA1 1.0.0.0 librcbcomm was renamed to rcbcommr, * configure.ac: In MeTA1 1.0.0.0 librcbcomm was renamed to
and librcb - to librcbr. rcbcommr, and librcb - to librcbr.
* pmult/pmult.c [!PM_MAX_MACROS] (PM_MAX_MACROS): Provide default. * pmult/pmult.c [!PM_MAX_MACROS] (PM_MAX_MACROS): Provide
(SM_ONERROR_ACTION): Expect const char * from smerr2txt. default.
(pmult_connect, pmult_rcpt): Use snprintf instead of umaxtostr. (SM_ONERROR_ACTION): Expect const char * from smerr2txt.
(main): Call mu_set_program_name. (pmult_connect, pmult_rcpt): Use snprintf instead of umaxtostr.
* doc/pmult.texi: Improve pmult documentation. (main): Call mu_set_program_name.
* doc/pmult.texi: Improve pmult documentation.
Fix coredump: Fix coredump:
* gacopyz/server.c (gacopyz_srv_clear_macros_pred): Rearrange * gacopyz/server.c (gacopyz_srv_clear_macros_pred): Rearrange
the array after removing elements. the array after removing elements.
2016-02-17 Sergey Poznyakoff <gray@gnu.org.ua> 2016-02-17 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright years Update copyright years
2016-02-17 Sergey Poznyakoff <gray@gnu.org.ua>
Fix type-related warnings. Fix type-related warnings.
2015-11-12 Sergey Poznyakoff <gray@gnu.org> 2015-11-12 Sergey Poznyakoff <gray@gnu.org>
Fix C unescaping in lex code. Fix C unescaping in lex code.
The mailutils commit f160ca75 changed return code of The mailutils commit f160ca75 changed return code of
mu_wordsplit_c_unquote_char. This commit modifies the code mu_wordsplit_c_unquote_char. This commit modifies the code
accordingly. accordingly.
* src/lex.l (c_unescape): New function. Use instead of
mu_wordsplit_c_unquote_char throughout the code.
(QML line): remove spurious backslash.
* src/lex.l (c_unescape): New function. Use instead of 2015-11-12 Sergey Poznyakoff <gray@gnu.org>
mu_wordsplit_c_unquote_char throughout the code.
(QML line): remove spurious backslash.
Fix build with dspam and geoip Fix build with dspam and geoip
* src/builtin/dspam.bi: Fix the use of MF_VAR_REF. * src/builtin/dspam.bi: Fix the use of MF_VAR_REF.
* src/builtin/geoip.bi: Use MF_RETURN. * src/builtin/geoip.bi: Use MF_RETURN.
2015-11-11 Sergey Poznyakoff <gray@gnu.org> 2015-11-11 Sergey Poznyakoff <gray@gnu.org>
bootstrap: pull submodules bootstrap: pull submodules
2015-09-15 Sergey Poznyakoff <gray@gnu.org> 2015-09-15 Sergey Poznyakoff <gray@gnu.org>
Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd
Version 7.99.94 2015-09-15 Sergey Poznyakoff <gray@gnu.org>
* configure.ac: Version 7.99.94; Require Mailutils 2.99.99, Version 7.99.94
use gettext 0.16
* NEWS: Update. * configure.ac: Version 7.99.94; Require Mailutils 2.99.99, use
* etc/rc.in: Rewrite mailfromd_status gettext 0.16
* gacopyz/Makefile.am (AM_CPPFLAGS): Add /lib * NEWS: Update.
* src/builtin/io.bi (open_program_stream_ioe): Disable C escapes * etc/rc.in: Rewrite mailfromd_status
when splitting the command line. * gacopyz/Makefile.am (AM_CPPFLAGS): Add /lib
* src/srvcfg.c (mf_srvcfg_init): Update call to mu_register_argp_capa * src/builtin/io.bi (open_program_stream_ioe): Disable C escapes
when splitting the command line.
* src/srvcfg.c (mf_srvcfg_init): Update call to
mu_register_argp_capa
2015-08-07 Sergey Poznyakoff <gray@gnu.org.ua> 2015-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
Fix typos. Fix typos.
Thanks to Andres Jonsson. Thanks to Andres Jonsson.
2015-07-11 Sergey Poznyakoff <gray@gnu.org.ua> 2015-07-11 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes Minor changes
* Makefile.am: Fix path to git2chg.awk * Makefile.am: Fix path to git2chg.awk
* lib/dns.c (domain_name_cmp): Use case-insensitive comparison * lib/dns.c (domain_name_cmp): Use case-insensitive comparison
2015-04-27 Sergey Poznyakoff <gray@gnu.org.ua> 2015-04-27 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs Update docs
* NEWS: Document new functions. * NEWS: Document new functions.
* doc/functions.texi: Fix typos. * doc/functions.texi: Fix typos.
* doc/mailfromd.texi: Likewise. * doc/mailfromd.texi: Likewise.
Update copyright years 2015-04-27 Sergey Poznyakoff <gray@gnu.org.ua>
Avoid casts between pointers and integers (mtasim) Update copyright years
* mtasim/mtasim.c (_def_write, _def_read, _def_close): SD points to 2015-04-27 Sergey Poznyakoff <gray@gnu.org.ua>
file handle.
(mta_daemon,mta_stdio): Change initialization of in and out.
Avoid casts between pointers and integers (group lists)
* lib/libmf.h (mf_gid_list): New datatype.
(mf_gid_list_alloc,mf_gid_list_free)
(mf_gid_list_dup,mf_gid_list_add)
(mf_gid_list_array): New functions.
(switch_to_privs,get_user_groups): Change signature.
* lib/server.c (mf_server_retain_groups): Change type.
* lib/userprivs.c (mf_gid_block,mf_gid_list): New struct.
(mf_gid_list_alloc,mf_gid_list_free)
(mf_gid_list_dup,mf_gid_list_add)
(mf_gid_list_array): New functions.
(get_user_groups): Rewrite.
(switch_to_privs): Take pointer to mf_gid_list as its
last argument.
(grouplist_translate): Rewrite.
* mtasim/mtasim.c (grouplist): Change type. All uses updated.
* src/srvcfg.c (mf_option_group): Rewrite.
Avoid casts between pointers and integers (optcache)
* lib/libmf.h (mf_option_value): Union.
(mf_option_cache): Rearrange members.
(handler,set): Change signature.
(isset): New member.
(mf_optcache_set_option): Change signature.
(mf_option_string,mf_option_boolean): Likewise.
(mf_option_time_t,mf_option_size_t): Remove.
(mf_option_timeout,mf_option_size): New prototypes.
* lib/optcache.c (optcache_dup): Clear isset member for each element.
(mf_optcache_set_option): Rewrite.
(mf_option_string, mf_option_boolean): Rewrite.
(mf_option_time_t,mf_option_size_t): Remove.
(mf_option_timeout,mf_option_size): New functions.
* lib/utils.c: Change the use of mf_optcache functions. Avoid casts between pointers and integers (mtasim)
* src/main.c: Likewise.
* src/mfdbtool.c: Likewise.
* src/srvcfg.c: Likewise.
Avoid casts between pointers and integers (prog & runtime). * mtasim/mtasim.c (_def_write, _def_read, _def_close): SD points
to file handle.
(mta_daemon,mta_stdio): Change initialization of in and out.
* src/prog.h (mf_stkval): New data type. 2015-04-27 Sergey Poznyakoff <gray@gnu.org.ua>
(STKVAL): Redefine as union mf_stkval.
(mft_ptr,mft_str,mft_int)
(mft_uint,mft_long,mft_ulong)
(mft_size,mft_string,mft_number): New data types.
(mf_cat,mf_c_val): New macros.
(instr_t): Moved from mailfromd.h
(mf_code_cell): New union
(mf_code_cell_t): New typedef.
(mf_cell_instr,mf_cell_value)
(mf_cell_c_value): New macros
(code_peek): Moved from mailfromd.h. Change return type;
(code_immediate,code_put): Moved from mailfromd.h. Change signature.
(code_op,code_instr,code_exmask)
(code_get_counter,dump_code,fixup_code): Moved from mailfromd.h.
(prog): Change type.
* src/prog.c: Use mf_c_val to extract C values from STKVAL.
(get_immediate): Return STKVAL.
(prog): Change type
(code_cell): New function.
(code_instr): Rewrite using code_cell
(code_immediate): Likewise. Change argument type.
(code_exmask): Use proper typecast.
(code_put): Change argument type.
(code_peek): Change return type.
(runtime_stack_trace): Use mf_cell_instr to access instruction
pointer.
* src/mailfromd.h (yyerror): Change signature.
(instr_t): Move to prog.h
(code_put,code_peek,code_reserve)
(code_immediate,code_op,code_instr)
(code_exmask,code_get_counter)
(dump_code,fixup_code): Move to prog.h
* src/exclist.c: Use mf_c_val
* src/gram.y (yyerror): Change signature.
(mailfromd_run): Use mf_c_val to extract actual value.
* doc/functions.texi (body_has_nulls): Fix return type.
* src/builtin/snarf.m4 (__mf_defun): Define __MF_RETTYPE__
(MF_RETURN): Take optional second argument (return type).
Decide what push function to use and what type to cast the
value to depending on its value and that of __MF_RETTYPE__.
(MF_RETURN_STRING): Remove.
(MF_RETURN_OBSTACK): Explicitly declare return type as STKVAL.
(MF_VAR_REF): Take two or three arguments (second one declaring
value type).
(MF_ALLOC_HEAP_TEMP):
(MF_VAR_STRING): Update.
(END): Popdef __MF_RETTYPE__.
* src/builtin/body.bi: Use MF_RETURN.
(body_has_nulls): Fix return type.
* src/builtin/burst.bi: Use MF_RETURN.
* src/builtin/callout.bi: Likewise.
* src/builtin/ctype.bi: Likewise.
* src/builtin/curhdr.bi: Likewise.
* src/builtin/db.bi: Likewise.
* src/builtin/debug.bi: Likewise.
* src/builtin/dns.bi: Likewise.
* src/builtin/email.bi: Likewise.
* src/builtin/geoip.bi: Likewise.
* src/builtin/getopt.bi: Likewise.
* src/builtin/gettext.bi: Likewise.
* src/builtin/io.bi: Likewise.
* src/builtin/ipaddr.bi: Likewise.
* src/builtin/macro.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/builtin/sa.bi: Likewise.
* src/builtin/spf.bi: Likewise.
* src/builtin/string.bi: Likewise.
* src/builtin/system.bi: Likewise.
* src/builtin/vars.bi: Likewise.
* src/drivers.c: Use proper typecasts when calling code_* functions.
* src/optab.opc (scan_code): Use mf_cell_c_value to inspect
prog[].
2015-04-24 Sergey Poznyakoff <gray@gnu.org> Avoid casts between pointers and integers (group lists)
Minor change * lib/libmf.h (mf_gid_list): New datatype.
(mf_gid_list_alloc,mf_gid_list_free)
(mf_gid_list_dup,mf_gid_list_add)
(mf_gid_list_array): New functions.
(switch_to_privs,get_user_groups): Change signature.
* lib/server.c (mf_server_retain_groups): Change type.
* lib/userprivs.c (mf_gid_block,mf_gid_list): New struct.
(mf_gid_list_alloc,mf_gid_list_free)
(mf_gid_list_dup,mf_gid_list_add)
(mf_gid_list_array): New functions.
(get_user_groups): Rewrite.
(switch_to_privs): Take pointer to mf_gid_list as its last
argument.
(grouplist_translate): Rewrite.
* mtasim/mtasim.c (grouplist): Change type. All uses updated.
* src/srvcfg.c (mf_option_group): Rewrite.
Implement change sender function. 2015-04-27 Sergey Poznyakoff <gray@gnu.org.ua>
* gacopyz/gacopyz.c (gacopyz_argn_command): New function. Avoid casts between pointers and integers (optcache)
(gacopyz_add_rcpt_par, gacopyz_chgfrom): Use gacopyz_argn_command.
* src/builtin/Makefile.am (BI_FILES): Add from.bi * lib/libmf.h (mf_option_value): Union.
* src/builtin/from.bi: New file. (mf_option_cache): Rearrange members.
(handler,set): Change signature.
(isset): New member.
(mf_optcache_set_option): Change signature.
(mf_option_string,mf_option_boolean): Likewise.
(mf_option_time_t,mf_option_size_t): Remove.
(mf_option_timeout,mf_option_size): New prototypes.
* lib/optcache.c (optcache_dup): Clear isset member for each
element.
(mf_optcache_set_option): Rewrite.
(mf_option_string, mf_option_boolean): Rewrite.
(mf_option_time_t,mf_option_size_t): Remove.
(mf_option_timeout,mf_option_size): New functions.
* lib/utils.c: Change the use of mf_optcache functions.
* src/main.c: Likewise.
* src/mfdbtool.c: Likewise.
* src/srvcfg.c: Likewise.
2015-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
Avoid casts between pointers and integers (prog & runtime).
* src/prog.h (mf_stkval): New data type.
(STKVAL): Redefine as union mf_stkval.
(mft_ptr,mft_str,mft_int)
(mft_uint,mft_long,mft_ulong)
(mft_size,mft_string,mft_number): New data types.
(mf_cat,mf_c_val): New macros.
(instr_t): Moved from mailfromd.h
(mf_code_cell): New union
(mf_code_cell_t): New typedef.
(mf_cell_instr,mf_cell_value)
(mf_cell_c_value): New macros
(code_peek): Moved from mailfromd.h. Change return type;
(code_immediate,code_put): Moved from mailfromd.h. Change
signature.
(code_op,code_instr,code_exmask)
(code_get_counter,dump_code,fixup_code): Moved from mailfromd.h.
(prog): Change type.
* src/prog.c: Use mf_c_val to extract C values from STKVAL.
(get_immediate): Return STKVAL.
(prog): Change type
(code_cell): New function.
(code_instr): Rewrite using code_cell
(code_immediate): Likewise. Change argument type.
(code_exmask): Use proper typecast.
(code_put): Change argument type.
(code_peek): Change return type.
(runtime_stack_trace): Use mf_cell_instr to access instruction
pointer.
* src/mailfromd.h (yyerror): Change signature.
(instr_t): Move to prog.h
(code_put,code_peek,code_reserve)
(code_immediate,code_op,code_instr)
(code_exmask,code_get_counter)
(dump_code,fixup_code): Move to prog.h
* src/exclist.c: Use mf_c_val
* src/gram.y (yyerror): Change signature.
(mailfromd_run): Use mf_c_val to extract actual value.
* doc/functions.texi (body_has_nulls): Fix return type.
* src/builtin/snarf.m4 (__mf_defun): Define __MF_RETTYPE__
(MF_RETURN): Take optional second argument (return type). Decide
what push function to use and what type to cast the value to
depending on its value and that of __MF_RETTYPE__.
(MF_RETURN_STRING): Remove.
(MF_RETURN_OBSTACK): Explicitly declare return type as STKVAL.
(MF_VAR_REF): Take two or three arguments (second one declaring
value type).
(MF_ALLOC_HEAP_TEMP):
(MF_VAR_STRING): Update.
(END): Popdef __MF_RETTYPE__.
* src/builtin/body.bi: Use MF_RETURN.
(body_has_nulls): Fix return type.
* src/builtin/burst.bi: Use MF_RETURN.
* src/builtin/callout.bi: Likewise.
* src/builtin/ctype.bi: Likewise.
* src/builtin/curhdr.bi: Likewise.
* src/builtin/db.bi: Likewise.
* src/builtin/debug.bi: Likewise.
* src/builtin/dns.bi: Likewise.
* src/builtin/email.bi: Likewise.
* src/builtin/geoip.bi: Likewise.
* src/builtin/getopt.bi: Likewise.
* src/builtin/gettext.bi: Likewise.
* src/builtin/io.bi: Likewise.
* src/builtin/ipaddr.bi: Likewise.
* src/builtin/macro.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/builtin/sa.bi: Likewise.
* src/builtin/spf.bi: Likewise.
* src/builtin/string.bi: Likewise.
* src/builtin/system.bi: Likewise.
* src/builtin/vars.bi: Likewise.
* src/drivers.c: Use proper typecasts when calling code_*
functions.
* src/optab.opc (scan_code): Use mf_cell_c_value to inspect
prog[].
* src/mailfromd.h (msgmod_opcode) <set_from>: New opcode. 2015-04-24 Sergey Poznyakoff <gray@gnu.org>
* src/engine.c (run_msgmod): Support set_from.
(smfilter): Announce SMFIF_CHGFROM flag.
* src/gram.y (msgmod_opcode_str): Support set_from.
* NEWS: Update. Minor change
* doc/functions.texi: Document set_from.
2015-04-24 Sergey Poznyakoff <gray@gnu.org>
Implement change sender function.
* gacopyz/gacopyz.c (gacopyz_argn_command): New function.
(gacopyz_add_rcpt_par, gacopyz_chgfrom): Use
gacopyz_argn_command.
* src/builtin/Makefile.am (BI_FILES): Add from.bi
* src/builtin/from.bi: New file.
* src/mailfromd.h (msgmod_opcode) <set_from>: New opcode.
* src/engine.c (run_msgmod): Support set_from.
(smfilter): Announce SMFIF_CHGFROM flag.
* src/gram.y (msgmod_opcode_str): Support set_from.
* NEWS: Update.
* doc/functions.texi: Document set_from.
2015-04-23 Sergey Poznyakoff <gray@gnu.org.ua> 2015-04-23 Sergey Poznyakoff <gray@gnu.org.ua>
Fix doc generation. Fix doc generation.
Default Config file applied to all output formats, which is wrong. Default Config file applied to all output formats, which is
Use a dedicated configuration file for html output formats, and wrong. Use a dedicated configuration file for html output
defaults for the rest. formats, and defaults for the rest.
* doc/Makefile.am (GENDOCS): Add html-specific configuration file. * doc/Makefile.am (GENDOCS): Add html-specific configuration
* doc/Config: Rename to doc/html.init (with changes). file.
* doc/functions.texi: Fix sectioning. * doc/Config: Rename to doc/html.init (with changes).
* doc/mailfromd.texi: Likewise. * doc/functions.texi: Fix sectioning.
* doc/mailfromd.texi: Likewise.
2015-03-01 Sergey Poznyakoff <gray@gnu.org> 2015-03-01 Sergey Poznyakoff <gray@gnu.org>
Switch to Texinfo 5.0 Switch to Texinfo 5.0
* doc/Config: Rewrite. * doc/Config: Rewrite.
* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm * doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
* doc/gendocs_template: Ps is not built * doc/gendocs_template: Ps is not built
* imprimatur: Upgrade. * imprimatur: Upgrade.
2014-12-10 Sergey Poznyakoff <gray@gnu.org.ua> 2014-12-10 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix (remove unused static function) Minor fix (remove unused static function)
2014-12-10 Sergey Poznyakoff <gray@gnu.org.ua>
New function message_body_is_empty New function message_body_is_empty
* src/builtin/msg.bi (DCL_BODY_HDR): New m4 macro. * src/builtin/msg.bi (DCL_BODY_HDR): New m4 macro.
(message_body_is_empty): New function. (message_body_is_empty): New function.
* NEWS: Mention message_body_is_empty * NEWS: Mention message_body_is_empty
* doc/functions.texi: Document message_body_is_empty * doc/functions.texi: Document message_body_is_empty
* tests/nulmsg.at: New testcase. * tests/nulmsg.at: New testcase.
* tests/Makefile.am: Add new test. * tests/Makefile.am: Add new test.
* tests/testsuite.at: Likewise. * tests/testsuite.at: Likewise.
2014-12-06 Sergey Poznyakoff <gray@gnu.org.ua> 2014-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix Bugfix
* src/builtin/mbox.bi (mailbox_open): Fix the use of the perms * src/builtin/mbox.bi (mailbox_open): Fix the use of the perms
argument. argument.
* doc/functions.texi: Document last argument to mailbox_open. * doc/functions.texi: Document last argument to mailbox_open.
2014-08-27 Sergey Poznyakoff <gray@gnu.org> 2014-08-27 Sergey Poznyakoff <gray@gnu.org>
get translations from TP during bootstrapping get translations from TP during bootstrapping
2014-02-28 Sergey Poznyakoff <gray@gnu.org.ua> 2014-02-28 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes. Bugfixes.
* src/pp.c (stderr_redirector): Fix reading loop. * src/pp.c (stderr_redirector): Fix reading loop.
* src/savsrv.c (callout_session_server): Likewise. * src/savsrv.c (callout_session_server): Likewise.
2013-08-08 Sergey Poznyakoff <gray@gnu.org.ua> 2013-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
Get rid of gnulib. Get rid of gnulib.
* .gitmodules: Remove gnulib. * .gitmodules: Remove gnulib.
* gnulib: Remove. * gnulib: Remove.
* gnulib.modules: Remove. * gnulib.modules: Remove.
* Makefile.am: Remove gnulib. Use git2chg.awk to create * Makefile.am: Remove gnulib. Use git2chg.awk to create
ChangeLog. ChangeLog.
* bootstrap: Rewrite. * bootstrap: Rewrite.
* bootstrap.conf: Remove. * bootstrap.conf: Remove.
* configure.ac: Update. * configure.ac: Update.
* gacopyz/Makefile.am (AM_CPPFLAGS): Update. * gacopyz/Makefile.am (AM_CPPFLAGS): Update.
* git2chg.awk: New file. * git2chg.awk: New file.
* lib/Makefile.am: Remove dependencies on gnulib. * lib/Makefile.am: Remove dependencies on gnulib.
* mtasim/Makefile.am: Likewise. * mtasim/Makefile.am: Likewise.
* pmult/Makefile.am: Likewise. * pmult/Makefile.am: Likewise.
* src/Makefile.am: Likewise. * src/Makefile.am: Likewise.
* src/builtin/Makefile.am: Likewise. * src/builtin/Makefile.am: Likewise.
* lib/gettext.h: New file. * lib/gettext.h: New file.
* lib/.gitignore: New file. * lib/.gitignore: New file.
* lib/obstack.c: New file. * lib/obstack.c: New file.
* lib/obstack.h_: New file. * lib/obstack.h_: New file.
* lib/ftimestr.c (format_time_str): Rewrite using * lib/ftimestr.c (format_time_str): Rewrite using strftime and
strftime and statically allocated buffer. statically allocated buffer.
* lib/libmf.h (transform_error_string): Change return * lib/libmf.h (transform_error_string): Change return type
type (const char *). (const char *).
* lib/proctitle.c: Rewrite using statically allocated * lib/proctitle.c: Rewrite using statically allocated buffer.
buffer. * lib/transform.c: Use mu_ allocation and ctype functions.
* lib/transform.c: Use mu_ allocation and ctype functions. (transform_error_string): Use statically allocated buffer.
(transform_error_string): Use statically allocated buffer. Return a pointer to its content.
Return a pointer to its content. * mtasim/mtasim.c Use mu_ allocation and ctype functions.
* mtasim/mtasim.c Use mu_ allocation and ctype functions. (save_cwd, restore_cwd): New functions
(save_cwd, restore_cwd): New functions
* lib/db.c: Use mu_ allocation and ctype functions.
* lib/db.c: Use mu_ allocation and ctype functions. * lib/dbcfg.c: Likewise.
* lib/dbcfg.c: Likewise. * lib/dict.c: Likewise.
* lib/dict.c: Likewise. * lib/dns.c: Likewise.
* lib/dns.c: Likewise. * lib/namefixup.c: Likewise.
* lib/namefixup.c: Likewise. * lib/optcache.c: Likewise.
* lib/optcache.c: Likewise. * lib/parsetime.c: Likewise.
* lib/parsetime.c: Likewise. * lib/server.c: Likewise.
* lib/server.c: Likewise. * lib/srvman.c: Likewise.
* lib/srvman.c: Likewise. * lib/userprivs.c: Likewise.
* lib/userprivs.c: Likewise. * lib/utils.c: Likewise.
* lib/utils.c: Likewise. * pmult/pmult.c: Likewise.
* pmult/pmult.c: Likewise. * src/bitmask.h: Likewise.
* src/bitmask.h: Likewise. * src/builtin/burst.bi: Likewise.
* src/builtin/burst.bi: Likewise. * src/builtin/ctype.bi: Likewise.
* src/builtin/ctype.bi: Likewise. * src/builtin/db.bi: Likewise.
* src/builtin/db.bi: Likewise. * src/builtin/dns.bi: Likewise.
* src/builtin/dns.bi: Likewise. * src/builtin/dspam.bi: Likewise.
* src/builtin/dspam.bi: Likewise. * src/builtin/getopt.bi: Likewise.
* src/builtin/getopt.bi: Likewise. * src/builtin/getpw.bi: Likewise.
* src/builtin/getpw.bi: Likewise. * src/builtin/mbox.bi: Likewise.
* src/builtin/mbox.bi: Likewise. * src/builtin/msg.bi: Likewise.
* src/builtin/msg.bi: Likewise. * src/builtin/sprintf.bi: Likewise.
* src/builtin/sprintf.bi: Likewise. * src/callout.h: Likewise.
* src/callout.h: Likewise. * src/calloutd.c: Likewise.
* src/calloutd.c: Likewise. * src/deprecation.c: Likewise.
* src/deprecation.c: Likewise. * src/engine.c: Likewise.
* src/engine.c: Likewise. * src/exclist.c: Likewise.
* src/exclist.c: Likewise. * src/gram.y: Likewise.
* src/gram.y: Likewise. * src/lex.l: Likewise.
* src/lex.l: Likewise. * src/mailfromd.h: Likewise.
* src/mailfromd.h: Likewise. * src/main.c: Likewise.
* src/main.c: Likewise. * src/mfdbtool.c: Likewise.
* src/mfdbtool.c: Likewise. * src/pp.c: Likewise.
* src/pp.c: Likewise. * src/pragma.c: Likewise.
* src/pragma.c: Likewise. * src/prog.c: Likewise.
* src/prog.c: Likewise. * src/srvcfg.c: Likewise.
* src/srvcfg.c: Likewise. * src/stack.c: Likewise.
* src/stack.c: Likewise. * src/symbols.c: Likewise.
* src/symbols.c: Likewise.
* src/callout.c: Likewise.
* src/callout.c: Likewise. * po/.gitignore: Update.
* po/.gitignore: Update. * po/Makevars: New file.
* po/Makevars: New file. * src/builtin/io.bi: Use mu_ allocation and ctype functions.
* src/builtin/io.bi: Use mu_ allocation and ctype functions. (stderr_to_log): Use fgets instead of getline.
(stderr_to_log): Use fgets instead of getline. * src/builtin/system.bi (strftime): Use statically allocated
* src/builtin/system.bi (strftime): Use statically allocated buffer buffer and strftime.
and strftime. * src/savsrv.c: Use mu_ allocation and ctype functions.
* src/savsrv.c: Use mu_ allocation and ctype functions. (trimcrlf): Return 0 if theCR(LF) has been removed and 1
(trimcrlf): Return 0 if theCR(LF) has been removed and 1 otherwise. otherwise.
(callout_session_server): Use statically allocated buffer. Reject (callout_session_server): Use statically allocated buffer.
input lines that are longer than allowed by its capacity. Reject input lines that are longer than allowed by its capacity.
* src/spf.c: Use mu_ allocation and ctype functions. * src/spf.c: Use mu_ allocation and ctype functions.
(scanback): New function. (scanback): New function.
(spf_reverse,spf_truncate): Use scanback instead of memrchr. (spf_reverse,spf_truncate): Use scanback instead of memrchr.
2013-07-30 Sergey Poznyakoff <gray@gnu.org.ua> 2013-07-30 Sergey Poznyakoff <gray@gnu.org.ua>
Document testsuite Document testsuite
* tests/testsuite.at: Add banners * tests/testsuite.at: Add banners
2013-07-29 Sergey Poznyakoff <gray@gnu.org.ua> 2013-07-29 Sergey Poznyakoff <gray@gnu.org.ua>
Provide built-ins for effective handling of large message bodies. Provide built-ins for effective handling of large message
bodies.
* src/mailfromd.h (body_repl_fd): New opcode. * src/mailfromd.h (body_repl_fd): New opcode.
* src/engine.c (run_msgmod): Handle body_repl_fd. * src/engine.c (run_msgmod): Handle body_repl_fd.
* src/gram.y (msgmod_opcode_str): Handle body_repl_fd. * src/gram.y (msgmod_opcode_str): Handle body_repl_fd.
* gacopyz/gacopyz.c (gacopyz_replace_body_fn) * gacopyz/gacopyz.c (gacopyz_replace_body_fn)
(gacopyz_replace_body_fd): New functions. (gacopyz_replace_body_fd): New functions.
(gacopyz_replace_body): Rewrite using gacopyz_replace_body_fn. (gacopyz_replace_body): Rewrite using gacopyz_replace_body_fn.
* gacopyz/gacopyz.h (gacopyz_replace_body_fn) * gacopyz/gacopyz.h (gacopyz_replace_body_fn)
(gacopyz_replace_body_fd): New protos. (gacopyz_replace_body_fd): New protos.
* src/builtin/body.bi (replbody_fd): New built-in function. * src/builtin/body.bi (replbody_fd): New built-in function.
* src/builtin/io.bi (open_program_stream_ioe): New static. * src/builtin/io.bi (open_program_stream_ioe): New static.
(open_program_stream): Rewrite via open_program_stream_ioe. (open_program_stream): Rewrite via open_program_stream_ioe.
(spawn, write_body): New built-in functions. (spawn, write_body): New built-in functions.
* src/builtin/system.bi (unlink): New built-in function. * src/builtin/system.bi (unlink): New built-in function.
* NEWS: Update. * NEWS: Update.
* doc/functions.texi: Document the new functions. * doc/functions.texi: Document the new functions.
2012-12-30 Sergey Poznyakoff <gray@gnu.org.ua> 2012-12-30 Sergey Poznyakoff <gray@gnu.org.ua>
Use AM_CPPFLAGS instead of INCLUDES in Makefiles. Use AM_CPPFLAGS instead of INCLUDES in Makefiles.
2012-11-03 Sergey Poznyakoff <gray@gnu.org.ua> 2012-11-03 Sergey Poznyakoff <gray@gnu.org.ua>
Fix communication with a program invoked via open(). Fix communication with a program invoked via open().
* src/builtin/io.bi (REDIRECT_STDOUT_P): Fix. * src/builtin/io.bi (REDIRECT_STDOUT_P): Fix.
(open_program_stream): Remove improper calls to close(). (open_program_stream): Remove improper calls to close().
(open): Implement the |< prefix to open read-only communication (open): Implement the |< prefix to open read-only communication
with the invoked program. with the invoked program.
* doc/functions.texi: Document the |< prefix. * doc/functions.texi: Document the |< prefix.
* NEWS: Update. * NEWS: Update.
* THANKS: Mention Mehmet Tolga Avcioglu. * THANKS: Mention Mehmet Tolga Avcioglu.
2012-09-02 Sergey Poznyakoff <gray@gnu.org.ua> 2012-09-02 Sergey Poznyakoff <gray@gnu.org.ua>
Fix `next' in do-while loops. Fix `next' in do-while loops.
The next keyword would incorrectly bypass the conditional in The next keyword would incorrectly bypass the conditional in
do-while loops. do-while loops.
* src/drivers.c (code_type_loop): Fix jump target for `next' to * src/drivers.c (code_type_loop): Fix jump target for `next' to
include end of loop conditional. include end of loop conditional.
* tests/next03.at: New test case. * tests/next03.at: New test case.
* tests/Makefile.am (TESTSUITE_AT): Add next03.at * tests/Makefile.am (TESTSUITE_AT): Add next03.at
* tests/testsuite.at: Include next03.at * tests/testsuite.at: Include next03.at
* tests/next01.at: Fix keywords. * tests/next01.at: Fix keywords.
* tests/next02.at: Likewise. * tests/next02.at: Likewise.
* tests/trycatch07.at: Likewise. * tests/trycatch07.at: Likewise.
* tests/trycatch08.at: Likewise. * tests/trycatch08.at: Likewise.
* tests/trycatch11.at: Likewise. * tests/trycatch11.at: Likewise.
* tests/trycatch12.at: Likewise. * tests/trycatch12.at: Likewise.
* tests/trycatch15.at: Likewise. * tests/trycatch15.at: Likewise.
* tests/trycatch16.at: Likewise. * tests/trycatch16.at: Likewise.
* NEWS: Update. * NEWS: Update.
2012-08-08 Sergey Poznyakoff <gray@gnu.org.ua> 2012-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
Improve DSN API. Improve DSN API.
* src/builtin/mail.bi (add_headers): Append headers to existing ones, * src/builtin/mail.bi (add_headers): Append headers to existing
instead of replacing them. ones, instead of replacing them. Unref the header stream.
Unref the header stream. (mime_create_quote): Skip envelope (UNIX From ) line.
(mime_create_quote): Skip envelope (UNIX From ) line. (create_dsn): New function.
(create_dsn): New function.
2012-08-06 Sergey Poznyakoff <gray@gnu.org.ua> 2012-08-06 Sergey Poznyakoff <gray@gnu.org.ua>
Rename header_rename_* functions to header_prefix_* Rename header_rename_* functions to header_prefix_*
* mflib/header_rename.mf4 (header_rename_all): Rename to header_prefix_al * mflib/header_rename.mf4 (header_rename_all): Rename to
l. header_prefix_all.
(header_rename_pattern): Rename to header_prefix_pattern. (header_rename_pattern): Rename to header_prefix_pattern.
* NEWS: Likewise. * NEWS: Likewise.
* doc/functions.texi: Likewise. * doc/functions.texi: Likewise.
2012-08-05 Sergey Poznyakoff <gray@gnu.org.ua> 2012-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
Implement functions for modifying headers addressed by their number. Impr Implement functions for modifying headers addressed by their
ove header renaming functions. number. Improve header renaming functions.
* NEWS: Updated. * NEWS: Updated.
* doc/functions.texi: Updated. * doc/functions.texi: Updated.
* mflib/header_rename.mf4: Rewrite from scratch. * mflib/header_rename.mf4: Rewrite from scratch.
* src/builtin/curhdr.bi (get_current_header): Remove, * src/builtin/curhdr.bi (get_current_header): Remove, use
use env_get_header instead. All uses changed. env_get_header instead. All uses changed.
* src/builtin/header.bi (header_delete_nth) * src/builtin/header.bi (header_delete_nth)
(header_replace_nth): New built-ins. (header_replace_nth): New built-ins.
* src/builtin/snarf.m4 (MF_CAPTURE): Accept opional argument. * src/builtin/snarf.m4 (MF_CAPTURE): Accept opional argument.
All uses updated. All uses updated.
* src/builtin/vars.bi (sendmail_header_count): New variable. * src/builtin/vars.bi (sendmail_header_count): New variable.
(get_sendmail_header_count) (get_sendmail_header_count)
(set_sendmail_header_count): New functions. (set_sendmail_header_count): New functions.
* src/engine.c (message_data) <hdrtrans,hdrcount>: New members. * src/engine.c (message_data) <hdrtrans,hdrcount>: New members.
(test_message_data_init,priv_get): Initialize hdrtrans and hdrcount. (test_message_data_init,priv_get): Initialize hdrtrans and
(priv_store_msgmod_closure): Name can be NULL. hdrcount.
(filter_cleanup): Free hdrtrans. (priv_store_msgmod_closure): Name can be NULL.
(run_msgmod) <header_insert>: Adjust header number by the value of (filter_cleanup): Free hdrtrans.
sendmail_header_count variable. (run_msgmod) <header_insert>: Adjust header number by the value
Handle header_replace_nth and header_delete_nth opcodes. of sendmail_header_count variable. Handle header_replace_nth and
* src/gram.y (msgmod_opcode_str): Handle header_replace_nth and header_delete_nth opcodes.
header_delete_nth opcodes. * src/gram.y (msgmod_opcode_str): Handle header_replace_nth and
* src/mailfromd.h (msgmod_opcode) <header_delete_nth> header_delete_nth opcodes.
<header_replace_nth>: New opcodes. * src/mailfromd.h (msgmod_opcode) <header_delete_nth>
(get_sendmail_header_count) <header_replace_nth>: New opcodes.
(set_sendmail_header_count) (get_sendmail_header_count)
(env_get_header): New protos. (set_sendmail_header_count)
* src/prog.c (eval_environ) <header>: New member. (env_get_header): New protos.
(env_capture_start): Initialize header. * src/prog.c (eval_environ) <header>: New member.
(env_get_header): New function. (env_capture_start): Initialize header.
(env_msgmod): Name can be NULL. (env_get_header): New function.
(destroy_environment): Destroy the header. (env_msgmod): Name can be NULL.
(destroy_environment): Destroy the header.
2012-08-04 Sergey Poznyakoff <gray@gnu.org.ua> 2012-08-04 Sergey Poznyakoff <gray@gnu.org.ua>
Fix trace output. Fix trace output.
The c-escape filter used by the trace output stream suppresses The c-escape filter used by the trace output stream suppresses
newlines in output. This is harmless when the output goes to newlines in output. This is harmless when the output goes to
syslog, but when it goes to stderr, all trace lines get concatenated syslog, but when it goes to stderr, all trace lines get
into a single one on output. To fix this, newline has to be sent concatenated into a single one on output. To fix this, newline
directly to the underlying stream, bypassing the filter. has to be sent directly to the underlying stream, bypassing the
filter.
* src/main.c (trace): Send newline bypassing the c-escape
filter (which would have converted it to the "\n" sequence). * src/main.c (trace): Send newline bypassing the c-escape filter
This requires MU commit 1cbbd572. (which would have converted it to the "\n" sequence). This
requires MU commit 1cbbd572.
2012-07-15 Sergey Poznyakoff <gray@gnu.org.ua> 2012-07-15 Sergey Poznyakoff <gray@gnu.org.ua>
Upgrade imprimatur. Upgrade imprimatur.
2012-03-21 Sergey Poznyakoff <gray@gnu.org.ua> 2012-03-21 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix. Minor fix.
* lib/db.c (db_compact): Do not unlink prior to renaming.
2012-03-21 Sergey Poznyakoff <gray@gnu.org.ua>
mfdbtool: fix creating the database when compacting
* lib/db.c (db_compact): Do not unlink prior to renaming. This requires MU 5eb34056 or later.
mfdbtool: fix creating the database when compacting * lib/db.c (make_tmp_name): Prefer changing the suffix when
creating temporary db name.
(db_compact): Make sure file mode and owner are preserved. Use
actual file name (as opposed to eventual URL) when renaming.
This requires MU 5eb34056 or later. 2012-02-26 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/db.c (make_tmp_name): Prefer changing the suffix when Bugfix
creating temporary db name.
(db_compact): Make sure file mode and owner are preserved. * mflib/Makefile.am (EXTRA_DIST): Add dspam.mf
Use actual file name (as opposed to eventual URL) when renaming.
2012-02-26 Sergey Poznyakoff <gray@gnu.org.ua> 2012-02-26 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix Restore legacy lock-* configuration statements.
* lib/libmf.h (config_cb_lock_retry_count)
(config_cb_lock_retry_timeout)
(mf_option_size_t,mf_init_lock_options): New prototypes.
* lib/optcache.c (mf_option_size_t): New function.
* lib/utils.c (config_cb_lock_retry_count)
(config_cb_lock_retry_timeout)
(mf_init_lock_options): New functions.
* src/main.c (mf_cfg_param): Restore lock-retry-count and
lock-retry-timeout for backward compatibility.
(main): Call mf_init_lock_options.
* src/mfdbtool.c (mfdbtool_cfg_param): Restore lock-retry-count
and lock-retry-timeout for backward compatibility.
(main): Call mf_init_lock_options.
* src/calloutd.c: Likewise.
* mflib/Makefile.am (EXTRA_DIST): Add dspam.mf * lib/close-fds.c (close_fds_except): Don't access FD_SET unless
i is less than FD_SETSIZE.
Restore legacy lock-* configuration statements. 2012-02-26 Sergey Poznyakoff <gray@gnu.org.ua>
Fix database expiration in mfdbtool.
* lib/libmf.h (config_cb_lock_retry_count) * NEWS: Version 7.99.92
(config_cb_lock_retry_timeout) * configure.ac: 7.99.92
(mf_option_size_t,mf_init_lock_options): New prototypes. * lib/db.c (make_tmp_name): Don't assume additional directories.
* lib/optcache.c (mf_option_size_t): New function. * lib/mfdb.h (db_expire_t): Change signature. All uses updated.
* lib/utils.c (config_cb_lock_retry_count)
(config_cb_lock_retry_timeout)
(mf_init_lock_options): New functions.
* src/main.c (mf_cfg_param): Restore lock-retry-count and
lock-retry-timeout for backward compatibility.
(main): Call mf_init_lock_options.
* src/mfdbtool.c (mfdbtool_cfg_param): Restore lock-retry-count and
lock-retry-timeout for backward compatibility.
(main): Call mf_init_lock_options.
* src/calloutd.c: Likewise.
* lib/close-fds.c (close_fds_except): Don't access FD_SET unless
i is less than FD_SETSIZE.
Fix database expiration in mfdbtool.
* NEWS: Version 7.99.92
* configure.ac: 7.99.92
* lib/db.c (make_tmp_name): Don't assume additional directories.
* lib/mfdb.h (db_expire_t): Change signature. All uses updated.
2012-02-08 Sergey Poznyakoff <gray@gnu.org.ua> 2012-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
Fix circular dependency in Makefiles. Fix circular dependency in Makefiles.
This fixes 2ef494a7. Make should process the mflib directory This fixes 2ef494a7. Make should process the mflib directory
before src, because the latter relies on status.ex being built. before src, because the latter relies on status.ex being built.
On the other hand, mf sources in mflib have to be linted on On the other hand, mf sources in mflib have to be linted on make
make check. The solution runs as follows: (1) mflib appears in check. The solution runs as follows: (1) mflib appears in
SUBDIRS before src, and (2) src/Makefile.am runs make lint in SUBDIRS before src, and (2) src/Makefile.am runs make lint in
../mflib on make check. ../mflib on make check.
* Makefile.am (SUBDIRS): Restore mflib to its proper place. * Makefile.am (SUBDIRS): Restore mflib to its proper place.
* mflib/Makefile.am (check-am): Remove rule. * mflib/Makefile.am (check-am): Remove rule.
* src/Makefile.am (check-am): New rule. Run make lint in mflib. * src/Makefile.am (check-am): New rule. Run make lint in mflib.
Fix ipv6 configuration test. 2012-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
Fix ipv6 configuration test.
2012-02-07 Sergey Poznyakoff <gray@gnu.org.ua> 2012-02-07 Sergey Poznyakoff <gray@gnu.org.ua>
Implement ltrim and rtrim Implement ltrim and rtrim
* src/builtin/string.bi (ltrim, rtrim): New functions. * src/builtin/string.bi (ltrim, rtrim): New functions.
* NEWS: List new functions. * NEWS: List new functions.
* doc/functions.texi: Document new functions. * doc/functions.texi: Document new functions.
2012-02-03 Sergey Poznyakoff <gray@gnu.org.ua> 2012-02-03 Sergey Poznyakoff <gray@gnu.org.ua>
Fix argument expansion in pragmas. Fix argument expansion in pragmas.
* src/pragma.c (expand_string): Fix expansion of quoted strings. * src/pragma.c (expand_string): Fix expansion of quoted strings.
Fix database privileges in dbfirst. 2012-02-03 Sergey Poznyakoff <gray@gnu.org.ua>
* src/builtin/db.bi (dbfirst): Get db mode from the properties, Fix database privileges in dbfirst.
use DEFAULT_DB_MODE if these are not defined.
* src/builtin/db.bi (dbfirst): Get db mode from the properties,
use DEFAULT_DB_MODE if these are not defined.
2011-11-21 Sergey Poznyakoff <gray@gnu.org.ua> 2011-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
Version 7.99.91 Version 7.99.91
More fixes. Use mu_list_foreach instead of mu_list_do. 2011-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
* Makefile.am (SUBDIRS): Use mflib after src, so that make check uses More fixes. Use mu_list_foreach instead of mu_list_do.
the freshly built version of mailfromd.
* lib/userprivs.c: Use mu_list_foreach instead of mu_list_do
* mtasim/mtasim.c: Likewise.
* pmult/pmult.c: Likewise.
* src/builtin/mbox.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/engine.c: Likewise.
* src/gram.y: Likewise.
* src/main.c: Likewise.
* src/pp.c: Likewise.
Bugfixes. * Makefile.am (SUBDIRS): Use mflib after src, so that make check
uses the freshly built version of mailfromd.
* lib/userprivs.c: Use mu_list_foreach instead of mu_list_do
* mtasim/mtasim.c: Likewise.
* pmult/pmult.c: Likewise.
* src/builtin/mbox.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/engine.c: Likewise.
* src/gram.y: Likewise.
* src/main.c: Likewise.
* src/pp.c: Likewise.
2011-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: Fix mu info test. Bugfixes.
* lib/db.c: Add default safety flags to mu_dbm_create* calls.
* src/builtin/db.bi: Likewise. * configure.ac: Fix mu info test.
* lib/db.c: Add default safety flags to mu_dbm_create* calls.
* src/builtin/db.bi: Likewise.
2011-11-10 Sergey Poznyakoff <gray@gnu.org.ua> 2011-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
Improve handling of database security flags. Improve handling of database security flags.
* src/builtin/db.bi (db_prop)<hint>: New member. * src/builtin/db.bi (db_prop)<hint>: New member.
(dbprop): Accept additional "hint" argument. (dbprop): Accept additional "hint" argument.
(_mf_dbm_open): Rename to _open_dbm (all uses changed). Get safety flags (_mf_dbm_open): Rename to _open_dbm (all uses changed). Get
from the created DB and augment them with bits deduced from the file mode safety flags from the created DB and augment them with bits
. deduced from the file mode.
* src/srvcfg.c (mf_srvcfg_flush): Add default parameters to the database * src/srvcfg.c (mf_srvcfg_flush): Add default parameters to the
URL hint. database URL hint.
Bugfixes 2011-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/db.c (mf_dbm_open): Destroy db after failed attempt to open it. Bugfixes
* src/builtin/db.bi (_mf_dbm_open): Likewise.
(dbmap_lookup): Take db_prop as an additional argument. Use its mode * lib/db.c (mf_dbm_open): Destroy db after failed attempt to
field for opening. open it.
Fix improper conditional. * src/builtin/db.bi (_mf_dbm_open): Likewise.
(dbmap_lookup): Take db_prop as an additional argument. Use its
Switch to libmu_dbm for DBM support. mode field for opening. Fix improper conditional.
* configure.ac (DEFAULT_DB_TYPE): New variable. 2011-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
Use mu info to determine which DBM is supported.
* lib/Makefile.am (noinst_LIBRARIES): Remove libdbm.a Switch to libmu_dbm for DBM support.
* lib/mf-dbm.c: remove.
* lib/mf-dbm.h: remove. * configure.ac (DEFAULT_DB_TYPE): New variable. Use mu info to
* lib/cache.c: Use libmu_dbm functions. determine which DBM is supported.
* lib/db.c: Likewise. * lib/Makefile.am (noinst_LIBRARIES): Remove libdbm.a
* lib/dbcfg.c: Likewise. * lib/mf-dbm.c: remove.
* lib/greylist.c: Likewise. * lib/mf-dbm.h: remove.
* lib/rate.c: Likewise. * lib/cache.c: Use libmu_dbm functions.
* lib/tbf_rate.c: Likewise. * lib/db.c: Likewise.
* src/builtin/db.bi: Likewise. * lib/dbcfg.c: Likewise.
* src/savsrv.c: Likewise. * lib/greylist.c: Likewise.
* src/srvcfg.c (srv_cfg_param) <database-type>: New statement. * lib/rate.c: Likewise.
* lib/libmf.h (config_cb_ignore): New proto. * lib/tbf_rate.c: Likewise.
* lib/mfdb.h (db_item_printer_t): Change signature. * src/builtin/db.bi: Likewise.
* lib/utils.c (config_cb_ignore): New function. * src/savsrv.c: Likewise.
* po/POTFILES.in: Update. * src/srvcfg.c (srv_cfg_param) <database-type>: New statement.
* src/Makefile.am (mailfromd_LDADD) * lib/libmf.h (config_cb_ignore): New proto.
(calloutd_LDADD): Remove libdbm.a. * lib/mfdb.h (db_item_printer_t): Change signature.
* src/calloutd.c: Update. * lib/utils.c (config_cb_ignore): New function.
* src/main.c (mf_cfg_param): lock-retry-count and * po/POTFILES.in: Update.
lock-retry-timeout are no-op now. * src/Makefile.am (mailfromd_LDADD)
* src/mfdbtool.c: Likewise. (calloutd_LDADD): Remove libdbm.a.
* src/calloutd.c: Update.
* src/main.c (mf_cfg_param): lock-retry-count and
lock-retry-timeout are no-op now.
* src/mfdbtool.c: Likewise.
2011-11-08 Sergey Poznyakoff <gray@gnu.org.ua> 2011-11-08 Sergey Poznyakoff <gray@gnu.org.ua>
Adapt for MU 2.99.94 Adapt for MU 2.99.94
* configure.ac: Require MU 2.99.94 * configure.ac: Require MU 2.99.94
* lib/mf-dbm.c: Use EACCES instead of the removed MU_ERR_UNSAFE_PERMS * lib/mf-dbm.c: Use EACCES instead of the removed
* src/builtin/burst.bi (finish_stream): Use MU_ERR_INVALID_EMAIL instead MU_ERR_UNSAFE_PERMS
of the removed MU_ERR_BAD_822_FORMAT. * src/builtin/burst.bi (finish_stream): Use MU_ERR_INVALID_EMAIL
* src/mfdbtool.c (main): exit on invalid usage. instead of the removed MU_ERR_BAD_822_FORMAT.
* src/mfdbtool.c (main): exit on invalid usage.
2011-10-08 Sergey Poznyakoff <gray@gnu.org.ua> 2011-10-08 Sergey Poznyakoff <gray@gnu.org.ua>
Docs: fix sentence spacing; use @: where appropriate. Docs: fix sentence spacing; use @: where appropriate.
2011-10-02 Sergey Poznyakoff <gray@gnu.org.ua> 2011-10-02 Sergey Poznyakoff <gray@gnu.org.ua>
Use Imprimatur for doc development and maintenance. Use Imprimatur for doc development and maintenance.
* Makefile.am (SUBDIRS): Add imprimatur. * Makefile.am (SUBDIRS): Add imprimatur.
* configure.ac: Invoke IMPRIMATUR_INIT * configure.ac: Invoke IMPRIMATUR_INIT
* doc/Makefile.am: Update. * doc/Makefile.am: Update.
* doc/check-docs.sh: Remove. * doc/check-docs.sh: Remove.
* doc/rendition.texi: Remove. * doc/rendition.texi: Remove.
* doc/untabify.el: Remove. * doc/untabify.el: Remove.
* doc/mastermenu.el: Remove. * doc/mastermenu.el: Remove.
* doc/functions.texi: Minor changes. * doc/functions.texi: Minor changes.
* doc/mailfromd.texi: Minor changes. * doc/mailfromd.texi: Minor changes.
* doc/mfdbtool.texi: Minor changes. * doc/mfdbtool.texi: Minor changes.
2011-09-02 Sergey Poznyakoff <gray@gnu.org.ua> 2011-09-02 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix Bugfix
* src/builtin/io.bi (open_program_stream): Print the value of * src/builtin/io.bi (open_program_stream): Print the value of
errno, not rc (which is irrelevant if execve fails). errno, not rc (which is irrelevant if execve fails).
2011-09-01 Sergey Poznyakoff <gray@gnu.org.ua> 2011-09-01 Sergey Poznyakoff <gray@gnu.org.ua>
Document DSPAM, fix doc compilation. Document DSPAM, fix doc compilation.
* NEWS: Update. * NEWS: Update.
* doc/Makefile.am (AM_MAKEINFOFLAGS): Use abs_top_srcdir * doc/Makefile.am (AM_MAKEINFOFLAGS): Use abs_top_srcdir Pass
Pass --I option to texi2html. --I option to texi2html.
* doc/functions.texi: Document DSPAM. * doc/functions.texi: Document DSPAM. Use @deftypevr instead of
Use @deftypevr instead of @deftypevar. @deftypevar.
* doc/mailfromd.texi: Update. * doc/mailfromd.texi: Update.
2011-08-29 Sergey Poznyakoff <gray@gnu.org.ua>
Further improvements to the message_burst interface.
* NEWS, doc/functions.texi: Update.
* mflib/status.mf (BURST_ERR_MASK): New mask.
(BURST_DECODE): New flag.
* src/builtin/burst.bi (burst_stream) <on_bad_format>: Remove.
<burst_ctl>: New member.
(finish_stream): Select error action from burst_ctl.
(burst_digest): Optionally decode MIME parts.
2011-08-29 Sergey Poznyakoff <gray@gnu.org.ua>
Separate C and MFL constant space.
* mflib/.gitignore: Add status.h
* mflib/Makefile.am (noinst_HEADERS): Add status.h
(BUILT_SOURCES): Expand to noinst_HEADERS
* mflib/dspam.mf: Change prefix to _MFL_
* mflib/status.mf: Likewise.
* mflib/syslog.mf: Likewise.
* src/builtin/builtin.c (_builtin_const_to_c)
(_builtin_c_to_const,_builtin_const_to_bitmap): New functions.
* src/builtin/builtin.def (builtin_const_trans): New struct.
(_builtin_const_to_c,_builtin_c_to_const)
(_builtin_const_to_bitmap): New protos.
* src/builtin/burst.bi: Include mflib/status.h. Rename BURST_
constants to agree with the new prefix.
* src/builtin/dspam.bi: Use translation functions from
builtin.c.
* src/builtin/syslog.bi: Likewise.
* src/builtin/io.bi: Translate shutdown modes.
* src/builtin/snarf.m4 (MF_TRANS_PREFIX): New constant.
(MF_TRANS): New macro.
* src/builtin/system.bi: Translate access modes.
2011-08-29 Sergey Poznyakoff <gray@gnu.org.ua>
Fix NEWS
2011-08-29 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-29 Sergey Poznyakoff <gray@gnu.org.ua>
Further improvements to the message_burst interface. Improve error handling in message_burst.
* NEWS, doc/functions.texi: Update. * mflib/status.mf (BURST_ERR_FAIL)
* mflib/status.mf (BURST_ERR_MASK): New mask. (BURST_ERR_IGNORE,BURST_ERR_BODY): New constants.
(BURST_DECODE): New flag. * src/builtin/burst.bi (burst_stream) <on_bad_format>: New
* src/builtin/burst.bi (burst_stream) <on_bad_format>: Remove. member.
<burst_ctl>: New member. (finish_stream): If the stream cannot be converted to message,
(finish_stream): Select error action from burst_ctl. use on_bad_format to decide what to do with it.
(burst_digest): Optionally decode MIME parts. (message_burst): Take optional argument.
* src/builtin/sa.bi (set_xscript): Now returns void.
Separate C and MFL constant space. * src/prog.c (env_function_cleanup_del): Bugfix.
* mflib/.gitignore: Add status.h
* mflib/Makefile.am (noinst_HEADERS): Add status.h
(BUILT_SOURCES): Expand to noinst_HEADERS
* mflib/dspam.mf: Change prefix to _MFL_
* mflib/status.mf: Likewise.
* mflib/syslog.mf: Likewise.
* src/builtin/builtin.c (_builtin_const_to_c)
(_builtin_c_to_const,_builtin_const_to_bitmap): New functions.
* src/builtin/builtin.def (builtin_const_trans): New struct.
(_builtin_const_to_c,_builtin_c_to_const)
(_builtin_const_to_bitmap): New protos.
* src/builtin/burst.bi: Include mflib/status.h. Rename BURST_
constants to agree with the new prefix.
* src/builtin/dspam.bi: Use translation functions from builtin.c.
* src/builtin/syslog.bi: Likewise.
* src/builtin/io.bi: Translate shutdown modes.
* src/builtin/snarf.m4 (MF_TRANS_PREFIX): New constant.
(MF_TRANS): New macro.
* src/builtin/system.bi: Translate access modes.
Fix NEWS
Improve error handling in message_burst.
* mflib/status.mf (BURST_ERR_FAIL)
(BURST_ERR_IGNORE,BURST_ERR_BODY): New constants.
* src/builtin/burst.bi (burst_stream) <on_bad_format>: New member.
(finish_stream): If the stream cannot be converted to message,
use on_bad_format to decide what to do with it.
(message_burst): Take optional argument.
* src/builtin/sa.bi (set_xscript): Now returns void.
* src/prog.c (env_function_cleanup_del): Bugfix.
* NEWS, doc/functions.texi: Document the changes to message_burst. * NEWS, doc/functions.texi: Document the changes to
message_burst.
2011-08-27 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes. Minor changes.
* src/builtin/burst.bi (DEFAULT_EB_LEN): New define * src/builtin/burst.bi (DEFAULT_EB_LEN): New define
(MF_INIT): Initialize burst_eb_min_length. (MF_INIT): Initialize burst_eb_min_length.
* doc/functions.texi: Document RFC 934 functions. * doc/functions.texi: Document RFC 934 functions.
Implement a built-in function for bursting RFC 934 digests.
* configure.ac: Require Mailutils 2.99.93
* src/prog.c (_cleanup_destroy) allow for clos->cleanup == NULL.
(env_function_cleanup_del): New function.
* src/prog.h (env_function_cleanup_del): New proto.
* mflib/status.mf (e_format): New exception.
* src/builtin/snarf.m4 (MF_CLR_CLEANUP): New macro.
* src/builtin/burst.bi: New source.
* src/builtin/Makefile.am (BI_FILES): Add burst.bi
* src/builtin/body.bi (current_message): Pass MF_MSG_CURRENT
to bi_message_register.
* src/builtin/mbox.bi (mailbox_get_message): Pass MF_MSG_MAILBOX
to bi_message_register.
* src/builtin/msg.bi (drop_current_message)
(bi_get_current_message): Check for MF_MSG_CURRENT
(bi_close_message): Destroy the message if type is MF_MSG_STANDALONE.
(bi_message_register): Change meaning of the last argument.
* src/builtin/msg.h (MF_MSG_MAILBOX)
(MF_MSG_CURRENT,MF_MSG_STANDALONE): New defines.
(mf_message) <mylist>: Remove.
(mf_message) <current>: Rename to type.
* src/builtin/sieve.bi: Fix a bug introduced in 19f41d6c5b.
* NEWS: Document message_burst. 2011-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/functions.texi: Restructure the "Message functions" section.
Implement a built-in function for bursting RFC 934 digests.
* configure.ac: Require Mailutils 2.99.93
* src/prog.c (_cleanup_destroy) allow for clos->cleanup == NULL.
(env_function_cleanup_del): New function.
* src/prog.h (env_function_cleanup_del): New proto.
* mflib/status.mf (e_format): New exception.
* src/builtin/snarf.m4 (MF_CLR_CLEANUP): New macro.
* src/builtin/burst.bi: New source.
* src/builtin/Makefile.am (BI_FILES): Add burst.bi
* src/builtin/body.bi (current_message): Pass MF_MSG_CURRENT to
bi_message_register.
* src/builtin/mbox.bi (mailbox_get_message): Pass MF_MSG_MAILBOX
to bi_message_register.
* src/builtin/msg.bi (drop_current_message)
(bi_get_current_message): Check for MF_MSG_CURRENT
(bi_close_message): Destroy the message if type is
MF_MSG_STANDALONE.
(bi_message_register): Change meaning of the last argument.
* src/builtin/msg.h (MF_MSG_MAILBOX)
(MF_MSG_CURRENT,MF_MSG_STANDALONE): New defines.
(mf_message) <mylist>: Remove.
(mf_message) <current>: Rename to type.
* src/builtin/sieve.bi: Fix a bug introduced in 19f41d6c5b.
* NEWS: Document message_burst.
* doc/functions.texi: Restructure the "Message functions"
section.
2011-08-24 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
Improve third-party interfaces to process arbitrary messages (not only cu Improve third-party interfaces to process arbitrary messages
rrent one). (not only current one).
* NEWS: Updated. * NEWS: Updated.
* doc/functions.texi: Reflect changes in sieve, clamav * doc/functions.texi: Reflect changes in sieve, clamav and sa
and sa (spamc) functions. (spamc) functions.
* mflib/Makefile.am: Build sa.h * mflib/Makefile.am: Build sa.h
* mflib/sa.mf (SA_SYMBOLS, SA_REPORT) * mflib/sa.mf (SA_SYMBOLS, SA_REPORT)
(SA_LEARN_SPAM,SA_LEARN_HAM,SA_FORGET): New constants. (SA_LEARN_SPAM,SA_LEARN_HAM,SA_FORGET): New constants.
(sa): Wrapper over spamc for backward compatibility. (sa): Wrapper over spamc for backward compatibility.
* src/builtin/Makefile.am (builtin.h): Depends on builtin.def * src/builtin/Makefile.am (builtin.h): Depends on builtin.def
* src/builtin/body.bi (current_message): Use MF_STREAM_TO_MESSAGE. * src/builtin/body.bi (current_message): Use
* src/builtin/builtin.c: Add more includes. MF_STREAM_TO_MESSAGE.
(_builtin_stream_cleanup): New function. * src/builtin/builtin.c: Add more includes.
(_builtin_mu_stream_to_message): New function. (_builtin_stream_cleanup): New function.
* src/builtin/builtin.def (_builtin_stream_cleanup) (_builtin_mu_stream_to_message): New function.
(_builtin_mu_stream_to_message): New protos. * src/builtin/builtin.def (_builtin_stream_cleanup)
* src/builtin/dspam.bi: Use _builtin_stream_cleanup for (_builtin_mu_stream_to_message): New protos.
stream cleanups. * src/builtin/dspam.bi: Use _builtin_stream_cleanup for stream
* src/builtin/msg.bi (message_from_stream): Use MF_STREAM_TO_MESSAGE. cleanups.
* src/builtin/sa.bi (open_connection): Register returned stream * src/builtin/msg.bi (message_from_stream): Use
for cleanup. MF_STREAM_TO_MESSAGE.
(sa): Rewrite as spamc function. * src/builtin/sa.bi (open_connection): Register returned stream
(clamav): Take message descriptor as the first argument. for cleanup.
* src/builtin/sieve.bi (sieve): Take message descriptor as the first argu (sa): Rewrite as spamc function.
ment. (clamav): Take message descriptor as the first argument.
Use cleanups. * src/builtin/sieve.bi (sieve): Take message descriptor as the
* src/builtin/snarf.m4 (MF_STREAM_TO_MESSAGE): New macro. first argument. Use cleanups.
* src/main.c (options): Remove "debug" option, handled by srvcfg.c * src/builtin/snarf.m4 (MF_STREAM_TO_MESSAGE): New macro.
* tests/bctx00.at: Use current_message function. * src/main.c (options): Remove "debug" option, handled by
* tests/bctx01.at: Likewise. srvcfg.c
* tests/fctx00.at: Likewise. * tests/bctx00.at: Use current_message function.
* tests/fctx01.at: Likewise. * tests/bctx01.at: Likewise.
* tests/fctx00.at: Likewise.
* tests/fctx01.at: Likewise.
2011-08-23 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-23 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix. Bugfix.
* src/builtin/dspam.bi: Translate return code. * src/builtin/dspam.bi: Translate return code. Change handling
Change handling of class_src argument. of class_src argument.
* mflib/dspam.mf: Redefine DSS_NONE,DSR_NONE to be 0. * mflib/dspam.mf: Redefine DSS_NONE,DSR_NONE to be 0.
2011-08-22 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
Parse dspam configuration file. Parse dspam configuration file.
* mflib/dspam.mf: Start DSZ_ constants from 1. * mflib/dspam.mf: Start DSZ_ constants from 1.
* src/builtin/dspam.bi: Parse dspam.conf * src/builtin/dspam.bi: Parse dspam.conf
* src/builtin/snarf.m4 (__MF_DSEXP_REQ): Fix quoting. * src/builtin/snarf.m4 (__MF_DSEXP_REQ): Fix quoting.
2011-08-21 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change Minor change
* src/builtin/dspam.bi: Configure training mode. * src/builtin/dspam.bi: Configure training mode.
2011-08-20 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes. Minor fixes.
2011-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromd
2011-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Implement dspam support. Implement dspam support.
* configure.ac: Check for dspam * configure.ac: Check for dspam
* mflib/.gitignore: Add dspam.h * mflib/.gitignore: Add dspam.h
* mflib/Makefile.am: Build dspam.h * mflib/Makefile.am: Build dspam.h Install dspam.mf
Install dspam.mf * mflib/dspam.mf: New file.
* mflib/dspam.mf: New file. * src/Makefile.am (mailfromd_LDADD): Add DSPAM_LIBS
* src/Makefile.am (mailfromd_LDADD): Add DSPAM_LIBS (INCLUDES): Add DSPAM_CFLAGS
(INCLUDES): Add DSPAM_CFLAGS * src/builtin/Makefile.am (BI_FILES): Add dspam.bi.
* src/builtin/Makefile.am (BI_FILES): Add dspam.bi. (INCLUDES): Add DSPAM_CFLAGS
(INCLUDES): Add DSPAM_CFLAGS * src/builtin/dspam.bi: New file.
* src/builtin/dspam.bi: New file. * src/main.c (mailfromd_show_defaults): Reflect dspam support.
* src/main.c (mailfromd_show_defaults): Reflect dspam support.
2011-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
New macros and functions for registering function cleanup sequence in env
ironments. New macros and functions for registering function cleanup
sequence in environments.
Cleanup sequence holds pointers to data created within the function along
with the corresponding functions for their disposal. When the function Cleanup sequence holds pointers to data created within the
terminates or raises an exception, the sequence is executed thereby freei function along with the corresponding functions for their
ng disposal. When the function terminates or raises an exception,
the temporary data. the sequence is executed thereby freeing the temporary data.
* mflib/mfh.awk: Convert # comments to C-style. * mflib/mfh.awk: Convert # comments to C-style.
* src/builtin/io.bi (REDIRECT_STDOUT_P): Remove useless comparison. * src/builtin/io.bi (REDIRECT_STDOUT_P): Remove useless
* src/builtin/snarf.m4 (MF_VAR_STRING): New macro comparison.
(END): Call env_function_cleanup_flush. * src/builtin/snarf.m4 (MF_VAR_STRING): New macro
(MF_DCL_CLEANUP,MF_CLEANUP): New macros. (END): Call env_function_cleanup_flush.
* src/builtin/spf.bi (spf_check_host) (MF_DCL_CLEANUP,MF_CLEANUP): New macros.
(spf_test_record): Use MF_VAR_STRING to initialize q.exp_prefix. * src/builtin/spf.bi (spf_check_host)
* src/prog.c (environ_cleanup_closure): New struct. (spf_test_record): Use MF_VAR_STRING to initialize q.exp_prefix.
(eval_environ)<cleanup_list>: New member. * src/prog.c (environ_cleanup_closure): New struct.
(env_create_cleanup_list): New static function. (eval_environ)<cleanup_list>: New member.
(env_function_cleanup_flush) (env_create_cleanup_list): New static function.
(env_function_cleanup_add): New function. (env_function_cleanup_flush)
(env_throw_0): Call env_function_cleanup_flush. (env_function_cleanup_add): New function.
(create_environment): Create cleanup_list. (env_throw_0): Call env_function_cleanup_flush.
(destroy_environment): Destroy it. (create_environment): Create cleanup_list.
* src/prog.h (env_function_cleanup_add) (destroy_environment): Destroy it.
(env_function_cleanup_flush): New protos. * src/prog.h (env_function_cleanup_add)
(env_function_cleanup_flush): New protos.
2011-08-18 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-18 Sergey Poznyakoff <gray@gnu.org.ua>
Improve I/O interface, implement new functions. Improve I/O interface, implement new functions.
* mflib/status.mf (SHUT_RD,SHUT_RW) * mflib/status.mf (SHUT_RD,SHUT_RW)
(SHUT_RDWR): New constants. (SHUT_RDWR): New constants.
* src/builtin/io.bi (io_stream) <shutdown>: New member * src/builtin/io.bi (io_stream) <shutdown>: New member
(open_inet_stream): Set str->shutdown. (open_inet_stream): Set str->shutdown.
(tempfile,shutdown,rewind,copy): New built-in functions. (tempfile,shutdown,rewind,copy): New built-in functions.
* src/builtin/mail.bi (_send): Recipient address (to) * src/builtin/mail.bi (_send): Recipient address (to) can be
can be null. null.
(send_mail,send_text): `To' argument is now optional. (send_mail,send_text): `To' argument is now optional.
(send_message): New built-in function. (send_message): New built-in function.
* src/builtin/msg.bi (message_copy): Rename to * src/builtin/msg.bi (message_copy): Rename to message_to_stream
message_to_stream (message_copy_body): Rename to message_body_to_stream.
(message_copy_body): Rename to message_body_to_stream. (message_to_stream): New built-in function.
(message_to_stream): New built-in function.
* NEWS: Document new functions. * NEWS: Document new functions.
* doc/functions.texi: Likewise. * doc/functions.texi: Likewise.
2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Pass content size to item printers Pass content size to item printers
* lib/mfdb.h (db_item_printer_t): Take four arguments. * lib/mfdb.h (db_item_printer_t): Take four arguments.
* lib/cache.c: Update item printers. * lib/cache.c: Update item printers.
* lib/db.c: Likewise. * lib/db.c: Likewise.
* lib/greylist.c: Likewise. * lib/greylist.c: Likewise.
* lib/tbf_rate.c: Likewise. * lib/tbf_rate.c: Likewise.
* lib/rate.c: Likewise. * lib/rate.c: Likewise.
Minor fix 2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
Implement getenv() builtin and string_list_iterate macro. Minor fix
* mflib/pp-setup (string_list_iterate): New macro. 2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
* src/builtin/system.bi (getenv): New function.
* NEWS: Update. Implement getenv() builtin and string_list_iterate macro.
* doc/functions.texi: Update.
* doc/mailfromd.texi: Update. * mflib/pp-setup (string_list_iterate): New macro.
* src/builtin/system.bi (getenv): New function.
Implement message_copy and message_body_copy built-ins. * NEWS: Update.
* doc/functions.texi: Update.
* doc/mailfromd.texi: Update.
* src/builtin/io.bi (_bi_io_fd): New function. 2011-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
* src/builtin/msg.bi (message_copy)
(message_body_copy): New builtin functions. Implement message_copy and message_body_copy built-ins.
* src/builtin/msg.h (_bi_io_fd): New proto.
* doc/functions.texi: Document new functions. * src/builtin/io.bi (_bi_io_fd): New function.
* NEWS: Mention new functions. * src/builtin/msg.bi (message_copy)
(message_body_copy): New builtin functions.
* src/builtin/msg.h (_bi_io_fd): New proto.
* doc/functions.texi: Document new functions.
* NEWS: Mention new functions.
2011-08-16 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
Fix IPv6 recognition in configure. Fix IPv6 recognition in configure.
* am/ipv6.m4: check whether getaddrinfo works for AF_INET6. * am/ipv6.m4: check whether getaddrinfo works for AF_INET6.
* tests/connect03.at: Fix prerequisite. * tests/connect03.at: Fix prerequisite.
2011-08-14 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-14 Sergey Poznyakoff <gray@gnu.org.ua>
Call connect handler from mtasim. Call connect handler from mtasim.
* configure.ac (MF_IPV6_SUPPORT): New subst var. * configure.ac (MF_IPV6_SUPPORT): New subst var.
* gacopyz/gacopyz_priv.h (GACOPYZ_IPV6PREFIX_STR) * gacopyz/gacopyz_priv.h (GACOPYZ_IPV6PREFIX_STR)
(GACOPYZ_IPV6PREFIX_LEN): New macros. (GACOPYZ_IPV6PREFIX_LEN): New macros.
* gacopyz/gacopyz.h (gacopyz_srv_connect): Rename to gacopyz_srv_open * gacopyz/gacopyz.h (gacopyz_srv_connect): Rename to
(gacopyz_srv_conn): Rename to gacopyz_srv_connect. gacopyz_srv_open
* gacopyz/gacopyz.c (shan_connect): Use GACOPYZ_IPV6PREFIX_STR (gacopyz_srv_conn): Rename to gacopyz_srv_connect.
and GACOPYZ_IPV6PREFIX_LEN macros instead of the literals. * gacopyz/gacopyz.c (shan_connect): Use GACOPYZ_IPV6PREFIX_STR
<inet6>: Convert port to network byte order. and GACOPYZ_IPV6PREFIX_LEN macros instead of the literals.
* gacopyz/server.c (gacopyz_srv_connect): Rename to gacopyz_srv_open. <inet6>: Convert port to network byte order.
(gacopyz_srv_conn): Remove. * gacopyz/server.c (gacopyz_srv_connect): Rename to
(gacopyz_srv_connect): New function. gacopyz_srv_open.
* mtasim/mtasim.c (sender_hostname, sender_sockaddr): New variables. (gacopyz_srv_conn): Remove.
(OPTION_SENDER_SOCKADDR): New option code. (gacopyz_srv_connect): New function.
(options)<--sender-sockaddr>: New option. * mtasim/mtasim.c (sender_hostname, sender_sockaddr): New
(parse_opt): Handle OPTION_SENDER_SOCKADDR. variables.
(main): Call gacopyz_srv_connect if sender_hostname is set. (OPTION_SENDER_SOCKADDR): New option code.
(smtp): Call gacopyz_srv_connect before handling first (options)<--sender-sockaddr>: New option.
SMTP command, unless it has already been called before. (parse_opt): Handle OPTION_SENDER_SOCKADDR.
(shell_help): Show \S command if available. (main): Call gacopyz_srv_connect if sender_hostname is set.
(shell): Handle \S command. (smtp): Call gacopyz_srv_connect before handling first SMTP
* pmult/pmult.c: Reflect the above changes. command, unless it has already been called before.
* tests/Makefile.am (TESTSUITE_AT): Add connect00.at, connect01.at, (shell_help): Show \S command if available.
connect02.at and connect03.at. (shell): Handle \S command.
* tests/testsuite.at: Include connect00.at -- connect03.at. * pmult/pmult.c: Reflect the above changes.
* tests/atlocal.in (MF_IPV6_SUPPORT): New variable. * tests/Makefile.am (TESTSUITE_AT): Add connect00.at,
* tests/connect00.at: New testcase. connect01.at, connect02.at and connect03.at.
* tests/connect01.at: New testcase. * tests/testsuite.at: Include connect00.at -- connect03.at.
* tests/connect02.at: New testcase. * tests/atlocal.in (MF_IPV6_SUPPORT): New variable.
* tests/connect03.at: New testcase. * tests/connect00.at: New testcase.
* tests/connect01.at: New testcase.
* NEWS: Update. * tests/connect02.at: New testcase.
* doc/mtasim.texi: Document the \S command and the --sender-sockaddr * tests/connect03.at: New testcase.
option.
* doc/mailfromd.texi: Update. * NEWS: Update.
* doc/mtasim.texi: Document the \S command and the
--sender-sockaddr option.
* doc/mailfromd.texi: Update.
2011-08-09 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
Add a testcase for #! ... !# comment. Add a testcase for #! ... !# comment.
* tests/atlocal.in (MAILFROMD): New variable. * tests/atlocal.in (MAILFROMD): New variable.
* tests/shellmagic.at: New file. * tests/shellmagic.at: New file.
* tests/Makefile.am: Add shellmagic.at * tests/Makefile.am: Add shellmagic.at
* tests/testsuite.at: Include shellmagic.at * tests/testsuite.at: Include shellmagic.at
Minor fix. 2011-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix.
* doc/mailfromd.texi: Make it clear that the initial #! must * doc/mailfromd.texi: Make it clear that the initial #! must
have a closing !#. have a closing !#.
2011-08-08 Sergey Poznyakoff <gray@gnu.org.ua> 2011-08-08 Sergey Poznyakoff <gray@gnu.org.ua>
Implement the initial #! ... !# block comment. Implement the initial #! ... !# block comment.
* src/lex.l: Handle initial #! ... !# block comment. * src/lex.l: Handle initial #! ... !# block comment.
* doc/mailfromd.texi: Document the #! ... !# comment. * doc/mailfromd.texi: Document the #! ... !# comment.
* NEWS: Update. * NEWS: Update.
2011-07-18 Sergey Poznyakoff <gray@gnu.org.ua> 2011-07-18 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix Bugfix
* src/builtin/mail.bi: Redo message creation using * src/builtin/mail.bi: Redo message creation using a static
a static stream. stream.
2011-07-05 Sergey Poznyakoff <gray@gnu.org.ua> 2011-07-05 Sergey Poznyakoff <gray@gnu.org.ua>
Improve reporting of startup errors. HUP restarts the program only if syn Improve reporting of startup errors. HUP restarts the program
tax check succeeds. only if syntax check succeeds.
* lib/libmf.h (mf_server_lint_option): New extern. * lib/libmf.h (mf_server_lint_option): New extern.
* lib/server.c (mf_server_lint_option): New global * lib/server.c (mf_server_lint_option): New global variable.
variable. (sig_restart): Don't call mfd_srvman_stop.
(sig_restart): Don't call mfd_srvman_stop. (run_lint,server_idle_hook): New functions.
(run_lint,server_idle_hook): New functions. (mf_server_start): Install idle hook. HUP restarts the program
(mf_server_start): Install idle hook. only if syntax check succeeds. Close fds above 2 if using stderr
HUP restarts the program only if syntax check succeeds. for error output, and from 1 if using syslog.
Close fds above 2 if using stderr for error output, * src/calloutd.c (main): Call mu_stdstream_setup. Set
and from 1 if using syslog. mf_server_lint_option.
* src/calloutd.c (main): Call mu_stdstream_setup. * src/main.c (main): Check whether stderr is open as early as
Set mf_server_lint_option. possible. Update call to mu_stdstream_setup (needs MU
* src/main.c (main): Check whether stderr is open as early as possible. 5e1d982ec). Set mf_server_lint_option.
Update call to mu_stdstream_setup (needs MU 5e1d982ec). * src/srvcfg.c (srv_parse_opt): Make sure --syslog takes effect
Set mf_server_lint_option. at once.
* src/srvcfg.c (srv_parse_opt): Make sure --syslog takes effect
at once.
2011-07-04 Sergey Poznyakoff <gray@gnu.org.ua> 2011-07-04 Sergey Poznyakoff <gray@gnu.org.ua>
Minor improvement. Minor improvement.
* lib/srvman.c (report_exit_status): Surround PIDs with square brackets * lib/srvman.c (report_exit_status): Surround PIDs with square
to facilitate grepping in logfiles. brackets to facilitate grepping in logfiles.
Bugfix 2011-07-04 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/syslog_async.c (find_percent_m): Fix endless loop. Bugfix
* lib/syslog_async.c (find_percent_m): Fix endless loop.
2011-06-30 Sergey Poznyakoff <gray@gnu.org.ua> 2011-06-30 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change. Minor change.
* etc/Makefile.am (install-data-local): Don't check for the * etc/Makefile.am (install-data-local): Don't check for the
pre-6.0 mailfromd.rc pre-6.0 mailfromd.rc
2011-06-20 Sergey Poznyakoff <gray@gnu.org.ua> 2011-06-20 Sergey Poznyakoff <gray@gnu.org.ua>
Restore last_poll_host. Restore last_poll_host.
* mflib/callout.mf4 (callout_do): Handle INIT. * mflib/callout.mf4 (callout_do): Handle INIT.
* src/callout.c (callout_io): Pass hostname as argument to INIT. * src/callout.c (callout_io): Pass hostname as argument to INIT.
* src/savsrv.c (savsrv_smtp_io_callback): Don't ignore INIT. * src/savsrv.c (savsrv_smtp_io_callback): Don't ignore INIT.
2011-03-30 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-30 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix Minor fix
* mflib/portprobe.mf4 (portprobe): Allow for family
specification in host argument.
* mflib/portprobe.mf4 (portprobe): Allow for family specification 2011-03-30 Sergey Poznyakoff <gray@gnu.org.ua>
in host argument.
Implement IPv6 support. Implement IPv6 support.
* am/ipv6.m4: New file * am/ipv6.m4: New file
* configure.ac: Call MF_ENABLE_IPV6 * configure.ac: Call MF_ENABLE_IPV6
* gacopyz/gacopyz.c (parse_url,do_connect) * gacopyz/gacopyz.c (parse_url,do_connect)
(gacopyz_parse_connection): Handle IPv6 addresses. (gacopyz_parse_connection): Handle IPv6 addresses.
(shan_connect): Remove IPv6: prefix from addresses. (shan_connect): Remove IPv6: prefix from addresses.
* gacopyz/gacopyz.h (milter_sockaddr_t) [GACOPYZ_IPV6] <sin6>: New member * gacopyz/gacopyz.h (milter_sockaddr_t) [GACOPYZ_IPV6] <sin6>:
. New member.
(gacopyz_srv_set_source): Alter signature. (gacopyz_srv_set_source): Alter signature.
* gacopyz/server.c (gacopyz_srv) <source_addr>: Change type to * gacopyz/server.c (gacopyz_srv) <source_addr>: Change type to
struct sockaddr. All uses updated. struct sockaddr. All uses updated.
<source_addr_len>: New member. <source_addr_len>: New member.
(gacopyz_srv_set_source): Change signature. (gacopyz_srv_set_source): Change signature.
(gacopyz_srv_destroy): Free source_addr. (gacopyz_srv_destroy): Free source_addr.
(srv_connect): Support IPv6 (srv_connect): Support IPv6
* lib/srvman.c (srvman_url_to_sockaddr): Handle IPv6 addresses. * lib/srvman.c (srvman_url_to_sockaddr): Handle IPv6 addresses.
* mflib/status.mf (FAMILY_INET6): New constant. * mflib/status.mf (FAMILY_INET6): New constant.
* src/builtin/io.bi (open_parsed_inet_stream): Handle IPv6 addresses. * src/builtin/io.bi (open_parsed_inet_stream): Handle IPv6
* src/builtin/vars.bi (set_milter_$1_address): Handle IPv6 addresses. addresses.
* src/engine.c (mlfi_connect): Handle IPv6 addresses. * src/builtin/vars.bi (set_milter_$1_address): Handle IPv6
* src/callout.c (smtp_io_open): Handle IPv6 addresses. addresses.
* src/mailfromd.h (MFAM_INET6): New constant. * src/engine.c (mlfi_connect): Handle IPv6 addresses.
(source_address): Change type to struct mu_sockaddr. * src/callout.c (smtp_io_open): Handle IPv6 addresses.
* src/srvcfg.c (source_address): Change type to struct mu_sockaddr. * src/mailfromd.h (MFAM_INET6): New constant.
(mf_srvcfg_add): Don't abort if mfd_server_new returns NULL (source_address): Change type to struct mu_sockaddr.
(mf_option_source_ip,option_source_ip): Remove. * src/srvcfg.c (source_address): Change type to struct
(set_source_ip): Use mu_sockaddr_from_node to parse the address. mu_sockaddr.
(cb_source_ip): Call set_source_ip. (mf_srvcfg_add): Don't abort if mfd_server_new returns NULL
* src/srvcfg.h (source_address): Change type to struct mu_sockaddr. (mf_option_source_ip,option_source_ip): Remove.
(set_source_ip): Use mu_sockaddr_from_node to parse the address.
(cb_source_ip): Call set_source_ip.
* src/srvcfg.h (source_address): Change type to struct
mu_sockaddr.
2011-03-25 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-25 Sergey Poznyakoff <gray@gnu.org.ua>
Version 7.99.90 Version 7.99.90
Version number updated to avoid confusion with the 7.x branch Version number updated to avoid confusion with the 7.x branch
2011-03-24 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-24 Sergey Poznyakoff <gray@gnu.org.ua>
syslog_async: add support for %m format specifier. syslog_async: add support for %m format specifier.
* lib/syslog_async.c (find_percent_m): New static function.
(vsyslog_async_logger): New static function, from renamed
vsyslog_async.
(syslog_async, vsyslog_async): Rewrite as a wrapper around
vsyslog_async_logger.
* lib/syslog_async.c (find_percent_m): New static function. 2011-03-24 Sergey Poznyakoff <gray@gnu.org.ua>
(vsyslog_async_logger): New static function, from renamed
vsyslog_async.
(syslog_async, vsyslog_async): Rewrite as a wrapper around
vsyslog_async_logger.
Minor change Minor change
* src/callout.c (callout_host): Reword a debugging message. * src/callout.c (callout_host): Reword a debugging message.
2011-03-23 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-23 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix Minor fix
* src/builtin/.gitignore: Add syslog.c * src/builtin/.gitignore: Add syslog.c
Implement modulo operator. 2011-03-23 Sergey Poznyakoff <gray@gnu.org.ua>
* src/drivers.c (optimize_arith,code_type_bin): Implement modulo Implement modulo operator.
operator.
* src/gram.y: Implement modulo operator.
* src/lex.l: Withdraw support for %ident.
* src/mailfromd.h (bin_opcode) <bin_mod>: New constant.
* src/opcodes (MOD): New opcode.
* src/prog.c (instr_mod): New function.
* doc/mailfromd.texi: Update.
* NEWS: Update.
Minor change * src/drivers.c (optimize_arith,code_type_bin): Implement modulo
operator.
* src/gram.y: Implement modulo operator.
* src/lex.l: Withdraw support for %ident.
* src/mailfromd.h (bin_opcode) <bin_mod>: New constant.
* src/opcodes (MOD): New opcode.
* src/prog.c (instr_mod): New function.
* doc/mailfromd.texi: Update.
* NEWS: Update.
* mflib/syslog.mf: Rewrite facility constants in a 2011-03-23 Sergey Poznyakoff <gray@gnu.org.ua>
traditional way, i.e. as (N<<3).
Implement bitwise shifts. Minor change
* doc/mailfromd.texi: Document << and >> * mflib/syslog.mf: Rewrite facility constants in a traditional
* src/drivers.c (optimize_arith,optimize_type_bin): Implement way, i.e. as (N<<3).
bitwise operations.
* src/gram.y: Implement bitwise << and >>.
* src/lex.l: Likewise.
* src/mailfromd.h (bin_opcode): New opcodes bin_shl and bin_shr.
* src/opcodes (SHL, SHR): New opcodes.
Bugfix in syslog_async 2011-03-23 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/syslog_async.c (vsyslog_async): accept the facility level Implement bitwise shifts.
ORed in the priority argument.
New builtin function: syslog. * doc/mailfromd.texi: Document << and >>
* src/drivers.c (optimize_arith,optimize_type_bin): Implement
* lib/libmf.h (logger) <log_text>: New member bitwise operations.
(logger_text): New proto. * src/gram.y: Implement bitwise << and >>.
* lib/logger.c: Add static qualifiers where they belong * src/lex.l: Likewise.
(syslog_default_logtext,syslog_async_logtext): New static functions. * src/mailfromd.h (bin_opcode): New opcodes bin_shl and bin_shr.
(logger_text): New function. * src/opcodes (SHL, SHR): New opcodes.
* mflib/mfh.awk: New file.
* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): Add syslog.h 2011-03-23 Sergey Poznyakoff <gray@gnu.org.ua>
(EXTRA_DIST): Add mfh.awk
(.mf.h): Use mfh.awk to generate the goal. Bugfix in syslog_async
* mflib/.gitignore: Add syslog.h
* src/builtin/syslog.bi: New file. * lib/syslog_async.c (vsyslog_async): accept the facility level
* src/builtin/Makefile.am (BI_FILES): Add syslog.bi ORed in the priority argument.
* NEWS: Update.
* doc/functions.texi: Update.
2011-03-22 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-22 Sergey Poznyakoff <gray@gnu.org.ua>
Use C-escape filter (MU b5c66e41) to format trace output. New builtin function: syslog.
* src/main.c (mf_trace_stream): New static var. * lib/libmf.h (logger) <log_text>: New member
(open_trace_stream): New static function. (logger_text): New proto.
(trace): Print to mf_trace_stream. * lib/logger.c: Add static qualifiers where they belong
(syslog_default_logtext,syslog_async_logtext): New static
functions.
(logger_text): New function.
* mflib/mfh.awk: New file.
* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): Add syslog.h
(EXTRA_DIST): Add mfh.awk
(.mf.h): Use mfh.awk to generate the goal.
* mflib/.gitignore: Add syslog.h
* src/builtin/syslog.bi: New file.
* src/builtin/Makefile.am (BI_FILES): Add syslog.bi
* NEWS: Update.
* doc/functions.texi: Update.
2011-03-22 Sergey Poznyakoff <gray@gnu.org.ua>
Use C-escape filter (MU b5c66e41) to format trace output.
* src/main.c (mf_trace_stream): New static var.
(open_trace_stream): New static function.
(trace): Print to mf_trace_stream.
2011-03-19 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-19 Sergey Poznyakoff <gray@gnu.org.ua>
Document enable-vrfy. Document enable-vrfy.
Update docs. 2011-03-19 Sergey Poznyakoff <gray@gnu.org.ua>
* NEWS: Update. Update docs.
* doc/mailfromd.texi: Remove the description of the
standalone listen statement, * NEWS: Update.
Move descriptionis of --lock-retry-* options to mfdbtool.texi * doc/mailfromd.texi: Remove the description of the standalone
* doc/mfdbtool.texi: Describe --lock-retry-* options. listen statement, Move descriptionis of --lock-retry-* options
* doc/Makefile.am (check-config): Ignore keywords not to mfdbtool.texi
starting with [a-zA-Z_]. * doc/mfdbtool.texi: Describe --lock-retry-* options.
* doc/Makefile.am (check-config): Ignore keywords not starting
Restore lock-retry-count and lock-retry-timeout configuration statements with [a-zA-Z_].
* lib/mf-dbm.h (lock_retry_timeout_option): New extern. 2011-03-19 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/libmf.h (mf_option_time_t, config_cb_time_t): New protos.
* lib/optcache.c (mf_option_time_t): New function.
* lib/utils.c (config_cb_time_t): New function.
* src/main.c (mf_cfg_param): Restore lock-retry-count
and lock-retry-timeout statements.
(cb_timeout): Remove. Use config_cb_timeout instead
* mfdbtool.c (options, parse_opt): Enable --lock-retry-count
and --lock-retry-timeout options,
(option_cache): Define lock-retry-count and lock-retry-timeout
caches.
* TODO: Update
Provide a definition of timersub for platforms missing it Restore lock-retry-count and lock-retry-timeout configuration
statements
* gacopyz/gacopyz_priv.h [!timersub]: Define timersub * lib/mf-dbm.h (lock_retry_timeout_option): New extern.
* lib/libmf.h (mf_option_time_t, config_cb_time_t): New protos.
* lib/optcache.c (mf_option_time_t): New function.
* lib/utils.c (config_cb_time_t): New function.
* src/main.c (mf_cfg_param): Restore lock-retry-count and
lock-retry-timeout statements.
(cb_timeout): Remove. Use config_cb_timeout instead
* mfdbtool.c (options, parse_opt): Enable --lock-retry-count and
--lock-retry-timeout options,
(option_cache): Define lock-retry-count and lock-retry-timeout
caches.
* TODO: Update
2011-03-19 Sergey Poznyakoff <gray@gnu.org.ua>
Provide a definition of timersub for platforms missing it
* gacopyz/gacopyz_priv.h [!timersub]: Define timersub
2011-03-18 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-18 Sergey Poznyakoff <gray@gnu.org.ua>
mtasim: minor improvement mtasim: minor improvement
* mtasim/mtasim.c (start_mailfromd): Print mailfromd PID in
verbose mode.
* mtasim/mtasim.c (start_mailfromd): Print mailfromd PID in verbose mode. 2011-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
Rethink the solution to mtasim interaction problem (see c0535e8e). Rethink the solution to mtasim interaction problem (see
c0535e8e).
* src/main.c (parse_opt) <OPTION_MTASIM>: Rollback c0535e8e. * src/main.c (parse_opt) <OPTION_MTASIM>: Rollback c0535e8e.
(mtasim_option): Move to srvcfg.c. (mtasim_option): Move to srvcfg.c.
* src/srvcfg.c (server_section_parser) <mu_cfg_section_end>: If * src/srvcfg.c (server_section_parser) <mu_cfg_section_end>: If
mtasim_option is set, ignore the server statements. mtasim_option is set, ignore the server statements.
2011-03-17 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix Bugfix
* src/builtin/debug.bi (callout_transcript): Fix return type.
* src/builtin/debug.bi (callout_transcript): Fix return type. 2011-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
Implement callout_transcript function to toggle SMTP transcript on and of Implement callout_transcript function to toggle SMTP transcript
f. on and off.
* src/builtin/debug.bi (callout_transcript): New function. * src/builtin/debug.bi (callout_transcript): New function.
* NEWS: Mention callout_transcript. * NEWS: Mention callout_transcript.
* doc/functions.texi: Document callout_transcript. * doc/functions.texi: Document callout_transcript.
2011-03-17 Sergey Poznyakoff <gray@gnu.org.ua>
Improve interaction with mtasim. Improve interaction with mtasim.
Jan Rafaj reported that the use of mtasim -Xauto may result in Jan Rafaj reported that the use of mtasim -Xauto may result in
the subordinate mailfromd removing the UNIX communication sockets the subordinate mailfromd removing the UNIX communication
of the main running process. This can happen if: (1) there is sockets of the main running process. This can happen if: (1)
a mailfromd process running on the box where mtasim is run and there is a mailfromd process running on the box where mtasim is
(2) the user does not supply --no-site-config option to the subordinate. run and
(2) the user does not supply --no-site-config option to the
subordinate.
* src/main.c (parse_opt) <OPTION_MTASIM>: Inhibit * src/main.c (parse_opt) <OPTION_MTASIM>: Inhibit loading of the
loading of the default configuration files. default configuration files.
2011-03-14 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-14 Sergey Poznyakoff <gray@gnu.org.ua>
docs: document mailfromd options docs: document mailfromd options
* doc/Makefile.am (check-config): Fix the rule * doc/Makefile.am (check-config): Fix the rule
* doc/mailfromd.texi: Document mailfromd options. * doc/mailfromd.texi: Document mailfromd options.
* etc/Makefile.am (.mf.lint): -I$(top_srcdir)/src is no * etc/Makefile.am (.mf.lint): -I$(top_srcdir)/src is no longer
longer needed (see 01ad06fc). needed (see 01ad06fc).
* mflib/Makefile.am: Likewise. * mflib/Makefile.am: Likewise.
2011-03-13 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
Rename .pm:server config section to .mfd:server. Fix check-docs. Rename .pm:server config section to .mfd:server. Fix
check-docs.
New function header_rename_pattern 2011-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
* NEWS: Update. New function header_rename_pattern
* mflib/header_rename.mf4: New function header_rename_pattern.
* doc/functions.texi: Document changes to message_header_count.
Document header_rename_pattern.
Improve docs * NEWS: Update.
* mflib/header_rename.mf4: New function header_rename_pattern.
* doc/functions.texi: Document changes to message_header_count.
Document header_rename_pattern.
* NEWS: Update. 2011-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/functions.texi: Document new built-in and most library
functions.
* doc/upgrade.texi: Update.
* src/builtin/debug.bi (debug_level): Fix the use of modname. Improve docs
(debug_spec): Remove the minlevel parameter.
* src/builtin/io.bi: Remove misleading comment. * NEWS: Update.
* src/main.c: Restore the --debug option. * doc/functions.texi: Document new built-in and most library
functions.
* doc/upgrade.texi: Update.
* src/builtin/debug.bi (debug_level): Fix the use of modname.
(debug_spec): Remove the minlevel parameter.
* src/builtin/io.bi: Remove misleading comment.
* src/main.c: Restore the --debug option.
2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix. Minor fix.
2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs. Update docs.
* doc/mailfromd.texi: Document new pragmas (prereq and provide-callout) * doc/mailfromd.texi: Document new pragmas (prereq and
provide-callout)
docs: improve check-docs, document mfdbtool. 2011-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
docs: improve check-docs, document mfdbtool.
* doc/mfdbtool.texi: New file. * doc/mfdbtool.texi: New file.
* doc/calloutd.texi: New file. * doc/calloutd.texi: New file.
* doc/Makefile.am (mailfromd_TEXINFOS): Add new files. * doc/Makefile.am (mailfromd_TEXINFOS): Add new files.
(check-options): depend on several check-*-options goals (check-options): depend on several check-*-options goals
(check-mailfromd-options) (check-mailfromd-options)
(check-calloutd-options) (check-calloutd-options)
(check-mfdbtool-options): New goals. (check-mfdbtool-options): New goals.
(check-sub-config): Scan $(top_srcdir)/lib/dbcfg.c as well. (check-sub-config): Scan $(top_srcdir)/lib/dbcfg.c as well.
* doc/check-docs.sh: Minor change * doc/check-docs.sh: Minor change
* doc/functions.texi: Remove the discussion of DNS Cache Management. * doc/functions.texi: Remove the discussion of DNS Cache
* doc/macros.texi (xopindex, opsummary): Take the program name as Management.
the 2nd argument. All uses changed. * doc/macros.texi (xopindex, opsummary): Take the program name
* doc/mailfromd.texi: Add documentation placeholder for calloutd. as the 2nd argument. All uses changed.
Add documentation of mfdbtool. * doc/mailfromd.texi: Add documentation placeholder for
Remove description of DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL and calloutd. Add documentation of mfdbtool. Remove description of
dns database. DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL and dns database.
2011-03-11 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
Improve check-docs Improve check-docs
* doc/Makefile.am (check-pragmas): Implement the rule. * doc/Makefile.am (check-pragmas): Implement the rule.
* doc/check-docs.sh: Remove leading whitespace from joinable * doc/check-docs.sh: Remove leading whitespace from joinable
files. files.
Ensure the same set of constants is used in the sources and in the docume ntation. 2011-03-11 Sergey Poznyakoff <gray@gnu.org.ua>
* .gitignore: Add global.h and global.texi Ensure the same set of constants is used in the sources and in
* global.awk: New file. the documentation.
* global.texi: New file.
* Makefile.am (SUBDIRS): Begin with . * .gitignore: Add global.h and global.texi
(noinst_HEADERS): Add global.h * global.awk: New file.
(noinst_DATA): Add global.texi * global.texi: New file.
(BUILT_SOURCES): Add both. * Makefile.am (SUBDIRS): Begin with .
(EXTRA_DIST): Likewise. Add global.def and global.awk (noinst_HEADERS): Add global.h
(.def.h): New rule (noinst_DATA): Add global.texi
(.def.texi): New rule (BUILT_SOURCES): Add both.
* doc/values.texi: Remove. (EXTRA_DIST): Likewise. Add global.def and global.awk
* doc/Makefile.am (mailfromd_TEXINFOS): Remove values.texi. (.def.h): New rule
(AM_MAKEINFOFLAGS): Add top_srcdir to include path. (.def.texi): New rule
* doc/mailfromd.texi: Include global.texi instead of values.texi. * doc/values.texi: Remove.
* doc/functions.texi: Update. * doc/Makefile.am (mailfromd_TEXINFOS): Remove values.texi.
(AM_MAKEINFOFLAGS): Add top_srcdir to include path.
* src/builtin/dns.bi: Include global.h. Use constants defined in it. * doc/mailfromd.texi: Include global.texi instead of
* src/builtin/io.bi: Likewise. values.texi.
* src/builtin/mbox.bi: Likewise. * doc/functions.texi: Update.
* src/builtin/msg.bi: Likewise.
* src/prog.c: Likewise. * src/builtin/dns.bi: Include global.h. Use constants defined
* src/builtin/msg.h (NMBOXES, NMSGS): Remove definitions. in it.
* src/builtin/io.bi: Likewise.
* src/builtin/mbox.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/prog.c: Likewise.
* src/builtin/msg.h (NMBOXES, NMSGS): Remove definitions.
2011-03-10 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
Minor documentation changes. Minor documentation changes.
* doc/Makefile.am (check-config, check-exceptions): Fix rules.
* doc/mailfromd.texi: Document e_exists.
* doc/values.texi (MIN_EXCEPTION, MAX_EXCEPTION): Remove.
(E_EXCEPTIONS): New value.
2011-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/Makefile.am (check-config, check-exceptions): Fix rules. Implement escape/unescape builtin functions and functions for
* doc/mailfromd.texi: Document e_exists. email processing.
* doc/values.texi (MIN_EXCEPTION, MAX_EXCEPTION): Remove.
(E_EXCEPTIONS): New value. * mflib/.gitignore: Add email.h
* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): Add email.mf
Implement escape/unescape builtin functions and functions for email proce * mflib/email.mf: New file.
ssing. * mflib/callout.mf4 (callout_do): Escape email.
* src/builtin/email.bi (email_map): New function.
* mflib/.gitignore: Add email.h * src/builtin/string.bi (escape, unescape): New functions.
* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): Add email.mf * doc/functions.texi: Document new functions.
* mflib/email.mf: New file.
* mflib/callout.mf4 (callout_do): Escape email. 2011-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
* src/builtin/email.bi (email_map): New function.
* src/builtin/string.bi (escape, unescape): New functions. More bugfixes
* doc/functions.texi: Document new functions.
* src/main.c (main): Call mf_server_log_setup only for
More bugfixes mode==MAILFROMD_DAEMON.
(parse_opt): Allocate strings appended to args->trace_modules.
* src/main.c (main): Call mf_server_log_setup only for * src/prog.c (instr_xmemstk): Adjust stack before pushing to it.
mode==MAILFROMD_DAEMON. (dump_catch): Print exception names.
(parse_opt): Allocate strings appended to args->trace_modules.
* src/prog.c (instr_xmemstk): Adjust stack before pushing to it.
(dump_catch): Print exception names.
2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
Version 7.0.95 Version 7.0.95
* NEWS, configure.ac: Update. * NEWS, configure.ac: Update.
Restore (try,catch)/loop/(break,next) functionality. 2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
The commit bd4fb40f took care about breaks and nexts called from Restore (try,catch)/loop/(break,next) functionality.
tries/catches that appear within a loop, but in the meantime it
broke the functionality of breaks/nexts called within loops which
are nested in a try or catch block. This is fixed in this commit.
* src/drivers.c (trycatch_stack_entry) <id>: New member.
(trycatch_last_id): New function.
(enter_trycatch): Initialize ent.id.
(_code_trycatch_exit): Break the iteration if current entry id is
less than the loop id.
(code_trycatch_exit): Take block ID as argument.
(enter_loop): Initialize trycatch_id.
(code_type_next, code_type_break): Pass loop ID to code_trycatch_exit.
* tests/trycatch13.at: New testcase.
* tests/trycatch14.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add new testcases.
* tests/testsuite.at: Include new testcases.
* tests/miltermacros.at: Fix a typo.
Fix built-in macro expansion in strings appearing within pragmas.
* src/pragma.c (nextword): Advance *end past the final quote.
* tests/expstr.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add expstr.at
* tests/testsuite.at: Include expstr.at
* tests/macros.at: Add keywords.
Cleanup.
* po/POTFILES.in: Remove appinit.c (See e473ab7d).
* src/Makefile.am: Restore incdir, needed for AM_CPPFLAGS. Was
accidentally removed in 01ad06fca.
* src/builtin/sa.bi (sa): Restore initialization of msize. Accidentally
removed in bcd64af9.
* src/main.c: Call mf_server_log_setup after compiling the sources, so
that --lint spits out its diagnostics on stderr (initially placed here
in e75c9a39).
Fix deferred variable initialization.
The bug was spotted by Brian Kroth.
* src/gram.y (deferred_decl) <locus>: New member.
(defer_initialize_variable): Use string_alloc
instead of literal_lookup. Take additional argument (ptr to locus). All
uses updated.
(apply_deferred_init): Pass a ptr to the actual locus to initialize_varia
ble.
* src/mailfromd.h (defer_initialize_variable): Change signature.
* src/main.c (cb_set_variable): Deduce definition location from
mu_strerr.
* THANKS: Update.
* tests/setvar.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add setvar.at.
* tests/testsuite.at: Include setvar.at.
* tests/invcidr.at: Update experr.
* tests/invcidr2.at: Likewise.
Bugfix. The commit bd4fb40f took care about breaks and nexts called from
tries/catches that appear within a loop, but in the meantime it
broke the functionality of breaks/nexts called within loops
which are nested in a try or catch block. This is fixed in this
commit.
* src/drivers.c (trycatch_stack_entry) <id>: New member.
(trycatch_last_id): New function.
(enter_trycatch): Initialize ent.id.
(_code_trycatch_exit): Break the iteration if current entry id
is less than the loop id.
(code_trycatch_exit): Take block ID as argument.
(enter_loop): Initialize trycatch_id.
(code_type_next, code_type_break): Pass loop ID to
code_trycatch_exit.
* tests/trycatch13.at: New testcase.
* tests/trycatch14.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add new testcases.
* tests/testsuite.at: Include new testcases.
* tests/miltermacros.at: Fix a typo.
* src/lex.l (lex_new_source): Fail if the fail is not a regular one. 2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
Fix built-in macro expansion in strings appearing within
pragmas.
* src/pragma.c (nextword): Advance *end past the final quote.
* tests/expstr.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add expstr.at
* tests/testsuite.at: Include expstr.at
* tests/macros.at: Add keywords.
2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
Cleanup.
* po/POTFILES.in: Remove appinit.c (See e473ab7d).
* src/Makefile.am: Restore incdir, needed for AM_CPPFLAGS. Was
accidentally removed in 01ad06fca.
* src/builtin/sa.bi (sa): Restore initialization of msize.
Accidentally removed in bcd64af9.
* src/main.c: Call mf_server_log_setup after compiling the
sources, so that --lint spits out its diagnostics on stderr
(initially placed here in e75c9a39).
2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
Fix deferred variable initialization.
The bug was spotted by Brian Kroth.
* src/gram.y (deferred_decl) <locus>: New member.
(defer_initialize_variable): Use string_alloc instead of
literal_lookup. Take additional argument (ptr to locus). All
uses updated.
(apply_deferred_init): Pass a ptr to the actual locus to
initialize_variable.
* src/mailfromd.h (defer_initialize_variable): Change signature.
* src/main.c (cb_set_variable): Deduce definition location from
mu_strerr.
* THANKS: Update.
* tests/setvar.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add setvar.at.
* tests/testsuite.at: Include setvar.at.
* tests/invcidr.at: Update experr.
* tests/invcidr2.at: Likewise.
2011-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix.
* src/lex.l (lex_new_source): Fail if the fail is not a regular
one.
2011-03-07 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-07 Sergey Poznyakoff <gray@gnu.org.ua>
Sync with MU commit 4bcd5c9de0cb6ca85bcc3a35b1518739b939b009. Sync with MU commit 4bcd5c9de0cb6ca85bcc3a35b1518739b939b009.
* lib/appinit.c: Remove. * lib/appinit.c: Remove.
* lib/Makefile.am (libmf_a_SOURCES): Remove appinit.c * lib/Makefile.am (libmf_a_SOURCES): Remove appinit.c
* lib/libmf.h (mu_app_rcfile, mfd_app_init): Remove. * lib/libmf.h (mu_app_rcfile, mfd_app_init): Remove.
* src/calloutd.c (main): Use mu_app_init. Set mu_site_rcfile beforehand. * src/calloutd.c (main): Use mu_app_init. Set mu_site_rcfile
* src/main.c (main): Likewise. beforehand.
* src/mfdbtool.c (main): Likewise. * src/main.c (main): Likewise.
* src/mfdbtool.c (main): Likewise.
2011-03-05 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-05 Sergey Poznyakoff <gray@gnu.org.ua>
Sync with MU commit ad938c5af. Sync with MU commit ad938c5af.
* lib/appinit.c (mfd_parse_config_files): Remove.
(mfd_app_init): Use new API.
* lib/appinit.c (mfd_parse_config_files): Remove. 2011-03-05 Sergey Poznyakoff <gray@gnu.org.ua>
(mfd_app_init): Use new API.
Bugfix Bugfix
* src/main.c (cb_set_variable): Fix argument cast. * src/main.c (cb_set_variable): Fix argument cast.
2011-03-03 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-03 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes Minor changes
2011-03-03 Sergey Poznyakoff <gray@gnu.org.ua>
Use `volatile' qualifier for variables that can change during dataseg exp Use `volatile' qualifier for variables that can change during
ansion. dataseg expansion.
* src/builtin/snarf.m4 (__mf_dataseg): New define. * src/builtin/snarf.m4 (__mf_dataseg): New define.
(MF_DSEXP, __MF_DSEXP_REQ) (MF_DSEXP, __MF_DSEXP_REQ)
(__mf_define_fun, MF_DSEXP_SUPPRESS): New macros. (__mf_define_fun, MF_DSEXP_SUPPRESS): New macros.
(__mf_c_type): Define string arguments wiht __mf_dataseg qualifier. (__mf_c_type): Define string arguments wiht __mf_dataseg
(MF_DEFUN): For functions returning STRING assume MF_DSEXP. qualifier.
(MF_ALLOC_HEAP,MF_ALLOC_HEAP_TEMP) (MF_DEFUN): For functions returning STRING assume MF_DSEXP.
(MF_COPY_STRING): Call __MF_DSEXP_REQ (MF_ALLOC_HEAP,MF_ALLOC_HEAP_TEMP)
(END): Redefine __mf_dataseg to empty string. (MF_COPY_STRING): Call __MF_DSEXP_REQ
(END): Redefine __mf_dataseg to empty string.
* src/builtin/db.bi (dbmap_lookup): Define within a
MF_DSEXP_SUPPRESS block. * src/builtin/db.bi (dbmap_lookup): Define within a
(dbmap): Mark as MF_DSEXP. MF_DSEXP_SUPPRESS block.
* src/builtin/sa.bi (sa, clamav): Mark as MF_DSEXP. (dbmap): Mark as MF_DSEXP.
* src/builtin/spf.bi (update_spf_vars): Define within a * src/builtin/sa.bi (sa, clamav): Mark as MF_DSEXP.
MF_DSEXP_SUPPRESS block. * src/builtin/spf.bi (update_spf_vars): Define within a
(spf_check_host, spf_test_record): Mark as MF_DSEXP. MF_DSEXP_SUPPRESS block.
* src/builtin/string.bi (rindex): Mark as MF_DSEXP. (spf_check_host, spf_test_record): Mark as MF_DSEXP.
* src/builtin/vars.bi (set_milter_$1_address): Define within * src/builtin/string.bi (rindex): Mark as MF_DSEXP.
a MF_DSEXP_SUPPRESS block. * src/builtin/vars.bi (set_milter_$1_address): Define within a
(set_milter_server_id): Likewise. MF_DSEXP_SUPPRESS block.
(set_milter_server_id): Likewise.
* src/prog.c (get_string_arg): Use MFL_DATASEG qualifier for return point
er * src/prog.c (get_string_arg): Use MFL_DATASEG qualifier for
(get_pointer_arg): Likewise. return pointer
(heap_obstack_grow, pushs): Use MFL_DATASEG qualifier for pointer arg. (get_pointer_arg): Likewise.
(instr_concat): Use MFL_DATASEG qualifiers for left and right declaration (heap_obstack_grow, pushs): Use MFL_DATASEG qualifier for
s. pointer arg.
* src/prog.h (MFL_DATASEG): New define. (instr_concat): Use MFL_DATASEG qualifiers for left and right
(get_pointer_arg, get_string_arg) declarations.
(heap_obstack_grow, pushs): Change signature. * src/prog.h (MFL_DATASEG): New define.
(get_pointer_arg, get_string_arg)
Bugfix (heap_obstack_grow, pushs): Change signature.
* src/prog.c (instr_backref): Reference matchstr only after 2011-03-03 Sergey Poznyakoff <gray@gnu.org.ua>
eventual dataseg expansion.
(env_pop_auto): New function. Bugfix
(pushs): Protect source pointer from changing during dataseg expansion
(env_final_gc): Likewise. * src/prog.c (instr_backref): Reference matchstr only after
(heap_obstack_grow): Likewise. eventual dataseg expansion.
(env_pop_auto): New function.
(pushs): Protect source pointer from changing during dataseg
expansion
(env_final_gc): Likewise.
(heap_obstack_grow): Likewise.
2011-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
Fix the usage of `next' and `break' in try/catch blocks.
* src/drivers.c (enter_trycatch, leave_trycatch)
(code_trycatch_exit): New functions.
(code_type_catch): Enclose traverse_tree in
enter_trycatch/leave_trycatch.
(code_type_try): Likewise.
(code_type_next): Call code_trycatch_exit to make sure any outer
tries/catches are exited correctly.
(code_type_break): Likewise.
* tests/trycatch05.at: New file.
* tests/trycatch06.at: New file.
* tests/trycatch07.at: New file.
* tests/trycatch08.at: New file.
* tests/trycatch09.at: New file.
* tests/trycatch10.at: New file.
* tests/trycatch11.at: New file.
* tests/trycatch12.at: New file.
* tests/Makefile.am (TESTSUITE_AT): Add trycatch05.at -
trycatch12.at
* tests/testsuite.at: Include trycatch05.at - trycatch12.at
* tests/trycatch01.at: Update AT_KEYWORDS.
* tests/trycatch02.at: Likewise.
* tests/trycatch03.at: Likewise.
* tests/trycatch04.at: Likewise.
* doc/.gitignore: Update.
* mflib/.gitignore: Update.
* src/builtin/.gitignore: Update.
2011-03-02 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
Fix the usage of `next' and `break' in try/catch blocks. Move debugging API to a separate compilation unit.
* src/drivers.c (enter_trycatch, leave_trycatch) Rename wd built-in to _wd.
(code_trycatch_exit): New functions.
(code_type_catch): Enclose traverse_tree in enter_trycatch/leave_trycatch
.
(code_type_try): Likewise.
(code_type_next): Call code_trycatch_exit to make sure any
outer tries/catches are exited correctly.
(code_type_break): Likewise.
* tests/trycatch05.at: New file.
* tests/trycatch06.at: New file.
* tests/trycatch07.at: New file.
* tests/trycatch08.at: New file.
* tests/trycatch09.at: New file.
* tests/trycatch10.at: New file.
* tests/trycatch11.at: New file.
* tests/trycatch12.at: New file.
* tests/Makefile.am (TESTSUITE_AT): Add trycatch05.at - trycatch12.at
* tests/testsuite.at: Include trycatch05.at - trycatch12.at
* tests/trycatch01.at: Update AT_KEYWORDS.
* tests/trycatch02.at: Likewise.
* tests/trycatch03.at: Likewise.
* tests/trycatch04.at: Likewise.
* doc/.gitignore: Update.
* mflib/.gitignore: Update.
* src/builtin/.gitignore: Update.
Move debugging API to a separate compilation unit.
Rename wd built-in to _wd.
* src/builtin/debug.bi: New file.
* src/builtin/Makefile.am (BI_FILES): Add debug.bi
* src/builtin/other.bi: Move debugging functions to debug.bi.
* src/prog.c (env_register_read) <REG_REG>: Add a type cast.
New debugging function: _reg().
* mflib/_register.mf: New file.
* mflib/.gitignore: Add _register.mf
* mflib/Makefile.am (MF_FILES): Add _register.mf
(noinst_HEADERS, BUILT_SOURCES): Add _register.h
* src/builtin/other.bi (_reg): New function.
* src/prog.c (env_register_read): New function.
* src/prog.h (env_register_read): New proto.
Minor fix * src/builtin/debug.bi: New file.
* src/builtin/Makefile.am (BI_FILES): Add debug.bi
* src/builtin/other.bi: Move debugging functions to debug.bi.
* src/prog.c (env_register_read) <REG_REG>: Add a type cast.
2011-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
* src/drivers.c (print_type_try): Fix output indentation. New debugging function: _reg().
* mflib/_register.mf: New file.
* mflib/.gitignore: Add _register.mf
* mflib/Makefile.am (MF_FILES): Add _register.mf
(noinst_HEADERS, BUILT_SOURCES): Add _register.h
* src/builtin/other.bi (_reg): New function.
* src/prog.c (env_register_read): New function.
* src/prog.h (env_register_read): New proto.
2011-03-02 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix
* src/drivers.c (print_type_try): Fix output indentation.
2011-03-01 Sergey Poznyakoff <gray@gnu.org.ua> 2011-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
New pragma: prereq. New function: vercmp. New pragma: prereq. New function: vercmp.
* NEWS, configure.ac: Version 7.0.94 * NEWS, configure.ac: Version 7.0.94
* lib/vercmp.c: New file. * lib/vercmp.c: New file.
* lib/Makefile.am (libmf_a_SOURCES): Add vercmp.c * lib/Makefile.am (libmf_a_SOURCES): Add vercmp.c
* lib/libmf.h (mf_vercmp): New proto. * lib/libmf.h (mf_vercmp): New proto.
* src/builtin/Makefile.am (BI_FILES): Add prereq.bi. * src/builtin/Makefile.am (BI_FILES): Add prereq.bi.
* src/builtin/.gitignore: Add prereq.c * src/builtin/.gitignore: Add prereq.c
* src/prog.c (env_throw_0): Reword unknown exception diagnostics. * src/prog.c (env_throw_0): Reword unknown exception
diagnostics.
* tests/vercmp.at: New file.
* tests/vercmp01.at: New file. * tests/vercmp.at: New file.
* tests/vercmp02.at: New file. * tests/vercmp01.at: New file.
* tests/Makefile.am (TESTSUITE_AT): Add vercmp.at, vercmp01.at * tests/vercmp02.at: New file.
and vercmp02.at. * tests/Makefile.am (TESTSUITE_AT): Add vercmp.at, vercmp01.at
* tests/testsuite.at: Include vercmp testcases. and vercmp02.at.
* tests/testsuite.at: Include vercmp testcases.
* mflib/status.mf: Require mailfromd version 7.0.94 or later. * mflib/status.mf: Require mailfromd version 7.0.94 or later.
[OLD_EXCEPTION_CODES]: Remove. [OLD_EXCEPTION_CODES]: Remove.
* po/POTFILES.in: Update. * po/POTFILES.in: Update.
2011-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
Store exception names in the dataseg. Store exception names in the dataseg.
* src/mf-status.c: Remove. * src/mf-status.c: Remove.
* src/exclist.c: New file. * src/exclist.c: New file.
* src/Makefile.am (mailfromd_SOURCES): Remove mf-status.c, * src/Makefile.am (mailfromd_SOURCES): Remove mf-status.c, add
add exclist.c. exclist.c.
* src/gram.y (exdecl): Call define_exception. * src/gram.y (exdecl): Call define_exception.
(dataseg_layout): Create table of exception names in dataseg. (dataseg_layout): Create table of exception names in dataseg.
* src/mailfromd.h (define_constant): Change return value. * src/mailfromd.h (define_constant): Change return value.
(string_to_exception): Remove. (string_to_exception): Remove.
(define_exception,enumerate_exceptions) (define_exception,enumerate_exceptions)
(free_exceptions): New protos. (free_exceptions): New protos.
* src/main.c (main): Call free_exceptions. * src/main.c (main): Call free_exceptions.
* src/prog.c (exception_count): Move declaration to exclist.c * src/prog.c (exception_count): Move declaration to exclist.c
(instr_throw): Add trace print. (instr_throw): Add trace print.
(dump_throw): Print exception number along with its symbolic value. (dump_throw): Print exception number along with its symbolic
(env_throw_0): Reword default message. value.
* src/prog.h (EXTABIND): New macro. (env_throw_0): Reword default message.
* src/symbols.c (define_constant): Return pointer to the allocated * src/prog.h (EXTABIND): New macro.
struct constant. * src/symbols.c (define_constant): Return pointer to the
* tests/eof.at: Reflect changes to env_throw_0. allocated struct constant.
* tests/hdr-gete.at: Likewise. * tests/eof.at: Reflect changes to env_throw_0.
* mflib/mfex.awk: Simplify. * tests/hdr-gete.at: Likewise.
* mflib/mfex.awk: Simplify.
Fix src/.gitignore
2011-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
Document e_exists and dbinsert (see commit 185360ba).
Fix src/.gitignore
New built-in: body_has_nulls
2011-02-18 Sergey Poznyakoff <gray@gnu.org.ua>
* src/builtin/body.bi (body_has_nulls): New function.
* doc/functions.texi: Document body_has_nulls. Document e_exists and dbinsert (see commit 185360ba).
Revamp declaration of built-in exception codes. 2011-02-18 Sergey Poznyakoff <gray@gnu.org.ua>
Exception codes are declared (via dclex) in mflib/status.mf. The C code New built-in: body_has_nulls
includes mflib/status.ex, which is generated from that file.
* src/builtin/body.bi (body_has_nulls): New function.
* src/status.mfh: Move to mflib. * doc/functions.texi: Document body_has_nulls.
* src/mf-status.mfi: Move to mflib/status.mfh
* src/mf-status.mfi: Move to src/mf-status.c 2011-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
(std_status_tab): Include mflib/status.ex
* src/mfstat.awk: Remove. Revamp declaration of built-in exception codes.
* src/status.mfi: Remove.
* src/Makefile.am: Reflect these changes. Exception codes are declared (via dclex) in mflib/status.mf.
* src/mailfromd.h (mf_exception_code): Remove exception declarations, The C code includes mflib/status.ex, which is generated from
include mflib/status.ex instead. that file.
* src/prog.c (exception_count): Initialize to 0.
(instr_restex): If count is 0, do nothing. * src/status.mfh: Move to mflib.
(env_init): Copy exceptions only if exception_count is not 0. * src/mf-status.mfi: Move to mflib/status.mfh
(env_throw_0): Remove extra \n from runtime error diagnostics. * src/mf-status.mfi: Move to src/mf-status.c
(create_environment): Allocate catch_ctx and defcatch_ctx only (std_status_tab): Include mflib/status.ex
if exception_count is not 0. * src/mfstat.awk: Remove.
* src/status.mfi: Remove.
* mflib/.gitignore: Add status.ex * src/Makefile.am: Reflect these changes.
* mflib/Makefile.am (inc_DATA,noinst_HEADERS,BUILT_SOURCES): Add status.m * src/mailfromd.h (mf_exception_code): Remove exception
fh declarations, include mflib/status.ex instead.
(MF_FILES): Add status.mf * src/prog.c (exception_count): Initialize to 0.
(EXTRA_DIST): Add mfex.awk (instr_restex): If count is 0, do nothing.
(SUFFIXES): Add .ex (env_init): Copy exceptions only if exception_count is not 0.
(.mf.ex): New rule. (env_throw_0): Remove extra \n from runtime error diagnostics.
* mflib/mfex.awk: New file. (create_environment): Allocate catch_ctx and defcatch_ctx only
if exception_count is not 0.
* tests/Makefile.am (status.mf): Depend on $(top_srcdir)/mflib/status.mf
* tests/eof.at: Reflect changes to "built-in" exceptions. * mflib/.gitignore: Add status.ex
* tests/hdr-gete.at: Likewise. * mflib/Makefile.am (inc_DATA,noinst_HEADERS,BUILT_SOURCES): Add
* tests/trycatch02.at: Likewise. status.mfh
* tests/trycatch04.at: Likewise. (MF_FILES): Add status.mf
(EXTRA_DIST): Add mfex.awk
(SUFFIXES): Add .ex
(.mf.ex): New rule.
* mflib/mfex.awk: New file.
* tests/Makefile.am (status.mf): Depend on
$(top_srcdir)/mflib/status.mf
* tests/eof.at: Reflect changes to "built-in" exceptions.
* tests/hdr-gete.at: Likewise.
* tests/trycatch02.at: Likewise.
* tests/trycatch04.at: Likewise.
2011-02-28 Sergey Poznyakoff <gray@gnu.org.ua> 2011-02-28 Sergey Poznyakoff <gray@gnu.org.ua>
Fix the use of user-defined exceptions. Fix the use of user-defined exceptions.
* src/prog.c (instr_throw): Use exception_count instead of
mf_exception_count.
* src/prog.c (instr_throw): Use exception_count instead of 2011-02-28 Sergey Poznyakoff <gray@gnu.org.ua>
mf_exception_count.
Minor change Minor change
2011-02-28 Sergey Poznyakoff <gray@gnu.org.ua>
Synchronize MF_SIEVE_ defines in C with the corresponding
constants in MFL.
* Makefile.am (SUBDIRS): Place mflib before lib and src.
* mflib/.gitignore: Add sieve.h
* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): New
variables.
(.mf.h): New implicit rule.
* mflib/sieve.mf: Fix comment.
* po/POTFILES.in: Remove builtin/mudebug.bi.
* src/builtin/Makefile.am (INCLUDES): Add $(top_srcdir)
* src/builtin/sieve.bi: Include mflib/sieve.h. Remove MF_SIEVE_
defines.
2011-02-28 Sergey Poznyakoff <gray@gnu.org.ua>
Synchronize MF_SIEVE_ defines in C with the corresponding constants in MF L. Improve the sieve built-in.
* Makefile.am (SUBDIRS): Place mflib before lib and src. * mflib/sieve.mf (MF_SIEVE_FILE,MF_SIEVE_TEXT): New constants.
* mflib/.gitignore: Add sieve.h (MF_SIEVE_LOG,MF_SIEVE_DEBUG_TRACE)
* mflib/Makefile.am (noinst_HEADERS,BUILT_SOURCES): New variables. (MF_SIEVE_DEBUG_INSTR): Change numeric values.
(.mf.h): New implicit rule. * src/builtin/other.bi (wd): New function.
* mflib/sieve.mf: Fix comment. * src/builtin/sieve.bi (sieve): The script parameter specifies
* po/POTFILES.in: Remove builtin/mudebug.bi. the Sieve program text (literal) if MF_SIEVE_TEXT flag is set.
* src/builtin/Makefile.am (INCLUDES): Add $(top_srcdir) Additional parameters file and line can be used in this case to
* src/builtin/sieve.bi: Include mflib/sieve.h. Remove MF_SIEVE_ defines. correct reported locations in the Sieve program. Fix memory leak
(msg not being destroyed).
Improve the sieve built-in.
* mflib/sieve.mf (MF_SIEVE_FILE,MF_SIEVE_TEXT): New constants.
(MF_SIEVE_LOG,MF_SIEVE_DEBUG_TRACE)
(MF_SIEVE_DEBUG_INSTR): Change numeric values.
* src/builtin/other.bi (wd): New function.
* src/builtin/sieve.bi (sieve): The script parameter specifies the
Sieve program text (literal) if MF_SIEVE_TEXT flag is set.
Additional parameters file and line can be used in this case to
correct reported locations in the Sieve program.
Fix memory leak (msg not being destroyed).
* doc/functions.texi: Document changes to the sieve function. * doc/functions.texi: Document changes to the sieve function.
2011-02-09 Sergey Poznyakoff <gray@gnu.org.ua> 2011-02-09 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes. Bugfixes.
* src/prog.c (eval_environ) <string>: Remove. The pointer is * src/prog.c (eval_environ) <string>: Remove. The pointer is
invalidated after dataseg expansion. Keep offset of the invalidated after dataseg expansion. Keep offset of the last
last matched string in matchstr instead (data offset is matched string in matchstr instead (data offset is invariant).
invariant). All callers updated. All callers updated.
(expand_dataseg): Remove static qualifier. (expand_dataseg): Remove static qualifier.
(instr_memstk, instr_xmemstk): Bugfix. Both functions were not (instr_memstk, instr_xmemstk): Bugfix. Both functions were not
expansion-safe. expansion-safe.
* src/prog.h (expand_dataseg): New proto. * src/prog.h (expand_dataseg): New proto.
* src/builtin/other.bi (_expand_dataseg): New function. * src/builtin/other.bi (_expand_dataseg): New function.
2011-01-20 Sergey Poznyakoff <gray@gnu.org.ua> 2011-01-20 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes. Bugfixes.
* lib/mf-dbm.c (mf_dbm_insert): Add missing break. * lib/mf-dbm.c (mf_dbm_insert): Add missing break.
* src/bitmask.h (bitmask_merge): Update bm_nset. * src/bitmask.h (bitmask_merge): Update bm_nset.
* src/prog.c (environ_locus): New struct. * src/prog.c (environ_locus): New struct.
(eval_environ): Change type of locus to environ_locus. (eval_environ): Change type of locus to environ_locus.
(ENV_LOC_FILE,ENV_LOC_LINE): New defines. (ENV_LOC_FILE,ENV_LOC_LINE): New defines.
(env_get_locus): Store locus in the struct locus supplied by (env_get_locus): Store locus in the struct locus supplied by the
the second argument. Register the file member as automatic variable, second argument. Register the file member as automatic variable,
lest it gets clobbered by stack expansions. lest it gets clobbered by stack expansions. All callers updated.
All callers updated. (instr_push,instr_stkalloc,instr_regmatch_mx)
(instr_push,instr_stkalloc,instr_regmatch_mx) (instr_next): Fix trace formats.
(instr_next): Fix trace formats. * src/prog.h (runtime_warning,runtime_error)
* src/prog.h (runtime_warning,runtime_error) (prog_trace): Mark as printflike.
(prog_trace): Mark as printflike. (env_get_locus): Change signature.
(env_get_locus): Change signature.
* src/builtin/header.bi (header_add,header_insert)
* src/builtin/header.bi (header_add,header_insert) (header_delete,header_replace): Update calls to env_get_locus.
(header_delete,header_replace): Update calls to env_get_locus. * src/builtin/progress.bi (progress): Likewise.
* src/builtin/progress.bi (progress): Likewise. * src/builtin/qrnt.bi (quarantine): Likewise.
* src/builtin/qrnt.bi (quarantine): Likewise. * src/builtin/rcpt.bi (rcpt_add,rcpt_delete): Likewise.
* src/builtin/rcpt.bi (rcpt_add,rcpt_delete): Likewise.
* src/builtin/snarf.m4: Minor indentation change.
* src/builtin/snarf.m4: Minor indentation change.
* mflib/sieve.mf (MF_SIEVE_DEBUG_MAILUTILS)
* mflib/sieve.mf (MF_SIEVE_DEBUG_MAILUTILS) (MF_SIEVE_DEBUG_PROT): Remove.
(MF_SIEVE_DEBUG_PROT): Remove. * src/builtin/sieve.bi: Likewise.
* src/builtin/sieve.bi: Likewise. * src/builtin/mudebug.bi: Remove.
* src/builtin/mudebug.bi: Remove. * src/builtin/Makefile.am (BI_FILES): Remove mudebug.bi
* src/builtin/Makefile.am (BI_FILES): Remove mudebug.bi * src/builtin/other.bi (debug): Set logstream locus information
* src/builtin/other.bi (debug): Set logstream locus information for for better error diagnostics. Declare mailutils_set_debug_level
better error diagnostics. as alias to debug.
Declare mailutils_set_debug_level as alias to debug.
2011-01-19 Sergey Poznyakoff <gray@gnu.org.ua> 2011-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
Implement dbinsert built-in function. Implement dbinsert built-in function.
* src/builtin/db.bi (dbinsert): New function. Similar to dbput but * src/builtin/db.bi (dbinsert): New function. Similar to dbput
allows better control over what to do if the key is already present but allows better control over what to do if the key is already
in the database. present in the database.
* src/mailfromd.h (mfe_exists): New exception code. * src/mailfromd.h (mfe_exists): New exception code.
2011-01-14 Sergey Poznyakoff <gray@gnu.org.ua> 2011-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
Update TODO. Update TODO.
2011-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
Builtin functions obtain a reference to the capture stream, not
the stream itself.
* src/builtin/snarf.m4 (MF_CAPTURE): Require an argument.
(__mf_defun): If MF_CAPTURE was called, declare an extra
mu_stream_t argument and initialize it to the capture stream
reference.
(return): New macro.
(MF_RETURN,MF_RETURN_STRING): Go to end label, instead of
returning.
(MF_THROW): Unref __MF_CAPTURE__, if defined.
(END): Unref __MF_CAPTURE__, if defined. Declare end label.
Undefine __MF_ENDLAB__
* src/mailfromd.h (env_get_stream): Change prototype.
* src/prog.c (env_get_stream): Return error code. Return a
reference to the capture stream in the memory location pointed
to by the second argument.
* src/builtin/body.bi (current_message): Fix MF_CAPTURE
declaration.
* src/builtin/curhdr.bi (current_header_count): Likewise.
(current_header_nth_name,current_header_nth_value): Likewise.
(current_header): Likewise.
* src/builtin/sa.bi (sa, clamav): Likewise.
* src/builtin/sieve.bi (sieve): Likewise.
* src/builtin/getpw.bi (return_passwd): Don't use
MF_RETURN_OBSTACK here.
(getpwnam, getpwuid): Use it here instead.
* src/builtin/io.bi (write): Fix debug format string.
* src/builtin/mail.bi (build_mime): Fix memory leak (occurred on
error).
(send_dsn): Likewise.
Builtin functions obtain a reference to the capture stream, not the strea 2011-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
m itself.
gacopyz server: unescape % characters (complements e8f737fa).
* src/builtin/snarf.m4 (MF_CAPTURE): Require an argument. * gacopyz/gacopyz.h (gacopyz_srv_reply): Return int.
(__mf_defun): If MF_CAPTURE was called, declare an extra (gacopyz_srv_reply_raw): New proto.
mu_stream_t argument and initialize it to the capture stream * gacopyz/server.c (gacopyz_srv_reply): Unescape % characters.
reference. Allocates returned string.
(return): New macro. (gacopyz_srv_reply_raw): New function (renamed from old
(MF_RETURN,MF_RETURN_STRING): Go to end label, instead of returning. gacopyz_srv_reply).
(MF_THROW): Unref __MF_CAPTURE__, if defined. * mtasim/mtasim.c: Use xstrdup.
(END): Unref __MF_CAPTURE__, if defined. (smtp_ehlo, process_gacopyz_reply)
Declare end label. (process_data_reply): Fix calls to gacopyz_srv_reply.
Undefine __MF_ENDLAB__
* src/mailfromd.h (env_get_stream): Change prototype.
* src/prog.c (env_get_stream): Return error code.
Return a reference to the capture stream in the memory
location pointed to by the second argument.
* src/builtin/body.bi (current_message): Fix MF_CAPTURE declaration.
* src/builtin/curhdr.bi (current_header_count): Likewise.
(current_header_nth_name,current_header_nth_value): Likewise.
(current_header): Likewise.
* src/builtin/sa.bi (sa, clamav): Likewise.
* src/builtin/sieve.bi (sieve): Likewise.
* src/builtin/getpw.bi (return_passwd): Don't use MF_RETURN_OBSTACK
here.
(getpwnam, getpwuid): Use it here instead.
* src/builtin/io.bi (write): Fix debug format string.
* src/builtin/mail.bi (build_mime): Fix memory leak (occurred on
error).
(send_dsn): Likewise.
gacopyz server: unescape % characters (complements e8f737fa).
* gacopyz/gacopyz.h (gacopyz_srv_reply): Return int.
(gacopyz_srv_reply_raw): New proto.
* gacopyz/server.c (gacopyz_srv_reply): Unescape % characters.
Allocates returned string.
(gacopyz_srv_reply_raw): New function (renamed from old gacopyz_srv_reply
).
* mtasim/mtasim.c: Use xstrdup.
(smtp_ehlo, process_gacopyz_reply)
(process_data_reply): Fix calls to gacopyz_srv_reply.
2011-01-13 Sergey Poznyakoff <gray@gnu.org.ua> 2011-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
lib: minor fix lib: minor fix
* lib/logger.c (mf_gacopyz_log_printer): Handle SMI_LOG_PROTO. * lib/logger.c (mf_gacopyz_log_printer): Handle SMI_LOG_PROTO.
gacopyz: minor fix. 2011-01-13 Sergey Poznyakoff <gray@gnu.org.ua>
* gacopyz/context.c (format_message): Escape percent characters in gacopyz: minor fix.
the message string.
* gacopyz/context.c (format_message): Escape percent characters
in the message string.
2011-01-08 Sergey Poznyakoff <gray@gnu.org.ua> 2011-01-08 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright year. Update copyright year.
sa,clamav: bugfixes. 2011-01-08 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/server.c (mf_server_check_pidfile): Use mu_program_name. sa,clamav: bugfixes.
* src/builtin/sa.bi: Major cleanup.
(set_xscript): Do not switch to MU_XSCRIPT_PAYLOAD at once.
(spamd_send_stream): New function.
(spamd_connect): Do not unreference transport streams.
(open_connection): Use _aget to obtain path.
(sa,clamav): Rewind message stream; use spamd_send_stream to
send it.
* src/builtin/mail.bi (build_mime): Reposition the stream to its
beginning.
2010-12-23 Sergey Poznyakoff <gray@gnu.org.ua> * lib/server.c (mf_server_check_pidfile): Use mu_program_name.
* src/builtin/sa.bi: Major cleanup.
(set_xscript): Do not switch to MU_XSCRIPT_PAYLOAD at once.
(spamd_send_stream): New function.
(spamd_connect): Do not unreference transport streams.
(open_connection): Use _aget to obtain path.
(sa,clamav): Rewind message stream; use spamd_send_stream to
send it.
* src/builtin/mail.bi (build_mime): Reposition the stream to its
beginning.
Bugfixes. 2010-12-23 Sergey Poznyakoff <gray@gnu.org.ua>
* lib/logger.c (syslog_async_open): Fix signature. Bugfixes.
* mflib/Makefile.am (.mf4.mf): Put $(AM_V_GEN) in front of
the command.
Reflect recent changes in MU (mu_debug_handle_t/mu_debug_level_t types). * lib/logger.c (syslog_async_open): Fix signature.
* mflib/Makefile.am (.mf4.mf): Put $(AM_V_GEN) in front of the
command.
2010-12-21 Sergey Poznyakoff <gray@gnu.org.ua> 2010-12-23 Sergey Poznyakoff <gray@gnu.org.ua>
Raise version number and MU requirements. Rewrite transcript support in c Reflect recent changes in MU (mu_debug_handle_t/mu_debug_level_t
allout.c types).
* configure.ac: Require MU 2.9.90 2010-12-21 Sergey Poznyakoff <gray@gnu.org.ua>
Set version number to 7.0.93
Remove dist-lzma
(strtok_r): Remove unused declaration.
(gnulib.modules) <strtok_r>: Remove.
* src/callout.c: Rewrite transcript support using MU3 API.
(transcript): Remove. All callers updated.
(create_transcript_stream): New function.
(smtp_io_open): Set transcript stream if smtp_transcript is set.
Switch to MU3 API.
* lib/debug.c: Remove.
* lib/debug.h: Remove.
* lib/Makefile.am (noinst_HEADERS): Remove debug.h
(libmf_a_SOURCES): Remove debug.c
* lib/appinit.c: Use new mu_stream_* calls.
* lib/libmf.h (config_array_to_argv,config_array_to_string): Change
signatures.
(config_cb_timeout): Likewise.
(logger)<log_print>: Remove.
<log_open>: Change signature.
(logger_open): Change signature.
(vlogmsg,logmsg): Rewrite as macros.
* lib/logger.c: Rewrite logging support using MU3 streams.
* lib/utils.c (config_array_to_argv)
(config_array_to_string, config_cb_timeout): Rewrite.
* lib/server.c (mf_server_start): Call mu_onexit_run.
* lib/version.c (version_etc_copyright): Rename to avoid name
clash.
* lib/dbcfg.c: Rewrite callbacks. Use MU3 configuration framework.
* lib/cache.c: Use mu_debug for debugging.
* lib/db.c: Likewise.
* lib/dns.c: Likewise.
* lib/greylist.c: Likewise.
* lib/mf-dbm.c: Likewise.
* lib/rate.c: Likewise.
* lib/srvman.c: Likewise.
* lib/tbf_rate.c: Likewise.
* src/builtin/snarf.m4: Likewise.
* src/calloutd.c: Likewise.
* src/engine.c: Likewise.
* src/spf.c: Likewise.
* src/Makefile.am (mfd-dbgmod.h): Offset the indices by the value of
mfd_debug_handle.
* src/builtin/body.bi (current_message): Use mu_stream_to_message.
* src/builtin/curhdr.bi: Use MU3 API.
* src/builtin/db.bi: Likewise.
* src/builtin/io.bi: Likewise.
* src/builtin/mail.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/builtin/mudebug.bi: Likewise.
* src/builtin/sieve.bi: Likewise.
* src/lex.l: Likewise.
* src/savsrv.c: Likewise.
* src/srvcfg.c: Likewise.
* src/builtin/other.bi (debug_level): Rewrite using mu_debug_category_lev Raise version number and MU requirements. Rewrite transcript
el support in callout.c
(debug_spec): Rewrite using mu_debug_format_spec.
(debug): Rewrite using mu_debug_parse_spec.
* src/callout.c (smtp_io_data) <send_off, recv_off>: Remove. All uses * configure.ac: Require MU 2.9.90 Set version number to 7.0.93
updated. Remove dist-lzma
(smtp_io_free, smtp_send, smtp_recvline) (strtok_r): Remove unused declaration.
(smtp_io_close, callout_host, callout_mx) (gnulib.modules) <strtok_r>: Remove.
(libcallout_init): Use new stream and debugging API. * src/callout.c: Rewrite transcript support using MU3 API.
(transcript): Remove. All callers updated.
* src/mailfromd.h (mfd_debug_handle): New extern. (create_transcript_stream): New function.
(add_legacy_milter_port): Change signature. (smtp_io_open): Set transcript stream if smtp_transcript is set.
* src/main.c (mf_strecho): New global.
(mfd_gacopyz_log_printer): Remove. 2010-12-20 Sergey Poznyakoff <gray@gnu.org.ua>
(read_domain_file): Change signature.
(cb_milter_timeout, cb_timeout, cb_set_variable) Switch to MU3 API.
(cb_include_path, cb_trace_program, cb_relayed_domain_file): Rewrite.
(mfd_debug_handle): New variable. * lib/debug.c: Remove.
(open_strecho): New function. * lib/debug.h: Remove.
(main): Revise logging support initialization. * lib/Makefile.am (noinst_HEADERS): Remove debug.h
* src/mfdbtool.c: Use new MU API. (libmf_a_SOURCES): Remove debug.c
* src/pp.c: Likewise. * lib/appinit.c: Use new mu_stream_* calls.
* src/pragma.c: Likewise.
* lib/libmf.h (config_array_to_argv,config_array_to_string):
* src/prog.c: Use new MU API. Change signatures.
(instr_echo): Send output to mf_strecho. (config_cb_timeout): Likewise.
* src/prog.h (mf_strecho): New extern. (logger)<log_print>: Remove.
<log_open>: Change signature.
* src/builtin/msg.h (mf_message) <mstr, bstr>: New members. (logger_open): Change signature.
* src/builtin/sa.bi: Rewrite using new stream functions. (vlogmsg,logmsg): Rewrite as macros.
* lib/logger.c: Rewrite logging support using MU3 streams.
* pmult/.gitignore: Remove pdbg.h.
* pmult/pdbg.hm4: Remove. * lib/utils.c (config_array_to_argv)
* pmult/debugdef.m4: Remove. (config_array_to_string, config_cb_timeout): Rewrite.
* pmult/Makefile.am (EXTRA_DIST): Remove pdbg.hm4 and debugdef.m4
(pmult_SOURCES): Remove pdbg.h * lib/server.c (mf_server_start): Call mu_onexit_run.
* pmult/pmult.c: Redo logging, debugging and configuration support.
* lib/version.c (version_etc_copyright): Rename to avoid name
* tests/hdr-gete.at: Update. clash.
* tests/testsuite.at (AT_MTA_TEST): Filter out info prefix from the
'echo' output. * lib/dbcfg.c: Rewrite callbacks. Use MU3 configuration
framework.
* lib/cache.c: Use mu_debug for debugging.
* lib/db.c: Likewise.
* lib/dns.c: Likewise.
* lib/greylist.c: Likewise.
* lib/mf-dbm.c: Likewise.
* lib/rate.c: Likewise.
* lib/srvman.c: Likewise.
* lib/tbf_rate.c: Likewise.
* src/builtin/snarf.m4: Likewise.
* src/calloutd.c: Likewise.
* src/engine.c: Likewise.
* src/spf.c: Likewise.
* src/Makefile.am (mfd-dbgmod.h): Offset the indices by the
value of mfd_debug_handle.
* src/builtin/body.bi (current_message): Use
mu_stream_to_message.
* src/builtin/curhdr.bi: Use MU3 API.
* src/builtin/db.bi: Likewise.
* src/builtin/io.bi: Likewise.
* src/builtin/mail.bi: Likewise.
* src/builtin/msg.bi: Likewise.
* src/builtin/mudebug.bi: Likewise.
* src/builtin/sieve.bi: Likewise.
* src/lex.l: Likewise.
* src/savsrv.c: Likewise.
* src/srvcfg.c: Likewise.
* src/builtin/other.bi (debug_level): Rewrite using
mu_debug_category_level
(debug_spec): Rewrite using mu_debug_format_spec.
(debug): Rewrite using mu_debug_parse_spec.
* src/callout.c (smtp_io_data) <send_off, recv_off>: Remove. All
uses updated.
(smtp_io_free, smtp_send, smtp_recvline)
(smtp_io_close, callout_host, callout_mx)
(libcallout_init): Use new stream and debugging API.
* src/mailfromd.h (mfd_debug_handle): New extern.
(add_legacy_milter_port): Change signature.
* src/main.c (mf_strecho): New global.
(mfd_gacopyz_log_printer): Remove.
(read_domain_file): Change signature.
(cb_milter_timeout, cb_timeout, cb_set_variable)
(cb_include_path, cb_trace_program, cb_relayed_domain_file):
Rewrite.
(mfd_debug_handle): New variable.
(open_strecho): New function.
(main): Revise logging support initialization.
* src/mfdbtool.c: Use new MU API.
* src/pp.c: Likewise.
* src/pragma.c: Likewise.
* src/prog.c: Use new MU API.
(instr_echo): Send output to mf_strecho.
* src/prog.h (mf_strecho): New extern.
* src/builtin/msg.h (mf_message) <mstr, bstr>: New members.
* src/builtin/sa.bi: Rewrite using new stream functions.
* pmult/.gitignore: Remove pdbg.h.
* pmult/pdbg.hm4: Remove.
* pmult/debugdef.m4: Remove.
* pmult/Makefile.am (EXTRA_DIST): Remove pdbg.hm4 and
debugdef.m4
(pmult_SOURCES): Remove pdbg.h
* pmult/pmult.c: Redo logging, debugging and configuration
support.
* tests/hdr-gete.at: Update.
* tests/testsuite.at (AT_MTA_TEST): Filter out info prefix from
the
'echo' output.
2010-11-20 Sergey Poznyakoff <gray@gnu.org.ua> 2010-11-20 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes. Bugfixes.
* etc/Makefile.am: Install postfix-macros.sed to pkgdatadir. * etc/Makefile.am: Install postfix-macros.sed to pkgdatadir.
(install-data-local): Add missing $(DESTDIR) (install-data-local): Add missing $(DESTDIR)
* src/builtin/sa.bi (sa): Check the result of the initial * src/builtin/sa.bi (sa): Check the result of the initial SPAMC
SPAMC command. command.
* src/gram.y (register_macro): Set a comparator that ignores * src/gram.y (register_macro): Set a comparator that ignores
enclosing '{ }'. enclosing '{ }'. Always enclose in curly braces macro names
Always enclose in curly braces macro names longer than 1 character. longer than 1 character.
* tests/miltermacros.at: New testcase. * tests/miltermacros.at: New testcase.
* tests/Makefile.am (TESTSUITE_AT): Add miltermacros.at. * tests/Makefile.am (TESTSUITE_AT): Add miltermacros.at.
* tests/testsuite.at: Include miltermacros.at. * tests/testsuite.at: Include miltermacros.at.
2010-10-16 Sergey Poznyakoff <gray@gnu.org.ua> 2010-10-16 Sergey Poznyakoff <gray@gnu.org.ua>
Be careful about undefined sun_path in struct sockaddr_un. Be careful about undefined sun_path in struct sockaddr_un.
* gacopyz/gacopyz.c (gacopyz_handle_connection): Log unnamed * gacopyz/gacopyz.c (gacopyz_handle_connection): Log unnamed
socket as [unnamed]. socket as [unnamed].
* src/builtin/vars.bi (set_milter_$1_address): Use empty string * src/builtin/vars.bi (set_milter_$1_address): Use empty string
if the socket is unnamed. if the socket is unnamed.
2010-10-05 Sergey Poznyakoff <gray@gnu.org.ua> 2010-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes. Bugfixes.
* lib/dns.c (_dnsbase_init): Rename to dnsbase_init, now extern. * lib/dns.c (_dnsbase_init): Rename to dnsbase_init, now extern.
(all functions): Remove calls to _dnsbase_init. (all functions): Remove calls to _dnsbase_init.
* lib/libmf.h (dnsbase_init): New proto. * lib/libmf.h (dnsbase_init): New proto.
* src/calloutd.c (main): Call dnsbase_init. * src/calloutd.c (main): Call dnsbase_init.
* src/savsrv.c (cmd_run): Bugfix. * src/savsrv.c (cmd_run): Bugfix.
(callout_session_server): Bugfix. (callout_session_server): Bugfix.
* src/main.c (main): Call dnsbase_init. * src/main.c (main): Call dnsbase_init.
2010-08-31 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-31 Sergey Poznyakoff <gray@gnu.org.ua>
Implement header renaming functions. Implement header renaming functions.
* mflib/header_rename.mf4: New file. * mflib/header_rename.mf4: New file.
* mflib/.gitignore: Add header_rename.mf and rateok.mf. * mflib/.gitignore: Add header_rename.mf and rateok.mf.
* mflib/Makefile.am (MF_FILES): Add MF4_FILES (with suffix * mflib/Makefile.am (MF_FILES): Add MF4_FILES (with suffix
fixup). fixup).
Version 7.0.92 2010-08-31 Sergey Poznyakoff <gray@gnu.org.ua>
Expand the functionality of the message_header_count() function. Version 7.0.92
* src/builtin/msg.bi (message_header_count): Optional 2nd argument 2010-08-31 Sergey Poznyakoff <gray@gnu.org.ua>
specifies the name of the header to count.
Expand the functionality of the message_header_count() function.
* src/builtin/msg.bi (message_header_count): Optional 2nd
argument specifies the name of the header to count.
2010-08-30 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-30 Sergey Poznyakoff <gray@gnu.org.ua>
Two new MFL functions for reading message headers. Two new MFL functions for reading message headers.
* src/builtin/msg.bi (message_nth_header_name) * src/builtin/msg.bi (message_nth_header_name)
(message_nth_header_value): New functions. (message_nth_header_value): New functions.
callout: optionally use the VRFY command, if the remote party provides it . 2010-08-28 Sergey Poznyakoff <gray@gnu.org.ua>
* src/callout.c (smtp_io_data) <nlines, esmtp_capa>: New members. callout: optionally use the VRFY command, if the remote party
(SMTP_PARSEHLO, CAPA_VRFY): New defines. provides it.
(smtp_recv): Parse the EHLO reply, if SMTP_PARSEHLO flag is set.
Always clear it before returning. * src/callout.c (smtp_io_data) <nlines, esmtp_capa>: New
(esmtp_vrfy): New function. members.
(callout_io): Call esmtp_vrfy if enable_vrfy is set. (SMTP_PARSEHLO, CAPA_VRFY): New defines.
(smtp_io_init, smtp_send, smtp_recvline) (smtp_recv): Parse the EHLO reply, if SMTP_PARSEHLO flag is set.
(smtp_recv, callout_io): Prefix all diagnostics with the transcaction Always clear it before returning.
ID. (esmtp_vrfy): New function.
* src/callout.h (enable_vrfy): New extern. (callout_io): Call esmtp_vrfy if enable_vrfy is set.
* src/savsrv.c (enable_vrfy): New variable. (smtp_io_init, smtp_send, smtp_recvline)
* src/srvcfg.c (srv_cfg_param)<enable-vrfy>: New statement (smtp_recv, callout_io): Prefix all diagnostics with the
transcaction ID.
* src/callout.h (enable_vrfy): New extern.
* src/savsrv.c (enable_vrfy): New variable.
* src/srvcfg.c (srv_cfg_param)<enable-vrfy>: New statement
2010-08-27 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-27 Sergey Poznyakoff <gray@gnu.org.ua>
Tiny fix. Tiny fix.
* src/builtin/header.bi (header_replace): Fix a typo. * src/builtin/header.bi (header_replace): Fix a typo.
2010-08-25 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-25 Sergey Poznyakoff <gray@gnu.org.ua>
Version 7.0.91 Version 7.0.91
2010-08-24 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
Improve the caching logic in verify(). Improve the caching logic in verify().
* src/savsrv.c (vrfy_state): Remove. All uses updated. * src/savsrv.c (vrfy_state): Remove. All uses updated.
(verify): Change the cache usage logic. (verify): Change the cache usage logic.
(cmd_run): Take into account mf_timeout results. (cmd_run): Take into account mf_timeout results.
* lib/cache.c (EXPIRE_INTERVAL): Take into account mf_timeout results. * lib/cache.c (EXPIRE_INTERVAL): Take into account mf_timeout
results.
Minor change.
* src/callout.c (first_line_of): New static function.
(smtp_last_sent): Use first_line_of.
(smtp_last_received): Use first_line_of. Return the very first
line in case of multiline responses.
Bugfix. 2010-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change.
* src/callout.c (first_line_of): New static function.
(smtp_last_sent): Use first_line_of.
(smtp_last_received): Use first_line_of. Return the very first
line in case of multiline responses.
2010-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix.
* mflib/rateok.mf: Rename to rateok.mf4. Use defined() to check
whether mincnt is actually given. This fixes the bug reported by
Rich Graves on August 24, 2010.
* mflib/rateok.mf: Rename to rateok.mf4. Use defined() to 2010-08-23 Sergey Poznyakoff <gray@gnu.org.ua>
check whether mincnt is actually given. This fixes the bug
reported by Rich Graves on August 24, 2010. Bugfixes.
* lib/filenames.h (DEFAULT_PIDFILE): Remove.
* lib/logger.c (loggertab): Add syslog_async_fdset method for
syslog:async.
* src/Makefile.am (mfd-dbgmod.h): Kik off libcallout_a_SOURCES.
* src/calloutd.c (_log_setup, mf_server_log_setup): Remove.
(main): Call mf_srvcfg_log_setup. Update call to mf_srvcfg_init.
* src/engine.c (setprocid): New static function.
(mfd_callout_session_server): New function.
* src/lex.l (lex_new_source_0): Bugfux.
* src/mailfromd.h (mfd_callout_session_server): New proto.
* src/main.c (mf_diag_syslog_printer, _log_setup)
(mf_server_log_setup): Remove.
(main): Call mf_srvcfg_log_setup. Update call to mf_srvcfg_init.
* src/savsrv.c: Include signal.h
(vrfy_state): New enum.
(vrfy_queue)<state>: New member.
(verify): Use rc and qp->state to decide whether to process the
entry. This still needs some more work, though.
(addq): Initialize qp->state.
(cmd_run): Update qp->state.
(callout_session_server): Ignore SIGPIPE and SIGALRM.
* src/srvcfg.c (srv_options): Remove 's' option.
(srv_parse_opt): Logger options update optcache.
(setdefpidfilename): New static function.
(mf_srvcfg_init): Take program invocation name as the first
argument. Construct pidfile name based on it, unless pidfile
has already been initialized. Done update srvman_param.keepfds
(see mf_srvcfg_log_setup). Initialize syslog_tag.
(mf_diag_syslog_printer, mf_debug_syslog_printer): New
functions.
(mf_srvcfg_log_setup): New function.
* src/srvcfg.h (mf_srvcfg_init): Change signature.
2010-08-23 Sergey Poznyakoff <gray@gnu.org.ua>
Improve default filter.
* src/builtin/system.bi (access): New function.
* src/status.mfi (R_OK, W_OK, X_OK, F_OK): New constants.
* etc/Makefile.am: Minor change.
* etc/mailfromd.mf (whitelist_db): New constant.
(envfrom): Test for existence of the whitelist db before trying
to access it.
2010-08-23 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-23 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes. Various changes to improve backward compatibility.
* lib/filenames.h (DEFAULT_PIDFILE): Remove. * etc/mailfromd.mf: Clean up.
* lib/logger.c (loggertab): Add syslog_async_fdset method for * lib/server.c (mf_server_write_pidfile): New function.
syslog:async. (mf_server_start): Call mf_server_log_setup prior to starting
* src/Makefile.am (mfd-dbgmod.h): Kik off libcallout_a_SOURCES. listeners. Issue the start up information afterwards, to make
* src/calloutd.c (_log_setup, mf_server_log_setup): Remove. sure it is sent to the established logging channel. Call
(main): Call mf_srvcfg_log_setup. mf_server_write_pidfile instead of mu_daemon_create_pidfile,
Update call to mf_srvcfg_init. since the latter fails if the pidfile name is not absolute.
* src/engine.c (setprocid): New static function. Unlink the pidfile after mfd_srvman_run returns.
(mfd_callout_session_server): New function. * tests/testsuite.at (mailfromd_debug_header): Reflect the above
* src/lex.l (lex_new_source_0): Bugfux. change.
* src/mailfromd.h (mfd_callout_session_server): New proto. * mflib/callout.mf4 (callout_open): If milter_client_address is
* src/main.c (mf_diag_syslog_printer, _log_setup) empty (a local socket), use the word "local" instead.
(mf_server_log_setup): Remove.
(main): Call mf_srvcfg_log_setup. * src/callout.c: Include srvcfg.h
Update call to mf_srvcfg_init. (transcript): Check the smtp_transcript flag.
* src/savsrv.c: Include signal.h * src/callout.h: Remove externs declared in srvcfg.h
(vrfy_state): New enum. * src/savsrv.c: Include srvcfg.h
(vrfy_queue)<state>: New member. * src/srvcfg.c (transcript_option): Change to static.
(verify): Use rc and qp->state to decide whether to process (smtp_transcript): New variable.
the entry. This still needs some more work, though. (server_section_parser): Allow for empty label (means
(addq): Initialize qp->state. "default").
(cmd_run): Update qp->state. (srv_cfg_param): Restore the `transcript' statement.
(callout_session_server): Ignore SIGPIPE and SIGALRM. (mf_srvcfg_flush): Set the value of smtp_transcript.
* src/srvcfg.c (srv_options): Remove 's' option. * src/srvcfg.h (transcript_option): Remove extern.
(srv_parse_opt): Logger options update optcache. (smtp_transcript, io_timeout): New externs.
(setdefpidfilename): New static function.
(mf_srvcfg_init): Take program invocation name as the
first argument. Construct pidfile name based on it, unless
pidfile has already been initialized.
Done update srvman_param.keepfds (see mf_srvcfg_log_setup).
Initialize syslog_tag.
(mf_diag_syslog_printer, mf_debug_syslog_printer): New functions.
(mf_srvcfg_log_setup): New function.
* src/srvcfg.h (mf_srvcfg_init): Change signature.
Improve default filter.
* src/builtin/system.bi (access): New function.
* src/status.mfi (R_OK, W_OK, X_OK, F_OK): New constants.
* etc/Makefile.am: Minor change.
* etc/mailfromd.mf (whitelist_db): New constant.
(envfrom): Test for existence of the whitelist
db before trying to access it.
Various changes to improve backward compatibility.
* etc/mailfromd.mf: Clean up.
* lib/server.c (mf_server_write_pidfile): New function.
(mf_server_start): Call mf_server_log_setup prior to starting
listeners. Issue the start up information afterwards, to make
sure it is sent to the established logging channel.
Call mf_server_write_pidfile instead of mu_daemon_create_pidfile,
since the latter fails if the pidfile name is not absolute.
Unlink the pidfile after mfd_srvman_run returns.
* tests/testsuite.at (mailfromd_debug_header): Reflect the
above change.
* mflib/callout.mf4 (callout_open): If milter_client_address is
empty (a local socket), use the word "local" instead.
* src/callout.c: Include srvcfg.h
(transcript): Check the smtp_transcript flag.
* src/callout.h: Remove externs declared in srvcfg.h
* src/savsrv.c: Include srvcfg.h
* src/srvcfg.c (transcript_option): Change to static.
(smtp_transcript): New variable.
(server_section_parser): Allow for empty label (means "default").
(srv_cfg_param): Restore the `transcript' statement.
(mf_srvcfg_flush): Set the value of smtp_transcript.
* src/srvcfg.h (transcript_option): Remove extern.
(smtp_transcript, io_timeout): New externs.
2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes. Minor fixes.
* src/savsrv.c (mailfrom_address): Remove initializer. * src/savsrv.c (mailfrom_address): Remove initializer.
* src/callout.c (smtp_io_setup_callout): Allow for mailfrom==NULL. * src/callout.c (smtp_io_setup_callout): Allow for
mailfrom==NULL.
Fix starting of the default callout server. Reflect the actual server URL in callout_server_url. 2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
* mflib/callout.mf4 (callout_server_url): New variable. Fix starting of the default callout server. Reflect the actual
(begin): Provide a default for callout_server_url. server URL in callout_server_url.
(__callout_open_default): Return the fd.
(callout): Use return from __callout_open_default as
the first argument to callout_do.
* mflib/poll.mf (__make_extra_arg): New static function.
(_pollhost, _pollmx, stdpoll, strictpoll): Use return from
__callout_open_default as the first argument to callout_do.
Construct the rest of arguments using __make_extra_arg.
* src/builtin/callout.bi (callout_server_url): Remove.
(default_callout_server_url): New function.
(MF_INIT): Remove initialization of callout_server_url.
* src/mailfromd.h (default_callout_url): Rename to
callout_server_url.
* src/main.c (default_callout_url): Rename to
callout_server_url.
(provide_default_callout_server): Rewrite the condition.
Don't try to reset the callout_server_url MFL variable: it
is useless after compilation is finished.
(mf_server_function): Fix the use of mu_list_locate.
(main): Fix a typo in the server section label.
* src/srvcfg.c (server_section_parser): Move the call to
mf_server_function to the mu_cfg_section_end branch.
Complement the bugfix from 011f85d4
* src/mailfromd.h (SYM_PASSTOGGLE): New bit.
* src/gram.y (_ds_variable_count_fun)
(_ds_variable_fill_fun, _ds_reloc_fun): Use SYM_PASSTOGGLE
bit to avoid processing the same variable several times.
(dataseg_layout): Fix memory allocation.
Introduce callout session ID.
* lib/srvman.c (mfd_srvman_open): Print error message if no
servers are configured.
* mflib/Makefile.am (.mf4.mf): Call m4 -s.
* mflib/callout.mf4 (callout_open): Set session ID.
* src/callout.c (smtp_io_setup_callout): Replace empty
mailfrom address with <>.
(smtp_io_id): New function.
* src/callout.h (smtp_io_id): New proto.
* src/savsrv.c (session_id): New variable.
(defproctitle): New function.
(vrfy_free): Consistently set proctitle to reflect the current state.
(addq): Save session ID in the smtp io structure.
(cmd_sid): New function.
(callout_command_tab)<SID>: New command.
Bugfix * mflib/callout.mf4 (callout_server_url): New variable.
(begin): Provide a default for callout_server_url.
(__callout_open_default): Return the fd.
(callout): Use return from __callout_open_default as the first
argument to callout_do.
* mflib/poll.mf (__make_extra_arg): New static function.
(_pollhost, _pollmx, stdpoll, strictpoll): Use return from
__callout_open_default as the first argument to callout_do.
Construct the rest of arguments using __make_extra_arg.
* src/builtin/callout.bi (callout_server_url): Remove.
(default_callout_server_url): New function.
(MF_INIT): Remove initialization of callout_server_url.
* src/mailfromd.h (default_callout_url): Rename to
callout_server_url.
* src/main.c (default_callout_url): Rename to
callout_server_url.
(provide_default_callout_server): Rewrite the condition. Don't
try to reset the callout_server_url MFL variable: it is useless
after compilation is finished.
(mf_server_function): Fix the use of mu_list_locate.
(main): Fix a typo in the server section label.
* src/srvcfg.c (server_section_parser): Move the call to
mf_server_function to the mu_cfg_section_end branch.
* src/builtin/macro.bi (miltermacros): Fix minimal number of 2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
arguments.
Complement the bugfix from 011f85d4
* src/mailfromd.h (SYM_PASSTOGGLE): New bit.
* src/gram.y (_ds_variable_count_fun)
(_ds_variable_fill_fun, _ds_reloc_fun): Use SYM_PASSTOGGLE bit
to avoid processing the same variable several times.
(dataseg_layout): Fix memory allocation.
2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
Re-implement the `listens' function in mflib. Introduce callout session ID.
* mflib/portprobe.mf4: New implementation of the `listens' function. * lib/srvman.c (mfd_srvman_open): Print error message if no
* mflib/Makefile.am (MF4_FILES): New variable. servers are configured.
(MAINTAINERCLEANFILES): Add mf files produced from MF4_FILES. * mflib/Makefile.am (.mf4.mf): Call m4 -s.
(.mf4.mf): Define MF_AUTOHEADER to add a warning at the top of * mflib/callout.mf4 (callout_open): Set session ID.
the generated files. * src/callout.c (smtp_io_setup_callout): Replace empty mailfrom
* mflib/pp-setup: Issue an "automatically generated file" warning address with <>.
if MF_AUTOHEADER is defined. (smtp_io_id): New function.
* mflib/.gitignore: Add portprobe.mf * src/callout.h (smtp_io_id): New proto.
* src/builtin/dns.bi: Include srvcfg.h * src/savsrv.c (session_id): New variable.
(listens_on, listens): Remove. (defproctitle): New function.
(vrfy_free): Consistently set proctitle to reflect the current
state.
(addq): Save session ID in the smtp io structure.
(cmd_sid): New function.
(callout_command_tab)<SID>: New command.
2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix
* src/builtin/macro.bi (miltermacros): Fix minimal number of
arguments.
2010-08-22 Sergey Poznyakoff <gray@gnu.org.ua>
Re-implement the `listens' function in mflib.
* mflib/portprobe.mf4: New implementation of the `listens'
function.
* mflib/Makefile.am (MF4_FILES): New variable.
(MAINTAINERCLEANFILES): Add mf files produced from MF4_FILES.
(.mf4.mf): Define MF_AUTOHEADER to add a warning at the top of
the generated files.
* mflib/pp-setup: Issue an "automatically generated file"
warning if MF_AUTOHEADER is defined.
* mflib/.gitignore: Add portprobe.mf
* src/builtin/dns.bi: Include srvcfg.h
(listens_on, listens): Remove.
2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
Restore some cfg statements for backward compatibility. Restore some cfg statements for backward compatibility.
* src/srvcfg.h: Add copyleft header. * src/srvcfg.h: Add copyleft header.
(DEFAULT_PIDFILE): Move to lib/filenames.h. (DEFAULT_PIDFILE): Move to lib/filenames.h.
(mf_srvcfg): New struct. (mf_srvcfg): New struct.
(mf_server_function): New proto. (mf_server_function): New proto.
(parse_milter_url): New proto. (parse_milter_url): New proto.
* lib/filenames.h: Add copyleft header. * lib/filenames.h: Add copyleft header.
(DEFAULT_PIDFILE): New define. (DEFAULT_PIDFILE): New define.
* src/gram.y: Use mf_list_compare_string comparator. * src/gram.y: Use mf_list_compare_string comparator.
(initialize_variable): Avoid coredump if locus==NULL. (initialize_variable): Avoid coredump if locus==NULL.
* mailfromd.h (default_callout_url): New extern. * mailfromd.h (default_callout_url): New extern.
(compare_string): Remove proto. (compare_string): Remove proto.
* src/main.c (default_callout_url): New function. * src/main.c (default_callout_url): New function.
(compare_string): Remove function. All callers use (compare_string): Remove function. All callers use
mf_list_compare_string instead. mf_list_compare_string instead.
(mf_cfg_param): Remove ehlo-domain and mail-from-address (mf_cfg_param): Remove ehlo-domain and mail-from-address
statements (duplicated in srvcfg.c) statements (duplicated in srvcfg.c) Restore the callout-url
Restore the callout-url statement. statement.
(mf_server_function): Change signature. (mf_server_function): Change signature. Check for "option
Check for "option default" for callout servers. default" for callout servers.
(main): Move call to mf_srvcfg_flush several lines up, (main): Move call to mf_srvcfg_flush several lines up, before
before processing the filter script. processing the filter script.
* src/srvcfg.c (parse_milter_url): Remove static qualifier. * src/srvcfg.c (parse_milter_url): Remove static qualifier.
(mf_srvcfg_add, server_section_parser): Use the new calling scheme (mf_srvcfg_add, server_section_parser): Use the new calling
of mf_server_function. scheme of mf_server_function.
(server_config_stmt): Remove struct. (server_config_stmt): Remove struct.
(server_config_stmt):Change type struct mf_srvcfg. (server_config_stmt):Change type struct mf_srvcfg.
(server_section_param) <option>: New statement. (server_section_param) <option>: New statement.
<default>: Restore statement. <default>: Restore statement.
* src/calloutd.c (mf_server_function): Change signature. * src/calloutd.c (mf_server_function): Change signature.
* lib/libmf.h (mf_list_compare_string): New function. * lib/libmf.h (mf_list_compare_string): New function.
* lib/utils.c: Likewise. * lib/utils.c: Likewise.
* mflib/callout.mf4 (ehlo_domain, mailfrom_address): Comment out. See * mflib/callout.mf4 (ehlo_domain, mailfrom_address): Comment
callout.bi. out. See callout.bi.
(callout_open): Comment out sending the SET commands. (callout_open): Comment out sending the SET commands.
* mflib/spf.mf: Remove dependency on phased-out mydomain.mf. * mflib/spf.mf: Remove dependency on phased-out mydomain.mf.
(check_host): Revert to using ehlo_domain. (check_host): Revert to using ehlo_domain.
* src/builtin/callout.bi (ehlo_domain, mailfrom_address): Define here * src/builtin/callout.bi (ehlo_domain, mailfrom_address): Define
(again). here
(MF_INIT): Initialize callout_server_url, ehlo_domain (again).
and mailfrom_address. (MF_INIT): Initialize callout_server_url, ehlo_domain and
mailfrom_address.
Restore the io-timeout configuration statement. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
* src/srvcfg.c (srv_cfg_param): Restore the io-timeout statement. Restore the io-timeout configuration statement.
Minor fix. * src/srvcfg.c (srv_cfg_param): Restore the io-timeout
statement.
* pmult/pmult.c (stderr_closed_p): Remove a leftover redefinition. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes. Minor fix.
* mflib/mydomain.mf: Remove * pmult/pmult.c (stderr_closed_p): Remove a leftover
* mflib/Makefile.am: Remove mydomain.mf redefinition.
* mflib/poll.mf: Add copyleft header.
Fix namespace (mu_db -> mf_db) 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
Fix namespace (pm -> mf) Minor changes.
Fix debugging in calloutd. * mflib/mydomain.mf: Remove
* mflib/Makefile.am: Remove mydomain.mf
* mflib/poll.mf: Add copyleft header.
* src/dbgmod.awk: Use optional `offset' variable. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
* src/main.c (main): Call libcallout_init.
* src/calloutd.c: Likewise.
* lib/db.c (db_format_install): Register format (not database file) name.
* lib/debug.c (debug_next_handle): New function.
(debug_init): Register "all" only once.
* lib/debug.h (debug_next_handle): New proto.
* src/Makefile.am (callout-dbgmod.h): Offset handles by
callout_debug_handle.
* src/callout.c (libcallout_init): New function.
* src/callout.h (callout_debug_handle): New extern.
(libcallout_init): New proto.
* etc/mailfromd.mf: Minor change. Fix namespace (mu_db -> mf_db)
Rename mfd -> src 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes Fix namespace (pm -> mf)
* mfd/engine.c (mlfi_negotiate): Fix improper use of the debug macro. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/gram.y: Remove prototypes of non-existing functions.
* mfd/lex.l: Remove MF_SOURCE_NAME leftover.
* mfd/mailfromd.h (tie_in_onblock): Restore prototype.
Restore temporarly removed features. Fix debugging in calloutd.
* mfd/main.c (main): Restore the check for non-absolute * src/dbgmod.awk: Use optional `offset' variable.
script file name. * src/main.c (main): Call libcallout_init.
* src/calloutd.c: Likewise.
* lib/db.c (db_format_install): Register format (not database
file) name.
* lib/debug.c (debug_next_handle): New function.
(debug_init): Register "all" only once.
* lib/debug.h (debug_next_handle): New proto.
* src/Makefile.am (callout-dbgmod.h): Offset handles by
callout_debug_handle.
* src/callout.c (libcallout_init): New function.
* src/callout.h (callout_debug_handle): New extern.
(libcallout_init): New proto.
* mfd/srvcfg.c: Restore the --source-ip (-S) option and * etc/mailfromd.mf: Minor change.
source-ip configuration statement.
* tests/testsuite.at (mailfromd_script_warning): New define.
(AT_MTA_TEST_X, AT_MTA_TEST_SCRIPT,
(AT_MTA_TEST_FILTER_SCRIPT): Redefine mailfromd_debug_header to
account for the non-absolute script file name warning.
Silently ignore the --remove (-r) option. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/srvcfg.c: Silently ignore the --remove (-r) option. Rename mfd -> src
Restore the `on' construct. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
* etc/mailfromd.mf: Require poll and callout. Bugfixes
* lib/namefixup.c (pm_file_name_ptr_fixup): Bugfix.
* mfd/gram.y: Restore the `on poll' construct.
* mfd/lex.l: Likewise.
* mflib/callout.mf4 (ehlo_domain): Remove static qualifier.
* po/POTFILES.in: Update.
* tests/etc/Makefile.am (RCFILES): Add vmod1.mf and vmod2.mf.
* tests/etc/poll-1.rc: Require poll.
* tests/etc/poll.rc: Likewise.
* tests/poll.at: Rewrite using AT_MTA_TEST_FILTER.
* tests/poll01.at: Likewise.
* tests/poll02.at: Likewise.
* tests/poll03.at: Likewise.
* tests/poll04.at: Require poll.
Implement default callout server. Fix the handling of not imported variab
les in submodules.
* mfd/calloutd.c: New file.
* mfd/builtin/callout.bi: New file.
* mfd/builtin/.gitignore: Add callout.c
* mfd/builtin/Makefile.am (BI_FILES): Add callout.bi.
* builtin/builtin.def (provide_callout): New extern.
* mfd/Makefile.am (noinst_LIBRARIES): New library libcallout.a.
(mailfromd_SOURCES): Remove srvcfg.c
(mailfromd_LDADD, calloutd_LDADD): Add libcallout.a.
(calloutd_SOURCES): Move all sources to libcallout.a.
Add calloutd.c
(LDADD): Remove.
(mfd-dbgmod.h): Obtain symbols from libcallout_a_SOURCES as well.
(callout-dbgmod.h): Obtain symbols from libcallout_a_SOURCES.
* lib/filenames.h (DEFAULT_CALLOUT_SOCKET): New define.
* lib/libmf.h (stderr_closed_p): New proto.
* lib/utils.c (stderr_closed_p): New function.
* mfd/callout.c: Rearrange includes.
* mfd/callout.h: Rearrange includes.
(ehlo_domain, mailfrom_address): New externs.
(callout_session_server): New extern.
* mfd/savsrv.c: Rearrange includes.
(main, etc.): Remove.
* mfd/srvcfg.c (set_port): Fix 1st argument to pm_srvcfg_add.
(srv_cfg_param): New keywords: database and mail-from-address
(pm_srvcfg_flush): Initialize ehlo_domain and timeouts.
* mfd/main.c: Rearrange includes.
(pm_server_function): Use key as a selector value.
(main): Start default milter and/or callout servers, if necessary.
* mfd/symbols.c (import_builtin_variables): Minor fix.
(module_head, module_tail): New statics.
(module_register, module_symtab_enumerate): New functions.
(module_init): Register the module.
* mfd/mailfromd.h (SYM_INITIALIZED): New flag.
(module_symtab_enumerate): New proto.
* mfd/gram.y (initialize_variable): Set SYM_INITIALIZED bit.
(dataseg_layout): Use module_symtab_enumerate instead of
symtab_enumerate.
* mflib/callout.mf: Rename to mflib/callout.mf4
* mflib/Makefile.am (EXTRA_DIST): Add callout.mf4
* mflib/.gitignore: Add callout.mf.
* mflib/poll.mf: Rewrite using the callout function.
New testcase.
* tests/etc/vmod1.mf: New file.
* tests/etc/vmod2.mf: New file.
* tests/module07.at: New testcase.
* tests/Makefile.am: Add module07.at
* tests/testsuite.at: Add module07.at
(MAILFROMD_LOGOPTS): New define
(MF_CHECK_PROG, MF_CHECK_TEXT, MF_RUN_TEXT)
(AT_MTA_TEST_X, AT_MTA_TEST): Add MAILFROMD_LOGOPTS to
the mailfromd command line.
Bugfix:
* mfd/builtin/io.bi (write, read, getdelim)
(getline, fd_set_delimiter, fd_delimiter): Fix assertions.
* mfd/builtin/snarf.m4 (MF_PRAGMA): Replace '-' with '_' in
the name of the generated hander.
Improve debugging in calloutd.
* lib/debug.h (debug_vlog): New proto.
* lib/logger.c (debug_vlog): New function.
* mfd/savsrv.c (writeout): New function. Use it instead of
fprintf to send out server replies.
Add pmtool.c
Provide a default milter listener.
* mfd/main.c (main): start a default listener if no servers
have been configured.
* mfd/srvcfg.c (pm_srvcfg_add): New function.
(set_port): Rewrite using pm_srvcfg_add.
* mfd/srvcfg.h (pm_srvcfg_add): New proto.
Fix testsuite (except for poll tests).
* tests/testsuite.at (mailfromd_debug_header)
(mailfromd_debug_footer): New defines.
(__MTA_TEST): New macro.
(AT_MTA_TEST): Rewrite via __MTA_TEST.
* tests/curmsg.at: Remove mailfromd debugging output from
stderr patterns. It is added automatically by AT_MTA_TEST.
* tests/hdr-all.at: Likewise.
* tests/hdr-cap.at: Likewise.
* tests/hdr-count.at: Likewise.
* tests/hdr-get.at: Likewise.
* tests/hdr-gete.at: Likewise.
* tests/hdr-getn.at: Likewise.
* tests/hdr-itr.at: Likewise.
* tests/hdr-mul.at: Likewise.
* tests/rset.at: Likewise.
* tests/greylist-ct.at: Call mailfromd_stop if any
subtest fails.
Fixup database names in reference to the state dir.
* lib/Makefile.am (libmf_a_SOURCES): Add namefixup.c
* lib/db.c (db_format_install): Register database name
for fixup.
* lib/libmf.h: Uncover namefixup prototypes.
* lib/namefixup.c (head, tail): Statics.
* lib/optcache.c: Likewise.
* mfd/main.c: Fixup names.
Add a tool for database management.
* lib/pmdb.h (ignore_failed_reads_option, time_format_string): New extern
s.
* mfd/Makefile.am (bin_PROGRAMS): New program pmtool.
* mfd/gram.y (convert_rate): Remove.
* mfd/srvcfg.c: Include sysexits. Handle "port" option cache.
* mfd/.gitignore: Add pmtool.
Bugfix
* lib/optcache.c (find_option, pm_optcache_flush): Bugfix (ouch!)
Change callout protocol.
* mfd/builtin/vars.bi (ehlo_domain, mailfrom_address): Remove variables.
(builtin_post_setup): Remove function.
* mfd/callout.c (smtp_io_set_timeouts): New function.
* mfd/callout.h (smtp_io_set_timeouts): New proto.
* mfd/gram.y: Remove call to builtin_post_setup.
* mfd/mailfromd.h (builtin_post_setup): Remove proto.
* mfd/main.c (parse_opt): Allocate string before adding it to trace_modul
es.
* mfd/savsrv.c (ehlo_domain, mailfrom_address): New variables.
(callout_mode): New enum.
(vrfy_queue)<mode>: New member.
(verify): 2nd arg tells which timeouts to use and whether to
translate mf_timeout to mf_not_found.
All callers updated.
(addq): Use new protocol.
(cmd_vrfy): Do not free timed out entries.
(callout_command_tab): Alter protocol.
(callout_cfg_param): New keywords ehlo-domain and mail-from-address.
(init_domain): New function.
(main): Call init_domain.
* lib/cache.c (tempfail_expire_interval): New variable.
(EXPIRE_INTERVAL): Take into account mf_temp_failure.
* mflib/callout.mf, mflib/mydomain.mf, mflib/poll.mf: New files.
* mflib/Makefile.am (MF_FILES): Add callout.mf, mydomain.mf
and poll.mf
* mflib/spf.mf: Use my_domain instead of the removed ehlo_domain.
Move callout to a separate server
Move srvman and logging to lib.
* mfd/srvman.c, mfd/srvman.h: Move to lib, with edits.
* lib/Makefile.am: Update.
* mfd/Makefile.am: Update.
* lib/logger.c: New file.
* lib/debug.c (source_info_option): New global.
* lib/debug.h: Likewise.
* lib/libmf.h (logger): New struct.
(logger_select, logger_open)
(logger_close, logger_fdset)
(logger_flags, vlogmsg, logmsg): New prototypes.
* mfd/builtin/io.bi (stderr_to_log): Use logger_fdset.
* mfd/mailfromd.h (source_info_option): Remove extern.
(logmsg, vlogmsg): Remove protos.
(log_to_stderr, use_syslog_async): Remove extern.
* mfd/main.c (force_remove): Initialize to 1.
(source_info_option): Remove.
(log_to_stderr, use_syslog_async): Remove.
(syslog_printer, vlogmsg, logmsg)
(vformat_logmsg, format_logmsg)
(format_log_si, debug_locus, debug_log)
(mflog_fd): Remove.
(_log_setup): Rewrite.
(set_srvman_param): New function.
(main): Call srvman_init and set_srvman_param.
(log_stream): New variable.
(option_cache): Cache logger.
(OPTION_LOGGER): New constant.
(OPTION_NO_SYSLOG_ASYNC, OPTION_SYSLOG_ASYNC): Remove.
(options): Remove --syslog-async, --no-syslog-async. New option
--logger.
(arguments) <syslog_async>: Remove. All uses updated.
(parse_opt): Set log_stream instead of the removed log_to_stderr.
(mf_cfg_param)<syslog-async>: Remove.
<logger>: New statement.
(_log_setup): Change signature. All callers updated.
(mflog_close): Remove function.
(main): Do second log setup after calling process_options,
so that the "logger" statement and "--logger" option work
correctly. A side effect is that syntax errors are reported
on stderr even when started in daemon mode.
* mfd/pp.c (pp_extrn_start): Rewrite stderr redirection.
* tests/numrcpt.at: Remove left-over % prefix.
* mfd/builtin/io.bi (stderr_to_log): Use logger_open.
* mfd/engine.c (mailfromd_daemon): Use logger_close.
Bugfix. * mfd/engine.c (mlfi_negotiate): Fix improper use of the debug
macro.
* mfd/gram.y: Remove prototypes of non-existing functions.
* mfd/lex.l: Remove MF_SOURCE_NAME leftover.
* mfd/mailfromd.h (tie_in_onblock): Restore prototype.
* mfd/srvman.c (mfd_srvman_run): Check if stop signal arrived 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
right before select. This fixes sporadically reoccurring error
in greylist*.at.
Redo debugging support in the library.
* mfd/debug.c: Moved to lib/debug.c.
* mfd/debug.hin: Renamed to lib/debug.h.
Removed calls to m4 macros.
(__debug, debug): New macros.
(debug_locus): New proto.
* mfd/debugdef.m4: Remove.
* mfd/modlist.cin: Remove.
* lib/Makefile.am: Update.
* lib/libmf.h (TYPE_SIGNED, INT_STRLEN_BOUND)
(INT_BUFSIZE_BOUND, NUMERIC_BUFSIZE_BOUND): New defines (from mailfromd.h
)
(argp): Forward declaration of the struct.
* mfd/.gitignore: Update.
* mfd/Makefile.am (mailfromd_SOURCES): Remove debug.c and
modlist.c.
(noinst_HEADERS): Remove debug.h, add mfd-dbgmod.h.
(EXTRA_DIST): Remove debug.hin, debugdef.m4, modlist.cin and module.list.
Add dbgmod.awk.
(BUILT_SOURCES): Likewise.
(SUFFIXES): Remove .hin
(mfd-dbgmod.h): New goal.
(module.list, debug.h, modlist.c): Remove goals.
(.cin.c, .hin.h): Remove rules.
* mfd/dbgmod.awk: New file.
* mfd/builtin/snarf.m4: Change default divertion to #2.
(MF_INIT): Undivert everything here.
(MF_DEBUG): New macro.
* mfd/builtin/db.bi: Use MF_DEBUG instead of debug.
* mfd/builtin/io.bi: Likewise.
* mfd/builtin/mbox.bi: Likewise.
* mfd/builtin/other.bi: Likewise.
* mfd/builtin/sa.bi: Likewise.
* mfd/mailfromd.h (getmaxfd): Remove (already defined in libmf.h)
Include mfd-dbgmod.h
* mfd/main.c (vformat_logmsg, format_logmsg)
(format_log_si): New statics.
(debug_locus): New function.
(debug_log): Rewrite.
(modnames): New variable.
(main): Call debug_init.
* mfd/*.c: Remove definitions of MF_SOURCE_NAME. Restore temporarly removed features.
Use debug() macro uniformly.
* po/POTFILES.in: Update. * mfd/main.c (main): Restore the check for non-absolute script
file name.
Improve MFL getline interface. * mfd/srvcfg.c: Restore the --source-ip (-S) option and
source-ip configuration statement.
* tests/testsuite.at (mailfromd_script_warning): New define.
(AT_MTA_TEST_X, AT_MTA_TEST_SCRIPT,
(AT_MTA_TEST_FILTER_SCRIPT): Redefine mailfromd_debug_header to
account for the non-absolute script file name warning.
2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/builtin/io.bi (io_stream)<delim>: New member. Silently ignore the --remove (-r) option.
(close_stream): Free delim.
(read_stream_delim): Take delim as char*. * mfd/srvcfg.c: Silently ignore the --remove (-r) option.
(open): Initialize delim.
(getdelim): Optimize. 2010-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
(getline): Use ioptr->delim, fall back to "\n", if not set.
(fd_set_delimiter, fd_delimiter): New functions. Restore the `on' construct.
Change callout server protocol (part I). * etc/mailfromd.mf: Require poll and callout.
* lib/namefixup.c (pm_file_name_ptr_fixup): Bugfix.
* mfd/appinit.c: Moved to ../lib * mfd/gram.y: Restore the `on poll' construct.
* mfd/Makefile.am, lib/Makefile.am: Update accordingly. * mfd/lex.l: Likewise.
* lib/libmf.h (mu_app_rcfile): New extern. * mflib/callout.mf4 (ehlo_domain): Remove static qualifier.
(mfd_app_init): New proto. * po/POTFILES.in: Update.
* tests/etc/Makefile.am (RCFILES): Add vmod1.mf and vmod2.mf.
* mfd/savsrv.c (callout_command)<argc>: Remove. * tests/etc/poll-1.rc: Require poll.
<argmin,argmax>: New members. * tests/etc/poll.rc: Likewise.
(vrfy_queue) <serial, result, file>: New members. * tests/poll.at: Rewrite using AT_MTA_TEST_FILTER.
(serial): New static. * tests/poll01.at: Likewise.
(vrfy_free, vrfy_del): New functions. * tests/poll02.at: Likewise.
(verify): Take one argument. Show request serial numbers in proctitle for * tests/poll03.at: Likewise.
mats. * tests/poll04.at: Require poll.
(run_queue): Rewrite.
(savsrv_smtp_io_callback): New function. 2010-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
(addq): Register i/o callback function.
(cmd_vrfy): Print serial number in OK response. Implement default callout server. Fix the handling of not
(cmd_run): Print results in OK response. imported variables in submodules.
(cmd_drop): New function.
(callout_command_tab): Update. * mfd/calloutd.c: New file.
(callout_session_server): Check argmin and argmax. * mfd/builtin/callout.bi: New file.
* mfd/builtin/.gitignore: Add callout.c
* mfd/builtin/Makefile.am (BI_FILES): Add callout.bi.
* builtin/builtin.def (provide_callout): New extern.
* mfd/Makefile.am (noinst_LIBRARIES): New library libcallout.a.
(mailfromd_SOURCES): Remove srvcfg.c
(mailfromd_LDADD, calloutd_LDADD): Add libcallout.a.
(calloutd_SOURCES): Move all sources to libcallout.a. Add
calloutd.c
(LDADD): Remove.
(mfd-dbgmod.h): Obtain symbols from libcallout_a_SOURCES as
well.
(callout-dbgmod.h): Obtain symbols from libcallout_a_SOURCES.
* lib/filenames.h (DEFAULT_CALLOUT_SOCKET): New define.
* lib/libmf.h (stderr_closed_p): New proto.
* lib/utils.c (stderr_closed_p): New function.
* mfd/callout.c: Rearrange includes.
* mfd/callout.h: Rearrange includes.
(ehlo_domain, mailfrom_address): New externs.
(callout_session_server): New extern.
* mfd/savsrv.c: Rearrange includes.
(main, etc.): Remove.
* mfd/srvcfg.c (set_port): Fix 1st argument to pm_srvcfg_add.
(srv_cfg_param): New keywords: database and mail-from-address
(pm_srvcfg_flush): Initialize ehlo_domain and timeouts.
* mfd/main.c: Rearrange includes.
(pm_server_function): Use key as a selector value.
(main): Start default milter and/or callout servers, if
necessary.
* mfd/symbols.c (import_builtin_variables): Minor fix.
(module_head, module_tail): New statics.
(module_register, module_symtab_enumerate): New functions.
(module_init): Register the module.
* mfd/mailfromd.h (SYM_INITIALIZED): New flag.
(module_symtab_enumerate): New proto.
* mfd/gram.y (initialize_variable): Set SYM_INITIALIZED bit.
(dataseg_layout): Use module_symtab_enumerate instead of
symtab_enumerate.
* mflib/callout.mf: Rename to mflib/callout.mf4
* mflib/Makefile.am (EXTRA_DIST): Add callout.mf4
* mflib/.gitignore: Add callout.mf.
* mflib/poll.mf: Rewrite using the callout function.
New testcase.
* tests/etc/vmod1.mf: New file.
* tests/etc/vmod2.mf: New file.
* tests/module07.at: New testcase.
* tests/Makefile.am: Add module07.at
* tests/testsuite.at: Add module07.at
(MAILFROMD_LOGOPTS): New define
(MF_CHECK_PROG, MF_CHECK_TEXT, MF_RUN_TEXT)
(AT_MTA_TEST_X, AT_MTA_TEST): Add MAILFROMD_LOGOPTS to the
mailfromd command line.
Bugfix:
* mfd/builtin/io.bi (write, read, getdelim)
(getline, fd_set_delimiter, fd_delimiter): Fix assertions.
* mfd/builtin/snarf.m4 (MF_PRAGMA): Replace '-' with '_' in the
name of the generated hander.
2010-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Improve debugging in calloutd.
* lib/debug.h (debug_vlog): New proto.
* lib/logger.c (debug_vlog): New function.
* mfd/savsrv.c (writeout): New function. Use it instead of
fprintf to send out server replies.
2010-08-20 Sergey Poznyakoff <gray@gnu.org.ua>
Add pmtool.c
2010-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
Provide a default milter listener.
* mfd/main.c (main): start a default listener if no servers have
been configured.
* mfd/srvcfg.c (pm_srvcfg_add): New function.
(set_port): Rewrite using pm_srvcfg_add.
* mfd/srvcfg.h (pm_srvcfg_add): New proto.
2010-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
Fix testsuite (except for poll tests).
* tests/testsuite.at (mailfromd_debug_header)
(mailfromd_debug_footer): New defines.
(__MTA_TEST): New macro.
(AT_MTA_TEST): Rewrite via __MTA_TEST.
* tests/curmsg.at: Remove mailfromd debugging output from stderr
patterns. It is added automatically by AT_MTA_TEST.
* tests/hdr-all.at: Likewise.
* tests/hdr-cap.at: Likewise.
* tests/hdr-count.at: Likewise.
* tests/hdr-get.at: Likewise.
* tests/hdr-gete.at: Likewise.
* tests/hdr-getn.at: Likewise.
* tests/hdr-itr.at: Likewise.
* tests/hdr-mul.at: Likewise.
* tests/rset.at: Likewise.
* tests/greylist-ct.at: Call mailfromd_stop if any subtest
fails.
2010-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
Fixup database names in reference to the state dir.
* lib/Makefile.am (libmf_a_SOURCES): Add namefixup.c
* lib/db.c (db_format_install): Register database name for
fixup.
* lib/libmf.h: Uncover namefixup prototypes.
* lib/namefixup.c (head, tail): Statics.
* lib/optcache.c: Likewise.
* mfd/main.c: Fixup names.
2010-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
Add a tool for database management.
* lib/pmdb.h (ignore_failed_reads_option, time_format_string):
New externs.
* mfd/Makefile.am (bin_PROGRAMS): New program pmtool.
* mfd/gram.y (convert_rate): Remove.
* mfd/srvcfg.c: Include sysexits. Handle "port" option cache.
* mfd/.gitignore: Add pmtool.
2010-08-16 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix
* lib/optcache.c (find_option, pm_optcache_flush): Bugfix
(ouch!)
2010-08-15 Sergey Poznyakoff <gray@gnu.org.ua>
Change callout protocol.
* mfd/builtin/vars.bi (ehlo_domain, mailfrom_address): Remove
variables.
(builtin_post_setup): Remove function.
* mfd/callout.c (smtp_io_set_timeouts): New function.
* mfd/callout.h (smtp_io_set_timeouts): New proto.
* mfd/gram.y: Remove call to builtin_post_setup.
* mfd/mailfromd.h (builtin_post_setup): Remove proto.
* mfd/main.c (parse_opt): Allocate string before adding it to
trace_modules.
* mfd/savsrv.c (ehlo_domain, mailfrom_address): New variables.
(callout_mode): New enum.
(vrfy_queue)<mode>: New member.
(verify): 2nd arg tells which timeouts to use and whether to
translate mf_timeout to mf_not_found. All callers updated.
(addq): Use new protocol.
(cmd_vrfy): Do not free timed out entries.
(callout_command_tab): Alter protocol.
(callout_cfg_param): New keywords ehlo-domain and
mail-from-address.
(init_domain): New function.
(main): Call init_domain.
* lib/cache.c (tempfail_expire_interval): New variable.
(EXPIRE_INTERVAL): Take into account mf_temp_failure.
* mflib/callout.mf, mflib/mydomain.mf, mflib/poll.mf: New files.
* mflib/Makefile.am (MF_FILES): Add callout.mf, mydomain.mf and
poll.mf
* mflib/spf.mf: Use my_domain instead of the removed
ehlo_domain.
2010-08-15 Sergey Poznyakoff <gray@gnu.org.ua>
Move callout to a separate server
2010-07-27 Sergey Poznyakoff <gray@gnu.org.ua>
Move srvman and logging to lib.
* mfd/srvman.c, mfd/srvman.h: Move to lib, with edits.
* lib/Makefile.am: Update.
* mfd/Makefile.am: Update.
* lib/logger.c: New file.
* lib/debug.c (source_info_option): New global.
* lib/debug.h: Likewise.
* lib/libmf.h (logger): New struct.
(logger_select, logger_open)
(logger_close, logger_fdset)
(logger_flags, vlogmsg, logmsg): New prototypes.
* mfd/builtin/io.bi (stderr_to_log): Use logger_fdset.
* mfd/mailfromd.h (source_info_option): Remove extern.
(logmsg, vlogmsg): Remove protos.
(log_to_stderr, use_syslog_async): Remove extern.
* mfd/main.c (force_remove): Initialize to 1.
(source_info_option): Remove.
(log_to_stderr, use_syslog_async): Remove.
(syslog_printer, vlogmsg, logmsg)
(vformat_logmsg, format_logmsg)
(format_log_si, debug_locus, debug_log)
(mflog_fd): Remove.
(_log_setup): Rewrite.
(set_srvman_param): New function.
(main): Call srvman_init and set_srvman_param.
(log_stream): New variable.
(option_cache): Cache logger.
(OPTION_LOGGER): New constant.
(OPTION_NO_SYSLOG_ASYNC, OPTION_SYSLOG_ASYNC): Remove.
(options): Remove --syslog-async, --no-syslog-async. New option
--logger.
(arguments) <syslog_async>: Remove. All uses updated.
(parse_opt): Set log_stream instead of the removed
log_to_stderr.
(mf_cfg_param)<syslog-async>: Remove.
<logger>: New statement.
(_log_setup): Change signature. All callers updated.
(mflog_close): Remove function.
(main): Do second log setup after calling process_options, so
that the "logger" statement and "--logger" option work
correctly. A side effect is that syntax errors are reported on
stderr even when started in daemon mode.
* mfd/pp.c (pp_extrn_start): Rewrite stderr redirection.
* tests/numrcpt.at: Remove left-over % prefix.
* mfd/builtin/io.bi (stderr_to_log): Use logger_open.
* mfd/engine.c (mailfromd_daemon): Use logger_close.
2010-07-27 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix.
* mfd/srvman.c (mfd_srvman_run): Check if stop signal arrived
right before select. This fixes sporadically reoccurring error
in greylist*.at.
2010-07-27 Sergey Poznyakoff <gray@gnu.org.ua>
Redo debugging support in the library.
* mfd/debug.c: Moved to lib/debug.c.
* mfd/debug.hin: Renamed to lib/debug.h. Removed calls to m4
macros.
(__debug, debug): New macros.
(debug_locus): New proto.
* mfd/debugdef.m4: Remove.
* mfd/modlist.cin: Remove.
* lib/Makefile.am: Update.
* lib/libmf.h (TYPE_SIGNED, INT_STRLEN_BOUND)
(INT_BUFSIZE_BOUND, NUMERIC_BUFSIZE_BOUND): New defines (from
mailfromd.h)
(argp): Forward declaration of the struct.
* mfd/.gitignore: Update.
* mfd/Makefile.am (mailfromd_SOURCES): Remove debug.c and
modlist.c.
(noinst_HEADERS): Remove debug.h, add mfd-dbgmod.h.
(EXTRA_DIST): Remove debug.hin, debugdef.m4, modlist.cin and
module.list. Add dbgmod.awk.
(BUILT_SOURCES): Likewise.
(SUFFIXES): Remove .hin
(mfd-dbgmod.h): New goal.
(module.list, debug.h, modlist.c): Remove goals.
(.cin.c, .hin.h): Remove rules.
* mfd/dbgmod.awk: New file.
* mfd/builtin/snarf.m4: Change default divertion to #2.
(MF_INIT): Undivert everything here.
(MF_DEBUG): New macro.
* mfd/builtin/db.bi: Use MF_DEBUG instead of debug.
* mfd/builtin/io.bi: Likewise.
* mfd/builtin/mbox.bi: Likewise.
* mfd/builtin/other.bi: Likewise.
* mfd/builtin/sa.bi: Likewise.
* mfd/mailfromd.h (getmaxfd): Remove (already defined in
libmf.h) Include mfd-dbgmod.h
* mfd/main.c (vformat_logmsg, format_logmsg)
(format_log_si): New statics.
(debug_locus): New function.
(debug_log): Rewrite.
(modnames): New variable.
(main): Call debug_init.
* mfd/*.c: Remove definitions of MF_SOURCE_NAME. Use debug()
macro uniformly.
* po/POTFILES.in: Update.
2010-07-26 Sergey Poznyakoff <gray@gnu.org.ua>
Improve MFL getline interface.
* mfd/builtin/io.bi (io_stream)<delim>: New member.
(close_stream): Free delim.
(read_stream_delim): Take delim as char*.
(open): Initialize delim.
(getdelim): Optimize.
(getline): Use ioptr->delim, fall back to "\n", if not set.
(fd_set_delimiter, fd_delimiter): New functions.
2010-07-26 Sergey Poznyakoff <gray@gnu.org.ua>
Change callout server protocol (part I).
* mfd/appinit.c: Moved to ../lib
* mfd/Makefile.am, lib/Makefile.am: Update accordingly.
* lib/libmf.h (mu_app_rcfile): New extern.
(mfd_app_init): New proto.
* mfd/savsrv.c (callout_command)<argc>: Remove.
<argmin,argmax>: New members.
(vrfy_queue) <serial, result, file>: New members.
(serial): New static.
(vrfy_free, vrfy_del): New functions.
(verify): Take one argument. Show request serial numbers in
proctitle formats.
(run_queue): Rewrite.
(savsrv_smtp_io_callback): New function.
(addq): Register i/o callback function.
(cmd_vrfy): Print serial number in OK response.
(cmd_run): Print results in OK response.
(cmd_drop): New function.
(callout_command_tab): Update.
(callout_session_server): Check argmin and argmax.
2010-08-09 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-09 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix. Minor fix.
* mfd/engine.c (mlfi_negotiate): issue a debugging diagnostics * mfd/engine.c (mlfi_negotiate): issue a debugging diagnostics
when automatically registering the "i" macro. when automatically registering the "i" macro.
(milter_enable_state): Update first_used_state only if state (milter_enable_state): Update first_used_state only if state is
is one of the actual SMTP states (excluding begin and end). one of the actual SMTP states (excluding begin and end).
2010-08-07 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-07 Sergey Poznyakoff <gray@gnu.org.ua>
Version 7.0 Version 7.0
* NEWS, configure.ac: Update * NEWS, configure.ac: Update
* doc/upgrade.texi: Update * doc/upgrade.texi: Update
2010-08-05 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-05 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fix. Minor fix.
* mfd/engine.c (check_pidfile): Use `name' argument, * mfd/engine.c (check_pidfile): Use `name' argument, not
not `pidfile' global. `pidfile' global.
2010-08-03 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes. Improve callout sequence. Minor fixes. Improve callout sequence.
* etc/mailfromd.mf (begin): Unconditionally initialize * etc/mailfromd.mf (begin): Unconditionally initialize
ehlo_domain. Provide a comment explaining this. ehlo_domain. Provide a comment explaining this.
* mfd/builtin/vars.bi: Set ehlo_domain to the value of * mfd/builtin/vars.bi: Set ehlo_domain to the value of the
the domain name, instead of the host name. domain name, instead of the host name.
* mfd/callout.c (callout_io): Try EHLO first and fall back * mfd/callout.c (callout_io): Try EHLO first and fall back to
to HELO if it fails, as requested by RFC 2821, section HELO if it fails, as requested by RFC 2821, section 3.2 "Client
3.2 "Client Initiation". Initiation".
Bugfix. 2010-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
* mflib/sa.mf (sa_format_report_header): Initialize ret. Bugfix.
* mflib/sa.mf (sa_format_report_header): Initialize ret.
2010-08-02 Sergey Poznyakoff <gray@gnu.org.ua> 2010-08-02 Sergey Poznyakoff <gray@gnu.org.ua>
Register the "i" macro for use in the lowest SMTP state declared in the p Register the "i" macro for use in the lowest SMTP state declared
rogram. in the program.
* mfd/engine.c (first_used_state): New variable. * mfd/engine.c (first_used_state): New variable.
(mlfi_negotiate): If first_used_state is set, register "i" (mlfi_negotiate): If first_used_state is set, register "i" macro
macro for it. for it.
(milter_enable_state): Set first_used_state. (milter_enable_state): Set first_used_state.
* mfd/gram.y (register_macro): Remove static qualifier. * mfd/gram.y (register_macro): Remove static qualifier.
* mfd/builtin/macro.bi (miltermacros): New pragma. * mfd/builtin/macro.bi (miltermacros): New pragma.
* mfd/lex.l (paren_follows): Remove tie-in variable. * mfd/lex.l (paren_follows): Remove tie-in variable.
* mfd/mailfromd.h (register_macro): New proto. * mfd/mailfromd.h (register_macro): New proto.
(paren_follows): Remove extern. (paren_follows): Remove extern.
* NEWS: Update.
* doc/mailfromd.texi: Document #pragma miltermacros.
* doc/functions.texi: Likewise.
* NEWS: Update. 2010-08-02 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/mailfromd.texi: Document #pragma miltermacros.
* doc/functions.texi: Likewise.
Register the "i" macro for use in the lowest SMTP state declared in the p Register the "i" macro for use in the lowest SMTP state declared
rogram. in the program.
* mfd/engine.c (first_used_state): New variable. * mfd/engine.c (first_used_state): New variable.
(mlfi_negotiate): If first_used_state is set, register "i" (mlfi_negotiate): If first_used_state is set, register "i" macro
macro for it. for it.
(milter_enable_state): Set first_used_state. (milter_enable_state): Set first_used_state.
* mfd/gram.y (register_macro): Remove static qualifier. * mfd/gram.y (register_macro): Remove static qualifier.
* mfd/builtin/macro.bi (mta_state_macros): New pragma.
* mfd/lex.l (paren_follows): Remove tie-in variable.
* mfd/mailfromd.h (register_macro): New proto.
(paren_follows): Remove extern.
* mfd/builtin/macro.bi (mta_state_macros): New pragma. 2010-08-02 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/lex.l (paren_follows): Remove tie-in variable. Minor change.
* mfd/mailfromd.h (register_macro): New proto.
(paren_follows): Remove extern.
Minor change. * mfd/builtin/db.bi: Remove extra whitespace.
* mfd/builtin/db.bi: Remove extra whitespace. 2010-08-02 Sergey Poznyakoff <gray@gnu.org.ua>
Fix docs Fix docs
* doc/functions.texi: Update. * doc/functions.texi: Update.
* doc/mailfromd.texi: Update. * doc/mailfromd.texi: Update.
2010-07-25 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-25 Sergey Poznyakoff <gray@gnu.org.ua>
Update the docs. Update the docs.
2010-07-24 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
Discern between unset and zero module debugging levels. Discern between unset and zero module debugging levels.
* mfd/builtin/other.bi (debug_spec): Additional 3rd argument. * mfd/builtin/other.bi (debug_spec): Additional 3rd argument.
* mfd/debug.c (module_level) <isset>: New member. * mfd/debug.c (module_level) <isset>: New member.
(debug_level_p): Check module level only if it is set. (debug_level_p): Check module level only if it is set.
(debug_enable_module): Set isset to 1. (debug_enable_module): Set isset to 1.
(debug_disable_module): New function. (debug_disable_module): New function.
(parse_spec): Skip initial whitespace. Handle !module (parse_spec): Skip initial whitespace. Handle !module construct
construct (meaning to unset debugging for module). (meaning to unset debugging for module).
(debug_spec_string): New argument showunset. Print unset (debug_spec_string): New argument showunset. Print unset
modules explicitly (discern between !module and module=0). modules explicitly (discern between !module and module=0). Allow
Allow for leading whitespace in specs. for leading whitespace in specs.
* mfd/debug.hin (debug_spec_string): Change signature. * mfd/debug.hin (debug_spec_string): Change signature.
* doc/functions.texi: Update. * doc/functions.texi: Update.
* doc/mailfromd.texi: Update. * doc/mailfromd.texi: Update.
2010-07-22 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-22 Sergey Poznyakoff <gray@gnu.org.ua>
Update the docs. Update the docs.
* doc/mailfromd.texi: Update * doc/mailfromd.texi: Update
Suppress cc warnings. 2010-07-22 Sergey Poznyakoff <gray@gnu.org.ua>
* gacopyz/server.c (gacopyz_srv_eoh): Remove unused variable. Suppress cc warnings.
* mfd/dns.c (getmx): Likewise.
* mfd/lex.l: Set nounput option.
Version 6.0.94 * gacopyz/server.c (gacopyz_srv_eoh): Remove unused variable.
* mfd/dns.c (getmx): Likewise.
* mfd/lex.l: Set nounput option.
* NEWS, configure.ac: Update version number. 2010-07-22 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs; other minor changes. Version 6.0.94
* etc/postfix-macros.sed: New file. * NEWS, configure.ac: Update version number.
* etc/Makefile.am (pkglibexec_DATA): Add postfix-macros.sed.
* lib/version.c (version_etc_copyright): Update copyright years. 2010-07-22 Sergey Poznyakoff <gray@gnu.org.ua>
* mflib/spf.mf (__spf_msgid): New static. Use it instead of
referring to $i, which may be not defined.
* doc/mailfromd.texi: Update. Update docs; other minor changes.
* doc/pmult.texi: Update.
* etc/postfix-macros.sed: New file.
* etc/Makefile.am (pkglibexec_DATA): Add postfix-macros.sed.
* lib/version.c (version_etc_copyright): Update copyright years.
* mflib/spf.mf (__spf_msgid): New static. Use it instead of
referring to $i, which may be not defined.
* doc/mailfromd.texi: Update.
* doc/pmult.texi: Update.
2010-07-21 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-21 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix. Bugfix.
Minor change. 2010-07-21 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/builtin/.gitignore: Add mmq.c Minor change.
Improve DNS interface. Number of MXs used in various operations is config urable. * mfd/builtin/.gitignore: Add mmq.c
* mfd/dnsbase.c (_getmx): Change prototype. Use struct mxbuf, 2010-07-21 Sergey Poznyakoff <gray@gnu.org.ua>
(dns_get_mx_records): Likewise.
(dns_freemx): Remove.
(mxbuf_init, mxbuf_free): New functions.
* mfd/dns.h (mxbuf): New struct.
(mxbuf_t): Remove typedef.
(mxbuf_init, mxbuf_free): New functions.
(dns_get_mx_records): Change proto.
(dns_freemx): Remove proto.
* mfd/dnscache.c (parse_value, dns_cache_get): Change signature. All call
ers
updated.
* mfd/mailfromd.h (getmx, getmxip): Change signature.
(max_callout_mx, max_match_mx): New externs.
(dns_cache_get): Change signature.
* mfd/main.c (max_callout_mx, max_match_mx): New globals.
(mf_cfg_param): New statements "max-callout-mx" and "max-match-mx".
* mfd/callout.c (callout_mx): Use new mxbuf interface.
* mfd/dns.c (getmx): Change signature. Use new mxbuf interface.
(getmxip): Likewise.
* mfd/prog.c (mx_match): Use new mxbuf interface. Limit number
of MXs by max_match_mx.
* mfd/spf.c (mech_mx): Use new mxbuf interface.
* mfd/builtin/dns.bi (dns_cfg_param): New statement "max-dns-reply-mx".
(primitive_hasmx,getmx)
(primitive_ismx): Rewrite to use new mxbuf interface.
* doc/values.texi (MAX_DNS_MX, MAXMXCOUNT): New values. Improve DNS interface. Number of MXs used in various operations
* doc/functions.texi: Update. is configurable.
* doc/mailfromd.texi: Update.
* doc/pmult.texi: Update. * mfd/dnsbase.c (_getmx): Change prototype. Use struct mxbuf,
* doc/values.texi (MAX_DNS_MX, MAXMXCOUNT): New values. (dns_get_mx_records): Likewise.
(dns_freemx): Remove.
(mxbuf_init, mxbuf_free): New functions.
* mfd/dns.h (mxbuf): New struct.
(mxbuf_t): Remove typedef.
(mxbuf_init, mxbuf_free): New functions.
(dns_get_mx_records): Change proto.
(dns_freemx): Remove proto.
* mfd/dnscache.c (parse_value, dns_cache_get): Change signature.
All callers updated.
* mfd/mailfromd.h (getmx, getmxip): Change signature.
(max_callout_mx, max_match_mx): New externs.
(dns_cache_get): Change signature.
* mfd/main.c (max_callout_mx, max_match_mx): New globals.
(mf_cfg_param): New statements "max-callout-mx" and
"max-match-mx".
* mfd/callout.c (callout_mx): Use new mxbuf interface.
* mfd/dns.c (getmx): Change signature. Use new mxbuf interface.
(getmxip): Likewise.
* mfd/prog.c (mx_match): Use new mxbuf interface. Limit number
of MXs by max_match_mx.
* mfd/spf.c (mech_mx): Use new mxbuf interface.
* mfd/builtin/dns.bi (dns_cfg_param): New statement
"max-dns-reply-mx".
(primitive_hasmx,getmx)
(primitive_ismx): Rewrite to use new mxbuf interface.
* doc/values.texi (MAX_DNS_MX, MAXMXCOUNT): New values.
* doc/functions.texi: Update.
* doc/mailfromd.texi: Update.
* doc/pmult.texi: Update.
* doc/values.texi (MAX_DNS_MX, MAXMXCOUNT): New values.
2010-07-21 Sergey Poznyakoff <gray@gnu.org.ua>
Remove hardcoded limits on the number of A and PTR records in
DNS replies.
Remove hardcoded limits on the number of A and PTR records in DNS replies * mfd/main.c (mf_runtime_param_finish): Fix.
. * doc/functions.texi: Document changes to DNS functions.
* doc/mailfromd.texi (conf-runtime): Document max-dns-reply-a
and max-dns-reply-ptr.
* doc/values.texi (MAX_DNS_A, MAX_DNS_PTR): New values.
* mfd/builtin/dns.bi (dns_cfg_param): Define new configuration
statements in runtime block: max-dns-reply-a, max-dns-reply-ptr.
(dns_getaddr, dns_getname): Do not use hardcoded limits.
(MF_INIT): Register new configuration statements.
* mfd/main.c (mf_runtime_param_finish): Fix. 2010-07-21 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/functions.texi: Document changes to DNS functions.
* doc/mailfromd.texi (conf-runtime): Document max-dns-reply-a Make runtime constants in builtin/*.bi sources configurable.
and max-dns-reply-ptr.
* doc/values.texi (MAX_DNS_A, MAX_DNS_PTR): New values. * mfd/mailfromd.h (mf_add_runtime_params): New proto.
* mfd/main.c (mf_cfg_param)<runtime>: New entry.
* mfd/builtin/dns.bi (dns_cfg_param): Define new configuration (mf_add_runtime_params,mf_runtime_param_finish): New functions.
statements in runtime block: max-dns-reply-a, max-dns-reply-ptr. (main): Call mf_runtime_param_finish.
(dns_getaddr, dns_getname): Do not use hardcoded limits.
(MF_INIT): Register new configuration statements. * mfd/builtin/io.bi (nstreams): New static, used instead of
NSTREAMS macro.
Make runtime constants in builtin/*.bi sources configurable. (io_cfg_param, MF_INIT): Declare a configuration statement to
confifure nstreams.
* mfd/mailfromd.h (mf_add_runtime_params): New proto. * mfd/builtin/mbox.bi (nmboxes): New static, used instead of
* mfd/main.c (mf_cfg_param)<runtime>: New entry. NMBOXES macro.
(mf_add_runtime_params,mf_runtime_param_finish): New functions. (mbox_cfg_param, MF_INIT): Declare a configuration statement to
(main): Call mf_runtime_param_finish. confifure nmboxes.
* mfd/builtin/msg.bi (nmsgs): New static, used instead of NMSGS
* mfd/builtin/io.bi (nstreams): New static, used instead of macro.
NSTREAMS macro. (msg_cfg_param, MF_INIT): Declare a configuration statement to
(io_cfg_param, MF_INIT): Declare a confifure nmsgs.
configuration statement to confifure nstreams.
* mfd/builtin/mbox.bi (nmboxes): New static, used instead of * doc/Makefile.am (check-runtime-config): New rule.
NMBOXES macro. (all-check-docs): Depend on check-runtime-config.
(mbox_cfg_param, MF_INIT): Declare a (check-sub-config): Ignore the "runtime" section.
configuration statement to confifure nmboxes.
* mfd/builtin/msg.bi (nmsgs): New static, used instead of * doc/functions.texi: Document the runtime limits.
NMSGS macro. * doc/mailfromd.texi (conf-runtime): New node.
(msg_cfg_param, MF_INIT): Declare a * doc/values.texi (NSTREAMS, NMBOXES, NMSGS): New values.
configuration statement to confifure nmsgs.
* mfd/msg.h: Moved to builtin.
* doc/Makefile.am (check-runtime-config): New rule. * mfd/Makefile.am (noinst_HEADERS): Remove msg.h
(all-check-docs): Depend on check-runtime-config. * mfd/builtin/Makefile.am (noinst_HEADERS): Add msg.h
(check-sub-config): Ignore the "runtime" section.
* doc/functions.texi: Document the runtime limits.
* doc/mailfromd.texi (conf-runtime): New node.
* doc/values.texi (NSTREAMS, NMBOXES, NMSGS): New values.
* mfd/msg.h: Moved to builtin.
* mfd/Makefile.am (noinst_HEADERS): Remove msg.h
* mfd/builtin/Makefile.am (noinst_HEADERS): Add msg.h
2010-07-20 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-20 Sergey Poznyakoff <gray@gnu.org.ua>
Update docs. Update docs.
2010-07-17 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-17 Sergey Poznyakoff <gray@gnu.org.ua>
Documentation: describe the changes since the last release and the upgrad Documentation: describe the changes since the last release and
e procedure. the upgrade procedure.
2010-07-15 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-15 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes to the docs. Minor changes to the docs.
Write more docs. 2010-07-15 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/deprecate.texi: Remove. Write more docs.
* doc/pragma-database.texi: Remove.
* doc/pragma-option.texi: Remove.
* doc/Makefile.am (mailfromd_TEXINFOS): Remove the above.
(check-pragmas): Remove the rule, but leave a placeholder for
a while.
(check-sub-config): Fix the rule to allow for dashes in keyword
names.
* doc/functions.texi: Fix a typo.
* doc/macros.texi (histref): New macro.
* doc/mailfromd.texi: Remove obsolete sections. Describe
callout servers and SMTP timeouts.
* mflib/sav.mf: Remove. * doc/deprecate.texi: Remove.
* doc/pragma-database.texi: Remove.
* doc/pragma-option.texi: Remove.
* doc/Makefile.am (mailfromd_TEXINFOS): Remove the above.
(check-pragmas): Remove the rule, but leave a placeholder for a
while.
(check-sub-config): Fix the rule to allow for dashes in keyword
names.
* doc/functions.texi: Fix a typo.
* doc/macros.texi (histref): New macro.
* doc/mailfromd.texi: Remove obsolete sections. Describe callout
servers and SMTP timeouts.
* mflib/sav.mf: Remove.
2010-07-14 Sergey Poznyakoff <gray@gnu.org.ua> 2010-07-14 Sergey Poznyakoff <gray@gnu.org.ua>
Document try-catch and dclex Document try-catch and dclex
* NEWS: Update. * NEWS: Update.
* doc/mailfromd.texi: Document try-catch and dclex. * doc/mailfromd.texi: Document try-catch and dclex.
* doc/upgrade.texi : Update. * doc/upgrade.texi : Update.
* doc/values.texi (MIN_EXCEPTION, MAX_EXCEPTION): New values. * doc/values.texi (MIN_EXCEPTION, MAX_EXCEPTION): New values.
Improve docs: replace %var with var. 2010-07-14 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/functions.texi: Update. Improve docs: replace %var with var.
* doc/mailfromd.texi: Update.
Restructure the manual. * doc/functions.texi: Update.
* doc/mailfromd.texi: Update.
Move function descriptions in a separate chapter. 2010-07-14 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/functions.texi: New file. Restructure the manual.
* doc/Makefile.am (info_TEXINFOS): Add functions.texi
* doc/mailfromd.texi: Restructure. Move function descriptions in a separate chapter.
* doc/functions.texi: New file.
* doc/Makefile.am (info_TEXINFOS): Add functions.texi
* doc/mailfromd.texi: Restructure.
2010-07-14 Sergey Poznyakoff <gray@gnu.org.ua>
Minor changes Minor changes
* NEWS: Reword some passages. * NEWS: Reword some passages.
* etc/Makefile.am (EXTRA_DIST): Add sendmail-8.14.3.connect.diff * etc/Makefile.am (EXTRA_DIST): Add sendmail-8.14.3.connect.diff
2010-06-14 Sergey Poznyakoff <gray@gnu.org.ua> 2010-06-14 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes in io.bi Bugfixes in io.bi
* mfd/builtin/io.bi (mfd/builtin/io.bi): Free str->name. * mfd/builtin/io.bi (mfd/builtin/io.bi): Free str->name.
(open): Allocate memory for iotab[i].name. (open): Allocate memory for iotab[i].name.
(open_parsed_inet_stream): Remove select-driven loop (open_parsed_inet_stream): Remove select-driven loop which did
which did nothing except eating up CPU. nothing except eating up CPU.
2010-06-13 Sergey Poznyakoff <gray@gnu.org.ua> 2010-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change Minor change
Warn about risky uses of accept. Provide ways to properly handle them. 2010-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/builtin/mmq.bi: New source. Warn about risky uses of accept. Provide ways to properly handle
* builtin/Makefile.am (BI_FILES): Add mmq.bi them.
* mfd/debug.hin (init_debug_modlist) * mfd/builtin/mmq.bi: New source.
(debug_init): New prototypes. * builtin/Makefile.am (BI_FILES): Add mmq.bi
* mfd/engine.c (message_data): Rename hdr to mmq. All uses
updated. * mfd/debug.hin (init_debug_modlist)
(priv_store_msgmod_closure): Purge the queue if cmd is NULL. (debug_init): New prototypes.
(mlfi_eom): Emit warning if accept is called when the MMQ is * mfd/engine.c (message_data): Rename hdr to mmq. All uses
not empty. updated.
* mfd/gram.y: Handle NULL closure. (priv_store_msgmod_closure): Purge the queue if cmd is NULL.
* mfd/mailfromd.h (env_clear_msgmod): New proto. (mlfi_eom): Emit warning if accept is called when the MMQ is not
* mfd/prog.c (ENVF_MSGMOD): New constant. empty.
(exception_context)<flags>: New member. * mfd/gram.y: Handle NULL closure.
(runtime_warning): Rewrite using mu_diag_printf. * mfd/mailfromd.h (env_clear_msgmod): New proto.
(instr_result): Warn user if `accept' is called * mfd/prog.c (ENVF_MSGMOD): New constant.
after commands that modify message headers or (exception_context)<flags>: New member.
body. (runtime_warning): Rewrite using mu_diag_printf.
(env_clear_msgmod): New function. (instr_result): Warn user if `accept' is called after commands
(env_msgmod): Set ENVF_MSGMOD flag. that modify message headers or body.
(env_clear_msgmod): New function.
(env_msgmod): Set ENVF_MSGMOD flag.
* NEWS, doc/mailfromd.texi: Document mmq_purge and changes to
accept.
2010-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
Version 6.0.93
* NEWS, doc/mailfromd.texi: Document mmq_purge and changes to accept. * configure.ac, NEWS: Update.
* mfd/mailfromd.h [USE_SYSLOG_ASYNC] (use_syslog_async): New
extern.
2010-06-12 Sergey Poznyakoff <gray@gnu.org.ua> 2010-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
Version 6.0.93 Improve handling of stderr in open("|...").
* configure.ac, NEWS: Update. * doc/mailfromd.texi: Document dequote and extensions to
* mfd/mailfromd.h [USE_SYSLOG_ASYNC] (use_syslog_async): New open("|..").
extern. * builtin/io.bi (STDERR_SHUT, STDERR_NULL)
(STDERR_LOG, STDERR_FILE, STDERR_FILE_APPEND)
Improve handling of stderr in open("|..."). (LOG_TAG_PFX, LOG_TAG_PFX_LEN): New defines.
(stderr_to_log, stderr_handler)
* doc/mailfromd.texi: Document dequote and extensions to (parse_stderr_redirect): New statics.
open("|.."). (open_program_stream): Always close or redirect stderr.
* builtin/io.bi (STDERR_SHUT, STDERR_NULL) * NEWS: Updated.
(STDERR_LOG, STDERR_FILE, STDERR_FILE_APPEND)
(LOG_TAG_PFX, LOG_TAG_PFX_LEN): New defines.
(stderr_to_log, stderr_handler)
(parse_stderr_redirect): New statics.
(open_program_stream): Always close or redirect stderr.
* NEWS: Updated.
* doc/Makefile.am (check-builtins): Fix rule to match new * doc/Makefile.am (check-builtins): Fix rule to match new naming
naming convention. convention.
2010-06-08 Sergey Poznyakoff <gray@gnu.org.ua> 2010-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
Smap forked into a separate project. Smap forked into a separate project.
* NEWS, configure.ac: Version 6.0.92. * NEWS, configure.ac: Version 6.0.92.
* Makefile.am (SUBDIRS): Remove smap. * Makefile.am (SUBDIRS): Remove smap.
* doc/Makefile.am, doc/mailfromd.texi: Remove smap docs. * doc/Makefile.am, doc/mailfromd.texi: Remove smap docs.
* doc/smap.texi: Remove. * doc/smap.texi: Remove.
* smap/.gitignore: Remove. * smap/.gitignore: Remove.
* smap/Makefile.am: Remove. * smap/Makefile.am: Remove.
* smap/smap.c: Remove. * smap/smap.c: Remove.
* po/POTFILES.in: Update. * po/POTFILES.in: Update.
Bugfix. 2010-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: Remove whitespace around shell assignment operator. Bugfix.
* configure.ac: Remove whitespace around shell assignment
operator.
2010-06-04 Sergey Poznyakoff <gray@gnu.org.ua> 2010-06-04 Sergey Poznyakoff <gray@gnu.org.ua>
Optimize boolean shortcut evaluation when one of arguments is constant. Optimize boolean shortcut evaluation when one of arguments is
constant.
* mfd/drivers.c (node_boolean_value, _optimize_shortcut): New static * mfd/drivers.c (node_boolean_value, _optimize_shortcut): New
functions. static functions.
(optimize_relational): Optimize boolean shortcut evaluation. (optimize_relational): Optimize boolean shortcut evaluation.
* mfd/debug.hin (debug_register): New prototype. * mfd/debug.hin (debug_register): New prototype.
* NEWS: Fix typos. * NEWS: Fix typos.
2010-05-28 Sergey Poznyakoff <gray@gnu.org.ua> 2010-05-28 Sergey Poznyakoff <gray@gnu.org.ua>
Minor fixes. Minor fixes.
* doc/mailfromd.texi (MF_OBSTACK_1GROW): Change type of the temp * doc/mailfromd.texi (MF_OBSTACK_1GROW): Change type of the temp
variable to char. variable to char.
* doc/mailfromd.texi: Minor fixes. * doc/mailfromd.texi: Minor fixes.
Improve debugging system.
* mfd/debug.cin: Remove.
* mfd/modlist.cin: New file.
* mfd/Makefile.am (mailfromd_SOURCES): Add modlist.c.
(EXTRA_DIST): Remove debug.cin, add modlist.cin.
(BUILT_SOURCES): Remove debug.c, add modlist.c.
(debug.c): Rewrite rule.
(debug.h): Remove rule.
* mfd/.gitignore: Remove debug.c, add modlist.c.
* mfd/builtin/Makefile.am (module.list): Remove.
* mfd/builtin/.gitignore: Likewise.
* mfd/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Do not output #define
directive, only return the constructed module name.
(_init_builtin): Register module in the debugging subsystem and
initialize debug_handle.
Define MF_SOURCE_NAME to debug_handle.
* mfd/debug.hin (debug_spec_string): Change signature.
* mfd/main.c (main): Call init_debug_modlist.
* mfd/builtin/other.bi (debug_spec): Take additional argument, 2010-05-28 Sergey Poznyakoff <gray@gnu.org.ua>
which specifies whether to return zero level specifications.
* NEWS: Update. Improve debugging system.
* mfd/debug.cin: Remove.
* mfd/modlist.cin: New file.
* mfd/Makefile.am (mailfromd_SOURCES): Add modlist.c.
(EXTRA_DIST): Remove debug.cin, add modlist.cin.
(BUILT_SOURCES): Remove debug.c, add modlist.c.
(debug.c): Rewrite rule.
(debug.h): Remove rule.
* mfd/.gitignore: Remove debug.c, add modlist.c.
* mfd/builtin/Makefile.am (module.list): Remove.
* mfd/builtin/.gitignore: Likewise.
* mfd/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Do not output
#define directive, only return the constructed module name.
(_init_builtin): Register module in the debugging subsystem and
initialize debug_handle. Define MF_SOURCE_NAME to debug_handle.
* mfd/debug.hin (debug_spec_string): Change signature.
* mfd/main.c (main): Call init_debug_modlist.
* mfd/builtin/other.bi (debug_spec): Take additional argument,
which specifies whether to return zero level specifications.
* NEWS: Update.
2010-05-28 Sergey Poznyakoff <gray@gnu.org.ua>
Change builtin trace control. Change builtin trace control.
The method used so far limited number of built-in modules. This The method used so far limited number of built-in modules. This
limit was already reached with the addition of email.bi module, which limit was already reached with the addition of email.bi module,
was the compelling reason to implement a better scalable solution. which was the compelling reason to implement a better scalable
solution.
* mfd/builtin/builtin.c: New file.
* mfd/builtin/.gitignore: Explicitly mention ignored files. * mfd/builtin/builtin.c: New file.
* mfd/builtin/Makefile.am (libbuiltin_a_SOURCES): Add builtin.c. * mfd/builtin/.gitignore: Explicitly mention ignored files.
* mfd/builtin/builtin.def (builtin_module) <mask>: Remove. * mfd/builtin/Makefile.am (libbuiltin_a_SOURCES): Add builtin.c.
<trace>: New member. * mfd/builtin/builtin.def (builtin_module) <mask>: Remove.
(builtin_setup, builtin_set_module_trace) <trace>: New member.
(builtin_set_all_module_trace,builtin_module_trace): New protos. (builtin_setup, builtin_set_module_trace)
* mfd/builtin/init.m4 (MF_MODULE_MASK): Replace by MF_MODULE_IDX. (builtin_set_all_module_trace,builtin_module_trace): New protos.
Change initializers of builtin_module. * mfd/builtin/init.m4 (MF_MODULE_MASK): Replace by
Define BUILTIN_IDX_MAX. MF_MODULE_IDX. Change initializers of builtin_module. Define
* mfd/builtin/snarf.m4 (MF_MODULE_MASK): Replace by MF_MODULE_IDX. BUILTIN_IDX_MAX.
(__mf_defun): Use builtin_module_trace. * mfd/builtin/snarf.m4 (MF_MODULE_MASK): Replace by
* mfd/prog.c: Don't define DEFINE_BUILTIN_MODULE. MF_MODULE_IDX.
(prog_trace_option): Remove variable. (__mf_defun): Use builtin_module_trace.
(PROG_TRACE_ENGINE): Rewrite macro. * mfd/prog.c: Don't define DEFINE_BUILTIN_MODULE.
(enable_module_trace, disable_module_trace): Remove in favor of (prog_trace_option): Remove variable.
builtin_set_module_trace. (PROG_TRACE_ENGINE): Rewrite macro.
(toggle_prog_trace): Remove. (enable_module_trace, disable_module_trace): Remove in favor of
(set_prog_trace): New function. builtin_set_module_trace.
(enable_prog_trace, disable_prog_trace): Use set_prog_trace. (toggle_prog_trace): Remove.
(builtin_setup): Move to mfd/builtin/builtin.c. (set_prog_trace): New function.
* po/POTFILES.in: Add mfd/builtin/builtin.c. (enable_prog_trace, disable_prog_trace): Use set_prog_trace.
(builtin_setup): Move to mfd/builtin/builtin.c.
* po/POTFILES.in: Add mfd/builtin/builtin.c.
2010-05-26 Sergey Poznyakoff <gray@gnu.org.ua> 2010-05-26 Sergey Poznyakoff <gray@gnu.org.ua>
Amend previous commit: Amend previous commit:
* NEWS: Update. * NEWS: Update.
* mfd/builtin/Makefile.am: Update. * mfd/builtin/Makefile.am: Update.
* mfd/builtin/dns.bi: Update. * mfd/builtin/dns.bi: Update.
Implement dequote function 2010-05-26 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/builtin/email.bi: New function. Implement dequote function
* mfd/builtin/Makefile.am (BI_FILES): Add email.bi.
* mfd/builtin/dns.bi (domainpart, localpart): Move to email.bi. * mfd/builtin/email.bi: New function.
* NEWS: Update. * mfd/builtin/Makefile.am (BI_FILES): Add email.bi.
* mfd/builtin/dns.bi (domainpart, localpart): Move to email.bi.
* NEWS: Update.
Reorganize source tree structure. 2010-05-26 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac (AC_CONFIG_FILES): Add mfd/builtin/Makefile. Reorganize source tree structure.
* mfd/.gitignore: Update.
* mfd/Makefile.am (SUBDIRS): New variable.
(M4_FILES): Remove (see mfd/builtin/Makefile.am). All references updated.
(noinst_HEADERS): Remove builtin.h.
(EXTRA_DIST): Remove files moved to builtin.
(BUILT_SOURCES): Likewise.
(INCLUDES): Add -I$(top_srcdir)/mfd/builtin.
(.def.h): Remove rule.
(module.list): New goal.
(LDADD): Add builtin.
(SUFFIXES): Remove .m4 .c .def .h.
(.m4.c, .def.h): Remove rules.
(.cin.c, .hin.h): Rewrite.
(debug.c, debug.h): Change dependencies.
* mfd/builtin: New directory.
* mfd/bi_(.*).m4: Move to mfd/builtin/\1.bi
* mfd/builtin.def: Move to mfd/builtin.
* mfd/init.m4: Likewise.
* mfd/snarf.m4: Likewise.
* mfd/builtin/Makefile.am: New file
* mfd/builtin/.gitignore: New file
* mfd/builtin/init.m4 (MF_MODULE_NAME): Reflect changes in file naming.
* mfd/builtin/snarf.m4 (MF_MODULE_NAME)
(MF_SOURCE_DEBUG_NAME): Likewise.
* mfd/debug.cin (struct modinfo): Remove.
Include module.list and builtin/module.list.
* mfd/debugdef.m4 (__makedebugsym): Update.
* po/POTFILES.in: Update. * configure.ac (AC_CONFIG_FILES): Add mfd/builtin/Makefile.
* mfd/.gitignore: Update.
* mfd/Makefile.am (SUBDIRS): New variable.
(M4_FILES): Remove (see mfd/builtin/Makefile.am). All references
updated.
(noinst_HEADERS): Remove builtin.h.
(EXTRA_DIST): Remove files moved to builtin.
(BUILT_SOURCES): Likewise.
(INCLUDES): Add -I$(top_srcdir)/mfd/builtin.
(.def.h): Remove rule.
(module.list): New goal.
(LDADD): Add builtin.
(SUFFIXES): Remove .m4 .c .def .h.
(.m4.c, .def.h): Remove rules.
(.cin.c, .hin.h): Rewrite.
(debug.c, debug.h): Change dependencies.
* mfd/builtin: New directory.
* mfd/bi_(.*).m4: Move to mfd/builtin/\1.bi
* mfd/builtin.def: Move to mfd/builtin.
* mfd/init.m4: Likewise.
* mfd/snarf.m4: Likewise.
* mfd/builtin/Makefile.am: New file
* mfd/builtin/.gitignore: New file
* mfd/builtin/init.m4 (MF_MODULE_NAME): Reflect changes in file
naming.
* mfd/builtin/snarf.m4 (MF_MODULE_NAME)
(MF_SOURCE_DEBUG_NAME): Likewise.
* mfd/debug.cin (struct modinfo): Remove. Include module.list
and builtin/module.list.
* mfd/debugdef.m4 (__makedebugsym): Update.
* po/POTFILES.in: Update.
2010-05-14 Sergey Poznyakoff <gray@gnu.org.ua> 2010-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
Document new features in NEWS. Document new features in NEWS.
2010-05-12 Sergey Poznyakoff <gray@gnu.org.ua> 2010-05-12 Sergey Poznyakoff <gray@gnu.org.ua>
Add comments for the translators. Add comments for the translators.
2010-05-08 Sergey Poznyakoff <gray@gnu.org.ua> 2010-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
More compatibility fixes. More compatibility fixes.
* lib/mudefs.h (MUREF): New macro. * lib/mudefs.h (MUREF): New macro.
* pmult/pmult.c (parse_opt): Use MUREF instead of & where necessary. * pmult/pmult.c (parse_opt): Use MUREF instead of & where
* smap/smap.c: Likewise. necessary.
* smap/smap.c: Likewise.
2010-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
Avoid name clashes. Avoid name clashes.
* mfd/snarf.m4 (MF_VAR_SET_STRING): Prefix local variables with * mfd/snarf.m4 (MF_VAR_SET_STRING): Prefix local variables with
a double-underscore to avoid name clashes with the existing variables. a double-underscore to avoid name clashes with the existing
variables.
2010-04-20 Sergey Poznyakoff <gray@gnu.org.ua> 2010-04-20 Sergey Poznyakoff <gray@gnu.org.ua>
Update for compatibility with Mailutils HEAD. Update for compatibility with Mailutils HEAD.
* configure.ac: Check for struct mu_argp_node_list. * configure.ac: Check for struct mu_argp_node_list.
* doc/upgrade.texi: Replace itemize with enumerate. * doc/upgrade.texi: Replace itemize with enumerate.
* lib/mudefs.h: New file. * lib/mudefs.h: New file.
* lib/Makefile.am (noinst_HEADERS): Add mudefs.h * lib/Makefile.am (noinst_HEADERS): Add mudefs.h
* pmult/pmult.c: Include mudefs.h * pmult/pmult.c: Include mudefs.h
(parse_opt): Use MUDEF_ARGP_NODE_LIST instead of (parse_opt): Use MUDEF_ARGP_NODE_LIST instead of struct
struct mu_argp_node_list. mu_argp_node_list.
* smap/smap.c: Likewise. * smap/smap.c: Likewise.
2010-01-20 Sergey Poznyakoff <gray@gnu.org.ua> 2010-01-20 Sergey Poznyakoff <gray@gnu.org.ua>
Fix keeping state information in the server. Fix keeping state information in the server.
* gacopyz/gacopyz.h (gacopyz_flag_op): New enum. * gacopyz/gacopyz.h (gacopyz_flag_op): New enum.
(GACOPYZ_SRV_DISABLED): New define. (GACOPYZ_SRV_DISABLED): New define.
(gacopyz_srv_state): Remove proto. (gacopyz_srv_state): Remove proto.
(gacopyz_srv_flags, gacopyz_srv_get_flags): New protos. (gacopyz_srv_flags, gacopyz_srv_get_flags): New protos.
* gacopyz/server.c (gacopyz_srv_state): Remove. * gacopyz/server.c (gacopyz_srv_state): Remove.
(_SRV_CONNECTED,_SRV_READY,_SRV_CLRDIS) (_SRV_CONNECTED,_SRV_READY,_SRV_CLRDIS)
(_SRV_SYS_MASK): New defines. (_SRV_SYS_MASK): New defines.
(gacopyz_srv.state): Remove. (gacopyz_srv.state): Remove.
(gacopyz_srv.flags): New member. (gacopyz_srv.flags): New member.
(gacopyz_srv_state): Remove function. (gacopyz_srv_state): Remove function.
(gacopyz_srv_flags, gacopyz_srv_get_flags): New functions. (gacopyz_srv_flags, gacopyz_srv_get_flags): New functions.
(gacopyz_srv_create): Init flags. (gacopyz_srv_create): Init flags.
(gacopyz_srv_connect): Set _SRV_CONNECTED flag. (gacopyz_srv_connect): Set _SRV_CONNECTED flag.
(gacopyz_srv_negotiate): Set _SRV_READY flag. (gacopyz_srv_negotiate): Set _SRV_READY flag.
(gacopyz_srv_send_command): On receiving the SMFIR_REPLYCODE (gacopyz_srv_send_command): On receiving the SMFIR_REPLYCODE
reply set GACOPYZ_SRV_DISABLED flag, if the original command reply set GACOPYZ_SRV_DISABLED flag, if the original command was
was one of SMFIC_BODY, SMFIC_HEADER or SMFIC_EOH. one of SMFIC_BODY, SMFIC_HEADER or SMFIC_EOH.
(gacopyz_srv_abort): Update flags. (gacopyz_srv_abort): Update flags.
(gacopyz_srv_quit): Likewise. (gacopyz_srv_quit): Likewise.
(_SRV_ASSERT_FLAG): New macro. (_SRV_ASSERT_FLAG): New macro.
(gacopyz_srv_helo) (gacopyz_srv_helo)
(gacopyz_srv_envfrom,gacopyz_srv_envrcpt) (gacopyz_srv_envfrom,gacopyz_srv_envrcpt)
(gacopyz_srv_data,gacopyz_srv_header) (gacopyz_srv_data,gacopyz_srv_header)
(gacopyz_srv_eoh,gacopyz_srv_body): Return SMFIR_CONTINUE if (gacopyz_srv_eoh,gacopyz_srv_body): Return SMFIR_CONTINUE if
GACOPYZ_SRV_DISABLED bit is set. GACOPYZ_SRV_DISABLED bit is set.
(gacopyz_srv_eom): Likewise, but clear the GACOPYZ_SRV_DISABLED (gacopyz_srv_eom): Likewise, but clear the GACOPYZ_SRV_DISABLED
bit. bit.
(gacopyz_srv_close): Do nothing if _SRV_CONNECTED is not set. (gacopyz_srv_close): Do nothing if _SRV_CONNECTED is not set.
Minor fix. 2010-01-20 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/mailfromd.texi: Update. Minor fix.
* doc/mailfromd.texi: Update.
2010-01-19 Sergey Poznyakoff <gray@gnu.org.ua> 2010-01-19 Sergey Poznyakoff <gray@gnu.org.ua>
Improve I/O timeout handling. Implement `progress' function. Improve I/O timeout handling. Implement `progress' function.
* gacopyz/gacopyz_priv.h (gacopyz_read_command): Additional * gacopyz/gacopyz_priv.h (gacopyz_read_command): Additional
argument: timeout index. argument: timeout index.
* gacopyz/io.c (_gacopyz_read_tm): New function. * gacopyz/io.c (_gacopyz_read_tm): New function.
(_gacopyz_read): Wrapper around _gacopyz_read_tm. (_gacopyz_read): Wrapper around _gacopyz_read_tm.
(gacopyz_read_command): Additional argument: timeout index. (gacopyz_read_command): Additional argument: timeout index. All
All callers updated. callers updated.
* gacopyz/server.c (srv_connect): Use configured connection * gacopyz/server.c (srv_connect): Use configured connection
timeout instead of the hardcoded value. timeout instead of the hardcoded value.
(gacopyz_srv_send_command): Use GACOPYZ_TO_EOM (EOM timeout) (gacopyz_srv_send_command): Use GACOPYZ_TO_EOM (EOM timeout) if
if the command send was SMFIC_BODYEOB. the command send was SMFIC_BODYEOB. Handle SMFIR_PROGRESS
Handle SMFIR_PROGRESS return. return.
* mfd/Makefile.am: Add bi_progress.m4. * mfd/Makefile.am: Add bi_progress.m4.
* mfd/bi_progress.m4: New file. * mfd/bi_progress.m4: New file.
* mfd/bi_system.m4 (sleep): Provide optional second * mfd/bi_system.m4 (sleep): Provide optional second argument:
argument: number of microseconds to sleep. number of microseconds to sleep.
* mtasim/mtasim.c (options): New option --milter-timeout. * mtasim/mtasim.c (options): New option --milter-timeout.
(parse_milter_timeouts): New function. (parse_milter_timeouts): New function.
(parse_opt): Handle --milter-timeout. (parse_opt): Handle --milter-timeout.
* doc/mtasim.texi: Update.
* doc/mailfromd.texi: Update.
* NEWS: Update.
* doc/mtasim.texi: Update. 2010-01-17 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/mailfromd.texi: Update.
* NEWS: Update. Improve handling of abort requests.
* mfd/engine.c (mlfi_helo): Free previous value of md->helostr.
(mlfi_abort): Do not discard helostr. See RFC 2822, section
4.1.1.5.
* pmult/pmult.c (rf_abort): Clear macros in gsrv.
2010-01-17 Sergey Poznyakoff <gray@gnu.org.ua> 2010-01-17 Sergey Poznyakoff <gray@gnu.org.ua>
Improve handling of abort requests. Improve gacopyz server API.
* mfd/engine.c (mlfi_helo): Free previous value of * gacopyz/gacopyz.h (gacopyz_srv_clear_macros_pred)
md->helostr. (gacopyz_srv_get_id,gacopyz_srv_get_portspec)
(mlfi_abort): Do not discard helostr. See RFC 2822, (gacopyz_srv_get_state,gacopyz_srv_get_logmask)
section 4.1.1.5. (gacopyz_srv_get_fd,gacopyz_srv_get_onerr)
(gacopyz_srv_set_logmask): New prototypes.
* pmult/pmult.c (rf_abort): Clear macros in gsrv. * gacopyz/server.c (gacopyz_srv_clear_macros_pred)
(gacopyz_srv_get_id,gacopyz_srv_get_portspec)
Improve gacopyz server API. (gacopyz_srv_get_state,gacopyz_srv_get_logmask)
(gacopyz_srv_get_fd,gacopyz_srv_get_onerr)
* gacopyz/gacopyz.h (gacopyz_srv_clear_macros_pred) (gacopyz_srv_set_logmask): New functions.
(gacopyz_srv_get_id,gacopyz_srv_get_portspec) (gacopyz_srv_set_callback): Don't switch to srv_disabled state
(gacopyz_srv_get_state,gacopyz_srv_get_logmask) if command returned SMFIR_REPLYCODE.
(gacopyz_srv_get_fd,gacopyz_srv_get_onerr)
(gacopyz_srv_set_logmask): New prototypes.
* gacopyz/server.c (gacopyz_srv_clear_macros_pred)
(gacopyz_srv_get_id,gacopyz_srv_get_portspec)
(gacopyz_srv_get_state,gacopyz_srv_get_logmask)
(gacopyz_srv_get_fd,gacopyz_srv_get_onerr)
(gacopyz_srv_set_logmask): New functions.
(gacopyz_srv_set_callback): Don't switch to
srv_disabled state if command returned SMFIR_REPLYCODE.
2010-01-14 Sergey Poznyakoff <gray@gnu.org.ua> 2010-01-14 Sergey Poznyakoff <gray@gnu.org.ua>
Fix control flow through the try-catch construct. Fix control flow through the try-catch construct.
* mfd/drivers.c (code_type_try): Fix handling * mfd/drivers.c (code_type_try): Fix handling of returns from
of returns from both branches of the construct: both branches of the construct: the return value is preserved in
the return value is preserved in the register A the register A until RESTEX.
until RESTEX. * tests/trycatch01.at: New test case.
* tests/trycatch01.at: New test case. * tests/trycatch02.at: New test case.
* tests/trycatch02.at: New test case. * tests/trycatch03.at: New test case.
* tests/trycatch03.at: New test case. * tests/trycatch04.at: New test case.
* tests/trycatch04.at: New test case. * tests/Makefile.am: Add new tests.
* tests/Makefile.am: Add new tests. * tests/testsuite.at: Add new tests.
* tests/testsuite.at: Add new tests.
* tests/etc/catch.rc: Fix diagnostic message.
* tests/etc/catch.rc: Fix diagnostic message. * tests/etc/catch01.rc: Likewise.
* tests/etc/catch01.rc: Likewise. * tests/invcidr.at: Likewise.
* tests/invcidr.at: Likewise. * tests/invcidr2.at: Likewise.
* tests/invcidr2.at: Likewise. * tests/invip.at: Likewise.
* tests/invip.at: Likewise.
2010-01-02 Sergey Poznyakoff <gray@gnu.org.ua> 2010-01-02 Sergey Poznyakoff <gray@gnu.org.ua>
Update copyright years. Update copyright years.
Happy GNU Year! Happy GNU Year!
2009-12-19 Sergey Poznyakoff <gray@gnu.org.ua> 2009-12-19 Sergey Poznyakoff <gray@gnu.org.ua>
Improve make check. Improve make check.
* Makefile.am (git-describe): Prefix with AM_V_GEN * Makefile.am (git-describe): Prefix with AM_V_GEN
* etc/Makefile.am (check-am): New rule. * etc/Makefile.am (check-am): New rule.
* etc/mailfromd.mf: Update. Use new syntax. * etc/mailfromd.mf: Update. Use new syntax.
* mflib/Makefile.am (.mf.lint): New rule. * mflib/Makefile.am (.mf.lint): New rule.
(check-am): Rewrite as a dependency on *.lint (check-am): Rewrite as a dependency on *.lint files.
files. * mflib/spf.mf (spf_cached): Remove global.
* mflib/spf.mf (spf_cached): Remove global. (__spf_log): Take `cached' as an argument.
(__spf_log): Take `cached' as an argument.
2009-12-15 Sergey Poznyakoff <gray@gnu.org.ua> 2009-12-15 Sergey Poznyakoff <gray@gnu.org.ua>
Add close_fds functions. Add close_fds functions.
* lib/Makefile.am (libmf_a_SOURCES): Add close-fds.c * lib/Makefile.am (libmf_a_SOURCES): Add close-fds.c
* lib/libmf.h (close_fds_above) * lib/libmf.h (close_fds_above)
(close_fds_except): New declarations. (close_fds_except): New declarations.
* mfd/bi_io.m4 (open_program_stream): Use close_fds_above. * mfd/bi_io.m4 (open_program_stream): Use close_fds_above.
* mfd/engine.c (mailfromd_daemon): Likewise. * mfd/engine.c (mailfromd_daemon): Likewise.
* mfd/pp.c (pp_extrn_start): Likewise. * mfd/pp.c (pp_extrn_start): Likewise.
* mfd/srvman.c (close_fds): Remove. * mfd/srvman.c (close_fds): Remove.
(server_run): Use close_fds_except. (server_run): Use close_fds_except.
(srvman_url_to_sockaddr): Fix signature. (srvman_url_to_sockaddr): Fix signature. All uses updated.
All uses updated. * mfd/srvman.h (srvman_url_to_sockaddr): Fix prototype.
* mfd/srvman.h (srvman_url_to_sockaddr): Fix prototype.
2009-12-15 Sergey Poznyakoff <gray@gnu.org.ua>
Reflect server ID in the proctitle.
* mfd/engine.c (milter_session_server): Call mflog_reopen to
reset syslog ID.
* mfd/mailfromd.h (syslog_fd): Rename to mflog_fd.
(mflog_close, mflog_reopen): New functions.
(log_setup): Remove.
(mflog_setup): New function.
* mfd/main.c (set_default_callout_server): New function.
(server_config_stmt): New keyword "default".
(server_section_parser): Handle "default" settings.
(cb_callout_url): Call set_default_callout_server.
(syslog_fd): Rename to mflog_fd.
(mflog_close, mflog_reopen): New functions.
(log_setup): Rename to _log_setup, now static, with changes.
(mflog_setup): New function.
* mfd/savsrv.c (callout_session_server): Call mflog_reopen to
reset syslog ID.
* mfd/lex.l: Stylistic changes.
2009-12-15 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change.
* mfd/lex.l (__git__): New built-in constant.
2009-12-15 Sergey Poznyakoff <gray@gnu.org.ua>
Fix gacopyz verbosity
* gacopyz/gacopyz.c (report_command): print
'state %s is unreachable' warning at debug level. Previously it
was treated as a warning.
(gacopyz_context_loop): Likewise. Also add state transition
debugging info.
2009-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
Reflect server ID in the proctitle. Minor change
* mfd/engine.c (milter_session_server): Call mflog_reopen * mfd/mu_dbm.c (mu_dbm_errcall_fcn): One more fix
to reset syslog ID.
* mfd/mailfromd.h (syslog_fd): Rename to mflog_fd.
(mflog_close, mflog_reopen): New functions.
(log_setup): Remove.
(mflog_setup): New function.
* mfd/main.c (set_default_callout_server): New function.
(server_config_stmt): New keyword "default".
(server_section_parser): Handle "default" settings.
(cb_callout_url): Call set_default_callout_server.
(syslog_fd): Rename to mflog_fd.
(mflog_close, mflog_reopen): New functions.
(log_setup): Rename to _log_setup, now static, with changes.
(mflog_setup): New function.
* mfd/savsrv.c (callout_session_server): Call mflog_reopen
to reset syslog ID.
* mfd/lex.l: Stylistic changes.
Minor change.
* mfd/lex.l (__git__): New built-in constant.
Fix gacopyz verbosity
* gacopyz/gacopyz.c (report_command): print
'state %s is unreachable' warning at debug level.
Previously it was treated as a warning.
(gacopyz_context_loop): Likewise.
Also add state transition debugging info.
2009-12-14 Sergey Poznyakoff <gray@gnu.org.ua> 2009-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change Minor changes.
* mfd/mu_dbm.c (mu_dbm_errcall_fcn): One more fix * mfd/mailfromd.h (set_options): Remove proto.
* mfd/main.c (struct option_cache): Remove flags, confkw,
conffn.
(MFD_OPTION_CUMULATIVE): Remove.
(set_option): Now static. Remove `override' parameter. All uses
updated.
* mfd/mu_dbm.c (mu_dbm_errcall_fcn)![DB_VERSION_MAJOR == 3]: Fix
signature.
Minor changes. 2009-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfixes.
* lib/syslog_async.c (log_fd_async): Always return actual
log_fd.
* mfd/main.c (parse_milter_url): Fix parsing of
sendmail-compatible URLs.
(syslog_fd): New function.
* mfd/savclt.c (schedule_callout): Return immediately if unable
to establish connection with the server.
* mfd/srvman.c (server_run): Avoid closing syslog descriptor, if
the async implementation is in use.
2009-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
Fix handling of hard timeouts in callouts.
* mfd/mailfromd.h (mf_timeout): New status code.
(mf_status_str, mf_status_to_exception): Remove macros.
(mf_status_str, mf_status_to_exception): New protos.
(test_message_data_init, trimcrlf): New protos.
* mfd/mf-status.mfi (mf_status_str)
(mf_status_to_exception): New functions.
* mfd/savsrv.c (verify): Improve proctitle info. Handle
mf_timeout response as equivalent to mf_not_found.
* mfd/callout.c (reset, callout_io)
(smtp_io_open, callout_host)
(callout_mx, callout_strict)
(listens_on): Return mf_temp_failure only if received 4xx reply
from the SMTP server. If there was no response within the
timeout interval, return mf_timeout.
* mfd/engine.c (method_strict)
(method_standard): Schedule callout only if our attempt returned
mf_timeout.
2009-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
Improve --version output for alpha version.
* mfd/mailfromd.h (set_options): Remove proto. The new output looks like:
* mfd/main.c (struct option_cache): Remove
flags, confkw, conffn. mailfromd (mailfromd) 6.0.91 [release-6.0-17-ga3fa5da]
(MFD_OPTION_CUMULATIVE): Remove.
(set_option): Now static. where the string in [] is the result of git describe. If there
Remove `override' parameter. All uses updated. are uncommitted changes, that string is suffixed with
* mfd/mu_dbm.c (mu_dbm_errcall_fcn)![DB_VERSION_MAJOR == 3]: `-dirty'.
Fix signature.
* Makefile.am (git-describe): New goal.
Bugfixes. (dist-hook): Depend on ChangeLog and git-describe.
* NEWS: Version 6.0.91.
* lib/syslog_async.c (log_fd_async): Always return * configure.ac: Set GIT_DESCRIBE for alpha versions.
actual log_fd. * lib/version.c (mailfromd_version): Print $GIT_DESCRIBE along
* mfd/main.c (parse_milter_url): Fix parsing of sendmail-compatible with the version info.
URLs. * tests/version.at: Accept new version format.
(syslog_fd): New function.
* mfd/savclt.c (schedule_callout): Return immediately if
unable to establish connection with the server.
* mfd/srvman.c (server_run): Avoid closing syslog descriptor,
if the async implementation is in use.
Fix handling of hard timeouts in callouts.
* mfd/mailfromd.h (mf_timeout): New
status code.
(mf_status_str, mf_status_to_exception): Remove macros.
(mf_status_str, mf_status_to_exception): New protos.
(test_message_data_init, trimcrlf): New protos.
* mfd/mf-status.mfi (mf_status_str)
(mf_status_to_exception): New functions.
* mfd/savsrv.c (verify): Improve proctitle info.
Handle mf_timeout response as equivalent to mf_not_found.
* mfd/callout.c (reset, callout_io)
(smtp_io_open, callout_host)
(callout_mx, callout_strict)
(listens_on): Return mf_temp_failure only if
received 4xx reply from the SMTP server. If there
was no response within the timeout interval,
return mf_timeout.
* mfd/engine.c (method_strict)
(method_standard): Schedule callout only if
our attempt returned mf_timeout.
Improve --version output for alpha version.
The new output looks like:
mailfromd (mailfromd) 6.0.91 [release-6.0-17-ga3fa5da]
where the string in [] is the result of git describe. If
there are uncommitted changes, that string is suffixed with
`-dirty'.
* Makefile.am (git-describe): New goal.
(dist-hook): Depend on ChangeLog and git-describe.
* NEWS: Version 6.0.91.
* configure.ac: Set GIT_DESCRIBE for alpha versions.
* lib/version.c (mailfromd_version): Print $GIT_DESCRIBE
along with the version info.
* tests/version.at: Accept new version format.
2009-12-13 Sergey Poznyakoff <gray@gnu.org.ua> 2009-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
Version 6.0.90 Version 6.0.90
* NEWS, configure.ac: Raise version number to 6.0.90 * NEWS, configure.ac: Raise version number to 6.0.90
2009-12-12 Sergey Poznyakoff <gray@gnu.org.ua> 2009-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
Use callout resolver to handle timed-out callouts. Use callout resolver to handle timed-out callouts.
* mfd/savclt.c: New file. * mfd/savclt.c: New file.
* mfd/Makefile.am (mailfromd_SOURCES): Add savclt.c * mfd/Makefile.am (mailfromd_SOURCES): Add savclt.c
* mfd/callout.c (transcript): Get ID as 1st arg. * mfd/callout.c (transcript): Get ID as 1st arg. Remove static
Remove static qualifier. All callers updated. qualifier. All callers updated.
* mfd/engine.c (method_strict) * mfd/engine.c (method_strict)
(method_standard): If callout returned mf_temp_failure, (method_standard): If callout returned mf_temp_failure, try to
try to pass the task to the callout server, if one is pass the task to the callout server, if one is defined.
defined. * mfd/mailfromd.h (transcript)
* mfd/mailfromd.h (transcript) (schedule_callout): New protos.
(schedule_callout): New protos. (callout_server_sa, callout_server_sa_len): New externs.
(callout_server_sa, callout_server_sa_len): New externs. * mfd/main.c (force_remove): Initialize to 0 (see srvman.c)
* mfd/main.c (force_remove): Initialize to 0 (see srvman.c) (server_config_stmt): New statements single-process and
(server_config_stmt): New statements single-process and reuseaddr.
reuseaddr. (add_legacy_milter_port, server_section_parser): Pass flags to
(add_legacy_milter_port, server_section_parser): Pass mfd_server_new.
flags to mfd_server_new. (mf_cfg_param): New statement `callout-url'.
(mf_cfg_param): New statement `callout-url'. * mfd/savsrv.c (MF_SOURCE_NAME): Fixed.
* mfd/savsrv.c (MF_SOURCE_NAME): Fixed. (verify, callout_session_server): Set proctitle.
(verify, callout_session_server): Set proctitle. (callout_session_server): Fix memory leak.
(callout_session_server): Fix memory leak. * mfd/srvman.c (struct mfd_server): New member `flags'.
* mfd/srvman.c (struct mfd_server): New member `flags'. (mfd_server_new): Take flags as 4th argument.
(mfd_server_new): Take flags as 4th argument. (server_run): Use flags to set single-user and reuseaddr modes.
(server_run): Use flags to set single-user and reuseaddr * mfd/srvman.h (SRV_SINGLE_PROCESS)
modes. (SRV_KEEP_EXISTING): New defines.
* mfd/srvman.h (SRV_SINGLE_PROCESS) (mfd_server_new): Change signature.
(SRV_KEEP_EXISTING): New defines. (srvman_url_to_sockaddr): New proto.
(mfd_server_new): Change signature.
(srvman_url_to_sockaddr): New proto. 2009-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
Implement the callout server. Implement the callout server.
* mfd/savsrv.c: New file. * mfd/savsrv.c: New file.
* mfd/Makefile.am (mailfromd_SOURCES): Add savsrv.c. * mfd/Makefile.am (mailfromd_SOURCES): Add savsrv.c.
* mfd/callout.c (struct smtp_io_data): Add new fields: * mfd/callout.c (struct smtp_io_data): Add new fields: email,
email, ehlo and mailfrom. ehlo and mailfrom.
(smtp_io_create): trim trailing ': ' from the id. (smtp_io_create): trim trailing ': ' from the id.
(smtp_io_init, smtp_io_setup_callout): New functions. (smtp_io_init, smtp_io_setup_callout): New functions.
(smtp_io_free): Free new members. (smtp_io_free): Free new members.
(smtp_io_email): New function. (smtp_io_email): New function.
(callout_io): Change signature. (callout_io): Change signature.
(smtp_io_open): 2nd arg is const char *. (smtp_io_open): 2nd arg is const char *.
(callout): Remove. (callout): Remove.
(callout_host, callout_mx) (callout_host, callout_mx)
(callout_strict, callout_standard): New functions. (callout_strict, callout_standard): New functions.
* mfd/engine.c (mfl_smtp_io_callback): Now extern. * mfd/engine.c (mfl_smtp_io_callback): Now extern.
(check_on_host, check_mx_records): Remove. (check_on_host, check_mx_records): Remove.
(method_strict, method_standard): Rewrite using new callout (method_strict, method_standard): Rewrite using new callout
support. support.
* mfd/mailfromd.h: Fix protos. * mfd/mailfromd.h: Fix protos.
(callout_host, callout_mx) (callout_host, callout_mx)
(callout_strict, callout_standard): New functions. (callout_strict, callout_standard): New functions.
* mfd/main.c (cb_url) * mfd/main.c (cb_url)
(callout_resolver, callout_resolver_section_param) (callout_resolver, callout_resolver_section_param)
(callout_resolver_cfg_init): Remove. (callout_resolver_cfg_init): Remove.
(milter_config_stmt): Rename to server_config_stmt. Add new (milter_config_stmt): Rename to server_config_stmt. Add new
field `server'. field `server'.
(cb_milter_stmt_listen): Rename to cb_server_stmt_listen. (cb_milter_stmt_listen): Rename to cb_server_stmt_listen.
(milter_section_param): Rename to server_section_param. (milter_section_param): Rename to server_section_param.
(milter_section_parser): Rename to server_section_parser. (milter_section_parser): Rename to server_section_parser. The
The label of the statement determines the server type. label of the statement determines the server type.
(milter_cfg_init): Rename to server_cfg_init. (milter_cfg_init): Rename to server_cfg_init.
(mf_cfg_param): Rename `milter' and `callout-resolver' (mf_cfg_param): Rename `milter' and `callout-resolver'
statements. Add new statement `server'. statements. Add new statement `server'.
(main): Call server_cfg_init. (main): Call server_cfg_init.
* mfd/bi_poll.m4 (_pollhost, _pollmx): Use callout_host * mfd/bi_poll.m4 (_pollhost, _pollmx): Use callout_host and
and callout_mx, correspondingly. callout_mx, correspondingly.
* mfd/cache.c (cache_get, cache_insert) * mfd/cache.c (cache_get, cache_insert)
(cache_get2, cache_insert2): String args are const. (cache_get2, cache_insert2): String args are const.
* mfd/dns.c (getmx): Likewise. * mfd/dns.c (getmx): Likewise.
* mfd/srvman.c: Add debugging statements. * mfd/srvman.c: Add debugging statements.
Implement multiple servers support. 2009-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
* mfd/srvman.c: New file. Implement multiple servers support.
* mfd/srvman.h: New file.
* gacopyz/gacopyz.h (gacopyz_context_loop): New proto. * mfd/srvman.c: New file.
* gacopyz/gacopyz.c (gacopyz_context_loop): Remove static qualifier. * mfd/srvman.h: New file.
Take additional parameter (closure). All callers updated. * gacopyz/gacopyz.h (gacopyz_context_loop): New proto.
(gacopyz_getclosure): New proto. * gacopyz/gacopyz.c (gacopyz_context_loop): Remove static
* gacopyz/gacopyz_priv.h (struct smfi_str): desc is const *. qualifier. Take additional parameter (closure). All callers
(closure): New member. updated.
* mfd/Makefile.am (mailfromd_SOURCES): Add srvman.c and srvman.h. (gacopyz_getclosure): New proto.
* mfd/bi_vars.m4: New MFL variable milter_server_id. * gacopyz/gacopyz_priv.h (struct smfi_str): desc is const *.
(set_milter_server_id): New proto. (closure): New member.
* mfd/engine.c (priv_get): Set milter_server_id. * mfd/Makefile.am (mailfromd_SOURCES): Add srvman.c and
(milter_conn_accept): Remove. srvman.h.
(smfilter): Static. * mfd/bi_vars.m4: New MFL variable milter_server_id.
Init xxfi_accept to NULL. (set_milter_server_id): New proto.
(milter_session_server, milter_setlogmask) * mfd/engine.c (priv_get): Set milter_server_id.
(milter_settimeout): New functions. (milter_conn_accept): Remove.
(check_local_portspec, check_portspec): Remove. (smfilter): Static. Init xxfi_accept to NULL.
(sig_stop, sig_restart): Call mfd_srvman_stop instead (milter_session_server, milter_setlogmask)
of smfi_stop. (milter_settimeout): New functions.
(mailfromd_daemon): Rewrite via srvman functions. (check_local_portspec, check_portspec): Remove.
* mfd/mailfromd.h (portspec, mailfromd_acl): Remove. (sig_stop, sig_restart): Call mfd_srvman_stop instead of
(add_legacy_milter_port, free_parser_data) smfi_stop.
(set_milter_server_id) (mailfromd_daemon): Rewrite via srvman functions.
(milter_session_server, milter_setlogmask) * mfd/mailfromd.h (portspec, mailfromd_acl): Remove.
(milter_settimeout): New prototypes. (add_legacy_milter_port, free_parser_data)
* mfd/main.c (portspec): Remove (set_milter_server_id)
(force_remove): Initialize to 1. (milter_session_server, milter_setlogmask)
(mailfromd_acl): Remove. (milter_settimeout): New prototypes.
(parse_milter_url, next_server_id) * mfd/main.c (portspec): Remove
(add_legacy_milter_port): New functions. (force_remove): Initialize to 1.
(set_port): Call add_legacy_milter_port. (mailfromd_acl): Remove.
(parse_opt): Call milter_set.* functions, instead (parse_milter_url, next_server_id)
of smfi_set.* (add_legacy_milter_port): New functions.
(portspec_fixup): Remove. (set_port): Call add_legacy_milter_port.
(main): Call milter_cfg_init. (parse_opt): Call milter_set.* functions, instead of smfi_set.*
(mf_cfg_param): New block statement 'milter'. (portspec_fixup): Remove.
(main): Call milter_cfg_init.
(mf_cfg_param): New block statement 'milter'.
* mflib/Makefile.am (check-am): Ignore * mflib/Makefile.am (check-am): Ignore configuration files.
configuration files.
Preparational work for introducing callout resolver. 2009-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: If --enable-pmilter=PATH is Preparational work for introducing callout resolver.
given, store appropriate -I statement in
META1_INCLUDES. Modify CPPFLAGS for the
subsequent AC_CHECK_HEADERS accordingly.
Restrore LDFLAGS after checks.
* mfd/bi_dns.m4: Rename smtp_timeout to smtp_timeout_soft.
* mfd/engine.c: Rename smtp_timeout to smtp_timeout_soft.
(xlate_and_replace_body): Fix uninitialized variable.
* mfd/mailfromd.h (smtp_timeout): Remove.
(smtp_timeout_soft, smtp_timeout_hard): New externs.
(mfd_app_init): Change signature.