1. 23 Nov, 2016 1 commit
    • Three objectives:
      
      1. Simplify code.
      2. Produce optimized sieve code.
      3. Improve error reporting.
      4. Prepare for further extensions
      
      * include/mailutils/sieve.h (mu_sieve_tag_checker_t): Change
      signature (take mu_sieve_machine_t as the first arg).  All
      uses changed.
      (mu_sieve_require): Likewise.
      (mu_sieve_yydebug): Remove global.
      
      * libmu_sieve/sieve-priv.h (mu_locus_range): New struct.
      (YYLTYPE): New define
      (mu_sieve_state): New enum.
      (mu_sieve_machine): New members: string_pool, state.
      (mu_sieve_node_type): New enum.
      (mu_sieve_node): New struct.
      Remove unused prototypes.
      
      * libmu_sieve/sieve.l: Keep track of code locations.  Use opool
      for constructing string values.
      * libmu_sieve/sieve.y: Rewrite.  First build the parse tree.  Then
      optimize it.  Finally, generate code.
      * libmu_sieve/tests.c (sieve_test_true,sieve_test_false): Remove.
      True and false tests are always optimized away.
      * libmu_sieve/util.c (mu_sv_compile_error): Remove.
      
      * libmu_sieve/actions.c: Use mu_diag_at_locus to report errors
      and mu_i_sv_error to mark sieve machine as being in error state.
      * libmu_sieve/comparator.c: Likewise.
      * libmu_sieve/prog.c (mu_sv_code): Replace with mu_i_sv_code.
      (mu_sv_code_instr,mu_sv_code_handler)
      (mu_sv_code_list,mu_sv_code_number)
      (mu_sv_code_string,mu_sv_code_source)
      (mu_sv_code_line,mu_sv_change_source)
      (mu_sv_code_action,mu_sv_code_test)
      (mu_sv_code_anyof,mu_sv_code_allof): Remove.
      (mu_i_sv_locus,mu_i_sv_code_action)
      (mu_i_sv_code_test): New function.
      (mu_sv_code_command): Replace with a static function.
      * libmu_sieve/require.c (mu_sieve_require): Take ptr to machine
      as the first arg.
      * libmu_sieve/runtime.c (mu_sieve_mailbox)
      (mu_sieve_message): Refuse to run if the machine is in error state.
      
      * sieve/sieve.c: Update.
      * sieve/tests/i-numeric.at: Update expected error message.
      
      * libmailutils/diag/diag.c (mu_diag_at_locus): Don't pass locus
      if mu_file is NULL.
      * libmu_auth/ldap.c (_mu_entry_to_auth_data): Remove leftover
      mu_error.
      Sergey Poznyakoff authored
  2. 03 Nov, 2016 1 commit
    • The field-map statement (.ldap.field-map & .sql.field-map) takes a
      list of mappings as argument.  For compatibility and for internal purposes,
      a string is still allowed.
      
      * doc/texinfo/programs.texi: Update.
      * include/mailutils/cfg.h (mu_cfg_field_map): New proto.
      * include/mailutils/sql.h (mu_password_type): Rename.
      (mu_sql_module_config) <positional>: Remove.
      (mu_sql_decode_password_type): Remove prototype.
      * libmailutils/base/mutil.c (mu_sql_decode_password_type): Remove
      function.
      * libmailutils/cfg/driver.c (mu_cfg_field_map): New function.
      * libmu_auth/ldap.c (cb_field_map): Use mu_cfg_field_map.
      (module_init): Fix default filter.
      * libmu_auth/sql.c (cb_field_map): Use mu_cfg_field_map.
      (mu_sql_param): Rename "password-type" statement to "password-encryption".
      Remove the "positional" statement.
      Sergey Poznyakoff authored
  3. 29 Oct, 2016 1 commit
  4. 22 Oct, 2016 1 commit
  5. 19 Oct, 2016 2 commits
    • Sergey Poznyakoff authored
    • * Makefile.am: Remove libmu_argp and libmu_cfg
      * configure.ac: Likewise.
      * libmu_argp/: Remove.
      * libmu_cfg/: Remove.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Remove gocs.h,
      libargp.h, libcfg.h
      
      * frm/frm.c: Register tls auth module
      * frm/from.c: Likewise.
      * maidag/maidag.c: Likewise.
      * mail/mail.c: Likewise.
      * messages/messages.c: Likewise.
      * movemail/movemail.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * sieve/sieve.c: Likewise.
      * frm/frm.h: Remove obsolete includes
      
      * imap4d/Makefile.am: Update.
      * imap4d/imap4d.c: Use mu_cli for command line and configuration
      parsing.
      * imap4d/imap4d.h: Update.
      
      * include/mailutils/gocs.h: Remove.
      * libmailutils/cfg/gocs.c: Remove.
      * libmailutils/cfg/Makefile.am: Remove gocs.c
      
      * include/mailutils/cli.h (mu_cli_capa_apply): Rename to
      mu_cli_capa_extend_settings
      (mu_cli_setup) <inorder, prog_doc_hook>: New fields.
      * include/mailutils/daemon.h: Remove obsolete includes.
      * include/mailutils/gsasl.h: Likewise.
      * include/mailutils/mailutils.h: Update.
      * include/mailutils/mu_auth.h (mu_auth_mode): New enum
      (mu_auth_module): Redo structure.
      * include/mailutils/opt.h (mu_parseopt) <po_prog_doc_hook>: New field.
      * include/mailutils/sql.h (mu_sql_module_config): New extern.
      (mu_sql_interface_index): Change proto.
      * libmailutils/auth/mu_auth.c: Rewrite.
      * libmailutils/auth/system.c (mu_auth_system_module): Update structure
      * libmailutils/cli/capa.c (mu_cli_capa_apply): Rename to
      mu_cli_capa_extend_settings
      * libmailutils/cli/cli.c: Extend settings from auth modules as well.
      * libmailutils/opt/help.c (mu_program_help): Invoke po_prog_doc_hook
      if defined.
      * libmailutils/opt/opt.c (parseopt_init): Check the
      MU_PARSEOPT_PROG_DOC_HOOK flag.
      (find_long_option): Fix recognition of ambiguous options in case
      of exact match.
      * libmu_auth/gsasl.c: Add configuration.
      * libmu_auth/ldap.c: Likewise.
      * libmu_auth/pam.c: Likewise.
      * libmu_auth/radius.c: Likewise.
      * libmu_auth/sql.c: Likewise.
      * libmu_auth/tls.c: Likewise.
      * libmu_auth/virtual.c: Likewise.
      
      * mu/Makefile.am: Update.
      * mu/mu.c: Rewrite using mu_cli
      * mu/mu.h: Likewise.
      * mu/acl.c: Likewise.
      * mu/cflags.c: Likewise.
      * mu/dbm.c: Likewise.
      * mu/dispatch.c: Likewise.
      * mu/filter.c: Likewise.
      * mu/flt2047.c: Likewise.
      * mu/getans.c: Likewise.
      * mu/getarg.c: Likewise.
      * mu/getyn.c: Likewise.
      * mu/help.c: Likewise.
      * mu/imap.c: Likewise.
      * mu/info.c: Likewise.
      * mu/ldflags.c: Likewise.
      * mu/logger.c: Likewise.
      * mu/pop.c: Likewise.
      * mu/query.c: Likewise.
      * mu/send.c: Likewise.
      * mu/shell.c: Likewise.
      * mu/smtp.c: Likewise.
      * mu/util.c: Likewise.
      * mu/verbose.c: Likewise.
      * mu/wicket.c: Likewise.
      
      * pop3d/Makefile.am: Update.
      * pop3d/pop3d.c: Convert to mu_cli interface.
      * pop3d/pop3d.h: Likewise.
      
      * sql/sql.c (mu_sql_interface_index): Change argument qualifiers.
      Sergey Poznyakoff authored
  6. 12 Oct, 2016 1 commit
    • * configure.ac (MU_APP_NEW_LIBRARIES): New temp variable.
      
      * include/mailutils/sieve.h (mu_cli_capa_sieve): New extern.
      * include/mailutils/tls.h (mu_cli_capa_tls): New extern.
      
      * libmailutils/cli/cli.c: Minor change.
      * libmailutils/cli/stdcapa.c: Add "auth" capability.
      
      * libmu_auth/tls.c: provide mu_cli_capa_tls
      
      * dotlock/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * dotlock/dotlock.c
      
      * frm/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * frm/frm.h: Fix includes.
      * frm/frm.c: Use mu_cli for optionr&config parsing.
      * frm/from.c: Likewise.
      
      * messages/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * messages/messages.c: Use mu_cli for optionr&config parsing.
      
      * mimeview/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * mimeview/mimeview.c: Use mu_cli for optionr&config parsing.
      
      * movemail/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * movemail/movemail.c: Use mu_cli for optionr&config parsing.
      
      * readmsg/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * readmsg/readmsg.c: Use mu_cli for optionr&config parsing.
      
      * sieve/Makefile.am: Link with MU_APP_NEW_LIBRARIES
      * sieve/sieve.c: Use mu_cli for optionr&config parsing.
      Sergey Poznyakoff authored
  7. 22 Jan, 2016 1 commit
  8. 11 Jul, 2015 1 commit
    • * include/mailutils/stream.h (MU_IOCTL_TLSSTREAM): New ioctl code.
      (MU_IOCTL_TLS_GET_CIPHER_INFO): New ioctl opcode.
      * libmailutils/property/assocprop.c (_assoc_prop_fill)
      (_assoc_prop_save): allow for NULL stream pointer.
      * libmu_auth/tls.c (_tls_io_ioctl,_tls_ioctl): Handle
      MU_IOCTL_TLSSTREAM/MU_IOCTL_TLS_GET_CIPHER_INFO ioctl.
      
      * imap4d/io.c (log_cipher): New function.
      (io_setio, imap4d_init_tls_server): Call log_cipher after successfully
      establishing the TLS connection.
      * imap4d/starttls.c (tls_encryption_on): Remove diagnostic output.
      * pop3d/extra.c (log_cipher): New function.
      (pop3d_setio,pop3d_init_tls_server): Call log_cipher after successfully
      establishing the TLS connection.
      Sergey Poznyakoff authored
  9. 10 Jul, 2015 1 commit
    • Avoid calling gnutls_global_init (via mu_tls_module_init) prior
      to forking.  gnutls_global_init opens at least one file descriptor
      (/dev/urandom), and closing it will disrupt its operation.
      Current stable libgnutls (3.3.15) is able to cope with it, but
      there are plenty of systems running much older versions.
      
      * libmailutils/server/msrv.c (mu_m_server_begin): Reset onexit list
      after forking.
      * libmu_auth/tls.c (mu_tls_module_init): Don't call mu_init_tls_libs.
      (_tls_server_open, _tls_client_open): Check return value from
      mu_init_tls_libs.
      * imap4d/auth_gsasl.c (auth_gsasl): Use mu_onexit to
      register onexit functions.
      * imap4d/imap4d.h (util_atexit): Remove prototype.
      * imap4d/starttls.c (imap4d_starttls): Don't register
      mu_deinit_tls_libs: now done by tls library.
      (starttls_init): Don't call mu_init_tls_libs.
      * imap4d/util.c (util_atexit): Remove.
      (util_bye): Update accordingly.
      * pop3d/extra.c (pop3d_setio): Print informational message after
      establishing TLS.
      (pop3d_bye): Don't call mu_deinit_tls_libs: that's done by the library.
      * pop3d/pop3d.c (main): Don't call mu_init_tls_libs.
      Sergey Poznyakoff authored
  10. 02 Mar, 2015 1 commit
  11. 26 Feb, 2014 2 commits
  12. 05 Feb, 2014 1 commit
  13. 04 Feb, 2014 1 commit
  14. 13 Aug, 2013 1 commit
  15. 25 Mar, 2013 1 commit
  16. 25 Mar, 2012 1 commit
    • * examples/aclck.c: Check return values from strdup.
      * libmailutils/base/usremail.c: Likewise.
      * libmailutils/mailbox/bodystruct.c: Likewise.
      * lib/mailcap.c: Likewise.
      * libmailutils/mailbox/mbx_default.c: Likewise.
      * libmailutils/server/acl.c: Likewise.
      * libmailutils/stream/logstream.c: Likewise.
      * libmailutils/stream/message_stream.c: Likewise.
      * libmu_argp/mu_argp.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_auth/pam.c: Likewise.
      * libmu_auth/sql.c: Likewise.
      * libmu_sieve/comparator.c: Likewise.
      * libmu_sieve/conf.c: Likewise.
      * libmu_sieve/extensions/list.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libproto/mailer/prog.c: Likewise.
      * libproto/mailer/smtp_io.c: Likewise.
      * maidag/lmtp.c: Likewise.
      * python/libmu_py/address.c: Likewise.
      * sql/odbc.c
      
      * examples/sfrom.c (main): Avoid unnecessary memory allocation.
      * libmailutils/mailbox/mailbox.c: Likewise.
      
      * frm/frm.h: Include mailutils/alloc.h, remove xalloc.h
      * mh/mh.h: Likewise.
      
      * imap4d/imap4d.h: Remove xalloc.h
      * mail/mail.h: Likewise.
      * mimeview/mimeview.h: Likewise.
      * mu/acl.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      
      * include/mailutils/locker.h (mu_locker_set_default_external_program):
      Change returned type.
      * include/mailutils/mailbox.h (mu_set_folder_directory): Change
      returned type.
      * libmailutils/base/locker.c (mu_locker_set_default_external_program):
      Return int (error code).
      * libmailutils/base/tilde.c: Add extra checks
      * libmailutils/mime/mimehdr.c (_mime_header_parse): Bugfix.
      * mail/folders.c: Don't use alloca, use mu_alloc instead. It
      was the only use of that function in Mailutils, so this change
      allows to withdraw the alloca module.
      
      * gnulib.modules (alloca, malloc)
      (realloc, xalloc): Remove.
      
      * frm/common.c: Use mu_alloc and friends instead of xmalloc.
      * frm/from.c: Likewise.
      * imap4d/append.c: Likewise.
      * imap4d/auth_gsasl.c: Likewise.
      * imap4d/authenticate.c: Likewise.
      * imap4d/fetch.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * imap4d/io.c: Likewise.
      * imap4d/list.c: Likewise.
      * imap4d/namespace.c: Likewise.
      * imap4d/parsebuf.c: Likewise.
      * imap4d/preauth.c: Likewise.
      * imap4d/rename.c: Likewise.
      * imap4d/search.c: Likewise.
      * imap4d/util.c: Likewise.
      * libmu_argp/muinit.c: Likewise.
      * mail/alias.c: Likewise.
      * mail/alt.c: Likewise.
      * mail/copy.c: Likewise.
      * mail/decode.c: Likewise.
      * mail/escape.c: Likewise.
      * mail/file.c: Likewise.
      * mail/from.c: Likewise.
      * mail/mail.c: Likewise.
      * mail/mailline.c: Likewise
      * mail/mailvar.c: Likewise
      * mail/msgset.y: Likewise
      * mail/page.c: Likewise
      * mail/send.c: Likewise
      * mail/shell.c: Likewise
      * mail/unset.c: Likewise
      * mail/util.c: Likewise
      * mh/folder.c: Likewise
      * mh/mh_alias.l: Likewise
      * mh/mh_alias.y: Likewise
      * mh/mh_fmtgram.y: Likewise
      * mh/mh_format.c: Likewise
      * mh/mh_global.c: Likewise
      * mh/mh_init.c: Likewise
      * mh/mh_list.c: Likewise
      * mh/mh_whatnow.c: Likewise
      * mh/mh_whom.c: Likewise
      * mh/mhn.c: Likewise
      * mh/pick.y: Likewise
      * mh/prompter-rl.c: Likewise
      * mh/refile.c: Likewise
      * mh/repl.c: Likewise
      * mh/send.c: Likewise
      * mh/sortm.c: Likewise
      * mimeview/mimetypes.y: Likewise
      * mu/dbm.c: Likewise
      * mu/dispatch.c: Likewise
      * mu/imap.c: Likewise
      * mu/pop.c: Likewise
      * mu/shell.c: Likewise
      * pop3d/apop.c: Likewise
      * pop3d/bulletin.c: Likewise
      * pop3d/popauth.c: Likewise
      * pop3d/user.c: Likewise
      Sergey Poznyakoff authored
  17. 05 Jan, 2012 1 commit
  18. 28 Nov, 2011 1 commit
    • * configure.ac (IMAP_AUTHOBJS): Remove subst variable.  Use conditional
      instead.
      Configure imap4d/tests for testing.
      Build imap4d/tests/Makefile and imap4d/tests/atlocal.
      * imap4d/Makefile.am (SUBDIRS): Add tests.
      [MU_COND_GSASL]: Define AUTH_GSASL
      [MU_COND_GSSAPI]: Define AUTH_GSSAPI
      (imap4d_SOURCES): Include AUTH_GSASL and AUTH_GSSAPI
      (imap4d_LDADD,imap4d_DEPENDENCIES): Remove reference to IMAP_AUTHOBJS.
      (EXTRA_DIST): Remove.
      
      * imap4d/tests/.gitignore: New file.
      * imap4d/tests/IDEF0955.at: New file
      * imap4d/tests/IDEF0956.at: New file
      * imap4d/tests/Makefile.am
      * imap4d/tests/anystate.at: New file
      * imap4d/tests/atlocal.in
      * imap4d/tests/create01.at: New file
      * imap4d/tests/create02.at: New file
      * imap4d/tests/examine.at: New file
      * imap4d/tests/expunge.at: New file
      * imap4d/tests/id.at: New file
      * imap4d/tests/list.at: New file
      * imap4d/tests/search.at: New file
      * imap4d/tests/select.at: New file
      * imap4d/tests/status.at: New file
      * imap4d/tests/testsuite.at: New file
      
      * imap4d/fetch.c (fetch_io): Improve range checking.  If the requested
      number of bytes is greater than maximum, truncate it.
      * imap4d/imap4d.c: New option --test.
      (test_mode): New global variable.
      (imap4d_session_setup0): Fix improperly allocated automatic variable.
      (main): Call GSASL and GSSAPI initializations only if mu_gsasl_enabled()
      returns true.
      * imap4d/imap4d.h (test_mode): New extern.
      * imap4d/preauth.c: Do not complain about failed getpeername in test mode.
      * imap4d/select.c: Fix human-readable response texts.
      
      * include/mailutils/gsasl.h (mu_gsasl_module_data)<enable>: New member.
      (mu_gsasl_enabled): New proto.
      * libmailutils/mailbox/mailbox.c (mu_mailbox_flush):
      (mu_mailbox_append_message,mu_mailbox_sync)
      (mu_mailbox_expunge): Use MU_STREAM_WRITE instead of MU_STREAM_RDWR.
      * libmu_auth/gsasl.c (mu_gsasl_module_data): Fix initialization.
      (mu_gsasl_enabled): New function.
      * libmu_cfg/gsasl.c (mu_gsasl_param): New parameter "enable".
      Sergey Poznyakoff authored
  19. 24 Nov, 2011 1 commit
  20. 04 Nov, 2011 3 commits
    • * 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
  21. 24 Oct, 2011 1 commit
  22. 17 Oct, 2011 1 commit
    • Use it in maidag (.forward file safety) and in libmu_auth (TLS files).
      
      * include/mailutils/tls.h (mu_tls_module_config): New members
      for safety check flags.
      * include/mailutils/util.h (MU_FILE_SAFETY_NONE,MU_FILE_SAFETY_ALL)
      (MU_FILE_SAFETY_OWNER_MISMATCH)
      (MU_FILE_SAFETY_GROUP_WRITABLE,MU_FILE_SAFETY_WORLD_WRITABLE)
      (MU_FILE_SAFETY_GROUP_READABLE,MU_FILE_SAFETY_WORLD_READABLE)
      (MU_FILE_SAFETY_LINKED_WRDIR)
      (MU_FILE_SAFETY_DIR_IWGRP,MU_FILE_SAFETY_DIR_IWOTH): New constants.
      (mu_file_safety_check,mu_file_safety_name_to_code)
      (mu_file_safety_name_to_error): New protos.
      * libmailutils/base/checkperms.c: New file.
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add checkperms.c.
      * libmailutils/diag/errors: Add new error codes.
      (MU_ERR_UNSAFE_PERMS): change description wording.
      * libmu_auth/tls.c (mu_check_tls_environment): Use mu_file_safety_check.
      * libmu_cfg/tls.c (tls_settings): Initialize.
      (mu_tls_param): New configuration file statements:
      key-file-safety-checks, cert-file-safety-checks, ca-file-safety-checks.
      * maidag/forward.c (maidag_forward): Use mu_file_safety_check.
      * maidag/maidag.c (cb2_forward_file_checks): Use
      mu_file_safety_name_to_code.
      Sergey Poznyakoff authored
  23. 04 Aug, 2011 1 commit
    • * libmailutils/base/assoc.c (first): Set index to max value
      if tab is NULL to indicate immediate end of iteration.
      * libmu_auth/sql.c (mu_auth_sql_by_name)
      (mu_auth_sql_by_uid): Check the return from mu_sql_num_tuples.
      (mu_sql_getpass): Check the number of returned tuples.
      Return failure if returned a NULL password.
      * libmu_scm/mu_message.c (string_sloppy_member): Remove.
      (mu-message-get-header-fields): Use scm_member instead of
      string_sloppy_member.
      * sql/postgres.c (chop): Handle NULL argument.
      Sergey Poznyakoff authored
  24. 02 Jan, 2011 1 commit
  25. 25 Dec, 2010 1 commit
    • * libmu_auth/tls.c (_tls_ioctl): Fix typo (opcode used instead of
      code).
      * mu/filter.c (mutool_filter): Reference mu_strin to prevent it from
      destroying.
      * testsuite/smtpsend.c (main): Call mu_stdstream_setup.
      Sergey Poznyakoff authored
  26. 10 Dec, 2010 1 commit
    • * examples/mta.c: Use MU_STREAM_FD_AUTOCLOSE.
      * imap4d/io.c: Likewise.
      * libmailutils/stream/file_stream.c: Likewise.
      * libmailutils/stream/prog_stream.c: Likewise.
      * libmailutils/stream/socket_stream.c: Likewise.
      * libmailutils/stream/temp_file_stream.c: Likewise.
      * maidag/lmtp.c: Likewise.
      * pop3d/extra.c: Likewise.
      
      * imap4d/preauth.c: Do not use MU_STREAM_AUTOCLOSE.  Instead unref the
      transport stream after creating the derived one.
      * libmailutils/base/rfc2047.c: Likewise.
      * libmailutils/stream/fltstream.c: Likewise.
      * libmailutils/tests/fltst.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_auth/tls.c: Likewise.
      * libmu_sieve/extensions/vacation.c: Likewise.
      * libproto/pop/pop3_stream.c: Likewise.
      * mail/decode.c: Likewise.
      * mh/mhn.c: Likewise.
      
      * libmailutils/filter/filter_iconv.c: Do not handle MU_STREAM_AUTOCLOSE.
      * libmailutils/stream/rdcache_stream.c: Likewise.
      * libmailutils/stream/streamref.c: Likewise.
      * libmailutils/stream/xscript-stream.c: Likewise.
      
      * include/mailutils/stream.h (MU_STREAM_AUTOCLOSE): Rename to
      MU_STREAM_FD_AUTOCLOSE.
      Sergey Poznyakoff authored
  27. 06 Dec, 2010 1 commit
    • The mu_stream_ioctl function gets two argument that identify the ioctl
      in question: "family", which identifies a family of ioctls in question,
      and "opcode", which indicates the requested operation within that family.
      
      * include/mailutils/stream.h: Define ioctl families and opcodes.
      (mu_stream_ioctl): Change signature.
      * include/mailutils/sys/stream.h (_mu_stream)<ctl>: Change signature.
      
      * include/mailutils/log.h (mu_severity_from_string)
      (mu_severity_to_string): New protos.
      
      * libmailutils/stream/stream.c (mu_stream_ioctl): Change signature.
      
      * libmailutils/filter/filter_iconv.c: Rewrite ioctl support.
      * libmailutils/stream/file_stream.c: Likewise.
      * libmailutils/stream/fltstream.c: Likewise.
      * libmailutils/stream/iostream.c: Likewise.
      * libmailutils/stream/logstream.c: Likewise.
      * libmailutils/stream/mapfile_stream.c: Likewise.
      * libmailutils/stream/memory_stream.c: Likewise.
      * libmailutils/stream/nullstream.c: Likewise.
      * libmailutils/stream/prog_stream.c: Likewise.
      * libmailutils/stream/rdcache_stream.c: Likewise.
      * libmailutils/stream/streamref.c: Likewise.
      * libmailutils/stream/syslogstream.c: Likewise.
      * libmailutils/stream/tcp.c: Likewise.
      * libmailutils/stream/xscript-stream.c: Likewise.
      * libmu_auth/tls.c: Likewise.
      
      * comsat/action.c: Change calls to mu_stream_ioctl.
      * imap4d/auth_gsasl.c: Likewise.
      * imap4d/io.c: Likewise.
      * imap4d/util.c: Likewise.
      * libmailutils/base/getpass.c: Likewise.
      * libmailutils/cfg/parser.y: Likewise.
      * libmailutils/mailbox/body.c: Likewise.
      * libmailutils/mime/mime.c: Likewise.
      * libmailutils/stdstream/dbgstream.c: Likewise.
      * libmailutils/stdstream/strerr.c: Likewise.
      * libmu_sieve/runtime.c: Likewise.
      * libmu_sieve/sieve.y: Likewise.
      * libmu_sieve/util.c: Likewise.
      * libproto/imap/trace.c: Likewise.
      * libproto/mailer/smtp_data.c: Likewise.
      * libproto/mailer/smtp_starttls.c: Likewise.
      * libproto/mailer/smtp_trace.c: Likewise.
      * libproto/pop/pop3_stls.c: Likewise.
      * libproto/pop/pop3_stream.c: Likewise.
      * libproto/pop/pop3_trace.c: Likewise.
      * maidag/lmtp.c: Likewise.
      * mail/source.c: Likewise.
      * mu/logger.c: Likewise.
      * pop3d/extra.c: Likewise.
      * pop3d/retr.c: Likewise.
      
      * TODO: Update.
      * doc/texinfo/nullstream.texi: Update.
      Sergey Poznyakoff authored
  28. 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
  29. 24 Nov, 2010 1 commit
    • Static memory stream is a read-only stream whose transport is
      an arbitrary area of memory.  Such streams allow the programmer
      to access C strings using streams interface.
      
      * include/mailutils/stream.h (mu_static_memory_stream_create): New
      proto.
      * libmailutils/stream/memory_stream.c (mu_static_memory_stream_create): New
      function.
      * imap4d/append.c (imap4d_append0): Use static memory stream to
      create a temporary message.
      * imap4d/preauth.c (decode64_buf): Use static memory stream.
      * libmailutils/base/rfc2047.c (mu_rfc2047_decode): Likewise.
      * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Likewise.
      * libmu_auth/ldap.c (chk_md5, chk_sha, chk_ssha): Likewise.
      * libmu_sieve/extensions/vacation.c (build_mime): Likewise.
      Sergey Poznyakoff authored
  30. 20 Nov, 2010 1 commit
    • * libmailutils/filter/header.c: New file.
      * libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add header.c.
      * libmailutils/filter/filter.c (mu_filter_get_list): Register
      mu_header_filter.
      * libmailutils/filter/inline-comment.c: (ilcmt_ws)
      (ilcmt_rollback): New states.
      (ILCMT_REMOVE_EMPTY_LINES,ILCMT_SQUEEZE_WS): New flags.
      (ilcmt_data)<buf,size,level,replay>: New members.
      (ilcmt_action): New enum
      (new_ilcmt_state): Return enum ilcmt_action.
      (_ilcmt_decoder): Optionally remove
      empty lines and squeeze leading white space.
      * libmailutils/property/mhprop.c (_mh_prop_read_stream): Remove
      empty lines from the input.
      
      * libmailutils/tests/Makefile.am (TESTSUITE_AT): Add hdrflt.at
      and inline-comment.at.
      * libmailutils/tests/testsuite.at: Include hdrflt.at and inline-comment.at.
      * libmailutils/tests/fltst.c: Pass optional arguments to the
      filter creation procedure.
      
      * mh/mh_whom.c (read_header): New function.
      (mh_whom): Rewrite using headers.
      
      * include/mailutils/filter.h: Fix a typo.
      * libmailutils/stream/fltstream.c: Likewise.
      * libmu_auth/gsasl.c: Likewise.
      Sergey Poznyakoff authored
  31. 08 Nov, 2010 1 commit
    • * include/mailutils/imap.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add imap.h
      
      * libproto/imap/capability.c: New file.
      * libproto/imap/capatst.c: New file.
      * libproto/imap/carrier.c: New file.
      * libproto/imap/connect.c: New file.
      * libproto/imap/create.c: New file.
      * libproto/imap/destroy.c: New file.
      * libproto/imap/disconnect.c: New file.
      * libproto/imap/err.c: New file.
      * libproto/imap/fake-folder.c: New file.
      * libproto/imap/logout.c: New file.
      * libproto/imap/response.c: New file.
      * libproto/imap/state.c: New file.
      * libproto/imap/tag.c: New file.
      * libproto/imap/trace.c: New file.
      * libproto/imap/Makefile.am (libmu_imap_la_SOURCES): Temporarly
      remove folder.c, mbox.c and url.c. Add new files.
      
      * mu/getarg.c: New file.
      * mu/imap.c: New file.
      * mu/verbose.c: New file.
      * mu/Makefile.am (IDLE_MODULES): New variable.
      (IMAP_C): New variable.
      (MODULES): Add $(IMAP_C).
      (mu_SOURCES): Add getarg.c and verbose.c
      (mu-setup.h, mu-setup.c): Add IDLE_MODULES both to the dependencies
      and to the mu-setup.awk command line.
      * mu/mu-setup.awk: New keyword mu-cond.
      * mu/pop.c: Add mu-cond keyword.
      
      * include/mailutils/sys/imap.h: Rewrite.
      * include/mailutils/sys/pop3.h (MU_POP3_CHECK_EAGAIN): Take into
      account MU_ERR_REPLY and MU_ERR_BADREPLY, which are recoverable errors.
      
      * libmailutils/base/list.c (mu_list_clear): Return immediately if
      list is NULL.
      * libmu_auth/sql.c (sql_escape_string): Remove unused variable.
      
      * libproto/pop/pop3_carrier.c (mu_pop3_get_carrier): Increase refcount
      on the returned stream.
      * libproto/pop/pop3_response.c (mu_pop3_response): Check POP3 reply code.
      Sergey Poznyakoff authored
  32. 02 Nov, 2010 1 commit
  33. 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
  34. 28 Oct, 2010 1 commit
    • The wordsplit module (borrowed from another project of mine, called 'grecs')
      provides a flexible and powerful mechanism for parsing input in a way
      similar to posix-shell.  In particular, the POSIX function wordexp is
      a subset of the wordsplit functionality.
      
      The argcv module is now deprecated.
      
      * include/mailutils/wordsplit.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add wordsplit.h
      * libmailutils/string/wordsplit.c: New file.
      * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add wordsplit.c.
      * include/mailutils/argcv.h (mu_argcv_join): New proto.
      (mu_argcv_get, mu_argcv_get_n, mu_argcv_get_np)
      (mu_argcv_unquote_char, mu_argcv_quote_char)
      (mu_argcv_quoted_length, mu_argcv_unquote_copy)
      (mu_argcv_quote_copy): Mark as deprecated.
      * include/mailutils/mailutils.h: Include wordsplit.h.
      
      * libmailutils/tests/wsp.c: New file.
      * libmailutils/tests/.gitignore: List wsp.
      * libmailutils/tests/wordsplit.at: New file.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wsp
      (TESTSUITE_AT): Add wordsplit.at.
      * libmailutils/tests/argcv.c: Define MU_ARCGV_DEPRECATED to
      avoid deprecation warnings.
      * libmailutils/tests/testsuite.at: Include wordsplit.at.
      
      * libmailutils/base/argcvfree.c: New file.
      * libmailutils/base/argcvjoin.c: New file.
      * libmailutils/base/argcvrem.c: New file.
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add new files.
      
      * libmailutils/base/argcv.c: Define MU_ARCGV_DEPRECATED to
      avoid deprecation warnings.
      (argcv_string, argcv_free, argv_free)
      (mu_argcv_remove): Rewrite in separate modules.
      
      * comsat/comsat.h: Include wordsplit.h.
      * imap4d/imap4d.h: Likewise.
      * mail/mail.h: Likewise.
      * mh/mh.h: Likewise.
      * readmsg/readmsg.h: Likewise.
      
      * comsat/action.c: Use wordsplit.
      * imap4d/fetch.c: Likewise.
      * lib/mailcap.c: Likewise.
      * libmailutils/auth/mu_auth.c: Likewise.
      * libmailutils/base/mutil.c: Likewise.
      * libmailutils/cfg/format.c: Likewise.
      * libmailutils/cfg/lexer.l: Likewise.
      * libmailutils/cfg/parser.y: Likewise.
      * libmailutils/diag/gdebug.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/server/acl.c: Likewise.
      * libmailutils/stream/prog_stream.c: Likewise.
      * libmailutils/tests/listop.c: Likewise.
      * libmailutils/url/create.c: Likewise.
      * libmu_auth/ldap.c: Likewise.
      * libmu_auth/radius.c: Likewise.
      * libmu_sieve/sieve.l: Likewise.
      * libproto/mailer/mbox.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mailer/smtp_gsasl.c: Likewise.
      * mail/mailline.c: Likewise.
      * mail/mailvar.c: Likewise.
      * mail/send.c: Likewise.
      * mail/util.c: Likewise.
      * mh/folder.c: Likewise.
      * mh/mh_alias.y: Likewise.
      * mh/mh_argp.c: Likewise.
      * mh/mh_init.c: Likewise.
      * mh/mh_list.c: Likewise.
      * mh/mh_msgset.c: Likewise.
      * mh/mh_sequence.c: Likewise.
      * mh/mh_whatnow.c: Likewise.
      * mh/mh_sequence.c: Likewise.
      * mh/mh_whatnow.c: Likewise.
      * mh/mhn.c: Likewise.
      * mh/send.c: Likewise.
      * movemail/movemail.c: Likewise.
      * mu/shell.c: Likewise.
      * readmsg/readmsg.c: Likewise.
      * testsuite/smtpsend.c: Likewise.
      
      * pop3d/popauth.c: Use wordsplit.
      Use simplified input format (username and password delimited
      by any amount of whitespace).
      Read/produce old format if invoked with the --compatibility option.
      
      * examples/aclck.c: Use wordsplit instead of argcv.
      * examples/header.c: Likewise.
      * examples/mta.c: Likewise.
      * examples/.gitignore: Remove pop3client.
      * examples/Makefile.am: Remove pop3client.
      
      * po/POTFILES.in: Add new files.
      Sergey Poznyakoff authored
  35. 11 Oct, 2010 1 commit
    • * comsat/action.c (run_user_action): Use mu_make_file_name.
      * imap4d/lsub.c (imap4d_lsub): Likewise.
      * imap4d/subscribe.c (imap4d_subscribe): Likewise.
      * imap4d/unsubscribe.c (imap4d_unsubscribe): Likewise.
      * libmailutils/base/filename.c (mu_get_full_path): Likewise.
      * libmailutils/base/tempfile.c (mu_tempfile): Likewise.
      * libmailutils/base/url.c (_url_path_default): Likewise.
      * libmu_auth/virtual.c (getpwnam_virtual)
      (mu_auth_virt_domain_by_name): Likewise.
      * libmu_sieve/extensions/vacation.c (check_db): Likewise.
      * libmu_sieve/sieve.l (_try_include): Likewise.
      * maidag/forward.c (maidag_forward): Likewise.
      
      * mh/mh.h (mh_safe_make_file_name): New proto.
      * mh/mh_init.c (mh_audit_open,mh_get_dir)
      (mh_expand_name,mh_real_install): Use mh_safe_make_file_name.
      (mh_safe_make_file_name): New function.
      * mh/folder.c (read_seq_file, _scan): Use mh_safe_make_file_name.
      * mh/mh_global.c (mh_read_profile, _mh_init_global_sequences): Likewise.
      * mh/install-mh.c (main): Likewise.
      * mh/mhn.c (normalize_path, store_handler, main): Likewise.
      * mh/repl.c (make_draft): Likewise.
      * mh/rmf.c (rmf): Likewise.
      * mh/sortm.c (swap_message): Likewise.
      * mimeview/mimetypes.l (mimetypes_open): Likewise.
      
      * lib/mailcap.c: Add error checking.
      Sergey Poznyakoff authored
  36. 10 Oct, 2010 1 commit
    • * libmailutils/base/mutil.c (mu_hex2ul, mu_hexstr2ul): Move to string/hexstr.c.
      (mu_get_homedir, mu_get_full_path)
      (mu_expand_path_pattern): Move to base/filename.c.
      (mu_getcwd): Move to base/getcwd.c.
      (mu_tilde_expansion): Move to base/tilde.c
      (mu_cpystr): Move to string/cpystr.c.
      (mu_get_host_name): Move to base/hostname.c.
      (mu_set_user_email,mu_set_user_email_domain)
      (mu_get_user_email_domain,mu_aget_user_email_domain)
      (mu_get_user_email,mu_normalize_path): Move to base/usremail.c.
      (mu_tempfile,mu_tempname): Move to base/tempfile.c.
      (mu_spawnvp): Move to base/spawnvp.c.
      (mu_qualify_link,mu_unroll_symlink): Move to base/symlink.c.
      (mu_rfc2822_references,mu_rfc2822_msg_id)
      (mu_rfc2822_in_reply_to): Move to base/msgid.c.
      (mu_strcasestr): Move to string/cstrcasestr.c.
      (mu_string_unfold): Move to string/unfold.c.
      (mu_true_answer_p): Move to string/trueans.c.
      (mu_scheme_autodetect_p): Move to base/schemeauto.c.
      (mu_fd_wait): Move to base/fdwait.c.
      (mu_set_default_fallback,mu_decode_filter): Move to filter/decode.c.
      (__argp_base_name): Move to lib/argp_base.c.
      
      * libmailutils/base/fdwait.c: New file.
      * libmailutils/base/filename.c: New file.
      * libmailutils/base/getcwd.c: New file.
      * libmailutils/base/hostname.c: New file.
      * libmailutils/base/msgid.c: New file.
      * libmailutils/base/schemeauto.c: New file.
      * libmailutils/base/spawnvp.c: New file.
      * libmailutils/base/symlink.c: New file.
      * libmailutils/base/tempfile.c: New file.
      * libmailutils/base/tilde.c: New file.
      * libmailutils/base/usremail.c: New file.
      * libmailutils/base/Makefile.am: Add new files.
      
      * libmailutils/filter/decode.c: New file.
      * libmailutils/filter/Makefile.am: Add new files.
      
      * libmailutils/string/cpystr.c: New file.
      * libmailutils/string/cstrcasestr.c: New file.
      * libmailutils/string/hexstr.c: New file.
      * libmailutils/string/trueans.c: New file.
      * libmailutils/string/unfold.c: New file.
      * libmailutils/string/Makefile.am: Add new files.
      
      * lib/argp_base.c: New file.
      * lib/Makefile.am: Add new files.
      
      * include/mailutils/io.h: Include stdarg.h
      * include/mailutils/mutil.h: Rename to util.h.  Reorder prototypes
      and declarations in logical groups.  All uses changed.
      
      * include/mailutils/cstr.h (mu_strcasestr): New proto, moved from
      include/mailutils/mutil.h.
      Sergey Poznyakoff authored