1. 27 Oct, 2010 2 commits
  2. 26 Oct, 2010 1 commit
    • The purpose is to make it modular and flexible.  URLs are
      parsed out as they are created.  Missing URL parts can be
      supplied via a "URL hint" at creation time (similar to
      the approach used in creating mu_address_t).  Ports
      can be specified either as numbers or as service names.
      Original port string representation can be retrieved from
      the URL, as well as its numeric value.
      
      * libmailutils/url/accessor.h: New file.
      * libmailutils/url/copy.c: New file.
      * libmailutils/url/create.c: New file.
      * libmailutils/url/decode.c: New file.
      * libmailutils/url/destroy.c: New file.
      * libmailutils/url/dup.c: New file.
      * libmailutils/url/expand.c: New file.
      * libmailutils/url/flag.c: New file.
      * libmailutils/url/get-auth.c: New file.
      * libmailutils/url/get-host.c: New file.
      * libmailutils/url/get-param.c: New file.
      * libmailutils/url/get-path.c: New file.
      * libmailutils/url/get-portstr.c: New file.
      * libmailutils/url/get-query.c: New file.
      * libmailutils/url/get-scheme.c: New file.
      * libmailutils/url/get-secret.c: New file.
      * libmailutils/url/get-user.c: New file.
      * libmailutils/url/match.c: New file.
      * libmailutils/url/port.c: New file.
      * libmailutils/url/scheme.c: New file.
      * libmailutils/url/uplevel.c: New file.
      * libmailutils/url/urlstr.c: New file.
      
      * configure.ac (AC_CONFIG_FILES): Add libmailutils/url/Makefile
      * libmailutils/Makefile.am (SUBDIRS): Add url.
      (libmailutils_la_LIBADD): Link with liburl.
      * libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove url.c
      * libmailutils/base/url.c: Remove.
      
      * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add xdecode.c
      * libmailutils/string/xdecode.c: New file.
      
      * include/mailutils/sys/url.h (_mu_url): Change type to short.
      <_get_port>: Change second argument to unsigned.
      <_get_portstr>: New method.
      * include/mailutils/url.h (MU_URL_SCHEME): New flag.
      (MU_URL_PARSE_HEXCODE, MU_URL_PARSE_HIDEPASS)
      (MU_URL_PARSE_PORTSRV, MU_URL_PARSE_PORTWC)
      (MU_URL_PARSE_PIPE, MU_URL_PARSE_SLASH): New flags.
      (mu_url_create_hint, mu_url_copy_hints): New prototypes.
      (mu_url_parse): Remove.
      (mu_url_get_port): Change second argument to unsigned.
      (mu_url_decode_len,mu_url_decode): Remove.
      (mu_url_decode): New proto.
      (mu_url_sget_portstr, mu_url_aget_portstr)
      (mu_url_get_portstr): New protos.
      
      * include/mailutils/util.h (mu_str_url_decode)
      (mu_str_url_decode_inline): New protos.
      * libproto/pop/mbox.c (pop_open): Port is unsigned.
      
      * libproto/imap/folder.c: Use MU_URL_SCHEME in url_may_have.
      * libproto/maildir/folder.c: Likewise.
      * libproto/mailer/prog.c: Likewise.
      * libproto/mailer/remote.c: Likewise.
      * libproto/mailer/sendmail.c: Likewise.
      * libproto/mailer/smtp.c: Likewise.
      * libproto/mbox/folder.c: Likewise.
      * libproto/mh/folder.c: Likewise.
      * libproto/nntp/folder.c: Likewise.
      * libproto/pop/folder.c: Likewise.
      
      * imap4d/imap4d.c: Remove calls to mu_url_parse.
      * libmailutils/base/registrar.c: Likewise.
      * libmailutils/base/wicket.c: Likewise.
      * libmailutils/mailbox/folder.c: Likewise.
      * libmailutils/mailbox/mailbox.c: Likewise.
      * libmailutils/mailer/mailer.c: Likewise.
      * libmailutils/tests/url-parse.c: Likewise.
      * libmailutils/tests/wicket.c: Likewise.
      * libproto/mailer/smtp_auth.c: Likewise.
      * maidag/deliver.c: Likewise.
      * mu/wicket.c: Likewise.
      
      * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use
      mu_str_url_decode, instead of mu_url_decode.
      * libmailutils/stream/tcp.c (_tcp_instance)<port>: Change type
      to unsigned short. All uses updated.
      (mu_tcp_stream_create_with_source_ip)
      (mu_tcp_stream_create_with_source_host)
      (mu_tcp_stream_create): Port is unsigned.
      * include/mailutils/stream.h (mu_tcp_stream_create_with_source_ip)
      (mu_tcp_stream_create_with_source_host)
      (mu_tcp_stream_create): Port is unsigned.
      * include/mailutils/cpp/url.h (get_port): Return unsigned.
      * libmu_cpp/url.cc (get_port): Return unsigned.
      (parse): Empty function. Schedule for removal.
      * python/libmu_py/url.c (api_url_parse): Empty function.
      Schedule for removal.
      (api_url_get_port): Port is unsigned.
      
      * libmailutils/base/wicket.c (mu_wicket_file_match_url)
      (mu_wicket_file_match_url): New parameter: parse_flags.
      * mu/wicket.c (wicket_match): Use parse_flags to control
      whether or not to show the plaintext password.
      
      * doc/texinfo/url.texi: Update.
      Sergey Poznyakoff authored
  3. 25 Oct, 2010 2 commits
  4. 24 Oct, 2010 3 commits
    • …ckward compatibility.
      
      * config/.gitignore: Remove.
      * config/Makefile.am: Remove.
      * config/mailutils-config.c: Remove.
      * config/maint.mk: Remove.
      * config/mailutils.m4: Move to mu-aux/mailutils.m4
      * mu-aux/Makefile.am (m4datadir, dist_m4data_DATA): New variables.
      
      * Makefile.am (SUBDIRS) <config>: Remove.
      * configure.ac (AC_CONFIG_FILES): Remove config.
      
      * mu/mailutils-config: New file.
      * mu/cflags.c: New file.
      * mu/ldflags.c: New file.
      * mu/Makefile.am (dist_bin_SCRIPTS, EXTRA_DIST): Add mailutils-config.
      (mu_SOURCES): Add cflags.c and ldflags.c.
      (AM_CPPFLAGS): New variable.
      * mu/mu.c: Add new modes: cflags and ldflags.
      * mu/mu.h (mutool_ldflags, mutool_cflags): New protos.
      * po/POTFILES.in: Update.
      Sergey Poznyakoff authored
    • * mu/wicket.c: New file.
      * mu/mu.h (mutool_wicket): New proto.
      * mu/mu.c (mutool_action_tab): Add an entry for wicket mode.
      * mu/Makefile.am (mu_SOURCES): Add wicket.c
      * .gitignore: Update.
      Sergey Poznyakoff authored
    • The new algorithm always returns the best match, i.e. the
      one with the smallest number of wildcard comparisons.
      
      * include/mailutils/auth.h (mu_wicket_stream_match_url)
      (mu_wicket_file_match_url): New protos.
      Remove unnecessary 'extern' qualifiers.
      * include/mailutils/url.h (mu_url_is_ticket): Remove.
      (mu_url_matches_ticket): New proto.
      * libmailutils/base/url.c (mu_url_parse): Fix name corruption during
      password obfuscation.
      (defined): Remove static function.
      (mu_url_is_ticket): Remove function.
      (mu_url_matches_ticket): New function.
      * libmailutils/base/wicket.c (get_ticket_url): Remove.
      (mu_wicket_stream_match_url)
      (mu_wicket_file_match_url): New functions.
      (file_ticket_get_cred): Use mu_wicket_file_match_url.
      
      * libmailutils/tests/wicket.c: New file.
      * libmailutils/tests/Wicketfile: New file.
      * libmailutils/tests/wicket.at: New file.
      * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wicket.
      (EXTRA_DIST): Add Wicketfile
      (TESTSUITE_AT): Add wicket.at
      * libmailutils/tests/testsuite.at: Include wicket.at
      * libmailutils/tests/.gitignore: Update.
      Sergey Poznyakoff authored
  5. 21 Oct, 2010 2 commits
    • * include/mailutils/smtp.h (mu_smtp_dot): New proto.
      * libproto/mailer/smtp_dot.c: New file.
      * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
      smtp_dot.c.
      * libproto/mailer/smtp.c (smtp_send_message): Send RSET after an
      unexpected SMTP reply.
      Call mu_smtp_dot after successful sending.
      * libproto/mailer/smtp_data.c (_mu_smtp_data_end): Set
      state to MU_SMTP_DOT.
      * libproto/mailer/smtp_rset.c (mu_smtp_rset): Improve state
      selection algorithm.
      * libproto/mailer/smtp_send.c (mu_smtp_send_stream): Don't
      reset state: it is done by _mu_smtp_data_end.
      * testsuite/smtpsend.c (main): Call mu_smtp_dot after sending
      message.
      Sergey Poznyakoff authored
    • * libproto/pop/folder.c (_pop_record): Accept URL parameters.
      * libproto/pop/mbox.c (pop_open): Don't start TLS if
      the `notls' parameter is present in the URL.
      Sergey Poznyakoff authored
  6. 20 Oct, 2010 1 commit
    • …-smtp-00.  Minor fix in maidag (url mode).
      
      * include/mailutils/registrar.h (MU_RECORD_DEFAULT)
      (MU_RECORD_LOCAL): New flags.
      (_mu_record) <flags,url_may_have,url_must_have>: New members.
      Remove unnecessary externs.
      (mu_record_set_.*): Remove all protos.
      (mu_record_check_url, mu_registrar_test_local_url): New protos.
      * include/mailutils/sys/url.h (_mu_url) <flags>: New member.
      (MU_URL_USER, MU_URL_SECRET, MU_URL_AUTH)
      (MU_URL_HOST, MU_URL_PORT, MU_URL_PATH)
      (MU_URL_PARAM, MU_URL_QUERY)
      (MU_URL_CRED, MU_URL_INET, MU_URL_ALL): New flags.
      (mu_url_get_flags, mu_url_has_flag): New protos.
      * libmailutils/base/registrar.c (mu_record_set_.*): Remove all.
      (mu_record_check_url): New function.
      (mu_registrar_test_local_url): New function.
      * libmailutils/base/url.c (mu_url_copy0): Copy flags.
      (mu_url_parse): Use flags intead of inspecting each
      structure member. Set flags.
      (mu_url_get_flags, mu_url_has_flag): New functions.
      * libmailutils/diag/errors (MU_ERR_URL_MISS_PARTS)
      (MU_ERR_URL_EXTRA_PARTS): New error codes.
      * libmailutils/mailbox/folder.c (mu_folder_create_from_record): Check
      the URL using mu_record_check_url.
      * libproto/imap/folder.c (_imap_record, _imaps_record): Initialize new fields.
      * libproto/maildir/folder.c (_maildir_record): Likewise.
      * libproto/mbox/folder.c (_mbox_record): Likewise.
      * libproto/mh/folder.c (_mh_record): Likewise.
      * libproto/nntp/folder.c (_nntp_record): Likewise.
      * libproto/pop/folder.c (_pop_record, _pops_record): Likewise.
      * libproto/mailer/prog.c (_prog_record): Likewise.
      (_url_prog_init): Remove extra checks, rely on mu_record_check_url.
      * libproto/mailer/remote.c (_mu_remote_smtp_record)
      (_mu_remote_sendmail_record,_mu_remote_prog_record): Initialize new fields.
      * libproto/mailer/sendmail.c (_url_sendmail_init): Remove extra checks, rely
      on mu_record_check_url.
      (_sendmail_record): Initialize new fields.
      * libproto/nntp/url.c (url_nntp_destroy): Remove.
      (_nntp_url_init): Remove extra checks.
      * libproto/pop/url.c (url_pop_destroy): Remove.
      (_url_pop_init, _url_pops_init): Remove extra checks.
      
      * libproto/mailer/smtp.c (_url_smtp_init): Remove extra checks.
      (_smtp_record): Initialize new fields.
      (smtp_mailer_add_auth_mech): New function.
      (smtp_open): Allow for auth= part before the host name.
      
      * maidag/deliver.c (is_remote_url): New function.
      (do_delivery): Do not try to switch user privileges if the
      URL refers to a remote mailbox.
      * maidag/maidag.c (main): Initialize TLS.
      Sergey Poznyakoff authored
  7. 19 Oct, 2010 1 commit
  8. 18 Oct, 2010 1 commit
    • * include/mailutils/header.h: Remove unnecessary externs.
      (mu_url_sget_param, mu_url_aget_param): New protos.
      * libmailutils/base/url.c (mu_url_sget_param, mu_url_aget_param): New
      functions.
      
      * libmailutils/mailbox/hdrfirst.c: New file.
      * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add hdrfirst.c.
      
      * libmailutils/mailbox/message.c (message_envelope_sender): Try to restore
      the envelope sender from X-Envelope-Sender, X-Envelope-From, X-Original-Sender,
      and From headers, in that order.
      * libmailutils/mailer/mailer.c (_set_from): Try to obtain sender from
      the message envelope.  If that fails, fall back to the From header.
      * libproto/mailer/mbox.c (parse_received, guess_message_recipient): New
      static functions.
      (remote_mbox_append_message): Get recipient address from the first
      of X-Envelope-To, Delivered-To, X-Original-To headers, in that order.
      If that fails, try to deduce it from the Received header.  If that
      fails too, fall back to the To header.
      If recipient-headers URL parameter is defined, its value (a comma-separated
      list of names) overrides this list.
      The strip-domain parameter, if present, instructs the function to strip
      domain part from the recipient address before resolving it.
      The domain parameter, if present, supplies the domain name which overrides
      the domain obtained from the URL.
      Sergey Poznyakoff authored
  9. 17 Oct, 2010 1 commit
  10. 16 Oct, 2010 1 commit
  11. 12 Oct, 2010 1 commit
  12. 11 Oct, 2010 2 commits
    • * include/mailutils/util.h (mu_readlink): New function.
      (mu_unroll_symlink): Change prototype.
      * libmailutils/base/symlink.c (mu_qualify_link): Remove.
      (mu_readlink): New function.
      (mu_unroll_symlink): Rewrite.  Don't use statically allocated
      buffers.
      * libmailutils/base/locker.c (mu_locker_create): Update calls to
      mu_unroll_symlink.
      Sergey Poznyakoff authored
    • * comsat/action.c (run_user_action): Use mu_make_file_name.
      * imap4d/lsub.c (imap4d_lsub): Likewise.
      * imap4d/subscribe.c (imap4d_subscribe): Likewise.
      * imap4d/unsubscribe.c (imap4d_unsubscribe): Likewise.
      * libmailutils/base/filename.c (mu_get_full_path): Likewise.
      * libmailutils/base/tempfile.c (mu_tempfile): Likewise.
      * libmailutils/base/url.c (_url_path_default): Likewise.
      * libmu_auth/virtual.c (getpwnam_virtual)
      (mu_auth_virt_domain_by_name): Likewise.
      * libmu_sieve/extensions/vacation.c (check_db): Likewise.
      * libmu_sieve/sieve.l (_try_include): Likewise.
      * maidag/forward.c (maidag_forward): Likewise.
      
      * mh/mh.h (mh_safe_make_file_name): New proto.
      * mh/mh_init.c (mh_audit_open,mh_get_dir)
      (mh_expand_name,mh_real_install): Use mh_safe_make_file_name.
      (mh_safe_make_file_name): New function.
      * mh/folder.c (read_seq_file, _scan): Use mh_safe_make_file_name.
      * mh/mh_global.c (mh_read_profile, _mh_init_global_sequences): Likewise.
      * mh/install-mh.c (main): Likewise.
      * mh/mhn.c (normalize_path, store_handler, main): Likewise.
      * mh/repl.c (make_draft): Likewise.
      * mh/rmf.c (rmf): Likewise.
      * mh/sortm.c (swap_message): Likewise.
      * mimeview/mimetypes.l (mimetypes_open): Likewise.
      
      * lib/mailcap.c: Add error checking.
      Sergey Poznyakoff authored
  13. 10 Oct, 2010 4 commits
    • * python/libmu_py/folder.c (api_folder_set_stream): Remove.
      * python/libmu_py/message.c (api_message_set_stream): Remove.
      * python/libmu_py/stream.c (api_stream_ref, api_stream_unref): Add.
      (api_stream_sequential_readline, api_stream_sequential_write): Remove.
      Wojciech Polak authored
    • Minor fix · 4f9d95ae
      * libmailutils/base/getcwd.c: Add missing include file.
      Sergey Poznyakoff authored
    • * include/mailutils/cstr.h (mu_strcasestr): Rename to mu_c_strcasestr.
      * libmailutils/string/cstrcasestr.c: Likewise. All uses changed.
      Sergey Poznyakoff authored
    • * libmailutils/base/mutil.c (mu_hex2ul, mu_hexstr2ul): Move to string/hexstr.c.
      (mu_get_homedir, mu_get_full_path)
      (mu_expand_path_pattern): Move to base/filename.c.
      (mu_getcwd): Move to base/getcwd.c.
      (mu_tilde_expansion): Move to base/tilde.c
      (mu_cpystr): Move to string/cpystr.c.
      (mu_get_host_name): Move to base/hostname.c.
      (mu_set_user_email,mu_set_user_email_domain)
      (mu_get_user_email_domain,mu_aget_user_email_domain)
      (mu_get_user_email,mu_normalize_path): Move to base/usremail.c.
      (mu_tempfile,mu_tempname): Move to base/tempfile.c.
      (mu_spawnvp): Move to base/spawnvp.c.
      (mu_qualify_link,mu_unroll_symlink): Move to base/symlink.c.
      (mu_rfc2822_references,mu_rfc2822_msg_id)
      (mu_rfc2822_in_reply_to): Move to base/msgid.c.
      (mu_strcasestr): Move to string/cstrcasestr.c.
      (mu_string_unfold): Move to string/unfold.c.
      (mu_true_answer_p): Move to string/trueans.c.
      (mu_scheme_autodetect_p): Move to base/schemeauto.c.
      (mu_fd_wait): Move to base/fdwait.c.
      (mu_set_default_fallback,mu_decode_filter): Move to filter/decode.c.
      (__argp_base_name): Move to lib/argp_base.c.
      
      * libmailutils/base/fdwait.c: New file.
      * libmailutils/base/filename.c: New file.
      * libmailutils/base/getcwd.c: New file.
      * libmailutils/base/hostname.c: New file.
      * libmailutils/base/msgid.c: New file.
      * libmailutils/base/schemeauto.c: New file.
      * libmailutils/base/spawnvp.c: New file.
      * libmailutils/base/symlink.c: New file.
      * libmailutils/base/tempfile.c: New file.
      * libmailutils/base/tilde.c: New file.
      * libmailutils/base/usremail.c: New file.
      * libmailutils/base/Makefile.am: Add new files.
      
      * libmailutils/filter/decode.c: New file.
      * libmailutils/filter/Makefile.am: Add new files.
      
      * libmailutils/string/cpystr.c: New file.
      * libmailutils/string/cstrcasestr.c: New file.
      * libmailutils/string/hexstr.c: New file.
      * libmailutils/string/trueans.c: New file.
      * libmailutils/string/unfold.c: New file.
      * libmailutils/string/Makefile.am: Add new files.
      
      * lib/argp_base.c: New file.
      * lib/Makefile.am: Add new files.
      
      * include/mailutils/io.h: Include stdarg.h
      * include/mailutils/mutil.h: Rename to util.h.  Reorder prototypes
      and declarations in logical groups.  All uses changed.
      
      * include/mailutils/cstr.h (mu_strcasestr): New proto, moved from
      include/mailutils/mutil.h.
      Sergey Poznyakoff authored
  14. 09 Oct, 2010 2 commits
    • Sergey Poznyakoff authored
    • * configure.ac (AC_CONFIG_FILES): Add libmailutils/ subdirs.
      * include/mailutils/Makefile.am: Update references to libmailutils.
      * po/POTFILES.in: Likewise.
      * libmailutils/.gitignore: Update.
      * libmailutils/Makefile.am: Use convenience libraries in subdirs.
      
      * libmailutils/string/Makefile.am: New file.
      * libmailutils/cstrcasecmp.c: Move to libmailutils/string.
      * libmailutils/cstrlower.c: Likewise.
      * libmailutils/cstrupper.c: Likewise.
      * libmailutils/strltrim.c: Likewise.
      * libmailutils/strskip.c: Likewise.
      * libmailutils/stripws.c: Likewise.
      * libmailutils/strrtrim.c: Likewise.
      * libmailutils/asnprintf.c: Likewise.
      * libmailutils/asprintf.c: Likewise.
      * libmailutils/muctype.c: Likewise.
      * libmailutils/vasnprintf.c: Likewise.
      * libmailutils/mkfilename.c: Likewise.
      
      * libmailutils/stream/Makefile.am: New file.
      * libmailutils/dbgstream.c: Move to libmailutils/stream.
      * libmailutils/file_stream.c: Likewise.
      * libmailutils/fltstream.c: Likewise.
      * libmailutils/iostream.c: Likewise.
      * libmailutils/mapfile_stream.c: Likewise.
      * libmailutils/memory_stream.c: Likewise.
      * libmailutils/message_stream.c: Likewise.
      * libmailutils/prog_stream.c: Likewise.
      * libmailutils/rdcache_stream.c: Likewise.
      * libmailutils/socket_stream.c: Likewise.
      * libmailutils/stdio_stream.c: Likewise.
      * libmailutils/stream.c: Likewise.
      * libmailutils/stream_printf.c: Likewise.
      * libmailutils/stream_vprintf.c: Likewise.
      * libmailutils/streamcpy.c: Likewise.
      * libmailutils/streamref.c: Likewise.
      * libmailutils/tcp.c: Likewise.
      * libmailutils/temp_file_stream.c: Likewise.
      * libmailutils/xscript-stream.c
      
      * libmailutils/cfg/Makefile.am: New file.
      * libmailutils/cfg/.gitignore: New file.
      * libmailutils/cfg_driver.c: Move to libmailutils/cfg/driver.c.
      * libmailutils/cfg_format.c: Move to libmailutils/cfg/format.c.
      * libmailutils/cfg_lexer.l: Move to libmailutils/cfg/lexer.l.
      * libmailutils/cfg_parser.y: Move to libmailutils/cfg/parser.y.
      * libmailutils/gocs.c: Move to libmailutils/cfg/gocs.c.
      
      * libmailutils/diag/Makefile.am: New file.
      * libmailutils/diag/.gitignore: New file.
      * libmailutils/debug.c: Move to libmailutils/diag.
      * libmailutils/diag.c: Likewise.
      * libmailutils/gdebug.c: Likewise.
      * libmailutils/errors: Likewise.
      * libmailutils/muerrno.cin: Likewise.
      * libmailutils/syslog.c: Likewise.
      * libmailutils/dbgstderr.c: Likewise.
      * libmailutils/dbgsyslog.c: Likewise.
      
      * libmailutils/address/Makefile.am: New file.
      * libmailutils/address.c: Move to libmailutils/address.
      * libmailutils/parse822.c: Likewise.
      
      * libmailutils/mailbox/Makefile.am: New file.
      * libmailutils/mailbox.c: Move to libmailutils/mailbox.
      * libmailutils/mbx_default.c: Likewise.
      * libmailutils/mbxitr.c: Likewise.
      * libmailutils/attribute.c: Likewise.
      * libmailutils/body.c: Likewise.
      * libmailutils/envelope.c: Likewise.
      * libmailutils/folder.c: Likewise.
      * libmailutils/hdritr.c: Likewise.
      * libmailutils/header.c: Likewise.
      * libmailutils/message.c: Likewise.
      * libmailutils/msgscan.c: Likewise.
      
      * libmailutils/mailer/Makefile.am: New file.
      * libmailutils/mailer.c: Move to libmailutils/mailer.
      * libmailutils/progmailer.c: Likewise.
      
      * libmailutils/mime/Makefile.am: New file.
      * libmailutils/attachment.c: Move to libmailutils/mime.
      * libmailutils/mime.c: Likewise.
      * libmailutils/mimehdr.c: Likewise.
      
      * libmailutils/server/Makefile.am: New file.
      * libmailutils/acl.c: Move to libmailutils/server.
      * libmailutils/server.c: Likewise.
      * libmailutils/msrv.c: Likewise.
      * libmailutils/ipsrv.c: Likewise.
      
      * libmailutils/auth/Makefile.am: New file.
      * libmailutils/auth.c: Move to libmailutils/auth.
      * libmailutils/mu_auth.c: Likewise.
      * libmailutils/system.c: Likewise.
      
      * libmailutils/base/Makefile.am: New file.
      * libmailutils/base/.gitignore: New file.
      * libmailutils/alloc.c: Move to libmailutils/base.
      * libmailutils/amd.c: Likewise.
      * libmailutils/argcv.c: Likewise.
      * libmailutils/assoc.c: Likewise.
      * libmailutils/daemon.c: Likewise.
      * libmailutils/date.c: Likewise.
      * libmailutils/fgetpwent.c: Likewise.
      * libmailutils/freeitem.c: Likewise.
      * libmailutils/getpass.c: Likewise.
      * libmailutils/iterator.c: Likewise.
      * libmailutils/kwd.c: Likewise.
      * libmailutils/list.c: Likewise.
      * libmailutils/listlist.c: Likewise.
      * libmailutils/locale.c: Likewise.
      * libmailutils/locker.c: Likewise.
      * libmailutils/mailcap.c: Likewise.
      * libmailutils/md5.c: Likewise.
      * libmailutils/monitor.c: Likewise.
      * libmailutils/munre.c: Likewise.
      * libmailutils/mutil.c: Likewise.
      * libmailutils/nls.c: Likewise.
      * libmailutils/nullrec.c: Likewise.
      * libmailutils/observer.c: Likewise.
      * libmailutils/opool.c: Likewise.
      * libmailutils/parsedate.y: Likewise.
      * libmailutils/permstr.c: Likewise.
      * libmailutils/property.c: Likewise.
      * libmailutils/registrar.c: Likewise.
      * libmailutils/refcount.c: Likewise.
      * libmailutils/rfc2047.c: Likewise.
      * libmailutils/sha1.c: Likewise.
      * libmailutils/secret.c: Likewise.
      * libmailutils/ticket.c: Likewise.
      * libmailutils/url.c: Likewise.
      * libmailutils/vartab.c: Likewise.
      * libmailutils/version.c: Likewise.
      * libmailutils/wicket.c: Likewise.
      Sergey Poznyakoff authored
  15. 08 Oct, 2010 7 commits
    • * mu/Makefile.am [MU_COND_SUPPORT_POP]: Compile pop.c conditionally.
      * mu/mu.c (mutool_nosys): New function.
      (mutool_action_tab): Compile pop support conditionally.
      Sergey Poznyakoff authored
    • * maidag/forward.c (check_forward_permissions): Keep track of the
      processed files.  Refuse to process a file twice.
      (process_forward): Rewrite using streams instead of FILE.
      (maidag_forward): Accept absolute file names (mainly for testing).
      * maidag/maidag.c (forward_checks): New keyword "owner".
      (cb2_forward_file_checks): New keyword "none".
      (main): Require at least one recipient in MDA mode.
      * maidag/maidag.h (FWD_OWNER): New mask.
      * maidag/tests/forward.at: New file.
      * maidag/tests/Makefile.am (TESTSUITE_AT): Add forward.at
      * maidag/tests/testsuite.at: Include forward.at.
      Sergey Poznyakoff authored
    • * examples/mta.c (mta_send): A line number refers to the start
      of each line, not end of it.
      * mail/testsuite/mail/send.exp: Reflect this change.
      * sieve/tests/redirect.at: Likewise.
      * sieve/tests/reject.at: Likewise.
      Sergey Poznyakoff authored
    • * maidag/deliver.c (make_tmp): Return mu_message_t.
      Use mu_stream_to_message function.
      (mda): Remove.
      (maidag_stdio_delivery): Inline mda.
      * maidag/maidag.h (mda): Remove.
      Sergey Poznyakoff authored
    • * maidag/maidag.c (mda_mode,lmtp_mode,url_option): Remove.
      (maidag_mode): New variable.
      (parse_opt): The --lmtp, --url and --mda options set the delivery-mode
      configuration statement.
      (cb_delivery_mode): New callback.
      (maidag_cfg_param) <delivery-mode>: New statement.
      (main): Redo delivery mode selection.
      * maidag/maidag.h (maidag_mode): New enum.
      (maidag_mode): New extern.
      (mda_mode,lmtp_mode,url_option): Remove.
      (maidag_delivery_fn): New typedef.
      (maidag_stdio_delivery,mda): Change signature.
      (deliver_to_url, deliver_to_user): New prototypes.
      
      * maidag/deliver.c (mda): Take delivery function as a parameter.
      (maidag_stdio_delivery): Likewise.
      (deliver_to_user): Rename to deliver_to_mailbox.
      (deliver_url): Rename to do_delivery.
      (deliver): Rename to deliver_to_url.
      (deliver_to_user): New function.
      * maidag/forward.c (process_forward): Use deliver_to_user.
      * maidag/lmtp.c (dot_deliver): Likewise.
      Sergey Poznyakoff authored
  16. 07 Oct, 2010 3 commits
    • * configure.ac: Add maidag/tests
      * maidag/Makefile.am (SUBDIRS): Add tests.
      * maidag/deliver.c (make_tmp): Write a
      message delimiter.
      (is_remote_url, is_mailer_url): Remove.
      (deliver_url): Allow for URLs without user name.
      * maidag/lmtp.c (lmtp_set_privs): Empty group list
      means do not switch to any groups.
      * maidag/maidag.c (mda_mode): New variable.
      (options): New option --mda.
      (cb_group, cb2_group): Create the list even if it is empty.
      (main): Handle --mda.
      
      * maidag/tests/.gitignore: New file.
      * maidag/tests/Makefile.am: New file.
      * maidag/tests/atlocal.in: New file.
      * maidag/tests/input.msg: New file.
      * maidag/tests/lmtp.at: New file.
      * maidag/tests/mda.at: New file.
      * maidag/tests/testsuite.at: New file.
      * maidag/tests/url-mbox.at: New file.
      * maidag/tests/input.msg: New file.
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * libmailutils/fromflt.c: New file.
      * libmailutils/Makefile.am (libmailutils_la_SOURCES): Add fromflt.c
      * libmailutils/tests/testsuite.at: Include fromflt.at.
      * include/mailutils/filter.h (mu_from_filter): New filter type.
      * libmailutils/filter.c (mu_filter_get_list): Register mu_from_filter.
      
      * libmailutils/fromflt.at: New file.
      * libmailutils/tests/Makefile.am (TESTSUITE_AT): Add fromflt.at.
      * libmailutils/tests/base64d.at: Mention `filter' in the keywords.
      * libmailutils/tests/base64e.at: Likewise.
      * libmailutils/tests/fltst.c (main): Fix argc check.
      
      * libproto/mbox/mbox.c (append_message_to_stream): Use "FROM" filter.
      Sergey Poznyakoff authored
  17. 06 Oct, 2010 2 commits
    • * libmailutils/file_stream.c (mu_fd_stream_create): Mark stream as
      open, do not call mu_stream_open explicitly.
      * libmailutils/message_stream.c (mu_stream_to_message): Bugfixes,
      wrong owner given to mu_envelope_set_ calls.
      * libmailutils/stream.c (_MU_STR_FLUSH_ALL)
      (_MU_STR_FLUSH_KEEP): New macros for _stream_flush_buffer.
      (_stream_flush_buffer): Change the meaning of the last argument.
      All callers updated.
      (mu_stream_seek): Fix operation with MU_SEEK_END.
      Call _mu_stream_cleareof on success.
      (mu_stream_read): Call _stream_flush_buffer in buffered mode.
      (mu_stream_getdelim, mu_stream_readdelim): Call _stream_flush_buffer.
      * libmailutils/streamcpy.c (mu_stream_copy): Reset size if mu_stream_seek
      fails.
      * libmailutils/temp_file_stream.c (mu_temp_file_stream_create): Set
      full buffering mode by default.
      
      * maidag/mailtmp.c: Remove.
      * maidag/Makefile.am (maidag_SOURCES): Remove mailtmp.c
      * po/POTFILES.in: Likewise.
      * maidag/deliver.c (make_tmp): Rewrite.  Return mu_mailbox_t.
      All callers changed.
      * maidag/lmtp.c (lmtp_transcript): Remove static.
      (lmpt_transcript): New function.
      (lmtp_reply): Use mu_stream_t instead of FILE.
      (xlatnl): Remove.  Superseded by mu_rtrim_cset and family.
      (mtmp, mbox): Remove globals.
      (mesg): New global.
      (cfun_unknown, cfun_mail_from, cfun_rcpt_to)
      (dot_temp_fail, dot_deliver, cfun_rset)
      (cfun_lhlo, cfun_quit, cfun_help): Use mu_stream_t instead of FILE.
      (cfun_data): Rewrite.
      (cfun_dot): Remove.
      (to_fgets): Rewrite using mu_stream_t.
      (lmtp_loop): Change signature. Rewrite using mu_stream_t.
      (lmtp_connection, maidag_lmtp_server): Update accordingly.
      * maidag/maidag.c (maidag_transcript): New global.
      (options, parse_opt): New option --transcript.
      * maidag/maidag.h (maidag_transcript): New extern.
      (mail_tmp_begin, mail_tmp_add_line, mail_tmp_finish)
      (mail_tmp_destroy): Remove.
      Sergey Poznyakoff authored
    • * mu/pop.c (com_apop, com_pass): Require password in non-interactive
      mode.
      Sergey Poznyakoff authored
  18. 05 Oct, 2010 4 commits
    • * mu/shell.c (input_line_script): Use mu_getline.
      * libmu_argp/compat.c: Remove.
      * libmu_argp/Makefile.am: Remove compat.c
      * po/POTFILES.in: Likewise.
      Sergey Poznyakoff authored
    • * mu/mu.h (mutool_command) <doc>: Rename to docstring.
      <argdoc>: New member.
      * mu/pop.c (com_apop): 2nd arg (password) is optional.  If not
      supplied, ask for it using the mu_getpass function.
      (pop_comtab): Add argdocs.  Use N_ wrappers around translatable
      strings.
      * mu/shell.c (default_comtab: Add argdocs.  Use N_ wrappers around
      translatable strings.
      (print_comtab): Rewrite.
      (shell_history): Use pager.
      Sergey Poznyakoff authored
    • * libproto/pop/pop3_carrier.c (mu_pop3_set_carrier): Switch to
      MU_POP3_CONNECT state.
      * libproto/pop/pop3_disconnect.c (mu_pop3_disconnect): Check if
      the stream is actually open before trying to close it.
      Sergey Poznyakoff authored
    • * libmailutils/strskip.c (mu_str_skip_cset): New function.
      Sergey Poznyakoff authored