1. 05 Jan, 2008 1 commit
    • function type.
      (mu_m_server_destroy, mu_m_server_set_prefork)
      (mu_m_server_configured_count, mu_m_server_end): New functions.
      * mailbox/msrv.c (struct _mu_m_server.prefork): New member.
      (mu_m_server_set_prefork): New function.
      (m_srv_conn): Use prefork to decide whether to proceed with a
      connection.
      
      * lib/tcpwrap.c, lib/tcpwrap.h (mu_tcp_wrapper_prefork): New
      function.
      
      * imap4d/imap4d.c, maidag/lmtp.c, maidag/maidag.c,
      pop3d/pop3d.c: Use m-server prefork to handle TCP wrappers.
      
      * po/POTFILES.in: Add more files.
      Sergey Poznyakoff authored
  2. 04 Jan, 2008 3 commits
    • Sergey Poznyakoff authored
    • * 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
    • * 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
  3. 02 Jan, 2008 1 commit
    • * libproto/include/property0.h (struct property_item): Remove
      key, set and next.
      (struct _mu_property): Use mu_assoc_t to keep the items.
      * mailbox/property.c: Rewrite using mu_assoc_t for storage.
      
      * mailbox/parsedate.y (DATE_SET): Take an additional argument
      specifying upper limit for the value. Bail out if val is out of
      range. All callers updated.
      (SET_.*): Rewrite via __SET_.*
      Sergey Poznyakoff authored
  4. 30 Dec, 2007 4 commits
    • (main): Use /dev/null as the tty if require-tty is false.
      Sergey Poznyakoff authored
    • * comsat/cfg.c: Remove.
      * comsat/comsat.c: Use MU configuration and acls.
      * comsat/comsat.h: Include acl.h
      * libproto/maildir/mbox.c (maildir_qfetch): Bugfix.
      Sergey Poznyakoff authored
    • * comsat/cfg.c: Remove.
      * comsat/comsat.c: Use MU configuration and acls.
      * comsat/comsat.h: Include acl.h
      * libproto/maildir/mbox.c (maildir_qfetch): Bugfix.
      Sergey Poznyakoff authored
    • * frm/testsuite/frm/test.exp: Call mu_init with -noflags option.
      Use --mail-folder option when necessary.
      * messages/testsuite/messages/test.exp: Likewise.
      * readmsg/testsuite/readmsg/test.exp: Likewise.
      * sieve/testsuite/lib/sieve.exp: Likewise.
      * sieve/testsuite/sieve/action.exp: Likewise.
      * sieve/testsuite/scripts/fileinto.sv: Use +file, instead of
      %file.
      
      * imap4d/imap4d.c: Register mailbox formats before parsing
      configuration.
      * imap4d/util.c (util_wcard_match): Replaced with a more efficient
      implementation, based on wildmat from GNU Radius.
      * imap4d/testsuite/imap4d/list.exp: Expect two non-mailbox files
      to appear in the list output (see libproto/mbox/folder.c, 2007-12-28).
      
      * libargp/common.c: New option --mail-folder.
      * libcfg/common.c: New statement mailbox/folder
      
      * libproto/maildir/folder.c (_maildir_is_scheme): Never return
      MU_FOLDER_ATTRIBUTE_DIRECTORY bit: maildir folders cannot contain
      subfolders.
      * libproto/maildir/mbox.c (maildir_msg_init): Bugfix: use full
      file name.
      Print additional diagnostics if stat fails.
      * libproto/mbox/folder.c (list_helper): Take additional argument,
      record, specifying a mu_record_t object to match entries
      against. If it is NULL, mu_registrar_lookup is used.
      Fix descending into subdirectories.
      
      * maidag/deliver.c (deliver): Split off deliver_to_user function;
      call it with user privileges. This fixes privileges of any created
      maildir folders.
      * maidag/maidag.c (set_debug_flags): Bugfix.
      
      * mail/mail.c (main): Open the mailbox with MU_STREAM_CREAT flag.
      
      * mailbox/amd.c (amd_open): Do not initialize amd->mtime to
      trigger initial scanning.
      (_amd_message_save): Check rename return value.
      (amd_is_updated): Do not check for msg_count==0, rely on the
      timestamp.
      
      * mailbox/mailbox.c (mu_mailbox_set_default_proto): Accept an
      argument without trailing semicolon.
      * mailbox/mbx_default.c (mu_set_mail_directory): Accept NULL
      argument.
      (mu_set_mailbox_pattern): Likewise.
      (mu_mailbox_create_default): Use FOLDER or MAIL environment
      variables only if _mu_mailbox_pattern is not set. In other words,
      setting mail-spool in the configuration file overrides these
      variables.
      Sergey Poznyakoff authored
  5. 28 Dec, 2007 1 commit
    • appear in any local URLs.
      
      * TODO, NEWS: Update.
      
      * examples/url-parse.c: Print field/value pairs.
      * include/mailutils/argcv.h (MU_ARGCV_RETURN_DELIMS): New macro.
      (mu_argcv_get_np): New function.
      (mu_argcv_remove): New function.
      * include/mailutils/mutil.h (mu_scheme_autodetect_p): Change
      prototype.
      * include/mailutils/registrar.h (mu_registrar_lookup_url): New
      function.
      (struct _mu_record._is_scheme): Change signature.
      * include/mailutils/url.h (mu_url_sget_fvpairs)
      (mu_url_aget_fvpairs): New functions.
      (mu_url_expand_path): New function.
      
      * libproto/imap/folder.c (folder_imap_list): Fix signature.
      * libproto/nntp/folder.c (nntp_folder_list): Fix signature.
      * libproto/include/amd.h (amd_url_init): Remove.
      * libproto/include/registrar0.h: Fix scheme defines.
      * libproto/include/url0.h (struct _mu_url.fvpairs,fvcount): New
      members.
      * libproto/maildir/folder.c (_maildir_is_scheme): Change
      signature.
      (_maildir_url_init): Remove
      (_maildir_record): Remove url_init.
      * libproto/mbox/folder.c (_path_record): Remove url_init.
      (_mbox_record): Use mu_url_expand_path as url_init.
      (_path_is_scheme): Change signature.
      * libproto/mh/folder.c (_mh_is_scheme): Change signature.
      (_mh_url_init): Remove.
      (_mh_record): Use mu_url_expand_path as url_init.
      * libproto/mbox/Makefile.am (libmu_mbox_la_SOURCES): Remove url.c
      * libproto/mbox/url.c: Remove.
      
      * mail/mail.h, mail/util.c (util_url_to_string): New function.
      * mail/quit.c, mail/summary.c: Use util_url_to_string where
      appropriate.
      * mailbox/amd.c (amd_url_destroy, amd_url_init): Remove.
      * mailbox/argcv.c (mu_argcv_get_np): New function.
      (argcv_scan): Change signature. All callers updated.
      (argcv_get_n): Rewrite using argcv_get_np.
      (mu_argcv_remove): New function.
      
      * mailbox/file_stream.c (struct _prog_stream.argc): Fix data type.
      * mailbox/folder.c (mu_folder_create_from_record): URL initializer
      is optional.
      * mailbox/gdebug.c (mu_global_debug_from_string): Fix datatype of
      argc.
      * mailbox/mailbox.c (mailbox_folder_create): Rewrite.
      (_create_mailbox): Split off _create_mailbox0 function.
      Make URL initializer optional.
      * mailbox/mutil.c (mu_scheme_autodetect_p): Rewrite.
      * mailbox/registrar.c (mu_registrar_lookup_url): New function.
      (mu_registrar_lookup): Rewrite using mu_registrar_lookup_url.
      (mu_record_is_scheme,mu_record_set_is_scheme): Change signature.
      * mailbox/url.c (mu_url_destroy): Destroy fvpairs.
      (url_parse0): Use scheme "file" for URLs beginning with a /.
      Parse parameters.
      (mu_url_sget_fvpairs, mu_url_aget_fvpairs): New functions.
      (mu_url_expand_path): New function.
      * mailbox/testsuite/Urls: Update.
      
      * pop3d/bulletin.c (set_bulletin_db,set_bulletin_source): Allocate
      string storage.
      (read_bulletin_db): Return 0 if no record was found.
      (get_last_delivered_num): Return error code.
      (deliver_pending_bulletins): Rewrite.
      * pop3d/capa.c (pop3d_capa): Bugfix.
      Sergey Poznyakoff authored
  6. 21 Dec, 2007 2 commits
    • Sergey Poznyakoff authored
    • speed up.
      * imap4d/imap4d.h (WCARD_NOMATCH,WCARD_MATCH)
      (WCARD_RECURSE_MATCH): Remove.
      * imap4d/list.c: Rewrite using mu_folder_enumerate.
      * imap4d/lsub.c (imap4d_lsub): Fix call to util_wcard_match.
      * imap4d/util.c (util_wcard_match): Return 0 for match, 1
      otherwise.
      * imap4d/testsuite/imap4d/list.exp: Fix two testcases to match
      the new (stricter RFC-compliant) behavior.
      * include/mailutils/folder.h (mu_folder_match_fp): New typedef.
      (mu_folder_enumerate_fp): New typedef.
      (mu_folder_enumerate): New function.
      (mu_folder_set_match, mu_folder_get_match): New functions.
      
      * libproto/imap/folder.c, libproto/include/imap0.h,
      libproto/nntp/folder.c : Use new folder list framework.
      * libproto/include/folder0.h (struct _mu_folder._list): Change
      signature.
      (_match): New member.
      * libproto/mbox/folder.c (_path_is_scheme): Improve automatic
      mailbox	format detection.
      (folder_mbox_list): Do not use glob, recursively scan
      subdirectories instead.
      * mailbox/folder.c (mu_folder_match): New function.
      (mu_folder_create_from_record): Set mu_folder_match as the default
      matcher.
      (mu_folder_set_match, mu_folder_get_match): New functions.
      (mu_folder_enumerate): New function.
      (mu_folder_list): Rewrite using mu_folder_enumerate.
      Sergey Poznyakoff authored
  7. 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
  8. 15 Dec, 2007 1 commit
  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 3 commits
    • Sergey Poznyakoff authored
    • pop3d/pop3d.c: Call mu_tcpwrapper_cfg_init.
      
      * include/mailutils/cfg.h (mu_cfg_section_add_container)
      (mu_cfg_section_add_params, mu_create_canned_section)
      (mu_create_canned_param, mu_get_canned_container): New functions.
      * lib/tcpwrap.c (mu_tcpwrapper_cfg_init): New function.
      * lib/tcpwrap.h (TCP_WRAPPERS_CONFIG): Change definition.
      * mailbox/cfg_driver.c (mu_create_canned_section)
      (mu_create_canned_param): Change prototypes.
      (add_parameters): Rename to mu_cfg_section_add_params, make
      extern. All callers changed.
      Sergey Poznyakoff authored
    • (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. 09 Dec, 2007 2 commits
    • * examples/echosrv.c: New file.
      * include/mailutils/Makefile.am: Add server.h.
      * include/mailutils/server.h: New file.
      * include/mailutils/acl.h (mu_acl_t): Move to types.hin
      * include/mailutils/types.hin (mu_acl_t,mu_server_t)
      (mu_tcp_server_t): New types.
      * mailbox/Makefile.am: Add server.c and tcpsrv.c.
      * mailbox/server.c: New file.
      * mailbox/tcpsrv.c: New file.
      * mailbox/acl.c: Include <sys/wait.h>
      Rename all `sin' and `sun' to avoid name clashes.
      * mailbox/errors (MU_ERR_LOCK_EXT_FAIL): Do not abbreviate
      anything in error description.
      Sergey Poznyakoff authored
    • filter.
      * imap4d/preauth.c: Fix misleading comment.
      * mailbox/vartab.c (mu_vartab_expand): Support old prefix (%) for
      single-character variables.
      Sergey Poznyakoff authored
  12. 07 Dec, 2007 2 commits
    • Sergey Poznyakoff authored
    • * 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
  13. 05 Dec, 2007 1 commit
    • * imap4d/Makefile.am, mu_daemon_argp_parser (LDADD): Add
      TCPWRAP_LIBRARIES.
      * imap4d/imap4d.c: Include tcpwrap.h
      (imap4d_mainloop): Check the connection using tcp wrappers.
      * imap4d/preauth.c: Fix a typo in the comment.
      * maidag/maidag.h: Include tcpwrap.h
      * maidag/maidag.c, maidag/lmtp.c: Add TCP wrappers support.
      * pop3d/pop3d.c: Include tcpwrap.h
      (pop3d_mainloop): Check the connection using tcp wrappers.
      * lib/Makefile.am: Add tcpwrap.c and tcpwrap.h
      * lib/tcpwrap.c: New file.
      * lib/tcpwrap.h: New file.
      * libargp/common.c (mu_daemon_argp_parser): Bugfix.
      Sergey Poznyakoff authored
  14. 04 Dec, 2007 2 commits
    • has a docstring which is displayed as a comment before it.
      A docstring is also added to the configuration group structure,
      for use in future.
      
      * include/mailutils/cfg.h (struct mu_cfg_param): New members
      `docstring' and `argname'.
      (struct mu_cfg_section): New member `docstring'.
      (mu_cfg_format_docstring): New function.
      * include/mailutils/libargp.h (mu_help_config_mode): New
      declaration.
      * libargp/cmdline.h (mu_help_config_mode): Remove.
      * libargp/muinit.c (mu_app_init): Better format the initial
      comment.
      * mailbox/cfg_format.c (mu_cfg_data_type_string): Use NLS.
      (mu_cfg_format_docstring): New function.
      (format_param,format_section): Use mu_cfg_format_docstring.
      * mailbox/cfg_lexer.c (mu_config_create_container): Initialize
      allocated memory chunk with zeros.
      (dup_container): Duplicate docstring.
      (mu_build_container): Document include statement.
      
      * dotlock/dotlock.c, imap4d/imap4d.c, libargp/tls.c,
      libcfg/auth.c, libcfg/common.c, libcfg/gsasl.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, mimeview/mimeview.c,
      movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
      sieve/sieve.c: Document configuration file statements.
      
      * pop3d/pop3d.h (expire): Change type to unsigned int.
      
      * po/POTFILES.in: Add missing files.
      Sergey Poznyakoff authored
    • * 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
  15. 03 Dec, 2007 3 commits
    • 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
    • Add preauth.c · 0112e3c0
      Sergey Poznyakoff authored
    • * imap4d/Makefile.am (imap4d_SOURCES): Add preauth.c
      * imap4d/authenticate.c (imap4d_authenticate): Use
      imap4d_session_setup.
      * imap4d/imap4d.c (imap4d_session_setup)
      (imap4d_session_setup.0): New functions.
      (imap4d_mainloop): Implement PREAUTH mode.
      * imap4d/imap4d.h (RESP_PREAUTH): New define.
      (enum imap4d_preauth): New data type.
      (preauth_mode,preauth_program,preauth_only,ident_port): New
      globals.
      (imap4d_session_setup,imap4d_session_setup.0): New functions.
      * imap4d/login.c (imap4d_login): Use imap4d_session_setup0.
      * imap4d/util.c (sc2string): Handle RESP_PREAUTH
      
      * lib/.cvsignore, m4/.cvsignore: Update.
      
      * mailbox/tcp.c: Fix indentation.
      Sergey Poznyakoff authored
  16. 02 Dec, 2007 5 commits
  17. 01 Dec, 2007 2 commits
  18. 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
  19. 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
  20. 28 Nov, 2007 3 commits
    • 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
    • * include/mailutils/debug.hm4 (struct mu_debug_locus): New data
      type.
      (mu_debug_set_locus, mu_debug_get_locus)
      (mu_debug_set_function, mu_debug_get_function): New prototypes.
      (mu_debug_printer_fp, mu_debug_syslog_printer)
      (mu_debug_stderr_printer): Change type of the first argument.
      (mu_debug_set_data): New function.
      (all proto): Remove argument names, use only types to avoid
      problems on some broken systems (FreeBSD comes to mind).
      * libproto/include/debug0.h (struct _mu_debug): printer: change
      type of the first argument.
      locus, function, data, destroy: New fields.
      
      * mailbox/dbgstderr.c (mu_debug_stderr_printer): Change type of
      the first argument.
      * mailbox/dbgsyslog.c (mu_debug_syslog_printer): Change type of
      the first argument.
      
      * mailbox/debug.c (mu_debug_destroy): Flush any left over data.
      Call destroy, if supplied.
      (mu_debug_set_data): New function.
      (mu_debug_vprintf): Print locus and function (if supplied) at the
      beginning of the buffer.
      (mu_debug_set_locus, mu_debug_get_locus, mu_debug_set_function)
      (mu_debug_get_function): New functions.
      
      * scripts/debugdef.m4 (MKDEBUG): Use mu_debug_set_locus and
      mu_debug_set_function to print source locations. This allows for
      easy i18n of the MU_DEBUG[0-9]* format strings.
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored