Age | Commit message (Collapse) | Author | Files |
|
|
|
This function deallocates resources allocated by mu_dbm_firstkey
function. It should be used when breaking from a loop iterating
over all keys in the database.
* include/mailutils/dbm.h (mu_dbm_impl): New field: _dbm_break
(mu_dbm_break): New function.
* libmu_dbm/break.c: New file.
* libmu_dbm/Makefile.am (libmu_dbm_la_SOURCES): Add break.c
* libmu_dbm/berkeley.c (_bdb_close): Close cursor, if available.
(_bdb_break): New method.
* libmu_dbm/gdbm.c (_gdbm_break): New method.
|
|
* include/mailutils/server.h (mu_m_server_config_default_fp): New data type.
(mu_m_server_set_config_default): New prototype.
* libmailutils/server/msrv.c (_mu_m_server): New field: config_default.
(mu_m_server_set_config_default): New function.
(mu_m_server_listen): If config_default is initialized, call it to
initialize the pconf structure.
* imap4d/imap4d.c (imap4d_connection): Don't reset idle_timeout and
imap4d_transcript.
(imap4d_config_default): New function.
(main): Initialize the server's config_default function.
* pop3d/apop.c (apop_ok): New function.
* pop3d/pop3d.c (pop3d_mainloop): Don't include timestamp in the
banner greeting if APOP database is not available.
(pop3d_config_default): New function.
(main): Initialize the server's config_default function.
* pop3d/pop3d.h (apop_ok): New prototype.
|
|
* NEWS: Version 3.16.90
* configure.ac: Likewise.
* imap4d/imap4d.c (main): Use PORT_IMAP4 constant.
* imap4d/imap4d.h (PORT_IMAP4,PORT_IMAP4S): New defines.
* imap4d/starttls.c (starttls_server_check): Derive the tls mode
from the port used or from the global tls mode.
* include/mailutils/sockaddr.h (mu_sockaddr_get_port): New proto.
* libmailutils/sockaddr/Makefile.am: Add port.c
* libmailutils/sockaddr/port.c: New file.
* mu/libexec/shell.c (readline): Minor change.
* pop3d/cmd.c (stls_server_check): Derive the tls mode
from the port used or from the global tls mode.
* pop3d/pop3d.c (main): Use PORT_POP3 constant.
* pop3d/pop3d.h (PORT_POP3, PORT_POP3S): New defines.
|
|
* configure.ac: Remove check for gethostbyname
* include/mailutils/util.h: Fix comment.
* imap4d/util.c: Use getaddrinfo.
* libmailutils/base/hostname.c: Likewise.
* libmailutils/sockaddr/fromnode.c: Likewise.
* libmu_auth/virtual.c: Use getnameinfo.
|
|
|
|
* include/mailutils/assoc.h (MU_ASSOC_LRU): New flag.
(mu_assoc_pop, mu_assoc_shift): Change signature: second argument
is char **.
* libmailutils/base/assoc.c (mu_assoc_install_ref2): Maintain LRU
ordering, if so requested.
mu_assoc_pop, mu_assoc_shift): Change type of the second argument to
char **. Unless it is NULL, store there a copy of the key.
* libmu_sieve/sieve-priv.h (mu_sieve_machine): New member: mailboxes.
* libmu_sieve/actions.c (sieve_action_fileinto): Maintain a table of
output mailboxes. Keep each mailbox open for as long as possible.
If running out of open files, close the least recently used mailbox
and retry.
* libmu_sieve/sieve-gram.y (mu_sieve_machine_destroy): Destroy the
mailbox table.
|
|
Until now both mboxrd and dotmail preferred mmap over unistd-based
I/O. This improved performance when reading and updating mailboxes,
but deteriorated it when operating in append mode. To improve
performance in append mode, a new function (mu_mailbox_stream_create)
is introduced, which selects the underlying stream for the mailbox
file based on the requested open mode and the currentstatus of the
file itself. Both mboxrd and dotmail use this function to initialize
mailbox stream.
* include/mailutils/stream.h (mu_mailbox_stream_create): New proto.
* libmailutils/stream/Makefile.am (libstream_la_SOURCES): Add mailbox_stream.c
* libmailutils/stream/mailbox_stream.c: New file.
* libproto/dotmail/dotmail.c (dotmail_mailbox_init_stream): Use
mu_mailbox_stream_create.
* libproto/mbox/mboxrd.c (mboxrd_mailbox_init_stream): Likewise.
|
|
|
|
* 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.
|
|
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.
|
|
|
|
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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* 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".
|
|
Old name is retained as an alias.
|
|
In particular, this fixes parsing of addresses with comma in the local
part.
* include/mailutils/address.h (MU_ADDRESS_HINT_INITIALIZER): New define.
* libmailutils/address/addrstream.c (mu_stream_format_address): Format
local user names without surrounding angle quotes.
* mail/mail.h (util_header_expand): Rename to util_header_expand_aliases.
All uses changed.
(util_address_expand_aliases): New function.
* mail/send.c (compose_header_set): Expand aliases if inplacealiases
is set.
Avoid useless recursion.
* mail/util.c (send_message): Create addresses via mu_address_create_hint
to avoid appending local domain to the unqualified user names.
(mail_send0): Likewise.
(util_address_expand_aliases): New function.
(util_header_expand): Rename to util_header_expand_aliases. Use
util_address_expand_aliases and regular address parsing functions
instead of wordsplit. Unwrap header values.
|
|
For example, suppose folder /foo/bar contains mailboxes a, b, and c.
Then scanning the mu_folder_t object for '/foo' will return
'bar/a', 'bar/b', and 'bar/c'. Scanning the mu_folder_t for '/foo/bar'
will return 'a', 'b', and 'c', and so on.
* libmailutils/string/mkfilename.c (mu_make_file_name_suf): Reasonable
handling of corner cases. Document its behavior.
* libmailutils/mailbox/fsfolder.c (struct folder_scan_data): New member:
prefix_len
(list_helper): Return the portion of the file name after the base directory
prefix.
(_fsfolder_list): Initialize sdata.prefix_len.
* libmailutils/tests/fsfolder.c: Remove prefix handling code.
* libmailutils/tests/fsfolder00.at: Change expectations.
* libmailutils/tests/fsfolder02.at: Likewise.
* libmailutils/tests/fsfolder03.at: Likewise.
* libmailutils/tests/fsfolder04.at: Likewise.
* include/mailutils/sys/imap.h (struct _mu_imap): New members: separator
and prefix_len.
* libproto/imap/folder.c (_mu_imap_folder_separator): New function.
(_mu_imap_folder_pathname): New function.
(_mu_imap_folder_list): Prefix the original refname with the base
directory of the folder.
(_mu_imap_folder_lsub,_mu_imap_folder_subscribe)
(_mu_imap_folder_unsubscribe,_mu_imap_folder_delete)
(_mu_imap_folder_rename): Adjust input mailbox names.
* libproto/imap/genlist.c (list_untagged_handler): Return the portion of
the file name after the base directory prefix.
* libproto/imap/tests/imapfolder.c: Minor change.
Update for changed folder behavior
* imap4d/list.c (struct refinfo): Replace dirlen with delim - a
character to be inserted between the original reference and mailbox name.
(list_fun): Insert delimiter, if required.
(list_ref): Set refinfo.delim, unless the reference prefix already
ends with a delimiter or is the same as the namespace prefix.
Mail 'folders' command: add support for remote folders.
* mail/folders.c: Handle remote folders correctly.
* mail/mail.h (util_get_folder): New proto.
* mail/mailline.c (struct filegen): Remove path_len.
(new_folder): Rename to util_get_folder and move to util.c
(filegen_init): Initialize prefix_len from the argument.
* mail/util.c (util_get_folder): New function.
|
|
The locker is created by the following call:
mu_locker_create_ext(&locker, filename, &hints);
The last arguments points to a structure mu_locker_hints_t, which
defines the settings for the locker. NULL value implies default.
Settings of an existing locker can be modified using the following
call:
mu_locker_modify(locker, &hints);
Current settings can be examined using mu_locker_get_hints.
The functions mu_locker_destroy, mu_locker_lock_mode, mu_locker_lock,
mu_locker_touchlock, mu_locker_unlock, and mu_locker_remove_lock remained
unchanged. Rest of functions is deprecated, but retained for a couple
of releases for the sake of backward compatibility.
Constants (locker types, flags, etc) are also revisited.
This commit also fixes a bug in mu_spawnvp function, which was discovered
when testing external lockers.
* include/mailutils/locker.h: Major rewrite.
(MU_LOCKER_DEFAULT_EXPIRE_TIME)
(MU_LOCKER_DEFAULT_RETRY_COUNT)
(MU_LOCKER_DEFAULT_RETRY_SLEEP)
(MU_LOCKER_DEFAULT_EXT_LOCKER): New defines.
(mu_locker_hints_t): New data type.
(MU_LOCKER_FLAG_RETRY)
(MU_LOCKER_FLAG_EXPIRE_TIME)
(MU_LOCKER_FLAG_CHECK_PID)
(MU_LOCKER_FLAG_TYPE,MU_LOCKER_FLAGS_ALL): New defines.
(mu_locker_create_ext, mu_locker_modify)
(mu_locker_get_hints): New functions.
(mu_locker_create,mu_locker_set_default_flags)
(mu_locker_set_default_retry_timeout)
(mu_locker_set_default_retry_count)
(mu_locker_set_default_expire_timeout)
(mu_locker_set_default_external_program)
(mu_locker_set_flags,mu_locker_mod_flags)
(mu_locker_set_expire_time,mu_locker_set_retries)
(mu_locker_set_retry_sleep,mu_locker_set_external)
(mu_locker_get_flags,mu_locker_get_expire_time)
(mu_locker_get_retries,mu_locker_get_retry_sleep): Mark as deprecated.
* libmailutils/base/locker.c: Rewrite.
* libmailutils/cli/stdcapa.c: New locking statements: type and
retry-sleep. retry-timeout is deprecated.
* libmailutils/tests/lck.c: Use new locker functions.
* libmailutils/tests/lock.at: Test the external locker.
* libmailutils/base/spawnvp.c (mu_spawnvp): Restore the default SIGCHLD
handler while waiting for the process to terminate.
* dotlock/dotlock.c: Use new locker functions.
* lib/manlock.c: Likewise.
* libmailutils/base/amd.c: Likewise.
* libmu_dbm/berkeley.c: Likewise.
* libmu_sieve/extensions/vacation.c: Likewise.
* libproto/dotmail/dotmail.c: Likewise.
* libproto/mbox/mboxrd.c: Likewise.
* mail/copy.c: Likewise.
* mda/lmtpd/lmtpd.c: Modify mu_locker_defaults instead of using
deprecated functions.
* mda/mda/mda.c: Likewise.
* mda/putmail/putmail.c: Likewise.
* NEWS: Document changes.
* configure.ac: Version 3.12.90.
* doc/texinfo/Makefile.am: Add programs/dotlock.texi
* doc/texinfo/programs.texi: Rewrite the locking section.
New section: dotlock.
* doc/texinfo/programs/dotlock.texi: New file.
|
|
For MySQL, backend-specific parameter is a list of keuword=value pairs
delimited by semicolons. Valid keywords are:
defaults_file - read configuration from the supplied file;
group - if default_file is supplied, read configuration from this named group (default - "client");
ca - name of the certificate authority file;
* include/mailutils/sql.h (mu_sql_module_config)<param>: New member.
(mu_sql_connection)<param>: New member.
(mu_sql_connection_init): Take additional argument (param). All uses
changed.
* libmu_auth/sql.c: New keyword: "param".
* sql/mysql.c (mu_mysql_connect): Parse backend-specific parameters:
defaults_file, group, and ca.
* sql/sql.c (mu_sql_connection_init): Take additional argument.
Initialize the connection param member.
|
|
* include/mailutils/sys/streamtrans.h: Add missing #endif
|
|
* include/mailutils/cli.h (mu_copyright_year): New extern.
(mu_version_print): New proto.
* libmailutils/cli/cli.c (mu_copyright_year): New variable.
Should be updated once a year.
(mu_version_print): New function.
(mu_version_hook): Use mu_version_print.
* mail/mail.c (mail_warranty): Use mu_version_print.
|
|
|
|
|
|
The "Volatile-uidnext" setting controls how sequence numbers are allocated.
By default they increase monotonically. If Volatile-uidnext is set to
"true", each new incorporated message is assigned the sequence number equal
to that of the last message increased by one. When the last message in
the mailbox is deleted, the value of UIDNEXT is recalculated and
UIDVALIDITY is increased. This follows the behavior of traditional MH
implementations.
* doc/texinfo/mu-mh.texi: Document chnges.
* include/mailutils/sys/amd.h (MU_AMD_VOLATILE_UIDNEXT): New
constant.
* libmailutils/base/amd.c (amd_expunge): Reset uidvalidity and uidnext
if MU_AMD_VOLATILE_UIDNEXT capability is set and the last message
was removed.
* libproto/mh/mh.c (_mailbox_mh_init): New mh_profile setting
"Volatile-uidnext". If set to true, it instructs mailutils to
mimic the traditional MH behavior when assigning sequence number
to the new message.
* testsuite/mbop.c (main): Use MBOP_PRE_OPEN_HOOK (if defined) as
the name of the function to call before opening the mailbox.
* libproto/mh/tests/mbop.c (mbop_pre_open_hook): New function.
If the MH environment variable is set, take its value as the name
of the mh_profile and read settings from it.
* libproto/mh/tests/Makefile.am: Add uidvol.at
* libproto/mh/tests/atlocal.in: Unset MH.
* libproto/mh/tests/testsuite.at: Include uidvol.at
* libproto/mh/tests/uidvol.at: New file.
|
|
* configure.ac: Select a suitable interface for closing all file
descriptors greater than or equal to a chosen one.
* include/mailutils/daemon.h (mu_daemon): New proto.
* include/mailutils/util.h (mu_close_fds): New proto.
* lib/daemon.c: Removed.
* lib/Makefile.am: Remove daemon.c
* libmailutils/base/Makefile.am: Add closefds.c
* libmailutils/base/closefds.c: New file.
* libmailutils/base/daemon.c: Rename to libmailutils/base/pidfile.c
* libmailutils/base/daemon.c: New file.
* libmailutils/diag/bt.c: Use mu_close_fds.
* libmailutils/server/acl.c: Likewise.
* mh/mh_whatnow.c: Likewise.
* libmailutils/stream/prog_stream.c: Likewise.
* libmailutils/server/msrv.c: Use mu_daemon.
* mh/send.c: Likewise.
* mda/lib/util.c (mda_close_fds): Remove.
|
|
A bitmask of all requested event types is stored in the observable
structure. When an event is reported, mu_observable_notify first
check if the event type bit is set in that bitmap. If so, it starts
iterating over observers. That should allow us to avoid the loop in
most cases.
* include/mailutils/observer.h (mu_observable_wants): New proto.
* include/mailutils/sys/observer.h (_mu_observable): New member: types.
* libmailutils/base/observer.c (mu_observable_attach): Compute bitmask
of all types requested by attached observers.
(mu_observable_detach): Likewise.
(mu_observable_notify): Check if the event type is marked in the bitmap,
skip iteration if it is not.
(mu_observable_wants): New function.
|
|
* include/mailutils/sys/dotmail.h (mu_dotmail_message): New
member: mark.
(mu_dotmail_message_reconstruct): Change signature.
* libproto/dotmail/dotmail.c (mu_dotmail_flush_tracker): Change
type of the ref member.
(tracker_next_ref): Rewrite.
(dotmail_tracker_sync): Rewrite.
(dotmail_mailbox_copy_unchanged): Rewrite.
* libproto/dotmail/message.c (dotmail_message_copy_with_uid)
(mu_dotmail_message_reconstruct): Rewrite.
* libproto/dotmail/tests/delete.at: Rewrite.
|
|
* include/mailutils/datetime.h (mu_timezone_offset): New proto.
* libmailutils/datetime/scantime.c: New conversion: %Z (timezone
abbreviation).
* libmailutils/datetime/parsedate.y (mu_timezone_offset): New function.
Returns time offset in seconds corresponding to the given timezone
abbreviation.
* include/mailutils/sys/mboxrb.h (mu_mboxrb_hdr): Remove unneeded
enum.
(mu_mboxrb_message): Remove env_date_start,
New member "date" holds the string representation of the envelope
timestamp in normalized form - ctime(3), UTC.
* libproto/mbox/mboxrb.c (scan_message_finalize): New function.
(scan_message_begin): New function. When initializing the
message, timestamps in obsolete forms are converted to normalized
representation.
(mboxrb_rescan_unlocked): Use scan_message_finalize and
scan_message_begin.
* libproto/mbox/message.c (mboxrb_envelope_date): Get normalized
timestamp from the date member,
* libproto/mbox/tests/env.at: Reflect the above changes.
|
|
* NEWS: update
* configure.ac: Revert 9763fd4a.
* include/mailutils/registrar.h: Likewise.
* libproto/Makefile.am: Likewise.
* libmailutils/stream/stream.c (mu_stream_size): Fix size calculation
in case of line and full buffering scheme.
* libmailutils/stream/streamcpy.c (mu_stream_copy_nl): Change semantics.
Ensure that the copied data ends with two newline characters. Append
them if necessary.
* testsuite/mbop.c: New commands: message_lines and message_size.
* libproto/mbox/mboxrb.c (mboxrb_mailbox_init_stream): Always add
MU_STREAM_READ permission.
Use the same flags for mu_mapfile_stream_create and
mu_file_stream_create.
(mboxrb_rescan_unlocked): Count terminating newline as part of the
message.
(mailbox_append_message): Make sure each message ends with an empty
line.
(mboxrb_tracker_sync): Update mailbox mesg_count.
(mboxrb_flush_temp): Truncate the temporary stream to the new size.
(mboxrb_flush_unlocked): Clear all modifications only in FLUSH_UIDVALIDITY
mode.
(mboxrb_message_copy_with_uid): Fix message_end computation. Use
mu_stream_copy_nl to copy message body.
(mu_mboxrb_message_reconstruct): Update ref on return.
* po/POTFILES.in: Update.
* mail/copy.c (append_to_file): Use mu_stream_stat_buffer to compute
statistics.
* mail/mail.c: Allow for opening read-only mailboxes.
* libproto/mbox/tests/body.at: Fix the expected byte count.
* libproto/mbox/tests/qget.at: Likewise.
* libproto/mbox/tests/delete.at: Add more tests.
* mail/tests/align.at: Fix the expected byte and line count.
* mail/tests/hold.at: Likewise.
* mail/testsuite/mail/read.exp: Likewise.
* mail/testsuite/mail/tag.exp: Likewise.
* mail/testsuite/mail/z.exp: Likewise.
* mail/tests/copy04.at: Don't use line count and size in comparison.
* mail/testsuite/mail/write.exp: Use regexps instead of exact strings
for the same reason.
* pop3d/testsuite/pop3d/read.exp: Fix the expected byte count.
* readmsg/tests/all.at: Expect extra newline in output.
* readmsg/tests/hdr.at: Likewise.
* readmsg/tests/nohdr.at: Likewise.
* readmsg/tests/twomsg.at: Likewise.
* readmsg/tests/weed.at: Likewise.
* sieve/tests/redirect.at: Fix the expected byte count.
* sieve/tests/reject.at: Expect extra newline in output.
* mh/inc.c (incmbx): Parse truncate and nomoveto URL parameters prior
to opening the mailbox. If notruncate is requested, open the mailbox
read-only.
* mh/mh_format.c (str_compress_ws): Fix copying between overlapping
memory regions.
* libtests/Makefile.am: Remove lstuid tests.
* libtests/testsuite.at: Likewise.
* libtests/lstuid.c: Remove.
* libtests/lstuid00.at: Remove.
* libtests/lstuid01.at: Remove.
* libtests/lstuid02.at: Remove.
* libtests/mime.at: Fix the expected byte count.
* imap4d/tests/IDEF0956.at: Fix the expected byte count.
* map4d/tests/fetch.at: Likewise.
* imap4d/tests/append00.at: Remove X-* headers and Status from the mbox
prior to comparison.
* imap4d/tests/append01.at: Likewise.
* libproto/mbox: Remove old code. Replace it with mboxrb.
* mail/tests/nohome.at: Update lines/sizes.
* mail/testsuite/mail/folder.exp: Likewise.
* mail/testsuite/mail/tag.exp: Likewise.
* mail/testsuite/mail/z.exp: Likewise.
* mda/mda/tests/mda.at: Fix shell quoting.
* mda/putmail/tests/putmail.at: Remove extra newline from the expectation.
Eliminate X-IMAPbase and X-UID from the resulting mailbox.
* mda/tests/mda.sh: Eliminate X-IMAPbase and X-UID from the output.
* pop3d/testsuite/pop3d/read.exp: Fix expected lines/sizes
* readmsg/tests/hdr.at: Fix extra whitespace.
* sieve/tests/action.at: Eliminate X-IMAPbase and X-UID. Fix extra
whitespace in the expected From_ line.
* sieve/tests/addheader.at: Likewise.
* sieve/tests/pipeact.at: Likewise.
|
|
* include/mailutils/sys/mboxrb.h (mu_mboxrb_message_ref): Remove.
(mu_mboxrb_message_reconstruct): Change prototype.
* libproto/mboxrb/mboxrb.c (mu_mboxrb_flush_tracker) <ref>: Change type
to size_t *.
(tracker_next_ref): Return the refereced message.
(mboxrb_tracker_sync): Rewrite.
(mboxrb_mailbox_copy_unchanged): Update.
(mailbox_append_message): Place exactly one empty line between two
messages.
* libproto/mboxrb/message.c (mboxrb_message_copy_with_uid): Ref
argument is struct mu_mboxrb_message *.
(mu_mboxrb_message_reconstruct): Likewise.
* libproto/mboxrb/tests/delete.at: Check number of messages after
deletion.
* libproto/mboxrb/tests/append.at: Expect extra newline.
|
|
* include/mailutils/sys/mboxrb.h (mu_mboxrb_message): New member: mark
* libproto/mboxrb/mboxrb.c (mu_mboxrb_message_ref): New members:
from_length, env_sender_len, env_date_start.
* libproto/mboxrb/message.c (mboxrb_rescan_unlocked): Update dmp->scan.
Fix NULL dereference.
(mboxrb_rescan): Don't update dmp->scan, see above.
(mailbox_append_message): Write out envelope; use FROMRB filter.
(mboxrb_tracker_sync): Rewrite using mark/sweep technique.
* libproto/mboxrb/tests/Makefile.am: Add new tests.
* libproto/mboxrb/tests/testsuite.at: Include new tests.
* libproto/mboxrb/tests/append.at: New test.
* libproto/mboxrb/tests/delete.at: New test.
* libproto/mboxrb/tests/qget.at: New test.
* libproto/mboxrb/tests/uidnext.at: New test.
* libproto/mboxrb/tests/uidvalidity.at: New test.
|
|
* configure.ac: New format: mboxrb
* include/mailutils/filter.h (mu_fromrb_filter): New extern.
* include/mailutils/registrar.h (mu_mboxrb_record): New extern.
(mu_register_all_mbox_formats)
(mu_register_local_mbox_formats): Add mu_mboxrb_record.
* libmailutils/filter/filter.c (mu_filter_get_list): Add mu_fromrb_filter
* libproto/Makefile.am [MU_COND_SUPPORT_MBOXRB]: Add mboxrb
* bootstrap.conf: Remove special handling for testsuite/maildir (fixes
1d846d2d92).
* testsuite/mbop.c: Implement the -r (--read-only) option.
* include/mailutils/sys/Makefile.am: Add mboxrb.h
* include/mailutils/sys/mboxrb.h: New file.
* libmailutils/filter/Makefile.am (libfilter_la_SOURCES): Add fromrb.c
* libmailutils/filter/fromrb.c: New file.
* libmailutils/tests/Makefile.am: New file.
* libmailutils/tests/fromrb.at: New file.
* libmailutils/tests/testsuite.at: New file.
* libproto/mboxrb/Makefile.am: New file.
* libproto/mboxrb/mboxrb.c: New file.
* libproto/mboxrb/message.c: New file.
* libproto/mboxrb/tests/.gitignore: New file.
* libproto/mboxrb/tests/Makefile.am: New file.
* libproto/mboxrb/tests/atlocal.in: New file.
* libproto/mboxrb/tests/attr.at: New file.
* libproto/mboxrb/tests/autodetect.at: New file.
* libproto/mboxrb/tests/body.at: New file.
* libproto/mboxrb/tests/count.at: New file.
* libproto/mboxrb/tests/env.at: New file.
* libproto/mboxrb/tests/header.at: New file.
* libproto/mboxrb/tests/testsuite.at: New file.
|
|
* include/mailutils/sys/dotmail.h (mu_dotmail_mailbox): New member
stream_flags.
* libproto/dotmail/dotmail.c (dotmail_mailbox_init_stream): Translate
MU_STREAM_APPEND to MU_STREAM_RDWR.
(dotmail_rescan_unlocked,dotmail_rescan): Check actual stream flags,
not the mailbox ones.
(dotmail_flush_unlocked): Remove check for MU_STREAM_APPEND.
* libproto/dotmail/tests/append.at: Test appends in append mode.
* testsuite/mbop.c: New option -a (--append).
|
|
* include/mailutils/sys/dotmail.h (mu_dotmail_mailbox):
New members: x_imapbase_off and x_imapbase_len.
* libproto/dotmail/dotmail.c: Format X-IMAPbase header with fixed
width to avoid rewriting entire mailbox only to make the new header
fit to its place in the first message.
|
|
* include/mailutils/sys/amd.h (_MU_AMD_PROP_UIDNEXT): New define.
(MU_AMD_PROP): Remove.
(MU_AMD_F_PROP): New flag.
(_amd_data): New member: flags.
Remove next_uid
(amd_reset_uidvalidity): Change return type.
(amd_update_uidnext,amd_alloc_uid): New protos.
* include/mailutils/sys/dotmail.h (mu_dotmail_mailbox): New member
uidvalidity_changed.
* libmailutils/base/amd.c (_amd_prop_create): Set MU_AMD_F_PROP flag
if the prop file exists.
(amd_initial_scan): New function.
(amd_get_uidvalidity, amd_set_uidvalidity)
(amd_uidnext): Rewrite using amd_initial_scan.
(amd_reset_uidvalidity): Return int.
(amd_update_uidnext,amd_alloc_uid): New functions.
* libproto/dotmail/dotmail.c (dotmail_close): Flush UID parameters
if uidvalidity_changed is set.
(dotmail_flush): Take three-state mode as its third argument.
(dotmail_flush_unlocked): Likewise. If operating in FLUSH_UIDVALIDITY
mode, clear all other modifications to the messages in the mailbox.
Clear uidvalidity_changed on success.
(dotmail_expunge, dotmail_sync): Update call to dotmail_flush.
(dotmail_alloc_next_uid): Set uidvalidity_changed.
(dotmail_rescan_unlocked): Check if the assigned UID is greater than
the previously assigned one and less than the UIDNEXT value.
Raise uidvalidity_changed if UIDs were re-allocated.
(mu_dotmail_mailbox_uid_setup): Set uidvalidity_scanned.
* libproto/dotmail/tests/Makefile.am: Add new test.
* libproto/dotmail/tests/testsuite.at: Likewise.
* libproto/dotmail/tests/uidnext.at: New test.
* libproto/maildir/mbox.c: Use amd_update_uidnext to synchronize the
computed and predicted uidnext value.
(maildir_next_uid): Remove.
* libproto/maildir/tests/Makefile.am: Add new test.
* libproto/maildir/tests/testsuite.at: Likewise.
* libproto/maildir/tests/uidnext.at: New test.
* libproto/mh/mbox.c (_mh_next_seq): Remove function.
(mh_scan0): Use amd_update_uidnext to synchronize the
computed and predicted uidnext value.
* libproto/mh/tests/Makefile.am: Add new test.
* libproto/mh/tests/testsuite.at: Likewise.
* libproto/mh/tests/uidnext.at: New test.
|
|
The subcommand converts names in maildirs created by earlier versions of
mailutils to the new format.
* NEWS: Update.
* doc/texinfo/programs/mailutils.texi: Document maildir_fixup
* mu/libexec/Makefile.am: Build maildir_fixup subcommand.
* mu/libexec/maildir_fixup.c: New file.
* mu/libexec/mu.h (common_options): New extern.
* include/mailutils/cli.h (MU_CLI_OPTION_CONF_PROGNAME): New constant.
* libmailutils/cli/simple.c (MU_CLI_OPTION_PROG_NAME)
(MU_CLI_OPTION_PROG_NAME)
(MU_CLI_OPTION_PROG_DOC)
(MU_CLI_OPTION_BUG_ADDRESS)
(MU_CLI_OPTION_PACKAGE_URL)
(MU_CLI_OPTION_EXTRA_INFO)
(MU_CLI_OPTION_HELP_HOOK)
(MU_CLI_OPTION_VERSION_HOOK)
(MU_CLI_OPTION_PROG_DOC_HOOK)
(MU_CLI_OPTION_NEGATION)
(MU_CLI_OPTION_SPECIAL_ARGS): Allow for NULL argument.
(MU_CLI_OPTION_CONF_PROGNAME): New code
|
|
* include/mailutils/mailbox.h (mu_mailbox_uidvalidity_reset): New proto.
* include/mailutils/sys/mailbox.h (_mu_mailbox): Replace the
_uidvalidity member with two function pointers: _get_uidvalidity and
_set_uidvalidity.
* libmailutils/mailbox/mailbox.c (mu_mailbox_uidvalidity_reset): New
function.
* libmailutils/base/amd.c: Initialize the two methods.
* libproto/dotmail/dotmail.c: Likewise.
* libproto/mbox/mbox.c: Likewise.
* libproto/imap/mbox.c: Initialize the _get_uidvalidity field.
* mh/sortm.c: Reset the uidvalidity on success.
* mh/tests/sortm.at: Check that the uidvalidity changed after sorting
|
|
* testsuite/mbop.c: Implement notification mode.
* comsat/tests/testsuite.at: Fix mh qid.
* libproto/dotmail/dotmail.c (dotmail_append_message): Lock the
monitor before and unlock it after the operation.
* libproto/dotmail/tests/notify.at: New file.
* libproto/dotmail/tests/Makefile.am: Add notify.at
* libproto/dotmail/tests/testsuite.at: Include notify.at.
* include/mailutils/sys/amd.h (cur_msg_file_name): Change signature.
* libmailutils/base/amd.c: Use amd->cur_msg_file_name with 0 as its second
argument to get qid.
* libproto/maildir/mbox.c (maildir_cur_message_name): Take three
argument, second one specifying whether an absolute or relative
filename is requested.
All uses changed.
* libproto/maildir/tests/notify.at: New file.
* libproto/maildir/tests/Makefile.am: Add notify.at
* libproto/maildir/tests/testsuite.at: Include notify.at
* libproto/mh/mbox.c (_mh_cur_message_name): Take three
argument, second one specifying whether an absolute or relative
filename is requested.
All uses changed.
* libproto/mh/tests/notify.at: New file.
* libproto/mh/tests/Makefile.am: Add notify.at
* libproto/mh/tests/testsuite.at: Include notify.at
|
|
* include/mailutils/attribute.h (mu_attribute_string_to_flags): New proto.
(mu_string_to_flags): Mark as deprecated.
(mu_attribute_flags_to_string): New proto.
* libmailutils/mailbox/attribute.c (mu_string_to_flags): Rename to
mu_attribute_string_to_flags.
(mu_attribute_flags_to_string): New function.
* libmailutils/base/amd.c: Use mu_attribute_string_to_flags instead of
mu_string_to_flags.
* libmailutils/mailbox/msgscan.c: Likewise. * libproto/dotmail/message.c: Likewise.
* libproto/pop/mbox.c: Likewise.
|
|
* include/mailutils/attribute.h (MU_ATTRIBUTE_FORWARDED): New constant.
(mu_attribute_is_forwarded, mu_attribute_set_forwarded)
(mu_attribute_unset_forwarded): New prototypes.
(MU_STATUS_BUF_SIZE): Update definition.
* libmailutils/mailbox/attribute.c (mu_attribute_is_forwarded)
(mu_attribute_set_forwarded)
(mu_attribute_unset_forwarded): New functions.
* libproto/maildir/mbox.c (info_map): Implement the 'P' flag.
|
|
* include/mailutils/sys/amd.h (amd_reset_uidvalidity): New proto.
* libmailutils/base/amd.c (amd_reset_uidvalidity): New function.
* libproto/maildir/mbox.c (maildir_scan_unlocked): Use
amd_reset_uidvalidity.
|
|
* .gitignore: Update.
* include/mailutils/sys/amd.h (MU_AMD_IMAPBASE): Remove.
* libmailutils/base/amd.c (amd_scan_message): Remove obsolete code.
* libproto/maildir/mbox.c (maildir_message_cmp): Bugfixes.
* testsuite/Makefile.am: Add mbop.c to distribution.
* testsuite/mbop.c: Implement qget.
* testsuite/mbox2dir.c (maildir_generate_name): Fix typo.
(main): Skip From_ line before copying.
* libmailutils/tests/Makefile.am (wsp_SOURCES): Remove.
* libproto/maildir/tests/Makefile.am: Add new tests.
* libproto/maildir/tests/append.at: New file.
* libproto/maildir/tests/attr.at: New file.
* libproto/maildir/tests/body.at: New file.
* libproto/maildir/tests/count.at: Update.
* libproto/maildir/tests/delete.at: New file.
* libproto/maildir/tests/envelope.at: New file.
* libproto/maildir/tests/header.at: New file.
* libproto/maildir/tests/qget.at: New file.
* libproto/maildir/tests/testsuite.at: Include new tests.
* libproto/maildir/tests/uid.at: New file.
* libproto/maildir/tests/uidvalidity.at: New file.
|
|
This starts a series of commits whose purpose is to clean up the
mess with the uid and uidvalidity attributes.
The way these attributes are stored depends on the mailbox type. The
libmailutils library contained some historical left-overs that assumed
that the X-Imapbase header of the first message in the mailbox contained
the value of the uidvalidity and next uid. These left-overs are removed.
* include/mailutils/message.h (mu_message_scan): Remove uidvalidity.
* libmailutils/mailbox/msgscan.c: Remove special handling for the
X-Imapbase header.
* libmailutils/base/amd.c (_amd_message_save)
(amd_scan_message): Remove special handling for X-Imapbase.
|