1. 11 Apr, 2017 1 commit
    • 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.
      Sergey Poznyakoff authored
  2. 20 Mar, 2017 1 commit
    • 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.
      Sergey Poznyakoff authored
  3. 16 Jan, 2017 1 commit
    • * libmailutils/cli/cli.c (mu_cli): Use "no-" prefix to indicate negation
      * mail/mail.c (skip_empty_attachments): New global.
      (mail_options): New option --skip-empty-attachments
      * mail/mail.h (skip_empty_attachments): New extern.
      * mail/send.c (atchinfo) <skip_empty>: New field.
      (send_attach_file): Initialize skip_empty
      (saveatt): Optionally skip empty attachments
      
      * NEWS: Mention the new option.
      * doc/texinfo/programs.texi: Document the new option.
      Sergey Poznyakoff authored
  4. 14 Jan, 2017 1 commit
  5. 01 Jan, 2017 1 commit
  6. 08 Dec, 2016 1 commit
  7. 02 Nov, 2016 2 commits
    • The default configuration file name is "mailutils.conf".  Legacy
      configuration file "mailutils.rc" is processed if necessary.
      
      * libmailutils/cli/cli.c: Rename main configuration file to mailutils.conf
      Remove 'rcfile' option aliases.
      (mu_cli_ext): Special handling for legacy configuration file.
      * NEWS: Update.
      * doc/texinfo/mailutils.texi: Update.
      * doc/texinfo/programs.texi: Update.
      Sergey Poznyakoff authored
    • * include/mailutils/cfg.h (mu_cfg_parse_hints):
      Rename site_rcfile to site_file, custom_rcfile to custom_file.
      Remove append_tree and data fields.
      (MU_PARSE_CONFIG_GLOBAL,MU_CFG_PARSE_PROGRAM): Remove.
      (MU_PARSE_CONFIG_VERBOSE): Rename to MU_CF_VERBOSE.
      (MU_PARSE_CONFIG_DUMP): Rename to MU_CF_DUMP.
      (MU_CFG_FMT_LOCUS): Rename to MU_CF_FMT_LOCUS.
      (MU_CFG_FMT_VALUE_ONLY): Rename to MU_CF_FMT_VALUE_ONLY.
      (MU_CFG_FMT_PARAM_PATH): Rename to MU_CF_FMT_PARAM_PATH.
      
      (MU_CFG_COMPATIBILITY,MU_CFG_DEPRECATED): Remove.
      (mu_parse_config, mu_get_config): Remove deprecated functions.
      
      * libmailutils/cli/cli.c (mu_general_help_text): New global.
      (app_data): New struct.
      (init_options): Construct configuration option group depending on
      which configuration files are in use.
      (mu_cli_ext): Don't use per-user configuration files for servers.
      Pass pointer to app_data structure as po.po_data
      (mu_cli): Set MU_CFHINT_PER_USER_FILE flag by default.
      
      * mail/testsuite/lib/mail.exp: Rewrite invocation of the mu_init command.
      * include/mailutils/cli.h (mu_cli_setup) <server>: New field.
      
      * comsat/comsat.c (cli): Mark as server.
      (main): Bugfix: pass pointer to server to mu_cli.
      * imap4d/imap4d.c (cli): Mark as server.
      * pop3d/pop3d.c: Likewise.
      
      * comsat/tests/testsuite.at: Use the --no-site-config
      option.
      * imap4d/tests/testsuite.at: Likewise.
      
      * libmailutils/cfg/driver.c: Update.
      * libmailutils/cfg/format.c: Update.
      * libmailutils/cfg/lexer.l: Update.
      * libmailutils/cfg/parser.y: Update.
      * mu/acl.c: Update.
      
      * pop3d/testsuite/lib/pop3d.exp: Likewise.
      
      * mu/mu.c: Don't read configuration files.
      * mu/query.c: Fix args_doc
      
      * testsuite/lib/mailutils.exp (mu_init): Change option handling.
      Set --no-config option by default.
      Sergey Poznyakoff authored
  8. 31 Oct, 2016 1 commit
  9. 29 Oct, 2016 1 commit
  10. 24 Oct, 2016 1 commit
  11. 22 Oct, 2016 3 commits
    • * libmailutils/cli/cli.c (mu_cli_ext): Initialize hints.data
      (accidentally deleted).
      * libmailutils/opt/help.c (mu_option_describe_options): Don't
      display dup_args_note in single-dash mode.
      * libmailutils/opt/progname.c (mu_set_program_name): Free the
      old value after allocating new copy.  This allows to pass
      mu_full_program_name as argument.  Set mu_program_name to point
      to a segment of mu_full_program_name, not the original arg.
      * mh/mh_getopt.c: Remove duplicate version option.
      * po/POTFILES.in: Add missing files.
      Sergey Poznyakoff authored
    • * include/mailutils/cfg.h (MU_CFG_APPEND_TREE): New flag.
      * include/mailutils/cli.h (mu_version_copyright): New extern.
      (mu_cli_ext): New proto.
      * libmailutils/cfg/parser.y (mu_cfg_parse_config): Check for
      MU_CFG_APPEND_TREE bit set before accessing hints->append_tree.
      * libmailutils/cli/cli.c (param_set): Likewise.
      (mu_cli_ext): New function.
      (mu_cli): Rewrite as an entry point to mu_cli_ext.
      
      * comsat/comsat.c: Remove inclusion of obsolete headers.
      * mu/help.c: Likewise.
      * pop3d/extra.c: Likewise.
      Sergey Poznyakoff authored
    • * include/mailutils/cli.h (mu_version_func): Rename to mu_version_hook.
      * libmailutils/cli/cli.c: Likewise.
      * pop3d/popauth.c: Likewise.
      * mh/mh_getopt.c: (mh_getopt): Initialize NLS support. Install
      standard version hook (needed for mh-e autodetect feature).
      
      * mh/ali.c: Update prog_doc. Remove NLS initialization.
      * mh/anno.c: Likewise
      * mh/burst.c: Likewise
      * mh/comp.c: Likewise
      * mh/fmtcheck.c: Likewise
      * mh/folder.c: Likewise
      * mh/forw.c: Likewise
      * mh/inc.c: Likewise
      * mh/install-mh.c: Likewise
      * mh/mark.c: Likewise
      * mh/mhl.c: Likewise
      * mh/mhn.c: Likewise
      * mh/mhparam.c: Likewise
      * mh/mhpath.c: Likewise
      * mh/mhseq.c: Likewise
      * mh/msgchk.c: Likewise
      * mh/pick.c: Likewise
      * mh/prompter.c: Likewise
      * mh/refile.c: Likewise
      * mh/repl.c: Likewise
      * mh/rmf.c: Likewise
      * mh/rmm.c: Likewise
      * mh/scan.c: Likewise
      * mh/send.c: Likewise
      * mh/show.c: Likewise
      * mh/sortm.c: Likewise
      * mh/whatnow.c: Likewise
      * mh/whom.c: Likewise
      Sergey Poznyakoff authored
  12. 19 Oct, 2016 1 commit
    • * Makefile.am: Remove libmu_argp and libmu_cfg
      * configure.ac: Likewise.
      * libmu_argp/: Remove.
      * libmu_cfg/: Remove.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Remove gocs.h,
      libargp.h, libcfg.h
      
      * frm/frm.c: Register tls auth module
      * frm/from.c: Likewise.
      * maidag/maidag.c: Likewise.
      * mail/mail.c: Likewise.
      * messages/messages.c: Likewise.
      * movemail/movemail.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      * frm/frm.h: Remove obsolete includes
      
      * imap4d/Makefile.am: Update.
      * imap4d/imap4d.c: Use mu_cli for command line and configuration
      parsing.
      * imap4d/imap4d.h: Update.
      
      * include/mailutils/gocs.h: Remove.
      * libmailutils/cfg/gocs.c: Remove.
      * libmailutils/cfg/Makefile.am: Remove gocs.c
      
      * include/mailutils/cli.h (mu_cli_capa_apply): Rename to
      mu_cli_capa_extend_settings
      (mu_cli_setup) <inorder, prog_doc_hook>: New fields.
      * include/mailutils/daemon.h: Remove obsolete includes.
      * include/mailutils/gsasl.h: Likewise.
      * include/mailutils/mailutils.h: Update.
      * include/mailutils/mu_auth.h (mu_auth_mode): New enum
      (mu_auth_module): Redo structure.
      * include/mailutils/opt.h (mu_parseopt) <po_prog_doc_hook>: New field.
      * include/mailutils/sql.h (mu_sql_module_config): New extern.
      (mu_sql_interface_index): Change proto.
      * libmailutils/auth/mu_auth.c: Rewrite.
      * libmailutils/auth/system.c (mu_auth_system_module): Update structure
      * libmailutils/cli/capa.c (mu_cli_capa_apply): Rename to
      mu_cli_capa_extend_settings
      * libmailutils/cli/cli.c: Extend settings from auth modules as well.
      * libmailutils/opt/help.c (mu_program_help): Invoke po_prog_doc_hook
      if defined.
      * libmailutils/opt/opt.c (parseopt_init): Check the
      MU_PARSEOPT_PROG_DOC_HOOK flag.
      (find_long_option): Fix recognition of ambiguous options in case
      of exact match.
      * libmu_auth/gsasl.c: Add configuration.
      * libmu_auth/ldap.c: Likewise.
      * libmu_auth/pam.c: Likewise.
      * libmu_auth/radius.c: Likewise.
      * libmu_auth/sql.c: Likewise.
      * libmu_auth/tls.c: Likewise.
      * libmu_auth/virtual.c: Likewise.
      
      * mu/Makefile.am: Update.
      * mu/mu.c: Rewrite using mu_cli
      * mu/mu.h: Likewise.
      * mu/acl.c: Likewise.
      * mu/cflags.c: Likewise.
      * mu/dbm.c: Likewise.
      * mu/dispatch.c: Likewise.
      * mu/filter.c: Likewise.
      * mu/flt2047.c: Likewise.
      * mu/getans.c: Likewise.
      * mu/getarg.c: Likewise.
      * mu/getyn.c: Likewise.
      * mu/help.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/shell.c: Likewise.
      * mu/smtp.c: Likewise.
      * mu/util.c: Likewise.
      * mu/verbose.c: Likewise.
      * mu/wicket.c: Likewise.
      
      * pop3d/Makefile.am: Update.
      * pop3d/pop3d.c: Convert to mu_cli interface.
      * pop3d/pop3d.h: Likewise.
      
      * sql/sql.c (mu_sql_interface_index): Change argument qualifiers.
      Sergey Poznyakoff authored
  13. 16 Oct, 2016 1 commit
  14. 15 Oct, 2016 2 commits
    • Alternative invocations follow the main one, each on a separate line,
      preceded by " or: ".
      
      * include/mailutils/cli.h (mu_cli_setup) <prog_alt_args>: New member.
      * include/mailutils/opt.h (mu_parseopt) <po_prog_args>: Change type.
      (mu_program_usage): Change signature.
      * include/mailutils/stream.h (MU_IOCTL_WORDWRAP_GET_OFFSET): Rename to
      MU_IOCTL_WORDWRAP_GET_COLUMN. All uses changed.
      * libmailutils/cli/cli.c (mu_cli): Construct po.po_prog_args from
      prog_args and prog_alt_args.
      * libmailutils/opt/help.c (move_margin): Remove.
      (print_program_usage): New static function.
      (mu_program_usage): Second argument instructs how to display options.
      Main work is done by print_program_usage.
      (mu_program_help): Call print_program_usage.
      * libmailutils/opt/opt.c: Update.
      * libmailutils/stream/wordwrap.c (set_margin): Avoid unnecessary flushes.
      
      * libmailutils/tests/parseopt.c (MU_PARSEOPT_PROG_ARGS): Alternative
      argument sets are separated by the pipe sign.
      * libmailutils/tests/Makefile.am: Add new testcase.
      * libmailutils/tests/testsuite.at: Likewise.
      * libmailutils/tests/parseopt_help04.at: Add MU_PARSEOPT_PROG_ARGS
      to keywords.
      * libmailutils/tests/parseopt_help12.at: New file.
      
      * libmailutils/tests/tcli.c (cli): Add alternative arguments.
      
      * dotlock/dotlock.c: Update.
      * mimeview/mimeview.c: Likewise.
      * sieve/sieve.c: Likewise.
      Sergey Poznyakoff authored
    • * include/mailutils/stream.h (MU_IOCTL_WORDWRAP_SET_NEXT_MARGIN)
      (MU_IOCTL_WORDWRAP_GET_OFFSET): New opcodes.
      * libmailutils/stream/wordwrap.c (_wordwrap_flush_line): Replace
      whitespace-only lines with single newline on output.
      (_wordwrap_flush): Fix condition.
      (set_margin): Bugfix.
      (_wordwrap_ctl): Handle new opcodes.
      
      * include/mailutils/cli.h (mu_version_func): Change signature.
      * include/mailutils/opt.h (mu_parseopt) <po_help_hook>
      <po_version_hook>: Change signature.
      (mu_parseopt_fmt_text): Remove.
      (mu_option_describe_options, mu_program_help)
      (mu_program_usage): Change signature.
      (mu_program_version): New prototype.
      * libmailutils/cli/cli.c (mu_version_func): Take mu_stream_t as
      2nd argument.  Use mu_stream_printf for output.
      (extra_help_hook): Likewise.
      * libmailutils/opt/help.c: Rewrite using wordwrap streams.
      * libmailutils/opt/opt.c (fn_help, fn_usage, fn_version): Update.
      * libmailutils/tests/parseopt.c (version_hook): Write to mu_stream_t.
      
      * libmailutils/tests/parseopt_help00.at: Fix expected output.
      * libmailutils/tests/parseopt_help01.at: Likewise.
      * libmailutils/tests/parseopt_help02.at: Likewise.
      * libmailutils/tests/parseopt_help03.at: Likewise.
      * libmailutils/tests/parseopt_help04.at: Likewise.
      * libmailutils/tests/parseopt_help05.at: Likewise.
      * libmailutils/tests/parseopt_help06.at: Likewise.
      * libmailutils/tests/parseopt_help07.at: Likewise.
      * libmailutils/tests/parseopt_help08.at: Likewise.
      * libmailutils/tests/parseopt_help09.at: Likewise.
      * libmailutils/tests/parseopt_help10.at: Likewise.
      * libmailutils/tests/parseopt_help11.at: Likewise.
      Sergey Poznyakoff authored
  15. 12 Oct, 2016 2 commits
    • * dotlock/dotlock.c (force): Change type to unsigned.
      Provide default value for --force.
      (cli): Set exit codes and extra docstring.
      
      * include/mailutils/cli.h (mu_cli_setup): New members: prog_extra_doc,
      ex_usage, ex_config.
      * include/mailutils/opt.h (mu_parseopt_getcolumn)
      (mu_parseopt_fmt_text): New prototypes.
      * libmailutils/cli/cli.c (extra_help_hook): New hook.
      (mu_cli): Set up customized exit codes.
      Pass pointer to struct mu_cli_setup in hints.data.
      All uses changed.
      Set up help hook if setup->prog_extra_doc is defined.
      
      * libmailutils/opt/help.c (mu_parseopt_getcolumn): New
      function.
      (print_option_descr): Honor explicit newlines.
      (mu_parseopt_fmt_text): New function.
      
      * mimeview/mimeview.c (cli): Provide extra docs.
      * sieve/sieve.c: Likewise.
      Sergey Poznyakoff authored
    • * configure.ac (MU_APP_NEW_LIBRARIES): New temp variable.
      
      * include/mailutils/sieve.h (mu_cli_capa_sieve): New extern.
      * include/mailutils/tls.h (mu_cli_capa_tls): New extern.
      
      * libmailutils/cli/cli.c: Minor change.
      * libmailutils/cli/stdcapa.c: Add "auth" capability.
      
      * libmu_auth/tls.c: provide mu_cli_capa_tls
      
      * dotlock/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * dotlock/dotlock.c
      
      * frm/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * frm/frm.h: Fix includes.
      * frm/frm.c: Use mu_cli for optionr&config parsing.
      * frm/from.c: Likewise.
      
      * messages/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * messages/messages.c: Use mu_cli for optionr&config parsing.
      
      * mimeview/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * mimeview/mimeview.c: Use mu_cli for optionr&config parsing.
      
      * movemail/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * movemail/movemail.c: Use mu_cli for optionr&config parsing.
      
      * readmsg/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * readmsg/readmsg.c: Use mu_cli for optionr&config parsing.
      
      * sieve/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * sieve/sieve.c: Use mu_cli for optionr&config parsing.
      Sergey Poznyakoff authored
  16. 11 Oct, 2016 1 commit
    • The new API is to replace libmu_cfg and libmu_argp.  A smooth transition
      is scheduled, during which the two APIs will coexist,
      
      * configure.ac: Build libmailutils/cli/Makefile
      * include/mailutils/cli.h: New file.
      * include/mailutils/Makefile.am: Add cli.h
      * libmailutils/cli/Makefile.am: New file.
      * libmailutils/cli/capa.c: New file.
      * libmailutils/cli/cli.c: New file.
      * libmailutils/cli/stdcapa.c: New file.
      * libmailutils/Makefile.am (SUBDIRS): Add cli.
      
      * include/mailutils/cfg.h (mu_cfg_parse_hints): New members: append_tree
      and data.
      (MU_PARSE_CONFIG_LINT): New flag.
      * include/mailutils/diag.h (mu_program_name)
      (mu_full_program_name): Remove const qualifier.
      * include/mailutils/locker.h (mu_locker_set_default_external_program):
      Argument is const.
      * libmailutils/base/locker.c: Likewise.
      
      * include/mailutils/opt.h (mu_progname, mu_absprogname): Replace
      with mu_program_name and mu_full_program_name.
      (mu_set_progname): Rename to mu_set_program_name.
      (mu_parseopt) <po_data>: Change type to void *.
      (po_help_hook, po_version_hook): Change signatures.
      (mu_parseopt_error): New function.
      * libmailutils/opt/progname.c (mu_progname, mu_absprogname): Replace
      with mu_program_name and mu_full_program_name.
      (mu_set_progname): Rename to mu_set_program_name.
      * libmailutils/opt/help.c: Minor changes
      * libmailutils/opt/opt.c (parse_error): Rename to mu_parse_error (extern).
      (next_opt): Fix permutations.
      * libmailutils/tests/parseopt.c: Reflect changes.
      * libmailutils/tests/parseopt17.at: Improve test case
      * libmailutils/tests/parseopt_help05.at: Reflect changes.
      * libmailutils/tests/parseopt_help07.at: Reflect changes.
      
      * include/mailutils/stdstream.h (mu_program_name): Remove qualifier.
      
      * libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Remove useless condition
      
      * libmailutils/cfg/lexer.l (mu_cfg_parse_file): Additional info messages.
      * libmailutils/cfg/parser.y (mu_cfg_parse_config): Join in
      the append_tree.
      * libmailutils/diag/diag.c (mu_program_name, mu_full_program_name)
      (mu_set_program_name): Remove. Declared elsewhere.
      * libmu_sieve/conf.c: Add new configuration code. Mark old text for
      removal.
      * libmailutils/tests/tcli.c: New program.
      * libmailutils/tests/Makefile.am: Add tcli.c
      Sergey Poznyakoff authored