1. 13 Aug, 2013 1 commit
  2. 17 Jul, 2013 1 commit
    • * pop3d/pop3d.h (ERR_SYS_LOGIN): New error code.
      * pop3d/capa.c (pop3d_session_init): Advertise the AUTH-RESP-CODE
      capability.
      * pop3d/cmd.c (error_table) <ERR_BAD_LOGIN>: Mark with the
      AUTH response code.
      <ERR_SYS_LOGIN>: New entry.
      * pop3d/user.c (pop3d_user): Use mu_get_auth to obtain
      the user's identity. On error, the error code is ERR_BAD_LOGIN
      or ERR_SYS_LOGIN, depending on its return and return from
      mu_authenticate.
      Sergey Poznyakoff authored
  3. 19 Jun, 2013 1 commit
  4. 25 May, 2013 2 commits
    • * imap4d/io.c (imap4d_tokbuf_decrlf): Rewrite to run in
      O(n).
      * libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Return 0 on
      EINTR (unless srv->f_intr tells otherwise) and EAGAIN.  The caller
      will retry.
      (mu_ip_server_accept): output a diagnostic message before
      returning error.
      Sergey Poznyakoff authored
    • * mu/Makefile.am (mailutils-config): Fix sed expression
      * mu/mailutils-config.in: Replace MUNAME once and assign
      it to the variable.
      Sergey Poznyakoff authored
  5. 12 Apr, 2013 1 commit
    • * mh/show.c: New file.
      * NEWS: Document changes.
      * libmailutils/stream/message_stream.c (copy_trimmed_value): Fix
      string length calculation to allow for empty lines.
      * mh/.gitignore: Update.
      * mh/Makefile.am: Build show.
      * mh/TODO: Document show.
      * mh/mh_getopt.h: Add new option codes.
      * mh/mh_init.c (mh_expand_name): Change handling of the
      last argument. All callers updated.
      (mh_draft_name): Remove.
      Sergey Poznyakoff authored
  6. 07 Apr, 2013 1 commit
  7. 03 Apr, 2013 1 commit
  8. 02 Apr, 2013 2 commits
  9. 01 Apr, 2013 3 commits
    • Sergey Poznyakoff authored
    • * include/mailutils/msgset.h (mu_msgset_sget_mailbox): New proto.
      * include/mailutils/sys/msgset.h (_MU_MSGSET_MODE): New macro.
      * libmailutils/msgset/Makefile.am: Add getmbox.c
      * libmailutils/msgset/getmbox.c: New file.
      * libmailutils/msgset/addset.c: Use _MU_MSGSET_MODE.
      * libmailutils/msgset/create.c: Likewise.
      * libmailutils/msgset/foreachmsg.c: Likewise.
      * libmailutils/msgset/foreachnum.c: Likewise.
      * libmailutils/msgset/negate.c: Likewise.
      * libmailutils/msgset/subset.c: Likewise.
      * libmailutils/msgset/trans.c: Likewise.
      
      * mh/mh.h (mh_private_sequences_iterate): New proto.
      * mh/mh_sequence.c (format_closure) <delim>: New member.
      (format_sequence): Use delim to avoid outputting leading space.
      (save_sequence): Initialize delim.
      (mh_private_sequences_iterate): New function.
      * mh/rmm.c (main): Remove message numbers from sequences.
      * mh/tests/rmm.at: Update.
      Sergey Poznyakoff authored
    • * libmailutils/base/amd.c (_amd_update_message): Return
      immediately if the message is not modified. Always use
      initialized value of flg.
      Sergey Poznyakoff authored
  10. 30 Mar, 2013 4 commits
    • Sergey Poznyakoff authored
    • * mh/msgchk.c (checkmail): take into account various
      possible return codes.
      Sergey Poznyakoff authored
    • * include/mailutils/imap.h (mu_imap_search): New proto.
      * libproto/imap/search.c: New file.
      * include/mailutils/sys/imap.h (MU_IMAP_CLIENT_SEARCH_RX): New state.
      * libproto/imap/fetch.c: Fix debugging categories
      * libproto/imap/mbox.c (_imap_messages_recent)
      (_imap_message_unseen): Use search if information is not
      readily available.
      * libproto/imap/status.c (_mu_imap_status_name_table): Comment
      out UNSEEN: its semantics is entirely different from what we
      need.
      * libproto/imap/Makefile.am: Add new file.
      * mu/imap.c: Implement search.
      
      * include/mailutils/sys/mailbox.h (_mu_mailbox) <_get_atime>: New method.
      * include/mailutils/mailbox.h (mu_mailbox_access_time): New proto.
      * libproto/mbox/mbox.c (_mailbox_mbox_init): Initialize
      >_get_atime.
      * libmailutils/mailbox/mailbox.c (mu_mailbox_access_time): New function.
      
      * libmailutils/datetime/utcoff.c (mu_utc_offset): Rewrite using tzset.
      
      * mh/msgchk.c: Implement --date.
      Check for new mail using both recent and unseen messages.
      Sergey Poznyakoff authored
    • * mh/msgchk.c: New file.
      * mh/Makefile.am: Build msgchk.
      * mh/mh_getopt.h: Update.
      * mh/.gitignore: Update.
      * mh/TODO: Update.
      Sergey Poznyakoff authored
  11. 27 Mar, 2013 1 commit
  12. 25 Mar, 2013 3 commits
  13. 21 Mar, 2013 1 commit
  14. 16 Feb, 2013 1 commit
    • The "< file" construct tests if file is executable and begins with
      the shell interpreter magic (#!/ or #! /).  If so, this file is
      executed and its output is collected.  This provides a way for
      building aliases on the fly.
      
      * mh/mh_alias.l (buffer_ctx) <exec_p>: New member.
      (exec_p): New static variable.
      (push_source): If the file is executable and begins with
      the "#!/" magic, run it and collect its output.
      (pop_source): Use exec_p to decide how to close the file.
      * mh/tests/ali.at: Test executable file inclusion.
      * NEWS: Update.
      Sergey Poznyakoff authored
  15. 03 Jan, 2013 1 commit
    • * include/mailutils/sys/body.h (_mu_body)<rawstream>: New member.
      * include/mailutils/sys/message.h (_mu_message)<rawstream>: New member.
      * libmailutils/mailbox/body.c: Rewrite. Return the specially crafted
      "body-stream" for user I/O operations. Writes to that stream trigger
      creation of a temporary stream (write-through mode) which will be used
      for subsequent I/O.
      * libmailutils/mailbox/msgbody.c (mu_message_get_body): Use msg->rawstream.
      * libmailutils/mailbox/msgheader.c (message_header_fill): Do not
      call mu_message_get_streamref, as that can result in endless recursion.
      Use msg->rawstream instead.
      * libmailutils/mailbox/msgref.c (_mu_message_free): Destroy both
      rawstream and outstream.
      * libmailutils/mailbox/msgstream.c (mu_message_set_stream): Set
      rawstream.
      (mu_message_get_stream): Create outstream as needed.
      (mu_message_get_streamref): If the message has been modified,
      create the outstream and return it to the caller. This way, the
      modifications become visible via the stream interface.
      * libmailutils/tests/Makefile.am: Add new testcases.
      * libmailutils/tests/testsuite.at: Likewise.
      * libmailutils/tests/modmesg.c: New file.
      * libmailutils/tests/modmesg00.at: New file.
      * libmailutils/tests/modmesg01.at: New file.
      * libmailutils/tests/modmesg02.at: New file.
      * libmailutils/tests/modmesg03.at: New file.
      * mh/mhn.c: Fix message reference counting.
      Sergey Poznyakoff authored
  16. 13 Dec, 2012 1 commit
  17. 19 Nov, 2012 1 commit
    • * imap4d/imap4d.c: Avoid gcc warnings.
      * libmailutils/tests/imapio.c (main): Fix format specifier.
      * maidag/mailquota.c (dbm_retrieve_quota): Likewise.
      * mail/quit.c (mail_mbox_close): Likewise.
      * mail/mail.c (options): Fix improper initialization.
      * mu/mu.h (mu_getans): Add proto.
      * mu/util.c: Include netinet/in.h
      Sergey Poznyakoff authored
  18. 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
  19. 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
  20. 07 Aug, 2012 1 commit
  21. 06 Aug, 2012 2 commits
  22. 04 Aug, 2012 1 commit
  23. 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
  24. 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
  25. 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
  26. 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
  27. 21 Jul, 2012 1 commit
  28. 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
  29. 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