1. 24 Nov, 2011 3 commits
    • * libmailutils/string/wordsplit.c (scan_word): Return only one delimiter
      if MU_WRDSF_RETURN_DELIMS is on
      * libmailutils/tests/wordsplit.at: Reflect that.
      Sergey Poznyakoff authored
    • * include/mailutils/wordsplit.h (MU_WRDSF_INCREMENTAL): New flag.
      (MU_WRDSE_NOINPUT): New error code.
      * libmailutils/string/wordsplit.c (mu_wordsplit_init0): New function.
      (mu_wordsplit_init): Call mu_wordsplit_init0.
      (expvar): Use MU_WRDSF_WS instead of MU_WRDSF_SQUEEZE_DELIMS in
      call to subordinate mu_wordsplit.
      (skip_delim): If both MU_WRDSF_RETURN_DELIMS and MU_WRDSF_SQUEEZE_DELIMS
      are given, squeeze only the same delimiter characters.
      * libmailutils/tests/wordsplit.at: Add tests for incremental mode.
      * libmailutils/tests/wsp.c: Support incremental mode.
      Sergey Poznyakoff authored
    • * libmu_auth/tls.c: Don't generate DH params at all.
      Sergey Poznyakoff authored
  2. 23 Nov, 2011 1 commit
    • * am/gsasl.m4 (MU_CHECK_GSASL): Enable GSASL by default.  Other minor fixes.
      * am/tls.m4 (MU_CHECK_TLS): Rename to MU_CHECK_GNUTLS.  Check option
      arguments.  Check for gnutls library version.
      * configure.ac: Update.
      * README: Document the change.
      * NEWS: Document the change.
      Sergey Poznyakoff authored
  3. 22 Nov, 2011 2 commits
    • * libmu_dbm/dbm.c (mu_dbm_create_from_url): Parameter list beginning
      with a negative parameter implies default safety criteria.
      Fix semantics of the "default" keyword: it is different from "all".
      * libmu_dbm/mudbm.h (DEFAULT_DBM_SAFETY_FLAGS): Remove.  Not needed now.
      * pop3d/bulletin.c (read_bulletin_db): Remove a leftover call to
      mu_dbm_safety_set_flags.
      Sergey Poznyakoff authored
    • The new format, called "C", allows programmers to create input data
      for use by mu load using conventional means.  It represents both key and
      content as C strings (hence its name), with usual C (literal and octal)
      escapes to represent non-printable characters.
      
      * mu/dbm.c (IOBUF_REREAD,IOBUF_EOF): New constants.
      (iobuf) <state>: New member.
      (input_eof): New macro.
      (input_getline): Use iobuf.state to detect EOF.
      (input_ungetline): Reset state only if it is 0.
      (format_tab): New format "C".
      (write_quoted_string,C_writer,C_read_datum)
      (C_reader): New functions to implement the C dump format.
      * libmailutils/tests/testsuite.at: Minor change.
      Sergey Poznyakoff authored
  4. 21 Nov, 2011 2 commits
    • Sergey Poznyakoff authored
    • * configure.ac (check_dbm_impl): Fix improper usage of expr in BDB=* case.
      * include/mailutils/dbm.h (mu_dbm_create_from_url)
      (mu_dbm_create): Take default safety flags as the last argument.
      * libmailutils/base/filesafety.c (_check_linkwrdir): Check for both
      hard and symbolic links.  Fix the latter check.
      * libmailutils/tests/fsaf.at: Add check for softlink in a writable dir.
      * libmu_dbm/create.c (mu_dbm_create): Take default file safety as the
      last argument.
      * libmu_dbm/dbm.c (mu_dbm_create_from_url): Likewise.
      * maidag/mailquota.c (dbm_retrieve_quota): Update call to mu_dbm_create.
      Impose MU_FILE_SAFETY_ALL by default.
      * mu/dbm.c (open_db_file): Update call to mu_dbm_create.  No checks
      by default.
      * pop3d/apop.c (pop3d_apopuser): Update call to mu_dbm_create.  Use
      apop_database_safety as the default checks.
      * pop3d/bulletin.c (read_bulletin_db,write_bulletin_db): Update calls to
      mu_dbm_create.  Use DEFAULT_GROUP_DB_SAFETY as default.
      * pop3d/logindelay.c (open_stat_db): Update call to mu_dbm_create.
      Use DEFAULT_GROUP_DB_SAFETY as default.
      * pop3d/pop3d.c (apop_database_safety): Initialize to MU_FILE_SAFETY_ALL.
      (apop_database_safety_set): Remove.
      * pop3d/pop3d.h (apop_database_safety_set): Remove.
      * pop3d/popauth.c (open_db_file): Update call to mu_dbm_create.  Use
      safety_flags by default.
      Sergey Poznyakoff authored
  5. 20 Nov, 2011 1 commit
    • * include/mailutils/wordsplit.h (MU_WRDSF_SQUOTE,MU_WRDSF_DQUOTE): New flags.
      (MU_WRDSF_QUOTE): Redefine as an OR of the above two.
      * libmailutils/string/wordsplit.c (scan_word): Treat '\'' and '"'
      separately, depending on the flags.
      * libmailutils/tests/wsp.c: Add squote and dquote options.
      * libmailutils/tests/wordsplit.at: Test separate quoting support.
      Sergey Poznyakoff authored
  6. 19 Nov, 2011 4 commits
    • * include/mailutils/list.h (mu_list_slice_dup,mu_list_slice)
      (mu_list_slice2_dup,mu_list_slice2): New protos.
      * libmailutils/list/slice.c: New file.
      * libmailutils/list/slice2.c: New file.
      * libmailutils/list/Makefile.am: Add slice.c and slice2.c
      * libmailutils/tests/list.at: Add slicing tests.
      * libmailutils/tests/listop.c: New command: "slice"
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * include/mailutils/imap.h (mu_imap_response_action_t): New typedef.
      (mu_imap_foreach_response): New proto.
      (MU_IMAP_CB_PERMANENT_FLAGS,MU_IMAP_CB_MESSAGE_COUNT)
      (MU_IMAP_CB_RECENT_COUNT,MU_IMAP_CB_FIRST_UNSEEN)
      (MU_IMAP_CB_UIDNEXT,MU_IMAP_CB_UIDVALIDITY)
      (MU_IMAP_CB_OK,_MU_IMAP_CB_MAX): New constants.
      (mu_imap_callback_t): New typedef.
      (mu_imap_callback,mu_imap_register_callback_function): New protos.
      (MU_IMAP_RESPONSE_ALERT,MU_IMAP_RESPONSE_BADCHARSET)
      (MU_IMAP_RESPONSE_CAPABILITY,MU_IMAP_RESPONSE_PARSE)
      (MU_IMAP_RESPONSE_PERMANENTFLAGS,MU_IMAP_RESPONSE_READ_ONLY)
      (MU_IMAP_RESPONSE_READ_WRITE,MU_IMAP_RESPONSE_TRYCREATE)
      (MU_IMAP_RESPONSE_UIDNEXT,MU_IMAP_RESPONSE_UIDVALIDITY)
      (MU_IMAP_RESPONSE_UNSEEN): New constants.
      (mu_imap_response_codes): New extern.
      * include/mailutils/sys/imap.h (_mu_imap) <callback>: New member.
      (_mu_imap_collect_flags, _mu_imap_list_at): New protos.
      * libproto/imap/resplist.c (_mu_imap_list_at): New function.
      * libproto/imap/callback.c: New file.
      * libproto/imap/resproc.c: New file.
      * libproto/imap/Makefile.am: Add new files.
      * libproto/imap/capability.c: Rewrite using mu_imap_foreach_response.
      * libproto/imap/id.c: Likewise.
      * libproto/imap/select.c: Likewise.
      Sergey Poznyakoff authored
  7. 18 Nov, 2011 7 commits
    • * include/mailutils/imap.h (mu_imap_status): New proto.
      (_mu_imap_status_name_table): New declaration.
      * include/mailutils/sys/imap.h (mu_imap_client_state)
      <MU_IMAP_STATUS_RX>: New state.
      * libproto/imap/status.c: New file.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Add status.c
      * mu/imap.c: Implement "status"
      Sergey Poznyakoff authored
    • * include/mailutils/imap.h (mu_imap_stat): New structs.
      (MU_IMAP_STAT_DEFINED_FLAGS,MU_IMAP_STAT_PERMANENT_FLAGS)
      (MU_IMAP_STAT_MESSAGE_COUNT,MU_IMAP_STAT_RECENT_COUNT)
      (MU_IMAP_STAT_FIRST_UNSEEN,MU_IMAP_STAT_UIDNEXT)
      (MU_IMAP_STAT_UIDVALIDITY):  New flags.
      (mu_imap_select): New proto.
      * include/mailutils/imapio.h (mu_imap_flag_to_attribute)
      (mu_imap_format_flags): New protos.
      * include/mailutils/sys/imap.h (mu_imap_client_state)
      <MU_IMAP_SELECT_RX>: New state.
      (_mu_imap) <mbox_name,mbox_writable,mbox_stat>: New members.
      * libmailutils/imapio/flags.c: New file.
      * libmailutils/imapio/Makefile.am: Add flags.c
      * libproto/imap/select.c: New file.
      * libproto/imap/Makefile.am: Add select.c
      * libproto/imap/err.c (_mu_imap_seterrstr)
      (_mu_imap_clrerrstr, mu_imap_strerror): Allow for imap==NULL.
      * libproto/imap/id.c (mu_imap_id): Set errstr on MU_ERR_BADREPLY
      * libproto/imap/login.c (mu_imap_login): Likewise.
      * libproto/imap/resplist.c (_mu_imap_list_element_is_string): New function.
      * mu/imap.c: Implement examine and select.
      Sergey Poznyakoff authored
    • * libproto/imap/capability.c (mu_imap_capability): Use mu_list_map to
      create the capability list.
      * libproto/imap/id.c (_id_convert): Likewise for ID pairs.
      Sergey Poznyakoff authored
    • * include/mailutils/list.h (MU_LIST_MAP_OK)
      (MU_LIST_MAP_SKIP,MU_LIST_MAP_STOP): New constants.
      (mu_list_mapper_t): New typedef.
      (mu_list_map): New proto.
      * libmailutils/list/gmap.c: New file.
      * libmailutils/list/map.c: New file.
      * libmailutils/list/Makefile.am: Add gmap.c and map.c
      * libmailutils/tests/listop.c: New command "map".
      * libmailutils/tests/list.at: Test the list mapping.
      Sergey Poznyakoff authored
    • * configure.ac: Build libmailutils/list/Makefile
      * include/mailutils/sys/list.h (DESTROY_ITEM): New define.
      (_mu_list_insert_item): New proto.
      * libmailutils/Makefile.am (SUBDIRS): Add list.
      (libmailutils_la_LIBADD): Add list/liblist.la
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove list sources.
      * libmailutils/base/list.c: Split into smaller files (see below).
      * libmailutils/base/listlist.c: Move to libmailutils/list/listlist.c
      * libmailutils/list/Makefile.am: New file.
      * libmailutils/list/append.c: New file.
      * libmailutils/list/array.c: New file.
      * libmailutils/list/clear.c: New file.
      * libmailutils/list/count.c: New file.
      * libmailutils/list/create.c: New file.
      * libmailutils/list/destroy.c: New file.
      * libmailutils/list/do.c: New file.
      * libmailutils/list/empty.c: New file.
      * libmailutils/list/get.c: New file.
      * libmailutils/list/getcomp.c: New file.
      * libmailutils/list/insert.c: New file.
      * libmailutils/list/intersect.c: New file.
      * libmailutils/list/iterator.c: New file.
      * libmailutils/list/locate.c: New file.
      * libmailutils/list/prepend.c: New file.
      * libmailutils/list/remove.c: New file.
      * libmailutils/list/replace.c: New file.
      * libmailutils/list/setcomp.c: New file.
      * libmailutils/list/setdestr.c: New file.
      Sergey Poznyakoff authored
    • * include/mailutils/imapio.h (mu_imapio_reply_string): New proto.
      * libmailutils/imapio/replstr.c: New file.
      * libmailutils/imapio/Makefile.am: Add replstr.c
      Sergey Poznyakoff authored
  8. 17 Nov, 2011 2 commits
    • * include/mailutils/imapio.h: New file.
      * include/mailutils/sys/imapio.h: New file.
      * libmailutils/imapio/create.c: New file.
      * libmailutils/imapio/getline.c: New file.
      * libmailutils/imapio/literal.c: New file.
      * libmailutils/imapio/printf.c: New file.
      * libmailutils/imapio/qstring.c: New file.
      * libmailutils/imapio/send.c: New file.
      * libmailutils/imapio/trace.c: New file.
      * libmailutils/imapio/words.c: New file.
      * libmailutils/imapio/xscript.c: New file.
      
      * configure.ac: Build libmailutils/imapio/Makefile
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add imapio.h.
      * include/mailutils/imapio.h: New file.
      * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add imapio.h.
      * include/mailutils/sys/imapio.h: New file.
      * include/mailutils/types.hin (mu_imapio_t): New data type.
      * libmailutils/Makefile.am (SUBDIRS): Add imapio.
      
      * libmailutils/tests/Makefile.am: Build imapio
      * libmailutils/tests/imapio.c: New source.
      * libmailutils/tests/wsp.c: Handle escape argument
      Sergey Poznyakoff authored
    • * include/mailutils/wordsplit.h (mu_wordsplit) <ws_escape>: New member.
      (MU_WRDSF_ESCAPE): New flag.
      (mu_wordsplit_general_unquote_copy): New function.
      * libmailutils/string/wordsplit.c: Remove empty nodes after whitespace
      trimming.  If MU_WRDSF_ESCAPE is set, remove only backslashes appearing
      in front of a character in ws_escape.
      * libmailutils/tests/wordsplit.at: Test new features.
      Sergey Poznyakoff authored
  9. 15 Nov, 2011 2 commits
    • * python/libmu_py/Makefile.am (libmu_py_la_SOURCES): Add errno.c
      * python/libmu_py/errno.c: New file.
      * python/libmu_py/libmu_py.c (_mu_py_module_name): New function.
      (_mu_py_attach_module): Use _mu_py_module_name to allocate FQ
      module name instead of taking the risk of using fixed size buffer.
      Don't call Py_InitModule if methods is NULL.
      (mu_py_attach_modules): Call _mu_py_attach_errno.
      * python/libmu_py/libmu_py.h (_mu_py_attach_errno): New proto.
      * python/mailutils/error.py: Re-export everything from c_api.errno.
      Remove hardcoded definitions of error codes.
      Sergey Poznyakoff authored
    • * libmu_cfg/tls.c (SSL_KEY_FILE_CHECKS): Mask out
      MU_FILE_SAFETY_OWNER_MISMATCH bit.
      * mu/shell.c: Handle SIGPIPE and SIGINTR.
      Sergey Poznyakoff authored
  10. 12 Nov, 2011 1 commit
  11. 10 Nov, 2011 3 commits
  12. 09 Nov, 2011 4 commits
  13. 08 Nov, 2011 2 commits
  14. 07 Nov, 2011 2 commits
  15. 06 Nov, 2011 1 commit
  16. 05 Nov, 2011 3 commits
    • * pop3d/pop3d.c (pop3d_mainloop): start in AUTHORIZATION if tls
      is established.
      Sergey Poznyakoff authored
    • * .gitmodules: Add imprimatur.
      * Makefile.am: Likewise.
      * configure.ac: Likewise.
      * doc/Makefile.am: Likewise.
      * bootstrap.conf: Comment out make in doc/texinfo
      * doc/texinfo/Makefile.am: Rewrite.
      * doc/texinfo/fdl.texi: Minor change.
      * doc/texinfo/getdate.texi: Minor change.
      * doc/texinfo/mailutils.texi: begin rewrite.
      * doc/texinfo/mu-mh.texi: Minor change.
      * doc/texinfo/programs.texi: begin rewrite.
      * doc/texinfo/sieve.texi: Minor change.
      * doc/texinfo/usage.texi: Minor change.
      
      * libmailutils/cfg/lexer.l: Allow for @ in unquoted strings
      * pop3d/bulletin.c: Relax safety checks for bulletin.db
      * pop3d/logindelay.c: Relax safety checks for stat.sb
      * pop3d/pop3d.h (DEFAULT_GROUP_DB_SAFETY): New define.
      Sergey Poznyakoff authored