1. 15 Oct, 2016 3 commits
    • Sergey Poznyakoff authored
    • 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
  2. 14 Oct, 2016 1 commit
    • * include/mailutils/stream.h (MU_IOCTL_WORDWRAPSTREAM): New ioctl.
      (mu_wordwrap_stream_create): New proto.
      * libmailutils/stream/Makefile.am: add wordwrap.c
      * libmailutils/stream/wordwrap.c: New file.
      * libmailutils/tests/Makefile.am: Add new testcases.
      * libmailutils/tests/testsuite.at: Include new testcases.
      * libmailutils/tests/wordwrap.c: New file.
      * libmailutils/tests/wordwrap00.at: New file.
      * libmailutils/tests/wordwrap01.at: New file.
      * libmailutils/tests/wordwrap02.at: New file.
      * libmailutils/tests/wordwrap03.at: New file.
      Sergey Poznyakoff authored
  3. 13 Oct, 2016 1 commit
  4. 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
  5. 11 Oct, 2016 2 commits
    • * libmailutils/opt/opt.c (find_long_option): Don't mark ambiguity
      if the matching option unaliases to the same option as the found one.
      Sergey Poznyakoff authored
    • 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
  6. 10 Oct, 2016 3 commits
    • * configure.ac (VI_CURRENT): Set to 5
      Don't link intprops.h
      * gnulib: Upgrade.
      * gnulib.modules (intprops) Remove.
      * libmailutils/cfg/parser.y: Don't incluse intprops.h
      * po/POTFILES.in: Add new files.
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * include/mailutils/opt.h (MU_PARSEOPT_EXTRA_INFO)
      (MU_PARSEOPT_EXIT_ERROR): New flags.
      (struct mu_parseopt) <po_extra_info>: New member.
      <po_exit_error>: New member.
      * libmailutils/opt/help.c: Fix help output formatting.
      Implement support for ARGP_HELP_FMT envvar.
      * libmailutils/opt/opt.c (add_option_cache): Honor
      MU_PARSEOPT_IMMEDIATE.
      (parseopt_init): Initialize each member separately.
      
      * libmailutils/tests/parseopt.c: Rewrite envvar handling.
      * libmailutils/tests/Makefile.am: Add new tests.
      * libmailutils/tests/testsuite.at (PARSEOPT_DEFAULT): New define.
      * libmailutils/tests/parseopt00.at: Use PARSEOPT_DEFAULT.
      * libmailutils/tests/parseopt01.at: Likewise.
      * libmailutils/tests/parseopt02.at: Likewise.
      * libmailutils/tests/parseopt03.at: Likewise.
      * libmailutils/tests/parseopt04.at: Likewise.
      * libmailutils/tests/parseopt05.at: Likewise.
      * libmailutils/tests/parseopt06.at: Likewise.
      * libmailutils/tests/parseopt07.at: Likewise.
      * libmailutils/tests/parseopt08.at: Likewise.
      * libmailutils/tests/parseopt09.at: Likewise.
      * libmailutils/tests/parseopt10.at: Likewise.
      * libmailutils/tests/parseopt11.at: Likewise.
      * libmailutils/tests/parseopt12.at: Likewise.
      * libmailutils/tests/parseopt13.at: Likewise.
      * libmailutils/tests/parseopt14.at: Likewise.
      * libmailutils/tests/parseopt15.at: Likewise.
      * libmailutils/tests/parseopt16.at: Likewise.
      * libmailutils/tests/parseopt17.at: Likewise.
      * libmailutils/tests/parseopt18.at: Likewise.
      * libmailutils/tests/parseopt19.at: Likewise.
      * libmailutils/tests/parseopt20.at: Likewise.
      * libmailutils/tests/parseopt21.at: Likewise.
      * libmailutils/tests/parseopt22.at: Likewise.
      * libmailutils/tests/parseopt23.at: New test.
      * libmailutils/tests/parseopt24.at: New test.
      * libmailutils/tests/parseopt25.at: New test.
      * libmailutils/tests/parseopt_help00.at: New test.
      * libmailutils/tests/parseopt_help01.at: New test.
      * libmailutils/tests/parseopt_help02.at: New test.
      * libmailutils/tests/parseopt_help03.at: New test.
      * libmailutils/tests/parseopt_help04.at: New test.
      * libmailutils/tests/parseopt_help05.at: New test.
      * libmailutils/tests/parseopt_help06.at: New test.
      * libmailutils/tests/parseopt_help07.at: New test.
      * libmailutils/tests/parseopt_help08.at: New test.
      * libmailutils/tests/parseopt_help09.at: New test.
      * libmailutils/tests/parseopt_help10.at: New test.
      * libmailutils/tests/parseopt_help11.at: New test.
      Sergey Poznyakoff authored
  7. 09 Oct, 2016 1 commit
    • * include/mailutils/opt.h (mu_parseopt) <po_permuted>: New member.
      * libmailutils/opt/help.c (print_option): Fix display of optional
      arguments.
      * libmailutils/opt/opt.c (next_opt,parse): Fix start-of-arguments
      index.
      Move permutation into a separate function.
      * libmailutils/opt/progname.c (mu_set_progname): Remove eventual lt-
      prefix.
      * libmailutils/tests/Makefile.am: Add new tests.
      * libmailutils/tests/parseopt.c: Use environment to control
      mu_parseopt flags.
      * libmailutils/tests/testsuite.at: Add new tests.
      * libmailutils/tests/strtoc.at: Update.
      
      * libmailutils/tests/parseopt00.at: New file.
      * libmailutils/tests/parseopt01.at: New file.
      * libmailutils/tests/parseopt02.at: New file.
      * libmailutils/tests/parseopt03.at: New file.
      * libmailutils/tests/parseopt04.at: New file.
      * libmailutils/tests/parseopt05.at: New file.
      * libmailutils/tests/parseopt06.at: New file.
      * libmailutils/tests/parseopt07.at: New file.
      * libmailutils/tests/parseopt08.at: New file.
      * libmailutils/tests/parseopt09.at: New file.
      * libmailutils/tests/parseopt10.at: New file.
      * libmailutils/tests/parseopt11.at: New file.
      * libmailutils/tests/parseopt12.at: New file.
      * libmailutils/tests/parseopt13.at: New file.
      * libmailutils/tests/parseopt14.at: New file.
      * libmailutils/tests/parseopt15.at: New file.
      * libmailutils/tests/parseopt16.at: New file.
      * libmailutils/tests/parseopt17.at: New file.
      * libmailutils/tests/parseopt18.at: New file.
      * libmailutils/tests/parseopt19.at: New file.
      * libmailutils/tests/parseopt20.at: New file.
      * libmailutils/tests/parseopt21.at: New file.
      * libmailutils/tests/parseopt22.at: New file.
      Sergey Poznyakoff authored
  8. 08 Oct, 2016 1 commit
    • * include/mailutils/cfg.h (mu_cfg_param_data_type): Remove.
      (mu_cfg_param_type): New enum.
      (mu_cfg_param) <type>: Change type to int.
      (mu_cfg_cidr): Remove.
      (mu_cfg_parse_boolean): Remove.  All uses updated.
      * include/mailutils/util.h (mu_c_void): New constant.
      (mu_c_type_str): New extern/
      * libmailutils/string/str_to_c.c (mu_c_type_str): New global.
      * libmailutils/cfg/format.c (mu_cfg_data_type_string): Rename
      to mu_c_type_string; change argument type.
      All uses updated.
      * libmailutils/cfg/parser.y: Use mu_str_to_c for value
      conversion.
      
      * libmailutils/tests/.gitignore: Update.
      * libmailutils/tests/Makefile.am: Add strtoc.at; build strtoc
      * libmailutils/tests/strtoc.at: New file.
      * libmailutils/tests/strtoc.c: New file.
      * libmailutils/tests/testsuite.at: Include strtoc.at
      
      * comsat/comsat.c: Use mu_c_type_t types.
      * dotlock/dotlock.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * lib/manlock.c: Likewise.
      * lib/tcpwrap.c: Likewise.
      * libmailutils/server/msrv.c: Likewise.
      * libmu_argp/muinit.c: Likewise.
      * libmu_cfg/common.c: Likewise.
      * libmu_cfg/gsasl.c: Likewise.
      * libmu_cfg/ldap.c: Likewise.
      * libmu_cfg/pam.c: Likewise.
      * libmu_cfg/radius.c: Likewise.
      * libmu_cfg/sieve.c: Likewise.
      * libmu_cfg/sql.c: Likewise.
      * libmu_cfg/tls.c: Likewise.
      * libmu_cfg/virtdomain.c: Likewise.
      * maidag/maidag.c: Likewise.
      * mimeview/mimeview.c: Likewise.
      * movemail/movemail.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      Sergey Poznyakoff authored
  9. 07 Oct, 2016 1 commit
    • * configure.ac: Build libmailutils/opt
      * include/mailutils/Makefile.am: Add opt.h
      * include/mailutils/opt.h: New file.
      * include/mailutils/util.h (mu_c_type_t): New datatype.
      (mu_str_to_c): New proto.
      * libmailutils/Makefile.am: Add opt to subdirs.
      
      * libmailutils/opt/Makefile.am: New file.
      * libmailutils/opt/help.c: New file.
      * libmailutils/opt/opt.c: New file.
      * libmailutils/opt/progname.c: New file.
      
      * libmailutils/string/Makefile.am: Add new files.
      * libmailutils/string/str_to_c.c: New file.
      * libmailutils/string/to_sn.c: New file.
      * libmailutils/string/to_un.c: New file.
      
      * libmailutils/tests/.gitignore: Update.
      * libmailutils/tests/Makefile.am: Update.
      * libmailutils/tests/parseopt.c: New file.
      Sergey Poznyakoff authored
  10. 06 Oct, 2016 1 commit
    • Bugfixes · 8b8f29eb
      * mh/rmf.c (current_folder_path): Treat name as folder while expanding.
      * mail/unset.c (mail_unset): Fix the behavior when no arguments were
      given.
      Sergey Poznyakoff authored
  11. 22 Aug, 2016 4 commits
  12. 21 Aug, 2016 1 commit
  13. 04 Jul, 2016 1 commit
  14. 15 Jun, 2016 2 commits
    • The changes would be nice, if it weren't for the fact that
      libproto is not yet built by the time libmailutils/tests are
      compiled.
      Sergey Poznyakoff authored
    • * libmailutils/msgset/parse.c (MU_MSGSET_EMPTY): New constant.
      (parse_msgrange): Don't add any ranges if mode is set to
      MU_MSGSET_EMPTY.
      (mu_msgset_parse_imap): Force MU_MSGSET_EMPTY mode if the mailbox
      is empty.
      * libmailutils/msgset/print.c (mu_msgset_print): Handle empty message
      sets.
      * libmailutils/msgset/trans.c (_mu_msgset_translate_pair): Initialize
      variable.
      * libmailutils/tests/Makefile.am (msgset_LDADD): New variable.
      * libmailutils/tests/msgset.c (parse_msgset): Take mailbox as first
      argument.
      (main): New option -mailbox
      Sergey Poznyakoff authored
  15. 08 Feb, 2016 1 commit
  16. 22 Jan, 2016 2 commits
  17. 19 Dec, 2015 1 commit
  18. 11 Nov, 2015 1 commit
  19. 10 Nov, 2015 2 commits
  20. 28 Oct, 2015 1 commit
  21. 27 Oct, 2015 7 commits
    • * doc/texinfo/sieve.texi: Document recent changes to vacation.
      * libmu_sieve/extensions/vacation.c (vacation_reply): Handle
      the "rfc2822" tag: if set together with :file, treat the file
      as the RFC2822 message.  Otherwise, read message body from it.
      * sieve/tests/vacation.at: Add test for :rfc2822
      Sergey Poznyakoff authored
    • New tag :header allows to set headers in the reply message
      generated by the vacation extension.
      Sergey Poznyakoff authored
    • * libproto/mailer/sendmail.c: Fix typo in debugging message.
      * po/.gitignore: Update.
      Sergey Poznyakoff authored
    • When delivering message, the library may need to know the email
      address of the user on behalf of whom maidag is called. In particular,
      that happens when using the vacation extension.  In that case the
      library would construct the email by concatenating user name, obtained
      as a result of mu_get_auth_by_uid, and current domain name.  Avoid
      this by remembering email address the message is being delivered to.
      
      * libmailutils/base/usremail.c (mu_set_user_email): NULL
      argument clears email.
      (mu_get_user_email): Use EUID instead of UID.
      * maidag/deliver.c (do_delivery): Set user email prior to
      delivery.
      * maidag/maidag.c (default_domain): New variable.
      (maidag_cfg_param): New setting "domain".
      * maidag/maidag.h (default_domain): New extern.
      Sergey Poznyakoff authored
    • * libmailutils/diag/debug.c (mu_debug_log): Account for
      eventual newlines in the generated message string.
      * imap4d/io.c (imap4d_init_tls_server): Use mu_stream_strerror.
      Sergey Poznyakoff authored
    • * libproto/mailer/prog.c (url_to_argv): Free ws only if
      it was initialized.
      Sergey Poznyakoff authored
    • * include/mailutils/Makefile.am (errno.h): Use explicit file names
      instead of implicit variables.
      * include/mailutils/sys/Makefile.am (debcat.h): Likewise.
      * libmailutils/diag/Makefile.am (muerrno.c): Likewise.
      * libmu_argp/Makefile.am (libmu_argp_la_LIBADD): Use relative path
      to .la,
      Sergey Poznyakoff authored
  22. 26 Oct, 2015 1 commit
    • * libmu_sieve/extensions/vacation.c (match_addresses): Change arguments:
      take primary email address as well as a list of aliases.
      (vacation_reply): Reply if the primary email or one of alias emails are
      listed in recipient list of the original message.  New tag "always_reply"
      reverts to the old behavior: reply regardless of whether the message is
      destined for us.
      Use the current user email as the sender address of the vacation message.
      New tag "return_address" sets the sender address explicitly.
      * sieve/tests/vacation.at: Add new tests.
      Sergey Poznyakoff authored