1. 05 Dec, 2010 1 commit
    • The mu_debug_t object and associated functions have been removed.
      New debugging functions are based on the logstream interface.
      
      * include/mailutils/debug.hm4: Remove.
      * include/mailutils/debug.h: New file.
      * include/mailutils/Makefile.am (BUILT_SOURCES,EXTRA_DIST): Remove debug.h,
      debug.hm4.
      
      * mu-aux/debugdef.m4: Remove.
      * mu-aux/debcat.awk: New file.
      * mu-aux/Makefile.am (EXTRA_DIST): Replace debugdef.m4 with debcat.awk.
      
      * include/mailutils/sys/dbgstream.h: Remove.
      * include/mailutils/sys/debug.h: Remove.
      * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Remove debug.h
      and dbgstream.h, add debcat.h
      * include/mailutils/sys/.gitignore: Add debcat.h.
      
      * libmailutils/diag/dbgstderr.c: Remove.
      * libmailutils/diag/dbgsyslog.c: Remove.
      * libmailutils/diag/gdebug.c: Remove.
      * libmailutils/diag/debcat: New file.
      * libmailutils/diag/Makefile.am (libdiag_la_SOURCES): Remove these
      sources.
      * libmailutils/diag/debug.c: Rewrite from scratch.
      * libmailutils/diag/diag.c: Rewrite from scratch.
      
      * libmailutils/diag/syslog.c (mu_diag_syslog_printer): Remove function.
      (mu_log_syslog, mu_log_print_severity): New variables.
      
      * libmailutils/stream/dbgstream.c: Remove.
      * libmailutils/stream/Makefile.am (libstream_la_SOURCES): Remove dbgstream.c..
      * libmailutils/stdstream/Makefile.am (libstdstream_la_SOURCES): Add
      dbgstream.c.
      * libmailutils/stream/logstream.c (_mu_severity_str): Change strings
      to lower case.
      (_log_write): Improve handling of unrecognized escapes.
      (_log_ctl): Handle MU_LOGSTREAM_ADVANCE_LOCUS_LINE and
      MU_LOGSTREAM_ADVANCE_LOCUS_COL.
      
      * libmailutils/mailbox/folder.c (mu_folder_has_debug)
      (mu_folder_get_debug, mu_folder_set_debug): Remove functions.
      
      * mu-aux/debcat.awk: New file.
      * libmailutils/stdstream/dbgstream.c: New file.
      
      * comsat/action.c: Use new debug/log functions.
      * comsat/comsat.c: Likewise.
      * examples/aclck.c: Likewise.
      * examples/echosrv.c: Likewise.
      * examples/msg-send.c: Likewise.
      * examples/nntpclient.c: Likewise.
      * examples/numaddr.c: Likewise.
      * frm/common.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * imap4d/io.c: Likewise.
      * imap4d/util.c: Likewise.
      * libmailutils/auth/mu_auth.c: Likewise.
      * libmailutils/base/amd.c: Likewise.
      * libmailutils/cfg/driver.c: Likewise.
      * libmailutils/cfg/format.c: Likewise.
      * libmailutils/cfg/lexer.l: Likewise.
      * libmailutils/cfg/parser.y: Likewise.
      * libmailutils/mailbox/mailbox.c: Likewise.
      * libmailutils/mailbox/mbx_default.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/mailer/progmailer.c: Likewise.
      * libmailutils/server/acl.c: Likewise.
      * libmailutils/server/ipsrv.c: Likewise.
      * libmailutils/server/msrv.c: Likewise.
      * libmailutils/tests/wicket.c: Likewise.
      * libmu_argp/auth.c: Likewise.
      * libmu_argp/cmdline.c: Likewise.
      * libmu_argp/common.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_cfg/acl.c: Likewise.
      * libmu_cfg/auth.c: Likewise.
      * libmu_cfg/common.c: Likewise.
      * libmu_cfg/ldap.c: Likewise.
      * libmu_cfg/sieve.c: Likewise.
      * libmu_cfg/sql.c: Likewise.
      * libmu_scm/mu_message.c: Likewise.
      * libmu_sieve/prog.c: Likewise.
      * libmu_sieve/runtime.c: Likewise.
      * libproto/imap/trace.c: Likewise.
      * libproto/mailer/mbox.c: Likewise.
      * libproto/mailer/prog.c: Likewise.
      * libproto/mailer/sendmail.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mailer/smtp_trace.c: Likewise.
      * libproto/mbox/folder.c: Likewise.
      * libproto/mbox/mbox.c: Likewise.
      * libproto/nntp/folder.c: Likewise.
      * libproto/nntp/nntp_debug.c: Likewise.
      * libproto/pop/mbox.c: Likewise.
      * libproto/pop/pop3_trace.c: Likewise.
      * maidag/guile.c: Likewise.
      * maidag/lmtp.c: Likewise.
      * maidag/maidag.c: Likewise.
      * maidag/util.c: Likewise.
      * mail/mail.c: Likewise.
      * mail/mailvar.c: Likewise.
      * mail/send.c: Likewise.
      * mail/source.c: Likewise.
      * mh/mh_argp.c: Likewise.
      * mh/send.c: Likewise.
      * mimeview/mimeview.c: Likewise.
      * movemail/movemail.c: Likewise.
      * mu/wicket.c: Likewise.
      * pop3d/extra.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      * testsuite/mimetest.c: Likewise.
      
      * libmu_sieve/sieve-priv.h (mu_sieve_machine) <parse_error_printer>
      <error_printer, debug_printer, debug>: Remove.
      <errstream>: New member.
      (mu_sv_compile_error, mu_sv_print_value_list)
      (mu_sv_print_tag_list): Change prototypes.
      
      * libmu_sieve/actions.c: Use new sieve debug functions.
      * libmu_sieve/extensions/list.c: Likewise.
      * libmu_sieve/extensions/moderator.c: Likewise.
      * libmu_sieve/extensions/pipe.c: Likewise.
      * libmu_sieve/extensions/spamd.c: Likewise.
      * libmu_sieve/extensions/timestamp.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libmu_sieve/sieve.y : Likewise.
      * libmu_sieve/sieve.l: Likewise.
      * libmu_sieve/tests.c: Likewise.
      * libmu_sieve/util.c: Rewrite diagnostic support.
      * /maidag/sieve.c: Use new debug/log and sieve diagnostic functions.
      
      * mu/mu.c (main): Remove call to mu_stdstream_setup. It is called
      by mu_app_init now.
      
      * libmailutils/base/wicket.c (mu_wicket_stream_match_url): Change signature.
      * libmailutils/cfg/gocs.c (mu_gocs_logging_init): Rewrite.
      * libmailutils/mailbox/message.c (mu_message_save_to_mailbox): Remove
      mu_debug_t argument.
      * libmailutils/stdstream/basestr.c (mu_stdstream_setup): Minor fixes.
      * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Do
      not install filter stream if tag is NULL.
      (mu_stdstream_strerr_setup): New function.
      * libmu_argp/muinit.c (mu_app_init): Set mu_log_tag.
      Call mu_stdstream_setup.
      * libmu_scm/mu_dbgport.c: Rewrite port support.
      
      * include/mailutils/acl.h (mu_acl_get_debug)
      (mu_acl_set_debug): Remove prototypes.
      * include/mailutils/auth.h (mu_wicket_stream_match_url): Change signature.
      * include/mailutils/cfg.h (mu_cfg_locus_t): Remove typedef, use
      struct mu_locus instead.
      (mu_cfg_locus): Remove declaration.
      (mu_cfg_node)<locus>: Change type.
      (mu_cfg_node)<debug>: Remove.
      (mu_cfg_vperror,mu_cfg_perror)
      (mu_cfg_parse_error,mu_cfg_format_error): Remove prototypes.
      (mu_cfg_callback_t): Change signature.  All uses updated.
      (mu_cfg_get_debug): Remove prototype.
      (mu_cfg_assert_value_type, mu_cfg_string_value_cb): Change signature.
      (mu_cfg_tree_set_debug): Remove prototype.
      (mu_cfg_tree_create_node): Change signature.
      * include/mailutils/diag.h (MU_DIAG_): Redefine via MU_LOG_ constants.
      (mu_diag_get_debug,mu_diag_set_debug): Remove.
      (mu_diag_cont_vprintf, mu_diag_cont_printf)
      (mu_diag_at_locus): New functions.
      * include/mailutils/folder.h (mu_folder_has_debug)
      (mu_folder_get_debug, mu_folder_set_debug): Remove prototypes.
      * include/mailutils/gocs.h (mu_gocs_logging): Remove structure.
      (mu_gocs_debug)<errpfx>: Remove.
      * include/mailutils/guile.h (mu_scm_make_debug_port): Change prototype.
      * include/mailutils/mailbox.h (mu_mailbox_has_debug)
      (mu_mailbox_get_debug,mu_mailbox_set_debug): Remove.
      * include/mailutils/mailer.h (mu_mailer_get_debug)
      (mu_mailer_set_debug): Remove.
      * include/mailutils/message.h (mu_message_save_to_mailbox): Change
      signature.
      * include/mailutils/mu_auth.h (mu_auth_set_debug): Remove proto.
      * include/mailutils/nntp.h (mu_nntp_set_debug): Remove.
      * include/mailutils/progmailer.h (mu_progmailer_set_debug): Remove proto.
      * include/mailutils/server.h (mu_ip_server_set_debug)
      (mu_ip_server_get_debug): Remove proto.
      
      * include/mailutils/sieve.h (mu_sieve_locus_t): Remove.
      Use struct mu_locus instead.
      (mu_sieve_printf_t, mu_sieve_parse_error_t): Remove.
      (mu_sieve_action_log_t): Change signature.
      (mu_sieve_machine_init): Change signature.
      (mu_sieve_machine_init_ex): New function.
      (mu_sieve_get_diag_stream)
      (mu_sieve_set_diag_stream): New functions.
      (mu_sieve_set_data): New function.
      (mu_sieve_get_locus): Change signature.
      (mu_sieve_set_error,mu_sieve_set_parse_error)
      (mu_sieve_set_debug,mu_sieve_set_debug_object): Remove protos.
      * include/mailutils/stdstream.h (mu_stdstream_strerr_setup): New proto.
      * include/mailutils/stream.h (MU_LOGSTREAM_ADVANCE_LOCUS_LINE)
      (MU_LOGSTREAM_ADVANCE_LOCUS_COL): New ioctls.
      (mu_dbgstream_create): Change signature.
      * include/mailutils/sys/folder.h (_mu_folder) <debug>: Remove.
      * include/mailutils/sys/mailbox.h (_mu_mailbox) <debug>: Remove.
      * include/mailutils/sys/mailer.h (_mu_mailer) <debug>: Remove.
      * include/mailutils/sys/nntp.h (_mu_nntp) <debug>: Remove.
      * include/mailutils/syslog.h (mu_log_syslog)
      (mu_log_print_severity): New externs.
      * include/mailutils/types.hin (_mu_debug, mu_debug_t): Remove.
      * lib/tcpwrap.h: Remove unused prototypes.
      
      * imap4d/imap4d.h: Include mailutils/stdstream.h
      * mail/mail.h: Likewise.
      * pop3d/pop3d.h: Likewise.
      
      * mh/comp.c (main): Bugfix.
      
      * po/POTFILES.in: Update.
      * TODO: Update.
      Sergey Poznyakoff authored
  2. 01 Dec, 2010 1 commit
    • * imap4d/lsub.c (imap4d_lsub): Fix untagged responses.
      * imap4d/imap4d.h (make_interdir): New proto.
      * imap4d/create.c (mkdir_p): Remove function.
      (MKDIR_PERMISSIONS): Move macro definition to imap4d.h
      (imap4d_create): Use make_interdir instead of mkdir_p.
      * imap4d/rename.c (make_interdir): New function.
      (imap4d_rename): Create intermediate directories as required
      by RFC 3501.
      Issue additional diagnostics if rename fails.
      Fix OK response text.
      * imap4d/imap4d.c (imap4d_mainloop): Implement idle timeout.
      * imap4d/bye.c (imap4d_bye0): Reset the SIGPIPE before sending
      the OK response in order to avoid recursion.
      
      Unrelated changes:
      
      * maidag/tests/forward.at: Fix the expected reply (see f5374bc2).
      Sergey Poznyakoff authored
  3. 02 Nov, 2010 1 commit
  4. 30 Oct, 2010 1 commit
    • * libmailutils/string/wordsplit.c (mu_wordsplit_init): Call
      mu_wordsplit_free_words to reclaim the memory.
      (mu_wordsplit_free_words): New function.
      (mu_wordsplit_free): Use mu_wordsplit_free_words.
      
      * imap4d/imap4d.c (imap4d_session_setup0): Use wordsplit instead of
      vartab.
      * imap4d/imap4d.h: Don't include vartab.h.
      * imap4d/preauth.c (do_preauth_ident): Use mu_str_stripws instead of
      the static trimcrlf, which is removed.
      (do_preauth_program): Use wordsplit instead of
      vartab and mu_prog_stream_create instead of popen.
      * libmailutils/mailbox/mbx_default.c: Include nls.h
      Don't include vartab.h
      (mu_construct_user_mailbox_url): Use wordsplit instead of
      vartab.
      * libmailutils/server/acl.c (expand_arg): Use wordsplit instead of
      vartab.
      * libmu_auth/ldap.c (_mu_ldap_search):L Likewise.
      * libmu_auth/radius.c (_expand_query): Likewise.
      * libmu_auth/sql.c (mu_sql_expand_query): Likewise.
      * libproto/mailer/prog.c (_expand_sender, _expand_rcpt): Rewrite.
      (url_to_argv): : Use wordsplit instead of
      vartab.
      
      * po/POTFILES.in: Add more files.
      Sergey Poznyakoff authored
  5. 26 Oct, 2010 1 commit
    • The purpose is to make it modular and flexible.  URLs are
      parsed out as they are created.  Missing URL parts can be
      supplied via a "URL hint" at creation time (similar to
      the approach used in creating mu_address_t).  Ports
      can be specified either as numbers or as service names.
      Original port string representation can be retrieved from
      the URL, as well as its numeric value.
      
      * libmailutils/url/accessor.h: New file.
      * libmailutils/url/copy.c: New file.
      * libmailutils/url/create.c: New file.
      * libmailutils/url/decode.c: New file.
      * libmailutils/url/destroy.c: New file.
      * libmailutils/url/dup.c: New file.
      * libmailutils/url/expand.c: New file.
      * libmailutils/url/flag.c: New file.
      * libmailutils/url/get-auth.c: New file.
      * libmailutils/url/get-host.c: New file.
      * libmailutils/url/get-param.c: New file.
      * libmailutils/url/get-path.c: New file.
      * libmailutils/url/get-portstr.c: New file.
      * libmailutils/url/get-query.c: New file.
      * libmailutils/url/get-scheme.c: New file.
      * libmailutils/url/get-secret.c: New file.
      * libmailutils/url/get-user.c: New file.
      * libmailutils/url/match.c: New file.
      * libmailutils/url/port.c: New file.
      * libmailutils/url/scheme.c: New file.
      * libmailutils/url/uplevel.c: New file.
      * libmailutils/url/urlstr.c: New file.
      
      * configure.ac (AC_CONFIG_FILES): Add libmailutils/url/Makefile
      * libmailutils/Makefile.am (SUBDIRS): Add url.
      (libmailutils_la_LIBADD): Link with liburl.
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove url.c
      * libmailutils/base/url.c: Remove.
      
      * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add xdecode.c
      * libmailutils/string/xdecode.c: New file.
      
      * include/mailutils/sys/url.h (_mu_url): Change type to short.
      <_get_port>: Change second argument to unsigned.
      <_get_portstr>: New method.
      * include/mailutils/url.h (MU_URL_SCHEME): New flag.
      (MU_URL_PARSE_HEXCODE, MU_URL_PARSE_HIDEPASS)
      (MU_URL_PARSE_PORTSRV, MU_URL_PARSE_PORTWC)
      (MU_URL_PARSE_PIPE, MU_URL_PARSE_SLASH): New flags.
      (mu_url_create_hint, mu_url_copy_hints): New prototypes.
      (mu_url_parse): Remove.
      (mu_url_get_port): Change second argument to unsigned.
      (mu_url_decode_len,mu_url_decode): Remove.
      (mu_url_decode): New proto.
      (mu_url_sget_portstr, mu_url_aget_portstr)
      (mu_url_get_portstr): New protos.
      
      * include/mailutils/util.h (mu_str_url_decode)
      (mu_str_url_decode_inline): New protos.
      * libproto/pop/mbox.c (pop_open): Port is unsigned.
      
      * libproto/imap/folder.c: Use MU_URL_SCHEME in url_may_have.
      * libproto/maildir/folder.c: Likewise.
      * libproto/mailer/prog.c: Likewise.
      * libproto/mailer/remote.c: Likewise.
      * libproto/mailer/sendmail.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mbox/folder.c: Likewise.
      * libproto/mh/folder.c: Likewise.
      * libproto/nntp/folder.c: Likewise.
      * libproto/pop/folder.c: Likewise.
      
      * imap4d/imap4d.c: Remove calls to mu_url_parse.
      * libmailutils/base/registrar.c: Likewise.
      * libmailutils/base/wicket.c: Likewise.
      * libmailutils/mailbox/folder.c: Likewise.
      * libmailutils/mailbox/mailbox.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/tests/url-parse.c: Likewise.
      * libmailutils/tests/wicket.c: Likewise.
      * libproto/mailer/smtp_auth.c: Likewise.
      * maidag/deliver.c: Likewise.
      * mu/wicket.c: Likewise.
      
      * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use
      mu_str_url_decode, instead of mu_url_decode.
      * libmailutils/stream/tcp.c (_tcp_instance)<port>: Change type
      to unsigned short. All uses updated.
      (mu_tcp_stream_create_with_source_ip)
      (mu_tcp_stream_create_with_source_host)
      (mu_tcp_stream_create): Port is unsigned.
      * include/mailutils/stream.h (mu_tcp_stream_create_with_source_ip)
      (mu_tcp_stream_create_with_source_host)
      (mu_tcp_stream_create): Port is unsigned.
      * include/mailutils/cpp/url.h (get_port): Return unsigned.
      * libmu_cpp/url.cc (get_port): Return unsigned.
      (parse): Empty function. Schedule for removal.
      * python/libmu_py/url.c (api_url_parse): Empty function.
      Schedule for removal.
      (api_url_get_port): Port is unsigned.
      
      * libmailutils/base/wicket.c (mu_wicket_file_match_url)
      (mu_wicket_file_match_url): New parameter: parse_flags.
      * mu/wicket.c (wicket_match): Use parse_flags to control
      whether or not to show the plaintext password.
      
      * doc/texinfo/url.texi: Update.
      Sergey Poznyakoff authored
  6. 09 Oct, 2010 1 commit
  7. 25 Sep, 2010 1 commit
    • * imap4d/imap4d.c (imap4d_mainloop): Take two file descriptor as
      arguments.  All uses updated.
      * imap4d/imap4d.h (io_setio): Change signature.
      * imap4d/io.c (io_setio): Take two file descriptor as
      arguments.  All uses updated.
      * pop3d/extra.c (pop3d_setio): Take two file descriptor as
      arguments.  All uses updated.
      * pop3d/pop3d.c (pop3d_mainloop): Likewise.
      * pop3d/pop3d.h (pop3d_setio): Change signature.
      Sergey Poznyakoff authored
  8. 12 Sep, 2010 1 commit
    • * imap4d/quota.c: New file.
      * imap4d/Makefile.am (imap4d_SOURCES): Add quota.c
      * imap4d/append.c (imap4d_append0): Refuse to append if
      the quota is exceeded or would be exceeded after completing
      the operation.
      * imap4d/copy.c (imap4d_copy0): Refuse to copy messages if
      the quota is exceeded or would be exceeded after completing
      the operation.
      Return a meaningful textual description.
      Attempt to restore mailbox to its original size if the operation failed.
      * imap4d/imap4d.c (imap4d_session_setup0): Call quota_setup.
      * imap4d/imap4d.h (quota_setup, quota_check, quota_update): New functions.
      
      * include/mailutils/folder.h (mu_list_response) <format>: New member.
      * include/mailutils/mailbox.h (mu_mailbox_create_from_record): New
      function.
      * include/mailutils/types.hin (MU_FOLDER_ATTRIBUTE_LINK): New flag.
      * libproto/mbox/folder.c (list_helper): Do not return symbolic links
      unless MU_FOLDER_ATTRIBUTE_LINK is set.
      Fill in the resp->format member.
      * mailbox/mailbox.c (_mailbox_create_from_record): New static function.
      (_create_mailbox0): Rewrite as a wrapper over _mailbox_create_from_record.
      (mu_mailbox_create_from_record): New function.
      Sergey Poznyakoff authored
  9. 08 Sep, 2010 4 commits
    • * include/mailutils/stream.h (MU_IOCTL_LEVEL): New ioctl op.
      (XSCRIPT_NORMAL, XSCRIPT_SECURE, XSCRIPT_PAYLOAD): New constants.
      * include/mailutils/sys/xscript-stream.h (_mu_xscript_stream)
      <level>: New member.
      * mailbox/xscript-stream.c (TRANS_DISABLED): New flag.
      (print_transcript): Amount of output varies depending on the
      current output level.  For secure data, try to recognize passwords
      and to replace them with *** on output.
      (_xscript_ctl): Support MU_IOCTL_LEVEL.
      * pop3d/extra.c (set_xscript_level): New function.
      * pop3d/pop3d.h (set_xscript_level): New proto.
      * pop3d/retr.c (pop3d_retr): Set XSCRIPT_PAYLOAD level before
      sending actual data and reset it to XSCRIPT_NORMAL afterwards.
      * pop3d/top.c (pop3d_top): Likewise.
      * pop3d/user.c: Set XSCRIPT_SECURE level while expecting the
      PASS command.
      
      * imap4d/fetch.c (imap4d_fetch): Run imap4d_fetch0 in XSCRIPT_PAYLOAD
      level.
      * imap4d/uid.c (imap4d_uid): Likewise.
      * imap4d/imap4d.c (imap4d_mainloop): Unless started in preauth mode,
      select XSCRIPT_SECURE mode until authentication has been passed.
      * imap4d/imap4d.h (set_xscript_level): New proto.
      * imap4d/io.c (io_format_completion_response): Switch to XSCRIPT_NORMAL
      level when changing to the authenticated state.
      (imap4d_readline): Read literals in XSCRIPT_PAYLOAD level.
      * imap4d/util.c (set_xscript_level): New function.
      
      * include/mailutils/pop3.h (mu_pop3_trace_mask): New prototype.
      (MU_POP3_XSCRIPT_MASK): New macro.
      (_mu_pop3_xscript_level): New proto.
      * libproto/pop/pop3_pass.c (mu_pop3_pass): Set XSCRIPT_SECURE
      while sending the password.
      * libproto/pop/pop3_retr.c (mu_pop3_retr): Set XSCRIPT_PAYLOAD before
      going to MU_POP3_RETR_RX state.
      * libproto/pop/pop3_stream.c (_pop3_event_cb): Set XSCRIPT_NORMAL.
      * libproto/pop/pop3_top.c (mu_pop3_top): Set XSCRIPT_PAYLOAD before
      going to MU_POP3_TOP_RX state.
      * libproto/pop/pop3_trace.c (mu_pop3_trace_mask)
      (_mu_pop3_xscript_level): New functions.
      * libproto/pop/mbox.c (pop_open): Set trace masks depending on the
      trace6 and trace7 debug levels.
      
      * examples/pop3client.c (com_verbose): Allow to mask/unmask transcript
      levels.
      Sergey Poznyakoff authored
    • * mailbox/fltstream.c (filter_wr_flush): Fix erroneous conditional.
      (filter_wait): New method.
      (mu_filter_stream_create): Set wait method.
      
      * imap4d/io.c: New source.
      * imap4d/Makefile.am: Add io.c
      * imap4d/*: Update I/O function calls.
      Sergey Poznyakoff authored
    • * include/mailutils/libargp.h (mu_program_version_hook): New proto.
      * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove mu_argp.h.
      * libmu_argp/mu_argp.h: Remove.
      * libmu_argp/muinit.c [MU_ALPHA_RELEASE]: Include git-describe.h
      (mu_program_version_hook): New function.
      (mu_argp_init): Set mu_program_version_hook, unless vers is given.
      
      * comsat/comsat.c (main): Call mu_argp_init with NULL arguments.
      * config/mailutils-config.c: Likewise.
      * dotlock/dotlock.c: Likewise.
      * examples/muauth.c: Likewise.
      * frm/frm.c: Likewise.
      * frm/from.c: Likewise.
      * guimb/main.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * maidag/maidag.c: Likewise.
      * mail/mail.c: Likewise.
      * messages/messages.c: Likewise.
      * mimeview/mimeview.c: Likewise.
      * movemail/movemail.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * pop3d/popauth.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      Sergey Poznyakoff authored
  10. 26 May, 2010 1 commit
    • Delivery of a signal when a previous signal was being handled caused
      mailbox corruption.
      
      * imap4d/imap4d.c (imap4d_child_signal_setup): New function.
      (imap4d_mainloop): Call imap4d_child_signal_setup.
      * imap4d/signal.c (imap4d_child_signal): Reset all signal handlers
      before doing actual job.
      * lib/signal.c (mu_set_signals): Use sigaction.
      Sergey Poznyakoff authored
  11. 21 Feb, 2010 1 commit
    • * include/mailutils/cfg.h (mu_cfg_node)
      <next,node>: Remove members.
      <nodes>: New member.
      (mu_cfg_tree)<head,tail>: Remove.
      <nodes>: New member.
      (mu_cfg_iter_closure): New struct.
      (mu_cfg_preorder): Change prototype.
      (mu_cfg_postorder): Remove.
      (mu_cfg_create_node_list): New proto.
      (mu_cfg_tree_create_node): Change signature.
      (mu_cfg_tree_add_nodelist): New proto.
      (mu_cfg_find_node): Change signature.
      * include/mailutils/libargp.h (mu_argp_node_list): Remove struct.
      (mu_argp_node_list_init, mu_argp_node_list_add)
      (mu_argp_node_list_new, mu_argp_node_list_finish): Change signature.
      * libmu_argp/cmdline.c (mu_argp_node_list_init, mu_argp_node_list_add)
      (mu_argp_node_list_new, mu_argp_node_list_finish): Take mu_list_t as
      the nodelist argument.
      
      * mailbox/cfg_parser.y (parse_head,parse_tail): Remove.
      (parse_node_list): New static, used instead of the above.
      All uses updated.
      (mu_cfg_alloc_node): Last argument is mu_list_t.
      (mu_cfg_create_node_list): New function.
      (mu_cfg_tree_postprocess): Rewrite.
      (mu_cfg_preorder): Rewrite.
      (mu_cfg_postorder): Remove.
      (mu_cfg_destroy_tree): Use mu_list_destroy to free
      the node list.
      (mu_cfg_scan_tree): Update calls to mu_cfg_preorder.
      (mu_cfg_tree_add_node): Rewrite.
      (mu_cfg_tree_add_nodelist): New function.
      (mu_cfg_find_node): Change type of the first argument.
      (mu_cfg_create_subtree): Rewrite.
      
      * mailbox/cfg_format.c (mu_cfg_format_parse_tree)
      (mu_cfg_format_node): Use new mu_cfg_preorder function.
      
      * libmu_argp/common.c: Update calls to mu_argp_node_ functions.
      * libmu_argp/auth.c: Likewise.
      * comsat/comsat.c: Likewise.
      * config/mailutils-config.c: Likewise.
      * dotlock/dotlock.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * libmu_argp/sieve.c: Likewise.
      * libmu_argp/tls.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
  12. 05 Jan, 2010 1 commit
  13. 27 Dec, 2009 1 commit
    • Remove obsolete options (these have been made hidden in
      v. 2.0).  Handle "include" and "program" after parsing
      the sources, not while reducing the tree, as was
      previously.  Retain, however, old functions for compatibility,
      making them deprecated.  Add "query" mode to mailutils-config.
      
      * include/mailutils/cfg.h (mu_cfg_node_tag): Remove
      (mu_cfg_statement): Rename to mu_cfg_node_statement.
      (mu_cfg_tree): New member: tail.
      (mu_cfg_perror): Change signature.
      (mu_cfg_vperror, mu_cfg_parse_error): New protos.
      (MU_CFG_PATH_DELIM, MU_CFG_PATH_DELIM_STR): New defines.
      (MU_PARSE_CONFIG_PLAIN,MU_CFG_FMT_LOCUS): New constant.
      (MU_CFG_DEPRECATED): New macro.
      (mu_parse_config,mu_get_config): Deprecated.
      (mu_cfg_format_parse_tree): Change signature.
      (mu_cfg_format_node, mu_cfg_parse_file): New protos.
      (mu_cfg_tree_free): Remove stale proto.
      (mu_cfg_find_node, mu_cfg_create_subtree): New protos.
      * include/mailutils/libcfg.h (mu_libcfg_parse_config): New proto.
      (mu_parse_config_files): Deprecated.
      
      * include/mailutils/mutil.h (mu_make_file_name): New proto.
      (mu_retrieve_fp, mu_register_retriever)
      (mu_retrieve): Remove unused prototypes.
      * include/mailutils/opool.h (mu_opool_union): New proto.
      
      * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove
      sources (see below):
      * po/POTFILES.in: Likewise.
      * libmu_argp/gsasl.c: Remove.
      * libmu_argp/pam.c: Remove.
      * libmu_argp/radius.c: Remove.
      * libmu_argp/sql.c: Remove.
      * libmu_argp/tls.c: Remove.
      * libmu_argp/virtdomain.c: Remove.
      
      * config/mailutils-config.c: New option --query (-q)
      (main): Handle query mode.
      
      * comsat/comsat.c: Define MU_CFG_COMPATIBILITY to suppress
      deprecation warnings.
      
      * bootstrap.conf (XGETTEXT_OPTIONS): Add mu_cfg
      error reporting functions.
      
      * mailbox/Makefile.am (libmailutils_la_SOURCES): Add
      mkfilename.c
      * mailbox/mkfilename.c: New file.
      
      * imap4d/imap4d.c: Remove obsolete option (hidden since 2.0)
      * libmu_argp/auth.c: Likewise.
      * libmu_argp/cmdline.c: Likewise.
      * libmu_argp/tls.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * libmu_argp/common.c: Likewise.
      (mu_common_argp_options): New option --set.
      
      * libmu_argp/muinit.c (mu_app_init): Rewrite using parse
      tree as a principal entity.
      * libmu_cfg/init.c (mu_libcfg_parse_config): New function.
      * mailbox/cfg_driver.c (make_file_name): Remove.
      (_cb_include): Use mu_make_file_name.
      (mu_build_container): Use deprecated code only unless MU_PARSE_CONFIG_PLAIN
      flag is set.
      (mu_cfg_tree_reduce): Do nothing if the tree is NULL.
      * mailbox/cfg_format.c (format_node): Print locus optionally.
      (mu_cfg_format_parse_tree): Take additional argument.
      (mu_cfg_format_node): New function.
      * mailbox/cfg_lexer.l: Update calls to diagnostic functions.
      (mu_cfg_parse_file): New function.
      (mu_get_config): Rewrite.
      * mailbox/cfg_parser.y (parse_tree): Replace with
      parse_head, parse_tail. All usages updated.
      (mu_cfg_free_node): New function.
      (mu_cfg_vperror): New function.
      (mu_cfg_perror,mu_cfg_parse_error): New function.
      (mu_cfg_tree_union): New function.
      (mu_cfg_tree_postprocess): New function.
      (mu_cfg_find_section): Use MU_CFG_PATH_DELIM instead
      of hardcoded slash.
      (mu_cfg_value_eq): New function.
      (mu_cfg_find_node): New function. Redesign of an old idea.
      (mu_cfg_create_subtree): New function.
      * mailbox/opool.c (mu_opool_union): New function.
      
      * frm/testsuite/frm/test.exp: use --set option instead of
      the obsolete --mail-folder.
      * messages/testsuite/messages/test.exp: Likewise.
      * sieve/testsuite/sieve/action.exp: Likewise.
      * mail/testsuite/lib/mail.exp: use --set option instead of
      the obsolete --mail-spool.
      * mailbox/testsuite/lib/mailbox.exp: Likewise.
      * testsuite/lib/mailutils.exp: Likewise.
      * mailbox/mutil.c (mu_register_retriever)
      (mu_retrieve): Remove unused functions.
      
      Minor fix:
      
      * frm/common.c (frm_abort): Initialize URL
      before usage.
      (frm_scan): Don't call frm_abort on a mailbox
      that was not opened successfully.
      Sergey Poznyakoff authored
  14. 25 Oct, 2009 1 commit
    • * examples/base64.c, examples/mta.c,
      imap4d/auth_gss.c, imap4d/imap4d.c,
      imap4d/preauth.c, libmu_auth/ldap.c,
      libmu_auth/virtual.c, libmu_scm/mu_body.c,
      libmu_scm/mu_port.c, libproto/mailer/smtp.c,
      mailbox/acl.c, mailbox/secret.c, pop3d/pop3d.c,
      python/libmu_py/address.c, sql/odbc.c: Fix argument
      signedness.
      
      * imap4d/fetch.c, imap4d/store.c (closures):
      Change type of `count' to int, to match the
      signature of util_msgset.
      * include/mailutils/guile.h (mu_scm_message_get): Fix
      return type (const is useless here).
      * libmu_scm/mu_message.c (mu_scm_message_get): Likewise.
      (scm_mu_message_copy): Fix type of the `wr' automatic variable.
      * libmu_scm/mu_mime.c (mu_scm_mime_get): Remove const qualifier
      from the return type.
      * libmu_argp/cmdline.c: Include stdlib.h.
      Sergey Poznyakoff authored
  15. 28 Sep, 2009 1 commit
    • * config/mailutils-config.c: Terminate docstring with a period.
      * dotlock/dotlock.c: Likewise.
      * frm/frm.c: Likewise.
      * frm/from.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * maidag/maidag.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      Sergey Poznyakoff authored
  16. 24 Sep, 2009 1 commit
  17. 25 Aug, 2009 2 commits
    • Option descriptions in `--help' output do not constitute
      conceptual sentences. Therefore, they should not begin
      with a capital letter, nor end with a final point.
      
      Affected files:
      
      comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c,
      frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c,
      libmu_argp/auth.c, libmu_argp/common.c, libmu_argp/gsasl.c,
      libmu_argp/pam.c, libmu_argp/radius.c, libmu_argp/sieve.c,
      libmu_argp/sql.c, libmu_argp/tls.c, libmu_argp/virtdomain.c,
      libmu_auth/sql.c, libmu_cfg/sql.c, maidag/maidag.c,
      maidag/mailquota.c, maidag/mailtmp.c, mail/mail.c,
      messages/messages.c, mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c,
      mh/fmtcheck.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c,
      mh/mark.c, mh/mh_init.c, mh/mhl.c, mh/mhn.c, mh/mhparam.c,
      mh/mhpath.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c,
      mh/scan.c, mh/send.c, mh/sortm.c, mh/whatnow.c, mh/whom.c,
      mimeview/mimeview.c, movemail/movemail.c, pop3d/pop3d.c,
      pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c
      Sergey Poznyakoff authored
    •    The string MESSAGE should not begin with a capital letter when it
         follows a program name and/or file name, because that isn't the
         beginning of a sentence.  (The sentence conceptually starts at the
         beginning of the line.)  Also, it should not end with a period.
      
      * include/mailutils/diag.h (mu_diag_funcall): New prototype.
      * mailbox/diag.c: New function.
      
      * comsat/action.c, comsat/comsat.c, comsat/oldcfg.c,
      config/mailutils-config.c, configure.ac, dotlock/dotlock.c,
      frm/common.c, frm/from.c, guimb/collect.c, guimb/main.c,
      guimb/util.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c, imap4d/bye.c,
      imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/preauth.c,
      imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, lib/mailcap.c,
      lib/tcpwrap.c, libmu_argp/mu_argp.c, libmu_auth/ldap.c,
      libmu_auth/radius.c, libmu_auth/sql.c, libmu_auth/tls.c,
      libmu_cfg/acl.c, libmu_cfg/common.c, libmu_cfg/init.c,
      libmu_cfg/ldap.c, libmu_cfg/sql.c, libmu_sieve/actions.c,
      libmu_sieve/comparator.c, libmu_sieve/extensions/moderator.c,
      libmu_sieve/prog.c, libmu_sieve/sieve.l, libproto/imap/folder.c,
      libproto/mbox/mbox.c, maidag/deliver.c, maidag/lmtp.c,
      maidag/maidag.c, maidag/mailquota.c, maidag/mailtmp.c,
      maidag/script.c, mail/alias.c, mail/cd.c, mailbox/cfg_lexer.l,
      mailbox/cfg_parser.y, mailbox/file_stream.c, mailbox/gocs.c,
      mailbox/msrv.c, mailbox/mutil.c, mailbox/registrar.c,
      messages/messages.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c,
      mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_format.c, mh/mh_init.c,
      mh/mh_list.c, mh/mh_msgset.c, mh/mh_whatnow.c, mh/mh_whom.c,
      mh/mhl.c, mh/mhn.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c,
      mh/scan.c, mh/send.c, mimeview/mimetypes.l, mimeview/mimeview.c,
      movemail/movemail.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c,
      pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/popauth.c,
      pop3d/quit.c, pop3d/signal.c, pop3d/user.c, readmsg/readmsg.c,
      sieve/sieve.c: Fix error messages.
      Sergey Poznyakoff authored
  18. 14 Apr, 2009 1 commit
    • * imap4d/imap4d.c (homedir): Remove variable.
      (real_homedir, imap4d_homedir, modify_homedir): New variables.
      (imap4d_cfg_param): New statements: homedir, personal-namespace.
      (imap4d_session_setup0): Initialize real_homedir and imap4d_homedir.
      * imap4d/imap4d.h (homedir, rootdir): Remove declarations.
      (real_homedir, imap4d_homedir, modify_homedir): New declarations.
      Include mailutils/vartab.h.
      * imap4d/list.c, imap4d/lsub.c, imap4d/namespace.c,
      imap4d/subscribe.c, imap4d/unsubscribe.c,
      imap4d/util.c: Use imap4d_homedir and real_homedir, where appropriate.
      * NEWS: Update.
      
      * imap4d/preauth.c: Remove inclusion of mailutils/vartab.h
      Sergey Poznyakoff authored
  19. 25 Dec, 2008 1 commit
    • * NEWS, configure.ac: Version 2.0
      * README: Update
      * doc/texinfo/mailutils.texi: Update.
      * doc/texinfo/programs.texi: Update.
      * doc/Makefile.am: Add usage.texi.
      * imap4d/imap4d.c (imap4d_cfg_param): Fix typo.
      * auth/tls.c (mu_tls_module_init): Add missing break.
      Sergey Poznyakoff authored
  20. 07 Nov, 2008 1 commit
    • * mailbox/permstr.c: New file.
      * mailbox/Makefile.am (libmailutils_la_SOURCES): Add permstr.c.
      * imap4d/imap4d.c (parse_mode_spec): Remove function.
      (cb_mailbox_mode): Use mu_parse_stream_perm_string instead of
      parse_mode_spec.
      * imap4d/imap4d.h (namespace_getfullpath)
      (namespace_checkfullpath): First arg is const.
      * imap4d/namespace.c (namespace_getfullpath)
      (namespace_checkfullpath): First arg is const.
      * include/mailutils/message.h (mu_message_save_to_mailbox): Add
      5th argument (permissions).
      * mailbox/message.c: Likewise.
      * include/mailutils/mutil.h (mu_parse_stream_perm_string): New
      proto.
      (mu_stream_flags_to_mode): Add isdir argument.
      * libsieve/actions.c (sieve_action_fileinto): New tag :permissions
      allows to set permissions to the mailbox being created.
      * mailbox/mutil.c (mu_stream_flags_to_mode): Add 2nd argument
      (isdir). Any bits in [go] sets imply raising 'x' bit for
      directories (i.e. if isdir != 0).
      
      * libproto/maildir/mbox.c, mailbox/amd.c: Update calls to
      mu_stream_flags_to_mode.
      
      * NEWS, doc/texinfo/sieve.texi: Update.
      
      Allow to set file permissions of the local mailboxes during
      creation.
      Sergey Poznyakoff authored
  21. 06 Nov, 2008 1 commit
    • * include/mailutils/stream.h (MU_STREAM_IRGRP, MU_STREAM_IWGRP)
      (MU_STREAM_IROTH, MU_STREAM_IWOTH, MU_STREAM_IMASK): New defines.
      * include/mailutils/mutil.h (mu_stream_flags_to_mode): New
      prototype.
      * libproto/maildir/mbox.c (maildir_create, maildir_flush)
      (maildir_scan0): Consider mailbox flags	to determine its file
      mode.
      * mailbox/amd.c (amd_open, amd_message_stream_open): Likewise.
      * mailbox/file_stream.c (_file_open): Likewise.
      * mailbox/mutil.c (mu_stream_flags_to_mode): New file.
      
      * imap4d/namespace.c (namespace_getfullpath)
      (namespace_checkfullpath): Return the namespace number in the last
      argument (if not null).
      * imap4d/append.c, imap4d/copy.c, imap4d/delete.c, imap4d/list.c,
      imap4d/rename.c, imap4d/select.c, imap4d/status.c: Update calls to
      namespace_getfullpath.
      * imap4d/create.c (imap4d_create): Set mailbox flags depending on
      the namespace it is created in.
      * imap4d/imap4d.c (mailbox_mode): New variable.
      (parse_mode_spec): New function.
      (imap4d_cfg_param): New statements other-mailbox-mode and
      shared-mailbox-mode.
      * imap4d/imap4d.h (mailbox_mode): New proto.
      (namespace_getfullpath, namespace_checkfullpath): Add a parameter.
      
      * mailbox/progmailer.c (mu_progmailer_set_debug): Add missing
      return statement.
      Sergey Poznyakoff authored
  22. 21 Aug, 2008 2 commits
  23. 19 Aug, 2008 2 commits
    • * imap4d/id.c: New file.
      * imap4d/Makefile.am (imap4d_SOURCES): Add id.c, remove version.c.
      * imap4d/commands.c: Add ID command.
      Remove X-VERSION command.
      (SELECT,EXAMINE): Switch to authenticated mode on failure.
      * imap4d/imap4d.c (imap4d_argc, imap4d_argv): New variables.
      (imap4d_cfg_param): New keyword `id-fields'.
      (main): Save command line arguments.
      * imap4d/imap4d.h (imap4d_argc, imap4d_argv): New declarations.
      * imap4d/select.c (imap4d_select0): Do not reset state to auth on
      failure, this is done by util_finish.
      * imap4d/version.c: Remove.
      * imap4d/capability.c: Announce ID capability, remove X-VERSION.
      * imap4d/testsuite/imap4d/x.exp: Use ID instead of X-VERSION.
      
      * TODO, NEWS: Update.
      
      * mailbox/cfg_parser.y (_set_fun,parse_param): Bugfix.
      Sergey Poznyakoff authored
    • * auth/gsasl.c: Remove deprecated data types.
      * imap4d/auth_gsasl.c (retrieve_password): Minor fix.
      
      * imap4d/imap4d.c, imap4d/imap4d.h, imap4d/namespace.c,
      lib/tcpwrap.c, libcfg/acl.c, libcfg/auth.c, libcfg/common.c,
      libcfg/ldap.c, libcfg/sieve.c, libcfg/sql.c, maidag/maidag.c,
      mail.local/main.c, mailbox/gdebug.c, mailbox/msrv.c,
      mimeview/mimeview.c, pop3d/bulletin.c, pop3d/pop3d.c,
      pop3d/pop3d.h, sieve/sieve.c: Reflect changes to the configuration
      system.
      
      * mailbox/Makefile.am (AM_LFLAGS): New variable.
      (EXTRA_DIST) Add cfg_lexer.l.
      (libmailutils_la_SOURCES): Add alloc.c and opool.c
      (BUILT_SOURCES): Add cfg_lexer.c.
      (cfg_lexer.c): New goal.
      * mailbox/alloc.c, mailbox/opool.c: New files.
      * mailbox/cfg_lexer.c: Remove.
      * mailbox/cfg_lexer.l: New file.
      * mailbox/.cvsignore: Add cfg_lexer.c.
      
      * include/mailutils/Makefile.am: Add alloc.h and opool.h
      * include/mailutils/alloc.h: New file.
      * include/mailutils/opool.h: New file.
      
      * include/mailutils/cfg.h (mu_cfg_lexer_t,mu_cfg_alloc_t)
      (mu_cfg_free_t): Remove types.
      (MU_CFG_STRING, MU_CFG_LIST, MU_CFG_ARRAY): New defines.
      (mu_config_value_t): New data type.
      (struct mu_cfg_node): Change type of `label'.
      (struct mu_cfg_tree): Remove `alloc', `free'.
      New member `pool'.
      (mu_cfg_parse): Simplify the signature by removing superfluous
      arguments.
      (mu_cfg_tie_in): Remove.
      (mu_cfg_lexer_pool): New function.
      (mu_cfg_find_node, mu_cfg_find_node_label): Remove.
      (mu_cfg_callback_t): Change signature.
      (MU_CFG_LIST_MASK): New define.
      (MU_CFG_LIST_OF, MU_CFG_TYPE, MU_CFG_IS_LIST): New defines.
      (mu_cfg_get_debug): New function.
      (mu_cfg_assert_value_type, mu_cfg_string_value_cb): New functions.
      (mu_cfg_tree_set_alloc, mu_cfg_tree_alloc): Remove.
      * mailbox/cfg_driver.c: Adapt for new node structure.
      (mu_cfg_assert_value_type, mu_cfg_string_value_cb): New function.
      * mailbox/cfg_format.c: Adapt for new node structure.
      * mailbox/cfg_parser.y: Adapt for changes in cfg data types and
      lexer.
      
      * include/mailutils/mailutils.h: Include alloc.h and opool.h
      * include/mailutils/mu_auth.h (mu_authorization_add_module)
      (mu_authentication_add_module): New prototypes.
      
      * include/mailutils/syslog.h (mu_string_to_syslog_facility)
      (mu_string_to_syslog_priority): First argument is const char *.
      * mailbox/syslog.c: Likewise.
      
      * include/mailutils/types.hin (mu_opool_t): New type.
      * mailbox/list.c (mu_list_get_comparator): Add missing return
      statement.
      Sergey Poznyakoff authored
  24. 14 Aug, 2008 1 commit
    • * auth/gsasl.c (_gsasl_readline): Prevent stucking in
      blocking streams.
      * imap4d/auth_gsasl.c: Remove deprecated functions and data types.
      * imap4d/auth_gss.c (auth_gssapi): Fix signature.
      * imap4d/copy.c (imap4d_copy0): Fix return value.
      * imap4d/imap4d.c (imap4d_cfg_param): Fix type of login-disabled.
      * include/mailutils/gsasl.h (struct mu_gsasl_module_data): New
      members: service, realm, hostname, anon_user.
      * libcfg/gsasl.c (mu_gsasl_param): New keywords: service,
      realm, hostname, anonymous-user.
      Sergey Poznyakoff authored
  25. 10 Aug, 2008 1 commit
    • * imap4d/util.c (util_getword, util_getitem, util_token)
      (util_unquote): Remove.
      (imap4d_readline): Rewrite to reduce memory reallocation.  Add
      support for non-synchronizing literals (RFC 2088).
      (imap4d_readline_ex): Remove.
      (util_do_command): Rewrite using new imap4d_readline.
      (util_parse_internal_date0): Remove.
      (imap4d_tokbuf_init, imap4d_tokbuf_destroy, imap4d_tokbuf_argc)
      (imap4d_tokbuf_getarg, util_isdelim)
      (imap4d_tokbuf_from_string): New functions.
      * imap4d/append.c, imap4d/auth_gss.c, imap4d/authenticate.c,
      imap4d/check.c, imap4d/close.c, imap4d/commands.c, imap4d/copy.c,
      imap4d/create.c, imap4d/delete.c, imap4d/examine.c,
      imap4d/imap4d.h, imap4d/list.c, imap4d/login.c, imap4d/logout.c,
      imap4d/lsub.c, imap4d/expunge.c, imap4d/idle.c, imap4d/noop.c,
      imap4d/rename.c, imap4d/search.c, imap4d/select.c,
      imap4d/starttls.c, imap4d/status.c, imap4d/store.c,
      imap4d/subscribe.c, imap4d/uid.c, imap4d/unsubscribe.c,
      imap4d/version.c: Rewrite using new imap4d_readline.
      * imap4d/namespace.c: Use new imap4d_readline.  Ensure that
      each reported prefix ends with a hierarchy delimiter.
      * imap4d/imap4d.c (imap4d_mainloop): Use new imap4d_readline.
      * imap4d/fetch.c: Rewrite parser from scratch.
      * imap4d/capability.c (imap4d_capability_init): Report LITERAL+
      capability.
      
      * imap4d/testsuite/imap4d/anystate.exp: Account for the LITERAL+
      capability.
      * imap4d/testsuite/imap4d/append.exp: Fix APPEND arguments (imap4d
      requires exactly three arguments, as per RFC3501.
      Fix octet count in literals returned by fetch (previous versions
      failed to include the trailing CRLF).
      * imap4d/testsuite/imap4d/create.exp: Likewise.
      * imap4d/testsuite/imap4d/fetch.exp: Fix FETCH arguments (previous
      versions incorrectly accepted header-list without parentheses.
      Fix result of FETCH 4 BODY[2.2.1]: it returns entire part, in the
      contrast to previous versions, which treated it as
      BODY[2.2.1.TEXT].
      
      * maidag/mailtmp.c (mail_tmp_finish): Ensure /dev/null is treated
      as mailbox.
      Sergey Poznyakoff authored
  26. 07 Mar, 2008 1 commit
  27. 06 Feb, 2008 1 commit
    • * imap4d/bye.c, imap4d/starttls.c, imap4d/util.c: Use exit codes
      from sysexits.h
      * imap4d/imap4d.c: Use mu_set_signals to install signals.
      Use exit codes from sysexits.h.
      * imap4d/imap4d.h: Include sysexits.h and muaux.h
      (ERR_TERMINATE): New define.
      (imap4d_sigchld,imap4d_signal): Remove.
      (imap4d_master_signal,imap4d_child_signal): New prototypes.
      * imap4d/signal.c (imap4d_master_signal,imap4d_child_signal): New
      functions.
      
      * pop3d/pop3d.h Include sysexits.h and muaux.h
      (ERR_TERMINATE): New define.
      (pop3d_signal): Remove.
      (pop3d_master_signal, pop3d_child_signal): New protos.
      * pop3d/signal.c (pop3d_master_signal, pop3d_child_signal): New
      functions.
      
      * pop3d/extra.c, pop3d/popauth.c
      * pop3d/pop3d.c: Use mu_set_signals to install signals.
      Use exit codes from sysexits.h.
      
      * include/mailutils/server.h (mu_m_server_set_strexit): New
      prototype.
      * include/mailutils/types.hin (MU_ARRAY_SIZE): New define.
      
      * lib/Makefile.am (libmuaux_la_SOURCES): Add signal.c, strexit.c.
      (noinst_HEADERS): Add muaux.h
      * lib/muaux.h: New file.
      
      * libsieve/extensions/spamd.c: Add NLS markers.
      
      * mailbox/header.c (header_readline): Minor rewrite.
      * mailbox/msrv.c (struct _mu_m_server): New member `strexit'.
      (mu_m_server_begin): Call alloc_children.
      (mu_m_server_restore_signals): New function.
      (mu_m_server_end): Call mu_m_server_restore_signals.
      (m_srv_conn): Reset signals in child branch.
      
      * po/POTFILES.in: Update.
      Sergey Poznyakoff authored
  28. 14 Jan, 2008 1 commit
    • * include/mailutils/syslog.h (mu_log_facility, mu_log_tag): New
      declarations.
      (MU_LOG_TAG): New define.
      * mailbox/gocs.c (mu_gocs_logging_init): Set mu_log_tag.
      * mailbox/syslog.c (mu_log_facility, mu_log_tag): New variables.
      * libcfg/common.c (mu_logging_param): New statement `tag'.
      * comsat/comsat.c, imap4d/imap4d.c, imap4d/login.c,
      maidag/maidag.c, mail.local/main.c, pop3d/pop3d.c, pop3d/user.c,
      sieve/sieve.c: Use MU_LOG_TAG in openlog, and
      program_version in mu_m_server_create calls.
      Sergey Poznyakoff authored
  29. 13 Jan, 2008 1 commit
    • * configure.ac: Define DEFAULT_TEXT_DOMAIN
      * comsat/comsat.c, dotlock/dotlock.c, frm/frm.c, frm/from.c,
      guimb/main.c, imap4d/imap4d.c, maidag/maidag.c, mail/mail.c,
      mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c,
      mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c,
      mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c,
      mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
      mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
      mh/sortm.c, mh/whatnow.c, mh/whom.c, mimeview/mimeview.c,
      movemail/movemail.c, pop3d/pop3d.c, pop3d/popauth.c,
      readmsg/readmsg.c, sieve/sieve.c,
      Use MU_APP_INIT_NLS instead of mu_init_nls.
      * mailbox/nls.c (mu_init_nls): Do not call textdomain.
      Sergey Poznyakoff authored
  30. 05 Jan, 2008 2 commits
    • * mailbox/Makefile.am: Replace tcpsrv.c with ipsrv.c.
      * mailbox/tcpsrv.c: Replace with ...
      * mailbox/ipsrv.c: ... this file, which supports both TCP and UDP.
      
      * mailbox/msrv.c: Use mu_ip_server_t.
      * mailbox/server.c (mu_server_destroy): Bugfix.
      * comsat/comsat.c, comsat/comsat.h: Use m-server.
      
      * maidag/lmtp.c, maidag/maidag.h, pop3d/pop3d.c: Update to match
      changed m-server types.
      
      * include/mailutils/server.h (mu_tcp_*): Replace with mu_ip_*.
      Add new prototypes.
      * include/mailutils/types.hin: Likewise.
      
      * lib/tcpwrap.c, lib/tcpwrap.h (mu_tcp_wrapper_prefork): Update
      signature to match mu_m_server_prefork_fp.
      
      * examples/echosrv.c: Use mu_ip_server_t
      * imap4d/idle.c, imap4d/imap4d.c, imap4d/imap4d.h,
      imap4d/preauth.c, imap4d/util.c: Remove mu_gocs_daemon.
      * include/mailutils/gocs.h, include/mailutils/libargp.h,
      include/mailutils/libargp.h, libargp/cmdline.c,
      libargp/common.c, libcfg/common.c, libcfg/init.c,
      mailbox/daemon.c, mailbox/gocs.c: Remove mu_gocs_daemon.
      
      * mailbox/amd.c (amd_open): Provide a null-locker.
      * include/mailutils/locker.h, mailbox/locker.c
      (mu_locker_mod_flags): New function.
      
      * examples/config/mailutils.schema: LDAP schema for Mailutils.
      * examples/config/Makefile.am: Add mailutils.schema
      
      * dotlock/dotlock.c (main): Remove superfluous invocation of
      mu_locker_set_flags.
      
      * libproto/mbox/mbox.c (mbox_quick_get_message): Return
      MU_ERR_NOENT if mailbox is empty.
      
      * mailbox/tcpsrv.c (family_to_proto): Rename to
      mu_address_family_to_domain.
      * po/POTFILES.in: Update.
      * pop3d/lock.c (pop3d_lock): use mu_locker_mod_flags, instead of
      mu_locker_set_flags.
      Sergey Poznyakoff authored
    • function type.
      (mu_m_server_destroy, mu_m_server_set_prefork)
      (mu_m_server_configured_count, mu_m_server_end): New functions.
      * mailbox/msrv.c (struct _mu_m_server.prefork): New member.
      (mu_m_server_set_prefork): New function.
      (m_srv_conn): Use prefork to decide whether to proceed with a
      connection.
      
      * lib/tcpwrap.c, lib/tcpwrap.h (mu_tcp_wrapper_prefork): New
      function.
      
      * imap4d/imap4d.c, maidag/lmtp.c, maidag/maidag.c,
      pop3d/pop3d.c: Use m-server prefork to handle TCP wrappers.
      
      * po/POTFILES.in: Add more files.
      Sergey Poznyakoff authored
  31. 04 Jan, 2008 1 commit
    • * mailbox/msrv.c: New file.
      * mailbox/Makefile.am: Add msrv.c.
      * include/mailutils/server.h (mu_tcp_server_conn_fp): Take
      sockaddr as argument
      (mu_tcp_server_create,mu_tcp_server_get_sockaddr): Likewise.
      (mu_m_server_*): New prototypes.
      * include/mailutils/types.hin (mu_m_server_t): New type.
      * mailbox/acl.c: Fix debugging output.
      (mu_sockaddr_to_str, mu_sockaddr_to_astr): New functions.
      
      * mailbox/tcpsrv.c: Handle AF_INET and AF_UNIX sockets.
      * examples/echosrv.c: Update mu_tcp_server_* calls.
      * examples/config/Makefile.am: Remove comsat.conf and
      mailutils.rc.
      
      * imap4d/imap4d.c, imap4d/imap4d.h, imap4d/signal.c,
      maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h, pop3d/extra.c,
      pop3d/pop3d.c, pop3d/pop3d.h, pop3d/signal.c: Rewrite using
      m-server.
      
      * include/mailutils/cfg.h (mu_offsetof): Bug fix.
      * mailbox/cfg_driver.c (dup_container): Bugfix. Offset was not
      copied.
      (mu_cfg_section_add_params): If identifier starts with a dot, it
      is hidden, i.e. its substatements are copied directly into the
      parent structure.
      * mailbox/cfg_lexer.c (isword): Take care of opening braces.
      (default_lexer): Several fixes.
      * mailbox/cfg_parser.y (mu_cfg_parse): Initialize debugging level
      from global settings.
      (_scan_tree_helper): Ensure debugging object has correct locus
      information before calling the section parser.
      (mu_cfg_scan_tree): If no debugging object is supplied, use the
      one from diag.c
      * mailbox/daemon.c (mu_daemon_create_pidfile): Return a meaningful
      error code.
      * mailbox/debug.c (mu_debug_create): Initialize printer to NULL.
      (mu_debug_vprintf): If printer is NULL, use
      mu_debug_default_printer.
      (mu_debug_check_level): Bugfix.
      
      * mailbox/server.c: Minor indentation fix.
      * mailbox/syslog.c (mu_diag_syslog_printer): Chop off \r as well.
      * mailbox/folder.c (mu_folder_create_from_record): Bugfixes.
      
      * include/mailutils/debug.hm4 (mu_sockaddr_to_str)
      (mu_sockaddr_to_astr): New functions.
      
      * include/mailutils/.cvsignore: Add debug.h
      
      * po/POTFILES.in: Update.
      Sergey Poznyakoff authored
  32. 30 Dec, 2007 1 commit
    • * frm/testsuite/frm/test.exp: Call mu_init with -noflags option.
      Use --mail-folder option when necessary.
      * messages/testsuite/messages/test.exp: Likewise.
      * readmsg/testsuite/readmsg/test.exp: Likewise.
      * sieve/testsuite/lib/sieve.exp: Likewise.
      * sieve/testsuite/sieve/action.exp: Likewise.
      * sieve/testsuite/scripts/fileinto.sv: Use +file, instead of
      %file.
      
      * imap4d/imap4d.c: Register mailbox formats before parsing
      configuration.
      * imap4d/util.c (util_wcard_match): Replaced with a more efficient
      implementation, based on wildmat from GNU Radius.
      * imap4d/testsuite/imap4d/list.exp: Expect two non-mailbox files
      to appear in the list output (see libproto/mbox/folder.c, 2007-12-28).
      
      * libargp/common.c: New option --mail-folder.
      * libcfg/common.c: New statement mailbox/folder
      
      * libproto/maildir/folder.c (_maildir_is_scheme): Never return
      MU_FOLDER_ATTRIBUTE_DIRECTORY bit: maildir folders cannot contain
      subfolders.
      * libproto/maildir/mbox.c (maildir_msg_init): Bugfix: use full
      file name.
      Print additional diagnostics if stat fails.
      * libproto/mbox/folder.c (list_helper): Take additional argument,
      record, specifying a mu_record_t object to match entries
      against. If it is NULL, mu_registrar_lookup is used.
      Fix descending into subdirectories.
      
      * maidag/deliver.c (deliver): Split off deliver_to_user function;
      call it with user privileges. This fixes privileges of any created
      maildir folders.
      * maidag/maidag.c (set_debug_flags): Bugfix.
      
      * mail/mail.c (main): Open the mailbox with MU_STREAM_CREAT flag.
      
      * mailbox/amd.c (amd_open): Do not initialize amd->mtime to
      trigger initial scanning.
      (_amd_message_save): Check rename return value.
      (amd_is_updated): Do not check for msg_count==0, rely on the
      timestamp.
      
      * mailbox/mailbox.c (mu_mailbox_set_default_proto): Accept an
      argument without trailing semicolon.
      * mailbox/mbx_default.c (mu_set_mail_directory): Accept NULL
      argument.
      (mu_set_mailbox_pattern): Likewise.
      (mu_mailbox_create_default): Use FOLDER or MAIL environment
      variables only if _mu_mailbox_pattern is not set. In other words,
      setting mail-spool in the configuration file overrides these
      variables.
      Sergey Poznyakoff authored
  33. 19 Dec, 2007 1 commit
    • * configure.ac (MU_LIB_REMOTE): New substitution variable.
      (AC_CONFIG_FILES): Add libproto/remote/Makefile.
      * imap4d/copy.c, imap4d/create.c, imap4d/delete.c, imap4d/fetch.c,
      imap4d/imap4d.c, imap4d/list.c, imap4d/lsub.c, imap4d/rename.c,
      imap4d/subscribe.c, imap4d/unsubscribe.c, imap4d/util.c: Spelling
      fixes.
      * include/mailutils/cfg.h (mu_cfg_error_count): New variable.
      * include/mailutils/gocs.h (struct mu_gocs_mailbox):  New member
      mailbox_pattern
      * include/mailutils/libargp.h (mu_rcfile_lint): New variable.
      * include/mailutils/mailbox.h (mu_set_mailbox_pattern): New
      function.
      (mu_mail_directory): Removed.
      (mu_mailbox_url): New function.
      * include/mailutils/mutil.h (mu_normalize_mailbox_url): Remove.
      * include/mailutils/registrar.h (mu_0_6_registrar_lookup): Remove.
      
      * libargp/common.c: New options --rcfile-lint and
      --mailbox-pattern.
      * libargp/muinit.c: Handle --rcfile-lint.
      * libcfg/common.c: New statement mailbox-pattern
      * libmu_scm/mu_mailbox.c (mu-mail-directory): Deprecated.
      (mu-user-mailbox-url): New function.
      
      * libproto/remote: New directory.
      * libproto/remote/folder.c: New file.
      * libproto/remote/mbox.c: New file.
      * libproto/remote/.cvsignore: New file.
      
      * libproto/Makefile.am (SUBDIRS): Add remote
      * libproto/mbox/folder.c, libproto/mbox/url.c: Indentation and
      spelling fixes.
      * maidag/Makefile.am (maidag_LDADD): Add MU_LIB_REMOTE.
      * maidag/maidag.c: Register mu_remote_mbox_record.
      * mailbox/cfg_parser.y (mu_cfg_error_count): New variable.
      (mu_cfg_format_error,_mu_cfg_vperror): Increment
      mu_cfg_error_count.
      * mailbox/debug.c (mu_debug_check_level): Do not mask out
      inheritance bit.
      * mailbox/gocs.c (mu_gocs_mailbox_init): Set mailbox pattern.
      * mailbox/mailbox.c (_create_mailbox): Bugfix.
      * mailbox/mbx_default.c (mu_set_mailbox_pattern): New finction.
      (mu_set_mail_directory): Rewrite.
      (user_mailbox_name): Rewrite.
      * mailbox/mutil.c (mu_normalize_mailbox_url): Remove.
      * mailbox/registrar.c (mu_0_6_registrar_lookup): Remove.
      * guimb/scm/sieve-core.scm (sieve-main): Use mu-user-mailbox-url.
      Sergey Poznyakoff authored