summaryrefslogtreecommitdiffabout
path: root/src
AgeCommit message (Collapse)AuthorFiles
3 daysImplementation of DKIM signingHEADmasterSergey Poznyakoff12
* configure.ac: Detect presence of nettle libraries. * src/Makefile.am: Add new sources. * src/dkim-canonicalize.c: New file. * src/dkim.c: New file. * src/dkim.h: New file. * src/builtin/Makefile.am: Add new sources. * src/builtin/body.bi (current_message): Rewrite as a simple wrapper over bi_get_current_message. * src/builtin/dkim.bi: New file. * src/builtin/msg.bi (bi_get_current_message): Optionally return the message itself. * src/builtin/msg.h (bi_get_current_message(: Change signature. * src/builtin/snarf.m4 (env_get_stream): Fix quoting. * NEWS: Document changes. * doc/functions.texi: Document the dkim_sign function * doc/mailfromd.texi: Minor changes.
2019-09-07Minor fixesSergey Poznyakoff2
* src/main.c (mf_cfg_param): Remove the surplus "database" section: it is already included in srvcfg.c * src/prog.c (env_register_auto): Use mu_diag_cont_printf to continue diagnostic message without inserting unnecessary <> directives (perhaps should be fixed in mailutils).
2019-01-29Fixes in runtime memory managementSergey Poznyakoff2
* src/builtin/sprintf.bi: Don't use pointer to format: the latter might be reallocated during stack expansions, and the pointer would end up pointing to freed memory area. Another way to fix it would be to make env_register_auto and env_pop_auto global and to mark the address of pointer with env_register_auto so it would be reallocated together with format. However, I wouldn't like to expose too much of the internals of prog.c. * src/prog.c (env_get_locus) (heap_obstack_grow,pushs): Fix argument to env_register_auto. (env_register_auto): Check if the argument points to a memory location within data segment + stack. This is necessary, because heap_obstack_grow registers its argument, which at least in one case is a pointer to an automatic variable (see MF_OBSTACK_1GROW in builtin/snarf.m4). (env_pop_auto,env_unregister_autos) (env_fixup_autos): Make static.
2019-01-29Fix in calloutSergey Poznyakoff1
* src/callout.c (reset): Send \r\n after RSET.
2019-01-03Version 8.7release_8_7Sergey Poznyakoff1
* NEWS: Update. * 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.
2019-01-03Update copyright yearsSergey Poznyakoff72
2018-11-09Document debug categories. Fix improper use of decimal constants instead of ↵Sergey Poznyakoff4
MU_DEBUG_TRACE identifiers
2018-11-09Fix docstring for the "debug" statement in the config-help output.Sergey Poznyakoff2
2018-11-08mtasim: don't clobber existing callout socket when used with -XautoSergey Poznyakoff1
* doc/mailfromd.texi: Document the --callout-socket option. * mtasim/mtasim.c (start_mailfromd): Supply the --callout-socket option. * src/main.c: New option --callout-socket
2018-11-08Silently ignore non-existing keys in dbdelSergey Poznyakoff1
* src/builtin/db.bi (dbdel): Treat MU_ERR_NOENT as success.
2018-11-07Fix the functionality of the mailfromd --mtasim optionSergey Poznyakoff1
This option must discard the effect of the server.listen statement This also fixes mtasim -Xauto * src/main.c (mailfromd_options): Process the --mtasim option immediately.
2018-11-05Change generation of debug names for built-in modulesSergey Poznyakoff2
* src/builtin/Makefile.am (.bi.c): Don't define SOURCE * src/builtin/snarf.m4 (MF_SOURCE_DEBUG_NAME): Remove. (MF_MODULE_DEBUG_NAME): New macro. (_init_builtin): Use MF_MODULE_DEBUG_NAME
2018-11-05Partially revert "Fix indentation of the generated sources"Sergey Poznyakoff3
GNU indent reformats the sources. As a result, preprocessor #line directives become misleading.
2018-11-04Fix indentation of the generated sourcesSergey Poznyakoff3
* NEWS: Version 8.6.90 * configure.ac: Version 8.6.90 Check for GNU indent * am/indent.m4: New file. * src/builtin/Makefile.am (EXTRA_DIST): Add indent.pro (.bi.c, .def.h): Use GNU indent if available. * src/builtin/indent.pro: New file. * src/builtin/snarf.m4: Minor change.
2018-11-03Revise preprocessor macros for builtin functions.Sergey Poznyakoff42
* 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-07-24BugfixesSergey Poznyakoff1
* elisp/mfl-mode.el: Fix byte-compilation. * git2chg.awk: Ignore git-svn-id: * src/pp.c (pp_extrn_shutdown): Report errors.
2018-07-24Update copyright yearsSergey Poznyakoff72
2018-07-24Ensure proper integer promotion in vm.Sergey Poznyakoff2
* src/prog.c (pushn): New function. Use pushn wherever a numeric or boolean return type is required. * src/prog.h (mf_c_cast): Minor change.
2017-11-21Normalize inclusion of mailutils headersSergey Poznyakoff2
2017-11-02calloutd: implement the --resolv-conf-file optionSergey Poznyakoff1
2017-10-23Minor fixSergey Poznyakoff1
2017-10-23Improve DNS API; rewrite DNS testsuite.Sergey Poznyakoff2
* lib/dns.c (dnsbase_real_init): Take configuration text as argument (can be NULL). Enable adns debugging on trace9 (dnsbase_file_init): New function. (dns_reply_init): New function. (dns_reply_push): New function. (soa_check): New function. 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) (dns_reply_init, soa_check): New protos. * src/builtin/dns.bi (resolve_host): Rewrite to return all A records. (dns_replies_intersect): New static function. (primitive_ismx): Rewrite taking into account all A records. * src/main.c: New option --resolv-conf-file (mostly for checking. * tests/resolv.c: Change option handling, implement new options. * tests/atlocal.in (MF_TOPDOMAIN,MF_NAMESERVER): New variables. (at_resolv_conf): New function. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Include new tests. * tests/hasmx.at: Use dedicated MF test domains, * tests/hostname.at: Likewise. * tests/ismx.at: Likewise. * tests/rescname.at: Likewise. * tests/resolve.at: Likewise. * tests/resolv_a.at: New test. * tests/resolv_mx.at: Likewise. * tests/resolv_ptr.at: Likewise. * tests/resolv_ptr_val.at: Likewise. * tests/resolv_spf.at: Likewise. * tests/resolv_txt.at: Likewise.
2017-10-21BugfixSergey Poznyakoff1
* lib/dns.c (dns_reply_resolve): Remove unneeded ntohl. * src/builtin/dns.bi): Remove unneeded htonl.
2017-10-20Improve DNS API consistencySergey Poznyakoff4
* lib/dns.c (dns_get_mx_records, getmx, getmxip): Replace with a single function mx_lookup. All uses updated.
2017-10-20Bugfixes; implement test program for DNS API.Sergey Poznyakoff2
* lib/dns.c (ptr_lookup): Reverse IP octets prior to look up. 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. * tests/Makefile.am: Add resolv.c * tests/.gitignore: Update.
2017-10-20Unify DNS reply types.Sergey Poznyakoff5
* 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-20Rewrite base dns functions using adns.Sergey Poznyakoff2
* configure.ac: Require libadns. * lib/dns.c: Rewrite. * lib/dns.h (dns_resolve_ipstr, dns_resolve_hostname): Simplify parameters. (dns_reply): Remove max, last_len, and last_max.
2017-10-20Drop ttl tracking from DNS API; drop SPF cachingSergey Poznyakoff4
* 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.
2017-10-19Improve DNS resolver APISergey Poznyakoff8
Remove arbitrary size limits. * NEWS: Version 8.2.90 * configure.ac: Likewise. Require Mailutils 3.3 * doc/calloutd.texi: Update. * doc/functions.texi: Update. * doc/mailfromd.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-19Allocate exception buffer even if status.mf is not requiredSergey Poznyakoff3
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-06-18Minor fixSergey Poznyakoff1
* src/gram.y (free_node): Deinit locus
2017-06-18Switch to detailed source locations from Mailutils 3.2.92Sergey Poznyakoff17
* configure.ac: Version 8.1.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. * 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.
2017-06-18Minor fixes.Sergey Poznyakoff2
* gacopyz/context.c (gacopyz_setmlreply_va): Return meaningful code. (gacopyz_setmlreply_v): Likewise. * lib/db.c (db_compact): Fix improper use of uninitialized 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-03-06Fix compiler messageSergey Poznyakoff1
2017-01-02Happy GNU YearSergey Poznyakoff72
2016-12-20Improve Sieve interfaceSergey Poznyakoff1
* src/builtin/sieve.bi: Initialize Sieve environment * doc/functions.texi: Document changes.
2016-12-12Use new Sieve APISergey Poznyakoff1
* src/builtin/sieve.bi: Change to use new Sieve API * configure.ac: Version 8.0.90. Require MU 3.0.90 * NEWS: Update.
2016-12-08Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/mailfromdSergey Poznyakoff5
2016-12-08Fix typoSergey Poznyakoff1
2016-12-08Ensure proper type conversion when coding immediate values.Sergey Poznyakoff5
* src/prog.h (mf_c_cast): New define. (code_put, code_immediate): New macros. * src/prog.c (code_immediate): Rename to code_immediat_stkval. (code_put): Rename to code_put_stkval. * src/drivers.c: Use typed calls to code_immediate and code_put * src/gram.y: Likewise. * src/main.c: Allocate mu_log_tag.
2016-12-08BugfixesSergey Poznyakoff1
* lib/mfgetopt.c (mf_getopt): Initialize cfhint.flags * src/symbols.c (free_symbols): Free buckets after freeing everything else.
2016-11-09Update docsSergey Poznyakoff1
* doc/mailfromd.texi: Document the single configuration file. * doc/calloutd.texi: Update. * doc/mfdbtool.texi: Update. * 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-08Use single configuration file.Sergey Poznyakoff3
* lib/libmf.h (MF_GETOPT_DEFAULT) (MF_GETOPT_IN_ORDER,MF_GETOPT_NO_CONFIG): New flags. (mf_getopt): Change signature. * lib/mfgetopt.c (mf_getopt): Remove the cfile parameter. Change semantics of the 5th parameter (inorder -> flags). * mtasim/mtasim.c: Change call to mf_getopt. * pmult/pmult.c: Likewise. * src/calloutd.c: Likewise. * src/main.c: Likewise. * src/mfdbtool.c: Likewise.
2016-11-08Fix mfdbtool.Sergey Poznyakoff2
* lib/db.c (mf_database_mode): New global variable. (mf_dbm_open): Remove "mode" parameter. Use mf_database_mode. (db_expire_func): Fix passing the datum size. (db_compact): Preserve mode and ownership of the database. * lib/dbcfg.c (cb_database_mode): New function. * lib/mfdb.h (mf_database_mode): New extern. (mf_dbm_open): Change signature. (cb_database_mode): New proto. * src/mfdbtool.c (mfdbtool_cfg_param): New statement "database-mode". Read configuration from /etc/mailfromd.conf * src/srvcfg.c (srv_cfg_param): Likewise. * lib/cache.c: Update calls to mf_dbm_open. * lib/rate.c: Likewise. * lib/tbf_rate.c: Likewise.
2016-11-08mfdbtool: add missing optionsSergey Poznyakoff1
2016-11-02Follow Mailutils commit dc62b399Sergey Poznyakoff1
2016-10-31BugfixesSergey Poznyakoff1
* gacopyz/server.c (gacopyz_srv_reply): Return entire buffer. * pmult/pmult.c (collect_symlists): Don't attempt to print empty client name. (main): Read mailutils configuration file. * src/srvcfg.c (mfd_capa_server): Don't register srv_cfg_param. It pertains to canned section.
2016-10-30Get rid of obstack; use mu_opool_t insteadSergey Poznyakoff10
* configure.ac: Remove checks for obstack. Require Mailutils 2.99.993 * lib/Makefile.am: Remove obstack. * lib/obstack.c: Delete. * lib/obstack.h_: Delete. * po/POTFILES.in: Remove obstack. * lib/mfgetopt.c (mf_getopt): Bugfix: initialize flags. * lib/db.c: Use mu_opool_t instead of obstack. * mtasim/mtasim.c: Likewise. * pmult/pmult.c: Likewise. * src/callout.c: Likewise. * src/callout.h: Likewise. * src/engine.c: Likewise. * src/gram.y: Likewise. * src/lex.l: Likewise. * src/mailfromd.h: Likewise. * src/pragma.c: Likewise. * src/prog.c: Likewise. * src/spf.c: Likewise. * src/symbols.c: Likewise.
2016-10-29Minor fixesSergey Poznyakoff4
2016-10-28Finish conversion. Version 7.99.96Sergey Poznyakoff4

Return to:

Send suggestions and report system problems to the System administrator.