1. 12 Nov, 2012 1 commit
    • Also fix iterator synchronization after removing an element and
      improve Sieve API.
      
      * include/mailutils/header.h (mu_header_get_itemptr): New proto.
      * include/mailutils/iterator.h (mu_iterator_advance): Remove.
      (mu_iterator_delitem): New proto.
      (mu_iterator_set_delitem): New proto.
      * include/mailutils/sieve.h (mu_sieve_register_t) <opt_args>: New member.
      (mu_sieve_register_test_ext)
      (mu_sieve_register_action_ext): New protos.
      * include/mailutils/sys/iterator.h (_mu_iterator) <curitem_p>: Remove.
      <delitem>: New member. All uses updated.
      
      * libmailutils/base/iterator.c (mu_iterator_set_delitem): New function.
      
      * libmailutils/mailbox/hdritr.c: Implement bidirectional iteration.
      Implement itrctl method.
      * libmailutils/mailbox/header.c: Likewise.
      
      * libmailutils/base/assoc.c: Use delitem method instead of curitem_p.
      (mu_iterator_delitem): New function.
      * libmailutils/base/opool.c
      * libmailutils/diag/debug.c
      * libmailutils/list/iterator.c
      * libmailutils/list/pop.c
      * libmailutils/list/remove.c
      * libmailutils/list/removenth.c
      * libmailutils/mailbox/imapenv.c
      * libmailutils/mailbox/mbxitr.c
      * libproto/pop/pop3_iterator.c
      
      * libmu_sieve/extensions/Makefile.am: Add editheader.c
      * libmu_sieve/extensions/editheader.c: New file.
      
      * libmu_sieve/prog.c (mu_sv_code_command): Allow for optional positional
      arguments.
      * libmu_sieve/register.c (mu_sieve_test_lookup)
      (mu_sieve_action_lookup): Return NULL if a record with
      empty (NULL) handler is found.
      (mu_sieve_register_test_ext)
      (mu_sieve_register_action_ext): New functions.
      (mu_sieve_register_test)
      (mu_sieve_register_action): Rewrite as wrappers to the above.
      * libmu_sieve/util.c (mu_sieve_vlist_do): Allow for SVT_STRING
      argument.
      * sieve/tests/Makefile.am: Add new testcases.
      * sieve/tests/testsuite.at: Include new testcases.
      * sieve/tests/addheader.at: New testcase.
      * sieve/tests/delheader.at: New testcase.
      
      * NEWS: Update.
      * doc/rfc/README: Update.
      Sergey Poznyakoff authored
  2. 08 Aug, 2012 1 commit
    • * libmailutils/mailbox/header.c (HEADER_STREAMMOD): New flag.
      (mu_header_fill): Read data back from mstream if it was
      modified.
      (mu_header_destroy): Destroy mstream.
      (header_write): Rewrite from scratch. Allow for writing at
      arbitrary offsets.
      * examples/header.c: New commands: "overwrite" and "append",
      for testing the new functionality.
      Sergey Poznyakoff authored
  3. 07 Aug, 2012 1 commit
  4. 06 Aug, 2012 2 commits
  5. 04 Aug, 2012 1 commit
  6. 29 Jul, 2012 1 commit
    • * imap4d/imap4d.c (tls_required): Remove.
      (tls_mode): New variable.
      (imap4d_srv_config) <tls>: Remove.
      (imap4d_srv_config) <tls_mode>: New member.
      (imap4d_srv_param): Change the definition of the "tls" statement.
      Mark "tls-required" as deprecated.
      (imap4d_mainloop): Change type of the tls argument.
      Initialize session and pass it to each handler.
      * imap4d/imap4d.h (imap4d_session): New struct.
      (imap4d_command) <func>: Change signature. All uses changed.
      (tls_mode): New enum.
      (tls_required): Remove.
      (tls_available): New global.
      * imap4d/io.c (io_setio): Don't call tls_encryption_on, leave it to
      the caller.
      * imap4d/login.c (imap4d_login): Use session.
      * imap4d/starttls.c (tls_available): Global. Present even if !WITH_TLS
      (tls_encryption_on): Change signature. All callers updated.
      Sergey Poznyakoff authored
  7. 28 Jul, 2012 2 commits
    • * include/mailutils/smtp.h (mu_smtp_get_reply_iterator)
      (mu_smtp_cmd,mu_smtp_test_param): New protos.
      * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
      smtp_cmd.c
      * libproto/mailer/smtp_cmd.c: New file.
      * libproto/mailer/smtp_io.c (mu_smtp_get_reply_iterator): New function.
      * libproto/mailer/smtp_param.c (mu_smtp_set_param): Accept NULL
      parameter value.
      (mu_smtp_test_param): New function.
      * mu/Makefile.am [MU_COND_SUPPORT_SMTP]: Add smtp.c to MODULES.
      (mu_SOURCES): Add getans.c, getyn.c and util.c
      * mu/getans.c: New file.
      * mu/getyn.c: New file.
      * mu/smtp.c: New file.
      * mu/util.c: New file.
      * mu/mu.h (port_from_sa): New proto.
      * mu/pop.c (port_from_sa): Move to util.c
      Sergey Poznyakoff authored
    • * am/tls.m4 (MU_CHECK_GNUTLS): Newer GNU TLS does not require
      libgcrypt. It is required only for v. 2.11 and prior versions.
      Sergey Poznyakoff authored
  8. 23 Jul, 2012 1 commit
    • * include/mailutils/smtp.h (mu_smtp_replcode)
      (mu_smtp_sget_reply)
      (mu_smtp_capa_iterator): New protos.
      * libmailutils/url/dup.c (mu_url_dup): Bugfix. Obtain the
      name using mu_url_sget_name, which will create it if necessary.
      * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add
      smtp_capa_itr.c
      * libproto/mailer/smtp_capa_itr.c: New file.
      * libproto/mailer/smtp_io.c (mu_smtp_response): Fix filling of
      smtp->flbuf.
      (mu_smtp_replcode,mu_smtp_sget_reply): New functions.
      Sergey Poznyakoff authored
  9. 22 Jul, 2012 1 commit
    • The "tls" statement can be used both within a server declaration
      and in the global scope, the former overriding the latter.  Its
      argument can be one of the following:
      
        no          TLS is not used.  The STLS command won't be available even
                    if the tls configuration is otherwise complete.
        ondemand    TLS is initiated when the user issues the STLS command.
                    This is the default when TLS is configured.
        required    Same as above, but the use of STLS is mandatory.  The
                    authentication state is entered only after TLS negotiation
                    has succeeded.
        connection  TLS is always forced when the connection is established (pops).
      
      For compatibility with prior versions the tls-required statement is retained,
      but is considered deprecated.  It is synonymous with "tls required".  The
      "tls" statement allows for the following alias values:
      
        false, off, 0           same as  no
        stls                    same as  ondemand
        yes, true, on, 1        same as  connection
      
      Internally, all handler functions receive a pointer to the POP session
      structure, which configures the current session.  In particular, it
      contains the TLS mode and capability list.
      
      * pop3d/capa.c (pop3d_capa): Traverse the capability list,
      outputting each of its elements.
      (pop3d_session_init)
      (pop3d_session_free): New functions.
      * pop3d/logindelay.c (login_delay_capa): Change signature.
      * pop3d/pop3d.c (tls_required): Remove.
      (tls_mode): New variable.
      (pop3d_srv_config) <tls>: Remove.
      (pop3d_srv_config) <tls_mode>: New member.
      (pop3d_srv_param): Change definition of the "tls" statement.
      (pop3d_cfg_param): New statement "tls". Mark "tls-required"
      as deprecated.
      (pop3d_mainloop): Change type of the tls argument.
      Initialize session and pass it to each handler.
      (pop3d_connection): Decide whether and how to use TLS
      using global and per-session settings, the latter
      overriding the former.
      * pop3d/pop3d.h (login_delay_capa): Change signature.
      (tls_mode): New enum.
      (pop3d_capa_type): New enum.
      (pop3d_capa, pop3d_session): New structs.
      (pop3d_session_init)
      (pop3d_session_free): New protos.
      (pop3d_command_handler_t): Change signature. All handlers and their
      uses are changed accordingly.
      * pop3d/stls.c (pop3d_stls): Return error if session does not
      allow tls.
      Sergey Poznyakoff authored
  10. 21 Jul, 2012 1 commit
  11. 19 Jul, 2012 1 commit
    • * NEWS: Update.
      * mail/escape.c (escape_check_args): Take two additional arguments
      specifying minimum and maximum number of parameters to expect.
      All uses updated. Remove static qualifier.
      * mail/mail.h (send_attach_file): Rename to send_attach_file_default
      (escape_check_args,escape_list_attachments)
      (escape_attach,escape_remove_attachment): New protos.
      * mail/send.c (send_attach_file): Take encoding and content type
      as arguments.
      (send_attach_file_default): New function.
      (escape_list_attachments)
      (escape_attach,escape_remove_attachment): New functions.
      * mail/table.c: New escapes: l, +, ^
      
      * include/mailutils/list.h (mu_list_remove_nth)
      (mu_list_remove_nth_nd): New protos.
      * libmailutils/list/Makefile.am (liblist_la_SOURCES): Add removenth.c
      * libmailutils/list/removenth.c: New file.
      Sergey Poznyakoff authored
  12. 18 Jul, 2012 1 commit
    • * NEWS: Update.
      * doc/imprimatur: Upgrade.
      * libmailutils/mime/attachment.c (mu_message_create_attachment): Bugfixes.
      * mail/mail.c: New options --attach, --content-type and
      --encoding.
      * mail/mail.h (default_encoding, default_content_type): New externs.
      (send_attach_file): New proto.
      * mail/send.c (send_attach_file): New function.
      (save_dead_message_env): New function.
      (save_dead_message): Rewrite.
      (mail_send0): Attach files, if requested.
      Sergey Poznyakoff authored
  13. 17 Jul, 2012 4 commits
    • * include/mailutils/prog.h: Add extern "C".
      * include/mailutils/wordsplit.h: Likewise.
      * libmu_cpp/address.cc (Address::to_string): Use mu_address_sget_printable.
      * libmu_cpp/filter.cc (FilterIconvStream): Use mu_filter_create_args.
      * python/mailutils/folder.py (get_stream, set_stream): Remove.
      Wojciech Polak authored
    • Sergey Poznyakoff authored
    • * doc/imprimatur: Upgrade.
      Sergey Poznyakoff authored
    • * am/enable.m4 (MU_ENABLE_BUILD): Change handling of additional-cond
      ($4): the --{enable|disable}-build-* argument value overrides it.
      This allows to use such configuration shortcuts as:
      
        --disable-build-clients --enable-build-mail
      
      which will build only mail, but no other client.
      
      * configure.ac: New option --with-dbm can be used to
      enable/disable building of all available DBM interfaces.
      It can be used in conjunction with implementation-specific
      options in the same way as described above, e.g.:
      
        --without-dbm --with-gdbm
      
      New option --with-mailbindir allows for overriding the installation
      directory for mail[x] only.
      
      * mail/Makefile.am (mailbindir): New variable.
      (bin_PROGRAMS): Rename to mailbin_PROGRAMS.
      Sergey Poznyakoff authored
  14. 16 Jul, 2012 3 commits
    • * include/mailutils/opool.h (mu_opool_alloc): New proto.
      * libmailutils/base/opool.c (mu_opool_alloc): New function.
      (mu_opool_appendz): Do not append trailing null character.
      * libmailutils/cfg/parser.y (mu_cfg_tree_create_node): Reflect
      the change in mu_opool_appendz.
      * comsat/action.c: Use mu_opool_t instead of struct obstack.
      * lib/mailcap.c: Likewise.
      * libmailutils/url/urlstr.c: Likewise.
      * mh/burst.c: Likewise.
      * mh/mh_fmtgram.y: Likewise.
      * mh/mh_format.c: Likewise.
      * mh/mh_format.h: Likewise.
      * mh/mhn.c: Likewise.
      * mh/repl.c: Likewise.
      * mh/whatnowenv.c: Likewise.
      * mimeview/mimetypes.l: Likewise.
      * mimeview/mimeview.h: Likewise.
      
      * gnulib.modules: Remove obstack.
      Sergey Poznyakoff authored
    • * gnulib.modules: Remove getline.
      * pop3d/apop.c [!ENABLE_DBM] Use mu_stream API instead of FILE.
      Sergey Poznyakoff authored
    • Imap4d would fail to select a nonexistent maildir INBOX, because the
      mu_mailbox_uidvalidity would return MU_ERR_NOENT.
      
      * libmailutils/base/amd.c (_amd_scan0): Recompute uidvalidity
      if the mailbox is empty.
      Sergey Poznyakoff authored
  15. 15 Jun, 2012 1 commit
  16. 11 Jun, 2012 1 commit
  17. 10 Jun, 2012 1 commit
  18. 08 Jun, 2012 1 commit
    • We cannot assume that $HOME points to existing directory.
      
      * mh/tests/testsuite.at (MH_SETUP): Override HOME environment
      variable. Use it instead of curdir.
      * mh/tests/atlocal.in (remove_curdir): Likewise.
      * mh/tests/mhn.at: Likewise.
      Sergey Poznyakoff authored
  19. 07 Jun, 2012 3 commits
  20. 06 Jun, 2012 1 commit
  21. 04 Jun, 2012 2 commits
    • * libmu_scm/mailutils/Makefile.am (DISTCLEANFILES): Rename to
      CLEANFILES: mailutils.scm should be cleaned as a usual object file.
      (MU_FEATURES): New variable, constructed depending on MU_COND_
      variables.
      (mailutils.scm goal): Use the value of MU_FEATURES as m4 command
      line.
      * libmu_scm/mailutils/mailutils.scm.in: Include only supported libraries.
      Sergey Poznyakoff authored
    • * libmailutils/base/symlink.c (mu_readlink): Fix initialization of size.
      Sergey Poznyakoff authored
  22. 01 Jun, 2012 4 commits
    • Sergey Poznyakoff authored
    • * ChangeLog.amend: New file.
      * Makefile.am: Apply corrections from ChangeLog.amend when
      generating ChangeLog file.
      Sergey Poznyakoff authored
    • Sergey Poznyakoff authored
    • * doc/texinfo/mu-mh.texi: Document changes to inc.
      * NEWS: Likewise.
      * mh/inc.c: Accept multiple source mailboxes.
      (input_file): Remove.
      (input_file_list): New variable.
      (opt_handler): Multiple -file options augment input_file_list.
      (incmbox): New function.
      (main): Iterate over input_file_list, incorporating mail from each
      mailbox in it.
      
      Bugfix:
      
      * libproto/imap/mbox.c (_imap_env_date): Return a 0-terminated string.
      
      Fix MH test suite.
      
      The ali-everybody tests fails on machines with user database kept
      in a non-standard storage (e.g. LDAP or NIS).  This patch attempts to
      fix it.
      
      * mh/tests/lu.c: New file.
      * mh/tests/.gitignore: Add lu.
      * mh/tests/Makefile.am (noinst_PROGRAMS): New variable.
      * mh/tests/ali.at: Use lu instead of scanning /etc/passwd directly.
      Sergey Poznyakoff authored
  23. 13 May, 2012 1 commit
    • Reportedly, the test command on 64 boxes is unable to handle unsigned
      long integers.  Install a work over.
      
      * imap4d/tests/IDEF0955.at: Use string comparison in the invocation of test.
      * imap4d/tests/IDEF0956.at: Likewise.
      Sergey Poznyakoff authored
  24. 09 May, 2012 4 commits
    • * bootstrap.conf: Avoid downloading radius.m4 if it is already here.
      Sergey Poznyakoff authored
    • * libproto/mailer/smtp.c (smtp_open): Do not use mu_tls_enable, rely
      on TLS stream functions to do the right thing. This complements
      325c864e.
      Sergey Poznyakoff authored
    • Provide special functions for storing and retrieving URL from
      mu_smtp_t object, instead of using MU_SMTP_PARAM_URL.  The major
      drawback of the latter is that URLs in textual form can contain
      obfuscated access credentials, which makes them unusable for
      authentication.
      
      * include/mailutils/smtp.h (mu_smtp_set_url)
      (mu_smtp_get_url)
      (mu_smtp_set_secret,mu_smtp_get_secret): New protos.
      * include/mailutils/sys/smtp.h (_mu_smtp) <url>: New member.
      * libproto/mailer/smtp_secret.c: New file.
      * libproto/mailer/smtp_url.c: New file.
      * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add new files.
      * libproto/mailer/smtp.c (smtp_open): Use mu_smtp_set_url to preserve
      URL credentials.
      * libproto/mailer/smtp_auth.c (_mu_smtp_fixup_params): Use smtp->url.
      * libproto/mailer/smtp_create.c (mu_smtp_destroy): Destroy smtp->url.
      * libproto/mailer/smtp_param.c (mu_smtp_set_param): Special
      handling for MU_SMTP_PARAM_URL.
      (mu_smtp_get_param): Likewise.
      Sergey Poznyakoff authored
    • The Q encoding in RFC 2047 is not exactly the same as Quoted-Printable
      encoding: it differs in its handling of space characters (ASCII 32),
      which are encoded as underscores.
      
      * libmailutils/filter/qpflt.c (_qp_decoder): Use xd parameter
      to determine whether to treat underscores specially.
      (_qp_encoder): Likewise.
      (_qp_filter,_Q_filter): Allocate and initialize filter data
      accordingly to the kind of encoding.
      Sergey Poznyakoff authored