1. 02 Nov, 2016 1 commit
    • * include/mailutils/cfg.h (mu_cfg_parse_hints):
      Rename site_rcfile to site_file, custom_rcfile to custom_file.
      Remove append_tree and data fields.
      (MU_PARSE_CONFIG_GLOBAL,MU_CFG_PARSE_PROGRAM): Remove.
      (MU_PARSE_CONFIG_VERBOSE): Rename to MU_CF_VERBOSE.
      (MU_PARSE_CONFIG_DUMP): Rename to MU_CF_DUMP.
      (MU_CFG_FMT_LOCUS): Rename to MU_CF_FMT_LOCUS.
      (MU_CFG_FMT_VALUE_ONLY): Rename to MU_CF_FMT_VALUE_ONLY.
      (MU_CFG_FMT_PARAM_PATH): Rename to MU_CF_FMT_PARAM_PATH.
      
      (MU_CFG_COMPATIBILITY,MU_CFG_DEPRECATED): Remove.
      (mu_parse_config, mu_get_config): Remove deprecated functions.
      
      * libmailutils/cli/cli.c (mu_general_help_text): New global.
      (app_data): New struct.
      (init_options): Construct configuration option group depending on
      which configuration files are in use.
      (mu_cli_ext): Don't use per-user configuration files for servers.
      Pass pointer to app_data structure as po.po_data
      (mu_cli): Set MU_CFHINT_PER_USER_FILE flag by default.
      
      * mail/testsuite/lib/mail.exp: Rewrite invocation of the mu_init command.
      * include/mailutils/cli.h (mu_cli_setup) <server>: New field.
      
      * comsat/comsat.c (cli): Mark as server.
      (main): Bugfix: pass pointer to server to mu_cli.
      * imap4d/imap4d.c (cli): Mark as server.
      * pop3d/pop3d.c: Likewise.
      
      * comsat/tests/testsuite.at: Use the --no-site-config
      option.
      * imap4d/tests/testsuite.at: Likewise.
      
      * libmailutils/cfg/driver.c: Update.
      * libmailutils/cfg/format.c: Update.
      * libmailutils/cfg/lexer.l: Update.
      * libmailutils/cfg/parser.y: Update.
      * mu/acl.c: Update.
      
      * pop3d/testsuite/lib/pop3d.exp: Likewise.
      
      * mu/mu.c: Don't read configuration files.
      * mu/query.c: Fix args_doc
      
      * testsuite/lib/mailutils.exp (mu_init): Change option handling.
      Set --no-config option by default.
      Sergey Poznyakoff authored
  2. 29 Oct, 2016 1 commit
  3. 22 Oct, 2016 2 commits
    • * include/mailutils/cfg.h (MU_CFG_APPEND_TREE): New flag.
      * include/mailutils/cli.h (mu_version_copyright): New extern.
      (mu_cli_ext): New proto.
      * libmailutils/cfg/parser.y (mu_cfg_parse_config): Check for
      MU_CFG_APPEND_TREE bit set before accessing hints->append_tree.
      * libmailutils/cli/cli.c (param_set): Likewise.
      (mu_cli_ext): New function.
      (mu_cli): Rewrite as an entry point to mu_cli_ext.
      
      * comsat/comsat.c: Remove inclusion of obsolete headers.
      * mu/help.c: Likewise.
      * pop3d/extra.c: Likewise.
      Sergey Poznyakoff authored
    • * include/mailutils/cli.h (mu_version_func): Rename to mu_version_hook.
      * libmailutils/cli/cli.c: Likewise.
      * pop3d/popauth.c: Likewise.
      * mh/mh_getopt.c: (mh_getopt): Initialize NLS support. Install
      standard version hook (needed for mh-e autodetect feature).
      
      * mh/ali.c: Update prog_doc. Remove NLS initialization.
      * mh/anno.c: Likewise
      * mh/burst.c: Likewise
      * mh/comp.c: Likewise
      * mh/fmtcheck.c: Likewise
      * mh/folder.c: Likewise
      * mh/forw.c: Likewise
      * mh/inc.c: Likewise
      * mh/install-mh.c: Likewise
      * mh/mark.c: Likewise
      * mh/mhl.c: Likewise
      * mh/mhn.c: Likewise
      * mh/mhparam.c: Likewise
      * mh/mhpath.c: Likewise
      * mh/mhseq.c: Likewise
      * mh/msgchk.c: Likewise
      * mh/pick.c: Likewise
      * mh/prompter.c: Likewise
      * mh/refile.c: Likewise
      * mh/repl.c: Likewise
      * mh/rmf.c: Likewise
      * mh/rmm.c: Likewise
      * mh/scan.c: Likewise
      * mh/send.c: Likewise
      * mh/show.c: Likewise
      * mh/sortm.c: Likewise
      * mh/whatnow.c: Likewise
      * mh/whom.c: Likewise
      Sergey Poznyakoff authored
  4. 19 Oct, 2016 2 commits
    • * 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
  5. 17 Oct, 2016 1 commit
  6. 16 Oct, 2016 1 commit
  7. 08 Oct, 2016 1 commit
    • * include/mailutils/cfg.h (mu_cfg_param_data_type): Remove.
      (mu_cfg_param_type): New enum.
      (mu_cfg_param) <type>: Change type to int.
      (mu_cfg_cidr): Remove.
      (mu_cfg_parse_boolean): Remove.  All uses updated.
      * include/mailutils/util.h (mu_c_void): New constant.
      (mu_c_type_str): New extern/
      * libmailutils/string/str_to_c.c (mu_c_type_str): New global.
      * libmailutils/cfg/format.c (mu_cfg_data_type_string): Rename
      to mu_c_type_string; change argument type.
      All uses updated.
      * libmailutils/cfg/parser.y: Use mu_str_to_c for value
      conversion.
      
      * libmailutils/tests/.gitignore: Update.
      * libmailutils/tests/Makefile.am: Add strtoc.at; build strtoc
      * libmailutils/tests/strtoc.at: New file.
      * libmailutils/tests/strtoc.c: New file.
      * libmailutils/tests/testsuite.at: Include strtoc.at
      
      * comsat/comsat.c: Use mu_c_type_t types.
      * dotlock/dotlock.c: Likewise.
      * imap4d/imap4d.c: Likewise.
      * lib/manlock.c: Likewise.
      * lib/tcpwrap.c: Likewise.
      * libmailutils/server/msrv.c: Likewise.
      * libmu_argp/muinit.c: Likewise.
      * libmu_cfg/common.c: Likewise.
      * libmu_cfg/gsasl.c: Likewise.
      * libmu_cfg/ldap.c: Likewise.
      * libmu_cfg/pam.c: Likewise.
      * libmu_cfg/radius.c: Likewise.
      * libmu_cfg/sieve.c: Likewise.
      * libmu_cfg/sql.c: Likewise.
      * libmu_cfg/tls.c: Likewise.
      * libmu_cfg/virtdomain.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
  8. 22 Aug, 2016 1 commit
    • New statement backlog is provided in the server block.
      
      * include/mailutils/server.h (mu_m_server_cfg_init): Pass
      mu_m_server_t as first argument.
      * libmailutils/server/msrv.c (mu_m_server_cfg_init): Pass
      mu_m_server_t as first argument. Customize available statements
      depending on the type of server (tcp vs udp).
      New statement "backlog" available for tcp servers.
      
      * comsat/comsat.c: Update call to mu_m_server_cfg_init
      * imap4d/imap4d.c: Likewise.
      * pop3d/pop3d.c: Likewise.
      * maidag/maidag.c: Likewise.
      Sergey Poznyakoff authored
  9. 22 Jan, 2016 2 commits
  10. 04 Aug, 2015 1 commit
  11. 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
  12. 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
  13. 02 Jul, 2015 1 commit
    • * configure.ac: Version 2.99.99
      * NEWS: Update.
      * libmu_argp/mailutils.c: New file.
      * libmu_argp/Makefile.am: Add mailutils.c
      * libmu_argp/cmdline.c (all_cmdline_capa): Add mu_mailutils_cmdline.
      (mu_libargp_init): Register modflags function.
      * libmu_argp/mu_argp.c (mu_build_argp): Retain negative group numbers.
      (argp_capa): New member: modflags.
      (mu_register_argp_capa): Take pointer to modflags function as 3rd
      parameter.
      (mu_build_argp): Use modflags member to alter argp flags.
      (mu_argp_build): Take pointer to flags as its third argument.
      * libmu_argp/muinit.c (mu_app_init): Pass pointer to flags to mu_argp_build.
      * libmu_cfg/init.c (mu_libcfg_init): Silently ignore unknown groups
      
      * include/mailutils/libargp.h (mu_mailutils_cmdline): New extern.
      (mu_cmdline_capa): New member: modflags.
      (mu_argp_build): Change signature.
      (mu_register_argp_capa): Change signature.
      * libmailutils/cfg/gocs.c (std_gocs_table): Add dummy entry for "mailutils"
      
      * mu/Makefile.am (bin_PROGRAMS): Rename to "mailutils".
      * mu/dispatch.c (dispatch_docstring): Use mu_program_name instead of
      the hardcoded name.
      * mu/mu.c: Use "mailutils" capability.
      * mu/mailutils-config.in: Rename to mu/mailutils-config
      
      * comsat/comsat.c: Use "mailutils" capability.
      * dotlock/dotlock.c: Likewise.
      * examples/muauth.c: Likewise.
      * examples/muemail.c: Likewise.
      * frm/frm.c: Likewise.
      * frm/from.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
  14. 24 Jun, 2015 1 commit
    • This commit converts libmuaux into installable shared library that
      includes selected modules from gnulib.  Correspondingly,
      lubmu_argp is also converted into installable shared library, which
      is the main purpose of these changes.  This should allow other packages
      which depend on Mailutils to link against libmu_argp even on systems
      that for some reason choose not to include static libraries in their
      distribution (vide Debian).  Another side effect is that such packages
      won't need to bother about argp being present on the system, as it is
      now included in libmuaux.so.
      
      * bootstrap.conf: Don't create Makefile.am
      Build gnulib using libtool and use mu_am_flags custom module
      * lib/local/modules/mu_am_flags: New file.
      * configure.ac (MU_APP_LIBRARIES): Use libmu_argp.la
      (TCPWRAP_LIBRARIES): Add libmutcpwrap.a
      * lib/Makefile.am: Make libmuaux installable shared library
      New static library libmutcpwrap.a
      * libmu_argp/Makefile.am: Make libmu_argp installable shared library
      * examples/Makefile.am: Use libmu_argp.la
      * examples/cpp/Makefile.am: Likewise.
      * imap4d/Makefile.am: Likewise.
      * mapi/Makefile.am: Likewise.
      * mh/Makefile.am: Likewise,
      * pop3d/Makefile.am: Likewise.
      Sergey Poznyakoff authored
  15. 02 Mar, 2015 1 commit
  16. 26 Feb, 2014 2 commits
  17. 05 Feb, 2014 1 commit
  18. 04 Feb, 2014 2 commits
  19. 24 Dec, 2013 1 commit
    • The bug was introduced in commit 6e2a3758.
      
      The ACLs allow administrators to limit access to IMAP services to
      particular users or users belonging to particular groups.
      
      * imap4d/authenticate.c (imap4d_auth_capability): Take session
      pointer as argument.  Don't report authentication capabilities
      if tls is required.
      (imap4d_authenticate): Fix conditional.
      * imap4d/capability.c (imap4d_capability): Update call to
      imap4d_auth_capability.
      * imap4d/imap4d.c (cb_tls_required): Set tls_mode.
      (auth_deny_user_list,auth_allow_user_list)
      (auth_deny_group_list,auth_allow_group_list): New statics.
      (check_user_groups,imap_check_group_list): New static functions.
      (imap4d_cfg_param) <allow-users,deny-users>
      <allow-groups,deny-groups>: New configuration statements.
      (imap4d_session_setup0): Check allow/deny lists.
      * imap4d/imap4d.h (imap4d_auth_capability): Change signature.
      
      * pop3d/pop3d.c (cb_tls_required): Set tls_mode.
      
      * bootstrap (gnulib_extra_files): Update.
      Sergey Poznyakoff authored
  20. 17 Jul, 2013 1 commit
    • * pop3d/pop3d.h (ERR_SYS_LOGIN): New error code.
      * pop3d/capa.c (pop3d_session_init): Advertise the AUTH-RESP-CODE
      capability.
      * pop3d/cmd.c (error_table) <ERR_BAD_LOGIN>: Mark with the
      AUTH response code.
      <ERR_SYS_LOGIN>: New entry.
      * pop3d/user.c (pop3d_user): Use mu_get_auth to obtain
      the user's identity. On error, the error code is ERR_BAD_LOGIN
      or ERR_SYS_LOGIN, depending on its return and return from
      mu_authenticate.
      Sergey Poznyakoff authored
  21. 22 Jul, 2012 1 commit
    • The "tls" statement can be used both within a server declaration
      and in the global scope, the former overriding the latter.  Its
      argument can be one of the following:
      
        no          TLS is not used.  The STLS command won't be available even
                    if the tls configuration is otherwise complete.
        ondemand    TLS is initiated when the user issues the STLS command.
                    This is the default when TLS is configured.
        required    Same as above, but the use of STLS is mandatory.  The
                    authentication state is entered only after TLS negotiation
                    has succeeded.
        connection  TLS is always forced when the connection is established (pops).
      
      For compatibility with prior versions the tls-required statement is retained,
      but is considered deprecated.  It is synonymous with "tls required".  The
      "tls" statement allows for the following alias values:
      
        false, off, 0           same as  no
        stls                    same as  ondemand
        yes, true, on, 1        same as  connection
      
      Internally, all handler functions receive a pointer to the POP session
      structure, which configures the current session.  In particular, it
      contains the TLS mode and capability list.
      
      * pop3d/capa.c (pop3d_capa): Traverse the capability list,
      outputting each of its elements.
      (pop3d_session_init)
      (pop3d_session_free): New functions.
      * pop3d/logindelay.c (login_delay_capa): Change signature.
      * pop3d/pop3d.c (tls_required): Remove.
      (tls_mode): New variable.
      (pop3d_srv_config) <tls>: Remove.
      (pop3d_srv_config) <tls_mode>: New member.
      (pop3d_srv_param): Change definition of the "tls" statement.
      (pop3d_cfg_param): New statement "tls". Mark "tls-required"
      as deprecated.
      (pop3d_mainloop): Change type of the tls argument.
      Initialize session and pass it to each handler.
      (pop3d_connection): Decide whether and how to use TLS
      using global and per-session settings, the latter
      overriding the former.
      * pop3d/pop3d.h (login_delay_capa): Change signature.
      (tls_mode): New enum.
      (pop3d_capa_type): New enum.
      (pop3d_capa, pop3d_session): New structs.
      (pop3d_session_init)
      (pop3d_session_free): New protos.
      (pop3d_command_handler_t): Change signature. All handlers and their
      uses are changed accordingly.
      * pop3d/stls.c (pop3d_stls): Return error if session does not
      allow tls.
      Sergey Poznyakoff authored
  22. 16 Jul, 2012 1 commit
  23. 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
  24. 23 Mar, 2012 1 commit
    • This also fixes e75e9123, which broke TLS support in daemons.
      
      * include/mailutils/stream.h (MU_IOCTL_TOPSTREAM): New ioctl.
      * imap4d/imap4d.c (set_strerr_flt)
      (clr_strerr_flt): Use MU_IOCTL_TOPSTREAM.
      * pop3d/pop3d.c: Likewise.
      * libmailutils/stream/fltstream.c (filter_ctl): Handle both
      MU_IOCTL_SUBSTREAM and MU_IOCTL_TOPSTREAM.
      * libmailutils/stream/iostream.c (_iostream_ctl): Likewise.
      * libmailutils/stream/logstream.c (_log_ctl): Likewise.
      * libmailutils/stream/xscript-stream.c (_xscript_ctl): Likewise.
      Sergey Poznyakoff authored
  25. 17 Mar, 2012 1 commit
    • * imap4d/imap4d.c (set_strerr_flt,clr_strerr_flt): New functions.
      (imap4d_connection): Setup session prefix in strerr if
      mu_log_session_id is set.
      * imap4d/io.c (io_setio): Bugfix: unref debug stream.
      * pop3d/extra.c (pop3d_setio): Likewise.
      * pop3d/pop3d.c (set_strerr_flt,clr_strerr_flt): New functions.
      (pop3d_connection): Setup session prefix in strerr if
      mu_log_session_id is set.
      
      * include/mailutils/acl.h (mu_acl_setenv)
      (mu_acl_getenv,mu_acl_set_session_id): New functions.
      * include/mailutils/server.h (mu_session_id): New extern.
      (mu_m_server_configured_count): Fix signature.
      * include/mailutils/syslog.h (mu_log_session_id): New extern.
      * libmailutils/diag/syslog.c (mu_log_session_id): New global.
      
      * libmailutils/server/acl.c (_mu_acl) <envv,envc,envn>: New
      members.
      (run_closure) <env>: New member.
      (mu_acl_destroy): Free environment.
      (_acl_match): Handle "family" variable.
      (expand_arg): Propagate ACL environment to wordsplit.
      (mu_acl_check_sockaddr): Propagate ACL environment.
      (mu_acl_setenv)
      (mu_acl_getenv,mu_acl_set_session_id): New functions.
      
      * libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Store session ID
      in the ACL.
      (mu_ip_udp_accept): Likewise.
      * libmailutils/server/msrv.c (mu_m_server_configured_count): Fix
      signature.
      (mu_m_server_check_acl): Store session ID in the ACL.
      * libmailutils/server/server.c (mu_session_id): New global variable.
      (connection_loop): Increment session ID
      (mu_acl_set_session_id): New function.
      * libmailutils/stream/fltstream.c (filter_ctl): Handle
      MU_IOCTL_SUBSTREAM.
      * libmailutils/stream/logstream.c (_log_ctl): Likewise.
      * libmu_cfg/common.c (mu_logging_param) <session-id>: New statement.
      Sergey Poznyakoff authored
  26. 09 Mar, 2012 1 commit
    • * maidag/Makefile.am: Load libmu_dbm.la if MU_COND_DBM is true.
      * pop3d/apop.c (pop3d_apopuser): Set owner, if specified in the
      config.
      * pop3d/pop3d.c (apop_database_owner)
      (apop_database_owner_set): New globals.
      (pop3d_cfg_param) <apop-database-owner>: New keyword.
      * pop3d/pop3d.h (apop_database_owner)
      (apop_database_owner_set): New declarations.
      Sergey Poznyakoff authored
  27. 05 Jan, 2012 1 commit
  28. 16 Dec, 2011 1 commit
    • * include/mailutils/util.h (MU_HIERARCHY_DELIMITER): New define.
      (mu_tilde_expansion): Change signature.  Delimiter is an int.
      * libmailutils/base/tilde.c: Likewise. All uses update.
      
      * imap4d/namespace.c (namespace_checkfullpath)
      (namespace_getfullpath): Remove delim argument. All uses updated.
      * imap4d/util.c (util_getfullpath): Remove delim argument. All uses updated.
      Sergey Poznyakoff authored
  29. 22 Nov, 2011 1 commit
    • * 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
  30. 21 Nov, 2011 1 commit
    • * 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
  31. 05 Nov, 2011 2 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
  32. 04 Nov, 2011 1 commit
    • * 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
  33. 28 Oct, 2011 1 commit
    • * 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
  34. 25 Oct, 2011 1 commit
    • * lib/mu_dbm.c: Remove.
      * lib/mu_dbm.h: Remove.
      * lib/Makefile.am: Remove mu_dbm.[ch].
      * include/mailutils/sys/dbm.h: New file.
      * include/mailutils/sys/Makefile.am: Add dbm.h
      * include/mailutils/dbm.h: New file.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add dbm.h.
      * include/mailutils/types.hin (mu_dbm_file_t): New data type.
      
      * libmu_dbm/Makefile.am: New file.
      * libmu_dbm/berkeley.c: New file.
      * libmu_dbm/close.c: New file.
      * libmu_dbm/create.c: New file.
      * libmu_dbm/datumfree.c: New file.
      * libmu_dbm/dbm.c: New file.
      * libmu_dbm/delete.c: New file.
      * libmu_dbm/destroy.c: New file.
      * libmu_dbm/errstr.c: New file.
      * libmu_dbm/fetch.c: New file.
      * libmu_dbm/firstkey.c: New file.
      * libmu_dbm/gdbm.c: New file.
      * libmu_dbm/mudbm.h: New file.
      * libmu_dbm/ndbm.c: New file.
      * libmu_dbm/nextkey.c: New file.
      * libmu_dbm/open.c: New file.
      * libmu_dbm/safety.c: New file.
      * libmu_dbm/store.c: New file.
      
      * Makefile.am [MU_COND_DBM]: Define LIBMU_DBM_DIR
      (SUBDIRS): Add $(LIBMU_DBM_DIR)
      * configure.ac: Revamp DBM support: several database types can
      be specified at once.
      (AC_CONFIG_FILES): Build libmu_dbm/Makefile
      
      * libmu_sieve/extensions/vacation.c: Remove inclusion of mu_dbm.h.
      * maidag/Makefile.am (maidag_LDADD): Add DBM libraries.
      * maidag/maidag.c: ENABLE_DBM instead of USE_DBM
      * maidag/maidag.h: Include <mailutils/dbm.h> instead of mu_dbm.h.
      * maidag/mailquota.c (dbm_retrieve_quota): Rewrite using libmu_dbm
      library calls.
      * mu/Makefile.am [MU_COND_DBM]: Define DBM_C.
      (MODULES): Add $(DBM_C).
      (AM_CPPFLAGS): Define DBMLIBS.
      * mu/ldflags.c (NEEDAUTH): Change definition.
      (lib_descr) <weight>: New member. All uses changed.
      (add_entry): Null arguments ignored.
      (mutool_ldflags): Rewrite traversal of lib_descr.
      * mu/dbm.c: New file.
      
      * pop3d/Makefile.am (pop3d_LDADD, popauth_LDADD): Add DBM libraries.
      * pop3d/apop.c: Rewrite using libmu_dbm library calls.
      * pop3d/bulletin.c: Likewise.
      * pop3d/logindelay.c: Likewise.
      * pop3d/pop3d.c: Change USE_DBM to ENABLE_DBM.
      * pop3d/pop3d.h: Include mailutils/dbm.h instead of mu_dbm.h
      * pop3d/popauth.c: Rewrite using libmu_dbm library calls.
      
      * include/mailutils/cctype.h (MU_CTYPE_ENDLN): New character class.
      (mu_isendln): New macro.
      * libmailutils/string/muctype.c (mu_c_tab): Mark \r and \n as
      MU_CTYPE_ENDLN.
      Sergey Poznyakoff authored