1. 18 Nov, 2011 5 commits
    • * 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
  2. 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
  3. 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
  4. 12 Nov, 2011 1 commit
  5. 10 Nov, 2011 3 commits
  6. 09 Nov, 2011 4 commits
  7. 08 Nov, 2011 2 commits
  8. 07 Nov, 2011 2 commits
  9. 06 Nov, 2011 1 commit
  10. 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
  11. 04 Nov, 2011 4 commits
    • * libproto/pop/mbox.c (pop_scan): Make sure MU_EVT_MESSAGE_ADD is delivered
      when it is already possible to retrieve the message.
      * mail/mail.c (default_setup) <headline>: Use %L instead of %l.
      
      * mu/logger.c (logger_options)<priority>: Minor fix.
      Sergey Poznyakoff authored
    • * comsat/comsat.c (comsat_prefork,comsat_connection): Change signatures.
      * imap4d/imap4d.c: Implement imaps.
      * imap4d/imap4d.h (io_setio): Change signature.
      (tls_encryption_on): New proto.
      * imap4d/io.c (io_setio): Change signature.  Initialize TLS stream if
      requested.
      * imap4d/starttls.c (tls_encryption_on): New function.
      * include/mailutils/server.h (mu_srv_config): New struct.
      (mu_m_server_conn_fp, mu_m_server_prefork_fp): Remove typedefs.
      (mu_m_server_handler_fp): New typedef.
      (mu_m_server_set_conn): Change signature.
      (mu_m_server_set_prefork): Change signature.
      (mu_m_server_set_app_data_size)
      (mu_m_server_set_config_size): New prototype.
      (mu_m_server_cfg_init): Change signature.
      * include/mailutils/tls.h (mu_init_tls_libs): Change signature.
      * lib/tcpwrap.c: Include tcpwrap.h
      (mu_tcp_wrapper_daemon): Fix declaration.
      (mu_tcp_wrapper_prefork): Change signature.
      * lib/tcpwrap.h (mu_tcp_wrapper_prefork): Change signature
      * libmailutils/server/msrv.c (_mu_m_server) <conn,prefork>: Change
      data type.  All uses updated.
      <app_data_size>: New member.
      (m_srv_config): Remove struct.  Replaced with mu_srv_config from tls.h
      (mu_m_server_set_conn): Change signature.
      (mu_m_server_set_prefork): Change signature.
      (mu_m_server_set_app_data_size)
      (mu_m_server_set_config_size): New functions.
      (add_server): Allocate app_data_size additional bytes of data.
      (mu_m_server_cfg_init): Take one argument.
      * libmu_auth/tls.c (mu_tls_module_init): Update call to mu_init_tls_libs.
      Don't call mu_file_safety_check with NULL argument.
      (mu_init_tls_libs): Rewrite.  Prepare x509 here, instead of
      doing it each time a TLS stream is created.
      (mu_deinit_tls_libs): Free x509, if exists.
      (_tls_server_open): Update call to mu_init_tls_libs.
      Remove x509 initialization.
      * libmu_cfg/tls.c (cb2_safety_checks): Fix typos.
      * maidag/lmtp.c (lmtp_connection): Change signature.
      * maidag/maidag.c (main): Update call to mu_m_server_cfg_init.
      * maidag/maidag.h (lmtp_connection): Change signature.
      * pop3d/extra.c (pop3d_setio): Initialize TLS stream, if requested.
      * pop3d/pop3d.c: Implement pops.
      * pop3d/pop3d.h (pop3d_setio): Change prototype.
      Sergey Poznyakoff authored
    • * include/mailutils/sys/tls-stream.h (_mu_tls_stream_s): Remove.
      * libmailutils/diag/errors (MU_ERR_BAD_RESUMPTION): Remove. Use EAGAIN
      instead.
      (MU_ERR_DISABLED): New error code.
      * libmu_auth/tls.c (_tls_server_open): Return MU_ERR_DISABLED
      when needed.
      (_mu_tls_stream_create): Implement error_string method.
      * libproto/maildir/mbox.c (maildir_msg_init): Fix return value.
      Sergey Poznyakoff authored
    • Remove --tls option.  Make TLS stream open methods call mu_init_tls_libs.
      It is now not necessary to call this function explicitly, unless the
      application wishes to ensure TLS is initialized (e.g. pop3d or imap4d).
      
      * include/mailutils/libargp.h (mu_tls_cmdline): Remove.
      * libmu_argp/tls.c
      * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove tls.c
      * libmu_argp/cmdline.c (all_cmdline_capa): Remove tls.c
      * libmu_auth/tls.c [WITH_TLS] (mu_tls_module_config): Enable by default.
      (mu_check_tls_environment): Return 0 if TLS is disabled.
      (mu_init_tls_libs): Always call gnutls_global_init, otherwise any call
      to TLS library (especially, handshake) can produce a coredump.
      * libmu_cfg/tls.c: Fix description string for tls.enable.
      * mh/mh_init.c (mh_init): Remove call to mu_init_tls_libs, now unnecessary.
      * python/libmu_py/registrar.c: Likewise.
      * testsuite/smtpsend.c: Likewise.
      Sergey Poznyakoff authored
  12. 01 Nov, 2011 4 commits
  13. 31 Oct, 2011 2 commits
    • * include/mailutils/cctype.h (mu_isblank): Use mu_c_is_class.
      * libmailutils/string/muctype.c (mu_c_tab): Mark ' ' and '\t' as
      MU_CTYPE_BLANK.
      Sergey Poznyakoff authored
    • Fixes following bugs:
      
      1. In whitespace-must-follow mode a comment sequence immediately followed
      by a newline caused the next line to be treated as a comment.  Thus the
      following input:
      
      ;
      text
      
      produced empty output (see test icmt-dec-08).
      
      2. Line number information was not emitted before lines starting
      with a comment sequence substring, e.g.:
      
      ; comment
      ;valid line
      
      See test icmt-dec-09.
      
      * libmailutils/filter/inline-comment.c (ilcmt_state)
      Withdraw ilcmt_rollback_com state, use ilcmt_rollback instead.
      Withdraw ilcmt_newline_ac state, use ILCMT_EMIT_LINE_INFO flag instead.
      (ILCMT_EMIT_LINE_INFO): New flag.
      (ilcmt_data) <replay>: Remove.
      <rollback_buffer, rollback_size>
      <rollback_index>: New members.
      (init_rollback): New function.
      (_ilcmt_decoder): Use ilcmt_rollback state.
      <ilcmt_comment_ws>: Do not skip newline following the comment.  Emit
      line info before rolling back, if required.
      (_ilcmt_encoder): Use ilcmt_rollback state.
      * libmailutils/tests/inline-comment.at: Rename tests.
      Add tests for newline after a comment (icmt-dec-08) and
      line info with whitespace-follow mode (icmt-dec-09).
      Sergey Poznyakoff authored
  14. 29 Oct, 2011 2 commits
    • Sergey Poznyakoff authored
    • * libmailutils/diag/errors (MU_ERR_TCP_NO_HOST)
      (MU_ERR_TCP_NO_PORT): Change wording.
      (MU_ERR_UNSAFE_PERMS): Remove error code.
      (MU_ERR_NO_HANDLER): Remove. All uses replaced by ENOSYS.
      (MU_ERR_OUT_NULL): Remove. MU_ERR_OUT_PTR_NULL is used instead.
      (MU_ERR_MBX_NULL): Remove. Use EINVAL instead.
      (MU_ERR_BAD_822_FORMAT): Rename to MU_ERR_INVALID_EMAIL. Change wording.
      (MU_ERR_REPLY): Change wording.
      
      * libmailutils/url/create.c: Remove misguiding comments
      * libmailutils/url/set-service.c: Likewise.
      
      * libmailutils/mailbox/mailbox.c (mu_mailbox_open): Return EACCES
      if trying to update quick-access mailboxes.
      (mu_mailbox_get_stream): Mark for deletion.
      * libmailutils/stream/fltstream.c (filter_read)
      (filter_write_internal): Return MU_ERR_BUFSPACE if requested more
      space than available in I/O buffers.
      * libproto/mbox/mbox.c (mbox_expunge_unlocked): Send MU_EVT_MAILBOX_CORRUPT
      event if the mailbox shrunk.
      * libproto/mbox/mboxscan.c (mbox_scan_internal): Return MU_ERR_NOENT if
      unable to locate message in quick-access mode.
      Sergey Poznyakoff authored
  15. 28 Oct, 2011 2 commits
    • * include/mailutils/dbm.h (mu_dbm_init)
      (mu_dbm_get_hint): New prototypes.
      * include/mailutils/util.h (mu_stpcpy)
      (mu_file_safety_compose): New prototypes.
      * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add stpcpy.c
      * libmailutils/string/stpcpy.c: New file.
      * libmu_cfg/tls.c (cb2_safety_checks): Use mu_file_safety_compose.
      * libmu_dbm/create.c (mu_dbm_create): Use mu_dbm_init.
      * libmu_dbm/dbm.c (_mu_dbm_init): Rename mu_dbm_init. All uses changed.
      Use URL composing interface to create hints.
      * maidag/maidag.c (mu_dbm_get_hint): New function.
      * pop3d/pop3d.c (cb2_forward_file_checks): Use mu_file_safety_compose.
      (apop_database_name, apop_database_safety)
      (apop_database_safety_set): New variables.
      (pop3d_cfg_param) <apop-database-file>
      <apop-database-safety>: New configuration statements.
      (main) [ENABLE_DBM]: Initialize dbm safety criteria.
      * pop3d/apop.c (pop3d_apopuser): Use configured database name and
      safety flags, if set.
      * pop3d/pop3d.h [ENABLE_DBM] (APOP_PASSFILE): Add ".db" suffix.
      (apop_database_name, apop_database_safety)
      (apop_database_safety_set): New variables.
      Sergey Poznyakoff authored
    • * include/mailutils/url.h (mu_url_sget_name)
      (mu_url_aget_name,mu_url_get_name)
      (mu_url_invalidate,mu_url_create_null)
      (mu_url_set_user,mu_url_set_path,mu_url_set_scheme)
      (mu_url_set_host,mu_url_set_port,mu_url_set_service)
      (mu_url_set_auth,mu_url_set_secret,mu_url_add_param)
      (mu_url_clear_param,mu_url_add_query,mu_url_clear_query): New
      prototypes.
      
      * libmailutils/tests/url-comp.at: New test case.
      * libmailutils/tests/url-comp.c: New test program.
      * libmailutils/tests/.gitignore: Update.
      * libmailutils/tests/Makefile.am: Add new files.
      * libmailutils/tests/testsuite.at: Add new tests.
      
      * libmailutils/url/Makefile.am: Add new files.
      * libmailutils/url/add-param.c: New file.
      * libmailutils/url/add-query.c: New file.
      * libmailutils/url/clr-param.c: New file.
      * libmailutils/url/clr-query.c: New file.
      * libmailutils/url/null.c: New file.
      * libmailutils/url/set-auth.c: New file.
      * libmailutils/url/set-host.c: New file.
      * libmailutils/url/set-path.c: New file.
      * libmailutils/url/set-port.c: New file.
      * libmailutils/url/set-scheme.c: New file.
      * libmailutils/url/set-secret.c: New file.
      * libmailutils/url/set-service.c: New file.
      * libmailutils/url/set-user.c: New file.
      * libmailutils/url/urlinv.c: New file.
      
      * libmailutils/url/create.c (mu_url_create_hint): Return EINVAL if
      purl is NULL.
      * libmailutils/url/scheme.c (mu_url_set_scheme): Remove. See set-scheme.c
      * libmailutils/url/urlstr.c (mu_url_sget_name)
      (mu_url_aget_name,mu_url_get_name): New functions.
      (mu_url_to_string): Rewrite using the above.
      
      * libmailutils/base/Makefile.am: Add fscompose.c
      * libmailutils/base/fscompose.c: New file.
      Sergey Poznyakoff authored
  16. 27 Oct, 2011 1 commit