1. 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
  2. 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
  3. 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
  4. 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
  5. 22 Aug, 2016 4 commits
  6. 21 Aug, 2016 1 commit
  7. 04 Jul, 2016 1 commit
  8. 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
  9. 08 Feb, 2016 1 commit
  10. 22 Jan, 2016 2 commits
  11. 19 Dec, 2015 1 commit
  12. 11 Nov, 2015 1 commit
  13. 10 Nov, 2015 2 commits
  14. 28 Oct, 2015 1 commit
  15. 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
  16. 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
  17. 25 Oct, 2015 1 commit
    • * libmu_sieve/extensions/vacation.c (build_mime): Fix memory leak.
      This also flushes the message body stream, so its content becomes
      visible for the mailer.
      (noreply_address_p): Rename "addresses" tag to "noreply".
      (check_db): The "database" tag provides vacation database name.
      (vacation_reply): Always set message headers.
      (vacation_tags): Rename "addresses" tag to "noreply".
      New tag: "database"
      
      * sieve/tests/vacation.at: New file.
      * sieve/tests/Makefile.am (TESTSUITE_AT): Add vacation.at.
      * sieve/tests/testsuite.at: Include vacation.at.
      
      * doc/texinfo/programs.texi: Minor change.
      Sergey Poznyakoff authored
  18. 20 Sep, 2015 1 commit
  19. 19 Sep, 2015 1 commit
    • * include/mailutils/wordsplit.h (MU_WRDSX_WORD)
      (MU_WRDSX_QUOTE): New constants.
      (mu_wordsplit_getwords): Rename to mu_wordsplit_get_words.
      * libmailutils/string/wordsplit.c (mu_wordsplit_getwords): Rename
      to mu_wordsplit_get_words.
      
      * libmailutils/base/userprivs.c (mu_switch_to_privs): Fix
      memory overrun when retrieving the current pointer.
      
      * examples/header.c (main): Use mu_wordsplit_get_words
      * imap4d/preauth.c (preauth_getvar): Rewrite according to
      the new API.
      * libmailutils/imapio/create.c (mu_imapio_create): Use MU_WRDSX_
      constants to address ws_escape.
      * libmailutils/imapio/qstring.c: Likewise.
      * libmailutils/mailbox/mbx_default.c: Minor fix.
      * libmailutils/server/acl.c (acl_getvar): Rewrite according to
      the new API.
      * libmailutils/tests/wsp.c: Minor fix.
      * libmailutils/url/create.c (_mu_url_create_internal): Bugfix: alloc
      url->path.
      * libmu_sieve/extensions/list.c (retrieve_next_header): Use
      mu_wordsplit_get_words
      * libproto/mailer/prog.c (prog_getvar): Rewrite according to
      the new API.
      * libproto/mailer/smtp_gsasl.c (get_implemented_mechs): Remove
      unneeded assignment to ws.ws_wordv.
      * mh/folder.c: Use mu_wordsplit_get_words.
      * mh/mhn.c: Likewise.
      * movemail/movemail.c (movemail_getvar): Rewrite according to
      the new API.
      Sergey Poznyakoff authored
  20. 16 Sep, 2015 1 commit
    • The updated version supports tilde and pathname expansion, command
      substitution and standard shell-like replacement constructs in
      variable substitution, such as ${X:-V} etc.
      
      * include/mailutils/wordsplit.h: Update.
      * libmailutils/string/wordsplit.c: Update.
      * libmailutils/tests/wsp.c: Update.
      * libmailutils/tests/wordsplit.at: Update unescape test.
      
      * libmailutils/imapio/create.c (mu_imapio_create): Initialize ws_escape
      array.
      * libmailutils/mime/mimehdr.c (_mime_header_parse): Likewise.
      * libmailutils/tests/modmesg.c: Use mu_wordsplit with MU_WRDSF_NOSPLIT
      to run expansions on the string.
      * mu/shell.c (shell_prompt): Likewise.
      Sergey Poznyakoff authored
  21. 24 Aug, 2015 1 commit
  22. 04 Aug, 2015 2 commits
  23. 11 Jul, 2015 3 commits
    • Sergey Poznyakoff authored
    • * include/mailutils/stream.h (MU_IOCTL_TLSSTREAM): New ioctl code.
      (MU_IOCTL_TLS_GET_CIPHER_INFO): New ioctl opcode.
      * libmailutils/property/assocprop.c (_assoc_prop_fill)
      (_assoc_prop_save): allow for NULL stream pointer.
      * libmu_auth/tls.c (_tls_io_ioctl,_tls_ioctl): Handle
      MU_IOCTL_TLSSTREAM/MU_IOCTL_TLS_GET_CIPHER_INFO ioctl.
      
      * imap4d/io.c (log_cipher): New function.
      (io_setio, imap4d_init_tls_server): Call log_cipher after successfully
      establishing the TLS connection.
      * imap4d/starttls.c (tls_encryption_on): Remove diagnostic output.
      * pop3d/extra.c (log_cipher): New function.
      (pop3d_setio,pop3d_init_tls_server): Call log_cipher after successfully
      establishing the TLS connection.
      Sergey Poznyakoff authored
    • * libmailutils/mailbox/mbx_default.c (mu_normalize_mailbox_url): don't
      place / in front of the username.
      (plus_expand): Use mu_make_file_name and mu_asprintf.  Check for errors.
      (mu_mailbox_create_default): Check for errors.
      Sergey Poznyakoff authored
  24. 10 Jul, 2015 1 commit
    • Avoid calling gnutls_global_init (via mu_tls_module_init) prior
      to forking.  gnutls_global_init opens at least one file descriptor
      (/dev/urandom), and closing it will disrupt its operation.
      Current stable libgnutls (3.3.15) is able to cope with it, but
      there are plenty of systems running much older versions.
      
      * libmailutils/server/msrv.c (mu_m_server_begin): Reset onexit list
      after forking.
      * libmu_auth/tls.c (mu_tls_module_init): Don't call mu_init_tls_libs.
      (_tls_server_open, _tls_client_open): Check return value from
      mu_init_tls_libs.
      * imap4d/auth_gsasl.c (auth_gsasl): Use mu_onexit to
      register onexit functions.
      * imap4d/imap4d.h (util_atexit): Remove prototype.
      * imap4d/starttls.c (imap4d_starttls): Don't register
      mu_deinit_tls_libs: now done by tls library.
      (starttls_init): Don't call mu_init_tls_libs.
      * imap4d/util.c (util_atexit): Remove.
      (util_bye): Update accordingly.
      * pop3d/extra.c (pop3d_setio): Print informational message after
      establishing TLS.
      (pop3d_bye): Don't call mu_deinit_tls_libs: that's done by the library.
      * pop3d/pop3d.c (main): Don't call mu_init_tls_libs.
      Sergey Poznyakoff authored
  25. 09 Jul, 2015 1 commit
    • * testsuite/testsuite.inc (MUT_DEFAULT_OPTIONS): New define.
      * maidag/tests/testsuite.at: Add MUT_DEFAULT_OPTIONS to the
      options passed to maidag
      * mail/tests/cols00.at: Use MUT_MAIL_CMD
      * mail/tests/cols01.at: Likewise.
      * mail/tests/copy00.at: Likewise.
      * mail/tests/nohome.at: Likewise.
      * mail/tests/testsuite.at (MUT_MAIL_CMD): New define.  Pass
      MUT_DEFAULT_OPTIONS to mail.
      * sieve/tests/testsuite.at: Pass MUT_DEFAULT_OPTIONS to sieve.
      Sergey Poznyakoff authored