Age | Commit message (Collapse) | Author | Files |
|
|
|
* include/mailutils/sys/amd.h (_amd_message) <header_size>: New member.
(MU_AMD_DASHDELIM): New flag.
* libmailutils/base/amd.c (_amd_message_save): Optionally save
dash delimiter line (useful for MH).
(_amd_message_save): Initialize header_size.
(amd_scan_message): Rewrite as a state mashine. Support MH-style
dash-line delimiters between header and body.
(amd_message_stream_open): Close stream on failure.
(amd_header_fill): Use header_size instead of body_start.
* libproto/mh/mh.c (_mailbox_mh_init): Set MU_AMD_DASHDELIM
capability.
|
|
|
|
* libmailutils/base/amd.c (_amd_tempstream): New function.
(_amd_tempfile, _amd_delim): Removed.
(_amd_message_save): Rewrite using mailutils stream functions.
Use mu_stream_stat_buffer to count octets and lines.
Use Return-Path and Received headers to save envelope information.
* libproto/maildir/tests/append.at: Update expected headers.
* libproto/mh/tests/append.at: Likewise.
* mh/tests/pick.at (pick-component, pick-component-or): Use
mbox2dir -e to create the mailstore. Use --Return-Path option for
tests.
* testsuite/mbox2dir.c: New option -e. Rewrite message copying
routines.
|
|
The new API allows for specifying envelope and attributes (status)
for the message being appended.
* include/mailutils/attribute.h (MU_STATUS_BUF_SIZE): Order flags
lexicographically.
* include/mailutils/imap.h (mu_imap_append_stream_size)
(mu_imap_append_stream)
(mu_imap_append_message): Take envelope and attribute as arguments,
instead of struct tm, mu_timezone, and flags.
* include/mailutils/mailbox.h (mu_mailbox_append_message_ext): New proto.
* include/mailutils/sys/amd.h (_amd_data): Change prototype of
msg_finish_delivery: take additional mu_attribute_t argument.
* include/mailutils/sys/mailbox.h (_mu_mailbox): Change prototype of
_append_message: take mu_envelope_t and mu_attribute_t as additional
arguments.
* libmailutils/base/amd.c (_amd_message_save): Take mu_envelope_t
argument.
(amd_append_message): Take mu_envelope_t and mu_attribute_t arguments.
Use them to alter message envelope and status.
* libmailutils/mailbox/attribute.c (mu_attribute_unset_flags): Check
return from mu_attribute_get_flags.
(flagtrans): Order alphabetically.
* libmailutils/mailbox/mailbox.c (mu_mailbox_append_message_ext): New
function.
(mu_mailbox_append_message): Rewrite as an alternative entry point to
mu_mailbox_append_message_ext.
* libmailutils/mailbox/msgenv.c (message_envelope_date): Give
MU_HEADER_ENV_DATE higher priority than MU_HEADER_RECEIVED.
(message_envelope_sender): Give X-Envelope-Sender higher priority
than Return-Path.
* libmailutils/stream/message_stream.c
(mu_message_from_stream_with_envelope): Initialize attribute from
MU_HEADER_STATUS.
* testsuite/mbop.c (mbop_append): Options -attr, -sender, and -date
can be used to alter message attributes and envelope.
* libproto/dotmail/dotmail.c (mailbox_append_message)
(dotmail_append_message): Take mu_envelope_t and mu_attribute_t arguments.
Use them to alter message envelope and status.
* libproto/dotmail/tests/append.at: Test modifying envelope and
attributes during append.
* libproto/dotmail/tests/testsuite.at: Force TZ=0.
* libproto/imap/appmsg.c (mu_imap_append_message): Take mu_envelope_t and
mu_attribute_t as arguments.
* libproto/imap/appstr.c (mu_imap_append_stream): Likewise.
* libproto/imap/appstrsiz.c (mu_imap_append_stream_size): Likewise.
Use mu_attribute_t to set message flags and mu_envelope_t to set its
delivery date. Note, that sender is not yet affected.
* libproto/imap/mailbox.c (_imap_mbx_append_message): Take mu_envelope_t
and mu_attribute_t as arguments. Use them to alter message envelope
and status, via mu_imap_append_message.
Altering envelope is done by amd.c
* libproto/maildir/maildir.c (maildir_msg_finish_delivery): Take
additional mu_attribute_t argument. Use it to alter message flags.
Change msg->file_name if needed.
* libproto/maildir/tests/append.at: Test modifying envelope and
attributes during append.
* libproto/mailer/mailbox.c (remote_mbox_append_message): Take
mu_envelope_t and mu_attribute_t as arguments. Use mu_envelope_t
to set sender address. mu_attribute_t is ignored, as SMTP does
not transfer message attributes.
* libproto/mbox/mboxrd.c (mailbox_append_message)
(mboxrd_append_message): Take mu_envelope_t and mu_attribute_t as
arguments. Use them to alter message envelope and status.
* libproto/mbox/tests/append.at: Test modifying envelope and
attributes during append.
* libproto/mh/tests/append.at: Test modifying envelope and
attributes during append.
* mail/copy.c (append_to_mailbox): Preserve message status when
appending.
* mail/quit.c (mail_mbox_commit): Preserve message status when
storing it to MBOX.
* mail/tests/hold.at: Test whether message status is preserved.
* mu/libexec/imap.c (com_append): Rewrite using the new
mu_imap_append_stream call.
|
|
|
|
* imap4d/idle.c (imap4d_idle): Catch eof
* libmu_auth/tlsfdstr.c: Add missing include.
|
|
|
|
If dir is '/' (optionally followed by another '/'), copy it verbatim.
* libmailutils/string/mkfilename.c (mu_make_file_name_suf):
|
|
|
|
* libmailutils/base/amd.c (amd_expunge): Close and destroy the
associated message stream.
* libproto/maildir/maildir.c (maildir_close): Fix erroneously
reverted condition.
|
|
* mail/unread.c: New file.
* mail/Makefile.am: Add unread.c
* mail/mail.h (mail_unread): New proto.
* mail/table.c: New command "unread" ("U").
* doc/texinfo/programs/mail.texi: Document the unread command.
* NEWS: Likewise.
|
|
See also 91d35ab2ee.
* include/mailutils/cfg.h (mu_cfg_section): New members: ident_storage
and label_storage.
* libmailutils/cfg/driver.c (mu_config_destroy_container): Free the
storage allocated for ident and label. Do this onlyw if the decreased
refcount hits zero.
(mu_config_container_register_section): Assign allocated strings to
ident_storage and label_storage.
(mu_config_root_register_section): Register an onexit routine for
freeing the allocated memory.
* libmailutils/cli/capa.c (capa_free): Register an onexit routine for
freeing the allocated memory.
* libmailutils/opt/progname.c (mu_set_program_name): Likewise.
|
|
* libmailutils/stdstream/basestr.c (std_log_bootstrap): Mark stream as
open.
|
|
This eliminates certain "memory leaks", that have little (if any) practical
importance, bu make leak detection tools overly vociferous.
* libmailutils/base/monitor.c (static_monitor_dealloc): New function.
(mu_monitor_rdlock, mu_monitor_wrlock): Install static_monitor_dealloc as
onexit handler.
* libmailutils/filter/filter.c (filter_dealloc): New function: deallocate
filter_list.
(mu_filter_get_list): Install filter_dealloc as onexit handler.
* libmailutils/locus/ident.c (nametab_dealloc): New function.
(mu_ident_ref): Install nametab_dealloc as onexit handler.
* libmailutils/stdstream/basestr.c (std_log_bootstrap): Unref
transport after setting it up to log stream.
(stdstream_flushall): Call mu_stream_destroy instead of mu_stream_flush.
|
|
* configure.ac: Build libmailutils/mimetypes/Makefile
* include/mailutils/Makefile.am: New header mimetypes.h
* mimeview/mimeview.h: moved from include/mailutils/mimetypes.h
* include/mailutils/sys/Makefile.am: Add mimetypes.h
* include/mailutils/sys/mimetypes.h: New file.
* include/mailutils.h: Include mailutils/mimetypes.h
* libmailutils/Makefile.am: Build mimetypes.
* libmailutils/mimetypes/.gitignore: New file.
* libmailutils/mimetypes/eval.c: New file.
* libmailutils/mimetypes/grammar.y: Moved from mimeview/grammar.y
* libmailutils/mimetypes/lexer.l: Moved from mimeview/lexer.l.
* libmailutils/diag/debcat: Add mimetypes.
* mimeview/Makefile.am: Update.
* mimeview/tests/testsuite.at: Change debug level.
* include/mailutils/stream.h (mu_fd_stream_create): filename is const.
* libmailutils/stream/file_stream.c: Likewise.
|
|
* include/mailutils/yyloc.h: Formatting change.
* mimeview/grammar.y: Rewrite as a reentrant parser.
* mimeview/lexer.l: Rewrite as a reentrant scanner. Use flex
interface to bison.
* mimeview/mimeview.c: Use new API.
* mimeview/mimeview.h: Remove most prototypes.
(mimetypes_open, mu_mimetypes_close)
(mu_mimetypes_stream_type, mu_mimetypes_file_type)
(mu_mimetypes_fd_type): New API.
* mimeview/tests/testsuite.at (multiple error recovery): Fix
expected location of error recovery.
|
|
|
|
* am/bison.m4: Use AC_PATH_PROG.
* am/flex.m4: Likewise.
* configure.ac: Remove MU_YLWRAP.
* include/mailutils/yyloc.h (YYLTYPE): Remove. This needs be defined
in each grammar source individually.
* mu-aux/Makefile.am: Remove gylwrap.
* mu-aux/gylwrap: Remove.
* libmailutils/cfg/Makefile.am: Rewrite rules for building grammars and
lexers.
* libmailutils/datetime/Makefile.am: Likewise.
* libmu_sieve/Makefile.am: Likewise.
* mail/Makefile.am: Likewise.
* mh/Makefile.am: Likewise.
* mimeview/Makefile.am: Likewise.
* libmailutils/cfg/gylwrap.conf: Remove.
* libmailutils/datetime/gylwrap.conf: Remove.
* libmu_sieve/gylwrap.conf: Remove.
* mh/gylwrap.conf: Remove.
* mimeview/gylwrap.conf: Remove.
* libmailutils/cfg/lexer.l: Use %option prefix
* libmu_sieve/sieve-lex.l: Likewise.
* mh/mh_alias_lex.l: Likewise.
* mimeview/lexer.l: Likewise.
* libmailutils/cfg/parser.y: Use api.prefix and %code requires.
* libmailutils/datetime/parsedate.y: Likewise.
* mh/mh_alias_gram.y: Likewise.
* mh/mh_fmtgram.y: Likewise.
* mh/pick-gram.y: Likewise.
* libmu_sieve/sieve-gram.y: Likewise.
* mimeview/grammar.y: Likewise.
* testsuite/lib/mailutils.exp (mu_create_config): Fix source location.
|
|
* libmailutils/datetime/utcoff.c (mu_utc_offset): Fix the timezone
correction.
|
|
* libmailutils/stream/stream.c (mu_stream_timed_getdelim): If buffer
points to NULL, assume size = 0.
|
|
* imap4d/io.c (imap4d_init_tls_server): Fix inverted condition.
* pop3d/extra.c (pop3d_init_tls_server): Likewise.
|
|
* configure.ac: Configure test directory in libmu_auth
* libmu_auth/Makefile.am: Likewise.
* libmu_auth/tests/.gitignore: New file.
* libmu_auth/tests/Makefile.am: New file.
* libmu_auth/tests/atlocal.in: New file.
* libmu_auth/tests/genfile.c: New file.
* libmu_auth/tests/testsuite.at: New file.
* libmu_auth/tests/tls.at: New file.
* libmu_auth/tests/tlscpy.c: New file.
* pop3d/cmd.c: Fix typo.
|
|
|
|
* libmu_auth/tlsfdstr.c (mu_tlsfd_stream_create): Accept conf==NULL.
(mu_starttls): New function.
* include/mailutils/tls.h (mu_starttls): New proto.
* include/mailutils/imapio.h (mu_imapio_get_transport)
(mu_imapio_set_transport): New functions.
* libmailutils/imapio/transport.c (mu_imapio_get_transport)
(mu_imapio_set_transport): New functions.
* libmailutils/stream/iostream.c (mu_iostream_create): Accept
NULL out stream.
* libmailutils/stream/tcp.c: Support MU_IOCTL_FD
(_tcp_instance): New member fd_borrowed.
(_tcp_close): Don't close fd if fd_borrowed is set.
(_tcp_ioctl): Handle MU_IOCTL_FD.
* libmailutils/stream/xscript-stream.c (_xscript_ctl): Accept
pstr[1] == NULL.
* libmu_auth/notls.c (mu_tlsfd_stream_create)
(mu_tlsfd_stream2_convert)
(mu_starttls): New placeholders.
* libproto/imap/folder.c (_mu_imap_folder_open): Use
mu_tlsfd_stream_convert.
Fix stream leak.
* libproto/imap/starttls.c (mu_imap_starttls): Use mu_starttls.
* libproto/mailer/smtp.c (smtp_open): Use mu_tlsfd_stream_convert.
* libproto/mailer/smtp_starttls.c (mu_smtp_starttls): Use mu_starttls.
* libproto/pop/pop3_stls.c (mu_pop3_stls): Likewise.
* libproto/pop/mailbox.c (pop_open): Use mu_tlsfd_stream_convert.
Fix stream leak.
* mu/libexec/imap.c (com_connect): Use mu_tlsfd_stream_convert.
Fix stream leak.
* mu/libexec/pop.c: Likewise.
* mu/libexec/smtp.c: Likewise.
* imap4d/io.c (imap4d_init_tls_server): Use mu_starttls.
* pop3d/extra.c: Likewise.
|
|
* libmu_auth/tlsfdstr.c (mu_tlsfd_stream_create): Remove last argument.
All uses changed.
(mu_tlsfd_stream2_convert): New function.
* include/mailutils/tls.h (mu_tlsfd_stream_create): Change signature
(flags removed).
(mu_tlsfd_stream2_convert): New proto.
(mu_tlsfd_stream_convert): New inline function.
* libmailutils/diag/errors (MU_ERR_TRANSPORT_GET)
(MU_ERR_TRANSPORT_SET): New error codes.
* imap4d/io.c (imap4d_init_tls_server): Use mu_tlsfd_stream2_convert.
* pop3d/extra.c (pop3d_init_tls_server): Use mu_tlsfd_stream2_convert.
|
|
|
|
transport
* libmailutils/stream/fltstream.c: Propagate mu_stream_clearerr
to the transport stream.
* libmailutils/stream/iostream.c: Likewise.
* libmu_auth/tls.c: Likewise.
* libmu_auth/tlsiostr.c: Likewise.
* libmu_auth/tlsfdstr.c (_tlsfd_read, _tlsfd_write): Translate
GNUTLS_E_TIMEDOUT to MU_ERR_TIMEOUT.
* imap4d/bye.c (imap4d_bye_command): Clear stream error on ERR_TIMEOUT.
---
|
|
* libmu_auth/tlsfdstr.c: New TLS stream implementation.
* include/mailutils/tls.h (mu_tls_config): New field: handshake_timeout.
(mu_tlsfd_stream_create): New proto.
* libmu_auth/Makefile.am: Compile tlsfdstr.c
* libmu_auth/tlsconf.c (tls_canned_param): New configuration
statement: tls.handshake_timeout
* doc/texinfo/programs.texi: Document the tls.handshake-timeout
statement.
* imap4d/io.c (io_setio, imap4d_init_tls_server): Use
mu_tlsfd_stream_create.
* imap4d/starttls.c (global_tls_conf): Initialize handshake_timeout.
|
|
* libmailutils/stream/iostream.c (_iostream_ctl): Fix handling of
MU_IOCTL_SUBSTREAM (get/set) requests.
* imap4d/io.c (io_setio): Unreference the source stream.
(imap4d_init_tls_server): Fix reference decrement for tlsstream.
* pop3d/extra.c (pop3d_setio): Unreference the source stream.
(pop3d_init_tls_server): Fix reference decrement for tlsstream.
|
|
* imap4d/io.c (io_setio): Set I/O timeout for pull functions during
the handshake.
* libmu_auth/tls.c: Fix debugging output.
* libmu_auth/tlsiostr.c (_tls_io_read): Improve error diagnostics.
|
|
* imap4d/idle.c (imap4d_idle): Use mu_stream_timed_getline.
* imap4d/imap4d.c (imap4d_mainloop): Remove use of io_wait_input.
* imap4d/imap4d.h (io_wait_input): Remove.
* imap4d/io.c (io_wait_input): Remove.
(io_getline): Rewrite using mu_stream_timed_getline.
(imap4d_tokbuf_getline): Likewise.
(check_input_err): Handle MU_ERR_TIMEOUT.
|
|
* include/mailutils/stream.h (MU_IOCTL_TIMEOUT): New ioctl code.
(mu_stream_timed_readdelim,mu_stream_timed_readline): New protos.
(mu_stream_readdelim,mu_stream_readline,mu_stream_getdelim)
(mu_stream_getline): Rewrite as inline functions.
* include/mailutils/datetime.h (mu_timeval_cmp, mu_timeval_add)
(mu_timeval_sub): New inline functions for operations over struct
timeval.
* include/mailutils/sys/file_stream.h (_mu_file_stream): New
member: io_timeout.
* libmailutils/diag/errors (MU_ERR_TIMEOUT, MU_ERR_SET_TIMEOUT)
(MU_ERR_WRITE, MU_ERR_TLS): New error codes.
* libmailutils/stream/file_stream.c (fd_read,fd_write): Take
into account I/O timeout.
(fd_ioctl): Handle MU_IOCTL_TIMEOUT.
* libmailutils/stream/stream.c (mu_stream_timed_readdelim)
(mu_stream_timed_readline): New functions.
* libmu_auth/tls.c (_tls_open): Special handling for time-out
errors.
* libmailutils/stream/iostream.c (_iostream_ctl): Pass MU_IOCTL_TIMEOUT
to the transport stream.
|
|
* mu/libexec/imap.c (main): Set program name.
* mu/libexec/pop.c: Likewise.
* mu/libexec/smtp.c: Likewise.
|
|
|
|
* NEWS: Update.
* doc/texinfo/programs/mail.texi: Update.
* include/mailutils/header.h (MU_HEADER_USER_AGENT): New define.
* mail/mail.c (default_setup): Set useragent
* mail/mail.h (mailvar_name_useragent): New define.
* mail/mailline.c (header_generator): Add MU_HEADER_USER_AGENT.
* mail/mailvar.c: Mew variable: "useragent". Retain "xmailer"
as an alias.
* mail/send.c (mail_compose_send): Add the User-Agent header if
the "useragent" variable is set.
* libmailutils/tests/hdrcpy.at: Use User-Agent instead of X-Mailer.
* mail/tests/send.at: Likewise.
* mail/tests/sendbyname.at: Likewise.
* mail/tests/sendrec.at: Likewise.
* mail/testsuite/mail/Followup.exp: Likewise.
* mail/testsuite/mail/Reply.exp: Likewise.
* mail/testsuite/mail/reply.exp: Likewise.
* mail/testsuite/mail/send.exp: Likewise.
* mh/repl.c: Likewise.
* mh/send.c: New .mtstailor vareiable "user-agent".
|
|
After 4befcfd015 interpolation escapes can't be tested using
autotest. Move them to DejaGNU testsuite.
* mail/tests/Followup.at: Remove.
* mail/tests/Reply.at: Remove.
* mail/tests/followup.at: Remove.
* mail/tests/reply.at: Remove.
* mail/tests/Makefile.am: Remove these tests.
* mail/tests/testsuite.at: Likewise.
* mail/.gitignore: Fix the entry for mail.
* mail/testsuite/mail/Followup.exp: New test.
* mail/testsuite/mail/Reply.exp: New test.
* mail/testsuite/mail/followup.exp: New test.
* mail/testsuite/mail/reply.exp: New test.
* mail/testsuite/mail/DISTFILES: Add these files.
* mail/testsuite/lib/mail.exp (mail_version): Don't print the version
number.
* mail/testsuite/mail/write.exp: Preserve current working directory.
|
|
* libmailutils/filter/qpflt.c (_qp_decoder): Accept soft line breaks
(RFC 2045, 6.7, page 19)
|
|
* NEWS: Document changes.
* doc/texinfo/programs/mail.texi: Document changes.
* mail/send.c (mail_compose_send): Recognize escapes only in
interactive mode.
|
|
Old name is retained as an alias.
|
|
If the mu_filter_xcode_t function failed in mu_filter_init request,
mu_filter_stream_create would leave the transport reference counter
incremented by one.
* libmailutils/stream/fltstream.c (mu_filter_stream_create): On
failure, decrement reference counter of transport stream.
* libmailutils/tests/fltcnt.c: Test for the above bug as well.
|
|
This change affects the following two functions: mu_filter_chain_create,
mu_filter_chain_create_pred. In previous versions, if these functions
failed to create the requested filter chain, they decremented reference
counter of their transport (input stream) argument.
This change restores the proper behavior:
- On success, reference counter is incremented by 1.
- On error, reference counter doesn't change.
* libmailutils/filter/fltchain.c (_add_next_link): Make sure the
transport reference counter does not change.
* libmailutils/tests/Makefile.am: Add new auxiliary program and test case.
* libmailutils/tests/fltcnt.at: New file.
* libmailutils/tests/fltcnt.c: New file.
* libmailutils/tests/testsuite.at: Include new test.
|
|
* libmailutils/stream/streamref.c (mu_streamref_create_abridged):Don't
reposition the underlying stream to beginning.
|
|
* libproto/imap/fetch.c (_fill_response): Tolerate NIL date field.
* libproto/imap/mailbox.c (__imap_msg_get_stream): Seek to the end,
instead of computing stream size.
* libproto/mbox/mboxrd.c (mailbox_append_message): If all methods
of determining envelope size fail, assume epoch instead of bailing
out.
|
|
|
|
* mail/send.c (msg_to_pipe): Run command via shell.
|
|
* libmailutils/mime/mime.c (_mime_part_size): Fix handling of one part
MIME messages.
Don't touch psize memory in case of error.
(_mime_body_stream_read): Fix handling of one part
MIME messages. Previous implementation used to add an extra newline at
the end.
* mh/tests/mhn.at: Reflect the above changes.
* sieve/tests/vacation.at: Reflect the above changes.
|
|
* mail/util.c (util_outfilename): Remove extra closing parenthesis.
|
|
* doc/texinfo/programs/mail.texi (Saving and Recording): New section.
* mail/mailvar.c: Make sure escape is a single character.
* mail/util.c (util_outfilename): In mailx compatibility mode, assume
outfilename_local.
|
|
* libproto/mbox/mboxrd.c (mboxrd_rescan_unlocked): Free buf.
(mboxrd_detect): Destroy str when no longer needed.
* mail/copy.c (mail_copy0): Free allocated memory.
Create file in cwd if util_outfolder_name return NULL.
* mail/exit.c (mail_exit): Destroy mbox.
* mail/util.c (util_range_msg): Use msgset_free instead of plain free.
|