summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2017-04-13Send multipart/alternative messages using mail.Sergey Poznyakoff8
The new option --alternative is provided to change the content type of the composed message to multipart/alternative. The ~/ escape toggles the type between multipart/mixed and multipart/alternative. In messages of multipart/alternative type, the Content-Disposition header of all attachments is reset to "inline". * libmailutils/mime/mime.c (mu_mime_create): Bugfix: honour the MU_MIME_MULTIPART_ALT flag. * mail/mail.c: New option --alternative. * mail/mail.h (compose_env) <attlist,mime>: New members. (multipart_alternative): New global. (send_attach_file): Change return value. (escape_toggle_multipart_type): New proto. * mail/send.c (multipart_alternative): New global. Keep the list of attachments in compose_env_t. Make sure it is freed when no longer used. Implement the ~/ escape. * mail/table.c: New escape ~/ * mail/util.c: Use mu_strerror instead of strerror. * NEWS: Document changes to the mail utility * doc/texinfo/programs.texi: Likewise.
2017-04-11Rewrite the mailutils toolSergey Poznyakoff36
The subcommands are re-implemented as standalone binaries installed to pkglibexecdir. The main binary acts as a dispatcher. * configure.ac: Build mu/libexec/Makefile * include/mailutils/.gitignore: Ignore gitinfo.h * include/mailutils/opt.h (mu_parseopt_help_stream_create): New proto. * libmailutils/cli/cli.c (mu_cli_ext): Honor MU_PARSEOPT_PROG_NAME setting. * libmailutils/opt/help.c (mu_parseopt_create_help_stream): New function. (mu_program_help,mu_program_usage) (mu_program_version): Use it. * mu/Makefile.am: Move commands to separate executables under libexec. * mu/mu.c: Rewrite. * mu/dispatch.c: Remove. * mu/help.c: Remove. * mu/libexec/.gitignore: New file. * mu/libexec/Makefile.am: New file. * mu/libexec/getopt.c: New file. * mu/getans.c: Move to mu/libexec. * mu/getarg.c: Likewise. * mu/getyn.c: Likewise. * mu/util.c: Likewise. * mu/verbose.c: Likewise. * mu/shell.c: Likewise. * mu/mu.h: Remove. * mu/libexec/mu.h: New file. * mu/acl.c: Move to mu/libexec; Rewrite as a standalone program. * mu/cflags.c: Likewise. * mu/dbm.c: Likewise. * mu/filter.c: Likewise. * mu/flt2047.c: Likewise. * mu/imap.c: Likewise. * mu/info.c: Likewise. * mu/ldflags.c: Likewise. * mu/logger.c: Likewise. * mu/pop.c: Likewise. * mu/query.c: Likewise. * mu/send.c: Likewise. * mu/smtp.c: Likewise. * mu/stat.c: Likewise. * mu/wicket.c: Likewise. * mu/mu-setup.awk: Remove. * po/POTFILES.in: Update.
2017-04-10BugfixSergey Poznyakoff1
* libmailutils/cfg/parser.y (mu_cfg_find_node): Fix spurious error diagnostics when the node is not found.
2017-04-09Version 3.2.91Sergey Poznyakoff2
2017-04-09Remove the Scheme implementation of the Sieve language.Sergey Poznyakoff11
* NEWS: Describe the change. * doc/texinfo/mailutils.texi: Remove description of sieve2scm * doc/texinfo/programs.texi: Likewise. * scheme/Makefile.am: Remove sieve2scm. * scheme/mimeheader.scm: Remove. * scheme/numaddr.scm: Remove. * scheme/redirect.scm: Remove. * scheme/reject.scm: Remove. * scheme/sieve-core.scm: Remove. * scheme/sieve2scm.scmi: Remove. * scheme/vacation.scm: Remove.
2017-04-08movemail: implement --progress-meter optionSergey Poznyakoff2
2017-04-08Improve generation of session identifiers for server programsSergey Poznyakoff9
* include/mailutils/acl.h (mu_acl_set_session_id): Remove proto. * include/mailutils/server.h (mu_session_id): Remove extern. (mu_sid): New proto. * libmailutils/server/sid.c: New file. * libmailutils/server/Makefile.am: Add sid.c * libmailutils/server/ipsrv.c (mu_ip_tcp_accept) (mu_ip_udp_accept): Remove calls to mu_acl_set_session_id. (mu_ip_server_accept): Make sure output to mu_strerr is filtered so that session ID is prepended to each line. (mu_ip_server_loop): Remove. * libmailutils/server/msrv.c (mu_m_server_check_acl): Remove call to mu_acl_set_session_id. * libmailutils/server/server.c (mu_session_id): Remove variable. * imap4d/imap4d.c (get_client_address, set_strerr_flt) (clr_strerr_flt): Remove unused functions. (imap4d_connection): Simplify. * pop3d/pop3d.c: Likewise.
2017-04-07Fix links in HTML doc generatorSergey Poznyakoff2
* doc/texinfo/gendocs_template: Fix links. * doc/texinfo/html.init: Fix the Documentation link.
2017-04-06Improve AM_GNU_MAILUTILS autoconf macroSergey Poznyakoff2
* mu-aux/mailutils.m4: Don't use packed version representation, because of eventual numerical overflows. Compare versions number by number. Define the following additional constants: MAILUTILS_VERSION_MAJOR, MAILUTILS_VERSION_MINOR, and MAILUTILS_VERSION_PATCH. * NEWS: Document changes.
2017-04-06Minor improvement in gitinfo.h productionSergey Poznyakoff5
* Makefile.am: Minor change. * include/mailutils/Makefile.am (gitinfo.h): Build only if $(srcdir) and $(builddir) are the same. * mu-aux/gitinfo.pl: Rename to mu-aux/gitinfo * configure.ac (GITINFO): Reflect this change * mu-aux/Makefile.am: Likewise.
2017-04-05Ensure stability of merge sort in assocSergey Poznyakoff1
* libmailutils/base/assoc.c (merge): Fix comparison
2017-04-04Another improvement in genclSergey Poznyakoff2
* mu-aux/gencl: New option --email. * Makefile.am: Simplify the ChangeLog command. Use the --email option.
2017-04-03Minor improvements in genclSergey Poznyakoff2
* mu-aux/gencl: Don't use Time::ParseDate. Work over bug in Text::Wrap 2012.0818. New option --ignore-errors (-i). Ensure consistent error code. * Makefile.am (dist-hook): Relax checking for intermediate releases.
2017-04-03Rewrite gencl as an enhanced replacement of gitlog-to-changelog.Sergey Poznyakoff5
* mu-aux/gencl: Rewritten as a replacement for gitlog-to-changelog. * ChangeLog.amend: More spell fixes. * Makefile.am: Use gencl instead of gitlog-to-changelog. * doc/ChangeLog.CVS: Spell checking * gnulib.modules: Remove gitlog-to-changelog.
2017-03-24Test transcript streamsSergey Poznyakoff5
* libmailutils/tests/.gitignore: Update. * libmailutils/tests/xscript.at: New file. * libmailutils/tests/xscript.c: New file. * libmailutils/tests/Makefile.am: Add new files. * libmailutils/tests/testsuite.at: Include new testcase.
2017-03-23Tiny fixSergey Poznyakoff1
* include/mailutils/debug.h (MU_ASSERT): Prefix local variable name with two underscores to diminish the probability of shadowing.
2017-03-23Make sure ChangeLog is built by makeSergey Poznyakoff3
* Makefile.am: Mark ChangeLog as noinst_DATA to trigger its rule. Rewrite the ChangeLog rule using a wrapper over gitlog-to-changelog, which rewrites the file only when needed. (dist-hook): Fail if there are uncommitted changes. * mu-aux/gencl: New file. * maint.mk: Remove.
2017-03-22BugfixSergey Poznyakoff1
* libmailutils/stream/xscript-stream.c (print_transcript): Print closing double-quote after user name in LOGIN statement.
2017-03-21Improve maintainer scripts.Sergey Poznyakoff2
* Makefile.am (alpha,alphacheck): Update rules. * mu-aux/gitinfo.pl: Obtain more data.
2017-03-21Minor fixSergey Poznyakoff1
2017-03-21Bugfixes in NLS code.Sergey Poznyakoff3
* libmailutils/base/lcall.c (mu_lc_all_free): Use str->flags to determine what fields need to be freed. (mu_parse_lc_all): Force retrieving language and territory if charset is requested. Use this to provide a default value, in case charset cannot be determined. Deallocate the surplus data afterwards. * libmailutils/base/locale.c (mu_charset_lookup): Bugfix. * mail/util.c (util_rfc2047_decode): Avoid memory leak.
2017-03-21Fix imap4d testsuiteSergey Poznyakoff2
The tests failed if MU_DEFAULT_SCHEME were set to anything, but mbox. * imap4d/tests/atlocal.in (make_config): set .mailbox.mailbox-type=mbox. * imap4d/list.c (imap4d_list): Use %s as the format.
2017-03-21More fixes to mu_cfg_field_map (see afbb33cf).Sergey Poznyakoff1
* libmailutils/cfg/driver.c (mu_cfg_field_map): Use correct enumeration function depending on the element type. Return meaningful error.
2017-03-20Housekeeping: implement a tool for producing intermediate alpha tarballs.Sergey Poznyakoff10
Intermediate tarballs have the same version number as initial alpha version, to which is appended a suffix "-N", where N is the number of commits between the current git HEAD and the original alpha release. Additionally, the --version (or -version, for MH) output has been changed to include the N and the git description (for all releases, but stable). * .gitignore: Update. * Makefile.am: Remove git-describe and git-describe.h goals. (alpha, alphacheck): Rewrite. * configure.ac (GITINFO): New subst variable. * include/mailutils/Makefile.am (gitinfo.h): New built source. * libmailutils/cli/cli.c: Include gitinfo.h (mu_version_hook): Rewrite. * mh/mh_getopt.c: Include gitinfo.h (mh_version_hook): Rewrite. * mu-aux/gitinfo.pl: New file. * mu-aux/Makefile.am (EXTRA_DIST): Add gitinfo.pl * mu/Makefile.am (mu-setup.c): Add dependency * testsuite/testsuite.inc (MUT_VERSION): Account for changes in version output.
2017-03-20Fix pop3d command parser (complement afda9ba4)Sergey Poznyakoff2
* pop3d/cmd.c (command_table_head): Remove. Use command_table instead. All uses changed. * pop3d/stls.c (pop3d_stls): Fail if TLS is not requested.
2017-03-20New itrctl request: mu_itrctl_countSergey Poznyakoff7
* include/mailutils/iterator.h (mu_itrctl_req) <mu_itrctl_count>: New request type. * libmailutils/base/assoc.c (itrctl): Support mu_itrctl_count. * libmailutils/list/iterator.c (list_itrctl): Likewise. * libmailutils/mailbox/hdritr.c (hdr_itrctl): Likewise. * libmailutils/mailbox/mbxitr.c (mbx_itrctl): Likewise. * libmailutils/base/opool.c (opitr_itrctl): New function - support mu_itrctl_count. (mu_opool_get_iterator): Register opitr_itrctl. * libmailutils/diag/debug.c (list_itrctl): Return 1-based position indices on mu_itrctl_tell. Support mu_itrctl_count.
2017-03-19Fix a bug in field-map handling.Sergey Poznyakoff3
* libmailutils/cfg/driver.c (parse_mapping): Fix expected value type. * libmu_auth/sql.c (get_field): Remove left-over mu_assoc_ref call (see 622bc770).
2017-03-18Rewrite TLS supportSergey Poznyakoff29
The new implementation allows for per-server certificates. * libmu_auth/Makefile.am: Build tls support depending on the value of MU_COND_GNUTLS. * libmu_auth/notls.c: New file. * libmu_auth/tls.c: Rewrite. * libmu_auth/tlsiostr.c: New file. * libmu_auth/tlsvar.c: New file. * libmu_auth/tlsconf.c: New file. * include/mailutils/sys/tls-stream.h (_mu_tls_stream): New members: session_type, conf, cred. (mu_tls_io_stream_create): New proto. * include/mailutils/tls.h (mu_tls_module_config): Remove definition. (mu_tls_config): New structure. (mu_tls_server_stream_create): Remove proto. (mu_tls_cert_file_checks) (mu_tls_key_file_checksr) (mu_tls_ca_file_checks): New globals (MU_TLS_CERT_FILE_CHECKS) (MU_TLS_KEY_FILE_CHECKS) (MU_TLS_CA_FILE_CHECKS): New defines. (mu_tls_stream_create): New proto. (mu_tls_config_status): New constants. (mu_tls_check_config): Remove. (mu_tls_config_check): New function. * include/mailutils/server.h (mu_m_server_preflight_fp): New typedef. (mu_m_server_set_preflight): New proto. * libmailutils/diag/debcat (tls): New category. * libmailutils/server/ipsrv.c (mu_ip_server_get_data): New function. * libmailutils/server/msrv.c (_mu_m_server) <preflight>: New method. (mu_m_server_set_preflight): New function. (mu_m_server_destroy): Destroy the srvlist. (open_connection): New function. (mu_m_server_run): Remove from srvlist only those servers that failed to open. Run preflight check, if registered. * include/mailutils/cfg.h (mu_cfg_section): New member: data. * libmailutils/cfg/driver.c (dup_container): Copy the "data" pointer. (mu_cfg_section_add_params): Preserve original pointer and offset when necessary. * libmailutils/cfg/parser.y (_scan_tree_helper): Use the section data pointer (if set) as data target. * configure.ac (MU_COND_GNUTLS): New conditional. * imap4d/commands.c: Remove #ifdef WITH_TLS preprocessor conditional. * imap4d/imap4d.c (tls_mode): Remove variable. (imap4d_srv_config): Move definition to the header file. Remove #ifdef WITH_TLS preprocessor conditionals. Rename the tls configuration statement to tls-mode. Add new subsection .server.tls; Remove the legacy tls-required configuration statement. (imap4d_mainloop): Change signature: take a pointer to the struct imap4d_srv_config as the 3rd argument, Use the cfg->tls_mode member to decide on TLS state. (main): Call mu_tls_cfg_init. Install server preflight checker. * imap4d/imap4d.h: Remove #ifdef WITH_TLS preprocessor conditionals. (imap4d_srv_config): Moved from imap4d.c New member: tls_conf (imap4d_session): New member: tls_conf (global_tls_conf): New global. (io_setio, imap4d_init_tls_server): Change prototypes. * imap4d/io.c (io_setio): Change signature: take a pointer to the struct mu_tls_config as the 3rd argument. Rewrite TLS support. (imap4d_init_tls_server): Take a pointer to the struct mu_tls_config. * imap4d/starttls.c (tls_available, tls_done): Remove globals. (global_tls_conf): New global. (imap4d_starttls): Keep TLS state in the session. (tls_encryption_on): Likewise. (starttls_init): Rewrite as a mserver preflight check function. * pop3d/capa.c: Remove #ifdef WITH_TLS preprocessor conditional. (capa_stls): Rewrite. * pop3d/cmd.c (global_tls_conf): New global. (stls_preflight): New function. (pop3d_error_string): Rewrite using char ** array. * pop3d/extra.c (pop3d_setio): Take a pointer to struct mu_tls_config as the 3rd argument. Decide on TLS using it. (pop3d_init_tls_server): Take a pointer to struct mu_tls_config. * pop3d/pop3d.c: Rename the tls configuration statement to tls-mode. Add new subsection .server.tls; Remove the legacy tls-required configuration statement. (pop3d_mainloop) Take a pointer to struct mu_tls_config as the 3rd argument. Decide on TLS using it. (main): Call mu_tls_cfg_init. Install server preflight check. * pop3d/pop3d.h (pop3d_session): New member tls_conf. (pop3d_srv_config): New definition. (global_tls_conf): New extern. * pop3d/stls.c: Rewrite TLS support. * NEWS: Document new features. * configure.ac: Version 3.2.90. * doc/texinfo/programs.texi: Update.
2017-03-11Minor changesrelease-3.2Sergey Poznyakoff2
2017-03-11Version 3.2Sergey Poznyakoff3
2017-03-06Fix NULL dereferenceSergey Poznyakoff1
* libmailutils/mime/mimehdr.c (mu_mime_param_free): Check if argument is NULL.
2017-02-18'Q' encoding: encode question mark properly; limit length of encoded wordsSergey Poznyakoff4
* libmailutils/base/rfc2047.c (mu_rfc2047_encode): Limit length of encoded word to 75 bytes. * libmailutils/filter/qpflt.c: Treat '?' as special character in Q encoder. * libmailutils/tests/encode2047.at: Add more tests. * libmailutils/tests/encode2047.c: Use mailutils string I/O
2017-02-17Fix memory leak in mu_stream_destroySergey Poznyakoff1
* libmailutils/stream/stream.c (mu_stream_destroy): Free buffer space. (mu_stream_set_buffer,mu_stream_getdelim): Use stdlib allocation functions instead of mu wrappers.
2017-02-17Fix handling of ambiguous command line options.Sergey Poznyakoff40
The approach used so far failed to recognize ambiguous abbreviations located in different groups. It also didn't work when MU_PARSEOPT_NO_SORT was requested. This commit fixes it by keeping an additional array of indices to long options. The array is sorted so that its elements produce a lexicographically ascending list of long options. * include/mailutils/opt.h (mu_parseopt): New members po_longcnt, po_longidx keep a sorted array of indices to po_optv with long options. * libmailutils/opt/opt.c (find_long_option): Iterate over po_longidx. (parseopt_init): Initialize and sort po_longidx. (mu_parseopt_free): Free po_longidx. * libmailutils/tests/parseopt.c: Add three more potentially ambiguous options * libmailutils/tests/parseopt26.at: New testcase. * libmailutils/tests/parseopt27.at: New testcase. * libmailutils/tests/Makefile.am: Add new testcases. * libmailutils/tests/testsuite.at: Likewise.
2017-02-05Remove unneeded fileSergey Poznyakoff1
* sieve/examples/.gitignore: Remove.
2017-01-30sieve: add a locus indicating end of inputSergey Poznyakoff2
The new node type mu_sieve_node_end is introduced to explicitly mark end of the parse tree. When generating code, this node triggers insertion of _mu_i_sv_instr_source/_mu_i_sv_instr_line before the end of code marker. This, in turn, ensures that a correct location is reported for implicit keep, if logging is enabled. * libmu_sieve/sieve-priv.h (mu_sieve_node_end): New node type. (mu_sieve_node_list): New type (from struct node_list in sieve.y) * libmu_sieve/sieve.y (node_list_add): New function. (input production): Add mu_sieve_node_end at the end of the tree.
2017-01-30Log sieve source location in maidagSergey Poznyakoff1
* lib/sieve.c (_sieve_action_log): Log source location
2017-01-30Fix sieve logging in maidagSergey Poznyakoff2
* maidag/maidag.c (sieve_debug_flags) (sieve_enable_log): Remove. * maidag/script.c (apply_script): Check for mu_script_sieve_log.
2017-01-26Allow for "INBOX." namespace.Sergey Poznyakoff6
* imap4d/imap4d.h (io_send_astring): New proto. * imap4d/io.c (io_send_astring): New function. * imap4d/list.c (list_fun): Use io_send_astring. (list_ref): Special handling for empty wcard (imap4d_list): Remove special handling for empty wcard and INBOX. Leave that to list_ref. This makes it possible to declare namespaces like "INBOX." ("." being the delimiter). * imap4d/lsub.c (imap4d_lsub): Use io_send_astring. * imap4d/namespace.c (namespace_translate_name): Check for declared namespace first.
2017-01-26Minor fixSergey Poznyakoff1
2017-01-26Improve description of variables useful in namespace directory statementsSergey Poznyakoff1
2017-01-26Minor fix.Sergey Poznyakoff3
* imap4d/list.c (list_ref): Use mu_imap_wildmatch_ci to check for a request matching INBOX. * include/mailutils/imaputil.h (mu_imap_wildmatch_ci): New prototype. * libmailutils/imapio/wildmatch.c (mu_imap_wildmatch_ci): New function.
2017-01-24Further improvements of IMAP LIST functionalitySergey Poznyakoff5
* imap4d/list.c (list_fun): Ignore names that contain delimiter as part of their name (untranslatable names); Don't insert spurious separators. (list_ref): Make sure a pathnames are properly separated from namespace prefixes. (imap4d_list): Fix eventual use of uninitialized pfx. * imap4d/namespace.c (prefix_translate_name): Allow for NS_OTHER prefixes ending with a delimiter. (extract_username): Return NULL if prefix without trailing delimiter was used. * imap4d/tests/atlocal.in (make_config): Add more namespace prefixes. * imap4d/tests/list.at: Add more tests. * libmailutils/string/expvar.c (exp_getvar): Return MU_WRDSE_UNDEF if the variable is defined, but has NULL value.
2017-01-24imap4d: forbid to treat namespace root as a mailboxSergey Poznyakoff1
* imap4d/namespace.c (namespace_get_name): Return NULL if name is the same as the returned prefix
2017-01-24Simplify the namespace interfaceSergey Poznyakoff3
* imap4d/namespace.c (prefix_translate_name): Remove the url parameter. All uses changed. (namespace_translate_name): Likewise. (i_translate_name): Rename to translate_name. Remove the url and ns parameters. All uses changed. * imap4d/imap4d.h (namespace_translate_name): Change signature.
2017-01-24imap4d: uniformly use mailbox name and record for opening mailboxesSergey Poznyakoff3
This avoids problems with escaping pathnames that contain characters specific for URLs * imap4d/select.c (imap4d_select0): Don't use mailbox URL. * lib/manlock.c (manlock_open_mailbox_from_record): New function. * lib/muaux.h (manlock_open_mailbox_from_record): New proto.
2017-01-23Fix memory allocationSergey Poznyakoff3
2017-01-23imap4d: fix listSergey Poznyakoff3
* imap4d/list.c (refinfo) <refptr>: const pointer. (list_fun): Don't insert spurious delimiter between the prefix and the value. (list_ref): New static function. Actually list a normalized ref/wcard pair. (imap4d_list): Correctly handle wildcard part starting with namespace prefixes * imap4d/namespace.c (prefix_translate_name): If a prefix ends with a delimiter, allow its use without trailing delimiter in ref. E.g. LIST "~" "%" for prefix "~/" is quite OK. * imap4d/tests/atlocal.in: Fix prefix declaration.
2017-01-23Fix listing names with escapable charactersSergey Poznyakoff3
* imap4d/io.c (io_send_qstring): Fix condition * imap4d/list.c (list_fun): Use io_send_qstring to print names. * imap4d/lsub.c (imap4d_lsub): Likewise.
2017-01-22BugfixSergey Poznyakoff1
* imap4d/namespace.c (namespace_init): Provide record for default "" prefix.

Return to:

Send suggestions and report system problems to the System administrator.