AgeCommit message (Collapse)AuthorFiles
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. * (MU_AUTHLIBS_DEPENDENCY) (DBMLIB_DEPENDENCY,SQLLIB_DEPENDENCY): Remove. * imap4d/ Remove explicit _DEPENDENCIES. * pop3d/ Likewise. * libmu_auth/ Likewise. * libmu_dbm/ 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/ Add new test. * libmailutils/tests/ 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/ Add new tests. * libmailutils/tests/fsfolder.c: Minor changes. * libmailutils/tests/ Add new tests. * libmailutils/tests/ New file. * libmailutils/tests/ 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/ Add new files. * libmailutils/tests/fsfolder.c: Rewrite using test shell framework. * libmailutils/tests/ Use semicolons to delimit commands. * libmailutils/tests/ Likewise. * libmailutils/tests/linetrack.c: Rewrite using test shell framework. * libmailutils/tests/ Change command initial character to dot. * libmailutils/tests/listop.c: Rewrite using test shell framework. * libmailutils/tests/ Minor changes. * libproto/dotmail/tests/dm_mesg.c: Rewrite using test shell framework. * libproto/dotmail/tests/ 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/ 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/ Fix test output. * libmailutils/tests/ 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 * 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/ 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/ Add hdrcpy.c * libmailutils/tests/hdrcpy.c: New test program. * libmailutils/tests/ New testcase. * libmailutils/tests/ Add new test program and testcase. * libmailutils/tests/ Add new testcase. * libproto/dotmail/tests/ 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/ 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/ New file. * libmailutils/tests/ Include * libmailutils/tests/ Add * testsuite/ Remove extra newline from the expected output. * testsuite/ Likewise.
2019-03-02Improve the dotmail testsuiteSergey Poznyakoff11
* libproto/dotmail/tests/dm_mesg.c: Rewrite to take commands from stdin. * libproto/dotmail/tests/ Add * libproto/dotmail/tests/ (DM_MESG): New macro. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ Use DM_MESG. * libproto/dotmail/tests/ Likewise. * libproto/dotmail/tests/ Likewise. * libproto/dotmail/tests/ Likewise. * libproto/dotmail/tests/ Likewise. * libproto/dotmail/tests/ Likewise. * libproto/dotmail/tests/ 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/ Add new test. * libproto/dotmail/tests/ New test. * libproto/dotmail/tests/dm_detect.c: New file. * libproto/dotmail/tests/ Add new test.
2019-03-01Initial implementation of the dotfile formatSergey Poznyakoff30
* 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/ 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/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/dm_mbox.c: New file. * libproto/dotmail/tests/dm_mesg.c: New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/dm_qget.c: New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ New file. * libproto/dotmail/tests/ 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. * Use new macros to enable mailbox formats * libproto/ Augment SUBDIRS instead of using Makefile variables. * comsat/ Use MU_LIB_.*MAILBOX macros to link in the necessary libraries. * examples/ Likewise. * examples/cpp/ Likewise. * frm/ Likewise. * imap4d/ Likewise. * include/mailutils/sys/ Likewise. * libmu_scm/ Likewise. * libproto/ Likewise. * maidag/ Likewise. * mail/ Likewise. * messages/ Likewise. * mh/ Likewise. * movemail/ Likewise. * mu/libexec/ Likewise. * pop3d/ Likewise. * python/2/libmu_py/ Likewise. * python/3/libmu_py/ Likewise. * readmsg/ Likewise. * sieve/ Likewise. * testsuite/ 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. * 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
* Build libmailutils/mailcap/Makefile * include/mailutils/mailcap.h: Rewrite * include/mailutils/sys/ 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/ Build in mailcap * libmailutils/base/ Remove mailcap.c * libmailutils/base/mailcap.c: Remove. * libmailutils/mailcap/ 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/ New file. * libmu_cpp/ 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/ 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/ 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. * Check for libunistring. * libmailutils/base/version.c: Reflect libunistring usage. * imap4d/ 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/ 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.
2019-01-27Minor fixSergey Poznyakoff1
* search.c (_match_multipart): Initialize result.
2019-01-26Minor fixSergey Poznyakoff1
* imap4d/search.c (parse_search_key): Fix eventual NULL pointer dereference.
2019-01-26Add tests for imap4d SEARCH BODY, TEXT, and CHARSETSergey Poznyakoff8
* imap4d/tests/.gitignore: New file. * imap4d/tests/ckiconv.c: New file. * imap4d/tests/ Build ckiconv.c * imap4d/tests/ Add tests for BODY, TEXT and CHARSET * imap4d/tests/ (IMAP4D_WITH_PREREQ): New macro (IMAP4D_CHECK): Skip test if the supplied prerequisite is not satisfied. * testsuite/spool/search2.mbox: New file. * testsuite/spool/DISTFILES: Add search2.mbox. * mail/decode.c (mime_descend): Fix handling of message/rfc822.
2019-01-25Remove misguiding commentSergey Poznyakoff1
2019-01-25imap4d: implement SEARCH CHARSET; fix BODY and TEXT searches.Sergey Poznyakoff5
* imap4d/search.c: Implement proper BODY searches. Implement CHARSET. * imap4d/util.c (util_strcasestr): Remove. Use mu_c_strcasestr instead. * imap4d/imap4d.h: Likewise. * NEWS: Document changes.
2019-01-25Improve error checking in stream writing functions.Sergey Poznyakoff2
* libmailutils/stream/stream.c (mu_stream_write): Return EIO on short writes if pnwritten is NULL. * libmailutils/stream/streamcpy.c (mu_stream_copy): Likewise (if source stream size is known.
2019-01-24Fix stream reference implementationSergey Poznyakoff1
Do not propagate streamref's error and eof state upstream. * libmailutils/stream/streamref.c (streamref_return): Remove function. All uses updated.
2019-01-23mail: fix completion of set, unset, and variableSergey Poznyakoff3
2019-01-23mail: implement variable and command expansion in echo commandSergey Poznyakoff6
* mail/echo.c: Implement variable and command expansion. * mail/mail.c (main): Set PID mailvar. * mail/mailvar.c (mailvar_tab): New variable PID (to help in debugging). (set_folder): Expand initial ~ * mail/set.c: Remove misguiding comment.
2019-01-23Fix in IMAP wildcard matcherSergey Poznyakoff1
* libmailutils/imapio/wildmatch.c (_wild_match): Handle % at the end of input same way as *.
2019-01-23mail: fixes in completion routinesSergey Poznyakoff1
2019-01-23mail: improve message set parserSergey Poznyakoff6
* mail/from.c (sender_string): New function. * mail/mail.h: Likewise. * mail/msgset.y: Fix memory management and error reporting. Implement sender address matching. * mail/util.c (util_outfolder_name): Always return allocated value. * mail/copy.c (mail_copy0): Add typecast.
2019-01-23mail: new notation @, for the mailbox given with the -f optionSergey Poznyakoff8
* doc/texinfo/programs/mail.texi: Document the @ notation. * NEWS: Likewise. * mail/copy.c (mail_copy0): Rewrite. Use mailbox URLs instead of filenames. * mail/file.c (mail_expand_name): Return integer code. On success, convert the expanded name to URL and return it in the memory location supplied by the second argument. Use new shorthand notation @, for the name of the file given with the -f option. All uses changed. * mail/mail.c (secondary_url): New global. (main): Save the URL of the file given with the -f option in secondary_url. Use it, instead of the file variable, to decide what kind of summary message to display for empty mailbox (see commit 99b6b6f02c3cf94ebe1daf7233a702c743d6a2b5). * mail/mail.h (secondary_url): New global. (mail_expand_name): Change prototype. * mail/mailline.c: Minor changes. * libmailutils/wicket/noauth.c (noauth_ticket_get_cred): Return MU_ERR_AUTH_NO_CRED.
2019-01-22Summarize recent changes in NEWSSergey Poznyakoff1

Return to:

Send suggestions and report system problems to the System administrator.