1. 27 Jun, 2015 3 commits
    • * python/libmu_py/address.c: Use PyInt_FromSize_t to return size_t
      and similar values.
      * python/libmu_py/auth.c: Likewise.
      * python/libmu_py/body.c: Likewise.
      * python/libmu_py/header.c: Likewise.
      * python/libmu_py/mailbox.c: Likewise.
      * python/libmu_py/mailcap.c: Likewise.
      * python/libmu_py/message.c: Likewise.
      * python/libmu_py/mime.c: Likewise.
      * python/libmu_py/sieve.c: Likewise.
      * python/libmu_py/stream.c: Likewise.
      Sergey Poznyakoff authored
    • * lib/python.c (python_proc): Pass a copy of mu_program_name
      as argv[0].
      * python/libmu_py/libmu_py.h (ASSERT_INDEX_RANGE): New macro.
      * python/libmu_py/address.c: Use Py_ssize_t and check returned
      value range when getting size_t arguments.
      * python/libmu_py/auth.c: Likewise.
      * python/libmu_py/folder.c: Likewise.
      * python/libmu_py/header.c: Likewise.
      * python/libmu_py/mailbox.c: Likewise.
      * python/libmu_py/mailcap.c: Likewise.
      * python/libmu_py/message.c: Likewise.
      * python/libmu_py/mime.c: Likewise.
      * python/libmu_py/secret.c: Likewise.
      * python/libmu_py/stream.c: Likewise.
      Sergey Poznyakoff authored
    • * lib/muscript.h: Don't include config.h: the caller is responsible
      for that.
      * lib/guile.c: Include config.h
      * lib/python.c: Likewise.
      * lib/script.c: Likewise.
      * lib/sieve.c: Likewise.
      Sergey Poznyakoff authored
  2. 26 Jun, 2015 3 commits
    • * mh/prompter-tty.c: include signal.h
      Sergey Poznyakoff authored
    • That's a temporary solution until reference counters are implemented
      for mu_body_t
      
      * libmailutils/mailbox/body.c (bstr_close, bstr_done): Don't close
      streams.
      Sergey Poznyakoff authored
    • * configure.ac: Fix checks for readline.  If it is
      not present - bail out if it was explicitly requested
      and silently disable it otherwise.
      Check for dbm_dirfno and dbm_pagfno (see libmu_dbm/ndbm.c,
      below).
      * examples/mboxidx.c (set_charset_filter): Fix array dimensions.
      * lib/python.c (python_done): add missing return statement.
      * libmailutils/address/address.c (mu_address_union): Fix size
      argument to memset.
      * libmailutils/server/msrv.c (mu_m_server_get_hints): Likewise.
      * libmu_compat/vartab.c (vardefn_free): Likewise.
      * libmailutils/cfg/parser.y (_set_fun): cast enum to size_t before
      comparison
      * libmailutils/diag/wd.c (mu_wd): fix while loop.
      * libmailutils/tests/url-parse.c (main): Fix printf format.
      * libmu_dbm/ndbm.c (_ndbm_get_fd): One of dbm_dirfno or
      dbm_pagfno may be missing (on FreeBSD, dbm_pagfno expands
      to a non-defined macro, which produces compilation error.
      * mail/mailvar.c (mailvar_varptr_comp): Remove.
      (mailvar_list_copy): Use mailvar_variable_comp instead
      of the removed mailvar_varptr_comp.
      Sergey Poznyakoff authored
  3. 24 Jun, 2015 2 commits
    • Sergey Poznyakoff authored
    • This commit converts libmuaux into installable shared library that
      includes selected modules from gnulib.  Correspondingly,
      lubmu_argp is also converted into installable shared library, which
      is the main purpose of these changes.  This should allow other packages
      which depend on Mailutils to link against libmu_argp even on systems
      that for some reason choose not to include static libraries in their
      distribution (vide Debian).  Another side effect is that such packages
      won't need to bother about argp being present on the system, as it is
      now included in libmuaux.so.
      
      * bootstrap.conf: Don't create Makefile.am
      Build gnulib using libtool and use mu_am_flags custom module
      * lib/local/modules/mu_am_flags: New file.
      * configure.ac (MU_APP_LIBRARIES): Use libmu_argp.la
      (TCPWRAP_LIBRARIES): Add libmutcpwrap.a
      * lib/Makefile.am: Make libmuaux installable shared library
      New static library libmutcpwrap.a
      * libmu_argp/Makefile.am: Make libmu_argp installable shared library
      * examples/Makefile.am: Use libmu_argp.la
      * examples/cpp/Makefile.am: Likewise.
      * imap4d/Makefile.am: Likewise.
      * mapi/Makefile.am: Likewise.
      * mh/Makefile.am: Likewise,
      * pop3d/Makefile.am: Likewise.
      Sergey Poznyakoff authored
  4. 23 Jun, 2015 2 commits
  5. 05 May, 2015 2 commits
    • Sergey Poznyakoff authored
    • * configure.ac: Configure mail/tests subdirectory.
      * mail/Makefile.am (SUBDIRS): Add tests.
      * mail/tests/testsuite.at: New file.
      * mail/tests/Makefile.am: New file.
      * mail/tests/.gitignore: New file.
      * mail/tests/atlocal.in: New file.
      * mail/tests/cols00.at: New file.
      * mail/tests/cols01.at: New file.
      * mail/tests/copy00.at: New file.
      * mail/tests/nohome.at: New file.
      * mail/tests/version.at: New file.
      Sergey Poznyakoff authored
  6. 04 May, 2015 1 commit
    • Last argument is treated as a mailbox only if it begins with
      a mailbox scheme (mbox://, maildir://, etc).
      
      * mail/copy.c (append_to_mailbox)
      (append_to_file): New functions.
      (mail_copy0): Depending on whether mailbox scheme is specified,
      call one of the above functions.
      * doc/texinfo/programs.texi (mail): Fix documentation of the copy
      command.
      * mail/testsuite/mail/write.exp: Update line/character counts for
      [Ss]ave commands.
      Sergey Poznyakoff authored
  7. 03 May, 2015 5 commits
    • * doc/texinfo/programs.texi: Fix description of mail --print
      Sergey Poznyakoff authored
    • * readmsg/readmsg.c: Bail out unless arguments are present.
      * doc/texinfo/programs.texi: Update.
      Sergey Poznyakoff authored
    • The Config file applies to all output formats, which is wrong.
      Use a dedicated configuration file for html output formats, and
      default settings for the rest.
      
      * doc/texinfo/Makefile.am (GENDOCS): Add html-specific configuration file.
      * doc/texinfo/Config: Rename to doc/texinfo/html.init (with changes).
      * doc/texinfo/programs.texi: Fix sectioning.
      Sergey Poznyakoff authored
    • * mail/util.c (util_command_list): Use util_screen_columns instead of
      util_getcols.
      (util_getcols): Don't use COLUMNS.
      (util_getlines): Don't use LINES.
      * mail/mail.c: Don't force COLUMNS and LINES (they are normally not
      exported, so setting them will cause util_getcols and util_getlines
      to return wrong results).
      Set variable "columns" from envvar COLUMNS, if set to a numeric value.
      Set variable "screen" from envvar LINES, if set to a numeric value.
      * mail/from.c (format_headline): Use util_screen_columns instead of
      util_getcols.
      * mail/mailvar.c (mailvar_print,mail_variable): Likewise.
      * mail/print.c (mail_print_msg): Likewise.
      Sergey Poznyakoff authored
    • The _mu_mailbox_pattern variable is supposed to be set only from
      configuration file.  However, the mu_mailbox_url function would
      also set it as a side effect.  This produced strange results;
      in particular unsetting HOME variable caused mail utilities to ignore
      MAIL variable as well (as reported by Dan Jacobson on 2015-04-30,
      <87vbgemcc7.fsf@jidanni.org>).
      
      * configure.ac (MU_PATH_MAILDIR): Don't end with a slash.
      * libmailutils/mailbox/mbx_default.c
      (mu_normalize_mailbox_url): Use mu_make_file_name.
      (mu_mailbox_url): Don't set _mu_mailbox_pattern.
      Sergey Poznyakoff authored
  8. 27 Apr, 2015 1 commit
    • Setting non-existing variable in bin/mail at the start of the session
      caused further calls to set (without arguments) to malfunction.  This
      reveiled bugs in list mapping functions.
      
      On the other hand, invoking completion after "set var=" caused bin/mail
      to coredump.
      
      * libmailutils/list/gmap.c (mu_list_gmap): Initialize rc.
      * libmailutils/list/map.c: Always initialize *res.
      * mail/mailvar.c (mailvar_list_copy): The call to mu_list_map
      does not necessarily create the list. Create it, if it doesn't.
      (mailvar_iterate_next): Redo the loop: check if there are items
      to iterate over.
      Sergey Poznyakoff authored
  9. 02 Mar, 2015 2 commits
  10. 08 Dec, 2014 1 commit
  11. 07 Dec, 2014 1 commit
  12. 06 Dec, 2014 1 commit
    • * libmailutils/mailbox/fsfolder.c: Fix debugging categories
      * libproto/maildir/mbox.c (maildir_opendir)
      (maildir_msg_finish_delivery)
      (maildir_scan0): Log errors.
      (maildir_flush,maildir_deliver_new): Return EACCES if the mailbox is read-only.
      Sergey Poznyakoff authored
  13. 05 Dec, 2014 1 commit
    • New imap4d statement "retain-groups" instructs it to retain the
      named supplementary user groups when switching to the user
      privileges (previously, imap4d just switched to <user>:mail).
      Read-only mailboxes are handled graciously: SELECT succeeds on
      such mailboxes, bug marks them explicitly as read-only.
      
      * imap4d/imap4d.c (user_retain_groups): New global.
      New config statement "retain-groups".
      (mu_get_user_groups): New function.
      (imap4d_session_setup0): Use mu_switch_to_privs instead of
      just setuid.
      * imap4d/list.c (imap4d_list): Fix handling of
        LIST "" "/path/to/mbox"
      * imap4d/select.c (imap4d_select0): Retry opening in read-only
      mode if failed to open for read-write.
      * libproto/maildir/mbox.c (maildir_mkfilename)
      (mk_info_filename): Change return value and signature. All uses
      changed.
      (maildir_scan0): Don't shuffle messages if mailbox is opened
      read-only.
      * libproto/maildir/folder.c: Update call to maildir_mkfilename.
      * libproto/maildir/maildir.h (maildir_mkfilename): Change
      prototype.
      Sergey Poznyakoff authored
  14. 03 Dec, 2014 1 commit
  15. 14 Aug, 2014 1 commit
  16. 10 Aug, 2014 1 commit
    • * imap4d/search.c (imap4d_search0): Use parsebuf.err_mesg if defined,
      otherwise fall back to the general "parse error" message.
      * include/mailutils/datetime.h (MU_DATETIME_INTERNALDATE): Use %e for
      day. Day can be one-digit decimal.
      * libmailutils/datetime/scantime.c (mu_scan_datetime): Skip initial
      ws for %e.
      * mu/imap.c (com_search): Print newline after the "no matches" message.
      Sergey Poznyakoff authored
  17. 27 Jul, 2014 1 commit
    • This patch adds a convenience library libmuscript that provides scripting
      capability easy to use in MU applications. Currently used by maidag and
      inc.
      
      * include/mailutils/util.h (mu_stpcpy): 2nd arg is const.
      * libmailutils/string/stpcpy.c: Likewise.
      
      * lib/.gitignore: Update.
      * lib/Makefile.am: New library libmuscript.a
      * lib/muscript.h: New file.
      * lib/muscript_priv.h: New file.
      * lib/script.c: New file.
      * maidag/guile.c: Rename to ...
      * lib/guile.c: ... this
      * maidag/python.c: Rename to ...
      * lib/python.c: ... this
      * maidag/sieve.c: Rename to ...
      * lib/sieve.c: ... this
      
      * maidag/Makefile.am (maidag_LDADD): Add libmuscript.a
      (maidag_SOURCES): Update.
      * maidag/maidag.c (script_handler): Change type to mu_script_t.
      * maidag/maidag.h: Include muscript.h
      * maidag/script.c: Rewrite via libmuscript
      
      * mh/Makefile.am (inc_LDADD): New variable.
      * mh/inc.c (options): New options --language and --script.
      (mh_option): New options -language and -script.
      (incdat) <handler,descr>: New members.
      (incmbx): Optionally process each message through a script. If it is
      marked as deleted upon return, don't incorporate it.
      (main): Set mh as the default mailbox scheme.
      Initialize scripting subsystem and deallocate it when finished.
      * mh/mh_getopt.h (ARG_LANG, ARG_SCRIPT): New constants.
      Sergey Poznyakoff authored
  18. 26 Jul, 2014 1 commit
    • * bootstrap.conf: Create and populate lib/gnu, if necessary.
      * configure.ac (MU_APP_COMMON_INCLUDES): Update.
      (AC_CONFIG_FILES): Build lib/gnu/Makefile
      * lib/Makefile.am (libmuaux_a_SOURCES): Add all objects from gnu/
      * po/POTFILES.in: Update.
      
      * examples/.gitignore: Update.
      Sergey Poznyakoff authored
  19. 17 Jul, 2014 2 commits
  20. 07 Jul, 2014 3 commits
  21. 05 Jul, 2014 1 commit
    • * libmailutils/filter/xml.c: New file.
      * include/mailutils/filter.h (mu_xml_filter): New extern.
      * libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add xml.c
      * libmailutils/filter/filter.c (mu_filter_get_list): Register mu_xml_filter.
      
      * libmailutils/tests/xml.at: New file.
      * libmailutils/tests/Makefile.am: Add xml.at
      * libmailutils/tests/testsuite.at: Likewise.
      Sergey Poznyakoff authored
  22. 01 Jul, 2014 1 commit
    • * include/mailutils/filter.h (mu_htmlent_filter): New extern.
      * libmailutils/filter/Makefile.am: Add htmlent.c
      * libmailutils/filter/filter.c (mu_filter_get_list): Register mu_htmlent_filter.
      * libmailutils/filter/htmlent.c: New file.
      * libmailutils/tests/htmlent.at: New testcase.
      * libmailutils/tests/Makefile.am: Add new testcase.
      * libmailutils/tests/testsuite.at: Likewise.
      Sergey Poznyakoff authored
  23. 17 Jun, 2014 1 commit
    • Without this, `mk_info_filename' generates filenames of the following
      form when the flag set is empty:
      
          1402217787.M664911P5957Q143.hostname:2
      
      The original Maildir spec (http://cr.yp.to/proto/maildir.html),
      however, mandates that filenames must be of the form `uniq:info', with
      `info' starting with "2,"--including a comma.
      
      This patch removes the "cleanup" performed by `mk_info_filename' as
      that there is no rationale for it in mailutils' source code history,
      and as it breaks Gnus' "nnmaildir" backend (Cf.  `nnmaildir--add-flag').
      
      * libproto/maildir/mbox.c (mk_info_filename): Keep comma at the end of
      filename when the flags suffix is empty.
      Damien Diederen authored
  24. 21 May, 2014 1 commit
  25. 15 Apr, 2014 1 commit