summaryrefslogtreecommitdiffabout
AgeCommit message (Collapse)AuthorFiles
8 daysFixes in the mail testsuteHEADmasterSergey Poznyakoff2
* mail/tests/copy00.at: Fix description. Skip test if /dev/stdout cannot be locked. * mail/tests/copy03.at: Rename MBOX to avoid name clashes on case-insensitive file systems.
10 daysBugfixSergey Poznyakoff1
* include/mailutils/sys/dotmail.h: Remove stray variable declaration.
10 daysPull wordsplit from submodule.Sergey Poznyakoff14
* .gitmodules: Add wordsplit. * configure.ac: Version 3.7.90 * NEWS: Raise version number. * include/mailutils/sys/Makefile.am: Include wordsplit.h from the submodule. * include/mailutils/sys/wordsplit.h: New file. * include/mailutils/wordsplit.h: Rewrite as a wrapper over mailutils/sys/wordsplit.h * libmailutils/Makefile.am: Distribute files from wordsplit. * libmailutils/string/Makefile.am: Add libmailutils/wordsplit to the include path. * libmailutils/string/wordsplit.c: Replace with a wrapper over wordsplit/wordsplit.c * libmailutils/tests/.gitignore: Update. * libmailutils/tests/Makefile.am: Pull wordsplit testsuite from the submodule. * libmailutils/tests/wordsplit.at: Remove. * libmailutils/tests/wsp.c: Remove.
2019-06-22Use defines for internal mail variable namesSergey Poznyakoff20
2019-06-22Fix typos and wording in some diagnostic messagesSergey Poznyakoff4
2019-06-21Version 3.7release-3.7Sergey Poznyakoff2
2019-06-21Update NEWSSergey Poznyakoff1
2019-05-30Fix conditional compilation; add dotmail support to libmu_scmSergey Poznyakoff4
* configure.ac: Accept dotmail as a value for MU_DEFAULT_SCHEME. Display dotmail support status at the end of the run. * libmailutils/base/nullrec.c: Provide placeholder for disabled dotmail. * libmu_scm/mu_scm.c (format_table): Add dotmail. * libmu_scm/tests/testsuite.at: Don't assume mbox as the default. Load it explicitly.
2019-05-30Minor changeSergey Poznyakoff1
* maint/flowgraph.mk: Pass --all to cflow.
2019-05-29mh: fix folder +/absolute/nameSergey Poznyakoff1
* mh/folder.c (name_prefix_len): Remove global. (install_folder_info,_scan): Take additional argument: length of the name prefix to skip. (folder_scan): New function. (action_print): Don't impose name prefix unconditionally. Call folder_scan to set it up as necessary.
2019-05-22Fix a bug in TLS readSergey Poznyakoff3
This complements afda9ba4. Thanks to Rafael Fontenelle for helping locate the bug. * libmu_auth/tlsiostr.c (_tls_io_read): Handle GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED. * libmailutils/stream/stream.c (mu_stream_seterr): EINTR is a transient error condition. * THANKS: Update.
2019-05-22URL parser: use case-insensitive comparison for auth and host partsSergey Poznyakoff3
* libmailutils/url/accessor.h: (URL_PART_CMP_ICASE) (URL_PART_CMP_ICASE): New defines. * libmailutils/url/get-auth.c: Request case-insensitive comparison. * libmailutils/url/get-host.c: Likewise.
2019-05-21Describe maidag delivery-mode configuration variable.Sergey Poznyakoff1
2019-05-09Maidag: fix coredump in daemon modeSergey Poznyakoff1
* maidag/maidag.c (main): Pass pointer to the server as data parameter to mu_cli.
2019-05-03movemail: make sure UIDLs are properly stored.Sergey Poznyakoff1
* movemail/movemail.c (main): When using POP3 UIDLs for message identification, be sure to store them in the X-UIDL header.
2019-04-24Bugfixes.Sergey Poznyakoff3
* libmailutils/diag/diag.c (mu_diag_vprintf): Fix debug level formatting. It missed 's' after the escape character. * mu/libexec/ldflags.c (lib_descr): Add dotmail.
2019-03-29Remove explicit _DEPENDENCIES variables from Makefiles.Sergey Poznyakoff5
These might be needed only in rare cases during the development cycle. There is no use keeping them around. * configure.ac (MU_AUTHLIBS_DEPENDENCY) (DBMLIB_DEPENDENCY,SQLLIB_DEPENDENCY): Remove. * imap4d/Makefile.am: Remove explicit _DEPENDENCIES. * pop3d/Makefile.am: Likewise. * libmu_auth/Makefile.am: Likewise. * libmu_dbm/Makefile.am: Likewise.
2019-03-27Use <prog>_LDADD to link in libmu_testSergey Poznyakoff2
This helps automake discover dependency on this library.
2019-03-27Minor fix (follow-up to 60c5545ba)Sergey Poznyakoff1
2019-03-27Minor fixes in dot filters.Sergey Poznyakoff4
The DOT decoder accepts input consisting of two characters ".\n" and decodes it to empty output. When encoding empty input, ".\n" is produced Similarly, CRLFDOT handles ".\r\n" the same way. * libmailutils/filter/crlfdot.c (_crlfdot_encoder): Accept ".\r\n" as input. * libmailutils/filter/dot.c: Accept ".\n" as input. * libmailutils/tests/crlfdot.at: Add new test. * libmailutils/tests/dot.at: Likewise.
2019-03-26Use mu_folder_scan in imap4dSergey Poznyakoff1
* imap4d/list.c (list_fun): Don't check if the returned record matches refinfo->pfx->record. This is done by mu_folder_scan. (list_ref): Use mu_folder_scan.
2019-03-26Consistently use the term 'depth' when referring to directory nesting depthSergey Poznyakoff16
* include/mailutils/folder.h (mu_list_response): Rename 'level' to 'depth'. All uses updated.
2019-03-26Implement selection of requested mailbox formats in scanning the local file ↵Sergey Poznyakoff9
system folders. * include/mailutils/registrar.h (mu_record_match): New struct. (mu_registrar_match_records): New proto. * libmailutils/base/registrar.c (mu_registrar_match_records): New function. * libmailutils/mailbox/fsfolder.c (list_helper): Actually select the matching record from scn->records (if supplied). * libmailutils/tests/Makefile.am: Add new tests. * libmailutils/tests/fsfolder.c: Minor changes. * libmailutils/tests/testsuite.at: Add new tests. * libmailutils/tests/fsfolder03.at: New file. * libmailutils/tests/fsfolder04.at: New file.
2019-03-25Bugfixes in fsfolderSergey Poznyakoff2
* libmailutils/mailbox/fsfolder.c (list_helper): Fix depth cut off. Fix the lookup in scn->records. * libmailutils/tests/fsfolder.c: Implement two test records. New command: "scan".
2019-03-25Implement test shell frameworkSergey Poznyakoff13
* libmailutils/tests/tesh.c: New file. * libmailutils/tests/tesh.h: New file. * libmailutils/tests/Makefile.am: Add new files. * libmailutils/tests/fsfolder.c: Rewrite using test shell framework. * libmailutils/tests/fsfolder00.at: Use semicolons to delimit commands. * libmailutils/tests/fsfolder01.at: Likewise. * libmailutils/tests/linetrack.c: Rewrite using test shell framework. * libmailutils/tests/linetrack.at: Change command initial character to dot. * libmailutils/tests/listop.c: Rewrite using test shell framework. * libmailutils/tests/list.at: Minor changes. * libproto/dotmail/tests/dm_mesg.c: Rewrite using test shell framework. * libproto/dotmail/tests/Makefile.am: Link dm_mesg with libmu_tesh * libproto/dotmail/dotmail.c: Fix typo.
2019-03-23Two new string functionsSergey Poznyakoff4
mu_string_prefix(A, B) returns true if B is the prefix of A. mu_string_suffix(A, B) returns true if B is the suffix of A. * include/mailutils/cstr.h (mu_string_prefix) (mu_string_suffix): protos. * libmailutils/string/Makefile.am: Add new files. * libmailutils/string/strpref.c: New file. * libmailutils/string/strsuf.c: New file.
2019-03-23Rewrite folder listing interface.Sergey Poznyakoff10
New function mu_folder_scan provides an improved scanning interface. In particular, it allows the user to abridge the scan to mailboxes of certain type (or types). Existing listing API functions are rewritten as alternative entry points to mu_folder_scan. * include/mailutils/folder.h (mu_folder_scanner): New struct. (mu_folder_scan): New function. * include/mailutils/registrar.h (mu_registrar_list_p): New function. * include/mailutils/sys/folder.h (_mu_folder._list): Change signature. * libmailutils/base/registrar.c (mu_registrar_list_p): New function. * libmailutils/mailbox/folder.c (mu_folder_scan): New function. (mu_folder_enumerate): Rewrite as entry point to mu_folder_scan. * libmailutils/mailbox/fsfolder.c: Use new API, * libmailutils/tests/fsfolder.c: Rewrite scheme matcher. * libmailutils/tests/fsfolder00.at: Fix test output. * libmailutils/tests/fsfolder02.at: Likewise. * libproto/imap/folder.c: Use new API.
2019-03-22Fix MH format detectionSergey Poznyakoff2
* libproto/mh/folder.c (mh_dir_p): Check only regular files. (_mh_list_p): Ditto. All directories are eligible for listing. * libmailutils/base/registrar.c (mu_record_list_p): Remove useless check.
2019-03-13mail: force mime mode if at least one attachment was givenSergey Poznyakoff1
This fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918806 * mail/mail.c (cli_attach): Set mime_option.
2019-03-10Fix encoding of empty input by DOT filter.Sergey Poznyakoff3
* libmailutils/filter/dot.c (_dot_encoder): Don't emit additional empty line on empty input (i.e. if mu_filter_lastbuf arrives when dfa is in dot_encode_init state). * libmailutils/tests/dot.at: Test empty input.
2019-03-06Simplify dotmail test environmentSergey Poznyakoff10
The dm_mbox tool is not needed after ff847bb1. Remove it. Modify dm_mesg to optionally take commands from the command line. Use it instead of dm_mbox in testcases.
2019-03-06Minor changeSergey Poznyakoff2
* NEWS: Document the recent changes. * THANKS: Add Kurt Hackenberg.
2019-03-06BugfixSergey Poznyakoff1
* libproto/mbox/mbox.c (restore_date): Fix possible uninitialized memory access.
2019-03-06Revamp UID support in dotmailSergey Poznyakoff13
* include/mailutils/stream.h (mu_stream_header_copy): New proto. * libmailutils/stream/hdrcpy.c: New file. * libmailutils/stream/Makefile.am: Add hdrcpy.c * libmailutils/tests/hdrcpy.c: New test program. * libmailutils/tests/hdrcpy.at: New testcase. * libmailutils/tests/Makefile.am: Add new test program and testcase. * libmailutils/tests/testsuite.at: Add new testcase. * libproto/dotmail/tests/append.at: Add new tests. * libmailutils/tests/.gitignore: Update. * include/mailutils/sys/dotmail.h (mu_dotmail_message): Remove headers_scanned. New field: uid_modified. (mu_dotmail_mailbox): Change type for uidnext to unsigned long. Remove scanned_uids_count. (mu_dotmail_message_headers_prescan) (mu_dotmail_mailbox_scan_uids): Remove. (mu_dotmail_mailbox_uid_setup): New proto. * libproto/dotmail/dotmail.c: Revamp UID support. See "Notes" on line 251 for description. * libproto/dotmail/message.c (mu_dotmail_message_reconstruct): Optimize for the case where the message remains unchanged except for the UID information. * libproto/dotmail/tests/dm_mesg.c: Add mailbox inspection commands from dm_mbox. Perhaps the latter can be removed.
2019-03-02Implement automatic dot-unstuffing in dotmail mailboxesSergey Poznyakoff4
* include/mailutils/sys/dotmail.h (mu_dotmail_message): New members: body_size and body_dot_stuffed. * libproto/dotmail/dotmail.c (dotmail_rescan_unlocked): Count dot-unstuffed octets in the body. Set dmsg->body_dot_stuffed to 1 if at least one byte was dot-stuffed. * libproto/dotmail/message.c (dotmail_body_size): Return unstuffed size. (_msg_body_setup): If the body was dot-stuffed, return rdcache stream built over the "DOT" decoder. * libproto/dotmail/tests/body.at: Check dot-unstuffing.
2019-03-02Fix the dot filter decodingSergey Poznyakoff8
* libmailutils/filter/dot.c (_dot_decoder): Don't emit extra newline at the "\n.\n" marker. * libmailutils/stream/stream.c (mu_stream_seterr): Don't treat ENOSYS as fatal error. * libmailutils/tests/dot.at: New file. * libmailutils/tests/testsuite.at: Include dot.at. * libmailutils/tests/Makefile.am: Add dot.at * testsuite/smtp-msg.at: Remove extra newline from the expected output. * testsuite/smtp-str.at: Likewise.
2019-03-02Improve the dotmail testsuiteSergey Poznyakoff11
* libproto/dotmail/tests/dm_mesg.c: Rewrite to take commands from stdin. * libproto/dotmail/tests/Makefile.am: Add setattr.at * libproto/dotmail/tests/testsuite.at (DM_MESG): New macro. * libproto/dotmail/tests/setattr.at: New file. * libproto/dotmail/tests/append.at: Use DM_MESG. * libproto/dotmail/tests/attr.at: Likewise. * libproto/dotmail/tests/body.at: Likewise. * libproto/dotmail/tests/delete.at: Likewise. * libproto/dotmail/tests/env.at: Likewise. * libproto/dotmail/tests/header.at: Likewise. * libproto/dotmail/tests/uid.at: Likewise.
2019-03-02Implement different accuracy levels for the mailbox format detectionSergey Poznyakoff12
Selecting the accuracy level allows the user to achieve the desired balance between the speed of the folder scan and accuracy of mailbox format detection. The accuracy level can be set either from the configuration file, using the mailbox.accuracy-level statement, or from the environment, using the MU_AUTODETECT_ACCURACY variable. The default accuracy level 1 discerns valid mbox and dotmail mailboxes providing reasonable scan speed. Level 0 (previous default) does not discern them, but provides maximal speed. Level 2 and higher provide better accuracy at the price of speed. * include/mailutils/url.h (MU_AUTODETECT_ACCURACY_AUTO) (MU_AUTODETECT_ACCURACY_FAST) (MU_AUTODETECT_ACCURACY_DEFAULT): New constants. (mu_scheme_autodetect_p): New proto, moved here from util.h (mu_set_autodetect_accuracy) (mu_autodetect_accuracy): New protos. * libmailutils/base/schemeauto.c (mu_set_autodetect_accuracy) mu_autodetect_accuracy): New functions. * libmailutils/cli/stdcapa.c: New configuration statement: mailbox.autodetect-accuracy. * libmailutils/url/create.c (_mu_url_create_internal): Assume the "file" scheme if the MU_URL_PARSE_LOCAL flag is set. * libproto/dotmail/folder.c: Implement format detection. Three accuracy levels: 0, 1, and >1 * libproto/mbox/folder.c (_mbox_is_scheme): Implement default format detection. * libproto/dotmail/tests/Makefile.am: Add new test. * libproto/dotmail/tests/autodetect.at: New test. * libproto/dotmail/tests/dm_detect.c: New file. * libproto/dotmail/tests/testsuite.at: Add new test.
2019-03-01Initial implementation of the dotfile formatSergey Poznyakoff30
* configure.ac: Enable new local format. * include/mailutils/registrar.h (mu_dotmail_record): New extern. (mu_register_all_mbox_formats) (mu_register_local_mbox_formats): Add mu_dotmail_record * include/mailutils/sys/dotmail.h: New file. * libproto/dotmail/Makefile.am: New file. * libproto/dotmail/dotmail.c: New file. * libproto/dotmail/message.c: New file. * libproto/dotmail/folder.c: New file. * libproto/dotmail/tests/.gitignore: New file. * libproto/dotmail/tests/Makefile.am: New file. * libproto/dotmail/tests/atlocal.in: New file. * libproto/dotmail/tests/count.at: New file. * libproto/dotmail/tests/dm_mbox.c: New file. * libproto/dotmail/tests/dm_mesg.c: New file. * libproto/dotmail/tests/env.at: New file. * libproto/dotmail/tests/header.at: New file. * libproto/dotmail/tests/recent.at: New file. * libproto/dotmail/tests/testsuite.at: New file. * libproto/dotmail/tests/attr.at: New file. * libproto/dotmail/tests/body.at: New file. * libproto/dotmail/tests/uid.at: New file. * libproto/dotmail/tests/dm_qget.c: New file. * libproto/dotmail/tests/qget.at: New file. * libproto/dotmail/tests/append.at: New file. * libproto/dotmail/tests/delete.at: New file. * libmu_scm/mailutils/ancilla.scm: Fix regular expression to take into account changes introduced by 4bdc41ff90.
2019-02-26Provide fallback mechanism for mu_mailbox_messages_recent and ↵Sergey Poznyakoff1
mu_mailbox_message_unseen * libmailutils/mailbox/mailbox.c (mu_mailbox_messages_recent) (mu_mailbox_message_unseen): Fall back to iteration if no backend-specific method is provided.
2019-02-26envelope: attempt to recover from trace information if not available otherwiseSergey Poznyakoff1
* libmailutils/mailbox/msgenv.c (message_envelope_date): Use timestamp from Received header. (message_envelope_sender): Give preference to Return-Path header
2019-02-26New autoconf macro for activating mailbox format supportSergey Poznyakoff22
* am/enable.m4 (MU_ENABLE_SUPPORT) (MU_ENABLE_BUILD): Use m4_-prefixed directives. (MU_ENABLE_MAILBOX_FORMAT) (MU_ENABLE_LOCAL_MAILBOX_FORMAT_ (MU_ENABLE_REMOTE_MAILBOX_FORMAT): New macros. (MU_LIB_MAILBOX) (MU_LIB_LOCAL_MAILBOX) (MU_LIB_REMOTE_MAILBOX): New substitution variables. * configure.ac: Use new macros to enable mailbox formats * libproto/Makefile.am: Augment SUBDIRS instead of using Makefile variables. * comsat/Makefile.am: Use MU_LIB_.*MAILBOX macros to link in the necessary libraries. * examples/Makefile.am: Likewise. * examples/cpp/Makefile.am: Likewise. * frm/Makefile.am: Likewise. * imap4d/Makefile.am: Likewise. * include/mailutils/sys/Makefile.am: Likewise. * libmu_scm/Makefile.am: Likewise. * libproto/Makefile.am: Likewise. * maidag/Makefile.am: Likewise. * mail/Makefile.am: Likewise. * messages/Makefile.am: Likewise. * mh/Makefile.am: Likewise. * movemail/Makefile.am: Likewise. * mu/libexec/Makefile.am: Likewise. * pop3d/Makefile.am: Likewise. * python/2/libmu_py/Makefile.am: Likewise. * python/3/libmu_py/Makefile.am: Likewise. * readmsg/Makefile.am: Likewise. * sieve/Makefile.am: Likewise. * testsuite/Makefile.am: Likewise.
2019-02-24BugfixSergey Poznyakoff1
* python/3/libmu_py/mailcap.c: Fix leftover uses of PyString_FromString and PyInt_FromLong.
2019-02-23Version 3.6release-3.6Sergey Poznyakoff3
* NEWS: Update. * configure.ac: Raise version number Raise VI_CURRENT and clear VI_REVISION (due to 18e23d6e). * libproto/imap/close.c: Add missing include.
2019-02-03Update NEWSSergey Poznyakoff1
2019-02-03Rewrite the mailcap supportSergey Poznyakoff44
* configure.ac: Build libmailutils/mailcap/Makefile * include/mailutils/mailcap.h: Rewrite * include/mailutils/sys/Makefile.am: Add mailcap.h * include/mailutils/sys/mailcap.h: New file. * include/mailutils/util.h: Add missing include. * lib/mailcap.c: Rewrite using new API. * libmailutils/Makefile.am: Build in mailcap * libmailutils/base/Makefile.am: Remove mailcap.c * libmailutils/base/mailcap.c: Remove. * libmailutils/mailcap/Makefile.am: New file. * libmailutils/mailcap/ctmatch.c: New file. * libmailutils/mailcap/deferrclos.c: New file. * libmailutils/mailcap/mcp_creat.c: New file. * libmailutils/mailcap/mcp_destr.c: New file. * libmailutils/mailcap/mcp_err.c: New file. * libmailutils/mailcap/mcp_flags.c: New file. * libmailutils/mailcap/mcp_get.c: New file. * libmailutils/mailcap/mcp_sel.c: New file. * libmailutils/mailcap/mcp_count.c: New file. * libmailutils/mailcap/mcp_find.c: New file. * libmailutils/mailcap/ent_cmd.c: New file. * libmailutils/mailcap/ent_creat.c: New file. * libmailutils/mailcap/ent_destr.c: New file. * libmailutils/mailcap/ent_locus.c: New file. * libmailutils/mailcap/ent_type.c: New file. * libmailutils/mailcap/fieldacc.c: New file. * libmailutils/mailcap/fields.c: New file. * libmailutils/mailcap/finder.c: New file. * libmailutils/mailcap/parse.c: New file. * libmailutils/mailcap/parsefile.c: New file. * libmailutils/tests/mailcap.c: Rewrite using new API. Improve cli * libmailutils/tests/mcf.c: New file. * libmailutils/tests/ctm.c: New file. * libmailutils/tests/ctm.at: New file. * libmu_cpp/mailcap.cc: Rewrite using new API. * python/2/libmu_py/mailcap.c: Rewrite using new API. * python/3/libmu_py/mailcap.c: Rewrite using new API. * examples/python/2/mailcap.py: Minor change. This example is broken with the new API. Should be fixed. * include/mailutils/cpp/mailcap.h: Update * include/mailutils/cpp/pop3.h: Update
2019-02-02New iterator functions: mu_iterator_skip_while and mu_iterator_skip_untilSergey Poznyakoff2
The mu_iterator_skip_while function continues iteration while the supplied predicate function returns true. The mu_iterator_skip_until function continues iteration until the supplied predicate function returns true. * include/mailutils/iterator.h: Add new prototypes. * libmailutils/base/iterator.c: Implement new functions.
2019-01-31Rewrite the transcript streamSergey Poznyakoff8
The new implementation consists of two independent state machines for each transcript channel (input and output). The MU_XSCRIPT_PAYLOAD state can be turned on for a predefined number of bytes on each channel. After that many bytes pass through, the state will return back to MU_XSCRIPT_NUMBER. This allows, in particular, to improve logging of client commands containing literals in imap4d. * include/mailutils/stream.h (MU_IOCTL_XSCRIPTSTREAM_CHANNEL): New ioctl subcode. (mu_xscript_channel): New struct. (MU_XSCRIPT_LEVEL_IS_PACKED) (MU_XSCRIPT_LEVEL_MASK,MU_XSCRIPT_LEVEL_UNMASK) (MU_XSCRIPT_LEVEL_PACK): New macros. * include/mailutils/sys/xscript-stream.h (_mu_xscript_channel): New struct. (_mu_xscript_stream): Keep independent state for each channel. * libmailutils/stream/xscript-stream.c: Rewrite as a state machine with independent states for input and output channels. * libmailutils/tests/xscript.at: Test packed channel levels and MU_IOCTL_XSCRIPTSTREAM_CHANNEL ioctl. * libmailutils/tests/xscript.c: Rewrite command parser. * imap4d/imap4d.h (xscript_declare_client_payload): New proto. * imap4d/util.c (xscript_declare_client_payload): New function. * imap4d/io.c (imap4d_readline): Use xscript_declare_client_payload after literals.
2019-01-29imap4d: Proper case-insensitive searches over multibyte strings.Sergey Poznyakoff11
This requires libunistring. * NEWS: Update. * README: Update. * configure.ac: Check for libunistring. * libmailutils/base/version.c: Reflect libunistring usage. * imap4d/Makefile.am: Link with libunistring, if available. * imap4d/imap4d.h (unistr_downcase) (unistr_is_substring): New protos. * imap4d/search.c (_scan_header) (_scan_header_all,_match_text): Use unistr_is_substring for searches. * imap4d/unistr_c.c: New file. * imap4d/unistr_u8.c: New file. * imap4d/tests/search.at: Add new test.
2019-01-28Revert 3aeec0dcc151b836cb09d756ad41598c95201446.Sergey Poznyakoff1
Adding 1 to the buffer size is necessary, because _stream_scandelim requires buffer to provide enough space to accomodate the trailing 0. Consequently, the minimal acceptable buffer size is 2.

Return to:

Send suggestions and report system problems to the System administrator.