1. 24 Dec, 2010 1 commit
  2. 23 Dec, 2010 10 commits
    • * libmailutils/base/list.c (list_itrctl): Accept mu_itrctl_set_direction
      and mu_itrctl_qry_direction even if mu_iterator_first has not been called
      yet.
      * movemail/movemail.c: Rewrite using iterators.
      
      * libmailutils/mailer/mailer.c (safe_address_create): Bugfix.
      Sergey Poznyakoff authored
    • * libmu_sieve/util.c (mu_sieve_error, mu_sieve_debug)
      (mu_sieve_log_action): Format location only if locus.mu_file
      is not NULL.
      Sergey Poznyakoff authored
    • * libmailutils/mailbox/mbxitr.c (mailbox_iterator)<backwards>: New member.
      (mbx_first): Position to the last message if itr->backwards is set.
      (mbx_next): Decrement index if itr->backwards is set.
      (mbx_finished_p): Take into account iteration direction.
      (mbx_itrctl): new method.
      (mu_mailbox_get_iterator): Set itrctl method.
      Sergey Poznyakoff authored
    • New configuration options allow to specify the maximum number of messages
      to be copied and control the actions of movemail when an error occurs while
      appending a message.
      
      * movemail/movemail.c (ONERROR_OPTION,MAX_MESSAGES_OPTION): New option codes.
      (options): New options --onerror and --max-messages.
      (max_messages_option, onerror_flags): New variable.
      (ONERROR_SKIP, ONERROR_DELETE, ONERROR_COUNT): New defines.
      (parse_opt): Handle ONERROR_OPTION.
      (cb_onerror): New callback.
      (movemail_cfg_param): New configuration statements: "max-messages"
      and "onerror".
      (move_message): Delete the message if ONERROR_DELETE is set.
      (main): Handle the limit on the number of processed messages and
      onerror flags.
      Use mu_mailbox_expunge instead of mu_mailbox_flush.  This preserves
      the attributes of not processed options (in case max_messages_option is
      not 0) and speeds up the things considerably, especially on huge
      mailboxes.
      Sergey Poznyakoff authored
    • Be more liberal when guessing sender and recipient names. Tolerate
      deviations from RFC822.
      
      * libmailutils/mailer/mailer.c (copy_fragment)
      (recover_email, safe_address_create): New functions.
      (_set_from, _set_to): Use safe_address_create.
      Sergey Poznyakoff authored
    • * frm/common.c [!HAVE_LIBFRIBIDI] (puts_bidi): Fix definition.
      * libproto/pop/mbox.c (pop_destroy): Fix coredump (occurred
      if the mailbox has not been scanned).
      Sergey Poznyakoff authored
    • * libmailutils/base/lcall.c (mu_parse_lc_all): Allow for arg==NULL.
      * mh/Makefile.am: Define mhlibdir.
      * mh/pick.y (match_header): Use sget accessors.
      * mh/repl.c: Accept -noquery silently.
      Sergey Poznyakoff authored
    • * mail/mail.h (mail_execute): Change signature. All callers updated.
      * mail/shell.c (expand_bang): Change signature.  Take the
      string to be expanded as the 2nd and the last command as 3rd arguments.
      Always allocate the return string, even if there's nothing to expand.
      (mail_execute): fix memory management.
      * mail/escape.c: Update.
      * mail/escape.c: Update calls to mail_execute.
      Sergey Poznyakoff authored
    • * libmu_sieve/util.c: Update.
      Sergey Poznyakoff authored
    • * libmailutils/stream/logstream.c (_log_ctl): Handle MU_IOCTL_SYSLOGSTREAM,
      pass it to the transport stream.
      * libmu_sieve/sieve.l (pop_source): Restore input_stream.
      * libmu_sieve/util.c (mu_sieve_error, mu_sieve_debug)
      (mu_sieve_log_action): Set location information on the errstream.
      Sergey Poznyakoff authored
  3. 22 Dec, 2010 10 commits
    • * sieve/tests/list.at: New file.
      * sieve/tests/Makefile.am (TESTSUITE_AT): Add list.at.
      * sieve/tests/testsuite.at: Include list.at.
      Sergey Poznyakoff authored
    • New parser accepts range specifications (mailbox.trace3-prot).
      mu_debug_format_spec outputs specs in the canonical form.
      
      * include/mailutils/debug.h (MU_DEBUG_LEVEL_RANGE): New macro.
      (mu_debug_set_category_level): Change return type to int.
      (mu_debug_get_category_level): New proto.
      * libmailutils/diag/debug.c (mu_debug_set_category_level): Change
      return type to int.
      (mu_debug_get_category_level): New function.
      (mu_debug_level_from_string): New function.
      (parse_spec): Accept range specification.  Negation at the start
      of spec implies 'proto'.
      (mu_debug_format_spec): Rewrite.
      
      * libmailutils/tests/debugspec.c: New file.
      * libmailutils/tests/debugspec.at: New file.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add debugspec.
      (TESTSUITE_AT): add debugspec.at
      * libmailutils/tests/testsuite.at: Include debugspec.at.
      * libmailutils/tests/.gitignore: Add debugspec.
      
      * sieve/sieve.c: Do not advertise 'T' and 'P' arguments to --debug.
      (debug_level): Remove.
      (set_debug_level): Rewrite the handling of legacy debug specifiers 'TP'.
      Sergey Poznyakoff authored
    • * include/mailutils/types.hin (mu_debug_handle_t)
      (mu_debug_level_t): New data types.
      * include/mailutils/debug.h (mu_debug_level_p)
      (mu_debug_category_level)
      (mu_debug_set_category_level): Change argument types to
      mu_debug_handle_t/mu_debug_level_t.
      * libmailutils/diag/debug.c: Likewise.
      
      * libmailutils/server/acl.c (_run_entry): Call mu_debug_log_nl
      instead of mu_debug_log_end with an empty format string.
      
      * include/mailutils/sieve.h
      * libmailutils/filter/base64.c
      * libmailutils/stream/stream.c
      * libmu_sieve/conf.c
      * libmu_sieve/extensions/spamd.c
      * libmu_sieve/sieve.y
      * sieve/sieve.c: Commit the changes c522de11 failed to commit.
      Sergey Poznyakoff authored
    • * libmailutils/filter/iconvflt.c (_icvt_decoder): Do not iconv_close
      if cd is -1.
      * mh/mboxprop.c (mh_mailbox_get_cur): Ignore whitespace following the cur
      value.
      Sergey Poznyakoff authored
    • * libmu_sieve/extensions/pipe.c: Include sys/wait.h
      * testsuite/Makefile.am: Distribute testsuite.inc
      Sergey Poznyakoff authored
    • * include/mailutils/filter.h (MU_FILTER_MAX_AGAIN): Add a comment.
      * libmailutils/stream/fltstream.c (filter_read): Use
      mu_debug on the filter.error level, instead of plain mu_error.
      If the xcoder returns OK and does not consume all input when
      processing the last buffer, assume mu_filter_again.
      Fix loop condition.
      (filter_write_internal): Use
      mu_debug on the filter.error level, instead of plain mu_error.
      Sergey Poznyakoff authored
    • * include/mailutils/sieve.h (mu_sieve_debug_handle): New declaration.
      (mu_sieve_debug_init): New prototype.
      * libmu_sieve/conf.c (mu_sieve_debug_handle): New global.
      (mu_sieve_module_init): Call mu_sieve_debug_init.
      * libmu_sieve/extensions/spamd.c (spamd_connect_tcp)
      (spamd_connect_socket): Fix stream creation.
      (spamd_send_message): Switch to full buffering on the transport
      stream and indicate it is a payload (in case transcript is enabled),
      before copying data.  Restore things to their original state afterwards.
      (spamd_read_line): Rewrite using mu_stream_getline.
      (decode_float): Additional argument endp. Unless NULL, store there the
      position in the input string where the parsing has stopped.
      (parse_response_line): New function.
      (spamd_test): Rewrite using new API.
      * sieve/sieve.c (parser): --dry-run implies --verbose.
      
      * libmailutils/filter/base64.c (_base64_decoder): when not enough data
      are available and cmd is not mu_filter_lastbuf, return mu_filter_lastbuf.
      * libmailutils/stream/stream.c (mu_stream_shutdown): Flush the buffers before
      shutting the transport down.
      
      * libmailutils/tests/fltst.c (main): New option bufsize=
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * TODO: Update.
      * include/mailutils/sieve.h (mu_sieve_library_path_prefix): New variable.
      * libmu_argp/sieve.c (sieve_argp_option): New option --libdir-prefix.
      (sieve_argp_parser): Handle --libdir-prefix.
      * libmu_cfg/sieve.c (cb_library_path_prefix): New callback.
      (mu_sieve_param): New statement "library-path-prefix".
      * libmu_sieve/conf.c (mu_sieve_library_path_prefix): New variable.
      (mu_sieve_module_init): Process prefix paths.
      Do not call mu_sv_load_add_path.
      * libmu_sieve/load.c (sieve_init_load_path): Rewrite.
      (mu_sv_load_add_path): Remove.
      * libmu_sieve/sieve-priv.h (mu_sv_load_add_path): Remove declaration.
      (sieve_searchpath): Remove the unused "add" parameter.
      * sieve/tests/moderator.at: Use MUT_SIEVE_OPTIONS in all tests.
      * sieve/tests/testsuite.at (MUT_SIEVE_EXT_TEST): Use --libdir-prefix
      option to ensure that our version of the extension appears first in
      the path.
      Sergey Poznyakoff authored
    • * libmailutils/stream/fltstream.c (filter_ctl): MU_IOCTL_TRANSPORT
      returns filter transport stream.
      * libproto/pop/pop3_rdlist.c (mu_pop3_stream_to_list): Make sure
      status is initialized and reflects the actual status.
      * libproto/pop/pop3_stream.c (mu_pop3_filter_create): Do not unref
      transport stream, it is done by the caller.
      Sergey Poznyakoff authored
  4. 21 Dec, 2010 1 commit
    • * am/enable.m4 (MU_ENABLE_SUPPORT): Add the additional-cond argument.
      (MU_ENABLE_BUILD): Likewise.
      * configure.ac: Update 4th args in calls to MU_ENABLE_SUPPORT.
      Do not use MU_ENABLE_BUILD within conditionals, use additional-cond
      instead.
      * libmailutils/stream/mapfile_stream.c: Include sys/stat.h
      Sergey Poznyakoff authored
  5. 20 Dec, 2010 1 commit
    • * include/mailutils/debug.h (mu_debug_format_spec): New function.
      
      * include/mailutils/stream.h (MU_IOCTL_SYSLOGSTREAM)
      (MU_IOCTL_FILTER): New ioctls.
      (MU_IOCTL_LOGSTREAM_GET_SEVERITY_MASK)
      (MU_IOCTL_LOGSTREAM_SET_SEVERITY_MASK)
      (MU_IOCTL_LOGSTREAM_CLONE)
      (MU_IOCTL_SYSLOGSTREAM_SET_LOGGER)
      (MU_IOCTL_SYSLOGSTREAM_GET_LOGGER)
      (MU_IOCTL_FILTER_GET_DISABLED)
      (MU_IOCTL_FILTER_SET_DISABLED): And their opcodes.
      * include/mailutils/sys/filter.h (_MU_FILTER_DISABLED)
      (_MU_FILTER_EOF): New defines.
      (_mu_filter_stream) <eof>: Replace with fltflag (a bitmask).
      * include/mailutils/sys/logstream.h (_mu_log_stream) <sevmask>: New
      member.
      * include/mailutils/sys/syslogstream.h (_mu_syslog_stream) <logger>: New
      member.
      * include/mailutils/util.h (mu_onexit_run): New proto.
      * libmailutils/base/onexit.c (_mu_onexit_run): Extra safety check.
      (mu_onexit_run): New function.
      (mu_debug_level_str): New static.
      (mu_debug_format_spec): New function.
      * libmailutils/stream/fltstream.c (filter_read, filter_write): Bypass the
      xcoder if _MU_FILTER_DISABLED is set.
      Use fltflag instead of the removed eof.
      (filter_ctl): Handle MU_IOCTL_FILTER.
      * libmailutils/stream/logstream.c (_log_write): The sevmask member
      masks out severity prefix output for certain severities.
      (_log_ctl): Handle new opcodes (see above).
      * libmailutils/stream/syslogstream.c (_syslog_stream_write): Use
      <logger>, if supplied, instead of the system syslog(3).
      (_syslog_ctl): Handle MU_IOCTL_SYSLOGSTREAM.
      (mu_syslog_stream_create): Initialize logger to NULL.
      * mu/ldflags.c (lib_descr): Protect entries with the
      corresponding #ifdef ENABLE_whatever.
      Sergey Poznyakoff authored
  6. 19 Dec, 2010 5 commits
    • Sergey Poznyakoff authored
    • * include/mailutils/sys/amd.h (_amd_message_lookup_or_insert): New proto.
      * libmailutils/base/amd.c (_amd_message_lookup_or_insert): New function.
      (_amd_message_insert): Rewrite using _amd_message_lookup_or_insert.
      * libproto/maildir/mbox.c (maildir_message_cmp): Stop comparison on
      ':'.
      (maildir_message_lookup): Remove.
      (maildir_scan_dir): Use _amd_message_lookup_or_insert.
      
      * po/POTFILES.in: Update.
      Sergey Poznyakoff authored
    • * include/mailutils/debug.h (mu_debug_log_nl): New proto.
      * libmailutils/diag/debug.c (mu_debug_log_nl): New function.
      * libmailutils/mailer/progmailer.c: Use mu_debug_log_nl.
      * libmailutils/server/acl.c: Likewise.
      Also, use MU_DEBUG_TRACE9 instead of the numeric value.
      
      * libmailutils/filter/iconvflt.c (_iconv_filter): Register encoder
      (same as decoder).
      Sergey Poznyakoff authored
    • * libmu_sieve/extensions/pipe.c: Allow to specify which parts of the
      message should be piped.
      Implement "pipe" test.
      * sieve/tests/pipeact.at: New file.
      * sieve/tests/pipetest.at: New file.
      * sieve/tests/Makefile.am (TESTSUITE_AT): Add pipeact.at
      and pipetest.at
      * sieve/tests/testsuite.at: Include pipeact.at
      and pipetest.at
      (MUT_SIEVE_EXT_TEST): Redefine MUT_SIEVE_OPTIONS.
      Set envar "cwd".
      Use cat and heredoc to create prog, instead of using AT_DATA.
      * sieve/tests/moderator.at: Update to these changes.
      Sergey Poznyakoff authored
  7. 17 Dec, 2010 4 commits
    • * libmu_sieve/util.c (mu_sieve_error): Fix typo.
      Sergey Poznyakoff authored
    • * libmu_sieve/extensions/moderator.c: Implement the :program tag.
      Use _sget_ functions to reduce memory requirements.
      * sieve/tests/moderator.mbox: New file.
      * sieve/tests/moderator.at: New file.
      * sieve/tests/Makefile.am (EXTRA_DIST): Add moderator.mbox.
      (TESTSUITE_AT): Add moderator.at
      * sieve/tests/testsuite.at (MUT_SIEVE_EXT_NAME): New define.
      (MUT_SIEVE_EXT_TEST): New macro.
      Include moderator.at.
      Sergey Poznyakoff authored
    • * imap4d/util.c (set_xscript_level): Fix typo.
      Sergey Poznyakoff authored
    • * libmailutils/auth/mu_auth.c: Fix mu_debug calls. Use different levels.
      
      Remove --debug-auth option.  Users should use --debug-level=auth instead.
      
      * libmu_argp/auth.c: Remove.
      * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove auth.c
      * include/mailutils/libargp.h (mu_auth_cmdline): Remove.
      * libmu_argp/cmdline.c (all_cmdline_capa): Remove mu_auth_cmdline.
      Sergey Poznyakoff authored
  8. 16 Dec, 2010 2 commits
    • * am/enable.m4 (MU_ENABLE_SUPPORT): Fix the usage of the last argument.
      * configure.ac: Check for --enable-experimental before any other checks.
      Mark cxx, python and nntp as experimental.
      * mh/tests/mhn.at: Make sure all mailboxes are writable.
      * mh/tests/testsuite.at (MTSTAILOR): Fix mailer URL.
      * po/POTFILES.in: Comment out unused sources.
      Sergey Poznyakoff authored
    • * include/mailutils/cpp/debug.h: Remove.
      * include/mailutils/cpp/Makefile.am (cppinclude_HEADERS): Remove debug.h
      * libmu_cpp/debug.cc: Remove
      * libmu_cpp/Makefile.am (libmu_cpp_la_SOURCES): Remove debug.cc.
      * python/libmu_py/debug.c: Remove.
      * python/libmu_py/Makefile.am (libmu_py_la_SOURCES): Remove debug.c
      * include/mailutils/cpp/mailbox.h: Remove objects and methods derived
      from mu_debug_t.
      * include/mailutils/cpp/mailer.h: Likewise.
      * include/mailutils/cpp/stream.h: Likewise.
      * libmu_cpp/mailbox.cc: Likewise.
      * libmu_cpp/mailer.cc: Likewise.
      * libmu_cpp/sieve.cc: Likewise.  Ditto for mu_sieve_printf_t,
      mu_sieve_parse_error_t.
      * include/mailutils/cpp/sieve.h: Likewise.
      
      * libmu_cpp/stream.cc: Remove objects and methods derived
      from mu_debug_t.
      (ProgStream::ProgStream): Use mu_command_stream_create (see FIXME).
      (FilterProgStream::FilterProgStream): Rewrite.
      
      * include/mailutils/python.h: Remove objects and methods derived
      from mu_debug_t.
      * python/libmu_py/filter.c (api_filter_iconv_create): Rewrite using
      mu_filter_create_args.
      
      * python/libmu_py/libmu_py.c: Likewise.
      * python/libmu_py/libmu_py.h: Likewise.
      * python/libmu_py/mailbox.c: Likewise.
      * python/libmu_py/mailer.c: Likewise.
      * python/libmu_py/stream.c: Likewise.
      * python/libmu_py/url.c: Likewise.
      * python/libmu_py/sieve.c: Likewise.  Same for mu_sieve_printf_t,
      mu_sieve_parse_error_t.
      Sergey Poznyakoff authored
  9. 13 Dec, 2010 2 commits
    • Callers should use mu_filter_create_args instead.
      
      * examples/iconv.c: Rewrite using mu_filter_create_args.
      * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use mu_decode_filter.
      
      * imap4d/imap4d.h: Include prog.h
      * include/mailutils/filter.h (mu_filter_iconv_create): Mark as deprecated.
      * include/mailutils/util.h (mu_decode_filter_args): New proto.
      * libmailutils/base/msgid.c (mu_rfc2822_in_reply_to): Silence a
      cast warning.
      * libmailutils/tests/wicket.c (match_string): Likewise.
      * libmailutils/filter/decode.c (mu_decode_filter_args): New function.
      (mu_decode_filter): Rewrite as an alternative entry point to
      mu_decode_filter_args.
      * ibmailutils/filter/filter_iconv.c: Remove.
      * libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Remove
      filter_iconv.c
      * libmu_compat/filter_iconv.c: New file.
      * libmu_compat/Makefile.am (libmu_compat_la_SOURCES): Add filter_iconv.c
      
      * libmailutils/filter/iconvflt.c (_icvt_decoder): Set errcode
      before returning failure.
      
      * libmailutils/stream/fltstream.c (init_iobuf, filter_stream_init): Provide
      a default value for io->errcode.
      Sergey Poznyakoff authored
    • * include/mailutils/filter.h (mu_iconv_filter): New extern.
      * libmailutils/filter/iconvflt.c: New file.
      * libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add iconvflt.c
      * libmailutils/filter/filter.c (mu_filter_get_list): Register
      mu_iconv_filter.
      Sergey Poznyakoff authored
  10. 11 Dec, 2010 4 commits