1. 15 Nov, 2008 1 commit
    • before scanning the tree.
      * mailbox/cfg_parser.y (block rule): Accept empty blocks.
      (parse_param): bail out if callback is not declared when it
      should.
      * mailbox/daemon.c (mu_daemon_create_pidfile)
      (mu_daemon_remove_pidfile): If running with UID=0 and EUID != 0,
      temporarily switch to EUID=0 for accessing pidfile (when
      creating or deleting).
      Sergey Poznyakoff authored
  2. 12 Nov, 2008 1 commit
    • * mailbox/cfg_parser.y (mu_cfg_format_error): Raise
      mu_cfg_error_count only if level is less or equal to error.
      (_scan_tree_helper): "unknown section" is a warning.
      Sergey Poznyakoff authored
  3. 05 Oct, 2008 1 commit
    • * doc/texinfo/programs.texi: Document Locking, ACL, and
      Tcp-wrappers.
      * mailbox/cfg_driver.c (mu_cfg_assert_value_type): Convert
      MU_CFG_STRING to MU_CFG_ARRAY.
      * mailbox/cfg_parser.y: Replace `tag: value' with `tag: vallist'.
      This allows for constructs like `acl a b c {', which were
      understood by the previous version.
      * mailbox/version.c (mu_conf_opt): Add WITH_LIBWRAP.
      Sergey Poznyakoff authored
  4. 22 Sep, 2008 1 commit
    • representation of syslog facility.
      * mailbox/cfg_lexer.l: Re-introduce pragmatic comment
      #debug=, for setting debugging level in config module.
      * mailbox/cfg_parser.y: Likewise.
      * mailbox/gdebug.c (mu_debug_level_from_string): Ignore trailing
      newline.
      * mailbox/version.c (mu_conf_option): Add SYSCONFDIR, MAILSPOOLDIR
      and LOG_FACILITY.
      
      * mh/mh_init.c (mh_list_format): Reformat to make it more
      readable. Use decode primitive on header fields that may be
      encoded.
      
      * doc/texinfo/mailutils.texi: Further update.
      * doc/texinfo/programs.texi: Likewise.
      Sergey Poznyakoff authored
  5. 21 Aug, 2008 1 commit
    • * imap4d/imap4d.c (imap4d_cfg_param): other-namespace and
      shared-namespace take proper lists as arguments.
      (imap4d_session_setup0): Call namespace_init_session.
      (main): Call namespace_init.
      * imap4d/imap4d.h (set_namespace): Remove.
      (namespace_init): Change proto.
      (namespace_init_session): New prototype.
      (namespace): New declaration.
      * imap4d/namespace.c: Rewrite using lists.
      * mailbox/cfg_parser.y (parse_param): Cast string to lists if
      the parameter has list type.
      Sergey Poznyakoff authored
  6. 19 Aug, 2008 3 commits
    • * imap4d/id.c: New file.
      * imap4d/Makefile.am (imap4d_SOURCES): Add id.c, remove version.c.
      * imap4d/commands.c: Add ID command.
      Remove X-VERSION command.
      (SELECT,EXAMINE): Switch to authenticated mode on failure.
      * imap4d/imap4d.c (imap4d_argc, imap4d_argv): New variables.
      (imap4d_cfg_param): New keyword `id-fields'.
      (main): Save command line arguments.
      * imap4d/imap4d.h (imap4d_argc, imap4d_argv): New declarations.
      * imap4d/select.c (imap4d_select0): Do not reset state to auth on
      failure, this is done by util_finish.
      * imap4d/version.c: Remove.
      * imap4d/capability.c: Announce ID capability, remove X-VERSION.
      * imap4d/testsuite/imap4d/x.exp: Use ID instead of X-VERSION.
      
      * TODO, NEWS: Update.
      
      * mailbox/cfg_parser.y (_set_fun,parse_param): Bugfix.
      Sergey Poznyakoff authored
    • Bugfixes. · 99742544
      * libcfg/acl.c (parsearg): Initialize size.
      * mailbox/cfg_driver.c (mu_cfg_assert_value_type): Bugfix.
      * mailbox/cfg_lexer.l (mu_get_config): Close file.
      * mailbox/cfg_parser.y: Fix array creation.
      Sergey Poznyakoff authored
    • * auth/gsasl.c: Remove deprecated data types.
      * imap4d/auth_gsasl.c (retrieve_password): Minor fix.
      
      * imap4d/imap4d.c, imap4d/imap4d.h, imap4d/namespace.c,
      lib/tcpwrap.c, libcfg/acl.c, libcfg/auth.c, libcfg/common.c,
      libcfg/ldap.c, libcfg/sieve.c, libcfg/sql.c, maidag/maidag.c,
      mail.local/main.c, mailbox/gdebug.c, mailbox/msrv.c,
      mimeview/mimeview.c, pop3d/bulletin.c, pop3d/pop3d.c,
      pop3d/pop3d.h, sieve/sieve.c: Reflect changes to the configuration
      system.
      
      * mailbox/Makefile.am (AM_LFLAGS): New variable.
      (EXTRA_DIST) Add cfg_lexer.l.
      (libmailutils_la_SOURCES): Add alloc.c and opool.c
      (BUILT_SOURCES): Add cfg_lexer.c.
      (cfg_lexer.c): New goal.
      * mailbox/alloc.c, mailbox/opool.c: New files.
      * mailbox/cfg_lexer.c: Remove.
      * mailbox/cfg_lexer.l: New file.
      * mailbox/.cvsignore: Add cfg_lexer.c.
      
      * include/mailutils/Makefile.am: Add alloc.h and opool.h
      * include/mailutils/alloc.h: New file.
      * include/mailutils/opool.h: New file.
      
      * include/mailutils/cfg.h (mu_cfg_lexer_t,mu_cfg_alloc_t)
      (mu_cfg_free_t): Remove types.
      (MU_CFG_STRING, MU_CFG_LIST, MU_CFG_ARRAY): New defines.
      (mu_config_value_t): New data type.
      (struct mu_cfg_node): Change type of `label'.
      (struct mu_cfg_tree): Remove `alloc', `free'.
      New member `pool'.
      (mu_cfg_parse): Simplify the signature by removing superfluous
      arguments.
      (mu_cfg_tie_in): Remove.
      (mu_cfg_lexer_pool): New function.
      (mu_cfg_find_node, mu_cfg_find_node_label): Remove.
      (mu_cfg_callback_t): Change signature.
      (MU_CFG_LIST_MASK): New define.
      (MU_CFG_LIST_OF, MU_CFG_TYPE, MU_CFG_IS_LIST): New defines.
      (mu_cfg_get_debug): New function.
      (mu_cfg_assert_value_type, mu_cfg_string_value_cb): New functions.
      (mu_cfg_tree_set_alloc, mu_cfg_tree_alloc): Remove.
      * mailbox/cfg_driver.c: Adapt for new node structure.
      (mu_cfg_assert_value_type, mu_cfg_string_value_cb): New function.
      * mailbox/cfg_format.c: Adapt for new node structure.
      * mailbox/cfg_parser.y: Adapt for changes in cfg data types and
      lexer.
      
      * include/mailutils/mailutils.h: Include alloc.h and opool.h
      * include/mailutils/mu_auth.h (mu_authorization_add_module)
      (mu_authentication_add_module): New prototypes.
      
      * include/mailutils/syslog.h (mu_string_to_syslog_facility)
      (mu_string_to_syslog_priority): First argument is const char *.
      * mailbox/syslog.c: Likewise.
      
      * include/mailutils/types.hin (mu_opool_t): New type.
      * mailbox/list.c (mu_list_get_comparator): Add missing return
      statement.
      Sergey Poznyakoff authored
  7. 04 Jan, 2008 1 commit
    • * mailbox/msrv.c: New file.
      * mailbox/Makefile.am: Add msrv.c.
      * include/mailutils/server.h (mu_tcp_server_conn_fp): Take
      sockaddr as argument
      (mu_tcp_server_create,mu_tcp_server_get_sockaddr): Likewise.
      (mu_m_server_*): New prototypes.
      * include/mailutils/types.hin (mu_m_server_t): New type.
      * mailbox/acl.c: Fix debugging output.
      (mu_sockaddr_to_str, mu_sockaddr_to_astr): New functions.
      
      * mailbox/tcpsrv.c: Handle AF_INET and AF_UNIX sockets.
      * examples/echosrv.c: Update mu_tcp_server_* calls.
      * examples/config/Makefile.am: Remove comsat.conf and
      mailutils.rc.
      
      * imap4d/imap4d.c, imap4d/imap4d.h, imap4d/signal.c,
      maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h, pop3d/extra.c,
      pop3d/pop3d.c, pop3d/pop3d.h, pop3d/signal.c: Rewrite using
      m-server.
      
      * include/mailutils/cfg.h (mu_offsetof): Bug fix.
      * mailbox/cfg_driver.c (dup_container): Bugfix. Offset was not
      copied.
      (mu_cfg_section_add_params): If identifier starts with a dot, it
      is hidden, i.e. its substatements are copied directly into the
      parent structure.
      * mailbox/cfg_lexer.c (isword): Take care of opening braces.
      (default_lexer): Several fixes.
      * mailbox/cfg_parser.y (mu_cfg_parse): Initialize debugging level
      from global settings.
      (_scan_tree_helper): Ensure debugging object has correct locus
      information before calling the section parser.
      (mu_cfg_scan_tree): If no debugging object is supplied, use the
      one from diag.c
      * mailbox/daemon.c (mu_daemon_create_pidfile): Return a meaningful
      error code.
      * mailbox/debug.c (mu_debug_create): Initialize printer to NULL.
      (mu_debug_vprintf): If printer is NULL, use
      mu_debug_default_printer.
      (mu_debug_check_level): Bugfix.
      
      * mailbox/server.c: Minor indentation fix.
      * mailbox/syslog.c (mu_diag_syslog_printer): Chop off \r as well.
      * mailbox/folder.c (mu_folder_create_from_record): Bugfixes.
      
      * include/mailutils/debug.hm4 (mu_sockaddr_to_str)
      (mu_sockaddr_to_astr): New functions.
      
      * include/mailutils/.cvsignore: Add debug.h
      
      * po/POTFILES.in: Update.
      Sergey Poznyakoff authored
  8. 19 Dec, 2007 1 commit
    • * configure.ac (MU_LIB_REMOTE): New substitution variable.
      (AC_CONFIG_FILES): Add libproto/remote/Makefile.
      * imap4d/copy.c, imap4d/create.c, imap4d/delete.c, imap4d/fetch.c,
      imap4d/imap4d.c, imap4d/list.c, imap4d/lsub.c, imap4d/rename.c,
      imap4d/subscribe.c, imap4d/unsubscribe.c, imap4d/util.c: Spelling
      fixes.
      * include/mailutils/cfg.h (mu_cfg_error_count): New variable.
      * include/mailutils/gocs.h (struct mu_gocs_mailbox):  New member
      mailbox_pattern
      * include/mailutils/libargp.h (mu_rcfile_lint): New variable.
      * include/mailutils/mailbox.h (mu_set_mailbox_pattern): New
      function.
      (mu_mail_directory): Removed.
      (mu_mailbox_url): New function.
      * include/mailutils/mutil.h (mu_normalize_mailbox_url): Remove.
      * include/mailutils/registrar.h (mu_0_6_registrar_lookup): Remove.
      
      * libargp/common.c: New options --rcfile-lint and
      --mailbox-pattern.
      * libargp/muinit.c: Handle --rcfile-lint.
      * libcfg/common.c: New statement mailbox-pattern
      * libmu_scm/mu_mailbox.c (mu-mail-directory): Deprecated.
      (mu-user-mailbox-url): New function.
      
      * libproto/remote: New directory.
      * libproto/remote/folder.c: New file.
      * libproto/remote/mbox.c: New file.
      * libproto/remote/.cvsignore: New file.
      
      * libproto/Makefile.am (SUBDIRS): Add remote
      * libproto/mbox/folder.c, libproto/mbox/url.c: Indentation and
      spelling fixes.
      * maidag/Makefile.am (maidag_LDADD): Add MU_LIB_REMOTE.
      * maidag/maidag.c: Register mu_remote_mbox_record.
      * mailbox/cfg_parser.y (mu_cfg_error_count): New variable.
      (mu_cfg_format_error,_mu_cfg_vperror): Increment
      mu_cfg_error_count.
      * mailbox/debug.c (mu_debug_check_level): Do not mask out
      inheritance bit.
      * mailbox/gocs.c (mu_gocs_mailbox_init): Set mailbox pattern.
      * mailbox/mailbox.c (_create_mailbox): Bugfix.
      * mailbox/mbx_default.c (mu_set_mailbox_pattern): New finction.
      (mu_set_mail_directory): Rewrite.
      (user_mailbox_name): Rewrite.
      * mailbox/mutil.c (mu_normalize_mailbox_url): Remove.
      * mailbox/registrar.c (mu_0_6_registrar_lookup): Remove.
      * guimb/scm/sieve-core.scm (sieve-main): Use mu-user-mailbox-url.
      Sergey Poznyakoff authored
  9. 13 Dec, 2007 1 commit
    • examples/decode2047.c, examples/echosrv.c, examples/encode2047.c,
      examples/header.c, examples/http.c, examples/iconv.c,
      examples/listop.c, examples/lsf.c, examples/mailcap.c,
      examples/mimetest.c, examples/msg-send.c, examples/muemail.c,
      examples/murun.c, examples/nntpclient.c, examples/pop3client.c,
      examples/sfrom.c, examples/url-parse.c: Include config.h. Use
      MU_ASSERT instead of assert.
      
      * include/mailutils/cfg.h (struct mu_cfg_section.offset): New
      member.
      * include/mailutils/debug.hm4 (MU_ASSERT): New member.
      * lib/utmp.c: Include config.h.
      * libcfg/Makefile.am (libmucfg_la_SOURCES): Add acl.c.
      * libcfg/acl.c: New file.
      * libcfg/common.c (cb_debug_level): Immediately set debugging
      level.
      * mailbox/acl.c: mu_acl_log expands its argument.
      * mailbox/cfg_driver.c (mu_create_canned_section)
      (mu_create_canned_param): Avoid creating container twice.
      * mailbox/cfg_format.c (format_param): Do not pring type if
      argname contains a colon.
      * mailbox/cfg_parser.y (_scan_tree_helper): Compute target
      pointer.
      
      * imap4d/imap4d.c, imap4d/imap4d.h, pop3d/pop3d.c,
      pop3d/pop3d.h: Use MU ACLs
      Sergey Poznyakoff authored
  10. 11 Dec, 2007 1 commit
    • (struct mu_cfg_param.offset): New member
      (mu_offsetof): New define
      (mu_cfg_section_fp): Change signature
      (struct mu_cfg_section.label,target): New members.
      (struct mu_cfg_section.data): Remove.
      (struct mu_cfg_section.children): New member, instead of
      param and subsec which are removed.
      (mu_cfg_scan_tree): Change signature.
      (mu_config_register_section): Change signature.
      (mu_parse_config): Change signature.
      (mu_parse_config_tree): Rename to mu_cfg_tree_reduce.
      (mu_get_config): New proto.
      
      * include/mailutils/libcfg.h (mu_parse_config_files): Change
      prototype.
      
      * dotlock/dotlock.c, imap4d/imap4d.c, lib/tcpwrap.h,
      libargp/muinit.c, libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c,
      libcfg/init.c, libcfg/ldap.c, libcfg/pam.c, libcfg/radius.c,
      libcfg/sieve.c, libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c,
      maidag/maidag.c, mail.local/main.c, mail.remote/mail.remote.c,
      mailbox/cfg_format.c, mailbox/cfg_parser.y, mimeview/mimeview.c,
      movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
      sieve/sieve.c: Reflect changes to the cfg framework.
      
      * mailbox/Makefile.am (libmailutils_la_SOURCES): Add cfg_driver.c.
      * mailbox/cfg_driver.c: New file.
      * mailbox/cfg_lexer.c: Move driver part into a separate file.
      
      * examples/Makefile.am (AM_LDFLAGS): Remove libmuaux
      * examples/echosrv.c: Remove getopt.h
      Sergey Poznyakoff authored
  11. 07 Dec, 2007 1 commit
    • * examples/Makefile.am: Add aclck
      * examples/aclck.c: New file. Test program for ACLs.
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add acl.h,
      kwd.h and vartab.h.
      * include/mailutils/acl.h: New file. ACL declarations.
      * include/mailutils/kwd.h: New file. Declarations for simple
      string to token conversion.
      * include/mailutils/vartab.h: New file. Declarations of functions
      for variable expansion.
      * include/mailutils/mailutils.h: Include acl.h, kwd.h and
      vartab.h.
      * include/mailutils/types.hin: Define mu_vartab_t
      
      * mailbox/Makefile.am (libmailutils_la_SOURCES): Add acl.c, kwd.c,
      and vartab.c.
      * mailbox/acl.c: New file.
      * mailbox/kwd.c: New file.
      * mailbox/vartab.c: New file.
      
      * mailbox/cfg_parser.y (parse_cidr): Fix typo.
      * mailbox/list.c: Fix indentation.
      * mailbox/mailbox.c (_create_mailbox): Fix type of level.
      * mailbox/syslog.c: Use mu_kwd_* functions.
      Sergey Poznyakoff authored
  12. 04 Dec, 2007 1 commit
    • * frm/common.c, imap4d/imap4d.c: Shut compiler warnings.
      * include/mailutils/cfg.h (mu_cfg_format_tree): Rename to
      mu_cfg_format_parse_tree
      (mu_cfg_format_container,mu_format_config_tree): New functions.
      (mu_parse_config_tree): New prototype.
      (mu_cfg_tree_create_node): Change signature (const char* instead
      of char*).
      * include/mailutils/gocs.h (mu_gocs_register): First arg is const.
      * include/mailutils/libargp.h (mu_argp_node_list_new): Mark
      invariable arguments as const.
      * include/mailutils/libcfg.h (mu_libcfg_init): Remove const from
      the arg.
      * include/mailutils/mutil.h (mu_spawnvp): Remove const from the
      2nd arg.
      * libargp/cmdline.c (mu_argp_node_list_new): Mark invariable
      arguments as const.
      
      * lib/mailcap.h: New file.
      * lib/Makefile.am (libmuaux_la_SOURCES): Add mailcap.h
      * libargp/cmdline.h (mu_help_config_mode): New extern.
      * libargp/common.c: New option --config-help displays a
      configuration file summary.
      * libargp/muinit.c (mu_app_init): Handle --config-help.
      * libcfg/init.c (mu_libcfg_init): Remove const from the arg.
      * maidag/maidag.h (mda): New prototype.
      * mail/decode.c: Include mailcap.h
      * mail/mail.h: Define _GNU_SOURCE before including stdio.h
      * mail/send.c: Fix includes.
      * mail.remote/mail.remote.c: Include mu_umaxtostr.h
      
      * mailbox/cfg_format.c (mu_cfg_data_type_string)
      (mu_cfg_format_container): New function.
      * mailbox/cfg_lexer.c (mu_build_container): New function.
      (mu_parse_config_tree): Use mu_build_container.
      (mu_format_config_tree): New function.
      * mailbox/cfg_parser.y (mu_cfg_tree_create_node): Change proto.
      * mailbox/gocs.c (struct mu_gocs_entry): Name is const.
      (mu_gocs_register): 1st arg (capa) is const.
      * mailbox/mutil.c (mu_spawnvp): Remove const from the 2nd arg.
      * mh/mh_whatnow.c (invoke): Shut compiler warnings.
      * mimeview/mimetypes.l (mimetypes_open): Shut compiler warnings.
      * mimeview/mimeview.c: Include mailcap.h
      (display_file): Shut compiler warnings.
      * readmsg/readmsg.c: Include mu_umaxtostr.h
      * sieve/sieve.c (parser): Remove unused variable.
      Sergey Poznyakoff authored
  13. 03 Dec, 2007 1 commit
    • struct mu_gocs_virtual mu_virtual_module_config
      
      * include/mailutils/cfg.h (MU_PARSE_CONFIG_GLOBAL)
      (MU_PARSE_CONFIG_VERBOSE, MU_PARSE_CONFIG_DUMP): New defines.
      (mu_cfg_tree_create,mu_cfg_tree_set_debug,mu_cfg_tree_set_alloc)
      (mu_cfg_tree_alloc,mu_cfg_tree_free)
      (mu_cfg_tree_create_node,mu_cfg_tree_add_node): New functions.
      * include/mailutils/gocs.h (struct mu_gocs_virtual): New data
      type.
      * include/mailutils/libargp.h (struct mu_argp_node_list): New data
      type.
      (mu_argp_node_list_init, mu_argp_node_list_add)
      (mu_argp_node_list_new, mu_argp_node_list_finish): New functions.
      * libargp/cmdline.h: New header.
      * libargp/Makefile.am (libmuargp_a_SOURCES): Add cmdline.h.
      
      * dotlock/dotlock.c, imap4d/imap4d.c, libargp/auth.c,
      libargp/cmdline.c, libargp/common.c, libargp/compat.c,
      libargp/gsasl.c, libargp/mu_argp.c, libargp/muinit.c,
      libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c,
      libargp/tls.c, libargp/virtdomain.c, libcfg/common.c,
      libcfg/init.c, libcfg/virtdomain.c, maidag/maidag.c,
      mail.local/main.c, mail.remote/mail.remote.c, mimeview/mimeview.c,
      movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
      sieve/sieve.c: Change option parsing, usig mu_cfg_tree_ functions.
      
      * mailbox/argcv.c: Fix a typo in comment.
      * mailbox/cfg_lexer.c (mu_parse_config_tree): New function.
      (_mu_parse_config): Rewrite using mu_parse_config_tree.
      * mailbox/cfg_parser.y (mu_cfg_format_error,_mu_cfg_vperror)
      (debug_print_node): Use default diag debug_t object, if the passed
      one is NULL. Reset locus after formatting.
      (mu_cfg_postorder): Return immediately if node == NULL.
      (mu_cfg_tree_create,mu_cfg_tree_set_debug,mu_cfg_tree_set_alloc)
      (mu_cfg_tree_alloc,mu_cfg_tree_free,mu_cfg_tree_create_node)
      (mu_cfg_tree_add_node): New functions.
      * mailbox/gocs.c (mu_gocs_store): Make sure no capa/data tuple
      gets registered twice.
      Sergey Poznyakoff authored
  14. 02 Dec, 2007 1 commit
  15. 30 Nov, 2007 1 commit
    • * include/mailutils/types.hin: New type mu_log_level_t.
      * include/mailutils/debug.hm4, include/mailutils/diag.h,
      mailbox/cfg_lexer.c, mailbox/cfg_parser.y, mailbox/dbgstderr.c,
      mailbox/dbgsyslog.c, mailbox/debug.c, mailbox/diag.c,
      mailbox/gdebug.c, mailbox/muerror.c, mailbox/syslog.c,
      sieve/sieve.c: Use mu_log_level_t instead of size_t for debugging
      and logging levels.
      Sergey Poznyakoff authored
  16. 29 Nov, 2007 1 commit
    • imap4d/auth_gss.c, imap4d/authenticate.c, imap4d/bye.c,
      imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/search.c,
      imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, maidag/lmtp.c,
      maidag/maidag.c, maidag/script.c, mail.local/main.c,
      mail.local/script.c, pop3d/apop.c, pop3d/bulletin.c,
      pop3d/extra.c, pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c,
      pop3d/quit.c, pop3d/signal.c, pop3d/user.c, libsieve/util.c: Use
      mu_diag_output instead of syslog.
      
      * sieve/sieve.c: New option --no-program-name, for testsuite.
      * sieve/testsuite/lib/sieve.exp: Call sieve with the
      --no-program-name option.
      
      * mailbox/cfg_lexer.c, mailbox/cfg_parser.y: Improve debugging.
      * mailbox/diag.c: New file.
      * mailbox/gdebug.c (mu_debug_level_from_string): New function.
      * mailbox/muerror.c (mu_verror, mu_error): Rewrite using mu_diag
      functions.
      * mailbox/syslog.c (mu_diag_level_to_syslog): New function.
      (mu_diag_syslog_printer): New function.
      
      * mh/mh_argp.c (mh_argp_parse): Set prigram name using
      mu_set_program_name.
      * mh/mh_init.c (mu_error_printer): No longer needed.
      * movemail/movemail.c (movemail_error_printer): No longer needed.
      
      * include/mailutils/Makefile.am (pkginclude_HEADERS): Add diag.h
      * include/mailutils/diag.h: New file.
      * include/mailutils/cfg.h (mu_cfg_lexer_t): Take mu_debug_t as its
      second argument.
      * include/mailutils/error.h: Include diag.h
      (mu_program_name,mu_set_program_name): Remove. Already declared in
      diag.h.
      (mu_error_set_print): Deprecated.
      
      * mailbox/Makefile.am (libmailutils_la_SOURCES): Add diag.c
      Sergey Poznyakoff authored
  17. 28 Nov, 2007 1 commit
    • mailbox/cfg_parser.y (mu_cfg_tree_t):
      New data type.
      (mu_cfg_perror_t): Remove
      (mu_cfg_parse): Change prototype.
      (mu_cfg_perror): Change type.
      (mu_cfg_format_error): New function.
      (mu_cfg_destroy_tree): Change signature.
      (mu_cfg_callback_t): Take mu_debug_t as its first argument,
      instead of mu_cfg_locus_t. The mu_debug_t is to be used for error
      reporting and debugging diagnostics. The cfg_lexer is responsible
      for storing the necessary locus data into it before calling
      callbacks.
      (mu_cfg_section_fp): Take an additional argument.
      (mu_cfg_scan_tree): Simplified prototype. The mu_cfg_tree_t passed
      as its first argument already contains all necessary data that
      were passed as arguments previously.
      (mu_parse_config): First two args are consts.
      
      * include/mailutils/libcfg.h, imap4d/imap4d.c, libcfg/auth.c,
      libcfg/common.c, libcfg/ldap.c, libcfg/sieve.c, libcfg/sql.c,
      maidag/maidag.c, mail.local/main.c, mimeview/mimeview.c,
      pop3d/pop3d.c, sieve/sieve.c: Reflect changes to the cfg
      framework.
      
      * mailbox/debug.c (mu_debug_vprintf): Make sure the locus info is
      formatted on the first call.
      Sergey Poznyakoff authored
  18. 19 Nov, 2007 1 commit
    • * include/mailutils/libargp.h (OPT_RCFILE_VERBOSE): New value.
      * libargp/Makefile.am (AM_CFLAGS): Rename to AM_CPPFLAGS, define
      SYSCONFDIR.
      * libargp/common.c (mu_common_argp, mu_common_argp_parser): New
      option rcfile-verbose.
      * mailbox/Makefile.am (AM_CPPFLAGS): define SYSCONFDIR.
      * mailbox/cfg_lexer.c (_mu_parse_config): Implement `include'
      statement. Add verbose logging.
      * mailbox/cfg_parser.y (mu_cfg_parser_verbose): New variable.
      (mu_cfg_parse): Zero out parse_tree before returning.
      (_scan_tree_helper): Remove dependency on MU_CONFIG_VERBOSE envar.
      Use mu_cfg_parser_verbose instead.
      Sergey Poznyakoff authored
  19. 17 Nov, 2007 1 commit
    • * include/mailutils/gocs.h, include/mailutils/pam.h,
      include/mailutils/radius.h, include/mailutils/syslog.h: New files
      * lib/argpinit.c, lib/muinit.c, lib/muinit.h: New files.
      * libsieve/conf.c: New file.
      
      * libcfg: New directory
      * libcfg/libcfg.h, libcfg/auth.c, libcfg/common.c, libcfg/init.c,
      libcfg/gsasl.c, libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c,
      libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c,
      libcfg/.cvsignore: New files.
      
      * libargp: New directory
      * libargp/auth.c, libargp/cmdline.h, libargp/common.c,
      libargp/gsasl.c, libargp/mu_argp.h, libargp/mu_argp.c,
      libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c,
      libargp/tls.c, libargp/virtdomain.c, libargp/.cvsignore: New
      files.
      
      * mailbox/.cvsignore: Add cfg_parser.c and cfg_parser.h.
      * Makefile.am (SUBDIRS): Add libargp and libcfg.
      * configure.ac (MU_APP_LIBRARIES): New variable
      (MU_COMMON_INCLUDES): add libargp and libcfg
      (AC_CONFIG_FILES): Add libargp and libcfg.
      
      * auth/gsasl.c, auth/pam.c, auth/radius.c, auth/sql.c, auth/sql.h,
      auth/tls.c, auth/virtual.c, comsat/comsat.h, frm/frm.h,
      guimb/guimb.h, imap4d/imap4d.h, include/mailutils/gsasl.h,
      include/mailutils/libsieve.h, include/mailutils/mailutils.h,
      include/mailutils/mu_auth.h, include/mailutils/tls.h,
      include/mailutils/sql.h, maidag/maidag.h, mail/mail.h,
      mail.local/mail.local.h, mailbox/daemon.c, mailbox/system.c,
      mh/mh_argp.c, mh/mh_getopt.h, pop3d/pop3d.h,
      readmsg/readmsg.h: Remove argp stuff
      
      * comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c,
      examples/muauth.c, examples/muemail.c, frm/frm.c, frm/from.c,
      guimb/main.c, imap4d/idle.c, imap4d/imap4d.c, imap4d/util.c,
      imap4d/version.c, maidag/lmtp.c, maidag/maidag.c,
      maidag/mailquota.c, mail/mail.c, mail/send.c, mail/version.c,
      mail.local/mailquota.c, mail.local/main.c,
      mail.remote/mail.remote.c, mailbox/mu_auth.c, messages/messages.c,
      mimeview/mimeview.c, movemail/movemail.c, pop3d/extra.c,
      pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c:
      Use mu_app_init for parsing command line and
      configuration files.
      * comsat/Makefile.am, config/Makefile.am, dotlock/Makefile.am,
      examples/Makefile.am, frm/Makefile.am, guimb/Makefile.am,
      imap4d/Makefile.am, maidag/Makefile.am, mail/Makefile.am,
      mail.local/Makefile.am, mail.remote/Makefile.am,
      mailbox/Makefile.am, messages/Makefile.am, mimeview/Makefile.am,
      movemail/Makefile.am, pop3d/Makefile.am, readmsg/Makefile.am,
      sieve/Makefile.am: Use MU_APP_LIBRARIES.
      
      * include/mailutils/Makefile.am: Add new files.
      * include/mailutils/argp.h: Remove.
      * include/mailutils/cfg.h: New file.
      * include/mailutils/daemon.h (MODE_INTERACTIVE,MODE_DAEMON): New
      defines (from removed argp.h).
      (mu_gocs_daemon): New decl.
      * include/mailutils/error.h (mu_program_name): New variable
      (mu_set_program_name): New function.
      * lib/Makefile.am (libmuaux_la_SOURCES): Add new files.
      * libsieve/Makefile.am (libsieve_la_SOURCES): Remove argp.c, add
      conf.c instead.
      * libsieve/argp.c: Remove.
      
      * mailbox/cfg_parser.y (mu_cfg_parse_boolean): New function.
      * mailbox/mu_argp.c: Remove.
      
      * mailbox/muerror.c (mu_program_name): New variable
      (mu_set_program_name): New function
      (mu_default_error_printer): Print program name before diagnostic
      string.
      * mailbox/mutil.c (mu_sql_decode_password_type): New function.
      * mh/mh_whom.c (mh_alias_expand): Bugfix
      * po/POTFILES.in: Update
      * testsuite/lib/mailutils.exp (mu_init): Pass --no-site-rcfile
      --no-user-rcfile to all programs.
      Sergey Poznyakoff authored
  20. 07 Nov, 2007 1 commit
    • function.
      * include/mailutils/cfg.h (mu_cfg_time): New value
      (struct mu_cfg_section): Rewamp using lists.
      (enum mu_cfg_cont_type, struct mu_cfg_cont): New types.
      (mu_config_create_container, mu_config_clone_container)
      (mu_config_destroy_container): New functions.
      (mu_parse_config): New function.
      * include/mailutils/mu_auth.h (mu_authentication_clear_list)
      (mu_authorization_clear_list): New functions.
      * mailbox/cfg_lexer.c: Add missing includes
      (mu_config_create_container, mu_config_clone_container)
      (mu_config_destroy_container): New functions.
      (mu_parse_config): New function.
      (_mu_config_register_section): New function.
      (mu_config_register_section): New function.
      (_mu_parse_config): Fully implement system-wide/per-user
      configuration semantics.
      (mu_parse_config): Take two more arguments.
      * mailbox/cfg_parser.h: Remove automatically generated file.
      * mailbox/cfg_parser.y (find_container): New function
      (find_subsection,find_param): Rewrite using find_container
      (parse_param): Implement new data type mu_cfg_time (time_t value).
      (_scan_tree_helper): Complain about unknown sections only if
      MU_CONFIG_VERBOSE environment variable is set.
      * mailbox/mu_argp.c (assign_string): Bugfix.
      (mu_argp_set_config_param): New function.
      (mu_argp_parse): Remove eventual `lt-' prefix from program names.
      * mailbox/mu_auth.c: New options --clear-authorization and
      --clear-authentication.
      (mu_authorization_clear_list,mu_authentication_clear_list): New
      functions.
      
      * include/mailutils/refcount.h (struct _mu_refcount): Move ro
      refcount.c
      (mu_refcount_inc,mu_refcount_dec): Change return value.
      (mu_refcount_value): New function.
      * mailbox/refcount.c (struct _mu_refcount): Moved from refcount.h
      (mu_refcount_value): New function.
      (mu_refcount_create,mu_refcount_destroy,mu_refcount_inc)
      (mu_refcount_dec): Fix monitor usage.
      (mu_refcount_inc,mu_refcount_dec): Fix return type.
      
      * mailbox/Makefile.am (libmailutils_la_SOURCES): Add refcount.c
      * dotlock/dotlock.c, imap4d/imap4d.c, mail.local/main.c,
      mail.remote/mail.remote.c, mimeview/mimeview.c,
      movemail/movemail.c, pop3d/pop3d.c, pop3d/signal.c,
      readmsg/readmsg.c, sieve/sieve.c: Implement new configuration.
      
      * testsuite/lib/mailutils.exp: Set MU_CONFIG_FLAVOR envar to
      `none' to avoid reading configuration files.
      Sergey Poznyakoff authored
  21. 05 Nov, 2007 1 commit